@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.
Files changed (141) hide show
  1. package/dist/cjs/components/Allergen.d.ts +1 -1
  2. package/dist/cjs/components/Allergen.js +1 -2
  3. package/dist/cjs/components/Applied.d.ts +1 -1
  4. package/dist/cjs/components/Applied.js +1 -2
  5. package/dist/cjs/components/ButtonLink.d.ts +1 -1
  6. package/dist/cjs/components/ButtonLink.js +1 -2
  7. package/dist/cjs/components/Card.d.ts +1 -1
  8. package/dist/cjs/components/Card.js +1 -2
  9. package/dist/cjs/components/Cart.d.ts +1 -1
  10. package/dist/cjs/components/Cart.js +2 -2
  11. package/dist/cjs/components/CartItem.d.ts +1 -1
  12. package/dist/cjs/components/CartItem.js +1 -1
  13. package/dist/cjs/components/CartUpsellItem.d.ts +1 -1
  14. package/dist/cjs/components/CartUpsellItem.js +2 -3
  15. package/dist/cjs/components/CartUpsells.d.ts +1 -1
  16. package/dist/cjs/components/CartUpsells.js +2 -2
  17. package/dist/cjs/components/CategoryItem.d.ts +1 -1
  18. package/dist/cjs/components/CategoryItem.js +2 -3
  19. package/dist/cjs/components/CategoryNav.d.ts +1 -1
  20. package/dist/cjs/components/CategoryNav.js +2 -2
  21. package/dist/cjs/components/CategoryNavItem.d.ts +1 -1
  22. package/dist/cjs/components/CategoryNavItem.js +2 -2
  23. package/dist/cjs/components/CategoryNavOther.d.ts +1 -1
  24. package/dist/cjs/components/CategoryNavOther.js +2 -3
  25. package/dist/cjs/components/CheckTotals.d.ts +1 -1
  26. package/dist/cjs/components/CheckTotals.js +1 -2
  27. package/dist/cjs/components/Discount.d.ts +1 -1
  28. package/dist/cjs/components/Discount.js +2 -3
  29. package/dist/cjs/components/ErrorMessage.d.ts +1 -1
  30. package/dist/cjs/components/ErrorMessage.js +1 -2
  31. package/dist/cjs/components/Header.d.ts +1 -1
  32. package/dist/cjs/components/Header.js +1 -1
  33. package/dist/cjs/components/Ingredients.d.ts +1 -1
  34. package/dist/cjs/components/Ingredients.js +1 -2
  35. package/dist/cjs/components/Input.d.ts +1 -1
  36. package/dist/cjs/components/Input.js +2 -3
  37. package/dist/cjs/components/ItemGroup.d.ts +1 -1
  38. package/dist/cjs/components/ItemGroup.js +2 -3
  39. package/dist/cjs/components/ItemGroups.d.ts +1 -1
  40. package/dist/cjs/components/ItemGroups.js +1 -1
  41. package/dist/cjs/components/ItemOption.d.ts +1 -1
  42. package/dist/cjs/components/ItemOption.js +2 -3
  43. package/dist/cjs/components/ItemSelections.d.ts +1 -1
  44. package/dist/cjs/components/ItemSelections.js +1 -1
  45. package/dist/cjs/components/Label.d.ts +1 -1
  46. package/dist/cjs/components/Label.js +1 -2
  47. package/dist/cjs/components/Loader.d.ts +1 -1
  48. package/dist/cjs/components/Loader.js +1 -2
  49. package/dist/cjs/components/MadeForNotes.d.ts +1 -1
  50. package/dist/cjs/components/MadeForNotes.js +2 -2
  51. package/dist/cjs/components/MenuCategory.d.ts +1 -1
  52. package/dist/cjs/components/MenuCategory.js +1 -2
  53. package/dist/cjs/components/MenuOther.d.ts +1 -1
  54. package/dist/cjs/components/MenuOther.js +1 -2
  55. package/dist/cjs/components/Modal.d.ts +1 -1
  56. package/dist/cjs/components/Modal.js +1 -2
  57. package/dist/cjs/components/ModalContent.d.ts +1 -1
  58. package/dist/cjs/components/ModalContent.js +1 -2
  59. package/dist/cjs/components/ModalHeader.d.ts +1 -1
  60. package/dist/cjs/components/ModalHeader.js +1 -2
  61. package/dist/cjs/components/NutritionalInfo.d.ts +1 -1
  62. package/dist/cjs/components/NutritionalInfo.js +2 -3
  63. package/dist/cjs/components/Option.d.ts +1 -1
  64. package/dist/cjs/components/Option.js +2 -2
  65. package/dist/cjs/components/OrderCard.d.ts +1 -1
  66. package/dist/cjs/components/OrderCard.js +6 -6
  67. package/dist/cjs/components/PointsReward.d.ts +1 -1
  68. package/dist/cjs/components/PointsReward.js +4 -4
  69. package/dist/cjs/components/PointsRewards.d.ts +1 -1
  70. package/dist/cjs/components/PointsRewards.js +2 -2
  71. package/dist/esm/components/Allergen.d.ts +1 -1
  72. package/dist/esm/components/Allergen.js +1 -2
  73. package/dist/esm/components/Applied.d.ts +1 -1
  74. package/dist/esm/components/Applied.js +1 -2
  75. package/dist/esm/components/ButtonLink.d.ts +1 -1
  76. package/dist/esm/components/ButtonLink.js +1 -2
  77. package/dist/esm/components/Card.d.ts +1 -1
  78. package/dist/esm/components/Card.js +1 -2
  79. package/dist/esm/components/Cart.d.ts +1 -1
  80. package/dist/esm/components/Cart.js +3 -3
  81. package/dist/esm/components/CartItem.d.ts +1 -1
  82. package/dist/esm/components/CartItem.js +2 -2
  83. package/dist/esm/components/CartUpsellItem.d.ts +1 -1
  84. package/dist/esm/components/CartUpsellItem.js +2 -3
  85. package/dist/esm/components/CartUpsells.d.ts +1 -1
  86. package/dist/esm/components/CartUpsells.js +3 -3
  87. package/dist/esm/components/CategoryItem.d.ts +1 -1
  88. package/dist/esm/components/CategoryItem.js +2 -3
  89. package/dist/esm/components/CategoryNav.d.ts +1 -1
  90. package/dist/esm/components/CategoryNav.js +3 -3
  91. package/dist/esm/components/CategoryNavItem.d.ts +1 -1
  92. package/dist/esm/components/CategoryNavItem.js +3 -3
  93. package/dist/esm/components/CategoryNavOther.d.ts +1 -1
  94. package/dist/esm/components/CategoryNavOther.js +2 -3
  95. package/dist/esm/components/CheckTotals.d.ts +1 -1
  96. package/dist/esm/components/CheckTotals.js +1 -2
  97. package/dist/esm/components/Discount.d.ts +1 -1
  98. package/dist/esm/components/Discount.js +2 -3
  99. package/dist/esm/components/ErrorMessage.d.ts +1 -1
  100. package/dist/esm/components/ErrorMessage.js +1 -2
  101. package/dist/esm/components/Header.d.ts +1 -1
  102. package/dist/esm/components/Header.js +2 -2
  103. package/dist/esm/components/Ingredients.d.ts +1 -1
  104. package/dist/esm/components/Ingredients.js +1 -2
  105. package/dist/esm/components/Input.d.ts +1 -1
  106. package/dist/esm/components/Input.js +2 -3
  107. package/dist/esm/components/ItemGroup.d.ts +1 -1
  108. package/dist/esm/components/ItemGroup.js +2 -3
  109. package/dist/esm/components/ItemGroups.d.ts +1 -1
  110. package/dist/esm/components/ItemGroups.js +2 -2
  111. package/dist/esm/components/ItemOption.d.ts +1 -1
  112. package/dist/esm/components/ItemOption.js +2 -3
  113. package/dist/esm/components/ItemSelections.d.ts +1 -1
  114. package/dist/esm/components/ItemSelections.js +2 -2
  115. package/dist/esm/components/Label.d.ts +1 -1
  116. package/dist/esm/components/Label.js +1 -2
  117. package/dist/esm/components/Loader.d.ts +1 -1
  118. package/dist/esm/components/Loader.js +1 -2
  119. package/dist/esm/components/MadeForNotes.d.ts +1 -1
  120. package/dist/esm/components/MadeForNotes.js +3 -3
  121. package/dist/esm/components/MenuCategory.d.ts +1 -1
  122. package/dist/esm/components/MenuCategory.js +1 -2
  123. package/dist/esm/components/MenuOther.d.ts +1 -1
  124. package/dist/esm/components/MenuOther.js +1 -2
  125. package/dist/esm/components/Modal.d.ts +1 -1
  126. package/dist/esm/components/Modal.js +1 -2
  127. package/dist/esm/components/ModalContent.d.ts +1 -1
  128. package/dist/esm/components/ModalContent.js +1 -2
  129. package/dist/esm/components/ModalHeader.d.ts +1 -1
  130. package/dist/esm/components/ModalHeader.js +1 -2
  131. package/dist/esm/components/NutritionalInfo.d.ts +1 -1
  132. package/dist/esm/components/NutritionalInfo.js +2 -3
  133. package/dist/esm/components/Option.d.ts +1 -1
  134. package/dist/esm/components/Option.js +3 -3
  135. package/dist/esm/components/OrderCard.d.ts +1 -1
  136. package/dist/esm/components/OrderCard.js +7 -7
  137. package/dist/esm/components/PointsReward.d.ts +1 -1
  138. package/dist/esm/components/PointsReward.js +5 -5
  139. package/dist/esm/components/PointsRewards.d.ts +1 -1
  140. package/dist/esm/components/PointsRewards.js +3 -3
  141. 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?: (props: IngredientsProps) => ReactNode;
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, _b = _a.children, children = _b === void 0 ? IngredientsView : _b;
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?: (props: InputProps) => ReactNode;
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, _b = _a.children, children = _b === void 0 ? InputView : _b;
6
- var _c = useAppSelector(selectKioskConfig), config = _c.input, labelConfig = _c.label;
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?: (props: ItemGroupProps) => ReactNode;
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, _b = _a.children, children = _b === void 0 ? ItemGroupView : _b;
7
- var _c = useAppSelector(selectKioskConfig), config = _c.itemGroup, errorMessageConfig = _c.errorMessage, successMessageConfig = _c.successMessage;
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?: (props: ItemGroupsProps) => ReactNode;
9
+ children: (props: ItemGroupsProps) => ReactNode;
10
10
  }) => React.ReactNode;
11
11
  export default ItemGroups;
@@ -1,11 +1,11 @@
1
- import { ItemOption, ItemGroup, ItemGroups as ItemGroupsView } from '@open-tender/ui';
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, _c = _a.children, children = _c === void 0 ? ItemGroupsView : _c;
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?: (props: ItemOptionProps) => ReactNode;
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, _b = _a.children, children = _b === void 0 ? ItemOptionView : _b;
5
+ var handlers = _a.handlers, group = _a.group, option = _a.option, levels = _a.levels, children = _a.children;
7
6
  var dispatch = useAppDispatch();
8
- var _c = useAppSelector(selectKioskConfig), config = _c.itemOption, cardConfig = _c.card;
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?: (props: ItemSelectionsProps) => ReactNode;
9
+ children: (props: ItemSelectionsProps) => ReactNode;
10
10
  }) => React.ReactNode;
11
11
  export default ItemSelections;
@@ -1,11 +1,11 @@
1
- import { ErrorMessage, ItemOption, ItemSelections as ItemSelectionsView } from '@open-tender/ui';
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, _b = _a.children, children = _b === void 0 ? ItemSelectionsView : _b;
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?: (props: LabelProps) => ReactNode;
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, _b = _a.children, children = _b === void 0 ? LabelView : _b;
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
  };
@@ -3,6 +3,6 @@ import { ReactNode } from 'react';
3
3
  declare const Loader: ({ text, style, children }: {
4
4
  text?: string;
5
5
  style?: Styles;
6
- children?: (props: LoaderProps) => ReactNode;
6
+ children: (props: LoaderProps) => ReactNode;
7
7
  }) => ReactNode;
8
8
  export default Loader;
@@ -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, _b = _a.children, children = _b === void 0 ? LoaderView : _b;
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?: (props: MadeForNotesProps) => ReactNode;
12
+ children: (props: MadeForNotesProps) => ReactNode;
13
13
  }) => React.ReactNode;
14
14
  export default MadeForNotes;
@@ -1,12 +1,12 @@
1
- import { Input, MadeForNotes as MadeForNotesView } from '@open-tender/ui';
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, _b = _a.children, children = _b === void 0 ? MadeForNotesView : _b;
9
- var _c = useAppSelector(selectKioskConfig), config = _c.madeForNotes, modalContentConfig = _c.modalContent;
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?: (props: MenuCategoryProps) => ReactNode;
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, _b = _a.children, children = _b === void 0 ? MenuCategoryView : _b;
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?: (props: MenuOtherProps) => ReactNode;
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, _b = _a.children, children = _b === void 0 ? MenuOtherView : _b, navigate = _a.navigate;
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?: (props: ModalProps) => ReactNode;
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, _b = _a.children, children = _b === void 0 ? ModalView : _b;
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?: (props: ModalContentProps) => ReactNode;
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, _b = _a.children, children = _b === void 0 ? ModalContentView : _b;
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?: (props: ModalHeaderProps) => ReactNode;
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, _b = _a.children, children = _b === void 0 ? ModalHeaderView : _b;
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?: (props: NutritionalInfoProps) => ReactNode;
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, _b = _a.children, children = _b === void 0 ? NutritionalInfoView : _b;
6
- var _c = useAppSelector(selectKioskConfig), config = _c.nutritionalInfo, modalContentConfig = _c.modalContent;
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?: (props: OptionProps) => ReactNode;
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, Option as OptionView } from '@open-tender/ui';
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, _b = _a.children, children = _b === void 0 ? OptionView : _b;
9
- var _c = useAppSelector(selectKioskConfig), config = _c.option, modalContentConfig = _c.modalContent;
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?: (props: OrderCardProps) => ReactNode;
7
+ children: (props: OrderCardProps) => ReactNode;
8
8
  }) => React.ReactNode;
9
9
  export default OrderCard;
@@ -1,18 +1,18 @@
1
- import { ErrorMessage, OrderCard as OrderCardView } from '@open-tender/ui';
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, _b = _a.children, children = _b === void 0 ? OrderCardView : _b;
8
+ var order = _a.order, navigate = _a.navigate, children = _a.children;
9
9
  var dispatch = useAppDispatch();
10
- var _c = useState(null), errMsg = _c[0], setErrMsg = _c[1];
11
- var _d = useState(false), isReordering = _d[0], setIsReordering = _d[1];
12
- var _e = useAppSelector(selectKioskConfig), config = _e.orderCard, cardConfig = _e.card;
13
- var _f = useAppSelector(selectOrder), loading = _f.loading, error = _f.error;
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 _g = useOrder(order), itemImages = _g.itemImages, itemNames = _g.itemNames, orderNo = _g.orderNo, title = _g.title, subtitle = _g.subtitle;
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?: (props: PointsRewardProps) => ReactNode;
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, PointsReward as PointsRewardView } from '@open-tender/ui';
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, _c = _a.children, children = _c === void 0 ? PointsRewardView : _c;
10
+ var item = _a.item, callback = _a.callback, children = _a.children;
11
11
  var dispatch = useAppDispatch();
12
- var _d = useAppSelector(selectKioskConfig), config = _d.pointsReward, successMessageConfig = _d.successMessage, cardConfig = _d.card;
12
+ var _c = useAppSelector(selectKioskConfig), config = _c.pointsReward, successMessageConfig = _c.successMessage, cardConfig = _c.card;
13
13
  var checkPoints = useAppSelector(selectPosCheckout).points;
14
- var _e = useCustomerRewards(), points = _e.points, pointsRemaining = _e.pointsRemaining;
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 _f = item.points, index = _f.index, per = _f.per;
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?: (props: PointsRewardsProps) => ReactNode;
4
+ children: (props: PointsRewardsProps) => ReactNode;
5
5
  }) => React.ReactNode;
6
6
  export default PointsRewards;
@@ -1,13 +1,13 @@
1
- import { PointsReward, PointsRewards as PointsRewardsView } from '@open-tender/ui';
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 _b = _a.children, children = _b === void 0 ? PointsRewardsView : _b;
8
+ var children = _a.children;
9
9
  var config = useAppSelector(selectKioskConfig).pointsRewards;
10
- var _c = useCustomerRewards(), items = _c.items, points = _c.points, pointsApplied = _c.pointsApplied, pointsRemaining = _c.pointsRemaining;
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.6",
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",