@open-tender/store 1.1.174 → 1.1.176

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.
@@ -0,0 +1,6 @@
1
+ import { TagsButtonProps } from '@open-tender/ui';
2
+ import { ReactNode } from 'react';
3
+ declare const TagsButton: ({ children }: {
4
+ children: (props: TagsButtonProps) => ReactNode;
5
+ }) => ReactNode;
6
+ export default TagsButton;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var react_1 = require("react");
4
+ var hooks_1 = require("../app/hooks");
5
+ var slices_1 = require("../slices");
6
+ var TagsButton = function (_a) {
7
+ var children = _a.children;
8
+ var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).tag;
9
+ var isTagsModalShown = (0, hooks_1.useAppSelector)(slices_1.selectShowTagsModal);
10
+ var selectedTags = (0, hooks_1.useAppSelector)(slices_1.selectSelectedTags);
11
+ var dispatch = (0, hooks_1.useAppDispatch)();
12
+ var onClick = (0, react_1.useCallback)(function () {
13
+ dispatch((0, slices_1.toggleTagsModal)(!isTagsModalShown));
14
+ }, [dispatch, isTagsModalShown]);
15
+ var handlers = { onClick: onClick };
16
+ return children({ config: config, handlers: handlers, isSelected: selectedTags.length > 0 });
17
+ };
18
+ exports.default = TagsButton;
@@ -10,7 +10,7 @@ var TagsFilter = function (_a) {
10
10
  var children = _a.children, SwitchView = _a.SwitchView;
11
11
  var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).tags;
12
12
  var dispatch = (0, hooks_1.useAppDispatch)();
13
- var _b = (0, hooks_1.useAppSelector)(slices_1.selectTags), tags = _b.entities, selectedTags = _b.selectedTags, loading = _b.loading, error = _b.error;
13
+ var _b = (0, hooks_1.useAppSelector)(slices_1.selectTags), tags = _b.entities, selectedTags = _b.selectedTags, loading = _b.loading, error = _b.error, showTagsModal = _b.showTagsModal;
14
14
  var _c = (0, react_1.useState)([]), localSelectedTags = _c[0], setLocalSelectedTags = _c[1];
15
15
  var isLoading = loading === 'pending';
16
16
  (0, react_1.useEffect)(function () {
@@ -31,8 +31,12 @@ var TagsFilter = function (_a) {
31
31
  return localSelectedTags.includes(tag.tag_id);
32
32
  });
33
33
  dispatch((0, slices_1.setSelectedTags)(newSelectedTags));
34
+ toggleTagsFilterModal();
34
35
  };
35
- var handlers = { onTagSwitch: onTagSwitch, handleSubmit: handleSubmit };
36
+ var toggleTagsFilterModal = function () {
37
+ dispatch((0, slices_1.toggleTagsModal)(!showTagsModal));
38
+ };
39
+ var handlers = { onTagSwitch: onTagSwitch, handleSubmit: handleSubmit, toggleTagsFilterModal: toggleTagsFilterModal };
36
40
  var renderSwitch = (0, react_1.useCallback)(function (tag) {
37
41
  return (react_1.default.createElement(Switch_1.default, { key: tag.tag_id, id: tag.tag_id, children: SwitchView, label: (0, utils_1.capitalize)(tag.name), on: localSelectedTags.includes(tag.tag_id), onChange: function () { return onTagSwitch(tag); }, disabled: false, isRequired: true }));
38
42
  }, [SwitchView, localSelectedTags]);
@@ -65,8 +65,9 @@ import SignUp from './SignUp';
65
65
  import SuccessMessage from './SuccessMessage';
66
66
  import Switch from './Switch';
67
67
  import Tag from './Tag';
68
+ import TagsButton from './TagsButton';
68
69
  import TagsFilter from './TagsFilter';
69
70
  import TextArea from './TextArea';
70
71
  import UpsellItem from './UpsellItem';
71
72
  import Upsells from './Upsells';
72
- export { AccountLoyalty, AccountSection, Allergen, Applied, ButtonLink, CancelButton, Card, Cart, CartButton, CartItem, CartUpsellItem, CartUpsells, CategoryItem, CategoryNav, CategoryNavItem, CategoryNavOther, Checkout, CheckoutCart, CheckoutContent, CheckoutFooter, CheckoutHeader, CheckoutPromoCode, CheckoutTotals, CheckTotals, Discount, ErrorMessage, FavsButton, Header, Ingredients, Input, InputButton, ItemGroup, ItemGroups, ItemOption, ItemOptionSelected, ItemSize, ItemSelections, Keypad, Loader, MadeForName, MadeForNotes, MenuCategory, MenuOther, ModalContent, ModalHeader, NutritionalInfo, Option, OrderCard, OrderDetails, OrderDetailsItem, PointsReward, PointsRewards, PromoCode, Quantity, Reward, Rewards, SignIn, SignInButton, SignInCheckout, SignInOptionsModal, SignInPhone, SignInQr, SignUp, SuccessMessage, Tag, TextArea, UpsellItem, Upsells, IdleModal, TagsFilter, Switch };
73
+ export { AccountLoyalty, AccountSection, Allergen, Applied, ButtonLink, CancelButton, Card, Cart, CartButton, CartItem, CartUpsellItem, CartUpsells, CategoryItem, CategoryNav, CategoryNavItem, CategoryNavOther, Checkout, CheckoutCart, CheckoutContent, CheckoutFooter, CheckoutHeader, CheckoutPromoCode, CheckoutTotals, CheckTotals, Discount, ErrorMessage, FavsButton, Header, Ingredients, Input, InputButton, ItemGroup, ItemGroups, ItemOption, ItemOptionSelected, ItemSize, ItemSelections, Keypad, Loader, MadeForName, MadeForNotes, MenuCategory, MenuOther, ModalContent, ModalHeader, NutritionalInfo, Option, OrderCard, OrderDetails, OrderDetailsItem, PointsReward, PointsRewards, PromoCode, Quantity, Reward, Rewards, SignIn, SignInButton, SignInCheckout, SignInOptionsModal, SignInPhone, SignInQr, SignUp, SuccessMessage, Tag, TextArea, UpsellItem, Upsells, IdleModal, TagsFilter, Switch, TagsButton };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OrderDetailsItem = exports.OrderDetails = exports.OrderCard = exports.Option = exports.NutritionalInfo = exports.ModalHeader = exports.ModalContent = exports.MenuOther = exports.MenuCategory = exports.MadeForNotes = exports.MadeForName = exports.Loader = exports.Keypad = exports.ItemSelections = exports.ItemSize = exports.ItemOptionSelected = exports.ItemOption = exports.ItemGroups = exports.ItemGroup = exports.InputButton = exports.Input = exports.Ingredients = exports.Header = exports.FavsButton = exports.ErrorMessage = exports.Discount = exports.CheckTotals = exports.CheckoutTotals = exports.CheckoutPromoCode = exports.CheckoutHeader = exports.CheckoutFooter = exports.CheckoutContent = exports.CheckoutCart = exports.Checkout = exports.CategoryNavOther = exports.CategoryNavItem = exports.CategoryNav = exports.CategoryItem = exports.CartUpsells = exports.CartUpsellItem = exports.CartItem = exports.CartButton = exports.Cart = exports.Card = exports.CancelButton = exports.ButtonLink = exports.Applied = exports.Allergen = exports.AccountSection = exports.AccountLoyalty = void 0;
4
- exports.Switch = exports.TagsFilter = exports.IdleModal = exports.Upsells = exports.UpsellItem = exports.TextArea = exports.Tag = exports.SuccessMessage = exports.SignUp = exports.SignInQr = exports.SignInPhone = exports.SignInOptionsModal = exports.SignInCheckout = exports.SignInButton = exports.SignIn = exports.Rewards = exports.Reward = exports.Quantity = exports.PromoCode = exports.PointsRewards = exports.PointsReward = void 0;
4
+ exports.TagsButton = exports.Switch = exports.TagsFilter = exports.IdleModal = exports.Upsells = exports.UpsellItem = exports.TextArea = exports.Tag = exports.SuccessMessage = exports.SignUp = exports.SignInQr = exports.SignInPhone = exports.SignInOptionsModal = exports.SignInCheckout = exports.SignInButton = exports.SignIn = exports.Rewards = exports.Reward = exports.Quantity = exports.PromoCode = exports.PointsRewards = exports.PointsReward = void 0;
5
5
  var tslib_1 = require("tslib");
6
6
  var AccountLoyalty_1 = tslib_1.__importDefault(require("./AccountLoyalty"));
7
7
  exports.AccountLoyalty = AccountLoyalty_1.default;
@@ -137,6 +137,8 @@ var Switch_1 = tslib_1.__importDefault(require("./Switch"));
137
137
  exports.Switch = Switch_1.default;
138
138
  var Tag_1 = tslib_1.__importDefault(require("./Tag"));
139
139
  exports.Tag = Tag_1.default;
140
+ var TagsButton_1 = tslib_1.__importDefault(require("./TagsButton"));
141
+ exports.TagsButton = TagsButton_1.default;
140
142
  var TagsFilter_1 = tslib_1.__importDefault(require("./TagsFilter"));
141
143
  exports.TagsFilter = TagsFilter_1.default;
142
144
  var TextArea_1 = tslib_1.__importDefault(require("./TextArea"));
@@ -5,6 +5,7 @@ export interface TagsState {
5
5
  error: RequestError;
6
6
  loading: RequestStatus;
7
7
  selectedTags: Tags;
8
+ showTagsModal: boolean;
8
9
  }
9
10
  export declare enum TagsActionType {
10
11
  FetchTags = "tags/fetchTags"
@@ -19,9 +20,10 @@ export declare const fetchTags: import("@reduxjs/toolkit").AsyncThunk<Tags, void
19
20
  fulfilledMeta?: unknown;
20
21
  rejectedMeta?: unknown;
21
22
  }>;
22
- export declare const resetTags: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tags/resetTags">, setSelectedTags: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "tags/setSelectedTags">;
23
+ export declare const resetTags: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tags/resetTags">, setSelectedTags: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "tags/setSelectedTags">, toggleTagsModal: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "tags/toggleTagsModal">;
23
24
  export declare const selectTags: (state: AppState) => TagsState;
24
25
  export declare const selectSelectedTags: (state: AppState) => Tags;
26
+ export declare const selectShowTagsModal: (state: AppState) => boolean;
25
27
  export declare const selectSelectedTagNames: ((state: {
26
28
  alerts: import("@open-tender/types").Alerts;
27
29
  arrivals: import("./arrivals").ArrivalsState;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.tagsReducer = exports.selectSelectedTagNames = exports.selectSelectedTags = exports.selectTags = exports.setSelectedTags = exports.resetTags = exports.fetchTags = exports.TagsActionType = void 0;
4
+ exports.tagsReducer = exports.selectSelectedTagNames = exports.selectShowTagsModal = exports.selectSelectedTags = exports.selectTags = exports.toggleTagsModal = exports.setSelectedTags = exports.resetTags = exports.fetchTags = exports.TagsActionType = void 0;
5
5
  var tslib_1 = require("tslib");
6
6
  var toolkit_1 = require("@reduxjs/toolkit");
7
7
  var types_1 = require("./types");
@@ -9,7 +9,8 @@ var initialState = {
9
9
  entities: [],
10
10
  error: null,
11
11
  loading: 'idle',
12
- selectedTags: []
12
+ selectedTags: [],
13
+ showTagsModal: false
13
14
  };
14
15
  var TagsActionType;
15
16
  (function (TagsActionType) {
@@ -41,6 +42,9 @@ var tagsSlice = (0, toolkit_1.createSlice)({
41
42
  resetTags: function () { return initialState; },
42
43
  setSelectedTags: function (state, action) {
43
44
  state.selectedTags = action.payload;
45
+ },
46
+ toggleTagsModal: function (state, action) {
47
+ state.showTagsModal = action.payload;
44
48
  }
45
49
  },
46
50
  extraReducers: function (builder) {
@@ -59,11 +63,13 @@ var tagsSlice = (0, toolkit_1.createSlice)({
59
63
  });
60
64
  }
61
65
  });
62
- exports.resetTags = (_a = tagsSlice.actions, _a.resetTags), exports.setSelectedTags = _a.setSelectedTags;
66
+ exports.resetTags = (_a = tagsSlice.actions, _a.resetTags), exports.setSelectedTags = _a.setSelectedTags, exports.toggleTagsModal = _a.toggleTagsModal;
63
67
  var selectTags = function (state) { return state.tags; };
64
68
  exports.selectTags = selectTags;
65
69
  var selectSelectedTags = function (state) { return state.tags.selectedTags; };
66
70
  exports.selectSelectedTags = selectSelectedTags;
71
+ var selectShowTagsModal = function (state) { return state.tags.showTagsModal; };
72
+ exports.selectShowTagsModal = selectShowTagsModal;
67
73
  exports.selectSelectedTagNames = (0, toolkit_1.createSelector)(function (state) {
68
74
  var _a = state.tags, tags = _a.entities, selectedTags = _a.selectedTags;
69
75
  return { tags: tags, selectedTags: selectedTags };
@@ -0,0 +1,6 @@
1
+ import { TagsButtonProps } from '@open-tender/ui';
2
+ import { ReactNode } from 'react';
3
+ declare const TagsButton: ({ children }: {
4
+ children: (props: TagsButtonProps) => ReactNode;
5
+ }) => ReactNode;
6
+ export default TagsButton;
@@ -0,0 +1,16 @@
1
+ import { useCallback } from 'react';
2
+ import { useAppDispatch, useAppSelector } from '../app/hooks';
3
+ import { selectKioskConfig, selectSelectedTags, selectShowTagsModal, toggleTagsModal } from '../slices';
4
+ var TagsButton = function (_a) {
5
+ var children = _a.children;
6
+ var config = useAppSelector(selectKioskConfig).tag;
7
+ var isTagsModalShown = useAppSelector(selectShowTagsModal);
8
+ var selectedTags = useAppSelector(selectSelectedTags);
9
+ var dispatch = useAppDispatch();
10
+ var onClick = useCallback(function () {
11
+ dispatch(toggleTagsModal(!isTagsModalShown));
12
+ }, [dispatch, isTagsModalShown]);
13
+ var handlers = { onClick: onClick };
14
+ return children({ config: config, handlers: handlers, isSelected: selectedTags.length > 0 });
15
+ };
16
+ export default TagsButton;
@@ -2,13 +2,13 @@ import { __spreadArray } from "tslib";
2
2
  import { capitalize } from '@open-tender/utils';
3
3
  import React, { useCallback, useEffect, useState } from 'react';
4
4
  import { useAppDispatch, useAppSelector } from '../app/hooks';
5
- import { selectKioskConfig, selectTags, setSelectedTags } from '../slices';
5
+ import { selectKioskConfig, selectTags, setSelectedTags, toggleTagsModal } from '../slices';
6
6
  import { default as SwitchContainer } from './Switch';
7
7
  var TagsFilter = function (_a) {
8
8
  var children = _a.children, SwitchView = _a.SwitchView;
9
9
  var config = useAppSelector(selectKioskConfig).tags;
10
10
  var dispatch = useAppDispatch();
11
- var _b = useAppSelector(selectTags), tags = _b.entities, selectedTags = _b.selectedTags, loading = _b.loading, error = _b.error;
11
+ var _b = useAppSelector(selectTags), tags = _b.entities, selectedTags = _b.selectedTags, loading = _b.loading, error = _b.error, showTagsModal = _b.showTagsModal;
12
12
  var _c = useState([]), localSelectedTags = _c[0], setLocalSelectedTags = _c[1];
13
13
  var isLoading = loading === 'pending';
14
14
  useEffect(function () {
@@ -29,8 +29,12 @@ var TagsFilter = function (_a) {
29
29
  return localSelectedTags.includes(tag.tag_id);
30
30
  });
31
31
  dispatch(setSelectedTags(newSelectedTags));
32
+ toggleTagsFilterModal();
32
33
  };
33
- var handlers = { onTagSwitch: onTagSwitch, handleSubmit: handleSubmit };
34
+ var toggleTagsFilterModal = function () {
35
+ dispatch(toggleTagsModal(!showTagsModal));
36
+ };
37
+ var handlers = { onTagSwitch: onTagSwitch, handleSubmit: handleSubmit, toggleTagsFilterModal: toggleTagsFilterModal };
34
38
  var renderSwitch = useCallback(function (tag) {
35
39
  return (React.createElement(SwitchContainer, { key: tag.tag_id, id: tag.tag_id, children: SwitchView, label: capitalize(tag.name), on: localSelectedTags.includes(tag.tag_id), onChange: function () { return onTagSwitch(tag); }, disabled: false, isRequired: true }));
36
40
  }, [SwitchView, localSelectedTags]);
@@ -65,8 +65,9 @@ import SignUp from './SignUp';
65
65
  import SuccessMessage from './SuccessMessage';
66
66
  import Switch from './Switch';
67
67
  import Tag from './Tag';
68
+ import TagsButton from './TagsButton';
68
69
  import TagsFilter from './TagsFilter';
69
70
  import TextArea from './TextArea';
70
71
  import UpsellItem from './UpsellItem';
71
72
  import Upsells from './Upsells';
72
- export { AccountLoyalty, AccountSection, Allergen, Applied, ButtonLink, CancelButton, Card, Cart, CartButton, CartItem, CartUpsellItem, CartUpsells, CategoryItem, CategoryNav, CategoryNavItem, CategoryNavOther, Checkout, CheckoutCart, CheckoutContent, CheckoutFooter, CheckoutHeader, CheckoutPromoCode, CheckoutTotals, CheckTotals, Discount, ErrorMessage, FavsButton, Header, Ingredients, Input, InputButton, ItemGroup, ItemGroups, ItemOption, ItemOptionSelected, ItemSize, ItemSelections, Keypad, Loader, MadeForName, MadeForNotes, MenuCategory, MenuOther, ModalContent, ModalHeader, NutritionalInfo, Option, OrderCard, OrderDetails, OrderDetailsItem, PointsReward, PointsRewards, PromoCode, Quantity, Reward, Rewards, SignIn, SignInButton, SignInCheckout, SignInOptionsModal, SignInPhone, SignInQr, SignUp, SuccessMessage, Tag, TextArea, UpsellItem, Upsells, IdleModal, TagsFilter, Switch };
73
+ export { AccountLoyalty, AccountSection, Allergen, Applied, ButtonLink, CancelButton, Card, Cart, CartButton, CartItem, CartUpsellItem, CartUpsells, CategoryItem, CategoryNav, CategoryNavItem, CategoryNavOther, Checkout, CheckoutCart, CheckoutContent, CheckoutFooter, CheckoutHeader, CheckoutPromoCode, CheckoutTotals, CheckTotals, Discount, ErrorMessage, FavsButton, Header, Ingredients, Input, InputButton, ItemGroup, ItemGroups, ItemOption, ItemOptionSelected, ItemSize, ItemSelections, Keypad, Loader, MadeForName, MadeForNotes, MenuCategory, MenuOther, ModalContent, ModalHeader, NutritionalInfo, Option, OrderCard, OrderDetails, OrderDetailsItem, PointsReward, PointsRewards, PromoCode, Quantity, Reward, Rewards, SignIn, SignInButton, SignInCheckout, SignInOptionsModal, SignInPhone, SignInQr, SignUp, SuccessMessage, Tag, TextArea, UpsellItem, Upsells, IdleModal, TagsFilter, Switch, TagsButton };
@@ -65,8 +65,9 @@ import SignUp from './SignUp';
65
65
  import SuccessMessage from './SuccessMessage';
66
66
  import Switch from './Switch';
67
67
  import Tag from './Tag';
68
+ import TagsButton from './TagsButton';
68
69
  import TagsFilter from './TagsFilter';
69
70
  import TextArea from './TextArea';
70
71
  import UpsellItem from './UpsellItem';
71
72
  import Upsells from './Upsells';
72
- export { AccountLoyalty, AccountSection, Allergen, Applied, ButtonLink, CancelButton, Card, Cart, CartButton, CartItem, CartUpsellItem, CartUpsells, CategoryItem, CategoryNav, CategoryNavItem, CategoryNavOther, Checkout, CheckoutCart, CheckoutContent, CheckoutFooter, CheckoutHeader, CheckoutPromoCode, CheckoutTotals, CheckTotals, Discount, ErrorMessage, FavsButton, Header, Ingredients, Input, InputButton, ItemGroup, ItemGroups, ItemOption, ItemOptionSelected, ItemSize, ItemSelections, Keypad, Loader, MadeForName, MadeForNotes, MenuCategory, MenuOther, ModalContent, ModalHeader, NutritionalInfo, Option, OrderCard, OrderDetails, OrderDetailsItem, PointsReward, PointsRewards, PromoCode, Quantity, Reward, Rewards, SignIn, SignInButton, SignInCheckout, SignInOptionsModal, SignInPhone, SignInQr, SignUp, SuccessMessage, Tag, TextArea, UpsellItem, Upsells, IdleModal, TagsFilter, Switch };
73
+ export { AccountLoyalty, AccountSection, Allergen, Applied, ButtonLink, CancelButton, Card, Cart, CartButton, CartItem, CartUpsellItem, CartUpsells, CategoryItem, CategoryNav, CategoryNavItem, CategoryNavOther, Checkout, CheckoutCart, CheckoutContent, CheckoutFooter, CheckoutHeader, CheckoutPromoCode, CheckoutTotals, CheckTotals, Discount, ErrorMessage, FavsButton, Header, Ingredients, Input, InputButton, ItemGroup, ItemGroups, ItemOption, ItemOptionSelected, ItemSize, ItemSelections, Keypad, Loader, MadeForName, MadeForNotes, MenuCategory, MenuOther, ModalContent, ModalHeader, NutritionalInfo, Option, OrderCard, OrderDetails, OrderDetailsItem, PointsReward, PointsRewards, PromoCode, Quantity, Reward, Rewards, SignIn, SignInButton, SignInCheckout, SignInOptionsModal, SignInPhone, SignInQr, SignUp, SuccessMessage, Tag, TextArea, UpsellItem, Upsells, IdleModal, TagsFilter, Switch, TagsButton };
@@ -5,6 +5,7 @@ export interface TagsState {
5
5
  error: RequestError;
6
6
  loading: RequestStatus;
7
7
  selectedTags: Tags;
8
+ showTagsModal: boolean;
8
9
  }
9
10
  export declare enum TagsActionType {
10
11
  FetchTags = "tags/fetchTags"
@@ -19,9 +20,10 @@ export declare const fetchTags: import("@reduxjs/toolkit").AsyncThunk<Tags, void
19
20
  fulfilledMeta?: unknown;
20
21
  rejectedMeta?: unknown;
21
22
  }>;
22
- export declare const resetTags: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tags/resetTags">, setSelectedTags: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "tags/setSelectedTags">;
23
+ export declare const resetTags: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tags/resetTags">, setSelectedTags: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "tags/setSelectedTags">, toggleTagsModal: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "tags/toggleTagsModal">;
23
24
  export declare const selectTags: (state: AppState) => TagsState;
24
25
  export declare const selectSelectedTags: (state: AppState) => Tags;
26
+ export declare const selectShowTagsModal: (state: AppState) => boolean;
25
27
  export declare const selectSelectedTagNames: ((state: {
26
28
  alerts: import("@open-tender/types").Alerts;
27
29
  arrivals: import("./arrivals").ArrivalsState;
@@ -6,7 +6,8 @@ var initialState = {
6
6
  entities: [],
7
7
  error: null,
8
8
  loading: 'idle',
9
- selectedTags: []
9
+ selectedTags: [],
10
+ showTagsModal: false
10
11
  };
11
12
  export var TagsActionType;
12
13
  (function (TagsActionType) {
@@ -38,6 +39,9 @@ var tagsSlice = createSlice({
38
39
  resetTags: function () { return initialState; },
39
40
  setSelectedTags: function (state, action) {
40
41
  state.selectedTags = action.payload;
42
+ },
43
+ toggleTagsModal: function (state, action) {
44
+ state.showTagsModal = action.payload;
41
45
  }
42
46
  },
43
47
  extraReducers: function (builder) {
@@ -56,9 +60,10 @@ var tagsSlice = createSlice({
56
60
  });
57
61
  }
58
62
  });
59
- export var resetTags = (_a = tagsSlice.actions, _a.resetTags), setSelectedTags = _a.setSelectedTags;
63
+ export var resetTags = (_a = tagsSlice.actions, _a.resetTags), setSelectedTags = _a.setSelectedTags, toggleTagsModal = _a.toggleTagsModal;
60
64
  export var selectTags = function (state) { return state.tags; };
61
65
  export var selectSelectedTags = function (state) { return state.tags.selectedTags; };
66
+ export var selectShowTagsModal = function (state) { return state.tags.showTagsModal; };
62
67
  export var selectSelectedTagNames = createSelector(function (state) {
63
68
  var _a = state.tags, tags = _a.entities, selectedTags = _a.selectedTags;
64
69
  return { tags: tags, selectedTags: selectedTags };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "1.1.174",
3
+ "version": "1.1.176",
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,9 +61,9 @@
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@emotion/react": "^11.11.1",
64
- "@open-tender/types": "^0.4.73",
65
- "@open-tender/ui": "^0.4.2",
66
- "@open-tender/utils": "^0.4.45",
64
+ "@open-tender/types": "^0.4.77",
65
+ "@open-tender/ui": "^0.4.10",
66
+ "@open-tender/utils": "^0.4.56",
67
67
  "@reduxjs/toolkit": "^2.0.1",
68
68
  "date-fns": "2.30.0",
69
69
  "date-fns-tz": "^2.0.0",