@open-tender/store 1.1.250 → 1.1.251
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/LoyaltyDiscounts.d.ts +12 -0
- package/dist/cjs/components/LoyaltyDiscounts.js +16 -0
- package/dist/cjs/components/index.d.ts +2 -1
- package/dist/cjs/components/index.js +3 -1
- package/dist/esm/components/LoyaltyDiscounts.d.ts +12 -0
- package/dist/esm/components/LoyaltyDiscounts.js +13 -0
- package/dist/esm/components/index.d.ts +2 -1
- package/dist/esm/components/index.js +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Discounts } from '@open-tender/types';
|
|
2
|
+
import { AppliedProps, LoyaltyDiscountProps, LoyaltyDiscountsProps } from '@open-tender/ui';
|
|
3
|
+
import React, { ReactNode } from 'react';
|
|
4
|
+
declare const LoyaltyDiscounts: ({ title, subtitle, discounts, children, DiscountView, AppliedView }: {
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
discounts: Discounts;
|
|
8
|
+
children: (props: LoyaltyDiscountsProps) => ReactNode;
|
|
9
|
+
DiscountView: (props: LoyaltyDiscountProps) => ReactNode;
|
|
10
|
+
AppliedView: (props: AppliedProps) => ReactNode;
|
|
11
|
+
}) => React.ReactNode;
|
|
12
|
+
export default LoyaltyDiscounts;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
+
var hooks_1 = require("../app/hooks");
|
|
6
|
+
var slices_1 = require("../slices");
|
|
7
|
+
var LoyaltyDiscount_1 = tslib_1.__importDefault(require("./LoyaltyDiscount"));
|
|
8
|
+
var LoyaltyDiscounts = function (_a) {
|
|
9
|
+
var title = _a.title, subtitle = _a.subtitle, discounts = _a.discounts, children = _a.children, DiscountView = _a.DiscountView, AppliedView = _a.AppliedView;
|
|
10
|
+
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).rewards;
|
|
11
|
+
var renderDiscount = (0, react_1.useCallback)(function (discount, isLast) { return (react_1.default.createElement(LoyaltyDiscount_1.default, { discount: discount, isLast: isLast, children: DiscountView, AppliedView: AppliedView })); }, [DiscountView, AppliedView]);
|
|
12
|
+
if (!config)
|
|
13
|
+
return null;
|
|
14
|
+
return children({ config: config, title: title, subtitle: subtitle, discounts: discounts, renderDiscount: renderDiscount });
|
|
15
|
+
};
|
|
16
|
+
exports.default = LoyaltyDiscounts;
|
|
@@ -41,6 +41,7 @@ import ItemSize from './ItemSize';
|
|
|
41
41
|
import Keypad from './Keypad';
|
|
42
42
|
import Loader from './Loader';
|
|
43
43
|
import LoyaltyDiscount from './LoyaltyDiscount';
|
|
44
|
+
import LoyaltyDiscounts from './LoyaltyDiscounts';
|
|
44
45
|
import MadeForName from './MadeForName';
|
|
45
46
|
import MadeForNotes from './MadeForNotes';
|
|
46
47
|
import MenuCategory from './MenuCategory';
|
|
@@ -74,4 +75,4 @@ import TagsFilter from './TagsFilter';
|
|
|
74
75
|
import TextArea from './TextArea';
|
|
75
76
|
import UpsellItem from './UpsellItem';
|
|
76
77
|
import Upsells from './Upsells';
|
|
77
|
-
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, CheckoutTable, DisabledModal, Notifications, LoyaltyDiscount };
|
|
78
|
+
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, CheckoutTable, DisabledModal, Notifications, LoyaltyDiscount, LoyaltyDiscounts };
|
|
@@ -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.LoyaltyDiscount = exports.Notifications = exports.DisabledModal = exports.CheckoutTable = 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;
|
|
4
|
+
exports.LoyaltyDiscounts = exports.LoyaltyDiscount = exports.Notifications = exports.DisabledModal = exports.CheckoutTable = 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;
|
|
@@ -89,6 +89,8 @@ var Loader_1 = tslib_1.__importDefault(require("./Loader"));
|
|
|
89
89
|
exports.Loader = Loader_1.default;
|
|
90
90
|
var LoyaltyDiscount_1 = tslib_1.__importDefault(require("./LoyaltyDiscount"));
|
|
91
91
|
exports.LoyaltyDiscount = LoyaltyDiscount_1.default;
|
|
92
|
+
var LoyaltyDiscounts_1 = tslib_1.__importDefault(require("./LoyaltyDiscounts"));
|
|
93
|
+
exports.LoyaltyDiscounts = LoyaltyDiscounts_1.default;
|
|
92
94
|
var MadeForName_1 = tslib_1.__importDefault(require("./MadeForName"));
|
|
93
95
|
exports.MadeForName = MadeForName_1.default;
|
|
94
96
|
var MadeForNotes_1 = tslib_1.__importDefault(require("./MadeForNotes"));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Discounts } from '@open-tender/types';
|
|
2
|
+
import { AppliedProps, LoyaltyDiscountProps, LoyaltyDiscountsProps } from '@open-tender/ui';
|
|
3
|
+
import React, { ReactNode } from 'react';
|
|
4
|
+
declare const LoyaltyDiscounts: ({ title, subtitle, discounts, children, DiscountView, AppliedView }: {
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
discounts: Discounts;
|
|
8
|
+
children: (props: LoyaltyDiscountsProps) => ReactNode;
|
|
9
|
+
DiscountView: (props: LoyaltyDiscountProps) => ReactNode;
|
|
10
|
+
AppliedView: (props: AppliedProps) => ReactNode;
|
|
11
|
+
}) => React.ReactNode;
|
|
12
|
+
export default LoyaltyDiscounts;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { useAppSelector } from '../app/hooks';
|
|
3
|
+
import { selectKioskConfig } from '../slices';
|
|
4
|
+
import { default as LoyaltyDiscountContainer } from './LoyaltyDiscount';
|
|
5
|
+
var LoyaltyDiscounts = function (_a) {
|
|
6
|
+
var title = _a.title, subtitle = _a.subtitle, discounts = _a.discounts, children = _a.children, DiscountView = _a.DiscountView, AppliedView = _a.AppliedView;
|
|
7
|
+
var config = useAppSelector(selectKioskConfig).rewards;
|
|
8
|
+
var renderDiscount = useCallback(function (discount, isLast) { return (React.createElement(LoyaltyDiscountContainer, { discount: discount, isLast: isLast, children: DiscountView, AppliedView: AppliedView })); }, [DiscountView, AppliedView]);
|
|
9
|
+
if (!config)
|
|
10
|
+
return null;
|
|
11
|
+
return children({ config: config, title: title, subtitle: subtitle, discounts: discounts, renderDiscount: renderDiscount });
|
|
12
|
+
};
|
|
13
|
+
export default LoyaltyDiscounts;
|
|
@@ -41,6 +41,7 @@ import ItemSize from './ItemSize';
|
|
|
41
41
|
import Keypad from './Keypad';
|
|
42
42
|
import Loader from './Loader';
|
|
43
43
|
import LoyaltyDiscount from './LoyaltyDiscount';
|
|
44
|
+
import LoyaltyDiscounts from './LoyaltyDiscounts';
|
|
44
45
|
import MadeForName from './MadeForName';
|
|
45
46
|
import MadeForNotes from './MadeForNotes';
|
|
46
47
|
import MenuCategory from './MenuCategory';
|
|
@@ -74,4 +75,4 @@ import TagsFilter from './TagsFilter';
|
|
|
74
75
|
import TextArea from './TextArea';
|
|
75
76
|
import UpsellItem from './UpsellItem';
|
|
76
77
|
import Upsells from './Upsells';
|
|
77
|
-
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, CheckoutTable, DisabledModal, Notifications, LoyaltyDiscount };
|
|
78
|
+
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, CheckoutTable, DisabledModal, Notifications, LoyaltyDiscount, LoyaltyDiscounts };
|
|
@@ -41,6 +41,7 @@ import ItemSize from './ItemSize';
|
|
|
41
41
|
import Keypad from './Keypad';
|
|
42
42
|
import Loader from './Loader';
|
|
43
43
|
import LoyaltyDiscount from './LoyaltyDiscount';
|
|
44
|
+
import LoyaltyDiscounts from './LoyaltyDiscounts';
|
|
44
45
|
import MadeForName from './MadeForName';
|
|
45
46
|
import MadeForNotes from './MadeForNotes';
|
|
46
47
|
import MenuCategory from './MenuCategory';
|
|
@@ -74,4 +75,4 @@ import TagsFilter from './TagsFilter';
|
|
|
74
75
|
import TextArea from './TextArea';
|
|
75
76
|
import UpsellItem from './UpsellItem';
|
|
76
77
|
import Upsells from './Upsells';
|
|
77
|
-
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, CheckoutTable, DisabledModal, Notifications, LoyaltyDiscount };
|
|
78
|
+
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, CheckoutTable, DisabledModal, Notifications, LoyaltyDiscount, LoyaltyDiscounts };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.251",
|
|
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.99",
|
|
65
|
-
"@open-tender/ui": "^0.4.
|
|
65
|
+
"@open-tender/ui": "^0.4.36",
|
|
66
66
|
"@open-tender/utils": "^0.4.73",
|
|
67
67
|
"@reduxjs/toolkit": "^2.0.1",
|
|
68
68
|
"date-fns": "2.30.0",
|