@open-tender/store 0.1.319 → 0.1.321

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,6 +10,7 @@ interface CategoryItemInterface {
10
10
  navigate: (route: string) => void;
11
11
  children: (props: CategoryItemProps & {
12
12
  displayPrice?: string;
13
+ cals: number | null;
13
14
  }) => ReactNode;
14
15
  }
15
16
  declare const _default: import("react").MemoExoticComponent<({ item, favorite, allergenAlerts, placeholder, index, navigate, children }: CategoryItemInterface) => ReactNode>;
@@ -22,7 +22,7 @@ var CategoryItem = function (_a) {
22
22
  return favorite
23
23
  ? tslib_1.__assign(tslib_1.__assign({}, (0, utils_1.rehydrateOrderItem)(item, favorite.item)), { index: -1 }) : (0, utils_1.makeOrderItem)(item, undefined, soldOut, undefined, hasPoints);
24
24
  }, [favorite, hasPoints, item, soldOut]);
25
- var displayPrice = (0, utils_1.useMenuItem)(orderItem, null, {}, null, undefined).displayPrice;
25
+ var _g = (0, utils_1.useMenuItem)(orderItem, null, {}, null, undefined), displayPrice = _g.displayPrice, displayCals = _g.displayCals;
26
26
  var cartItem = (0, utils_1.useOrderItem)(orderItem, favorite, allergenAlerts, cartCounts, showCals, showTags, showAllergens, showDesc);
27
27
  var handlers = (0, react_1.useMemo)(function () {
28
28
  var browse = function () {
@@ -41,6 +41,7 @@ var CategoryItem = function (_a) {
41
41
  placeholder: placeholder,
42
42
  index: index,
43
43
  displayPrice: displayPrice,
44
+ cals: displayCals,
44
45
  displayCals: display_cals,
45
46
  navigationType: navigation_page,
46
47
  displayDescription: display_descriptions
@@ -10,9 +10,15 @@ var ItemOption = function (_a) {
10
10
  var dispatch = (0, hooks_1.useAppDispatch)();
11
11
  var apiUrl = (0, hooks_1.useAppSelector)(slices_1.selectKioskApi);
12
12
  var _c = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), _d = configName, config = _c[_d];
13
+ var _e = (0, hooks_1.useAppSelector)(slices_1.selectStoreSettings), display_cals = _e.display_cals, display_tags = _e.display_tags, display_allergens = _e.display_allergens, display_descriptions = _e.display_descriptions;
13
14
  var toggleOption = handlers.toggleOption, incrementOption = handlers.incrementOption, decrementOption = handlers.decrementOption, setOptionQuantity = handlers.setOptionQuantity;
14
15
  var allergenAlerts = [];
15
- var modifier = (0, utils_1.useModifier)(group, option, levels, toggleOption, incrementOption, decrementOption, setOptionQuantity, allergenAlerts);
16
+ var modifier = (0, utils_1.useModifier)(group, option, levels, toggleOption, incrementOption, decrementOption, setOptionQuantity, allergenAlerts, {
17
+ calories: display_cals,
18
+ tags: display_tags,
19
+ allergens: display_allergens,
20
+ modifierDescription: display_descriptions
21
+ });
16
22
  var showNested = function () {
17
23
  // dispatch(setCurrentOption(modifier))
18
24
  var currentOption = {
@@ -10,6 +10,7 @@ interface CategoryItemInterface {
10
10
  navigate: (route: string) => void;
11
11
  children: (props: CategoryItemProps & {
12
12
  displayPrice?: string;
13
+ cals: number | null;
13
14
  }) => ReactNode;
14
15
  }
15
16
  declare const _default: import("react").MemoExoticComponent<({ item, favorite, allergenAlerts, placeholder, index, navigate, children }: CategoryItemInterface) => ReactNode>;
@@ -20,7 +20,7 @@ var CategoryItem = function (_a) {
20
20
  return favorite
21
21
  ? __assign(__assign({}, rehydrateOrderItem(item, favorite.item)), { index: -1 }) : makeOrderItem(item, undefined, soldOut, undefined, hasPoints);
22
22
  }, [favorite, hasPoints, item, soldOut]);
23
- var displayPrice = useMenuItem(orderItem, null, {}, null, undefined).displayPrice;
23
+ var _g = useMenuItem(orderItem, null, {}, null, undefined), displayPrice = _g.displayPrice, displayCals = _g.displayCals;
24
24
  var cartItem = useOrderItem(orderItem, favorite, allergenAlerts, cartCounts, showCals, showTags, showAllergens, showDesc);
25
25
  var handlers = useMemo(function () {
26
26
  var browse = function () {
@@ -39,6 +39,7 @@ var CategoryItem = function (_a) {
39
39
  placeholder: placeholder,
40
40
  index: index,
41
41
  displayPrice: displayPrice,
42
+ cals: displayCals,
42
43
  displayCals: display_cals,
43
44
  navigationType: navigation_page,
44
45
  displayDescription: display_descriptions
@@ -2,15 +2,21 @@ import { __assign } from "tslib";
2
2
  import { useModifier } from '@open-tender/utils';
3
3
  import React from 'react';
4
4
  import { useAppDispatch, useAppSelector } from '../app/hooks';
5
- import { selectKioskApi, selectKioskConfig, setCurrentOption } from '../slices';
5
+ import { selectKioskApi, selectKioskConfig, selectStoreSettings, setCurrentOption } from '../slices';
6
6
  var ItemOption = function (_a) {
7
7
  var handlers = _a.handlers, group = _a.group, option = _a.option, levels = _a.levels, placeholder = _a.placeholder, children = _a.children, _b = _a.configName, configName = _b === void 0 ? 'itemOption' : _b;
8
8
  var dispatch = useAppDispatch();
9
9
  var apiUrl = useAppSelector(selectKioskApi);
10
10
  var _c = useAppSelector(selectKioskConfig), _d = configName, config = _c[_d];
11
+ var _e = useAppSelector(selectStoreSettings), display_cals = _e.display_cals, display_tags = _e.display_tags, display_allergens = _e.display_allergens, display_descriptions = _e.display_descriptions;
11
12
  var toggleOption = handlers.toggleOption, incrementOption = handlers.incrementOption, decrementOption = handlers.decrementOption, setOptionQuantity = handlers.setOptionQuantity;
12
13
  var allergenAlerts = [];
13
- var modifier = useModifier(group, option, levels, toggleOption, incrementOption, decrementOption, setOptionQuantity, allergenAlerts);
14
+ var modifier = useModifier(group, option, levels, toggleOption, incrementOption, decrementOption, setOptionQuantity, allergenAlerts, {
15
+ calories: display_cals,
16
+ tags: display_tags,
17
+ allergens: display_allergens,
18
+ modifierDescription: display_descriptions
19
+ });
14
20
  var showNested = function () {
15
21
  // dispatch(setCurrentOption(modifier))
16
22
  var currentOption = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "0.1.319",
3
+ "version": "0.1.321",
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",