Members
(constant) Card
!DEPRECATED: Do not use. This component is too opinonated
(constant) CardBody
!DEPRECATED: Do not use. This component is too opinonated
(constant) clients
- Source:
- Deprecated:
- since version 2.42.0 - using static clients.json instead to fetch from backend
(constant) Drawer
Depending on the step, returns an appropriate widget
state
This is where you can pass more information to prefill the next page e.g. email, phone, first and last name
(constant) TOOLTIP_DIRECTIONS :string
Properties:
Name | Type | Description |
---|---|---|
BOTTOM |
string | |
LEFT |
string | |
RIGHT |
string | |
TOP |
string |
Enum for class direction values.
Type:
- string
view
Chip title6_baseBrown_roundedAccentLight has view field that is not null
Methods
(async) axiosRequest(path, method, data, headers) → {Promise.<*>}
- Source:
helper method to perform an api requests
Parameters:
Name | Type | Description |
---|---|---|
path.method |
||
path |
||
method |
||
data |
||
headers |
||
path.path |
||
path.data |
||
path.config |
Returns:
- Type
- Promise.<*>
CardTitle(root0)
!DEPRECATED: Do not use. This component is too opinonated
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
root0 |
Properties
|
componentDidUpdate(component, init)
Parameters:
Name | Type | Description |
---|---|---|
component |
||
init |
Controller1Provider(props)
Controller logic for login type 1. Tries to encapsulate as much as it should
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
createUniqueResGroupMap(menuGroupHash) → {object}
Receive a array of menus and generate a Map with structure of [restaurantGroupId] : [menu, menu]
Parameters:
Name | Type | Description |
---|---|---|
menuGroupHash |
array | Either upsell, item, empty default to item |
Returns:
- Type
- object
directionClass(dir)
Select the css class to suffix the main class which will apply direction specific styling
Parameters:
Name | Type | Description |
---|---|---|
dir |
string | Direction to render tooltip. Valid values are top, bottom, right, left. Default is top |
disableScroll()
- Source:
enableScroll()
- Source:
eventHandler()
Lunchbox Tools Event Handler Execute an event after initialization or add to a window queue
FacebookButton(root0)
Properties:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
Setting it to redirect to be consistent with Facebook sign in
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
root0 |
Properties
|
getMarketMenuMap(menuGroupHash) → {object}
Trim groupHash Value and return the first two of each menu group
Parameters:
Name | Type | Description |
---|---|---|
menuGroupHash |
object | Either upsell, item, empty default to item |
Returns:
- Type
- object
getScrollPosition(root0)
- Source:
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
root0 |
Properties
|
getSize()
- Source:
GoogleButton(root0)
Properties:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
Setting it to redirect to be consistent with Google sign in
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
root0 |
Properties
|
GroupType1(props)
Renders UI for items inside of a subgroup for type1 (radio button)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
Image(props)
Returms image tag with the attributes set
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
Image1(props)
! DEPRECATED: do not use. Use
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
ImageUrlGenerator(mediaName, mediaType)
Helper function for returning an asset URL
Parameters:
Name | Type | Description |
---|---|---|
mediaName |
string | Name of the file ex art_menu_header.jpg |
mediaType |
string | File extension if needed to override the extension on the mediaName ex png, svg |
InlineLoader(root0)
All other props are spread onto the root <svg>
element
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
root0 |
Properties
|
InterceptCheckoutComplete(props)
Interceptor between checkout and purchase-complete confirmation If the patron(user) is:
- new to Beam, show Beam widget in the interceptor before going to purchase-complete confirmation
- not new, bring the user straight to purchase-complete confirmation
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
LoyaltyHeader(props)
Return a loyalty header with the attributes set
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
MobileAppDownload(style)
Renders mobile app download text, imgs with links
Parameters:
Name | Type | Description |
---|---|---|
style.style |
||
style |
object |
nestedModifierState(optionId, modId, modsState)
- Source:
- To Do:
-
- Test using multiple nested tiers...
- Move this to the mods context
nestedModifierState - recursively search modifiers state for the modifiers of an option. Read https://www.notion.so/Item-Details-9bfe384406a64e71a2f23ac59afc50a1 first.
Parameters:
Name | Type | Description |
---|---|---|
optionId |
string | the option to search |
modId |
string | the item id to search |
modsState |
object | the modifier state |
objDifference(fromObject, toObject) → {Object}
- Source:
Deep diff between two object-likes
Parameters:
Name | Type | Description |
---|---|---|
fromObject |
Object | the original object |
toObject |
Object | the updated object |
Returns:
- a new object which represents the diff
- Type
- Object
onClick - parent container click action (e) → {function}
Parameters:
Name | Type | Description |
---|---|---|
e |
* | event |
Returns:
- add or remove current modifier from parent state
- Type
- function
onClickBack(memory)
Parameters:
Name | Type | Description |
---|---|---|
memory |
object |
onWheelHandler(e, scrollingRef)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
e |
||
scrollingRef |
Pincode(props)
Parameters:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
POST_BEAM_TRANSACTION(widgetId, data)
Helper method for postTransaction
Parameters:
Name | Type | Description |
---|---|---|
widgetId |
string | |
data |
object |
(async) postTransaction(beam, selectedNonprofit)
Post method for posting Beam transaction data
Parameters:
Name | Type | Description |
---|---|---|
beam |
object | |
|
||
selectedNonprofit |
preventDefault(e)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
e |
ProgressBar(views, progressPercentage)
Parent component uses this to show a progress bar with theme & progress percentage
Parameters:
Name | Type | Description |
---|---|---|
views.views |
||
views |
object | views by parent component that uses withTemplate HOC using theme file |
progressPercentage |
number | % of the progress to show on the bar |
views.progressPercentage |
removeNestedModifier(args) → {object}
Remove a modifier recursively from the mods state Structure as followed in notion.so/Item-Details-9bfe384406a64e71a2f23ac59afc50a1
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
object | list of arguments passed as an object Properties
|
Returns:
Object of all modifiers with the modifier removed
- Type
- object
runEvent()
Lunchbox Tools Execute Event Only calls events for client enabled tools
SignUpConfirmation(props)
Depending on the step, returns an appropriate widget
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
SignupPage(props)
- Source:
Render a standalone sign up/in page where the user can either log in and be redirected to the profile page or sign up and directed to place an order
Parameters:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
toolInitializers()
- Source:
- To Do:
-
- When webpack v5 is merged in, we can use AVAILABLE_ENVS as constants.
- Consolidate console logs into logger fn with optional condition to make code easier to read.
Tooltip(props)
- Source:
- To Do:
-
- Implement the arrow rendering for a tooltip based on direction
Renders a tooltip that only appears whne the child of this component is rendered
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
object |
Properties
|
useIntersectionObserver(callback)
Parameters:
Name | Type | Description |
---|---|---|
callback |
withModifierItem(Component) → {*}
withModifierItem - HOC for modifier items
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
Component |
* |
Properties
|
Returns:
- Type
- *
Type Definitions
props
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
className |
string |
<optional> |
additional classes for parent container |
isOptionalSingle |
boolean |
<optional> |
if this modifier item is maximum of 1 and is not required |
item |
object | itemsHash data from menu context |
|
multiSelect |
boolean |
<optional> |
if this modifier item has a maximum greater than 1 |
removeModifier |
function | remove a modifier payload from parent state |
|
addModifier |
function | add a modifier payload to parent state |
|
parent |
object | parent payload (option and item with selected nested modifiers) |
|
quantity |
number |
<optional> |
current modifier quantity in parent state |
type |
string | style cell type from theme |
Type:
- object