@open-tender/store 1.1.219 → 1.1.221

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.
@@ -10,12 +10,12 @@ var CategoryItem = function (_a) {
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;
13
- var display_cals = (0, hooks_1.useAppSelector)(slices_1.selectStoreSettings).display_cals;
13
+ var _b = (0, hooks_1.useAppSelector)(slices_1.selectStoreSettings), display_cals = _b.display_cals, navigation_page = _b.navigation_page;
14
14
  var soldOut = (0, hooks_1.useAppSelector)(slices_1.selectMenu).soldOut;
15
15
  var cartCounts = (0, hooks_1.useAppSelector)(slices_1.selectCartCounts);
16
16
  var hasPoints = false;
17
17
  var displaySettings = {};
18
- var _b = displaySettings || {}, _c = _b.calories, showCals = _c === void 0 ? false : _c, _d = _b.tags, showTags = _d === void 0 ? false : _d, _e = _b.allergens, showAllergens = _e === void 0 ? false : _e;
18
+ var _c = displaySettings || {}, _d = _c.calories, showCals = _d === void 0 ? false : _d, _e = _c.tags, showTags = _e === void 0 ? false : _e, _f = _c.allergens, showAllergens = _f === void 0 ? false : _f;
19
19
  var showDesc = 'SHOW';
20
20
  var orderItem = (0, react_1.useMemo)(function () {
21
21
  return favorite
@@ -37,7 +37,8 @@ var CategoryItem = function (_a) {
37
37
  handlers: handlers,
38
38
  apiUrl: apiUrl,
39
39
  placeholder: placeholder,
40
- displayCals: display_cals
40
+ displayCals: display_cals,
41
+ navigationType: navigation_page
41
42
  });
42
43
  };
43
44
  exports.default = (0, react_1.memo)(CategoryItem, areEqualProps);
@@ -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;
@@ -8,12 +8,12 @@ var CategoryItem = function (_a) {
8
8
  var dispatch = useAppDispatch();
9
9
  var apiUrl = useAppSelector(selectKioskApi);
10
10
  var config = useAppSelector(selectKioskConfig).categoryItem;
11
- var display_cals = useAppSelector(selectStoreSettings).display_cals;
11
+ var _b = useAppSelector(selectStoreSettings), display_cals = _b.display_cals, navigation_page = _b.navigation_page;
12
12
  var soldOut = useAppSelector(selectMenu).soldOut;
13
13
  var cartCounts = useAppSelector(selectCartCounts);
14
14
  var hasPoints = false;
15
15
  var displaySettings = {};
16
- var _b = displaySettings || {}, _c = _b.calories, showCals = _c === void 0 ? false : _c, _d = _b.tags, showTags = _d === void 0 ? false : _d, _e = _b.allergens, showAllergens = _e === void 0 ? false : _e;
16
+ var _c = displaySettings || {}, _d = _c.calories, showCals = _d === void 0 ? false : _d, _e = _c.tags, showTags = _e === void 0 ? false : _e, _f = _c.allergens, showAllergens = _f === void 0 ? false : _f;
17
17
  var showDesc = 'SHOW';
18
18
  var orderItem = useMemo(function () {
19
19
  return favorite
@@ -35,7 +35,8 @@ var CategoryItem = function (_a) {
35
35
  handlers: handlers,
36
36
  apiUrl: apiUrl,
37
37
  placeholder: placeholder,
38
- displayCals: display_cals
38
+ displayCals: display_cals,
39
+ navigationType: navigation_page
39
40
  });
40
41
  };
41
42
  export default memo(CategoryItem, areEqualProps);
@@ -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.219",
3
+ "version": "1.1.221",
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.91",
65
- "@open-tender/ui": "^0.4.25",
65
+ "@open-tender/ui": "^0.4.27",
66
66
  "@open-tender/utils": "^0.4.67",
67
67
  "@reduxjs/toolkit": "^2.0.1",
68
68
  "date-fns": "2.30.0",