@open-tender/store 1.1.94 → 1.1.96

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,7 +1,8 @@
1
1
  import { HeaderProps, SignInButtonProps } from '@open-tender/ui';
2
2
  import React, { ReactNode } from 'react';
3
- declare const Header: ({ to, backAction, pathname, navigate, children, SignInButtonView }: {
3
+ declare const Header: ({ to, backText, backAction, pathname, navigate, children, SignInButtonView }: {
4
4
  to?: string;
5
+ backText?: string;
5
6
  backAction?: () => void;
6
7
  pathname: string;
7
8
  navigate: (route: string) => void;
@@ -6,7 +6,7 @@ var hooks_1 = require("../app/hooks");
6
6
  var slices_1 = require("../slices");
7
7
  var SignInButton_1 = tslib_1.__importDefault(require("./SignInButton"));
8
8
  var Header = function (_a) {
9
- var to = _a.to, backAction = _a.backAction, pathname = _a.pathname, navigate = _a.navigate, children = _a.children, SignInButtonView = _a.SignInButtonView;
9
+ var to = _a.to, _b = _a.backText, backText = _b === void 0 ? 'Back' : _b, backAction = _a.backAction, pathname = _a.pathname, navigate = _a.navigate, children = _a.children, SignInButtonView = _a.SignInButtonView;
10
10
  var dispatch = (0, hooks_1.useAppDispatch)();
11
11
  var header = ((0, hooks_1.useAppSelector)(slices_1.selectKioskConfig) || {}).header;
12
12
  var showButtons = !!(backAction || to);
@@ -29,6 +29,12 @@ var Header = function (_a) {
29
29
  var renderSignInButton = (0, react_1.useCallback)(function () { return (react_1.default.createElement(SignInButton_1.default, { pathname: pathname, navigate: navigate, children: SignInButtonView })); }, [pathname, navigate, SignInButtonView]);
30
30
  if (!header)
31
31
  return null;
32
- return children({ config: header, handlers: handlers, showButtons: showButtons, renderSignInButton: renderSignInButton });
32
+ return children({
33
+ config: header,
34
+ handlers: handlers,
35
+ showButtons: showButtons,
36
+ backText: backText,
37
+ renderSignInButton: renderSignInButton
38
+ });
33
39
  };
34
40
  exports.default = Header;
@@ -1,6 +1,6 @@
1
1
  import { QuantityProps } from '@open-tender/ui';
2
2
  import { ReactNode } from 'react';
3
- declare const Quantity: ({ quantity, increment, incrementDisabled, decrement, decrementDisabled, fontSize, iconSize, className, children }: {
3
+ declare const Quantity: ({ quantity, increment, incrementDisabled, decrement, decrementDisabled, fontSize, iconSize, strokeWidth, className, children }: {
4
4
  quantity: number;
5
5
  increment: () => void;
6
6
  incrementDisabled?: boolean;
@@ -8,6 +8,7 @@ declare const Quantity: ({ quantity, increment, incrementDisabled, decrement, de
8
8
  decrementDisabled?: boolean;
9
9
  fontSize?: number;
10
10
  iconSize?: number;
11
+ strokeWidth?: number;
11
12
  className?: string;
12
13
  children: (props: QuantityProps) => ReactNode;
13
14
  }) => ReactNode;
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var hooks_1 = require("../app/hooks");
4
4
  var slices_1 = require("../slices");
5
5
  var Quantity = function (_a) {
6
- var quantity = _a.quantity, increment = _a.increment, _b = _a.incrementDisabled, incrementDisabled = _b === void 0 ? false : _b, decrement = _a.decrement, _c = _a.decrementDisabled, decrementDisabled = _c === void 0 ? false : _c, _d = _a.fontSize, fontSize = _d === void 0 ? 28 : _d, _e = _a.iconSize, iconSize = _e === void 0 ? 36 : _e, _f = _a.className, className = _f === void 0 ? 'quantity' : _f, children = _a.children;
7
- var _g = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), _h = className, config = _g[_h];
6
+ var quantity = _a.quantity, increment = _a.increment, _b = _a.incrementDisabled, incrementDisabled = _b === void 0 ? false : _b, decrement = _a.decrement, _c = _a.decrementDisabled, decrementDisabled = _c === void 0 ? false : _c, _d = _a.fontSize, fontSize = _d === void 0 ? 28 : _d, _e = _a.iconSize, iconSize = _e === void 0 ? 36 : _e, _f = _a.strokeWidth, strokeWidth = _f === void 0 ? 2 : _f, _g = _a.className, className = _g === void 0 ? 'quantity' : _g, children = _a.children;
7
+ var _h = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), _j = className, config = _h[_j];
8
8
  var handlers = { increment: increment, decrement: decrement };
9
9
  return children({
10
10
  config: config,
@@ -14,6 +14,7 @@ var Quantity = function (_a) {
14
14
  decrementDisabled: decrementDisabled,
15
15
  fontSize: fontSize,
16
16
  iconSize: iconSize,
17
+ strokeWidth: strokeWidth,
17
18
  className: className
18
19
  });
19
20
  };
@@ -1,7 +1,8 @@
1
1
  import { HeaderProps, SignInButtonProps } from '@open-tender/ui';
2
2
  import React, { ReactNode } from 'react';
3
- declare const Header: ({ to, backAction, pathname, navigate, children, SignInButtonView }: {
3
+ declare const Header: ({ to, backText, backAction, pathname, navigate, children, SignInButtonView }: {
4
4
  to?: string;
5
+ backText?: string;
5
6
  backAction?: () => void;
6
7
  pathname: string;
7
8
  navigate: (route: string) => void;
@@ -3,7 +3,7 @@ import { useAppDispatch, useAppSelector } from '../app/hooks';
3
3
  import { selectKioskConfig, toggleSidebar } from '../slices';
4
4
  import { default as SignInButtonContainer } from './SignInButton';
5
5
  var Header = function (_a) {
6
- var to = _a.to, backAction = _a.backAction, pathname = _a.pathname, navigate = _a.navigate, children = _a.children, SignInButtonView = _a.SignInButtonView;
6
+ var to = _a.to, _b = _a.backText, backText = _b === void 0 ? 'Back' : _b, backAction = _a.backAction, pathname = _a.pathname, navigate = _a.navigate, children = _a.children, SignInButtonView = _a.SignInButtonView;
7
7
  var dispatch = useAppDispatch();
8
8
  var header = (useAppSelector(selectKioskConfig) || {}).header;
9
9
  var showButtons = !!(backAction || to);
@@ -26,6 +26,12 @@ var Header = function (_a) {
26
26
  var renderSignInButton = useCallback(function () { return (React.createElement(SignInButtonContainer, { pathname: pathname, navigate: navigate, children: SignInButtonView })); }, [pathname, navigate, SignInButtonView]);
27
27
  if (!header)
28
28
  return null;
29
- return children({ config: header, handlers: handlers, showButtons: showButtons, renderSignInButton: renderSignInButton });
29
+ return children({
30
+ config: header,
31
+ handlers: handlers,
32
+ showButtons: showButtons,
33
+ backText: backText,
34
+ renderSignInButton: renderSignInButton
35
+ });
30
36
  };
31
37
  export default Header;
@@ -1,6 +1,6 @@
1
1
  import { QuantityProps } from '@open-tender/ui';
2
2
  import { ReactNode } from 'react';
3
- declare const Quantity: ({ quantity, increment, incrementDisabled, decrement, decrementDisabled, fontSize, iconSize, className, children }: {
3
+ declare const Quantity: ({ quantity, increment, incrementDisabled, decrement, decrementDisabled, fontSize, iconSize, strokeWidth, className, children }: {
4
4
  quantity: number;
5
5
  increment: () => void;
6
6
  incrementDisabled?: boolean;
@@ -8,6 +8,7 @@ declare const Quantity: ({ quantity, increment, incrementDisabled, decrement, de
8
8
  decrementDisabled?: boolean;
9
9
  fontSize?: number;
10
10
  iconSize?: number;
11
+ strokeWidth?: number;
11
12
  className?: string;
12
13
  children: (props: QuantityProps) => ReactNode;
13
14
  }) => ReactNode;
@@ -1,8 +1,8 @@
1
1
  import { useAppSelector } from '../app/hooks';
2
2
  import { selectKioskConfig } from '../slices';
3
3
  var Quantity = function (_a) {
4
- var quantity = _a.quantity, increment = _a.increment, _b = _a.incrementDisabled, incrementDisabled = _b === void 0 ? false : _b, decrement = _a.decrement, _c = _a.decrementDisabled, decrementDisabled = _c === void 0 ? false : _c, _d = _a.fontSize, fontSize = _d === void 0 ? 28 : _d, _e = _a.iconSize, iconSize = _e === void 0 ? 36 : _e, _f = _a.className, className = _f === void 0 ? 'quantity' : _f, children = _a.children;
5
- var _g = useAppSelector(selectKioskConfig), _h = className, config = _g[_h];
4
+ var quantity = _a.quantity, increment = _a.increment, _b = _a.incrementDisabled, incrementDisabled = _b === void 0 ? false : _b, decrement = _a.decrement, _c = _a.decrementDisabled, decrementDisabled = _c === void 0 ? false : _c, _d = _a.fontSize, fontSize = _d === void 0 ? 28 : _d, _e = _a.iconSize, iconSize = _e === void 0 ? 36 : _e, _f = _a.strokeWidth, strokeWidth = _f === void 0 ? 2 : _f, _g = _a.className, className = _g === void 0 ? 'quantity' : _g, children = _a.children;
5
+ var _h = useAppSelector(selectKioskConfig), _j = className, config = _h[_j];
6
6
  var handlers = { increment: increment, decrement: decrement };
7
7
  return children({
8
8
  config: config,
@@ -12,6 +12,7 @@ var Quantity = function (_a) {
12
12
  decrementDisabled: decrementDisabled,
13
13
  fontSize: fontSize,
14
14
  iconSize: iconSize,
15
+ strokeWidth: strokeWidth,
15
16
  className: className
16
17
  });
17
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "1.1.94",
3
+ "version": "1.1.96",
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,7 +62,7 @@
62
62
  "peerDependencies": {
63
63
  "@emotion/react": "^11.11.1",
64
64
  "@open-tender/types": "^0.4.60",
65
- "@open-tender/ui": "^0.3.77",
65
+ "@open-tender/ui": "^0.3.79",
66
66
  "@open-tender/utils": "^0.4.39",
67
67
  "@reduxjs/toolkit": "^2.0.1",
68
68
  "date-fns": "2.30.0",