@open-tender/store 1.1.242 → 1.1.245

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.
@@ -1,6 +1,6 @@
1
1
  import { ModalContentProps, Styles } from '@open-tender/ui';
2
2
  import { ReactNode } from 'react';
3
- declare const ModalContent: ({ title, subtitle, content, submit, submitText, cancel, cancelText, style, children }: {
3
+ declare const ModalContent: ({ title, subtitle, content, submit, submitText, cancel, cancelText, style, error, children }: {
4
4
  title?: string;
5
5
  subtitle?: string | null;
6
6
  content: ReactNode;
@@ -9,6 +9,7 @@ declare const ModalContent: ({ title, subtitle, content, submit, submitText, can
9
9
  cancel?: () => void;
10
10
  cancelText?: string;
11
11
  style?: Styles;
12
+ error?: string;
12
13
  children: (props: ModalContentProps) => ReactNode;
13
14
  }) => ReactNode;
14
15
  export default ModalContent;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var hooks_1 = require("../app/hooks");
4
4
  var slices_1 = require("../slices");
5
5
  var ModalContent = function (_a) {
6
- 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
+ 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, error = _a.error, children = _a.children;
7
7
  var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).modalContent;
8
8
  if (!config)
9
9
  return null;
@@ -16,7 +16,8 @@ var ModalContent = function (_a) {
16
16
  submitText: submitText,
17
17
  cancel: cancel,
18
18
  cancelText: cancelText,
19
- style: style
19
+ style: style,
20
+ error: error
20
21
  });
21
22
  };
22
23
  exports.default = ModalContent;
@@ -4,7 +4,7 @@ var react_1 = require("react");
4
4
  var hooks_1 = require("../app/hooks");
5
5
  var slices_1 = require("../slices");
6
6
  var TagsButton = function (_a) {
7
- var _b, _c;
7
+ var _b, _c, _d;
8
8
  var children = _a.children;
9
9
  var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).tagsButton;
10
10
  var isTagsModalShown = (0, hooks_1.useAppSelector)(slices_1.selectShowTagsModal);
@@ -18,9 +18,9 @@ var TagsButton = function (_a) {
18
18
  return children({
19
19
  config: config,
20
20
  handlers: handlers,
21
- isSelected: selectedTags.length > 0 || slices_1.selectSelectedAllergens.length > 0,
22
- selectedTags: (_b = selectedTags.length) !== null && _b !== void 0 ? _b : 0,
23
- selectedAllergens: (_c = selectedAllergens === null || selectedAllergens === void 0 ? void 0 : selectedAllergens.length) !== null && _c !== void 0 ? _c : 0
21
+ isSelected: selectedTags.length > 0 || ((_b = selectedAllergens === null || selectedAllergens === void 0 ? void 0 : selectedAllergens.length) !== null && _b !== void 0 ? _b : 0) > 0,
22
+ selectedTags: (_c = selectedTags.length) !== null && _c !== void 0 ? _c : 0,
23
+ selectedAllergens: (_d = selectedAllergens === null || selectedAllergens === void 0 ? void 0 : selectedAllergens.length) !== null && _d !== void 0 ? _d : 0
24
24
  });
25
25
  };
26
26
  exports.default = TagsButton;
@@ -1,6 +1,6 @@
1
1
  import { ModalContentProps, Styles } from '@open-tender/ui';
2
2
  import { ReactNode } from 'react';
3
- declare const ModalContent: ({ title, subtitle, content, submit, submitText, cancel, cancelText, style, children }: {
3
+ declare const ModalContent: ({ title, subtitle, content, submit, submitText, cancel, cancelText, style, error, children }: {
4
4
  title?: string;
5
5
  subtitle?: string | null;
6
6
  content: ReactNode;
@@ -9,6 +9,7 @@ declare const ModalContent: ({ title, subtitle, content, submit, submitText, can
9
9
  cancel?: () => void;
10
10
  cancelText?: string;
11
11
  style?: Styles;
12
+ error?: string;
12
13
  children: (props: ModalContentProps) => ReactNode;
13
14
  }) => ReactNode;
14
15
  export default ModalContent;
@@ -1,7 +1,7 @@
1
1
  import { useAppSelector } from '../app/hooks';
2
2
  import { selectKioskConfig } from '../slices';
3
3
  var ModalContent = function (_a) {
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;
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, error = _a.error, children = _a.children;
5
5
  var config = useAppSelector(selectKioskConfig).modalContent;
6
6
  if (!config)
7
7
  return null;
@@ -14,7 +14,8 @@ var ModalContent = function (_a) {
14
14
  submitText: submitText,
15
15
  cancel: cancel,
16
16
  cancelText: cancelText,
17
- style: style
17
+ style: style,
18
+ error: error
18
19
  });
19
20
  };
20
21
  export default ModalContent;
@@ -2,7 +2,7 @@ import { useCallback } from 'react';
2
2
  import { useAppDispatch, useAppSelector } from '../app/hooks';
3
3
  import { selectKioskConfig, selectSelectedAllergens, selectSelectedTags, selectShowTagsModal, toggleTagsModal } from '../slices';
4
4
  var TagsButton = function (_a) {
5
- var _b, _c;
5
+ var _b, _c, _d;
6
6
  var children = _a.children;
7
7
  var config = useAppSelector(selectKioskConfig).tagsButton;
8
8
  var isTagsModalShown = useAppSelector(selectShowTagsModal);
@@ -16,9 +16,9 @@ var TagsButton = function (_a) {
16
16
  return children({
17
17
  config: config,
18
18
  handlers: handlers,
19
- isSelected: selectedTags.length > 0 || selectSelectedAllergens.length > 0,
20
- selectedTags: (_b = selectedTags.length) !== null && _b !== void 0 ? _b : 0,
21
- selectedAllergens: (_c = selectedAllergens === null || selectedAllergens === void 0 ? void 0 : selectedAllergens.length) !== null && _c !== void 0 ? _c : 0
19
+ isSelected: selectedTags.length > 0 || ((_b = selectedAllergens === null || selectedAllergens === void 0 ? void 0 : selectedAllergens.length) !== null && _b !== void 0 ? _b : 0) > 0,
20
+ selectedTags: (_c = selectedTags.length) !== null && _c !== void 0 ? _c : 0,
21
+ selectedAllergens: (_d = selectedAllergens === null || selectedAllergens === void 0 ? void 0 : selectedAllergens.length) !== null && _d !== void 0 ? _d : 0
22
22
  });
23
23
  };
24
24
  export default TagsButton;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "1.1.242",
3
+ "version": "1.1.245",
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",
@@ -62,8 +62,8 @@
62
62
  "peerDependencies": {
63
63
  "@emotion/react": "^11.11.1",
64
64
  "@open-tender/types": "^0.4.98",
65
- "@open-tender/ui": "^0.4.33",
66
- "@open-tender/utils": "^0.4.71",
65
+ "@open-tender/ui": "^0.4.34",
66
+ "@open-tender/utils": "^0.4.72",
67
67
  "@reduxjs/toolkit": "^2.0.1",
68
68
  "date-fns": "2.30.0",
69
69
  "date-fns-tz": "^2.0.0",