@open-tender/store 1.1.263 → 1.1.265

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,9 +1,10 @@
1
1
  import { ScreenConfig } from '@open-tender/ui';
2
2
  import { ReactNode } from 'react';
3
- declare const DisabledModal: ({ children }: {
3
+ declare const DisabledModal: ({ children, message }: {
4
4
  children: ({ config, disableText }: {
5
5
  config: ScreenConfig;
6
6
  disableText?: string;
7
7
  }) => ReactNode;
8
+ message?: string;
8
9
  }) => ReactNode;
9
10
  export default DisabledModal;
@@ -3,9 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var hooks_1 = require("../app/hooks");
4
4
  var slices_1 = require("../slices");
5
5
  var DisabledModal = function (_a) {
6
- var children = _a.children;
6
+ var _b;
7
+ var children = _a.children, message = _a.message;
7
8
  var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).disabled;
8
9
  var disable_kiosk_message = (0, hooks_1.useAppSelector)(slices_1.selectStoreSettings).disable_kiosk_message;
9
- return children({ config: config, disableText: disable_kiosk_message !== null && disable_kiosk_message !== void 0 ? disable_kiosk_message : undefined });
10
+ return children({
11
+ config: config,
12
+ disableText: (_b = message !== null && message !== void 0 ? message : disable_kiosk_message) !== null && _b !== void 0 ? _b : undefined
13
+ });
10
14
  };
11
15
  exports.default = DisabledModal;
@@ -4,10 +4,17 @@ var hooks_1 = require("../app/hooks");
4
4
  var slices_1 = require("../slices");
5
5
  var Ingredients = function (_a) {
6
6
  var title = _a.title, subtitle = _a.subtitle, ingredients = _a.ingredients, close = _a.close, children = _a.children;
7
- var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).ingredients;
7
+ var _b = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), config = _b.ingredients, modalContentConfig = _b.modalContent;
8
8
  var handlers = { close: close };
9
9
  if (!config)
10
10
  return null;
11
- return children({ config: config, handlers: handlers, title: title, subtitle: subtitle, ingredients: ingredients });
11
+ return children({
12
+ config: config,
13
+ modalContentConfig: modalContentConfig,
14
+ handlers: handlers,
15
+ title: title,
16
+ subtitle: subtitle,
17
+ ingredients: ingredients
18
+ });
12
19
  };
13
20
  exports.default = Ingredients;
@@ -1,9 +1,10 @@
1
1
  import { ScreenConfig } from '@open-tender/ui';
2
2
  import { ReactNode } from 'react';
3
- declare const DisabledModal: ({ children }: {
3
+ declare const DisabledModal: ({ children, message }: {
4
4
  children: ({ config, disableText }: {
5
5
  config: ScreenConfig;
6
6
  disableText?: string;
7
7
  }) => ReactNode;
8
+ message?: string;
8
9
  }) => ReactNode;
9
10
  export default DisabledModal;
@@ -1,9 +1,13 @@
1
1
  import { useAppSelector } from '../app/hooks';
2
2
  import { selectKioskConfig, selectStoreSettings } from '../slices';
3
3
  var DisabledModal = function (_a) {
4
- var children = _a.children;
4
+ var _b;
5
+ var children = _a.children, message = _a.message;
5
6
  var config = useAppSelector(selectKioskConfig).disabled;
6
7
  var disable_kiosk_message = useAppSelector(selectStoreSettings).disable_kiosk_message;
7
- return children({ config: config, disableText: disable_kiosk_message !== null && disable_kiosk_message !== void 0 ? disable_kiosk_message : undefined });
8
+ return children({
9
+ config: config,
10
+ disableText: (_b = message !== null && message !== void 0 ? message : disable_kiosk_message) !== null && _b !== void 0 ? _b : undefined
11
+ });
8
12
  };
9
13
  export default DisabledModal;
@@ -2,10 +2,17 @@ import { useAppSelector } from '../app/hooks';
2
2
  import { selectKioskConfig } from '../slices';
3
3
  var Ingredients = function (_a) {
4
4
  var title = _a.title, subtitle = _a.subtitle, ingredients = _a.ingredients, close = _a.close, children = _a.children;
5
- var config = useAppSelector(selectKioskConfig).ingredients;
5
+ var _b = useAppSelector(selectKioskConfig), config = _b.ingredients, modalContentConfig = _b.modalContent;
6
6
  var handlers = { close: close };
7
7
  if (!config)
8
8
  return null;
9
- return children({ config: config, handlers: handlers, title: title, subtitle: subtitle, ingredients: ingredients });
9
+ return children({
10
+ config: config,
11
+ modalContentConfig: modalContentConfig,
12
+ handlers: handlers,
13
+ title: title,
14
+ subtitle: subtitle,
15
+ ingredients: ingredients
16
+ });
10
17
  };
11
18
  export default Ingredients;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "1.1.263",
3
+ "version": "1.1.265",
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",
@@ -61,9 +61,9 @@
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@emotion/react": "^11.11.1",
64
- "@open-tender/types": "^0.4.127",
65
- "@open-tender/ui": "^0.4.44",
66
- "@open-tender/utils": "^0.4.90",
64
+ "@open-tender/types": "^0.4.132",
65
+ "@open-tender/ui": "^0.4.45",
66
+ "@open-tender/utils": "^0.5.1",
67
67
  "@reduxjs/toolkit": "^2.0.1",
68
68
  "date-fns": "2.30.0",
69
69
  "date-fns-tz": "^2.0.0",