@open-tender/store 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Allergen.d.ts +1 -1
- package/dist/cjs/components/Allergen.js +1 -2
- package/dist/cjs/components/Applied.d.ts +1 -1
- package/dist/cjs/components/Applied.js +1 -2
- package/dist/cjs/components/ButtonLink.d.ts +1 -1
- package/dist/cjs/components/ButtonLink.js +1 -2
- package/dist/cjs/components/Card.d.ts +1 -1
- package/dist/cjs/components/Card.js +1 -2
- package/dist/cjs/components/Cart.d.ts +1 -1
- package/dist/cjs/components/Cart.js +2 -2
- package/dist/cjs/components/CartItem.d.ts +1 -1
- package/dist/cjs/components/CartItem.js +1 -1
- package/dist/cjs/components/CartUpsellItem.d.ts +1 -1
- package/dist/cjs/components/CartUpsellItem.js +2 -3
- package/dist/cjs/components/CartUpsells.d.ts +1 -1
- package/dist/cjs/components/CartUpsells.js +2 -2
- package/dist/cjs/components/CategoryItem.d.ts +1 -1
- package/dist/cjs/components/CategoryItem.js +2 -3
- package/dist/cjs/components/CategoryNav.d.ts +1 -1
- package/dist/cjs/components/CategoryNav.js +2 -2
- package/dist/cjs/components/CategoryNavItem.d.ts +1 -1
- package/dist/cjs/components/CategoryNavItem.js +2 -2
- package/dist/cjs/components/CategoryNavOther.d.ts +1 -1
- package/dist/cjs/components/CategoryNavOther.js +2 -3
- package/dist/cjs/components/CheckTotals.d.ts +1 -1
- package/dist/cjs/components/CheckTotals.js +1 -2
- package/dist/cjs/components/Discount.d.ts +1 -1
- package/dist/cjs/components/Discount.js +2 -3
- package/dist/cjs/components/ErrorMessage.d.ts +1 -1
- package/dist/cjs/components/ErrorMessage.js +1 -2
- package/dist/cjs/components/Header.d.ts +1 -1
- package/dist/cjs/components/Header.js +1 -1
- package/dist/cjs/components/Ingredients.d.ts +1 -1
- package/dist/cjs/components/Ingredients.js +1 -2
- package/dist/cjs/components/Input.d.ts +1 -1
- package/dist/cjs/components/Input.js +2 -3
- package/dist/cjs/components/ItemGroup.d.ts +1 -1
- package/dist/cjs/components/ItemGroup.js +2 -3
- package/dist/cjs/components/ItemGroups.d.ts +1 -1
- package/dist/cjs/components/ItemGroups.js +1 -1
- package/dist/cjs/components/ItemOption.d.ts +1 -1
- package/dist/cjs/components/ItemOption.js +2 -3
- package/dist/cjs/components/ItemSelections.d.ts +1 -1
- package/dist/cjs/components/ItemSelections.js +1 -1
- package/dist/cjs/components/Label.d.ts +1 -1
- package/dist/cjs/components/Label.js +1 -2
- package/dist/cjs/components/Loader.d.ts +1 -1
- package/dist/cjs/components/Loader.js +1 -2
- package/dist/cjs/components/MadeForNotes.d.ts +1 -1
- package/dist/cjs/components/MadeForNotes.js +2 -2
- package/dist/cjs/components/MenuCategory.d.ts +1 -1
- package/dist/cjs/components/MenuCategory.js +1 -2
- package/dist/cjs/components/MenuOther.d.ts +1 -1
- package/dist/cjs/components/MenuOther.js +1 -2
- package/dist/cjs/components/Modal.d.ts +1 -1
- package/dist/cjs/components/Modal.js +1 -2
- package/dist/cjs/components/ModalContent.d.ts +1 -1
- package/dist/cjs/components/ModalContent.js +1 -2
- package/dist/cjs/components/ModalHeader.d.ts +1 -1
- package/dist/cjs/components/ModalHeader.js +1 -2
- package/dist/cjs/components/NutritionalInfo.d.ts +1 -1
- package/dist/cjs/components/NutritionalInfo.js +2 -3
- package/dist/cjs/components/Option.d.ts +1 -1
- package/dist/cjs/components/Option.js +2 -2
- package/dist/cjs/components/OrderCard.d.ts +1 -1
- package/dist/cjs/components/OrderCard.js +6 -6
- package/dist/cjs/components/PointsReward.d.ts +1 -1
- package/dist/cjs/components/PointsReward.js +4 -4
- package/dist/cjs/components/PointsRewards.d.ts +1 -1
- package/dist/cjs/components/PointsRewards.js +2 -2
- package/dist/esm/components/Allergen.d.ts +1 -1
- package/dist/esm/components/Allergen.js +1 -2
- package/dist/esm/components/Applied.d.ts +1 -1
- package/dist/esm/components/Applied.js +1 -2
- package/dist/esm/components/ButtonLink.d.ts +1 -1
- package/dist/esm/components/ButtonLink.js +1 -2
- package/dist/esm/components/Card.d.ts +1 -1
- package/dist/esm/components/Card.js +1 -2
- package/dist/esm/components/Cart.d.ts +1 -1
- package/dist/esm/components/Cart.js +3 -3
- package/dist/esm/components/CartItem.d.ts +1 -1
- package/dist/esm/components/CartItem.js +2 -2
- package/dist/esm/components/CartUpsellItem.d.ts +1 -1
- package/dist/esm/components/CartUpsellItem.js +2 -3
- package/dist/esm/components/CartUpsells.d.ts +1 -1
- package/dist/esm/components/CartUpsells.js +3 -3
- package/dist/esm/components/CategoryItem.d.ts +1 -1
- package/dist/esm/components/CategoryItem.js +2 -3
- package/dist/esm/components/CategoryNav.d.ts +1 -1
- package/dist/esm/components/CategoryNav.js +3 -3
- package/dist/esm/components/CategoryNavItem.d.ts +1 -1
- package/dist/esm/components/CategoryNavItem.js +3 -3
- package/dist/esm/components/CategoryNavOther.d.ts +1 -1
- package/dist/esm/components/CategoryNavOther.js +2 -3
- package/dist/esm/components/CheckTotals.d.ts +1 -1
- package/dist/esm/components/CheckTotals.js +1 -2
- package/dist/esm/components/Discount.d.ts +1 -1
- package/dist/esm/components/Discount.js +2 -3
- package/dist/esm/components/ErrorMessage.d.ts +1 -1
- package/dist/esm/components/ErrorMessage.js +1 -2
- package/dist/esm/components/Header.d.ts +1 -1
- package/dist/esm/components/Header.js +2 -2
- package/dist/esm/components/Ingredients.d.ts +1 -1
- package/dist/esm/components/Ingredients.js +1 -2
- package/dist/esm/components/Input.d.ts +1 -1
- package/dist/esm/components/Input.js +2 -3
- package/dist/esm/components/ItemGroup.d.ts +1 -1
- package/dist/esm/components/ItemGroup.js +2 -3
- package/dist/esm/components/ItemGroups.d.ts +1 -1
- package/dist/esm/components/ItemGroups.js +2 -2
- package/dist/esm/components/ItemOption.d.ts +1 -1
- package/dist/esm/components/ItemOption.js +2 -3
- package/dist/esm/components/ItemSelections.d.ts +1 -1
- package/dist/esm/components/ItemSelections.js +2 -2
- package/dist/esm/components/Label.d.ts +1 -1
- package/dist/esm/components/Label.js +1 -2
- package/dist/esm/components/Loader.d.ts +1 -1
- package/dist/esm/components/Loader.js +1 -2
- package/dist/esm/components/MadeForNotes.d.ts +1 -1
- package/dist/esm/components/MadeForNotes.js +3 -3
- package/dist/esm/components/MenuCategory.d.ts +1 -1
- package/dist/esm/components/MenuCategory.js +1 -2
- package/dist/esm/components/MenuOther.d.ts +1 -1
- package/dist/esm/components/MenuOther.js +1 -2
- package/dist/esm/components/Modal.d.ts +1 -1
- package/dist/esm/components/Modal.js +1 -2
- package/dist/esm/components/ModalContent.d.ts +1 -1
- package/dist/esm/components/ModalContent.js +1 -2
- package/dist/esm/components/ModalHeader.d.ts +1 -1
- package/dist/esm/components/ModalHeader.js +1 -2
- package/dist/esm/components/NutritionalInfo.d.ts +1 -1
- package/dist/esm/components/NutritionalInfo.js +2 -3
- package/dist/esm/components/Option.d.ts +1 -1
- package/dist/esm/components/Option.js +3 -3
- package/dist/esm/components/OrderCard.d.ts +1 -1
- package/dist/esm/components/OrderCard.js +7 -7
- package/dist/esm/components/PointsReward.d.ts +1 -1
- package/dist/esm/components/PointsReward.js +5 -5
- package/dist/esm/components/PointsRewards.d.ts +1 -1
- package/dist/esm/components/PointsRewards.js +3 -3
- package/package.json +1 -1
|
@@ -5,6 +5,6 @@ declare const Ingredients: ({ title, subtitle, ingredients, close, children }: {
|
|
|
5
5
|
subtitle?: string;
|
|
6
6
|
ingredients: string;
|
|
7
7
|
close: () => void;
|
|
8
|
-
children
|
|
8
|
+
children: (props: IngredientsProps) => ReactNode;
|
|
9
9
|
}) => ReactNode;
|
|
10
10
|
export default Ingredients;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Ingredients as IngredientsView } from '@open-tender/ui';
|
|
2
1
|
import { useAppSelector } from '../app/hooks';
|
|
3
2
|
import { selectKioskConfig } from '../slices';
|
|
4
3
|
var Ingredients = function (_a) {
|
|
5
|
-
var title = _a.title, subtitle = _a.subtitle, ingredients = _a.ingredients, close = _a.close,
|
|
4
|
+
var title = _a.title, subtitle = _a.subtitle, ingredients = _a.ingredients, close = _a.close, children = _a.children;
|
|
6
5
|
var config = useAppSelector(selectKioskConfig).ingredients;
|
|
7
6
|
var handlers = { close: close };
|
|
8
7
|
return children({ config: config, handlers: handlers, title: title, subtitle: subtitle, ingredients: ingredients });
|
|
@@ -6,6 +6,6 @@ declare const Input: ({ label, value, setValue, isRequired, style, children }: {
|
|
|
6
6
|
setValue: (value: string) => void;
|
|
7
7
|
isRequired?: boolean;
|
|
8
8
|
style?: Styles;
|
|
9
|
-
children
|
|
9
|
+
children: (props: InputProps) => ReactNode;
|
|
10
10
|
}) => ReactNode;
|
|
11
11
|
export default Input;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Input as InputView } from '@open-tender/ui';
|
|
2
1
|
import { useAppSelector } from '../app/hooks';
|
|
3
2
|
import { selectKioskConfig } from '../slices';
|
|
4
3
|
var Input = function (_a) {
|
|
5
|
-
var label = _a.label, value = _a.value, setValue = _a.setValue, isRequired = _a.isRequired, style = _a.style,
|
|
6
|
-
var
|
|
4
|
+
var label = _a.label, value = _a.value, setValue = _a.setValue, isRequired = _a.isRequired, style = _a.style, children = _a.children;
|
|
5
|
+
var _b = useAppSelector(selectKioskConfig), config = _b.input, labelConfig = _b.label;
|
|
7
6
|
var update = function (evt) {
|
|
8
7
|
setValue(evt.target.value);
|
|
9
8
|
};
|
|
@@ -4,6 +4,6 @@ import { ReactNode } from 'react';
|
|
|
4
4
|
declare const ItemGroup: ({ group, content, children }: {
|
|
5
5
|
group: CartItemGroup;
|
|
6
6
|
content: ReactNode;
|
|
7
|
-
children
|
|
7
|
+
children: (props: ItemGroupProps) => ReactNode;
|
|
8
8
|
}) => ReactNode;
|
|
9
9
|
export default ItemGroup;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ItemGroup as ItemGroupView } from '@open-tender/ui';
|
|
2
1
|
import { useModifierGroup } from '@open-tender/utils';
|
|
3
2
|
import { useAppSelector } from '../app/hooks';
|
|
4
3
|
import { selectKioskConfig } from '../slices';
|
|
5
4
|
var ItemGroup = function (_a) {
|
|
6
|
-
var group = _a.group, content = _a.content,
|
|
7
|
-
var
|
|
5
|
+
var group = _a.group, content = _a.content, children = _a.children;
|
|
6
|
+
var _b = useAppSelector(selectKioskConfig), config = _b.itemGroup, errorMessageConfig = _b.errorMessage, successMessageConfig = _b.successMessage;
|
|
8
7
|
var modifierGroup = useModifierGroup(group);
|
|
9
8
|
return children({
|
|
10
9
|
config: config,
|
|
@@ -6,6 +6,6 @@ declare const ItemGroups: ({ handlers, groups, levels, excludeSize, children }:
|
|
|
6
6
|
groups: CartItemGroups;
|
|
7
7
|
levels: CartLevels;
|
|
8
8
|
excludeSize?: boolean;
|
|
9
|
-
children
|
|
9
|
+
children: (props: ItemGroupsProps) => ReactNode;
|
|
10
10
|
}) => React.ReactNode;
|
|
11
11
|
export default ItemGroups;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ItemOption, ItemGroup
|
|
1
|
+
import { ItemOption, ItemGroup } from '@open-tender/ui';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useAppSelector } from '../app/hooks';
|
|
4
4
|
import { selectKioskConfig } from '../slices';
|
|
5
5
|
import { default as ItemGroupContainer } from './ItemGroup';
|
|
6
6
|
import { default as ItemOptionContainer } from './ItemOption';
|
|
7
7
|
var ItemGroups = function (_a) {
|
|
8
|
-
var handlers = _a.handlers, groups = _a.groups, levels = _a.levels, _b = _a.excludeSize, excludeSize = _b === void 0 ? true : _b,
|
|
8
|
+
var handlers = _a.handlers, groups = _a.groups, levels = _a.levels, _b = _a.excludeSize, excludeSize = _b === void 0 ? true : _b, children = _a.children;
|
|
9
9
|
var config = useAppSelector(selectKioskConfig).itemGroups;
|
|
10
10
|
var renderItemOption = function (group, option) { return (React.createElement(ItemOptionContainer, { levels: levels, handlers: handlers, group: group, option: option, children: ItemOption })); };
|
|
11
11
|
var renderItemGroup = function (group, content) { return (React.createElement(ItemGroupContainer, { group: group, content: content, children: ItemGroup })); };
|
|
@@ -6,6 +6,6 @@ declare const ItemOption: ({ handlers, group, option, levels, children }: {
|
|
|
6
6
|
group: CartItemGroup;
|
|
7
7
|
option: CartItemOption;
|
|
8
8
|
levels: CartLevels;
|
|
9
|
-
children
|
|
9
|
+
children: (props: ItemOptionProps) => ReactNode;
|
|
10
10
|
}) => ReactNode;
|
|
11
11
|
export default ItemOption;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ItemOption as ItemOptionView } from '@open-tender/ui';
|
|
2
1
|
import { useModifier } from '@open-tender/utils';
|
|
3
2
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
4
3
|
import { selectKioskConfig, setCurrentOption } from '../slices';
|
|
5
4
|
var ItemOption = function (_a) {
|
|
6
|
-
var handlers = _a.handlers, group = _a.group, option = _a.option, levels = _a.levels,
|
|
5
|
+
var handlers = _a.handlers, group = _a.group, option = _a.option, levels = _a.levels, children = _a.children;
|
|
7
6
|
var dispatch = useAppDispatch();
|
|
8
|
-
var
|
|
7
|
+
var _b = useAppSelector(selectKioskConfig), config = _b.itemOption, cardConfig = _b.card;
|
|
9
8
|
var toggleOption = handlers.toggleOption, incrementOption = handlers.incrementOption, decrementOption = handlers.decrementOption, setOptionQuantity = handlers.setOptionQuantity;
|
|
10
9
|
var allergenAlerts = [];
|
|
11
10
|
var modifier = useModifier(group, option, levels, toggleOption, incrementOption, decrementOption, setOptionQuantity, allergenAlerts);
|
|
@@ -6,6 +6,6 @@ declare const ItemSelections: ({ handlers, groups, levels, isIncomplete, childre
|
|
|
6
6
|
groups: CartItemGroups;
|
|
7
7
|
levels: CartLevels;
|
|
8
8
|
isIncomplete: boolean;
|
|
9
|
-
children
|
|
9
|
+
children: (props: ItemSelectionsProps) => ReactNode;
|
|
10
10
|
}) => React.ReactNode;
|
|
11
11
|
export default ItemSelections;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ErrorMessage, ItemOption
|
|
1
|
+
import { ErrorMessage, ItemOption } from '@open-tender/ui';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useAppSelector } from '../app/hooks';
|
|
4
4
|
import { selectKioskConfig } from '../slices';
|
|
5
5
|
import { default as ErrorMessageContainer } from './ErrorMessage';
|
|
6
6
|
import { default as ItemOptionContainer } from './ItemOption';
|
|
7
7
|
var ItemSelections = function (_a) {
|
|
8
|
-
var handlers = _a.handlers, groups = _a.groups, levels = _a.levels, isIncomplete = _a.isIncomplete,
|
|
8
|
+
var handlers = _a.handlers, groups = _a.groups, levels = _a.levels, isIncomplete = _a.isIncomplete, children = _a.children;
|
|
9
9
|
var config = useAppSelector(selectKioskConfig).itemSelections;
|
|
10
10
|
var renderErrorMessage = function (icon, children) { return (React.createElement(ErrorMessageContainer, { icon: icon, content: children, children: ErrorMessage })); };
|
|
11
11
|
var renderItemOption = function (group, option) { return (React.createElement(ItemOptionContainer, { levels: levels, handlers: handlers, group: group, option: option, children: ItemOption })); };
|
|
@@ -5,6 +5,6 @@ declare const Label: ({ content, label, isRequired, style, children }: {
|
|
|
5
5
|
label?: string;
|
|
6
6
|
isRequired?: boolean;
|
|
7
7
|
style?: Styles;
|
|
8
|
-
children
|
|
8
|
+
children: (props: LabelProps) => ReactNode;
|
|
9
9
|
}) => ReactNode;
|
|
10
10
|
export default Label;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Label as LabelView } from '@open-tender/ui';
|
|
2
1
|
import { useAppSelector } from '../app/hooks';
|
|
3
2
|
import { selectKioskConfig } from '../slices';
|
|
4
3
|
var Label = function (_a) {
|
|
5
|
-
var content = _a.content, label = _a.label, isRequired = _a.isRequired, style = _a.style,
|
|
4
|
+
var content = _a.content, label = _a.label, isRequired = _a.isRequired, style = _a.style, children = _a.children;
|
|
6
5
|
var config = useAppSelector(selectKioskConfig).label;
|
|
7
6
|
return children({ config: config, label: label, isRequired: isRequired, style: style, children: content });
|
|
8
7
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Loader as LoaderView } from '@open-tender/ui';
|
|
2
1
|
import { useAppSelector } from '../app/hooks';
|
|
3
2
|
import { selectKioskConfig } from '../slices';
|
|
4
3
|
var Loader = function (_a) {
|
|
5
|
-
var text = _a.text, style = _a.style,
|
|
4
|
+
var text = _a.text, style = _a.style, children = _a.children;
|
|
6
5
|
var config = useAppSelector(selectKioskConfig).loader;
|
|
7
6
|
return children({ config: config, text: text, style: style });
|
|
8
7
|
};
|
|
@@ -9,6 +9,6 @@ declare const MadeForNotes: ({ subtitle, hasMadeFor, madeFor, setMadeFor, hasNot
|
|
|
9
9
|
notes: string | null;
|
|
10
10
|
setNotes: (notes: string) => void;
|
|
11
11
|
close: () => void;
|
|
12
|
-
children
|
|
12
|
+
children: (props: MadeForNotesProps) => ReactNode;
|
|
13
13
|
}) => React.ReactNode;
|
|
14
14
|
export default MadeForNotes;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Input
|
|
1
|
+
import { Input } from '@open-tender/ui';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useAppSelector } from '../app/hooks';
|
|
4
4
|
import { selectKioskConfig } from '../slices';
|
|
5
5
|
import { default as InputContainer } from './Input';
|
|
6
6
|
import { default as TextAreaContainer } from './TextArea';
|
|
7
7
|
var MadeForNotes = function (_a) {
|
|
8
|
-
var subtitle = _a.subtitle, hasMadeFor = _a.hasMadeFor, madeFor = _a.madeFor, setMadeFor = _a.setMadeFor, hasNotes = _a.hasNotes, notes = _a.notes, setNotes = _a.setNotes, close = _a.close,
|
|
9
|
-
var
|
|
8
|
+
var subtitle = _a.subtitle, hasMadeFor = _a.hasMadeFor, madeFor = _a.madeFor, setMadeFor = _a.setMadeFor, hasNotes = _a.hasNotes, notes = _a.notes, setNotes = _a.setNotes, close = _a.close, children = _a.children;
|
|
9
|
+
var _b = useAppSelector(selectKioskConfig), config = _b.madeForNotes, modalContentConfig = _b.modalContent;
|
|
10
10
|
var handlers = { submit: close };
|
|
11
11
|
var renderInput = function (label, value, isRequired, style) { return (React.createElement(InputContainer, { label: label, setValue: setMadeFor, value: value, isRequired: isRequired, style: style, children: Input })); };
|
|
12
12
|
var renderTextArea = function (label, value, isRequired, style) { return (React.createElement(TextAreaContainer, { label: label, setValue: setNotes, value: value, isRequired: isRequired, style: style, children: Input })); };
|
|
@@ -4,6 +4,6 @@ import { ReactNode } from 'react';
|
|
|
4
4
|
declare const MenuCategory: ({ category, navigate, children }: {
|
|
5
5
|
category: MenuCategoryType;
|
|
6
6
|
navigate: (route: string) => void;
|
|
7
|
-
children
|
|
7
|
+
children: (props: MenuCategoryProps) => ReactNode;
|
|
8
8
|
}) => ReactNode;
|
|
9
9
|
export default MenuCategory;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { MenuCategory as MenuCategoryView } from '@open-tender/ui';
|
|
2
1
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
3
2
|
import { useKioskImageUrl } from '../hooks';
|
|
4
3
|
import { selectKioskConfig, setCurrentCategory } from '../slices';
|
|
5
4
|
var MenuCategory = function (_a) {
|
|
6
|
-
var category = _a.category, navigate = _a.navigate,
|
|
5
|
+
var category = _a.category, navigate = _a.navigate, children = _a.children;
|
|
7
6
|
var dispatch = useAppDispatch();
|
|
8
7
|
var config = useAppSelector(selectKioskConfig).menuCategory;
|
|
9
8
|
var imageUrl = useKioskImageUrl(category);
|
|
@@ -7,6 +7,6 @@ declare const MenuOther: ({ title, subtitle, path, item, children, navigate }: {
|
|
|
7
7
|
path: string;
|
|
8
8
|
item: MenuItem;
|
|
9
9
|
navigate: (route: string) => void;
|
|
10
|
-
children
|
|
10
|
+
children: (props: MenuOtherProps) => ReactNode;
|
|
11
11
|
}) => ReactNode;
|
|
12
12
|
export default MenuOther;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { MenuOther as MenuOtherView } from '@open-tender/ui';
|
|
2
1
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
3
2
|
import { selectKioskConfig, setCurrentCategory } from '../slices';
|
|
4
3
|
var MenuOther = function (_a) {
|
|
5
|
-
var title = _a.title, subtitle = _a.subtitle, path = _a.path, item = _a.item,
|
|
4
|
+
var title = _a.title, subtitle = _a.subtitle, path = _a.path, item = _a.item, children = _a.children, navigate = _a.navigate;
|
|
6
5
|
var dispatch = useAppDispatch();
|
|
7
6
|
var menuCategory = useAppSelector(selectKioskConfig).menuCategory;
|
|
8
7
|
var browse = function () {
|
|
@@ -4,6 +4,6 @@ declare const Modal: ({ show, close, content, children }: {
|
|
|
4
4
|
show: boolean;
|
|
5
5
|
close: () => void;
|
|
6
6
|
content: ReactNode;
|
|
7
|
-
children
|
|
7
|
+
children: (props: ModalProps) => ReactNode;
|
|
8
8
|
}) => React.JSX.Element | null;
|
|
9
9
|
export default Modal;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Modal as ModalView } from '@open-tender/ui';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { CSSTransition, TransitionGroup } from 'react-transition-group';
|
|
4
3
|
import { useAppSelector } from '../app/hooks';
|
|
5
4
|
import { selectKioskConfig } from '../slices';
|
|
6
5
|
var Modal = function (_a) {
|
|
7
|
-
var show = _a.show, close = _a.close, content = _a.content,
|
|
6
|
+
var show = _a.show, close = _a.close, content = _a.content, children = _a.children;
|
|
8
7
|
var config = useAppSelector(selectKioskConfig).modal;
|
|
9
8
|
var handlers = { close: close };
|
|
10
9
|
if (!config)
|
|
@@ -9,6 +9,6 @@ declare const ModalContent: ({ title, subtitle, content, submit, submitText, can
|
|
|
9
9
|
cancel: () => void;
|
|
10
10
|
cancelText?: string;
|
|
11
11
|
style?: Styles;
|
|
12
|
-
children
|
|
12
|
+
children: (props: ModalContentProps) => ReactNode;
|
|
13
13
|
}) => ReactNode;
|
|
14
14
|
export default ModalContent;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ModalContent as ModalContentView } from '@open-tender/ui';
|
|
2
1
|
import { useAppSelector } from '../app/hooks';
|
|
3
2
|
import { selectKioskConfig } from '../slices';
|
|
4
3
|
var ModalContent = function (_a) {
|
|
5
|
-
var title = _a.title, subtitle = _a.subtitle, content = _a.content, submit = _a.submit, submitText = _a.submitText, cancel = _a.cancel, cancelText = _a.cancelText, style = _a.style,
|
|
4
|
+
var title = _a.title, subtitle = _a.subtitle, content = _a.content, submit = _a.submit, submitText = _a.submitText, cancel = _a.cancel, cancelText = _a.cancelText, style = _a.style, children = _a.children;
|
|
6
5
|
var config = useAppSelector(selectKioskConfig).modalContent;
|
|
7
6
|
return children({
|
|
8
7
|
config: config,
|
|
@@ -3,6 +3,6 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
declare const ModalHeader: ({ title, subtitle, children }: {
|
|
4
4
|
title: string;
|
|
5
5
|
subtitle?: string;
|
|
6
|
-
children
|
|
6
|
+
children: (props: ModalHeaderProps) => ReactNode;
|
|
7
7
|
}) => ReactNode;
|
|
8
8
|
export default ModalHeader;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ModalHeader as ModalHeaderView } from '@open-tender/ui';
|
|
2
1
|
import { useAppSelector } from '../app/hooks';
|
|
3
2
|
import { selectKioskConfig } from '../slices';
|
|
4
3
|
var ModalHeader = function (_a) {
|
|
5
|
-
var title = _a.title, subtitle = _a.subtitle,
|
|
4
|
+
var title = _a.title, subtitle = _a.subtitle, children = _a.children;
|
|
6
5
|
var config = useAppSelector(selectKioskConfig).modalHeader;
|
|
7
6
|
return children({ config: config, title: title, subtitle: subtitle });
|
|
8
7
|
};
|
|
@@ -6,6 +6,6 @@ declare const NutritionalInfo: ({ title, subtitle, nutritionalInfo, close, child
|
|
|
6
6
|
subtitle?: string;
|
|
7
7
|
nutritionalInfo: NutritionalInfoType;
|
|
8
8
|
close: () => void;
|
|
9
|
-
children
|
|
9
|
+
children: (props: NutritionalInfoProps) => ReactNode;
|
|
10
10
|
}) => ReactNode;
|
|
11
11
|
export default NutritionalInfo;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { NutritionalInfo as NutritionalInfoView } from '@open-tender/ui';
|
|
2
1
|
import { useAppSelector } from '../app/hooks';
|
|
3
2
|
import { selectKioskConfig } from '../slices';
|
|
4
3
|
var NutritionalInfo = function (_a) {
|
|
5
|
-
var title = _a.title, subtitle = _a.subtitle, nutritionalInfo = _a.nutritionalInfo, close = _a.close,
|
|
6
|
-
var
|
|
4
|
+
var title = _a.title, subtitle = _a.subtitle, nutritionalInfo = _a.nutritionalInfo, close = _a.close, children = _a.children;
|
|
5
|
+
var _b = useAppSelector(selectKioskConfig), config = _b.nutritionalInfo, modalContentConfig = _b.modalContent;
|
|
7
6
|
var handlers = { close: close };
|
|
8
7
|
return children({
|
|
9
8
|
config: config,
|
|
@@ -6,6 +6,6 @@ declare const Option: ({ option, levels, handlers, close, children }: {
|
|
|
6
6
|
levels: CartLevels | null;
|
|
7
7
|
handlers: Handlers;
|
|
8
8
|
close: () => void;
|
|
9
|
-
children
|
|
9
|
+
children: (props: OptionProps) => ReactNode;
|
|
10
10
|
}) => React.ReactNode;
|
|
11
11
|
export default Option;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
|
-
import { ItemGroups
|
|
2
|
+
import { ItemGroups } from '@open-tender/ui';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { useAppSelector } from '../app/hooks';
|
|
5
5
|
import { selectKioskConfig } from '../slices';
|
|
6
6
|
import { default as ItemGroupsContainer } from './ItemGroups';
|
|
7
7
|
var Option = function (_a) {
|
|
8
|
-
var option = _a.option, levels = _a.levels, handlers = _a.handlers, close = _a.close,
|
|
9
|
-
var
|
|
8
|
+
var option = _a.option, levels = _a.levels, handlers = _a.handlers, close = _a.close, children = _a.children;
|
|
9
|
+
var _b = useAppSelector(selectKioskConfig), config = _b.option, modalContentConfig = _b.modalContent;
|
|
10
10
|
var handlersOption = __assign(__assign({}, handlers), { close: close });
|
|
11
11
|
if (!config || !option || !levels)
|
|
12
12
|
return null;
|
|
@@ -4,6 +4,6 @@ import React, { ReactNode } from 'react';
|
|
|
4
4
|
declare const OrderCard: ({ order, navigate, children }: {
|
|
5
5
|
order: Order;
|
|
6
6
|
navigate: (route: string) => void;
|
|
7
|
-
children
|
|
7
|
+
children: (props: OrderCardProps) => ReactNode;
|
|
8
8
|
}) => React.ReactNode;
|
|
9
9
|
export default OrderCard;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ErrorMessage
|
|
1
|
+
import { ErrorMessage } from '@open-tender/ui';
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
3
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
4
4
|
import { useOrder } from '../hooks';
|
|
5
5
|
import { selectKioskConfig, selectOrder, reorder as reorderPastOrder } from '../slices';
|
|
6
6
|
import { default as ErrorMessageContainer } from './ErrorMessage';
|
|
7
7
|
var OrderCard = function (_a) {
|
|
8
|
-
var order = _a.order, navigate = _a.navigate,
|
|
8
|
+
var order = _a.order, navigate = _a.navigate, children = _a.children;
|
|
9
9
|
var dispatch = useAppDispatch();
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
10
|
+
var _b = useState(null), errMsg = _b[0], setErrMsg = _b[1];
|
|
11
|
+
var _c = useState(false), isReordering = _c[0], setIsReordering = _c[1];
|
|
12
|
+
var _d = useAppSelector(selectKioskConfig), config = _d.orderCard, cardConfig = _d.card;
|
|
13
|
+
var _e = useAppSelector(selectOrder), loading = _e.loading, error = _e.error;
|
|
14
14
|
var isLoading = loading === 'pending';
|
|
15
|
-
var
|
|
15
|
+
var _f = useOrder(order), itemImages = _f.itemImages, itemNames = _f.itemNames, orderNo = _f.orderNo, title = _f.title, subtitle = _f.subtitle;
|
|
16
16
|
var view = function () {
|
|
17
17
|
return;
|
|
18
18
|
};
|
|
@@ -5,6 +5,6 @@ declare const PointsReward: ({ item, callback, children }: {
|
|
|
5
5
|
item: OrderItem;
|
|
6
6
|
callback?: () => void;
|
|
7
7
|
isLast?: boolean;
|
|
8
|
-
children
|
|
8
|
+
children: (props: PointsRewardProps) => ReactNode;
|
|
9
9
|
}) => React.ReactNode;
|
|
10
10
|
export default PointsReward;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __spreadArray } from "tslib";
|
|
2
|
-
import { Quantity
|
|
2
|
+
import { Quantity } from '@open-tender/ui';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
5
5
|
import { useCustomerRewards } from '../hooks';
|
|
@@ -7,14 +7,14 @@ import { selectKioskConfig, selectPosCheckout, setPoints } from '../slices';
|
|
|
7
7
|
import { default as QuantityContainer } from './Quantity';
|
|
8
8
|
var PointsReward = function (_a) {
|
|
9
9
|
var _b;
|
|
10
|
-
var item = _a.item, callback = _a.callback,
|
|
10
|
+
var item = _a.item, callback = _a.callback, children = _a.children;
|
|
11
11
|
var dispatch = useAppDispatch();
|
|
12
|
-
var
|
|
12
|
+
var _c = useAppSelector(selectKioskConfig), config = _c.pointsReward, successMessageConfig = _c.successMessage, cardConfig = _c.card;
|
|
13
13
|
var checkPoints = useAppSelector(selectPosCheckout).points;
|
|
14
|
-
var
|
|
14
|
+
var _d = useCustomerRewards(), points = _d.points, pointsRemaining = _d.pointsRemaining;
|
|
15
15
|
if (!item.points || item.points.index === undefined || !points)
|
|
16
16
|
return null;
|
|
17
|
-
var
|
|
17
|
+
var _e = item.points, index = _e.index, per = _e.per;
|
|
18
18
|
// const appliedIndices = checkPoints.map(i => i.index)
|
|
19
19
|
// const isApplied = appliedIndices.includes(index)
|
|
20
20
|
var itemPointsApplied = ((_b = checkPoints.find(function (i) { return i.index === index; })) === null || _b === void 0 ? void 0 : _b.points) || 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PointsRewardsProps } from '@open-tender/ui';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
declare const PointsRewards: ({ children }: {
|
|
4
|
-
children
|
|
4
|
+
children: (props: PointsRewardsProps) => ReactNode;
|
|
5
5
|
}) => React.ReactNode;
|
|
6
6
|
export default PointsRewards;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { PointsReward
|
|
1
|
+
import { PointsReward } from '@open-tender/ui';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useAppSelector } from '../app/hooks';
|
|
4
4
|
import { useCustomerRewards } from '../hooks';
|
|
5
5
|
import { selectKioskConfig } from '../slices';
|
|
6
6
|
import { default as PointsRewardContainer } from './PointsReward';
|
|
7
7
|
var PointsRewards = function (_a) {
|
|
8
|
-
var
|
|
8
|
+
var children = _a.children;
|
|
9
9
|
var config = useAppSelector(selectKioskConfig).pointsRewards;
|
|
10
|
-
var
|
|
10
|
+
var _b = useCustomerRewards(), items = _b.items, points = _b.points, pointsApplied = _b.pointsApplied, pointsRemaining = _b.pointsRemaining;
|
|
11
11
|
var renderPointReward = function (item) { return (React.createElement(PointsRewardContainer, { item: item, children: PointsReward })); };
|
|
12
12
|
return children({
|
|
13
13
|
config: config,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|