@open-tender/store 1.1.173 → 1.1.175
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/TagsButton.d.ts +6 -0
- package/dist/cjs/components/TagsButton.js +18 -0
- package/dist/cjs/components/TagsFilter.js +4 -3
- package/dist/cjs/components/index.d.ts +4 -1
- package/dist/cjs/components/index.js +7 -1
- package/dist/cjs/slices/tags.d.ts +3 -1
- package/dist/cjs/slices/tags.js +9 -3
- package/dist/esm/components/TagsButton.d.ts +6 -0
- package/dist/esm/components/TagsButton.js +16 -0
- package/dist/esm/components/TagsFilter.js +4 -3
- package/dist/esm/components/index.d.ts +4 -1
- package/dist/esm/components/index.js +4 -1
- package/dist/esm/slices/tags.d.ts +3 -1
- package/dist/esm/slices/tags.js +7 -2
- package/package.json +3 -3
|
@@ -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;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
+
var utils_1 = require("@open-tender/utils");
|
|
4
5
|
var react_1 = tslib_1.__importStar(require("react"));
|
|
5
6
|
var hooks_1 = require("../app/hooks");
|
|
6
7
|
var slices_1 = require("../slices");
|
|
@@ -32,9 +33,9 @@ var TagsFilter = function (_a) {
|
|
|
32
33
|
dispatch((0, slices_1.setSelectedTags)(newSelectedTags));
|
|
33
34
|
};
|
|
34
35
|
var handlers = { onTagSwitch: onTagSwitch, handleSubmit: handleSubmit };
|
|
35
|
-
var renderSwitch = (0, react_1.useCallback)(function (
|
|
36
|
-
return (react_1.default.createElement(Switch_1.default, { key:
|
|
37
|
-
}, [SwitchView]);
|
|
36
|
+
var renderSwitch = (0, react_1.useCallback)(function (tag) {
|
|
37
|
+
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
|
+
}, [SwitchView, localSelectedTags]);
|
|
38
39
|
return children({
|
|
39
40
|
config: config,
|
|
40
41
|
handlers: handlers,
|
|
@@ -63,8 +63,11 @@ import SignInPhone from './SignInPhone';
|
|
|
63
63
|
import SignInQr from './SignInQr';
|
|
64
64
|
import SignUp from './SignUp';
|
|
65
65
|
import SuccessMessage from './SuccessMessage';
|
|
66
|
+
import Switch from './Switch';
|
|
66
67
|
import Tag from './Tag';
|
|
68
|
+
import TagsButton from './TagsButton';
|
|
69
|
+
import TagsFilter from './TagsFilter';
|
|
67
70
|
import TextArea from './TextArea';
|
|
68
71
|
import UpsellItem from './UpsellItem';
|
|
69
72
|
import Upsells from './Upsells';
|
|
70
|
-
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 };
|
|
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.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;
|
|
@@ -133,8 +133,14 @@ var SignUp_1 = tslib_1.__importDefault(require("./SignUp"));
|
|
|
133
133
|
exports.SignUp = SignUp_1.default;
|
|
134
134
|
var SuccessMessage_1 = tslib_1.__importDefault(require("./SuccessMessage"));
|
|
135
135
|
exports.SuccessMessage = SuccessMessage_1.default;
|
|
136
|
+
var Switch_1 = tslib_1.__importDefault(require("./Switch"));
|
|
137
|
+
exports.Switch = Switch_1.default;
|
|
136
138
|
var Tag_1 = tslib_1.__importDefault(require("./Tag"));
|
|
137
139
|
exports.Tag = Tag_1.default;
|
|
140
|
+
var TagsButton_1 = tslib_1.__importDefault(require("./TagsButton"));
|
|
141
|
+
exports.TagsButton = TagsButton_1.default;
|
|
142
|
+
var TagsFilter_1 = tslib_1.__importDefault(require("./TagsFilter"));
|
|
143
|
+
exports.TagsFilter = TagsFilter_1.default;
|
|
138
144
|
var TextArea_1 = tslib_1.__importDefault(require("./TextArea"));
|
|
139
145
|
exports.TextArea = TextArea_1.default;
|
|
140
146
|
var UpsellItem_1 = tslib_1.__importDefault(require("./UpsellItem"));
|
|
@@ -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;
|
package/dist/cjs/slices/tags.js
CHANGED
|
@@ -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,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;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __spreadArray } from "tslib";
|
|
2
|
+
import { capitalize } from '@open-tender/utils';
|
|
2
3
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
3
4
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
4
5
|
import { selectKioskConfig, selectTags, setSelectedTags } from '../slices';
|
|
@@ -30,9 +31,9 @@ var TagsFilter = function (_a) {
|
|
|
30
31
|
dispatch(setSelectedTags(newSelectedTags));
|
|
31
32
|
};
|
|
32
33
|
var handlers = { onTagSwitch: onTagSwitch, handleSubmit: handleSubmit };
|
|
33
|
-
var renderSwitch = useCallback(function (
|
|
34
|
-
return (React.createElement(SwitchContainer, { key:
|
|
35
|
-
}, [SwitchView]);
|
|
34
|
+
var renderSwitch = useCallback(function (tag) {
|
|
35
|
+
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
|
+
}, [SwitchView, localSelectedTags]);
|
|
36
37
|
return children({
|
|
37
38
|
config: config,
|
|
38
39
|
handlers: handlers,
|
|
@@ -63,8 +63,11 @@ import SignInPhone from './SignInPhone';
|
|
|
63
63
|
import SignInQr from './SignInQr';
|
|
64
64
|
import SignUp from './SignUp';
|
|
65
65
|
import SuccessMessage from './SuccessMessage';
|
|
66
|
+
import Switch from './Switch';
|
|
66
67
|
import Tag from './Tag';
|
|
68
|
+
import TagsButton from './TagsButton';
|
|
69
|
+
import TagsFilter from './TagsFilter';
|
|
67
70
|
import TextArea from './TextArea';
|
|
68
71
|
import UpsellItem from './UpsellItem';
|
|
69
72
|
import Upsells from './Upsells';
|
|
70
|
-
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 };
|
|
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 };
|
|
@@ -63,8 +63,11 @@ import SignInPhone from './SignInPhone';
|
|
|
63
63
|
import SignInQr from './SignInQr';
|
|
64
64
|
import SignUp from './SignUp';
|
|
65
65
|
import SuccessMessage from './SuccessMessage';
|
|
66
|
+
import Switch from './Switch';
|
|
66
67
|
import Tag from './Tag';
|
|
68
|
+
import TagsButton from './TagsButton';
|
|
69
|
+
import TagsFilter from './TagsFilter';
|
|
67
70
|
import TextArea from './TextArea';
|
|
68
71
|
import UpsellItem from './UpsellItem';
|
|
69
72
|
import Upsells from './Upsells';
|
|
70
|
-
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 };
|
|
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;
|
package/dist/esm/slices/tags.js
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "1.1.175",
|
|
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,8 +62,8 @@
|
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@emotion/react": "^11.11.1",
|
|
64
64
|
"@open-tender/types": "^0.4.77",
|
|
65
|
-
"@open-tender/ui": "^0.4.
|
|
66
|
-
"@open-tender/utils": "^0.4.
|
|
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",
|