@open-tender/store 1.1.255 → 1.1.257

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;
@@ -52,7 +52,7 @@ var SignInPhone = function (_a) {
52
52
  }); }, []);
53
53
  var renderKeypad = (0, react_1.useCallback)(function () { return (react_1.default.createElement(Keypad_1.default, { type: "numeric", handlers: keypadHandlers, value: phone, children: KeypadView })); }, [KeypadView, phone, keypadHandlers]);
54
54
  var renderErrorMessage = (0, react_1.useCallback)(function (errMsg) { return (react_1.default.createElement(ErrorMessage_1.default, { content: errMsg, children: ErrorMessageView })); }, [ErrorMessageView]);
55
- var renderSignUp = (0, react_1.useCallback)(function () { return react_1.default.createElement(SignUp_1.default, { children: SignUpView }); }, [SignUpView]);
55
+ var renderSignUp = (0, react_1.useCallback)(function () { return react_1.default.createElement(SignUp_1.default, { handlers: handlers, children: SignUpView }); }, [SignUpView, handlers]);
56
56
  (0, react_1.useEffect)(function () {
57
57
  if (errMsg) {
58
58
  setShowSignUp(true);
@@ -1,6 +1,7 @@
1
- import { SignUpProps } from '@open-tender/ui';
1
+ import { SignUpProps, Handlers } from '@open-tender/ui';
2
2
  import { ReactNode } from 'react';
3
- declare const SignUp: ({ children }: {
3
+ declare const SignUp: ({ handlers, children }: {
4
+ handlers: Handlers;
4
5
  children: (props: SignUpProps) => ReactNode;
5
6
  }) => ReactNode;
6
7
  export default SignUp;
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var hooks_1 = require("../app/hooks");
4
4
  var slices_1 = require("../slices");
5
5
  var SignUp = function (_a) {
6
- var children = _a.children;
7
- var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).signUp;
6
+ var handlers = _a.handlers, children = _a.children;
7
+ var _b = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), config = _b.signUp, modalContentConfig = _b.modalContent;
8
8
  var web_app_url = ((0, hooks_1.useAppSelector)(slices_1.selectKioskBrand) || {}).webAppUrl;
9
9
  var webAppUrl = web_app_url ? "".concat(web_app_url, "/signup") : null;
10
10
  if (!config)
11
11
  return null;
12
- return children({ config: config, webAppUrl: webAppUrl });
12
+ return children({ config: config, modalContentConfig: modalContentConfig, handlers: handlers, webAppUrl: webAppUrl });
13
13
  };
14
14
  exports.default = SignUp;
@@ -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;
@@ -49,7 +49,7 @@ var SignInPhone = function (_a) {
49
49
  }); }, []);
50
50
  var renderKeypad = useCallback(function () { return (React.createElement(KeypadContainer, { type: "numeric", handlers: keypadHandlers, value: phone, children: KeypadView })); }, [KeypadView, phone, keypadHandlers]);
51
51
  var renderErrorMessage = useCallback(function (errMsg) { return (React.createElement(ErrorMessageContainer, { content: errMsg, children: ErrorMessageView })); }, [ErrorMessageView]);
52
- var renderSignUp = useCallback(function () { return React.createElement(SignUpContainer, { children: SignUpView }); }, [SignUpView]);
52
+ var renderSignUp = useCallback(function () { return React.createElement(SignUpContainer, { handlers: handlers, children: SignUpView }); }, [SignUpView, handlers]);
53
53
  useEffect(function () {
54
54
  if (errMsg) {
55
55
  setShowSignUp(true);
@@ -1,6 +1,7 @@
1
- import { SignUpProps } from '@open-tender/ui';
1
+ import { SignUpProps, Handlers } from '@open-tender/ui';
2
2
  import { ReactNode } from 'react';
3
- declare const SignUp: ({ children }: {
3
+ declare const SignUp: ({ handlers, children }: {
4
+ handlers: Handlers;
4
5
  children: (props: SignUpProps) => ReactNode;
5
6
  }) => ReactNode;
6
7
  export default SignUp;
@@ -1,12 +1,12 @@
1
1
  import { useAppSelector } from '../app/hooks';
2
2
  import { selectKioskBrand, selectKioskConfig } from '../slices';
3
3
  var SignUp = function (_a) {
4
- var children = _a.children;
5
- var config = useAppSelector(selectKioskConfig).signUp;
4
+ var handlers = _a.handlers, children = _a.children;
5
+ var _b = useAppSelector(selectKioskConfig), config = _b.signUp, modalContentConfig = _b.modalContent;
6
6
  var web_app_url = (useAppSelector(selectKioskBrand) || {}).webAppUrl;
7
7
  var webAppUrl = web_app_url ? "".concat(web_app_url, "/signup") : null;
8
8
  if (!config)
9
9
  return null;
10
- return children({ config: config, webAppUrl: webAppUrl });
10
+ return children({ config: config, modalContentConfig: modalContentConfig, handlers: handlers, webAppUrl: webAppUrl });
11
11
  };
12
12
  export default SignUp;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "1.1.255",
3
+ "version": "1.1.257",
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.106",
65
+ "@open-tender/ui": "^0.4.42",
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",
@@ -72,4 +72,4 @@
72
72
  "react-dom": "^18.2.0",
73
73
  "uuid": "^9.0.1"
74
74
  }
75
- }
75
+ }