@open-tender/store 1.1.254 → 1.1.256

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
  /// <reference types="react" />
2
2
  import { AccountSectionProps } from '@open-tender/ui';
3
- declare const AccountSection: ({ title, subtitle, path, hasMore, navigate, content, children }: {
3
+ declare const AccountSection: ({ title, subtitle, path, hasMore, navigate, content, children, type }: {
4
4
  title: string;
5
5
  subtitle?: string;
6
6
  path: string;
@@ -8,5 +8,6 @@ declare const AccountSection: ({ title, subtitle, path, hasMore, navigate, conte
8
8
  navigate: (route: string) => void;
9
9
  content: React.ReactNode;
10
10
  children: (props: AccountSectionProps) => React.ReactNode;
11
+ type: 'rewards' | 'orders';
11
12
  }) => import("react").ReactNode;
12
13
  export default AccountSection;
@@ -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 AccountSection = function (_a) {
6
- var title = _a.title, subtitle = _a.subtitle, path = _a.path, hasMore = _a.hasMore, navigate = _a.navigate, content = _a.content, children = _a.children;
6
+ var title = _a.title, subtitle = _a.subtitle, path = _a.path, hasMore = _a.hasMore, navigate = _a.navigate, content = _a.content, children = _a.children, type = _a.type;
7
7
  var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).accountSection;
8
8
  var view = function () { return navigate(path); };
9
9
  var handlers = { view: view };
@@ -15,7 +15,8 @@ var AccountSection = function (_a) {
15
15
  hasMore: hasMore,
16
16
  title: title,
17
17
  subtitle: subtitle,
18
- children: content
18
+ children: content,
19
+ type: type
19
20
  });
20
21
  };
21
22
  exports.default = AccountSection;
@@ -11,7 +11,7 @@ var Header = function (_a) {
11
11
  var dispatch = (0, hooks_1.useAppDispatch)();
12
12
  var config = ((0, hooks_1.useAppSelector)(slices_1.selectKioskConfig) || {}).header;
13
13
  var showButtons = !!(backAction || to);
14
- var display_sign_in = (0, hooks_1.useAppSelector)(slices_1.selectStoreSettings).display_sign_in;
14
+ var _c = (0, hooks_1.useAppSelector)(slices_1.selectStoreSettings), display_sign_in = _c.display_sign_in, display_allergens = _c.display_allergens, display_tags = _c.display_tags;
15
15
  var back = function () {
16
16
  if (backAction) {
17
17
  backAction();
@@ -40,7 +40,9 @@ var Header = function (_a) {
40
40
  showButtons: showButtons,
41
41
  backText: backText,
42
42
  renderSignInButton: display_sign_in ? renderSignInButton : undefined,
43
- renderTagsButton: TagsButtonView ? renderTagsButton : undefined
43
+ renderTagsButton: TagsButtonView && (display_allergens || display_tags)
44
+ ? renderTagsButton
45
+ : undefined
44
46
  });
45
47
  };
46
48
  exports.default = Header;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { AccountSectionProps } from '@open-tender/ui';
3
- declare const AccountSection: ({ title, subtitle, path, hasMore, navigate, content, children }: {
3
+ declare const AccountSection: ({ title, subtitle, path, hasMore, navigate, content, children, type }: {
4
4
  title: string;
5
5
  subtitle?: string;
6
6
  path: string;
@@ -8,5 +8,6 @@ declare const AccountSection: ({ title, subtitle, path, hasMore, navigate, conte
8
8
  navigate: (route: string) => void;
9
9
  content: React.ReactNode;
10
10
  children: (props: AccountSectionProps) => React.ReactNode;
11
+ type: 'rewards' | 'orders';
11
12
  }) => import("react").ReactNode;
12
13
  export default AccountSection;
@@ -1,7 +1,7 @@
1
1
  import { useAppSelector } from '../app/hooks';
2
2
  import { selectKioskConfig } from '../slices';
3
3
  var AccountSection = function (_a) {
4
- var title = _a.title, subtitle = _a.subtitle, path = _a.path, hasMore = _a.hasMore, navigate = _a.navigate, content = _a.content, children = _a.children;
4
+ var title = _a.title, subtitle = _a.subtitle, path = _a.path, hasMore = _a.hasMore, navigate = _a.navigate, content = _a.content, children = _a.children, type = _a.type;
5
5
  var config = useAppSelector(selectKioskConfig).accountSection;
6
6
  var view = function () { return navigate(path); };
7
7
  var handlers = { view: view };
@@ -13,7 +13,8 @@ var AccountSection = function (_a) {
13
13
  hasMore: hasMore,
14
14
  title: title,
15
15
  subtitle: subtitle,
16
- children: content
16
+ children: content,
17
+ type: type
17
18
  });
18
19
  };
19
20
  export default AccountSection;
@@ -8,7 +8,7 @@ var Header = function (_a) {
8
8
  var dispatch = useAppDispatch();
9
9
  var config = (useAppSelector(selectKioskConfig) || {}).header;
10
10
  var showButtons = !!(backAction || to);
11
- var display_sign_in = useAppSelector(selectStoreSettings).display_sign_in;
11
+ var _c = useAppSelector(selectStoreSettings), display_sign_in = _c.display_sign_in, display_allergens = _c.display_allergens, display_tags = _c.display_tags;
12
12
  var back = function () {
13
13
  if (backAction) {
14
14
  backAction();
@@ -37,7 +37,9 @@ var Header = function (_a) {
37
37
  showButtons: showButtons,
38
38
  backText: backText,
39
39
  renderSignInButton: display_sign_in ? renderSignInButton : undefined,
40
- renderTagsButton: TagsButtonView ? renderTagsButton : undefined
40
+ renderTagsButton: TagsButtonView && (display_allergens || display_tags)
41
+ ? renderTagsButton
42
+ : undefined
41
43
  });
42
44
  };
43
45
  export default Header;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "1.1.254",
3
+ "version": "1.1.256",
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.101",
65
- "@open-tender/ui": "^0.4.37",
66
- "@open-tender/utils": "^0.4.73",
64
+ "@open-tender/types": "^0.4.105",
65
+ "@open-tender/ui": "^0.4.40",
66
+ "@open-tender/utils": "^0.4.77",
67
67
  "@reduxjs/toolkit": "^2.0.1",
68
68
  "date-fns": "2.30.0",
69
69
  "date-fns-tz": "^2.0.0",