@open-tender/store 1.1.218 → 1.1.220
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/CancelButton.d.ts +5 -2
- package/dist/cjs/components/CancelButton.js +3 -2
- package/dist/cjs/components/CategoryNav.js +2 -2
- package/dist/cjs/components/CategoryNavItem.d.ts +3 -2
- package/dist/cjs/components/CategoryNavItem.js +3 -2
- package/dist/cjs/components/CategoryNavOther.d.ts +3 -1
- package/dist/cjs/components/CategoryNavOther.js +3 -2
- package/dist/esm/components/CancelButton.d.ts +5 -2
- package/dist/esm/components/CancelButton.js +3 -2
- package/dist/esm/components/CategoryNav.js +2 -2
- package/dist/esm/components/CategoryNavItem.d.ts +3 -2
- package/dist/esm/components/CategoryNavItem.js +3 -2
- package/dist/esm/components/CategoryNavOther.d.ts +3 -1
- package/dist/esm/components/CategoryNavOther.js +3 -2
- package/package.json +3 -3
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { CancelButtonProps } from '@open-tender/ui';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
declare const CancelButton: ({ navigate, children }: {
|
|
3
|
+
declare const CancelButton: ({ navigate, children, route }: {
|
|
4
|
+
route?: string;
|
|
4
5
|
navigate: (route: string) => void;
|
|
5
|
-
children: (props: CancelButtonProps
|
|
6
|
+
children: (props: CancelButtonProps & {
|
|
7
|
+
route?: string;
|
|
8
|
+
}) => ReactNode;
|
|
6
9
|
}) => ReactNode;
|
|
7
10
|
export default CancelButton;
|
|
@@ -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 CancelButton = function (_a) {
|
|
6
|
-
var navigate = _a.navigate, children = _a.children;
|
|
6
|
+
var navigate = _a.navigate, children = _a.children, route = _a.route;
|
|
7
7
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
8
8
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).cancelButton;
|
|
9
9
|
var startOver = function () {
|
|
@@ -21,7 +21,8 @@ var CancelButton = function (_a) {
|
|
|
21
21
|
return null;
|
|
22
22
|
return children({
|
|
23
23
|
config: config,
|
|
24
|
-
handlers: handlers
|
|
24
|
+
handlers: handlers,
|
|
25
|
+
route: route
|
|
25
26
|
});
|
|
26
27
|
};
|
|
27
28
|
exports.default = CancelButton;
|
|
@@ -14,8 +14,8 @@ var CategoryNav = function (_a) {
|
|
|
14
14
|
var _c = (0, hooks_1.useAppSelector)(slices_1.selectMenu), categories = _c.categories, featured = _c.featured, rest = tslib_1.__rest(_c, ["categories", "featured"]);
|
|
15
15
|
var favorites = customer && display_favorites ? rest.favorites : [];
|
|
16
16
|
var recents = customer && display_recents ? rest.recents : [];
|
|
17
|
-
var renderCategoryNavOther = (0, react_1.useCallback)(function (title, path) { return (react_1.default.createElement(CategoryNavOther_1.default, { navigate: navigate, title: title, path: path, children: CategoryNavOtherView, displayImage: displayImage })); }, [navigate, CategoryNavOtherView, displayImage]);
|
|
18
|
-
var renderCategoryNavItem = (0, react_1.useCallback)(function (item) { return (react_1.default.createElement(CategoryNavItem_1.default, { key: item.id, navigate: navigate, category: item, children: CategoryNavItemView, displayImage: displayImage })); }, [navigate, CategoryNavItemView, displayImage]);
|
|
17
|
+
var renderCategoryNavOther = (0, react_1.useCallback)(function (title, path) { return (react_1.default.createElement(CategoryNavOther_1.default, { navigate: navigate, title: title, path: path, children: CategoryNavOtherView, displayImage: displayImage, navigationType: navigation_page })); }, [navigate, CategoryNavOtherView, displayImage, navigation_page]);
|
|
18
|
+
var renderCategoryNavItem = (0, react_1.useCallback)(function (item) { return (react_1.default.createElement(CategoryNavItem_1.default, { key: item.id, navigate: navigate, category: item, children: CategoryNavItemView, displayImage: displayImage, navigationType: navigation_page })); }, [navigate, CategoryNavItemView, displayImage, navigation_page]);
|
|
19
19
|
if (!config)
|
|
20
20
|
return null;
|
|
21
21
|
return children({
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { MenuCategory } from '@open-tender/types';
|
|
1
|
+
import { MenuCategory, NavigationPageType } from '@open-tender/types';
|
|
2
2
|
import { CategoryNavItemProps } from '@open-tender/ui';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
declare const CategoryNavItem: ({ category, isScrollable, isActive, displayImage, children, navigate }: {
|
|
4
|
+
declare const CategoryNavItem: ({ category, isScrollable, isActive, displayImage, navigationType, children, navigate }: {
|
|
5
5
|
category: MenuCategory;
|
|
6
6
|
isScrollable?: boolean;
|
|
7
7
|
isActive?: boolean;
|
|
8
8
|
displayImage?: boolean;
|
|
9
|
+
navigationType?: NavigationPageType;
|
|
9
10
|
navigate?: (route: string) => void;
|
|
10
11
|
children: (props: CategoryNavItemProps) => ReactNode;
|
|
11
12
|
}) => ReactNode;
|
|
@@ -4,7 +4,7 @@ var ui_1 = require("@open-tender/ui");
|
|
|
4
4
|
var hooks_1 = require("../app/hooks");
|
|
5
5
|
var slices_1 = require("../slices");
|
|
6
6
|
var CategoryNavItem = function (_a) {
|
|
7
|
-
var category = _a.category, isScrollable = _a.isScrollable, isActive = _a.isActive, displayImage = _a.displayImage, children = _a.children, navigate = _a.navigate;
|
|
7
|
+
var category = _a.category, isScrollable = _a.isScrollable, isActive = _a.isActive, displayImage = _a.displayImage, navigationType = _a.navigationType, children = _a.children, navigate = _a.navigate;
|
|
8
8
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
9
9
|
var apiUrl = (0, hooks_1.useAppSelector)(slices_1.selectKioskApi);
|
|
10
10
|
var display_category_nav_page = (0, hooks_1.useAppSelector)(slices_1.selectStoreSettings).display_category_nav_page;
|
|
@@ -30,7 +30,8 @@ var CategoryNavItem = function (_a) {
|
|
|
30
30
|
imageUrl: imageUrl,
|
|
31
31
|
apiUrl: apiUrl,
|
|
32
32
|
disabled: isScrollable,
|
|
33
|
-
displayImage: displayImage
|
|
33
|
+
displayImage: displayImage,
|
|
34
|
+
navigationType: navigationType
|
|
34
35
|
});
|
|
35
36
|
};
|
|
36
37
|
exports.default = CategoryNavItem;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { NavigationPageType } from '@open-tender/types';
|
|
1
2
|
import { CategoryNavOtherProps } from '@open-tender/ui';
|
|
2
3
|
import { ReactNode } from 'react';
|
|
3
|
-
declare const CategoryNavOther: ({ title, path, displayImage, navigate, children }: {
|
|
4
|
+
declare const CategoryNavOther: ({ title, path, displayImage, navigationType, navigate, children }: {
|
|
4
5
|
title: string;
|
|
5
6
|
path: string;
|
|
6
7
|
displayImage?: boolean;
|
|
8
|
+
navigationType?: NavigationPageType;
|
|
7
9
|
navigate: (route: string) => void;
|
|
8
10
|
children: (props: CategoryNavOtherProps) => ReactNode;
|
|
9
11
|
}) => ReactNode;
|
|
@@ -5,7 +5,7 @@ var react_1 = require("react");
|
|
|
5
5
|
var hooks_1 = require("../app/hooks");
|
|
6
6
|
var slices_1 = require("../slices");
|
|
7
7
|
var CategoryNavOther = function (_a) {
|
|
8
|
-
var title = _a.title, path = _a.path, displayImage = _a.displayImage, navigate = _a.navigate, children = _a.children;
|
|
8
|
+
var title = _a.title, path = _a.path, displayImage = _a.displayImage, navigationType = _a.navigationType, navigate = _a.navigate, children = _a.children;
|
|
9
9
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
10
10
|
var apiUrl = (0, hooks_1.useAppSelector)(slices_1.selectKioskApi);
|
|
11
11
|
var _b = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), categoryNavItem = _b.categoryNavItem, categoryNavItemSelected = _b.categoryNavItemSelected;
|
|
@@ -42,7 +42,8 @@ var CategoryNavOther = function (_a) {
|
|
|
42
42
|
title: title,
|
|
43
43
|
imageUrl: getCategoryItemImage(),
|
|
44
44
|
apiUrl: apiUrl,
|
|
45
|
-
displayImage: displayImage
|
|
45
|
+
displayImage: displayImage,
|
|
46
|
+
navigationType: navigationType
|
|
46
47
|
});
|
|
47
48
|
};
|
|
48
49
|
exports.default = CategoryNavOther;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { CancelButtonProps } from '@open-tender/ui';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
declare const CancelButton: ({ navigate, children }: {
|
|
3
|
+
declare const CancelButton: ({ navigate, children, route }: {
|
|
4
|
+
route?: string;
|
|
4
5
|
navigate: (route: string) => void;
|
|
5
|
-
children: (props: CancelButtonProps
|
|
6
|
+
children: (props: CancelButtonProps & {
|
|
7
|
+
route?: string;
|
|
8
|
+
}) => ReactNode;
|
|
6
9
|
}) => ReactNode;
|
|
7
10
|
export default CancelButton;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
2
2
|
import { resetCart, resetCustomer, resetCustomerIdentify, resetIdleState, resetMenu, resetPosCheckout, selectKioskConfig, setOrderId } from '../slices';
|
|
3
3
|
var CancelButton = function (_a) {
|
|
4
|
-
var navigate = _a.navigate, children = _a.children;
|
|
4
|
+
var navigate = _a.navigate, children = _a.children, route = _a.route;
|
|
5
5
|
var dispatch = useAppDispatch();
|
|
6
6
|
var config = useAppSelector(selectKioskConfig).cancelButton;
|
|
7
7
|
var startOver = function () {
|
|
@@ -19,7 +19,8 @@ var CancelButton = function (_a) {
|
|
|
19
19
|
return null;
|
|
20
20
|
return children({
|
|
21
21
|
config: config,
|
|
22
|
-
handlers: handlers
|
|
22
|
+
handlers: handlers,
|
|
23
|
+
route: route
|
|
23
24
|
});
|
|
24
25
|
};
|
|
25
26
|
export default CancelButton;
|
|
@@ -12,8 +12,8 @@ var CategoryNav = function (_a) {
|
|
|
12
12
|
var _c = useAppSelector(selectMenu), categories = _c.categories, featured = _c.featured, rest = __rest(_c, ["categories", "featured"]);
|
|
13
13
|
var favorites = customer && display_favorites ? rest.favorites : [];
|
|
14
14
|
var recents = customer && display_recents ? rest.recents : [];
|
|
15
|
-
var renderCategoryNavOther = useCallback(function (title, path) { return (React.createElement(CategoryNavOtherContainer, { navigate: navigate, title: title, path: path, children: CategoryNavOtherView, displayImage: displayImage })); }, [navigate, CategoryNavOtherView, displayImage]);
|
|
16
|
-
var renderCategoryNavItem = useCallback(function (item) { return (React.createElement(CategoryNavItemContainer, { key: item.id, navigate: navigate, category: item, children: CategoryNavItemView, displayImage: displayImage })); }, [navigate, CategoryNavItemView, displayImage]);
|
|
15
|
+
var renderCategoryNavOther = useCallback(function (title, path) { return (React.createElement(CategoryNavOtherContainer, { navigate: navigate, title: title, path: path, children: CategoryNavOtherView, displayImage: displayImage, navigationType: navigation_page })); }, [navigate, CategoryNavOtherView, displayImage, navigation_page]);
|
|
16
|
+
var renderCategoryNavItem = useCallback(function (item) { return (React.createElement(CategoryNavItemContainer, { key: item.id, navigate: navigate, category: item, children: CategoryNavItemView, displayImage: displayImage, navigationType: navigation_page })); }, [navigate, CategoryNavItemView, displayImage, navigation_page]);
|
|
17
17
|
if (!config)
|
|
18
18
|
return null;
|
|
19
19
|
return children({
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { MenuCategory } from '@open-tender/types';
|
|
1
|
+
import { MenuCategory, NavigationPageType } from '@open-tender/types';
|
|
2
2
|
import { CategoryNavItemProps } from '@open-tender/ui';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
declare const CategoryNavItem: ({ category, isScrollable, isActive, displayImage, children, navigate }: {
|
|
4
|
+
declare const CategoryNavItem: ({ category, isScrollable, isActive, displayImage, navigationType, children, navigate }: {
|
|
5
5
|
category: MenuCategory;
|
|
6
6
|
isScrollable?: boolean;
|
|
7
7
|
isActive?: boolean;
|
|
8
8
|
displayImage?: boolean;
|
|
9
|
+
navigationType?: NavigationPageType;
|
|
9
10
|
navigate?: (route: string) => void;
|
|
10
11
|
children: (props: CategoryNavItemProps) => ReactNode;
|
|
11
12
|
}) => ReactNode;
|
|
@@ -2,7 +2,7 @@ import { makeImageUrl } from '@open-tender/ui';
|
|
|
2
2
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
3
3
|
import { selectCurrentCategory, selectKioskApi, selectKioskConfig, selectStoreSettings, setCurrentCategory } from '../slices';
|
|
4
4
|
var CategoryNavItem = function (_a) {
|
|
5
|
-
var category = _a.category, isScrollable = _a.isScrollable, isActive = _a.isActive, displayImage = _a.displayImage, children = _a.children, navigate = _a.navigate;
|
|
5
|
+
var category = _a.category, isScrollable = _a.isScrollable, isActive = _a.isActive, displayImage = _a.displayImage, navigationType = _a.navigationType, children = _a.children, navigate = _a.navigate;
|
|
6
6
|
var dispatch = useAppDispatch();
|
|
7
7
|
var apiUrl = useAppSelector(selectKioskApi);
|
|
8
8
|
var display_category_nav_page = useAppSelector(selectStoreSettings).display_category_nav_page;
|
|
@@ -28,7 +28,8 @@ var CategoryNavItem = function (_a) {
|
|
|
28
28
|
imageUrl: imageUrl,
|
|
29
29
|
apiUrl: apiUrl,
|
|
30
30
|
disabled: isScrollable,
|
|
31
|
-
displayImage: displayImage
|
|
31
|
+
displayImage: displayImage,
|
|
32
|
+
navigationType: navigationType
|
|
32
33
|
});
|
|
33
34
|
};
|
|
34
35
|
export default CategoryNavItem;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { NavigationPageType } from '@open-tender/types';
|
|
1
2
|
import { CategoryNavOtherProps } from '@open-tender/ui';
|
|
2
3
|
import { ReactNode } from 'react';
|
|
3
|
-
declare const CategoryNavOther: ({ title, path, displayImage, navigate, children }: {
|
|
4
|
+
declare const CategoryNavOther: ({ title, path, displayImage, navigationType, navigate, children }: {
|
|
4
5
|
title: string;
|
|
5
6
|
path: string;
|
|
6
7
|
displayImage?: boolean;
|
|
8
|
+
navigationType?: NavigationPageType;
|
|
7
9
|
navigate: (route: string) => void;
|
|
8
10
|
children: (props: CategoryNavOtherProps) => ReactNode;
|
|
9
11
|
}) => ReactNode;
|
|
@@ -3,7 +3,7 @@ import { useCallback } from 'react';
|
|
|
3
3
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
4
4
|
import { selectCurrentSection, selectKioskApi, selectKioskConfig, selectMenu, setCurrentCategory } from '../slices';
|
|
5
5
|
var CategoryNavOther = function (_a) {
|
|
6
|
-
var title = _a.title, path = _a.path, displayImage = _a.displayImage, navigate = _a.navigate, children = _a.children;
|
|
6
|
+
var title = _a.title, path = _a.path, displayImage = _a.displayImage, navigationType = _a.navigationType, navigate = _a.navigate, children = _a.children;
|
|
7
7
|
var dispatch = useAppDispatch();
|
|
8
8
|
var apiUrl = useAppSelector(selectKioskApi);
|
|
9
9
|
var _b = useAppSelector(selectKioskConfig), categoryNavItem = _b.categoryNavItem, categoryNavItemSelected = _b.categoryNavItemSelected;
|
|
@@ -40,7 +40,8 @@ var CategoryNavOther = function (_a) {
|
|
|
40
40
|
title: title,
|
|
41
41
|
imageUrl: getCategoryItemImage(),
|
|
42
42
|
apiUrl: apiUrl,
|
|
43
|
-
displayImage: displayImage
|
|
43
|
+
displayImage: displayImage,
|
|
44
|
+
navigationType: navigationType
|
|
44
45
|
});
|
|
45
46
|
};
|
|
46
47
|
export default CategoryNavOther;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.220",
|
|
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,8 +61,8 @@
|
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@emotion/react": "^11.11.1",
|
|
64
|
-
"@open-tender/types": "^0.4.
|
|
65
|
-
"@open-tender/ui": "^0.4.
|
|
64
|
+
"@open-tender/types": "^0.4.91",
|
|
65
|
+
"@open-tender/ui": "^0.4.26",
|
|
66
66
|
"@open-tender/utils": "^0.4.67",
|
|
67
67
|
"@reduxjs/toolkit": "^2.0.1",
|
|
68
68
|
"date-fns": "2.30.0",
|