@open-tender/store 1.1.269 → 1.1.271
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.
- package/dist/cjs/components/CategoryItem.d.ts +2 -1
- package/dist/cjs/components/CategoryItem.js +2 -1
- package/dist/cjs/components/ItemGroup.d.ts +11 -11
- package/dist/cjs/components/ItemGroup.js +1 -1
- package/dist/cjs/components/ItemOption.d.ts +7 -7
- package/dist/cjs/components/ItemOption.js +2 -1
- package/dist/esm/components/CategoryItem.d.ts +2 -1
- package/dist/esm/components/CategoryItem.js +2 -1
- package/dist/esm/components/ItemGroup.d.ts +11 -11
- package/dist/esm/components/ItemGroup.js +1 -1
- package/dist/esm/components/ItemOption.d.ts +7 -7
- package/dist/esm/components/ItemOption.js +2 -1
- package/package.json +2 -2
|
@@ -6,8 +6,9 @@ interface CategoryItemInterface {
|
|
|
6
6
|
favorite?: MenuItemFavorite;
|
|
7
7
|
allergenAlerts?: string[];
|
|
8
8
|
placeholder?: string;
|
|
9
|
+
index?: number;
|
|
9
10
|
navigate: (route: string) => void;
|
|
10
11
|
children: (props: CategoryItemProps) => ReactNode;
|
|
11
12
|
}
|
|
12
|
-
declare const _default: import("react").MemoExoticComponent<({ item, favorite, allergenAlerts, placeholder, navigate, children }: CategoryItemInterface) => ReactNode>;
|
|
13
|
+
declare const _default: import("react").MemoExoticComponent<({ item, favorite, allergenAlerts, placeholder, index, navigate, children }: CategoryItemInterface) => ReactNode>;
|
|
13
14
|
export default _default;
|
|
@@ -6,7 +6,7 @@ var react_1 = require("react");
|
|
|
6
6
|
var hooks_1 = require("../app/hooks");
|
|
7
7
|
var slices_1 = require("../slices");
|
|
8
8
|
var CategoryItem = function (_a) {
|
|
9
|
-
var item = _a.item, favorite = _a.favorite, allergenAlerts = _a.allergenAlerts, placeholder = _a.placeholder, navigate = _a.navigate, children = _a.children;
|
|
9
|
+
var item = _a.item, favorite = _a.favorite, allergenAlerts = _a.allergenAlerts, placeholder = _a.placeholder, index = _a.index, navigate = _a.navigate, children = _a.children;
|
|
10
10
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
11
11
|
var apiUrl = (0, hooks_1.useAppSelector)(slices_1.selectKioskApi);
|
|
12
12
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).categoryItem;
|
|
@@ -38,6 +38,7 @@ var CategoryItem = function (_a) {
|
|
|
38
38
|
handlers: handlers,
|
|
39
39
|
apiUrl: apiUrl,
|
|
40
40
|
placeholder: placeholder,
|
|
41
|
+
index: index,
|
|
41
42
|
displayCals: display_cals,
|
|
42
43
|
navigationType: navigation_page,
|
|
43
44
|
displayDescription: display_descriptions
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { CartItemGroup } from '@open-tender/types';
|
|
2
2
|
import { ErrorMessageProps, ItemGroupProps, SuccessMessageProps } from '@open-tender/ui';
|
|
3
|
-
import React
|
|
4
|
-
declare const
|
|
3
|
+
import React from 'react';
|
|
4
|
+
declare const _default: React.MemoExoticComponent<({ group, content, flash, index, onItemClicked, children, ErrorMessageView, SuccessMessageView }: {
|
|
5
5
|
group: CartItemGroup;
|
|
6
|
-
content: ReactNode;
|
|
7
|
-
flash?: boolean;
|
|
8
|
-
index?: number;
|
|
9
|
-
onItemClicked?: (index?: number) => void;
|
|
10
|
-
children: (props: ItemGroupProps) => ReactNode;
|
|
11
|
-
ErrorMessageView: (props: ErrorMessageProps) => ReactNode;
|
|
12
|
-
SuccessMessageView: (props: SuccessMessageProps) => ReactNode;
|
|
13
|
-
}) => React.ReactNode
|
|
14
|
-
export default
|
|
6
|
+
content: React.ReactNode;
|
|
7
|
+
flash?: boolean | undefined;
|
|
8
|
+
index?: number | undefined;
|
|
9
|
+
onItemClicked?: ((index?: number | undefined) => void) | undefined;
|
|
10
|
+
children: (props: ItemGroupProps) => React.ReactNode;
|
|
11
|
+
ErrorMessageView: (props: ErrorMessageProps) => React.ReactNode;
|
|
12
|
+
SuccessMessageView: (props: SuccessMessageProps) => React.ReactNode;
|
|
13
|
+
}) => React.ReactNode>;
|
|
14
|
+
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { CartItemGroup, CartItemOption, CartLevels } from '@open-tender/types';
|
|
2
2
|
import { Handlers, ItemOptionProps } from '@open-tender/ui';
|
|
3
|
-
import
|
|
4
|
-
declare const
|
|
3
|
+
import React from 'react';
|
|
4
|
+
declare const _default: React.MemoExoticComponent<({ handlers, group, option, levels, placeholder, children, configName }: {
|
|
5
5
|
handlers: Handlers;
|
|
6
6
|
group: CartItemGroup;
|
|
7
7
|
option: CartItemOption;
|
|
8
8
|
levels: CartLevels;
|
|
9
|
-
placeholder?: string;
|
|
10
|
-
children: (props: ItemOptionProps) => ReactNode;
|
|
11
|
-
configName?: string;
|
|
12
|
-
}) => ReactNode
|
|
13
|
-
export default
|
|
9
|
+
placeholder?: string | undefined;
|
|
10
|
+
children: (props: ItemOptionProps) => React.ReactNode;
|
|
11
|
+
configName?: string | undefined;
|
|
12
|
+
}) => React.ReactNode>;
|
|
13
|
+
export default _default;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
var utils_1 = require("@open-tender/utils");
|
|
5
|
+
var react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
var hooks_1 = require("../app/hooks");
|
|
6
7
|
var slices_1 = require("../slices");
|
|
7
8
|
var ItemOption = function (_a) {
|
|
@@ -33,4 +34,4 @@ var ItemOption = function (_a) {
|
|
|
33
34
|
placeholder: placeholder
|
|
34
35
|
});
|
|
35
36
|
};
|
|
36
|
-
exports.default = ItemOption;
|
|
37
|
+
exports.default = react_1.default.memo(ItemOption);
|
|
@@ -6,8 +6,9 @@ interface CategoryItemInterface {
|
|
|
6
6
|
favorite?: MenuItemFavorite;
|
|
7
7
|
allergenAlerts?: string[];
|
|
8
8
|
placeholder?: string;
|
|
9
|
+
index?: number;
|
|
9
10
|
navigate: (route: string) => void;
|
|
10
11
|
children: (props: CategoryItemProps) => ReactNode;
|
|
11
12
|
}
|
|
12
|
-
declare const _default: import("react").MemoExoticComponent<({ item, favorite, allergenAlerts, placeholder, navigate, children }: CategoryItemInterface) => ReactNode>;
|
|
13
|
+
declare const _default: import("react").MemoExoticComponent<({ item, favorite, allergenAlerts, placeholder, index, navigate, children }: CategoryItemInterface) => ReactNode>;
|
|
13
14
|
export default _default;
|
|
@@ -4,7 +4,7 @@ import { memo, useMemo } from 'react';
|
|
|
4
4
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
5
5
|
import { selectCartCounts, selectKioskApi, selectKioskConfig, selectMenu, selectPointsProgram, selectStoreSettings, setCurrentItem } from '../slices';
|
|
6
6
|
var CategoryItem = function (_a) {
|
|
7
|
-
var item = _a.item, favorite = _a.favorite, allergenAlerts = _a.allergenAlerts, placeholder = _a.placeholder, navigate = _a.navigate, children = _a.children;
|
|
7
|
+
var item = _a.item, favorite = _a.favorite, allergenAlerts = _a.allergenAlerts, placeholder = _a.placeholder, index = _a.index, navigate = _a.navigate, children = _a.children;
|
|
8
8
|
var dispatch = useAppDispatch();
|
|
9
9
|
var apiUrl = useAppSelector(selectKioskApi);
|
|
10
10
|
var config = useAppSelector(selectKioskConfig).categoryItem;
|
|
@@ -36,6 +36,7 @@ var CategoryItem = function (_a) {
|
|
|
36
36
|
handlers: handlers,
|
|
37
37
|
apiUrl: apiUrl,
|
|
38
38
|
placeholder: placeholder,
|
|
39
|
+
index: index,
|
|
39
40
|
displayCals: display_cals,
|
|
40
41
|
navigationType: navigation_page,
|
|
41
42
|
displayDescription: display_descriptions
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { CartItemGroup } from '@open-tender/types';
|
|
2
2
|
import { ErrorMessageProps, ItemGroupProps, SuccessMessageProps } from '@open-tender/ui';
|
|
3
|
-
import React
|
|
4
|
-
declare const
|
|
3
|
+
import React from 'react';
|
|
4
|
+
declare const _default: React.MemoExoticComponent<({ group, content, flash, index, onItemClicked, children, ErrorMessageView, SuccessMessageView }: {
|
|
5
5
|
group: CartItemGroup;
|
|
6
|
-
content: ReactNode;
|
|
7
|
-
flash?: boolean;
|
|
8
|
-
index?: number;
|
|
9
|
-
onItemClicked?: (index?: number) => void;
|
|
10
|
-
children: (props: ItemGroupProps) => ReactNode;
|
|
11
|
-
ErrorMessageView: (props: ErrorMessageProps) => ReactNode;
|
|
12
|
-
SuccessMessageView: (props: SuccessMessageProps) => ReactNode;
|
|
13
|
-
}) => React.ReactNode
|
|
14
|
-
export default
|
|
6
|
+
content: React.ReactNode;
|
|
7
|
+
flash?: boolean | undefined;
|
|
8
|
+
index?: number | undefined;
|
|
9
|
+
onItemClicked?: ((index?: number | undefined) => void) | undefined;
|
|
10
|
+
children: (props: ItemGroupProps) => React.ReactNode;
|
|
11
|
+
ErrorMessageView: (props: ErrorMessageProps) => React.ReactNode;
|
|
12
|
+
SuccessMessageView: (props: SuccessMessageProps) => React.ReactNode;
|
|
13
|
+
}) => React.ReactNode>;
|
|
14
|
+
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { CartItemGroup, CartItemOption, CartLevels } from '@open-tender/types';
|
|
2
2
|
import { Handlers, ItemOptionProps } from '@open-tender/ui';
|
|
3
|
-
import
|
|
4
|
-
declare const
|
|
3
|
+
import React from 'react';
|
|
4
|
+
declare const _default: React.MemoExoticComponent<({ handlers, group, option, levels, placeholder, children, configName }: {
|
|
5
5
|
handlers: Handlers;
|
|
6
6
|
group: CartItemGroup;
|
|
7
7
|
option: CartItemOption;
|
|
8
8
|
levels: CartLevels;
|
|
9
|
-
placeholder?: string;
|
|
10
|
-
children: (props: ItemOptionProps) => ReactNode;
|
|
11
|
-
configName?: string;
|
|
12
|
-
}) => ReactNode
|
|
13
|
-
export default
|
|
9
|
+
placeholder?: string | undefined;
|
|
10
|
+
children: (props: ItemOptionProps) => React.ReactNode;
|
|
11
|
+
configName?: string | undefined;
|
|
12
|
+
}) => React.ReactNode>;
|
|
13
|
+
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
2
|
import { useModifier } from '@open-tender/utils';
|
|
3
|
+
import React from 'react';
|
|
3
4
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
4
5
|
import { selectKioskApi, selectKioskConfig, setCurrentOption } from '../slices';
|
|
5
6
|
var ItemOption = function (_a) {
|
|
@@ -31,4 +32,4 @@ var ItemOption = function (_a) {
|
|
|
31
32
|
placeholder: placeholder
|
|
32
33
|
});
|
|
33
34
|
};
|
|
34
|
-
export default ItemOption;
|
|
35
|
+
export default React.memo(ItemOption);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.271",
|
|
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.145",
|
|
65
|
-
"@open-tender/ui": "^0.4.
|
|
65
|
+
"@open-tender/ui": "^0.4.49",
|
|
66
66
|
"@open-tender/utils": "^0.5.30",
|
|
67
67
|
"@reduxjs/toolkit": "^2.0.1",
|
|
68
68
|
"date-fns": "2.30.0",
|