@ikas/loyalty-widget-renderer 1.0.0-alpha.7 → 1.0.0-alpha.72
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/build/assets/badgeLevel1.js +1 -1
- package/build/assets/badgeLevel2.js +1 -1
- package/build/assets/badgeLevel3.js +1 -1
- package/build/assets/badgeLevel4.js +1 -1
- package/build/assets/icons/arrow-right.d.ts +2 -0
- package/build/assets/icons/arrow-right.js +1 -0
- package/build/assets/icons/check-circle-fill.js +1 -1
- package/build/assets/icons/check-circle.d.ts +2 -0
- package/build/assets/icons/check-circle.js +1 -0
- package/build/assets/icons/check.js +1 -1
- package/build/assets/icons/chevron-left.js +1 -1
- package/build/assets/icons/x-close.js +1 -1
- package/build/assets/index.d.ts +5 -0
- package/build/assets/widget-icons/illustraions/approvedChatIllustration.js +1 -1
- package/build/assets/widget-icons/illustraions/bankCoin.js +1 -1
- package/build/assets/widget-icons/illustraions/bigSaleMedal.js +1 -1
- package/build/assets/widget-icons/illustraions/bubbleChatIllustration.js +1 -1
- package/build/assets/widget-icons/illustraions/check-fill.d.ts +2 -0
- package/build/assets/widget-icons/illustraions/check-fill.js +1 -0
- package/build/assets/widget-icons/illustraions/giftIllustration.js +1 -1
- package/build/assets/widget-icons/illustraions/informationCircleIllustration.d.ts +2 -0
- package/build/assets/widget-icons/illustraions/informationCircleIllustration.js +1 -0
- package/build/assets/widget-icons/illustraions/medal.js +1 -1
- package/build/assets/widget-icons/illustraions/shippingBox.js +1 -1
- package/build/assets/widget-icons/illustraions/shoppingCartIllustration.js +1 -1
- package/build/assets/widget-icons/illustraions/tshirtIllustration.js +1 -1
- package/build/assets/widget-icons/illustraions/usersIllustration.js +1 -1
- package/build/assets/widget-icons/normal/bubbleChatDone.js +1 -1
- package/build/assets/widget-icons/normal/commentAdd01.js +1 -1
- package/build/assets/widget-icons/normal/couponPercent.js +1 -1
- package/build/assets/widget-icons/normal/discountTag02.js +1 -1
- package/build/assets/widget-icons/normal/gift.js +1 -1
- package/build/assets/widget-icons/normal/informationCircle.d.ts +2 -0
- package/build/assets/widget-icons/normal/informationCircle.js +1 -0
- package/build/assets/widget-icons/normal/moneyAdd01.js +1 -1
- package/build/assets/widget-icons/normal/packageDelivered.js +1 -1
- package/build/assets/widget-icons/normal/saveMoneyDollar.js +1 -1
- package/build/assets/widget-icons/normal/shoppingBasketAdd02.js +1 -1
- package/build/assets/widget-icons/normal/userAdd01.js +1 -1
- package/build/ext/@babel/runtime/helpers/esm/arrayLikeToArray.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/arrayWithHoles.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/assertThisInitialized.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/classCallCheck.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/createClass.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/defineProperty.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/getPrototypeOf.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/inherits.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/iterableToArray.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/iterableToArrayLimit.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/nonIterableRest.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/objectWithoutProperties.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/possibleConstructorReturn.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/setPrototypeOf.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/slicedToArray.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/toArray.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/toPrimitive.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/toPropertyKey.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/typeof.js +1 -0
- package/build/ext/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +1 -0
- package/build/ext/html-parse-stringify/dist/html-parse-stringify.module.js +1 -0
- package/build/ext/i18next/dist/esm/i18next.js +1 -1
- package/build/ext/react-i18next/dist/es/I18nextProvider.js +1 -1
- package/build/ext/react-i18next/dist/es/Trans.js +1 -0
- package/build/ext/react-i18next/dist/es/context.js +1 -1
- package/build/ext/react-i18next/dist/es/unescape.js +1 -1
- package/build/ext/react-i18next/dist/es/useTranslation.js +1 -1
- package/build/ext/react-i18next/dist/es/utils.js +1 -1
- package/build/ext/tslib/tslib.es6.mjs.js +1 -1
- package/build/ext/void-elements/index.js +1 -0
- package/build/index.d.ts +9 -0
- package/build/index.js +1 -1
- package/build/injector.d.ts +5 -0
- package/build/locales.d.ts +568 -0
- package/build/locales.js +1 -0
- package/build/models/button/index.js +1 -1
- package/build/models/common/index.d.ts +21 -0
- package/build/models/common/index.js +1 -0
- package/build/models/image/index.d.ts +2 -2
- package/build/models/image/index.js +1 -1
- package/build/models/index.d.ts +16 -6
- package/build/models/index.js +1 -1
- package/build/models/loyalty-customer-info/index.d.ts +28 -8
- package/build/models/loyalty-customer-info/index.js +1 -1
- package/build/models/loyalty-program-earning-method/index.d.ts +16 -30
- package/build/models/loyalty-program-earning-method/index.js +1 -1
- package/build/models/loyalty-program-point-history/index.d.ts +3 -3
- package/build/models/loyalty-program-point-history/index.js +1 -1
- package/build/models/loyalty-program-spending-method/index.d.ts +7 -20
- package/build/models/loyalty-program-spending-method/index.js +1 -1
- package/build/models/loyalty-widget/header/header-background/index.d.ts +1 -2
- package/build/models/loyalty-widget/header/header-background/index.js +1 -1
- package/build/models/loyalty-widget/header/index.d.ts +1 -1
- package/build/models/loyalty-widget/header/index.js +1 -1
- package/build/models/loyalty-widget/index.d.ts +4 -2
- package/build/models/loyalty-widget/index.js +1 -1
- package/build/models/loyalty-widget/settings/index.js +1 -1
- package/build/models/loyalty-widget/translations.d.ts +5 -0
- package/build/models/loyalty-widget/translations.js +1 -0
- package/build/models/mini-mode/index.d.ts +7 -0
- package/build/models/mini-mode/index.js +1 -0
- package/build/models/types/index.d.ts +22 -40
- package/build/models/types/index.js +1 -1
- package/build/renderer/components/animate-height/index.d.ts +9 -0
- package/build/renderer/components/animate-height/index.js +1 -0
- package/build/renderer/components/button/index.js +1 -1
- package/build/renderer/components/button/style.d.ts +1 -0
- package/build/renderer/components/button/style.js +1 -1
- package/build/renderer/components/count-up/index.d.ts +7 -0
- package/build/renderer/components/count-up/index.js +1 -0
- package/build/renderer/components/flexible-value-container/index.d.ts +16 -0
- package/build/renderer/components/flexible-value-container/index.js +1 -0
- package/build/renderer/components/loyalty-method-card/index.d.ts +2 -1
- package/build/renderer/components/loyalty-method-card/index.js +1 -1
- package/build/renderer/components/loyalty-method-card/style.d.ts +3 -3
- package/build/renderer/components/loyalty-method-card/style.js +1 -1
- package/build/renderer/components/mini-mode-button/index.d.ts +7 -0
- package/build/renderer/components/mini-mode-button/index.js +1 -0
- package/build/renderer/components/mini-mode-button/style.d.ts +6 -0
- package/build/renderer/components/mini-mode-button/style.js +1 -0
- package/build/renderer/components/mini-mode-description/index.d.ts +7 -0
- package/build/renderer/components/mini-mode-description/index.js +1 -0
- package/build/renderer/components/mini-mode-description/style.d.ts +3 -0
- package/build/renderer/components/mini-mode-description/style.js +1 -0
- package/build/renderer/components/section-title/index.js +1 -1
- package/build/renderer/components/section-title/style.js +1 -1
- package/build/renderer/components/style/icon-wrapper.d.ts +4 -0
- package/build/renderer/components/style/icon-wrapper.js +1 -0
- package/build/renderer/components/style/typography.d.ts +3 -1
- package/build/renderer/components/style/typography.js +1 -1
- package/build/renderer/components/tooltip/index.d.ts +7 -0
- package/build/renderer/components/tooltip/index.js +1 -0
- package/build/renderer/components/tooltip/style.d.ts +4 -0
- package/build/renderer/components/tooltip/style.js +1 -0
- package/build/renderer/components/translation-settings/style.d.ts +9 -0
- package/build/renderer/index.js +1 -1
- package/build/renderer/screens/credit-earning-methods-screen/index.js +1 -1
- package/build/renderer/screens/credit-earning-methods-screen/style.js +1 -1
- package/build/renderer/screens/credit-history-screen/index.js +1 -1
- package/build/renderer/screens/credit-history-screen/style.d.ts +3 -1
- package/build/renderer/screens/credit-history-screen/style.js +1 -1
- package/build/renderer/screens/credit-spending-methods-screen/index.js +1 -1
- package/build/renderer/screens/credit-spending-methods-screen/style.d.ts +3 -1
- package/build/renderer/screens/credit-spending-methods-screen/style.js +1 -1
- package/build/renderer/screens/loyalty-level-screen/index.js +1 -1
- package/build/renderer/screens/loyalty-level-screen/style.d.ts +10 -2
- package/build/renderer/screens/loyalty-level-screen/style.js +1 -1
- package/build/renderer/screens/main-screen/applied-discount/index.d.ts +9 -0
- package/build/renderer/screens/main-screen/applied-discount/index.js +1 -0
- package/build/renderer/screens/main-screen/applied-discount/style.d.ts +14 -0
- package/build/renderer/screens/main-screen/applied-discount/style.js +1 -0
- package/build/renderer/screens/main-screen/cart-warning/index.d.ts +7 -0
- package/build/renderer/screens/main-screen/cart-warning/index.js +1 -0
- package/build/renderer/screens/main-screen/cart-warning/style.d.ts +5 -0
- package/build/renderer/screens/main-screen/cart-warning/style.js +1 -0
- package/build/renderer/screens/main-screen/earning-methods-section/index.d.ts +1 -0
- package/build/renderer/screens/main-screen/earning-methods-section/index.js +1 -1
- package/build/renderer/screens/main-screen/header/auth-user-section/index.js +1 -1
- package/build/renderer/screens/main-screen/header/auth-user-section/style.js +1 -1
- package/build/renderer/screens/main-screen/header/index.js +1 -1
- package/build/renderer/screens/main-screen/header/logo-section/index.js +1 -1
- package/build/renderer/screens/main-screen/header/logo-section/style.d.ts +3 -1
- package/build/renderer/screens/main-screen/header/logo-section/style.js +1 -1
- package/build/renderer/screens/main-screen/header/style.d.ts +11 -5
- package/build/renderer/screens/main-screen/header/style.js +1 -1
- package/build/renderer/screens/main-screen/header/title-section/index.js +1 -1
- package/build/renderer/screens/main-screen/header/title-section/style.js +1 -1
- package/build/renderer/screens/main-screen/header/user-logged-section/index.js +1 -1
- package/build/renderer/screens/main-screen/header/user-logged-section/style.d.ts +1 -0
- package/build/renderer/screens/main-screen/header/user-logged-section/style.js +1 -1
- package/build/renderer/screens/main-screen/index.js +1 -1
- package/build/renderer/screens/main-screen/program-info-section/index.js +1 -1
- package/build/renderer/screens/main-screen/program-info-section/style.d.ts +12 -4
- package/build/renderer/screens/main-screen/program-info-section/style.js +1 -1
- package/build/renderer/screens/main-screen/spending-methods-section/dynamic-slider.js +1 -1
- package/build/renderer/screens/main-screen/spending-methods-section/index.d.ts +1 -0
- package/build/renderer/screens/main-screen/spending-methods-section/index.js +1 -1
- package/build/renderer/screens/main-screen/style.js +1 -1
- package/build/renderer/style.d.ts +18 -2
- package/build/renderer/style.js +1 -1
- package/build/renderer/utils/i18n.d.ts +617 -0
- package/build/renderer/utils/i18n.js +1 -1
- package/build/renderer/utils/locales/de.json.js +1 -0
- package/build/renderer/utils/locales/en.json.js +1 -1
- package/build/renderer/utils/locales/fr.json.js +1 -0
- package/build/renderer/utils/locales/nl.json.js +1 -0
- package/build/renderer/utils/locales/tr.json.js +1 -1
- package/build/renderer/utils/loyalty-details.js +1 -1
- package/build/renderer/utils/object-utils.d.ts +2 -0
- package/build/renderer/utils/object-utils.js +1 -0
- package/build/storefront-widget-script-injector.iife.js +68 -0
- package/build/storefront-widget-script-injector.iife.js.map +1 -0
- package/build/utils.d.ts +6 -4
- package/build/utils.js +1 -1
- package/package.json +26 -13
- package/build/_virtual/_commonjsHelpers.js +0 -1
- package/build/_virtual/index.js +0 -1
- package/build/_virtual/index2.js +0 -1
- package/build/_virtual/index3.js +0 -1
- package/build/_virtual/index4.js +0 -1
- package/build/_virtual/index5.js +0 -1
- package/build/_virtual/index6.js +0 -1
- package/build/_virtual/react-dom.development.js +0 -1
- package/build/_virtual/react-dom.production.min.js +0 -1
- package/build/_virtual/react-is.development.js +0 -1
- package/build/_virtual/react-is.development2.js +0 -1
- package/build/_virtual/react-is.production.js +0 -1
- package/build/_virtual/react-is.production.min.js +0 -1
- package/build/_virtual/react.development.js +0 -1
- package/build/_virtual/react.production.min.js +0 -1
- package/build/_virtual/scheduler.development.js +0 -1
- package/build/_virtual/scheduler.production.min.js +0 -1
- package/build/_virtual/use-sync-external-store-shim.development.js +0 -1
- package/build/_virtual/use-sync-external-store-shim.production.js +0 -1
- package/build/ext/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js +0 -1
- package/build/ext/@emotion/memoize/dist/memoize.browser.esm.js +0 -1
- package/build/ext/@emotion/stylis/dist/stylis.browser.esm.js +0 -1
- package/build/ext/@emotion/unitless/dist/unitless.browser.esm.js +0 -1
- package/build/ext/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +0 -1
- package/build/ext/hoist-non-react-statics/ext/react-is/cjs/react-is.development.js +0 -9
- package/build/ext/hoist-non-react-statics/ext/react-is/cjs/react-is.production.min.js +0 -9
- package/build/ext/hoist-non-react-statics/ext/react-is/index.js +0 -1
- package/build/ext/mobx/dist/mobx.esm.js +0 -1
- package/build/ext/mobx-react/dist/mobxreact.esm.js +0 -1
- package/build/ext/mobx-react-lite/es/ObserverComponent.js +0 -1
- package/build/ext/mobx-react-lite/es/index.js +0 -1
- package/build/ext/mobx-react-lite/es/observer.js +0 -1
- package/build/ext/mobx-react-lite/es/useAsObservableSource.js +0 -1
- package/build/ext/mobx-react-lite/es/useObserver.js +0 -1
- package/build/ext/mobx-react-lite/es/utils/UniversalFinalizationRegistry.js +0 -1
- package/build/ext/mobx-react-lite/es/utils/assertEnvironment.js +0 -1
- package/build/ext/mobx-react-lite/es/utils/observerBatching.js +0 -1
- package/build/ext/mobx-react-lite/es/utils/observerFinalizationRegistry.js +0 -1
- package/build/ext/mobx-react-lite/es/utils/printDebugValue.js +0 -1
- package/build/ext/react/cjs/react.development.js +0 -10
- package/build/ext/react/cjs/react.production.min.js +0 -10
- package/build/ext/react/index.js +0 -1
- package/build/ext/react-dom/cjs/react-dom.development.js +0 -23
- package/build/ext/react-dom/cjs/react-dom.production.min.js +0 -10
- package/build/ext/react-dom/index.js +0 -1
- package/build/ext/react-i18next/dist/es/IcuTransUtils/htmlEntityDecoder.js +0 -1
- package/build/ext/react-i18next/dist/es/defaults.js +0 -1
- package/build/ext/react-i18next/dist/es/i18nInstance.js +0 -1
- package/build/ext/react-i18next/dist/es/initReactI18next.js +0 -1
- package/build/ext/react-is/cjs/react-is.development.js +0 -10
- package/build/ext/react-is/cjs/react-is.production.js +0 -10
- package/build/ext/react-is/index.js +0 -1
- package/build/ext/scheduler/cjs/scheduler.development.js +0 -10
- package/build/ext/scheduler/cjs/scheduler.production.min.js +0 -10
- package/build/ext/scheduler/index.js +0 -1
- package/build/ext/styled-components/dist/styled-components.browser.esm.js +0 -1
- package/build/ext/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -10
- package/build/ext/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -10
- package/build/ext/use-sync-external-store/shim/index.js +0 -1
- package/build/models/base.d.ts +0 -4
- package/build/models/base.js +0 -1
- package/build/models/category/index.d.ts +0 -5
- package/build/models/loyalty-widget/header-background/index.d.ts +0 -9
|
@@ -0,0 +1,568 @@
|
|
|
1
|
+
declare const locales: {
|
|
2
|
+
tr: {
|
|
3
|
+
common: {
|
|
4
|
+
points: string;
|
|
5
|
+
create: string;
|
|
6
|
+
allow: string;
|
|
7
|
+
use: string;
|
|
8
|
+
login: string;
|
|
9
|
+
convert: string;
|
|
10
|
+
};
|
|
11
|
+
main_screen: {
|
|
12
|
+
earningMethodsTitle: string;
|
|
13
|
+
spendingMethodsTitle: string;
|
|
14
|
+
programInfoTitle: string;
|
|
15
|
+
earnPoints: string;
|
|
16
|
+
allRewards: string;
|
|
17
|
+
tiers: string;
|
|
18
|
+
pointHistory: string;
|
|
19
|
+
cartWarning: string;
|
|
20
|
+
appliedDiscount: {
|
|
21
|
+
fixedAmount: string;
|
|
22
|
+
freeShipping: string;
|
|
23
|
+
ratio: string;
|
|
24
|
+
freeProduct: string;
|
|
25
|
+
generic: string;
|
|
26
|
+
remove: string;
|
|
27
|
+
goToCheckout: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
spendingMethods: {
|
|
31
|
+
minPointLimit: string;
|
|
32
|
+
FIXED_AMOUNT: {
|
|
33
|
+
title: string;
|
|
34
|
+
dynamicTitle: string;
|
|
35
|
+
};
|
|
36
|
+
RATIO: {
|
|
37
|
+
title: string;
|
|
38
|
+
};
|
|
39
|
+
FREE_SHIPPING: {
|
|
40
|
+
title: string;
|
|
41
|
+
};
|
|
42
|
+
FREE_PRODUCT: {
|
|
43
|
+
title: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
header: {
|
|
48
|
+
title: string;
|
|
49
|
+
subtitle: string;
|
|
50
|
+
register_title: string;
|
|
51
|
+
registerDescription: string;
|
|
52
|
+
registerButton: string;
|
|
53
|
+
haveAccount: string;
|
|
54
|
+
earnedPoints: string;
|
|
55
|
+
};
|
|
56
|
+
earningMethods: {
|
|
57
|
+
xPoints: string;
|
|
58
|
+
CUSTOMER_REGISTER: {
|
|
59
|
+
title: string;
|
|
60
|
+
};
|
|
61
|
+
CUSTOMER_REVIEW: {
|
|
62
|
+
title: string;
|
|
63
|
+
};
|
|
64
|
+
ENABLE_SUBSCRIPTION: {
|
|
65
|
+
title: string;
|
|
66
|
+
};
|
|
67
|
+
ORDER_CREATE: {
|
|
68
|
+
RECEIVE_POINTS_ON_SPEND: {
|
|
69
|
+
title: string;
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
BASE: {
|
|
73
|
+
title: string;
|
|
74
|
+
descriptionStaticMinimum: string;
|
|
75
|
+
descriptionStaticMaximum: string;
|
|
76
|
+
descriptionOnlyCategory: string;
|
|
77
|
+
descriptionOnlyProduct: string;
|
|
78
|
+
descriptionOnlyBrand: string;
|
|
79
|
+
descriptionOnlyTag: string;
|
|
80
|
+
genericCategory: string;
|
|
81
|
+
genericProduct: string;
|
|
82
|
+
genericBrand: string;
|
|
83
|
+
genericTag: string;
|
|
84
|
+
descriptionWithFilter: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
BUY_PRODUCT: {
|
|
88
|
+
title: string;
|
|
89
|
+
};
|
|
90
|
+
CUSTOMER_SEGMENT: {
|
|
91
|
+
title: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
history: {
|
|
95
|
+
earnedTitle: string;
|
|
96
|
+
spentTitle: string;
|
|
97
|
+
};
|
|
98
|
+
screens: {
|
|
99
|
+
creditEarningMethods: string;
|
|
100
|
+
creditSpendingMethods: string;
|
|
101
|
+
creditHistory: string;
|
|
102
|
+
loyaltyLevel: string;
|
|
103
|
+
loyaltyLevelScreen: {
|
|
104
|
+
afterEarning: string;
|
|
105
|
+
reachNextTier: string;
|
|
106
|
+
allTiersCompleted: string;
|
|
107
|
+
currentTierDescription: string;
|
|
108
|
+
multiplierDescription: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
miniMode: {
|
|
112
|
+
description: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
en: {
|
|
116
|
+
common: {
|
|
117
|
+
points: string;
|
|
118
|
+
create: string;
|
|
119
|
+
allow: string;
|
|
120
|
+
use: string;
|
|
121
|
+
login: string;
|
|
122
|
+
convert: string;
|
|
123
|
+
};
|
|
124
|
+
main_screen: {
|
|
125
|
+
earningMethodsTitle: string;
|
|
126
|
+
spendingMethodsTitle: string;
|
|
127
|
+
programInfoTitle: string;
|
|
128
|
+
earnPoints: string;
|
|
129
|
+
allRewards: string;
|
|
130
|
+
tiers: string;
|
|
131
|
+
pointHistory: string;
|
|
132
|
+
cartWarning: string;
|
|
133
|
+
appliedDiscount: {
|
|
134
|
+
fixedAmount: string;
|
|
135
|
+
freeShipping: string;
|
|
136
|
+
ratio: string;
|
|
137
|
+
freeProduct: string;
|
|
138
|
+
generic: string;
|
|
139
|
+
remove: string;
|
|
140
|
+
goToCheckout: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
spendingMethods: {
|
|
144
|
+
minPointLimit: string;
|
|
145
|
+
FIXED_AMOUNT: {
|
|
146
|
+
title: string;
|
|
147
|
+
dynamicTitle: string;
|
|
148
|
+
};
|
|
149
|
+
RATIO: {
|
|
150
|
+
title: string;
|
|
151
|
+
};
|
|
152
|
+
FREE_SHIPPING: {
|
|
153
|
+
title: string;
|
|
154
|
+
};
|
|
155
|
+
FREE_PRODUCT: {
|
|
156
|
+
title: string;
|
|
157
|
+
description: string;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
header: {
|
|
161
|
+
title: string;
|
|
162
|
+
subtitle: string;
|
|
163
|
+
register_title: string;
|
|
164
|
+
registerDescription: string;
|
|
165
|
+
registerButton: string;
|
|
166
|
+
haveAccount: string;
|
|
167
|
+
earnedPoints: string;
|
|
168
|
+
};
|
|
169
|
+
earningMethods: {
|
|
170
|
+
xPoints: string;
|
|
171
|
+
CUSTOMER_REGISTER: {
|
|
172
|
+
title: string;
|
|
173
|
+
};
|
|
174
|
+
CUSTOMER_REVIEW: {
|
|
175
|
+
title: string;
|
|
176
|
+
};
|
|
177
|
+
ENABLE_SUBSCRIPTION: {
|
|
178
|
+
title: string;
|
|
179
|
+
};
|
|
180
|
+
ORDER_CREATE: {
|
|
181
|
+
RECEIVE_POINTS_ON_SPEND: {
|
|
182
|
+
title: string;
|
|
183
|
+
description: string;
|
|
184
|
+
};
|
|
185
|
+
BASE: {
|
|
186
|
+
title: string;
|
|
187
|
+
descriptionStaticMinimum: string;
|
|
188
|
+
descriptionStaticMaximum: string;
|
|
189
|
+
descriptionOnlyCategory: string;
|
|
190
|
+
descriptionOnlyProduct: string;
|
|
191
|
+
descriptionOnlyBrand: string;
|
|
192
|
+
descriptionOnlyTag: string;
|
|
193
|
+
genericCategory: string;
|
|
194
|
+
genericProduct: string;
|
|
195
|
+
genericBrand: string;
|
|
196
|
+
genericTag: string;
|
|
197
|
+
descriptionWithFilter: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
BUY_PRODUCT: {
|
|
201
|
+
title: string;
|
|
202
|
+
};
|
|
203
|
+
CUSTOMER_SEGMENT: {
|
|
204
|
+
title: string;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
history: {
|
|
208
|
+
earnedTitle: string;
|
|
209
|
+
spentTitle: string;
|
|
210
|
+
};
|
|
211
|
+
screens: {
|
|
212
|
+
creditEarningMethods: string;
|
|
213
|
+
creditSpendingMethods: string;
|
|
214
|
+
creditHistory: string;
|
|
215
|
+
loyaltyLevel: string;
|
|
216
|
+
loyaltyLevelScreen: {
|
|
217
|
+
afterEarning: string;
|
|
218
|
+
reachNextTier: string;
|
|
219
|
+
allTiersCompleted: string;
|
|
220
|
+
currentTierDescription: string;
|
|
221
|
+
multiplierDescription: string;
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
miniMode: {
|
|
225
|
+
description: string;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
de: {
|
|
229
|
+
common: {
|
|
230
|
+
points: string;
|
|
231
|
+
create: string;
|
|
232
|
+
allow: string;
|
|
233
|
+
use: string;
|
|
234
|
+
login: string;
|
|
235
|
+
convert: string;
|
|
236
|
+
};
|
|
237
|
+
main_screen: {
|
|
238
|
+
earningMethodsTitle: string;
|
|
239
|
+
spendingMethodsTitle: string;
|
|
240
|
+
programInfoTitle: string;
|
|
241
|
+
earnPoints: string;
|
|
242
|
+
allRewards: string;
|
|
243
|
+
tiers: string;
|
|
244
|
+
pointHistory: string;
|
|
245
|
+
cartWarning: string;
|
|
246
|
+
appliedDiscount: {
|
|
247
|
+
fixedAmount: string;
|
|
248
|
+
freeShipping: string;
|
|
249
|
+
ratio: string;
|
|
250
|
+
freeProduct: string;
|
|
251
|
+
generic: string;
|
|
252
|
+
remove: string;
|
|
253
|
+
goToCheckout: string;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
spendingMethods: {
|
|
257
|
+
minPointLimit: string;
|
|
258
|
+
FIXED_AMOUNT: {
|
|
259
|
+
title: string;
|
|
260
|
+
dynamicTitle: string;
|
|
261
|
+
};
|
|
262
|
+
RATIO: {
|
|
263
|
+
title: string;
|
|
264
|
+
};
|
|
265
|
+
FREE_SHIPPING: {
|
|
266
|
+
title: string;
|
|
267
|
+
};
|
|
268
|
+
FREE_PRODUCT: {
|
|
269
|
+
title: string;
|
|
270
|
+
description: string;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
header: {
|
|
274
|
+
title: string;
|
|
275
|
+
subtitle: string;
|
|
276
|
+
register_title: string;
|
|
277
|
+
registerDescription: string;
|
|
278
|
+
registerButton: string;
|
|
279
|
+
haveAccount: string;
|
|
280
|
+
earnedPoints: string;
|
|
281
|
+
};
|
|
282
|
+
earningMethods: {
|
|
283
|
+
xPoints: string;
|
|
284
|
+
CUSTOMER_REGISTER: {
|
|
285
|
+
title: string;
|
|
286
|
+
};
|
|
287
|
+
CUSTOMER_REVIEW: {
|
|
288
|
+
title: string;
|
|
289
|
+
};
|
|
290
|
+
ENABLE_SUBSCRIPTION: {
|
|
291
|
+
title: string;
|
|
292
|
+
};
|
|
293
|
+
ORDER_CREATE: {
|
|
294
|
+
RECEIVE_POINTS_ON_SPEND: {
|
|
295
|
+
title: string;
|
|
296
|
+
description: string;
|
|
297
|
+
};
|
|
298
|
+
BASE: {
|
|
299
|
+
title: string;
|
|
300
|
+
descriptionStaticMinimum: string;
|
|
301
|
+
descriptionStaticMaximum: string;
|
|
302
|
+
descriptionOnlyCategory: string;
|
|
303
|
+
descriptionOnlyProduct: string;
|
|
304
|
+
descriptionOnlyBrand: string;
|
|
305
|
+
descriptionOnlyTag: string;
|
|
306
|
+
genericCategory: string;
|
|
307
|
+
genericProduct: string;
|
|
308
|
+
genericBrand: string;
|
|
309
|
+
genericTag: string;
|
|
310
|
+
descriptionWithFilter: string;
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
BUY_PRODUCT: {
|
|
314
|
+
title: string;
|
|
315
|
+
};
|
|
316
|
+
CUSTOMER_SEGMENT: {
|
|
317
|
+
title: string;
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
history: {
|
|
321
|
+
earnedTitle: string;
|
|
322
|
+
spentTitle: string;
|
|
323
|
+
};
|
|
324
|
+
screens: {
|
|
325
|
+
creditEarningMethods: string;
|
|
326
|
+
creditSpendingMethods: string;
|
|
327
|
+
creditHistory: string;
|
|
328
|
+
loyaltyLevel: string;
|
|
329
|
+
loyaltyLevelScreen: {
|
|
330
|
+
afterEarning: string;
|
|
331
|
+
reachNextTier: string;
|
|
332
|
+
allTiersCompleted: string;
|
|
333
|
+
currentTierDescription: string;
|
|
334
|
+
multiplierDescription: string;
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
miniMode: {
|
|
338
|
+
description: string;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
nl: {
|
|
342
|
+
common: {
|
|
343
|
+
points: string;
|
|
344
|
+
create: string;
|
|
345
|
+
allow: string;
|
|
346
|
+
use: string;
|
|
347
|
+
login: string;
|
|
348
|
+
convert: string;
|
|
349
|
+
};
|
|
350
|
+
main_screen: {
|
|
351
|
+
earningMethodsTitle: string;
|
|
352
|
+
spendingMethodsTitle: string;
|
|
353
|
+
programInfoTitle: string;
|
|
354
|
+
earnPoints: string;
|
|
355
|
+
allRewards: string;
|
|
356
|
+
tiers: string;
|
|
357
|
+
pointHistory: string;
|
|
358
|
+
cartWarning: string;
|
|
359
|
+
appliedDiscount: {
|
|
360
|
+
fixedAmount: string;
|
|
361
|
+
freeShipping: string;
|
|
362
|
+
ratio: string;
|
|
363
|
+
freeProduct: string;
|
|
364
|
+
generic: string;
|
|
365
|
+
remove: string;
|
|
366
|
+
goToCheckout: string;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
spendingMethods: {
|
|
370
|
+
minPointLimit: string;
|
|
371
|
+
FIXED_AMOUNT: {
|
|
372
|
+
title: string;
|
|
373
|
+
dynamicTitle: string;
|
|
374
|
+
};
|
|
375
|
+
RATIO: {
|
|
376
|
+
title: string;
|
|
377
|
+
};
|
|
378
|
+
FREE_SHIPPING: {
|
|
379
|
+
title: string;
|
|
380
|
+
};
|
|
381
|
+
FREE_PRODUCT: {
|
|
382
|
+
title: string;
|
|
383
|
+
description: string;
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
header: {
|
|
387
|
+
title: string;
|
|
388
|
+
subtitle: string;
|
|
389
|
+
register_title: string;
|
|
390
|
+
registerDescription: string;
|
|
391
|
+
registerButton: string;
|
|
392
|
+
haveAccount: string;
|
|
393
|
+
earnedPoints: string;
|
|
394
|
+
};
|
|
395
|
+
earningMethods: {
|
|
396
|
+
xPoints: string;
|
|
397
|
+
CUSTOMER_REGISTER: {
|
|
398
|
+
title: string;
|
|
399
|
+
};
|
|
400
|
+
CUSTOMER_REVIEW: {
|
|
401
|
+
title: string;
|
|
402
|
+
};
|
|
403
|
+
ENABLE_SUBSCRIPTION: {
|
|
404
|
+
title: string;
|
|
405
|
+
};
|
|
406
|
+
ORDER_CREATE: {
|
|
407
|
+
RECEIVE_POINTS_ON_SPEND: {
|
|
408
|
+
title: string;
|
|
409
|
+
description: string;
|
|
410
|
+
};
|
|
411
|
+
BASE: {
|
|
412
|
+
title: string;
|
|
413
|
+
descriptionStaticMinimum: string;
|
|
414
|
+
descriptionStaticMaximum: string;
|
|
415
|
+
descriptionOnlyCategory: string;
|
|
416
|
+
descriptionOnlyProduct: string;
|
|
417
|
+
descriptionOnlyBrand: string;
|
|
418
|
+
descriptionOnlyTag: string;
|
|
419
|
+
genericCategory: string;
|
|
420
|
+
genericProduct: string;
|
|
421
|
+
genericBrand: string;
|
|
422
|
+
genericTag: string;
|
|
423
|
+
descriptionWithFilter: string;
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
BUY_PRODUCT: {
|
|
427
|
+
title: string;
|
|
428
|
+
};
|
|
429
|
+
CUSTOMER_SEGMENT: {
|
|
430
|
+
title: string;
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
history: {
|
|
434
|
+
earnedTitle: string;
|
|
435
|
+
spentTitle: string;
|
|
436
|
+
};
|
|
437
|
+
screens: {
|
|
438
|
+
creditEarningMethods: string;
|
|
439
|
+
creditSpendingMethods: string;
|
|
440
|
+
creditHistory: string;
|
|
441
|
+
loyaltyLevel: string;
|
|
442
|
+
loyaltyLevelScreen: {
|
|
443
|
+
afterEarning: string;
|
|
444
|
+
reachNextTier: string;
|
|
445
|
+
allTiersCompleted: string;
|
|
446
|
+
currentTierDescription: string;
|
|
447
|
+
multiplierDescription: string;
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
miniMode: {
|
|
451
|
+
description: string;
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
fr: {
|
|
455
|
+
common: {
|
|
456
|
+
points: string;
|
|
457
|
+
create: string;
|
|
458
|
+
allow: string;
|
|
459
|
+
use: string;
|
|
460
|
+
login: string;
|
|
461
|
+
convert: string;
|
|
462
|
+
};
|
|
463
|
+
main_screen: {
|
|
464
|
+
earningMethodsTitle: string;
|
|
465
|
+
spendingMethodsTitle: string;
|
|
466
|
+
programInfoTitle: string;
|
|
467
|
+
earnPoints: string;
|
|
468
|
+
allRewards: string;
|
|
469
|
+
tiers: string;
|
|
470
|
+
pointHistory: string;
|
|
471
|
+
cartWarning: string;
|
|
472
|
+
appliedDiscount: {
|
|
473
|
+
fixedAmount: string;
|
|
474
|
+
freeShipping: string;
|
|
475
|
+
ratio: string;
|
|
476
|
+
freeProduct: string;
|
|
477
|
+
generic: string;
|
|
478
|
+
remove: string;
|
|
479
|
+
goToCheckout: string;
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
spendingMethods: {
|
|
483
|
+
minPointLimit: string;
|
|
484
|
+
FIXED_AMOUNT: {
|
|
485
|
+
title: string;
|
|
486
|
+
dynamicTitle: string;
|
|
487
|
+
};
|
|
488
|
+
RATIO: {
|
|
489
|
+
title: string;
|
|
490
|
+
};
|
|
491
|
+
FREE_SHIPPING: {
|
|
492
|
+
title: string;
|
|
493
|
+
};
|
|
494
|
+
FREE_PRODUCT: {
|
|
495
|
+
title: string;
|
|
496
|
+
description: string;
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
header: {
|
|
500
|
+
title: string;
|
|
501
|
+
subtitle: string;
|
|
502
|
+
register_title: string;
|
|
503
|
+
registerDescription: string;
|
|
504
|
+
registerButton: string;
|
|
505
|
+
haveAccount: string;
|
|
506
|
+
earnedPoints: string;
|
|
507
|
+
};
|
|
508
|
+
earningMethods: {
|
|
509
|
+
xPoints: string;
|
|
510
|
+
CUSTOMER_REGISTER: {
|
|
511
|
+
title: string;
|
|
512
|
+
};
|
|
513
|
+
CUSTOMER_REVIEW: {
|
|
514
|
+
title: string;
|
|
515
|
+
};
|
|
516
|
+
ENABLE_SUBSCRIPTION: {
|
|
517
|
+
title: string;
|
|
518
|
+
};
|
|
519
|
+
ORDER_CREATE: {
|
|
520
|
+
RECEIVE_POINTS_ON_SPEND: {
|
|
521
|
+
title: string;
|
|
522
|
+
description: string;
|
|
523
|
+
};
|
|
524
|
+
BASE: {
|
|
525
|
+
title: string;
|
|
526
|
+
descriptionStaticMinimum: string;
|
|
527
|
+
descriptionStaticMaximum: string;
|
|
528
|
+
descriptionOnlyCategory: string;
|
|
529
|
+
descriptionOnlyProduct: string;
|
|
530
|
+
descriptionOnlyBrand: string;
|
|
531
|
+
descriptionOnlyTag: string;
|
|
532
|
+
genericCategory: string;
|
|
533
|
+
genericProduct: string;
|
|
534
|
+
genericBrand: string;
|
|
535
|
+
genericTag: string;
|
|
536
|
+
descriptionWithFilter: string;
|
|
537
|
+
};
|
|
538
|
+
};
|
|
539
|
+
BUY_PRODUCT: {
|
|
540
|
+
title: string;
|
|
541
|
+
};
|
|
542
|
+
CUSTOMER_SEGMENT: {
|
|
543
|
+
title: string;
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
history: {
|
|
547
|
+
earnedTitle: string;
|
|
548
|
+
spentTitle: string;
|
|
549
|
+
};
|
|
550
|
+
screens: {
|
|
551
|
+
creditEarningMethods: string;
|
|
552
|
+
creditSpendingMethods: string;
|
|
553
|
+
creditHistory: string;
|
|
554
|
+
loyaltyLevel: string;
|
|
555
|
+
loyaltyLevelScreen: {
|
|
556
|
+
afterEarning: string;
|
|
557
|
+
reachNextTier: string;
|
|
558
|
+
allTiersCompleted: string;
|
|
559
|
+
currentTierDescription: string;
|
|
560
|
+
multiplierDescription: string;
|
|
561
|
+
};
|
|
562
|
+
};
|
|
563
|
+
miniMode: {
|
|
564
|
+
description: string;
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
export default locales;
|
package/build/locales.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./renderer/utils/locales/de.json.js";import e from"./renderer/utils/locales/en.json.js";import o from"./renderer/utils/locales/fr.json.js";import s from"./renderer/utils/locales/nl.json.js";import l from"./renderer/utils/locales/tr.json.js";var n={tr:l,en:e,de:r,nl:s,fr:o};export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as o,observable as l}from
|
|
1
|
+
import{makeObservable as o,observable as l}from"mobx";var r=function(r){var t,i,u,n;void 0===r&&(r={}),this.buttonRadius=null!==(t=r.buttonRadius)&&void 0!==t?t:0,this.bgColor=null!==(i=r.bgColor)&&void 0!==i?i:null,this.textColor=null!==(u=r.textColor)&&void 0!==u?u:null,this.borderColor=null!==(n=r.borderColor)&&void 0!==n?n:null,o(this,{buttonRadius:l,bgColor:l,textColor:l,borderColor:l})};export{r as LoyaltyWidgetButton};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LoyaltyProgramFilterTypeEnum, PeriodTypeEnum } from "../types";
|
|
2
|
+
export declare class LoyaltyProgramPointLimit {
|
|
3
|
+
maxPointLimit: number | null;
|
|
4
|
+
minPointLimit: number | null;
|
|
5
|
+
constructor(data?: Partial<LoyaltyProgramPointLimit>);
|
|
6
|
+
}
|
|
7
|
+
export declare class LoyaltyProgramFilter {
|
|
8
|
+
type: LoyaltyProgramFilterTypeEnum;
|
|
9
|
+
idList: string[];
|
|
10
|
+
constructor(data?: Partial<LoyaltyProgramFilter>);
|
|
11
|
+
}
|
|
12
|
+
export declare class LoyaltyProgramMethodTranslation {
|
|
13
|
+
description: string;
|
|
14
|
+
locale: string;
|
|
15
|
+
constructor(data?: Partial<LoyaltyProgramMethodTranslation>);
|
|
16
|
+
}
|
|
17
|
+
export declare class LoyaltyProgramPeriod {
|
|
18
|
+
period: string | null;
|
|
19
|
+
periodType: PeriodTypeEnum | null;
|
|
20
|
+
constructor(data?: Partial<LoyaltyProgramPeriod>);
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{makeObservable as i,observable as t}from"mobx";import{LoyaltyProgramFilterTypeEnum as o}from"../types/index.js";var n=function(o){void 0===o&&(o={}),this.maxPointLimit=o.maxPointLimit||null,this.minPointLimit=o.minPointLimit||null,i(this,{maxPointLimit:t,minPointLimit:t})},e=function(n){void 0===n&&(n={}),this.type=n.type||o.CATEGORY,this.idList=n.idList||[],i(this,{type:t,idList:t})},s=function(o){void 0===o&&(o={}),this.description=o.description||"",this.locale=o.locale||"",i(this,{description:t,locale:t})},p=function(o){void 0===o&&(o={}),this.period=o.period||null,this.periodType=o.periodType||null,i(this,{period:t,periodType:t})};export{e as LoyaltyProgramFilter,s as LoyaltyProgramMethodTranslation,p as LoyaltyProgramPeriod,n as LoyaltyProgramPointLimit};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { BaseModel } from "models/base";
|
|
2
1
|
import { ImageTypeEnum } from "models/loyalty-widget/types";
|
|
3
2
|
export declare const IMAGE_SIZE = 1080;
|
|
4
|
-
export declare class LoyaltyWidgetImage
|
|
3
|
+
export declare class LoyaltyWidgetImage {
|
|
5
4
|
link: string | null;
|
|
6
5
|
cdnURL: string | null;
|
|
7
6
|
merchantId: string | null;
|
|
8
7
|
imageId: string | null;
|
|
9
8
|
type: ImageTypeEnum;
|
|
9
|
+
maxHeight: number;
|
|
10
10
|
constructor(data: Partial<LoyaltyWidgetImage>);
|
|
11
11
|
get src(): string | undefined;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{makeObservable as t,observable as i,computed as e}from"mobx";import{ImageTypeEnum as n}from"../loyalty-widget/types/index.js";var a=1080,c=function(){function a(a){var c;this.imageId=a.imageId||null,this.link=a.link||null,this.cdnURL=a.cdnURL||null,this.merchantId=a.merchantId||null,this.type=a.type||n.SHOW,this.maxHeight=null!==(c=a.maxHeight)&&void 0!==c?c:50,t(this,{imageId:i,link:i,cdnURL:i,merchantId:i,type:i,maxHeight:i,src:e})}return Object.defineProperty(a.prototype,"src",{get:function(){if(this.imageId)return"".concat(this.cdnURL,"images/").concat(this.merchantId,"/").concat(this.imageId,"/image_").concat(1080,".webp")},enumerable:!1,configurable:!0}),a}();export{a as IMAGE_SIZE,c as LoyaltyWidgetImage};
|
package/build/models/index.d.ts
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { LoyaltyWidgetCallbacks, LoyaltyWidgetScreenTypeEnum, Category, Product, Brand, Tag, LoyaltyProgramTier } from "./types";
|
|
3
|
-
import { LoyaltyProgramSpendingMethod } from "./loyalty-program-spending-method";
|
|
1
|
+
import { LoyaltyCustomerInfo, LoyaltyProgramTier } from "./loyalty-customer-info";
|
|
4
2
|
import { LoyaltyProgramEarningMethod } from "./loyalty-program-earning-method";
|
|
5
|
-
import { LoyaltyCustomerInfo } from "./loyalty-customer-info";
|
|
6
3
|
import { LoyaltyProgramPointHistory } from "./loyalty-program-point-history";
|
|
4
|
+
import { LoyaltyProgramSpendingMethod } from "./loyalty-program-spending-method";
|
|
5
|
+
import { LoyaltyWidget } from "./loyalty-widget";
|
|
6
|
+
import { Brand, Category, LoyaltyWidgetCallbacks, LoyaltyWidgetScreenTypeEnum, Product, Tag, WidgetMode } from "./types";
|
|
7
7
|
export declare class LoyaltyWidgetViewModel {
|
|
8
8
|
selectedScreen: LoyaltyWidgetScreenTypeEnum;
|
|
9
|
+
currentWidgetMode: WidgetMode;
|
|
10
|
+
isMiniModeDescriptionClosed: boolean;
|
|
9
11
|
isLoading: boolean;
|
|
12
|
+
isActionLoading: boolean;
|
|
10
13
|
loyaltyWidget: LoyaltyWidget;
|
|
14
|
+
userRefreshTrigger: number;
|
|
15
|
+
cartRefreshTrigger: number;
|
|
11
16
|
cartId?: string | null;
|
|
17
|
+
ikasEventUser: any | null;
|
|
12
18
|
cdnURL: string;
|
|
13
19
|
merchantId: string;
|
|
14
20
|
storeUrl: string;
|
|
15
21
|
currency: string;
|
|
16
|
-
|
|
22
|
+
isPreviewMode: boolean;
|
|
17
23
|
user: LoyaltyCustomerInfo | null;
|
|
18
24
|
categories: Category[] | null;
|
|
19
25
|
products: Product[];
|
|
@@ -24,5 +30,9 @@ export declare class LoyaltyWidgetViewModel {
|
|
|
24
30
|
tiers: LoyaltyProgramTier[];
|
|
25
31
|
pointHistory: LoyaltyProgramPointHistory[];
|
|
26
32
|
callbacks?: LoyaltyWidgetCallbacks;
|
|
27
|
-
constructor(data: Partial<LoyaltyWidgetViewModel> | undefined, cdnURL: string, merchantId: string, currency: string,
|
|
33
|
+
constructor(data: Partial<LoyaltyWidgetViewModel> | undefined, cdnURL: string, merchantId: string, currency: string, storeURL?: string | null, isPreviewMode?: boolean, callbacks?: LoyaltyWidgetCallbacks);
|
|
34
|
+
get shouldShowSpendingMethods(): boolean;
|
|
35
|
+
setWidgetMode(mode: WidgetMode): void;
|
|
36
|
+
closeMiniModeDescription(): void;
|
|
37
|
+
formatCurrency(price: number): string;
|
|
28
38
|
}
|
package/build/models/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{__assign as e}from'./../ext/tslib/tslib.es6.mjs.js';import{makeObservable as t,observable as i,action as s,computed as r}from"mobx";import{LoyaltyCustomerInfo as o}from"./loyalty-customer-info/index.js";import{LoyaltyProgramEarningMethod as n}from"./loyalty-program-earning-method/index.js";import{LoyaltyProgramSpendingMethod as d}from"./loyalty-program-spending-method/index.js";import{LoyaltyWidget as c}from"./loyalty-widget/index.js";import{WidgetMode as a,LoyaltyWidgetScreenTypeEnum as h}from"./types/index.js";var l=function(){function l(l,g,u,p,M,m,y){void 0===l&&(l={}),this.userRefreshTrigger=0,this.cartRefreshTrigger=0,this.selectedScreen=l.selectedScreen||h.MAIN_SCREEN,this.currentWidgetMode=m?a.WIDGET_MODE:a.MINI_MODE,this.isMiniModeDescriptionClosed=l.isMiniModeDescriptionClosed||!1,this.isLoading=l.isLoading||!1,this.isActionLoading=l.isActionLoading||!1,this.loyaltyWidget=new c(l.loyaltyWidget),this.cdnURL=g,this.merchantId=u,this.storeUrl=M||l.storeUrl||"",this.currency=p,this.isPreviewMode=m||!1,this.cartId=l.cartId||null,this.cartId=l.cartId||null,this.ikasEventUser=l.ikasEventUser||null,this.user=l.user?new o(l.user):null,this.earningMethods=l.earningMethods?l.earningMethods.map(function(e){return new n(e)}):[],this.spendingMethods=l.spendingMethods?l.spendingMethods.map(function(e){return new d(e)}):[],this.tiers=l.tiers?l.tiers:[],this.categories=l.categories?l.categories:[],this.products=l.products?l.products:[],this.brands=l.brands?l.brands:[],this.tags=l.tags?l.tags:[],this.pointHistory=l.pointHistory?l.pointHistory:[],this.callbacks=y||void 0,t(this,e(e({cartId:i},m?{}:{loyaltyWidget:i}),{isLoading:i,isActionLoading:i,cdnURL:i,merchantId:i,storeUrl:i,currency:i,setWidgetMode:s.bound,closeMiniModeDescription:s.bound,formatCurrency:s.bound,selectedScreen:i,currentWidgetMode:i,isMiniModeDescriptionClosed:i,user:i,earningMethods:i,spendingMethods:i,tiers:i,categories:i,products:i,brands:i,tags:i,pointHistory:i,ikasEventUser:i,userRefreshTrigger:i,cartRefreshTrigger:i,shouldShowSpendingMethods:r}))}return Object.defineProperty(l.prototype,"shouldShowSpendingMethods",{get:function(){return!!this.user&&(!(this.user.totalPoint<=0)&&0!==this.spendingMethods.length)},enumerable:!1,configurable:!0}),l.prototype.setWidgetMode=function(e){this.currentWidgetMode=e,e!==a.WIDGET_MODE||this.isPreviewMode||(this.isMiniModeDescriptionClosed=!0)},l.prototype.closeMiniModeDescription=function(){this.isMiniModeDescriptionClosed=!0},l.prototype.formatCurrency=function(e){var t;return(null===(t=this.callbacks)||void 0===t?void 0:t.formatCurrency)?this.callbacks.formatCurrency(e):"".concat(e.toFixed(2)," ").concat(this.currency)},l}();export{l as LoyaltyWidgetViewModel};
|