Search
Preparing search index...
The search index is not available
shopperman api docs
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
CartSystem
Class CartSystem
Cart system component class
is a section element
takes as props a cart object, checkout machine, scroll tracker, etc
contains CartButton and CartPanel components, mediates their relationship
handles cart button click event to toggle cart panel open or closed
handles cart system scroll tracking
ultimately performs the checkout, using the cart panel checkout callback and checkout machine as tools
takes a cart text object and distributes the text labels to child components
Hierarchy
Component
<
CartSystemProps
,
any
>
CartSystem
Index
Constructors
constructor
Properties
base
context
props
state
default
Props
display
Name
Methods
component
Will
Mount
component
Will
Unmount
force
Update
render
set
State
component
Did
Mount
component
Did
Update
component
Will
Mount
component
Will
Receive
Props
component
Will
Unmount
component
Will
Update
get
Child
Context
should
Component
Update
Constructors
constructor
new
Cart
System
(
props
?:
CartSystemProps
, context
?:
any
)
:
CartSystem
Parameters
Optional
props:
CartSystemProps
Optional
context:
any
Returns
CartSystem
Properties
Optional
base
base
:
HTMLElement
context
context
:
any
props
props
:
RenderableProps
<
CartSystemProps
>
state
state
:
Readonly
<
any
>
Static
Optional
default
Props
default
Props
:
any
Static
Optional
display
Name
display
Name
:
string
Methods
component
Will
Mount
component
Will
Mount
(
)
:
void
Mount
Returns
void
component
Will
Unmount
component
Will
Unmount
(
)
:
void
Unmount
Returns
void
force
Update
force
Update
(
callback
?:
function
)
:
void
Parameters
Optional
callback:
function
(
)
:
void
Returns
void
Returns
void
render
render
(
)
:
Element
Render
section element with scroll tracking
contains cart button and cart panel
Returns
Element
set
State
set
State<K>
(
state
:
Pick
<
any
,
K
>
, callback
?:
function
)
:
void
set
State<K>
(
fn
:
function
, callback
?:
function
)
:
void
Type parameters
K
:
keyof any
Parameters
state:
Pick
<
any
,
K
>
Optional
callback:
function
(
)
:
void
Returns
void
Returns
void
Type parameters
K
:
keyof any
Parameters
fn:
function
(
prevState
:
any
, props
:
CartSystemProps
)
:
Pick
<
any
,
K
>
Parameters
prevState:
any
props:
CartSystemProps
Returns
Pick
<
any
,
K
>
Optional
callback:
function
(
)
:
void
Returns
void
Returns
void
Static
Optional
component
Did
Mount
component
Did
Mount
(
)
:
void
Returns
void
Static
Optional
component
Did
Update
component
Did
Update
(
previousProps
:
Readonly
<
CartSystemProps
>
, previousState
:
Readonly
<
any
>
, previousContext
:
any
)
:
void
Parameters
previousProps:
Readonly
<
CartSystemProps
>
previousState:
Readonly
<
any
>
previousContext:
any
Returns
void
Static
Optional
component
Will
Mount
component
Will
Mount
(
)
:
void
Returns
void
Static
Optional
component
Will
Receive
Props
component
Will
Receive
Props
(
nextProps
:
Readonly
<
CartSystemProps
>
, nextContext
:
any
)
:
void
Parameters
nextProps:
Readonly
<
CartSystemProps
>
nextContext:
any
Returns
void
Static
Optional
component
Will
Unmount
component
Will
Unmount
(
)
:
void
Returns
void
Static
Optional
component
Will
Update
component
Will
Update
(
nextProps
:
Readonly
<
CartSystemProps
>
, nextState
:
Readonly
<
any
>
, nextContext
:
any
)
:
void
Parameters
nextProps:
Readonly
<
CartSystemProps
>
nextState:
Readonly
<
any
>
nextContext:
any
Returns
void
Static
Optional
get
Child
Context
get
Child
Context
(
)
:
object
Returns
object
Static
Optional
should
Component
Update
should
Component
Update
(
nextProps
:
Readonly
<
CartSystemProps
>
, nextState
:
Readonly
<
any
>
, nextContext
:
any
)
:
boolean
Parameters
nextProps:
Readonly
<
CartSystemProps
>
nextState:
Readonly
<
any
>
nextContext:
any
Returns
boolean
Globals
Cart
System
constructor
base
context
props
state
default
Props
display
Name
component
Will
Mount
component
Will
Unmount
force
Update
render
set
State
component
Did
Mount
component
Did
Update
component
Will
Mount
component
Will
Receive
Props
component
Will
Unmount
component
Will
Update
get
Child
Context
should
Component
Update
Generated using
TypeDoc
Cart system component class