@ikas/loyalty-widget-renderer 1.0.0-alpha.9 → 1.0.0-alpha.90
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/icons/arrow-right.d.ts +2 -0
- package/build/assets/icons/arrow-right.js +1 -0
- package/build/assets/icons/check-circle.d.ts +2 -0
- package/build/assets/icons/check-circle.js +1 -0
- package/build/assets/index.d.ts +9 -0
- 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/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/refundIllustration.d.ts +2 -0
- package/build/assets/widget-icons/illustraions/refundIllustration.js +1 -0
- package/build/assets/widget-icons/illustraions/scenery.d.ts +2 -0
- package/build/assets/widget-icons/illustraions/scenery.js +1 -0
- package/build/assets/widget-icons/normal/album02.d.ts +2 -0
- package/build/assets/widget-icons/normal/album02.js +1 -0
- 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/refund.d.ts +2 -0
- package/build/assets/widget-icons/normal/refund.js +1 -0
- 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 +703 -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 +34 -7
- package/build/models/index.js +1 -1
- package/build/models/loyalty-customer-info/index.d.ts +29 -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 +18 -3
- package/build/models/loyalty-program-point-history/index.js +1 -1
- package/build/models/loyalty-program-spending-method/index.d.ts +8 -20
- package/build/models/loyalty-program-spending-method/index.js +1 -1
- package/build/models/loyalty-widget/header/header-background/index.d.ts +2 -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 +10 -0
- package/build/models/mini-mode/index.js +1 -0
- package/build/models/types/index.d.ts +61 -42
- 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 +8 -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/product-filter-card/index.d.ts +13 -0
- package/build/renderer/components/product-filter-card/index.js +1 -0
- package/build/renderer/components/product-filter-card/style.d.ts +10 -0
- package/build/renderer/components/product-filter-card/style.js +1 -0
- 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 +8 -2
- 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/gift-product-selection-screen/index.d.ts +9 -0
- package/build/renderer/screens/gift-product-selection-screen/index.js +1 -0
- package/build/renderer/screens/gift-product-selection-screen/style.d.ts +22 -0
- package/build/renderer/screens/gift-product-selection-screen/style.js +1 -0
- package/build/renderer/screens/loyalty-level-screen/index.js +1 -1
- package/build/renderer/screens/loyalty-level-screen/style.d.ts +17 -4
- 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/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 +4 -1
- 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 +19 -3
- package/build/renderer/style.js +1 -1
- package/build/renderer/utils/i18n.d.ts +17 -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.d.ts +8 -0
- 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/renderer/utils/spending-method-utils.d.ts +20 -0
- package/build/renderer/utils/spending-method-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 +41 -4
- package/build/utils.js +1 -1
- package/package.json +23 -11
- package/build/_virtual/index.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/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-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/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
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LoyaltyWidgetViewModel } from "models";
|
|
2
|
+
import type { LoyaltyCustomerInfo, LoyaltyProgramTier } from "../loyalty-customer-info";
|
|
2
3
|
import type { LoyaltyProgramEarningMethod } from "../loyalty-program-earning-method";
|
|
3
|
-
import type { LoyaltyCustomerInfo } from "../loyalty-customer-info";
|
|
4
|
-
import type { LoyaltyWidget } from "../loyalty-widget";
|
|
5
4
|
import type { LoyaltyProgramPointHistory } from "../loyalty-program-point-history";
|
|
5
|
+
import { LoyaltyProgramSpendingMethod } from "../loyalty-program-spending-method";
|
|
6
|
+
import type { LoyaltyWidget } from "../loyalty-widget";
|
|
6
7
|
export declare enum LoyaltyWidgetScreenTypeEnum {
|
|
7
8
|
MAIN_SCREEN = "MAIN_SCREEN",
|
|
8
9
|
CREDIT_SPENDING_METHODS_SCREEN = "CREDIT_SPENDING_METHODS_SCREEN",
|
|
9
10
|
CREDIT_EARNING_METHODS_SCREEN = "CREDIT_EARNING_METHODS_SCREEN",
|
|
10
11
|
CREDIT_HISTORY_SCREEN = "CREDIT_HISTORY_SCREEN",
|
|
11
|
-
LOYALTY_LEVEL_SCREEN = "LOYALTY_LEVEL_SCREEN"
|
|
12
|
+
LOYALTY_LEVEL_SCREEN = "LOYALTY_LEVEL_SCREEN",
|
|
13
|
+
GIFT_PRODUCT_SELECTION_SCREEN = "GIFT_PRODUCT_SELECTION_SCREEN"
|
|
14
|
+
}
|
|
15
|
+
export declare enum WidgetMode {
|
|
16
|
+
MINI_MODE = "MINI_MODE",
|
|
17
|
+
WIDGET_MODE = "WIDGET_MODE"
|
|
12
18
|
}
|
|
13
19
|
export declare enum EarningMethodTypeEnum {
|
|
14
20
|
BUY_PRODUCT = "BUY_PRODUCT",
|
|
@@ -41,18 +47,21 @@ export declare enum PeriodTypeEnum {
|
|
|
41
47
|
WEEK = "WEEK",
|
|
42
48
|
YEAR = "YEAR"
|
|
43
49
|
}
|
|
44
|
-
export declare class LoyaltyProgramPeriod {
|
|
45
|
-
period: string;
|
|
46
|
-
periodType: PeriodTypeEnum;
|
|
47
|
-
constructor(data?: Partial<LoyaltyProgramPeriod>);
|
|
48
|
-
}
|
|
49
50
|
export type Category = {
|
|
50
51
|
id: string;
|
|
51
52
|
name: string;
|
|
52
53
|
};
|
|
54
|
+
export type ProductVariant = {
|
|
55
|
+
id: string;
|
|
56
|
+
mainImageSrc?: string | null;
|
|
57
|
+
variantText?: string | null;
|
|
58
|
+
};
|
|
53
59
|
export type Product = {
|
|
54
60
|
id: string;
|
|
55
61
|
name: string;
|
|
62
|
+
mainImageSrc?: string | null;
|
|
63
|
+
variants?: ProductVariant[];
|
|
64
|
+
url?: string | null;
|
|
56
65
|
};
|
|
57
66
|
export type Brand = {
|
|
58
67
|
id: string;
|
|
@@ -80,66 +89,76 @@ export type StringFilterInput = {
|
|
|
80
89
|
endsWith?: string;
|
|
81
90
|
nendsWith?: string;
|
|
82
91
|
};
|
|
83
|
-
export type LoyaltyProgramTierTranslation = {
|
|
84
|
-
locale: string;
|
|
85
|
-
name: string;
|
|
86
|
-
};
|
|
87
|
-
export type LoyaltyProgramTier = {
|
|
88
|
-
createdAt?: string;
|
|
89
|
-
customerSegmentId?: string;
|
|
90
|
-
deleted: boolean;
|
|
91
|
-
id: string;
|
|
92
|
-
isActive: boolean;
|
|
93
|
-
loyaltyProgramId: string;
|
|
94
|
-
name: string;
|
|
95
|
-
period?: LoyaltyProgramPeriod;
|
|
96
|
-
pointsRequired?: number;
|
|
97
|
-
tierPointMultiplier?: number;
|
|
98
|
-
translations?: LoyaltyProgramTierTranslation[];
|
|
99
|
-
updatedAt?: string;
|
|
100
|
-
};
|
|
101
92
|
export type ListLoyaltyProgramTierInput = {
|
|
102
93
|
id?: StringFilterInput;
|
|
103
|
-
includeDeleted?: boolean;
|
|
104
94
|
loyaltyProgramId?: StringFilterInput;
|
|
105
95
|
};
|
|
106
96
|
export declare enum LoyaltyProgramPointHistoryTypeEnum {
|
|
107
97
|
EARN = "EARN",
|
|
108
|
-
SPEND = "SPEND"
|
|
98
|
+
SPEND = "SPEND",
|
|
99
|
+
REFUND = "REFUND",
|
|
100
|
+
REFILL = "REFILL",
|
|
101
|
+
MANUAL_EARN = "MANUAL_EARN",
|
|
102
|
+
MANUAL_DEDUCT = "MANUAL_DEDUCT"
|
|
109
103
|
}
|
|
110
|
-
export
|
|
111
|
-
eq?: LoyaltyProgramPointHistoryTypeEnum;
|
|
112
|
-
in?: LoyaltyProgramPointHistoryTypeEnum[];
|
|
113
|
-
ne?: LoyaltyProgramPointHistoryTypeEnum;
|
|
114
|
-
nin?: LoyaltyProgramPointHistoryTypeEnum[];
|
|
104
|
+
export interface LoyaltyProgramPointHistoryTypeEnumFilterInput {
|
|
105
|
+
eq?: LoyaltyProgramPointHistoryTypeEnum | null;
|
|
106
|
+
in?: LoyaltyProgramPointHistoryTypeEnum[] | null;
|
|
107
|
+
ne?: LoyaltyProgramPointHistoryTypeEnum | null;
|
|
108
|
+
nin?: LoyaltyProgramPointHistoryTypeEnum[] | null;
|
|
109
|
+
}
|
|
110
|
+
export type PaginationInput = {
|
|
111
|
+
page?: number | null;
|
|
112
|
+
limit?: number | null;
|
|
115
113
|
};
|
|
116
114
|
export type ListLoyaltyProgramPointHistoryInput = {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
type?: LoyaltyProgramPointHistoryTypeEnumFilterInput | null;
|
|
116
|
+
pagination?: PaginationInput | null;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* `listLoyaltyProgramPointHistory` sayfalı cevap dönüyor: kayıtlar `data` içinde,
|
|
120
|
+
* sayfa bilgisi ise `page`/`limit`/`hasNext` ile birlikte geliyor.
|
|
121
|
+
*/
|
|
122
|
+
export type LoyaltyProgramPointHistoryPaginationResponse = {
|
|
123
|
+
count: number;
|
|
124
|
+
data: LoyaltyProgramPointHistory[];
|
|
125
|
+
hasNext: boolean;
|
|
126
|
+
limit: number;
|
|
127
|
+
page: number;
|
|
122
128
|
};
|
|
123
129
|
export type LoyaltyWidgetCallbacks = {
|
|
124
130
|
listSpendingMethodsByCartId: (cartId?: string | null) => Promise<LoyaltyProgramSpendingMethod[]>;
|
|
125
131
|
getLoyaltyCustomerInfo: () => Promise<LoyaltyCustomerInfo | null>;
|
|
126
132
|
listEarningMethods: () => Promise<LoyaltyProgramEarningMethod[]>;
|
|
127
133
|
listLoyaltyProgramTier: (input: ListLoyaltyProgramTierInput) => Promise<LoyaltyProgramTier[]>;
|
|
128
|
-
listLoyaltyProgramPointHistory: (input: ListLoyaltyProgramPointHistoryInput) => Promise<LoyaltyProgramPointHistory[]>;
|
|
134
|
+
listLoyaltyProgramPointHistory: (input: ListLoyaltyProgramPointHistoryInput) => Promise<LoyaltyProgramPointHistoryPaginationResponse | LoyaltyProgramPointHistory[] | null>;
|
|
129
135
|
useLoyaltyPoints: (input: AddLoyaltyToCartInput) => Promise<boolean>;
|
|
130
136
|
removeLoyaltyPointsFromCart: () => Promise<void>;
|
|
131
137
|
getLoyaltyWidget: () => Promise<LoyaltyWidget>;
|
|
132
|
-
onWidgetClose: () => void;
|
|
133
138
|
getProducts: (ids: string[]) => Promise<Product[]>;
|
|
134
139
|
getCategories: (ids: string[]) => Promise<Category[]>;
|
|
135
140
|
getBrands: (ids: string[]) => Promise<Brand[]>;
|
|
136
141
|
getTags: (ids: string[]) => Promise<Tag[]>;
|
|
142
|
+
subscribeToMarketingNotifications: () => Promise<boolean>;
|
|
143
|
+
formatCurrency?: (price: number) => string;
|
|
137
144
|
};
|
|
138
145
|
export type IkasLoyaltyWidgetConfig = {
|
|
139
146
|
cartId?: string | null;
|
|
147
|
+
userId?: string | null;
|
|
140
148
|
cdnURL: string;
|
|
141
149
|
merchantId: string;
|
|
142
150
|
currency: string;
|
|
143
|
-
|
|
151
|
+
storeURL?: string | null;
|
|
144
152
|
callbacks: LoyaltyWidgetCallbacks;
|
|
153
|
+
position?: "fixed" | "absolute";
|
|
154
|
+
isPreviewMode?: boolean;
|
|
155
|
+
onViewModelInitialized?: (viewModel: LoyaltyWidgetViewModel) => void;
|
|
145
156
|
};
|
|
157
|
+
declare global {
|
|
158
|
+
interface Window {
|
|
159
|
+
startIkasLoyaltyWidget?: (config?: IkasLoyaltyWidgetConfig) => void;
|
|
160
|
+
openIkasStorefrontWidget?: () => void;
|
|
161
|
+
closeIkasStorefrontWidget?: () => void;
|
|
162
|
+
ikasLoyaltyWidgetConfig?: IkasLoyaltyWidgetConfig;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var E,R,T,_,N,C,D,A;!function(E){E.MAIN_SCREEN="MAIN_SCREEN",E.CREDIT_SPENDING_METHODS_SCREEN="CREDIT_SPENDING_METHODS_SCREEN",E.CREDIT_EARNING_METHODS_SCREEN="CREDIT_EARNING_METHODS_SCREEN",E.CREDIT_HISTORY_SCREEN="CREDIT_HISTORY_SCREEN",E.LOYALTY_LEVEL_SCREEN="LOYALTY_LEVEL_SCREEN",E.GIFT_PRODUCT_SELECTION_SCREEN="GIFT_PRODUCT_SELECTION_SCREEN"}(E||(E={})),function(E){E.MINI_MODE="MINI_MODE",E.WIDGET_MODE="WIDGET_MODE"}(R||(R={})),function(E){E.BUY_PRODUCT="BUY_PRODUCT",E.CUSTOMER_REGISTER="CUSTOMER_REGISTER",E.CUSTOMER_REVIEW="CUSTOMER_REVIEW",E.CUSTOMER_SEGMENT="CUSTOMER_SEGMENT",E.ENABLE_SUBSCRIPTION="ENABLE_SUBSCRIPTION",E.ORDER_CREATE="ORDER_CREATE"}(T||(T={})),function(E){E.DYNAMIC_ORDER_AMOUNT="DYNAMIC_ORDER_AMOUNT",E.DYNAMIC_ORDER_QUANTITY="DYNAMIC_ORDER_QUANTITY",E.STATIC="STATIC"}(_||(_={})),function(E){E.FIXED_AMOUNT="FIXED_AMOUNT",E.FREE_PRODUCT="FREE_PRODUCT",E.FREE_SHIPPING="FREE_SHIPPING",E.RATIO="RATIO"}(N||(N={})),function(E){E.CATEGORY="CATEGORY",E.DYNAMIC_CATEGORY="DYNAMIC_CATEGORY",E.PRODUCT_AND_VARIANT="PRODUCT_AND_VARIANT",E.PRODUCT_BRAND="PRODUCT_BRAND",E.PRODUCT_TAG="PRODUCT_TAG"}(C||(C={})),function(E){E.MONTH="MONTH",E.WEEK="WEEK",E.YEAR="YEAR"}(D||(D={})),function(E){E.EARN="EARN",E.SPEND="SPEND",E.REFUND="REFUND",E.REFILL="REFILL",E.MANUAL_EARN="MANUAL_EARN",E.MANUAL_DEDUCT="MANUAL_DEDUCT"}(A||(A={}));export{T as EarningMethodTypeEnum,C as LoyaltyProgramFilterTypeEnum,N as LoyaltyProgramMethodSpendingTypeEnum,_ as LoyaltyProgramPointEarningTypeEnum,A as LoyaltyProgramPointHistoryTypeEnum,E as LoyaltyWidgetScreenTypeEnum,D as PeriodTypeEnum,R as WidgetMode};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__makeTemplateObject as e}from'./../../../ext/tslib/tslib.es6.mjs.js';import t,{useRef as n,useState as r,useEffect as o}from"react";import i from"styled-components";var a,s=i.div(a||(a=e(["\n height: ",";\n overflow: hidden;\n transition: height ","ms ease-in-out;\n"],["\n height: ",";\n overflow: hidden;\n transition: height ","ms ease-in-out;\n"])),function(e){var t=e.$height;return"auto"===t?"auto":"".concat(t,"px")},function(e){return e.$duration}),u=function(e){var i=e.children,a=e.duration,u=void 0===a?300:a,c=e.className,l=e.style,d=n(null),h=r("auto"),f=h[0],m=h[1];return o(function(){if(d.current){var e=new ResizeObserver(function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];r.target===d.current&&m(r.borderBoxSize[0].blockSize)}});return e.observe(d.current),function(){e.disconnect()}}},[]),t.createElement(s,{$height:f,$duration:u,className:c,style:l},t.createElement("div",{ref:d},i))};export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"react";import{Button as t,Loader as
|
|
1
|
+
import{observer as o}from"mobx-react";import e from"react";import{Button as t,LoaderWrapper as r,Loader as i}from"./style.js";var l=o(function(o){var l=o.children,d=o.onClick,a=o.button,n=o.fontSize,s=o.paddingSize,b=o.fullWidth,m=void 0!==b&&b,u=o.disabled,c=void 0!==u&&u,f=o.isLoading,C=void 0!==f&&f;return e.createElement(t,{onClick:d,fullWidth:m,fontSize:n,paddingSize:s,borderRadius:a.buttonRadius,bgColor:a.bgColor,textColor:a.textColor,borderColor:a.borderColor,disabled:c||C},e.createElement(r,{className:C?"visible":""},e.createElement(i,null)),l)});export{l as default};
|
|
@@ -11,5 +11,6 @@ type ButtonProps = {
|
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
};
|
|
13
13
|
export declare const Button: import("styled-components").StyledComponent<"button", any, ButtonProps, never>;
|
|
14
|
+
export declare const LoaderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
15
|
export declare const Loader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
15
16
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import t,{keyframes as e}from"styled-components";import{textXSMedium as r,textSM as i,textSMMedium as o,textMDMedium as a,textLGSemiBold as d,displayXSSemiBold as s}from"../style/typography.js";var p,l,u,c,m={textXSMedium:r,textSM:i,textSMMedium:o,textMDMedium:a,textLGSemiBold:d,displayXSSemiBold:s},x={small:"8px",medium:"10px 16px"},g=t.button(p||(p=n(["\n border: none;\n cursor: ",";\n transition: all 0.2s ease;\n opacity: ",";\n /* pointer-events removed to allow cursor: not-allowed */\n\n ","\n\n padding: ",";\n border-radius: ","px;\n width: ",";\n background-color: ",";\n color: ",";\n border: ",";\n\n display: flex;\n align-items: center;\n justify-content: center;\n justify-content: center;\n /* gap: 8px; Removed to handle spacing via LoaderWrapper transition */\n\n &:hover {\n opacity: ",";\n }\n"],["\n border: none;\n cursor: ",";\n transition: all 0.2s ease;\n opacity: ",";\n /* pointer-events removed to allow cursor: not-allowed */\n\n ","\n\n padding: ",";\n border-radius: ","px;\n width: ",";\n background-color: ",";\n color: ",";\n border: ",";\n\n display: flex;\n align-items: center;\n justify-content: center;\n justify-content: center;\n /* gap: 8px; Removed to handle spacing via LoaderWrapper transition */\n\n &:hover {\n opacity: ",";\n }\n"])),function(n){return n.disabled?"not-allowed":"pointer"},function(n){return n.disabled?.5:1},function(n){return m[n.fontSize]},function(n){return x[n.paddingSize]},function(n){return n.borderRadius},function(n){return n.fullWidth?"100%":"auto"},function(n){var t;return null!==(t=n.bgColor)&&void 0!==t?t:"transparent"},function(n){var t;return null!==(t=n.textColor)&&void 0!==t?t:"inherit"},function(n){return n.borderColor?"1px solid ".concat(n.borderColor):"none"},function(n){return n.disabled?.5:.9}),h=e(l||(l=n(["\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n"],["\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n"]))),f=t.div(u||(u=n(["\n display: flex;\n align-items: center;\n overflow: hidden;\n max-width: 0;\n opacity: 0;\n margin-right: 0;\n transition:\n max-width 0.3s ease-in-out,\n opacity 0.3s ease-in-out,\n margin-right 0.3s ease-in-out;\n\n &.visible {\n max-width: 20px; /* 14px width + extra space */\n opacity: 1;\n margin-right: 4px; /* Adjust gap here instead of parent gap */\n }\n"],["\n display: flex;\n align-items: center;\n overflow: hidden;\n max-width: 0;\n opacity: 0;\n margin-right: 0;\n transition:\n max-width 0.3s ease-in-out,\n opacity 0.3s ease-in-out,\n margin-right 0.3s ease-in-out;\n\n &.visible {\n max-width: 20px; /* 14px width + extra space */\n opacity: 1;\n margin-right: 4px; /* Adjust gap here instead of parent gap */\n }\n"]))),b=t.div(c||(c=n(["\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid currentColor;\n border-radius: 50%;\n width: 14px;\n height: 14px;\n min-width: 14px;\n animation: "," 1s linear infinite;\n"],["\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid currentColor;\n border-radius: 50%;\n width: 14px;\n height: 14px;\n min-width: 14px;\n animation: "," 1s linear infinite;\n"])),h);export{g as Button,b as Loader,f as LoaderWrapper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r,{useState as n,useRef as t,useEffect as e}from"react";var u=function(u){var a=u.end,c=u.duration,i=void 0===c?1e3:c,o=n(a),m=o[0],l=o[1],f=t(null),v=t(a);return e(function(){var r;v.current=m,f.current=null;var n=function(t){f.current||(f.current=t);var e=Math.min((t-f.current)/i,1),u=1-Math.pow(1-e,4),c=Math.round(v.current+(a-v.current)*u);l(c),e<1&&(r=requestAnimationFrame(n))};return r=requestAnimationFrame(n),function(){return cancelAnimationFrame(r)}},[a,i]),r.createElement(r.Fragment,null,m)};export{u as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type FlexibleValueContainerProps = {
|
|
3
|
+
children: React.ReactNode | ((isWrapped: boolean) => React.ReactNode);
|
|
4
|
+
gap?: number;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* A container that switches flex-direction to 'column' if its children wrap
|
|
10
|
+
* when in 'row' layout.
|
|
11
|
+
*
|
|
12
|
+
* Uses a hidden clone ("Detector") to constantly monitor if a standard row layout
|
|
13
|
+
* would wrap given the current width constraint.
|
|
14
|
+
*/
|
|
15
|
+
export declare const FlexibleValueContainer: React.FC<FlexibleValueContainerProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import e,{useRef as t,useState as i,useLayoutEffect as r}from"react";import o from"styled-components";var a,s,p=o.div(a||(a=n(["\n display: flex;\n flex-direction: ",";\n align-items: ",";\n gap: ","px;\n flex-wrap: wrap;\n position: relative;\n width: 100%; /* Ensure it takes available width to properly constrain the detector */\n"],["\n display: flex;\n flex-direction: ",";\n align-items: ",";\n gap: ","px;\n flex-wrap: wrap;\n position: relative;\n width: 100%; /* Ensure it takes available width to properly constrain the detector */\n"])),function(n){return n.$isWrapped?"column":"row"},function(n){return n.$isWrapped?"flex-start":"center"},function(n){return n.$gap}),l=o.div(s||(s=n(["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: ","px;\n align-items: center;\n\n /* Positioning to match the container's width constraint */\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n\n /* Hide from view and interaction */\n visibility: hidden;\n pointer-events: none;\n z-index: -100;\n opacity: 0;\n"],["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: ","px;\n align-items: center;\n\n /* Positioning to match the container's width constraint */\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n\n /* Hide from view and interaction */\n visibility: hidden;\n pointer-events: none;\n z-index: -100;\n opacity: 0;\n"])),function(n){return n.$gap}),c=function(n){var o=n.children,a=n.gap,s=void 0===a?6:a,c=n.className,d=n.style,f=t(null),u=i(!1),m=u[0],v=u[1];r(function(){var n=function(){if(f.current){var n=f.current,e=Array.from(n.children);if(e.length<2)v(!1);else{var t=e[0].offsetTop,i=e[e.length-1].offsetTop;v(i>t+2)}}};n();var e=new ResizeObserver(n);return f.current&&e.observe(f.current),function(){return e.disconnect()}},[o]);var w="function"==typeof o?o(m):o,h="function"==typeof o?o(!1):o;return e.createElement(p,{className:c,style:d,$isWrapped:m,$gap:s},w,e.createElement(l,{ref:f,$gap:s,"aria-hidden":"true"},h))};export{c as FlexibleValueContainer};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { WidgetIconTypeEnum } from "models/loyalty-widget/types";
|
|
3
2
|
import { LoyaltyWidgetButton } from "models/button";
|
|
3
|
+
import { WidgetIconTypeEnum } from "models/loyalty-widget/types";
|
|
4
4
|
export type LoyaltyMethodCardProps = {
|
|
5
5
|
title: string;
|
|
6
6
|
description: string | React.ReactNode;
|
|
@@ -8,6 +8,7 @@ export type LoyaltyMethodCardProps = {
|
|
|
8
8
|
action?: {
|
|
9
9
|
text: string;
|
|
10
10
|
onClick: () => void;
|
|
11
|
+
loading?: boolean;
|
|
11
12
|
};
|
|
12
13
|
isCompleted?: boolean;
|
|
13
14
|
mode: "card" | "accordion";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{observer as e}from"mobx-react";import t,{useState as n}from"react";import{CheckCircleFill as i}from"../../../assets/icons/check-circle-fill.js";import{ChevronLeft as o}from"../../../assets/icons/chevron-left.js";import{WidgetIconTypeEnum as l}from"../../../models/loyalty-widget/types/index.js";import r from"../button/index.js";import{Container as c,Header as a,IconWrapper as m,Content as d,Title as s,Description as p,ArrowButton as u,AccordionWrapper as f,AccordionInner as E}from"./style.js";var g=e(function(e){var g=e.title,y=e.description,x=e.icon,$=e.action,b=e.isCompleted,v=e.mode,C=e.children,j=e.padding,k=e.settings,O=n(!1),h=O[0],w=O[1],I=!b&&(null==$?void 0:$.text)&&(null==$?void 0:$.onClick);return t.createElement(c,{$borderRadius:k.borderRadius,$isCompleted:b,$padding:j},t.createElement(a,{onClick:function(){"accordion"===v&&w(!h)},style:{cursor:"accordion"===v?"pointer":"default"}},k.widgetIconType!==l.NONE&&t.createElement(m,{$iconType:k.widgetIconType},x),t.createElement(d,null,t.createElement(s,null,g),t.createElement(p,null,y)),"card"===v?t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},b&&t.createElement(i,null),I&&t.createElement(r,{button:k.button,paddingSize:"small",fontSize:"textSMMedium",onClick:$.onClick,isLoading:$.loading},$.text)):t.createElement(u,{$isOpen:h},t.createElement(o,null))),"accordion"===v&&t.createElement(f,{$isOpen:h},t.createElement(E,{$isOpen:h},C)))});export{g as default};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { WidgetIconTypeEnum } from "models/loyalty-widget/types";
|
|
2
|
+
export declare const ArrowButton: import("styled-components").StyledComponent<"button", any, {
|
|
3
|
+
$isOpen: boolean;
|
|
4
|
+
}, never>;
|
|
2
5
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {
|
|
3
6
|
$borderRadius: number;
|
|
4
7
|
$isCompleted?: boolean;
|
|
@@ -17,6 +20,3 @@ export declare const AccordionWrapper: import("styled-components").StyledCompone
|
|
|
17
20
|
export declare const AccordionInner: import("styled-components").StyledComponent<"div", any, {
|
|
18
21
|
$isOpen: boolean;
|
|
19
22
|
}, never>;
|
|
20
|
-
export declare const ArrowButton: import("styled-components").StyledComponent<"button", any, {
|
|
21
|
-
$isOpen: boolean;
|
|
22
|
-
}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import{WidgetIconTypeEnum as
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import e,{css as o}from"styled-components";import{WidgetIconTypeEnum as r}from"../../../models/loyalty-widget/types/index.js";import{iconWrapperShape as t}from"../style/icon-wrapper.js";import{textSMMedium as i,textSM as a}from"../style/typography.js";var s,d,p,l,f,c,x,u,g,b,m,y=e.button(s||(s=n(["\n border: none;\n background: none;\n cursor: pointer;\n transform: rotate(",");\n transition:\n transform 0.2s ease-in-out,\n color 0.2s ease-in-out;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #9aa4b2;\n"],["\n border: none;\n background: none;\n cursor: pointer;\n transform: rotate(",");\n transition:\n transform 0.2s ease-in-out,\n color 0.2s ease-in-out;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #9aa4b2;\n"])),function(n){return n.$isOpen?"270deg":"180deg"}),h=e.div(d||(d=n(["\n display: flex;\n padding: ",";\n flex-direction: column;\n align-items: flex-start;\n align-self: stretch;\n border-radius: ","px;\n border: 1px solid #eef2f6;\n background: #fff;\n opacity: ",";\n user-select: none;\n transition: border-color 0.2s ease-in-out;\n\n &:hover {\n border-color: #cdd5df;\n\n "," {\n color: #4b5565;\n }\n }\n"],["\n display: flex;\n padding: ",";\n flex-direction: column;\n align-items: flex-start;\n align-self: stretch;\n border-radius: ","px;\n border: 1px solid #eef2f6;\n background: #fff;\n opacity: ",";\n user-select: none;\n transition: border-color 0.2s ease-in-out;\n\n &:hover {\n border-color: #cdd5df;\n\n "," {\n color: #4b5565;\n }\n }\n"])),function(n){return n.$padding||"16px 14px"},function(n){return n.$borderRadius},function(n){return n.$isCompleted?"0.8":"1"},y),v=e.div(p||(p=n(["\n display: flex;\n align-items: center;\n gap: 12px;\n align-self: stretch;\n width: 100%;\n"],["\n display: flex;\n align-items: center;\n gap: 12px;\n align-self: stretch;\n width: 100%;\n"]))),w=e.div(c||(c=n(["\n ","\n\n ","\n\n ","\n"],["\n ","\n\n ","\n\n ","\n"])),t,function(e){return e.$iconType===r.ILLUSTRATION&&o(l||(l=n(["\n border-radius: 40px;\n background: #f6f6f6;\n "],["\n border-radius: 40px;\n background: #f6f6f6;\n "])))},function(e){return e.$iconType===r.NORMAL&&o(f||(f=n(["\n border-radius: 8px;\n border: 1px solid #e3e8ef;\n background: #fff;\n box-shadow:\n 0 -3px 1px 0 rgba(238, 242, 246, 0.5) inset,\n 0 4px 1px 0 rgba(38, 69, 109, 0),\n 0 2px 1px 0 rgba(38, 69, 109, 0.01),\n 0 1px 1px 0 rgba(38, 69, 109, 0.02),\n 0 1px 1px 0 rgba(38, 69, 109, 0.03);\n\n svg {\n color: #4b5565;\n }\n "],["\n border-radius: 8px;\n border: 1px solid #e3e8ef;\n background: #fff;\n box-shadow:\n 0 -3px 1px 0 rgba(238, 242, 246, 0.5) inset,\n 0 4px 1px 0 rgba(38, 69, 109, 0),\n 0 2px 1px 0 rgba(38, 69, 109, 0.01),\n 0 1px 1px 0 rgba(38, 69, 109, 0.02),\n 0 1px 1px 0 rgba(38, 69, 109, 0.03);\n\n svg {\n color: #4b5565;\n }\n "])))}),$=e.div(x||(x=n(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n flex: 1 0 0;\n"],["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n flex: 1 0 0;\n"]))),k=e.div(u||(u=n(["\n color: #121926;\n ","\n"],["\n color: #121926;\n ","\n"])),i),O=e.div(g||(g=n(["\n color: #364152;\n ","\n"],["\n color: #364152;\n ","\n"])),a),j=e.div(b||(b=n(["\n display: grid;\n grid-template-rows: ",";\n transition: grid-template-rows 300ms ease-in-out;\n width: 100%;\n"],["\n display: grid;\n grid-template-rows: ",";\n transition: grid-template-rows 300ms ease-in-out;\n width: 100%;\n"])),function(n){return n.$isOpen?"1fr":"0fr"}),T=e.div(m||(m=n(["\n overflow: hidden;\n color: #4b5565;\n ","\n\n /* Spacing: We need 20px from header. */\n padding-top: ",";\n\n /* Optional: fade content in/out */\n opacity: ",";\n transition:\n opacity 300ms ease-in-out,\n padding-top 300ms ease-in-out;\n"],["\n overflow: hidden;\n color: #4b5565;\n ","\n\n /* Spacing: We need 20px from header. */\n padding-top: ",";\n\n /* Optional: fade content in/out */\n opacity: ",";\n transition:\n opacity 300ms ease-in-out,\n padding-top 300ms ease-in-out;\n"])),a,function(n){return n.$isOpen?"20px":"0px"},function(n){return n.$isOpen?1:0});export{T as AccordionInner,j as AccordionWrapper,y as ArrowButton,h as Container,$ as Content,O as Description,v as Header,w as IconWrapper,k as Title};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{observer as e}from"mobx-react";import o from"react";import'./../../../ext/react-i18next/dist/es/context.js';import{useTranslation as t}from'./../../../ext/react-i18next/dist/es/useTranslation.js';import{ImageTypeEnum as r}from"../../../models/loyalty-widget/types/index.js";import{WidgetMode as i}from"../../../models/types/index.js";import{Container as l,Logo as m,Emoji as s}from"./style.js";var n=e(function(e){var n=e.viewModel,a=t().t,d=n.loyaltyWidget.miniMode,c=d.logo.type===r.SHOW&&!!d.logo.src;return o.createElement(l,{$hasImg:c,$bgColor:d.bgColor||void 0,onClick:function(e){e.stopPropagation(),n.setWidgetMode(i.WIDGET_MODE)}},c?o.createElement(m,{src:d.logo.src,alt:a("miniMode.altText")}):o.createElement(s,null,d.emoji))});export{n as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
$hasImg: boolean;
|
|
3
|
+
$bgColor?: string;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const Logo: import("styled-components").StyledComponent<"img", any, {}, never>;
|
|
6
|
+
export declare const Emoji: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import e,{css as t}from"styled-components";var r,o,i,s,p=e.div(o||(o=n(["\n display: flex;\n width: 60px;\n height: 60px;\n padding: ",";\n justify-content: center;\n align-items: center;\n border-radius: 60px;\n overflow: hidden;\n\n box-shadow:\n 0 12px 16px -4px rgba(16, 24, 40, 0.08),\n 0 4px 6px -2px rgba(19, 19, 24, 0.03);\n cursor: pointer;\n transition: transform 0.2s ease-in-out;\n\n &:hover {\n transform: scale(1.05);\n }\n\n ","\n"],["\n display: flex;\n width: 60px;\n height: 60px;\n padding: ",";\n justify-content: center;\n align-items: center;\n border-radius: 60px;\n overflow: hidden;\n\n box-shadow:\n 0 12px 16px -4px rgba(16, 24, 40, 0.08),\n 0 4px 6px -2px rgba(19, 19, 24, 0.03);\n cursor: pointer;\n transition: transform 0.2s ease-in-out;\n\n &:hover {\n transform: scale(1.05);\n }\n\n ","\n"])),function(n){return n.$hasImg?"0":"14px"},function(e){return!e.$hasImg&&t(r||(r=n(["\n background: ",";\n "],["\n background: ",";\n "])),e.$bgColor||"#000")}),a=e.img(i||(i=n(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"],["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"]))),d=e.span(s||(s=n(["\n font-size: 32px;\n line-height: 1;\n"],["\n font-size: 32px;\n line-height: 1;\n"])));export{p as Container,d as Emoji,a as Logo};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{observer as e}from"mobx-react";import o,{useState as i,useEffect as t}from"react";import'./../../../ext/react-i18next/dist/es/context.js';import{useTranslation as n}from'./../../../ext/react-i18next/dist/es/useTranslation.js';import{XClose as r}from"../../../assets/icons/x-close.js";import{WidgetMode as s}from"../../../models/types/index.js";import{Container as l,CloseButton as a,Text as d}from"./style.js";var c=e(function(e){var c,m,u=e.viewModel,p=e.isInitialized,f=n().t,v=i(!1),M=v[0],x=v[1];t(function(){if(p){var e=setTimeout(function(){return x(!0)},350);return function(){return clearTimeout(e)}}},[p]);var E=Boolean(u.ikasEventUser&&!u.user);if(Boolean(null===(m=null===(c=u.loyaltyWidget)||void 0===c?void 0:c.miniMode)||void 0===m?void 0:m.hideDescription)||u.isMiniModeDescriptionClosed||!M||E)return null;var g=u.user?"miniMode.descriptionLoggedIn":"miniMode.description";return o.createElement(l,{onClick:function(e){e.stopPropagation(),u.setWidgetMode(s.WIDGET_MODE)}},o.createElement(a,{onClick:function(e){e.stopPropagation(),u.closeMiniModeDescription()}},o.createElement(r,null)),o.createElement(d,null,f(g)))});export{c as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const CloseButton: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const Text: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import p from"styled-components";import{textMD as r}from"../style/typography.js";var o,x,a,i=p.div(o||(o=n(["\n display: flex;\n width: 432px;\n max-width: calc(100vw - 40px);\n padding: 20px;\n flex-direction: column;\n align-items: flex-start;\n gap: 24px;\n border-radius: 16px;\n border: 1px solid #ECECED;\n background: #FFF;\n box-shadow: 0 22px 6px 0 rgba(0, 0, 0, 0.00), 0 14px 6px 0 rgba(0, 0, 0, 0.01),\n 0 8px 5px 0 rgba(0, 0, 0, 0.05), 0 4px 4px 0 rgba(0, 0, 0, 0.09),\n 0 1px 2px 0 rgba(0, 0, 0, 0.10);\n color: #121926;\n position: relative;\n cursor: pointer;\n margin-bottom: 16px; /* 16px space between description and button */\n"],["\n display: flex;\n width: 432px;\n max-width: calc(100vw - 40px);\n padding: 20px;\n flex-direction: column;\n align-items: flex-start;\n gap: 24px;\n border-radius: 16px;\n border: 1px solid #ECECED;\n background: #FFF;\n box-shadow: 0 22px 6px 0 rgba(0, 0, 0, 0.00), 0 14px 6px 0 rgba(0, 0, 0, 0.01),\n 0 8px 5px 0 rgba(0, 0, 0, 0.05), 0 4px 4px 0 rgba(0, 0, 0, 0.09),\n 0 1px 2px 0 rgba(0, 0, 0, 0.10);\n color: #121926;\n position: relative;\n cursor: pointer;\n margin-bottom: 16px; /* 16px space between description and button */\n"]))),e=p.div(x||(x=n(["\n position: absolute;\n top: -12px;\n right: -12px;\n cursor: pointer;\n display: inline-flex;\n padding: 6px;\n align-items: center;\n gap: 10px;\n border-radius: 40px;\n background: #F6F6F6;\n box-shadow: 0 22px 6px 0 rgba(0, 0, 0, 0.00), 0 14px 6px 0 rgba(0, 0, 0, 0.01),\n 0 8px 5px 0 rgba(0, 0, 0, 0.05), 0 4px 4px 0 rgba(0, 0, 0, 0.09),\n 0 1px 2px 0 rgba(0, 0, 0, 0.10);\n color: #4B5565;\n\n &:hover {\n color: #667085;\n }\n"],["\n position: absolute;\n top: -12px;\n right: -12px;\n cursor: pointer;\n display: inline-flex;\n padding: 6px;\n align-items: center;\n gap: 10px;\n border-radius: 40px;\n background: #F6F6F6;\n box-shadow: 0 22px 6px 0 rgba(0, 0, 0, 0.00), 0 14px 6px 0 rgba(0, 0, 0, 0.01),\n 0 8px 5px 0 rgba(0, 0, 0, 0.05), 0 4px 4px 0 rgba(0, 0, 0, 0.09),\n 0 1px 2px 0 rgba(0, 0, 0, 0.10);\n color: #4B5565;\n\n &:hover {\n color: #667085;\n }\n"]))),t=p.div(a||(a=n(["\n ",";\n color: #121926;\n"],["\n ",";\n color: #121926;\n"])),r);export{e as CloseButton,i as Container,t as Text};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { LoyaltyWidgetViewModel } from "models";
|
|
3
|
+
export declare const getProductFullUrl: (storeUrl: string, productUrl?: string | null) => string | null;
|
|
4
|
+
type ProductFilterListProps = {
|
|
5
|
+
filters: {
|
|
6
|
+
type: string;
|
|
7
|
+
idList: string[];
|
|
8
|
+
}[];
|
|
9
|
+
viewModel: LoyaltyWidgetViewModel;
|
|
10
|
+
header?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const ProductFilterList: React.FC<ProductFilterListProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__spreadArray as t}from'./../../../ext/tslib/tslib.es6.mjs.js';import e from"react";import'./../../../ext/react-i18next/dist/es/context.js';import{useTranslation as n}from'./../../../ext/react-i18next/dist/es/useTranslation.js';import{Scenery as r}from"../../../assets/widget-icons/illustraions/scenery.js";import{Album02 as l}from"../../../assets/widget-icons/normal/album02.js";import{WidgetIconTypeEnum as o}from"../../../models/loyalty-widget/types/index.js";import i from"../button/index.js";import{FilterListContainer as a,FilterHeader as u,ProductCard as s,ProductCardContent as c,ProductImageContainer as m,ProductImage as d,ProductInfo as f,ProductName as p,VariantText as v,ButtonWrapper as g}from"./style.js";var y=function(t,e){return e?t?"".concat(t.replace(/\/$/,""),"/").concat(e):"/".concat(e):null},E=function(t){var a=t.resolved,u=t.iconType,E=t.storeUrl,h=t.button,j=n().t,b=a.product,w=a.variants,x=(w.length>0?w[0].mainImageSrc:null)||b.mainImageSrc,T=w.length>0?w.map(function(t){return t.variantText}).filter(Boolean).join(", "):null,S=u===o.ILLUSTRATION?r:l,I=y(E,b.url);return e.createElement(s,null,e.createElement(c,null,e.createElement(m,null,x?e.createElement(d,{src:x,alt:b.name}):e.createElement(S,null)),e.createElement(f,null,e.createElement(p,null,b.name),T&&e.createElement(v,null,T)),I&&e.createElement(g,null,e.createElement(i,{button:h,paddingSize:"small",fontSize:"textXSMedium",onClick:function(){I&&window.open(I,"_self")}},j("common.goToProduct")))))},h=function(n){var r=n.filters,l=n.viewModel,o=n.header,i=l.loyaltyWidget.settings.widgetIconType,s=l.storeUrl,c=l.loyaltyWidget.button,m=r.map(function(t){return function(t,e){if(!e||0===e.length)return null;var n=e.find(function(t){return t.startsWith("p:")});if(!n)return null;var r=n.slice(2),l=t.products.find(function(t){return t.id===r});if(!l)return null;var o=e.find(function(t){return t.startsWith("v:")}),i=[];if(o&&l.variants){var a=o.slice(2),u=l.variants.find(function(t){return t.id===a});u&&i.push(u)}return{product:l,variants:i}}(l,t.idList)}).filter(Boolean),d=function(e){for(var n=new Map,r=0,l=e;r<l.length;r++){var o=l[r],i=n.get(o.product.id);if(i)for(var a=function(t){i.variants.some(function(e){return e.id===t.id})||i.variants.push(t)},u=0,s=o.variants;u<s.length;u++)a(s[u]);else n.set(o.product.id,{product:o.product,variants:t([],o.variants,!0)})}return Array.from(n.values())}(m);return 0===d.length?null:e.createElement(a,null,o&&e.createElement(u,null,o),d.map(function(t){return e.createElement(E,{key:t.product.id,resolved:t,iconType:i,storeUrl:s,button:c})}))};export{h as ProductFilterList,y as getProductFullUrl};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const ProductCard: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const ProductCardContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const ProductImageContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const ProductImage: import("styled-components").StyledComponent<"img", any, {}, never>;
|
|
5
|
+
export declare const ProductInfo: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const ProductName: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const VariantText: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const FilterListContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
|
+
export declare const FilterHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import e from"styled-components";import{textSMMedium as i,textSM as o}from"../style/typography.js";var d,r,l,p,t,x,f,a,c,s,m=e.div(d||(d=n(["\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px;\n border-radius: 6px;\n border: 1px solid #eef2f6;\n"],["\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px;\n border-radius: 6px;\n border: 1px solid #eef2f6;\n"]))),g=e.div(r||(r=n(["\n display: flex;\n gap: 12px;\n align-items: center;\n"],["\n display: flex;\n gap: 12px;\n align-items: center;\n"]))),h=e.div(l||(l=n(["\n width: 48px;\n height: 48px;\n min-width: 48px;\n border-radius: 6px;\n border: 1px solid #eef2f6;\n background-color: #f8fafc;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n"],["\n width: 48px;\n height: 48px;\n min-width: 48px;\n border-radius: 6px;\n border: 1px solid #eef2f6;\n background-color: #f8fafc;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n"]))),b=e.img(p||(p=n(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"],["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"]))),y=e.div(t||(t=n(["\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n min-width: 0;\n"],["\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n min-width: 0;\n"]))),u=e.div(x||(x=n(["\n ","\n color: #121926;\n word-break: break-word;\n"],["\n ","\n color: #121926;\n word-break: break-word;\n"])),i),v=e.div(f||(f=n(["\n ","\n color: #697586;\n"],["\n ","\n color: #697586;\n"])),o),w=e.div(a||(a=n(["\n flex-shrink: 0;\n"],["\n flex-shrink: 0;\n"]))),k=e.div(c||(c=n(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n"],["\n display: flex;\n flex-direction: column;\n gap: 8px;\n"]))),j=e.div(s||(s=n(["\n ","\n color: #475467;\n"],["\n ","\n color: #475467;\n"])),o);export{w as ButtonWrapper,j as FilterHeader,k as FilterListContainer,m as ProductCard,g as ProductCardContent,b as ProductImage,h as ProductImageContainer,y as ProductInfo,u as ProductName,v as VariantText};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import{css as e}from"styled-components";import{WidgetIconTypeEnum as t}from"../../../models/loyalty-widget/types/index.js";var i,r=e(i||(i=n(["\n display: flex;\n width: ",";\n height: ",";\n justify-content: center;\n align-items: center;\n border-radius: ",";\n"],["\n display: flex;\n width: ",";\n height: ",";\n justify-content: center;\n align-items: center;\n border-radius: ",";\n"])),function(n){return n.$iconType===t.ILLUSTRATION?"40px":"36px"},function(n){return n.$iconType===t.ILLUSTRATION?"40px":"36px"},function(n){return n.$iconType===t.ILLUSTRATION?"40px":"8px"});export{r as iconWrapperShape};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
declare const textXS: import("styled-components").FlattenSimpleInterpolation;
|
|
1
2
|
declare const textXSMedium: import("styled-components").FlattenSimpleInterpolation;
|
|
2
3
|
declare const textSM: import("styled-components").FlattenSimpleInterpolation;
|
|
3
4
|
declare const textSMMedium: import("styled-components").FlattenSimpleInterpolation;
|
|
4
5
|
declare const textSMSemiBold: import("styled-components").FlattenSimpleInterpolation;
|
|
6
|
+
declare const textMD: import("styled-components").FlattenSimpleInterpolation;
|
|
5
7
|
declare const textMDMedium: import("styled-components").FlattenSimpleInterpolation;
|
|
6
8
|
declare const textLGMedium: import("styled-components").FlattenSimpleInterpolation;
|
|
7
9
|
declare const textLGSemiBold: import("styled-components").FlattenSimpleInterpolation;
|
|
8
10
|
declare const textXLSemiBold: import("styled-components").FlattenSimpleInterpolation;
|
|
9
11
|
declare const displayXSSemiBold: import("styled-components").FlattenSimpleInterpolation;
|
|
10
12
|
declare const Badge: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
11
|
-
export { textXSMedium, textSM, textSMMedium, textSMSemiBold, textMDMedium, textLGMedium, textLGSemiBold, textXLSemiBold, displayXSSemiBold, Badge, };
|
|
13
|
+
export { textXS, textXSMedium, textSM, textSMMedium, textSMSemiBold, textMD, textMDMedium, textLGMedium, textLGSemiBold, textXLSemiBold, displayXSSemiBold, Badge, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import t,{css as e}from"styled-components";var o,i,l,f,p,s,
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import t,{css as e}from"styled-components";var o,i,l,f,p,h,s,x,g,r,a,m,y=e(o||(o=n(["\n font-size: 12px;\n font-style: normal;\n font-weight: 500;\n line-height: 18px;\n"],["\n font-size: 12px;\n font-style: normal;\n font-weight: 500;\n line-height: 18px;\n"]))),d=e(i||(i=n(["\n font-size: 12px;\n font-style: normal;\n font-weight: 500;\n line-height: 18px; /* 150% */\n letter-spacing: -0.24px;\n"],["\n font-size: 12px;\n font-style: normal;\n font-weight: 500;\n line-height: 18px; /* 150% */\n letter-spacing: -0.24px;\n"]))),w=e(l||(l=n(["\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n"],["\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n"]))),z=e(f||(f=n(["\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 20px; /* 142.857% */\n"],["\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 20px; /* 142.857% */\n"]))),c=e(p||(p=n(["\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n"],["\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n"]))),b=e(h||(h=n(["\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 24px;\n"],["\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 24px;\n"]))),u=e(s||(s=n(["\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 24px; /* 150% */\n"],["\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 24px; /* 150% */\n"]))),j=e(x||(x=n(["\n font-size: 18px;\n font-style: normal;\n font-weight: 500;\n line-height: 28px;\n"],["\n font-size: 18px;\n font-style: normal;\n font-weight: 500;\n line-height: 28px;\n"]))),k=e(g||(g=n(["\n font-size: 18px;\n font-style: normal;\n font-weight: 600;\n line-height: 28px;\n"],["\n font-size: 18px;\n font-style: normal;\n font-weight: 600;\n line-height: 28px;\n"]))),v=e(r||(r=n(["\n font-size: 20px;\n font-style: normal;\n font-weight: 600;\n line-height: 30px;\n"],["\n font-size: 20px;\n font-style: normal;\n font-weight: 600;\n line-height: 30px;\n"]))),_=e(a||(a=n(["\n font-size: 24px;\n font-style: normal;\n font-weight: 600;\n line-height: 32px;\n"],["\n font-size: 24px;\n font-style: normal;\n font-weight: 600;\n line-height: 32px;\n"]))),q=t.span(m||(m=n(["\n display: flex;\n padding: 2px 8px;\n justify-content: center;\n align-items: center;\n gap: 6px;\n border-radius: 6px;\n border: 0.6px solid #cdd5df;\n opacity: 0.8;\n background: #f8fafc;\n ","\n color: #121926;\n"],["\n display: flex;\n padding: 2px 8px;\n justify-content: center;\n align-items: center;\n gap: 6px;\n border-radius: 6px;\n border: 0.6px solid #cdd5df;\n opacity: 0.8;\n background: #f8fafc;\n ","\n color: #121926;\n"])),w);export{q as Badge,_ as displayXSSemiBold,j as textLGMedium,k as textLGSemiBold,b as textMD,u as textMDMedium,w as textSM,z as textSMMedium,c as textSMSemiBold,v as textXLSemiBold,y as textXS,d as textXSMedium};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e,{useState as t,useRef as r}from"react";import{Container as n,TooltipBubble as o}from"./style.js";var c=function(c){var i=c.content,l=c.children,u=t(!1),f=u[0],a=u[1],s=r(null),m=e.cloneElement(l,{ref:s});return e.createElement(n,{onMouseEnter:function(){if(s.current){var e=s.current,t=e.offsetWidth;e.scrollWidth>t&&a(!0)}},onMouseLeave:function(){return a(!1)}},m,e.createElement(o,{$isVisible:f},i))};export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import t from"styled-components";import{textXS as o}from"../style/typography.js";var e,i,r=t.div(e||(e=n(["\n position: relative;\n display: inline-flex;\n"],["\n position: relative;\n display: inline-flex;\n"]))),s=t.div(i||(i=n(["\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: 8px;\n padding: 4px 8px;\n border-radius: 4px;\n background-color: #1e1e1e;\n color: #ffffff;\n white-space: nowrap;\n opacity: ",";\n visibility: ",";\n transition:\n opacity 0.2s ease-in-out,\n visibility 0.2s ease-in-out;\n z-index: 1000;\n pointer-events: none;\n box-shadow:\n 0px 4px 6px -2px rgba(16, 24, 40, 0.03),\n 0px 12px 16px -4px rgba(16, 24, 40, 0.08);\n\n ",'\n\n &::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n border-width: 4px;\n border-style: solid;\n border-color: transparent transparent #1e1e1e transparent;\n }\n'],["\n position: absolute;\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: 8px;\n padding: 4px 8px;\n border-radius: 4px;\n background-color: #1e1e1e;\n color: #ffffff;\n white-space: nowrap;\n opacity: ",";\n visibility: ",";\n transition:\n opacity 0.2s ease-in-out,\n visibility 0.2s ease-in-out;\n z-index: 1000;\n pointer-events: none;\n box-shadow:\n 0px 4px 6px -2px rgba(16, 24, 40, 0.03),\n 0px 12px 16px -4px rgba(16, 24, 40, 0.08);\n\n ",'\n\n &::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n border-width: 4px;\n border-style: solid;\n border-color: transparent transparent #1e1e1e transparent;\n }\n'])),function(n){return n.$isVisible?1:0},function(n){return n.$isVisible?"visible":"hidden"},o);export{r as Container,s as TooltipBubble};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const Header: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const HeaderCol: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const List: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const Row: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const OriginalText: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const ArrowConnection: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const InputWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const Input: import("styled-components").StyledComponent<"input", any, {}, never>;
|
package/build/renderer/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t,__spreadArray as n}from'./../ext/tslib/tslib.es6.mjs.js';import r,{useState as o,useRef as s,useEffect as i}from"react";import{observer as c}from'./../ext/mobx-react/dist/mobxreact.esm.js';import'./../ext/i18next/dist/esm/i18next.js';import'./../ext/react-i18next/dist/es/context.js';import'./../ext/react-i18next/dist/es/IcuTransUtils/htmlEntityDecoder.js';import'./../ext/use-sync-external-store/shim/index.js';import{I18nextProvider as a}from'./../ext/react-i18next/dist/es/I18nextProvider.js';import l from"./utils/i18n.js";import{LoyaltyWidgetScreenTypeEnum as d,EarningMethodTypeEnum as u,LoyaltyProgramFilterTypeEnum as m,LoyaltyProgramMethodSpendingTypeEnum as f}from"../models/types/index.js";import p from"./screens/main-screen/index.js";import E from"./screens/credit-spending-methods-screen/index.js";import y from"./screens/credit-earning-methods-screen/index.js";import h from"./screens/credit-history-screen/index.js";import g from"./screens/loyalty-level-screen/index.js";import{LoyaltyWidgetViewModel as v}from"../models/index.js";import{LoyaltyWidget as C}from"../models/loyalty-widget/index.js";import{LoyaltyProgramSpendingMethod as R}from"../models/loyalty-program-spending-method/index.js";import{LoyaltyCustomerInfo as _}from"../models/loyalty-customer-info/index.js";import{LoyaltyProgramEarningMethod as b}from"../models/loyalty-program-earning-method/index.js";import{LoyaltyProgramPointHistory as I}from"../models/loyalty-program-point-history/index.js";import{Container as S,Drawer as k,ScreenWrapper as A}from"./style.js";var N=c(function(c){var N=c.config,T=o(function(){var e=N||window.ikasLoyaltyWidgetConfig;return new v({cartId:(null==e?void 0:e.cartId)||null},(null==e?void 0:e.cdnURL)||"",(null==e?void 0:e.merchantId)||"",(null==e?void 0:e.currency)||"",(null==e?void 0:e.locale)||"",null==e?void 0:e.callbacks)})[0],w=s(!0);i(function(){e(void 0,void 0,void 0,function(){var e,r,o,s,i,c,a,l,d,p,E,y,h,g;return t(this,function(t){switch(t.label){case 0:if(!T.callbacks)return[3,6];t.label=1;case 1:return t.trys.push([1,4,5,6]),e=[T.callbacks.getLoyaltyWidget(),T.callbacks.listEarningMethods(),T.callbacks.listLoyaltyProgramTier({includeDeleted:!1})],T.cartId&&(e.push(T.callbacks.listSpendingMethodsByCartId(T.cartId)),e.push(T.callbacks.getLoyaltyCustomerInfo()),e.push(T.callbacks.listLoyaltyProgramPointHistory({}))),[4,Promise.all(e)];case 2:return r=t.sent(),o=r[0],s=r[1],i=r[2],c=[],a=null,l=[],T.cartId&&(c=r[3],a=r[4],l=r[5]),T.loyaltyWidget=new C(o),T.earningMethods=s.map(function(e){return new b(e)}),T.tiers=i||[],T.cartId&&(T.spendingMethods=c.map(function(e){return new R(e)}),T.user=a?new _(a):null,T.pointHistory=l?l.map(function(e){return new I(e)}):[]),d=new Set,p=new Set,E=new Set,y=new Set,T.earningMethods.forEach(function(e){var t,r;e.methodType===u.ORDER_CREATE&&n(n([],(null===(t=e.orderSettings)||void 0===t?void 0:t.productFilters)||[],!0),(null===(r=e.productSettings)||void 0===r?void 0:r.productFilters)||[],!0).forEach(function(e){e.type===m.PRODUCT_AND_VARIANT?e.idList.forEach(function(e){return d.add(e)}):e.type===m.CATEGORY?e.idList.forEach(function(e){return p.add(e)}):e.type===m.PRODUCT_BRAND?e.idList.forEach(function(e){return E.add(e)}):e.type===m.PRODUCT_TAG&&e.idList.forEach(function(e){return y.add(e)})})}),T.spendingMethods&&T.spendingMethods.forEach(function(e){var t,n;e.type===f.FREE_PRODUCT&&(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)&&d.add(e.discountSettings.freeProductId),null===(n=e.productFilters)||void 0===n||n.forEach(function(e){e.type===m.PRODUCT_AND_VARIANT?e.idList.forEach(function(e){return d.add(e)}):e.type===m.CATEGORY?e.idList.forEach(function(e){return p.add(e)}):e.type===m.PRODUCT_BRAND?e.idList.forEach(function(e){return E.add(e)}):e.type===m.PRODUCT_TAG&&e.idList.forEach(function(e){return y.add(e)})})}),h=[],d.size>0&&T.callbacks.getProducts&&h.push(T.callbacks.getProducts(Array.from(d)).then(function(e){return T.products=e})),p.size>0&&T.callbacks.getCategories&&h.push(T.callbacks.getCategories(Array.from(p)).then(function(e){return T.categories=e})),E.size>0&&T.callbacks.getBrands&&h.push(T.callbacks.getBrands(Array.from(E)).then(function(e){return T.brands=e})),y.size>0&&T.callbacks.getTags&&h.push(T.callbacks.getTags(Array.from(y)).then(function(e){return T.tags=e})),[4,Promise.all(h)];case 3:return t.sent(),[3,6];case 4:return g=t.sent(),console.error("Failed to initialize loyalty data",g),[3,6];case 5:return w.current=!1,[7];case 6:return[2]}})})},[]),i(function(){if(!w.current){e(void 0,void 0,void 0,function(){var e,n,r,o,s;return t(this,function(t){switch(t.label){case 0:if(!T.callbacks)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Promise.all([T.callbacks.listSpendingMethodsByCartId(T.cartId),T.callbacks.getLoyaltyCustomerInfo(),T.callbacks.listLoyaltyProgramPointHistory({})])];case 2:return e=t.sent(),n=e[0],r=e[1],o=e[2],T.spendingMethods=n.map(function(e){return new R(e)}),T.user=r?new _(r):null,T.pointHistory=o?o.map(function(e){return new I(e)}):[],[3,4];case 3:return s=t.sent(),console.error("Failed to fetch cart dependent data",s),[3,4];case 4:return[2]}})})}},[T.cartId]);var x=function(e){T.selectedScreen=e},M=function(){var e;(null===(e=T.callbacks)||void 0===e?void 0:e.onWidgetClose)&&T.callbacks.onWidgetClose()},j=T.selectedScreen===d.MAIN_SCREEN,P=o(null),D=P[0],L=P[1];i(function(){T.selectedScreen!==d.MAIN_SCREEN&&L(T.selectedScreen)},[T.selectedScreen]);var O=j?D:T.selectedScreen;return r.createElement(a,{i18n:l},r.createElement(S,null,r.createElement(k,null,r.createElement(A,{$isActive:j,$isMain:!0},r.createElement(p,{viewModel:T,onClose:M,onNavigate:x})),r.createElement(A,{$isActive:!j,$isMain:!1},function(){switch(O){case d.CREDIT_SPENDING_METHODS_SCREEN:return r.createElement(E,{viewModel:T,onBack:function(){return x(d.MAIN_SCREEN)},onClose:M});case d.CREDIT_EARNING_METHODS_SCREEN:return r.createElement(y,{viewModel:T,onBack:function(){return x(d.MAIN_SCREEN)},onClose:M});case d.CREDIT_HISTORY_SCREEN:return r.createElement(h,{viewModel:T,onBack:function(){return x(d.MAIN_SCREEN)},onClose:M});case d.LOYALTY_LEVEL_SCREEN:return r.createElement(g,{viewModel:T,onBack:function(){return x(d.MAIN_SCREEN)},onClose:M});default:return null}}()))))});export{N as default};
|
|
1
|
+
import{__awaiter as e,__generator as t,__spreadArray as n}from'./../ext/tslib/tslib.es6.mjs.js';import{toJS as r}from"mobx";import{observer as i}from"mobx-react";import o,{useState as s,useEffect as a}from"react";import'./../ext/react-i18next/dist/es/context.js';import{I18nextProvider as l}from'./../ext/react-i18next/dist/es/I18nextProvider.js';import{LoyaltyWidgetViewModel as c}from"../models/index.js";import{LoyaltyCustomerInfo as d}from"../models/loyalty-customer-info/index.js";import{LoyaltyProgramEarningMethod as u}from"../models/loyalty-program-earning-method/index.js";import{LoyaltyProgramSpendingMethod as f}from"../models/loyalty-program-spending-method/index.js";import{LoyaltyWidget as v}from"../models/loyalty-widget/index.js";import{WidgetPositionEnum as m,LoyaltyWidgetLayoutTypeEnum as g}from"../models/loyalty-widget/types/index.js";import{WidgetMode as p,LoyaltyWidgetScreenTypeEnum as E,EarningMethodTypeEnum as y,LoyaltyProgramFilterTypeEnum as h,LoyaltyProgramMethodSpendingTypeEnum as T}from"../models/types/index.js";import R from"./components/mini-mode-button/index.js";import k from"./components/mini-mode-description/index.js";import b from"./screens/credit-earning-methods-screen/index.js";import w from"./screens/credit-history-screen/index.js";import I from"./screens/credit-spending-methods-screen/index.js";import M from"./screens/gift-product-selection-screen/index.js";import _ from"./screens/loyalty-level-screen/index.js";import C from"./screens/main-screen/index.js";import O from"./utils/i18n.js";import{unflatten as S}from"./utils/object-utils.js";import{Container as D,MiniModeWrapper as P,Panel as A,ScreenWrapper as L}from"./style.js";var U=i(function(i){var U,j,N,x=i.config,W=s(function(){var e=x||window.ikasLoyaltyWidgetConfig;return new c({cartId:(null==e?void 0:e.cartId)||null,ikasEventUser:(null==e?void 0:e.userId)?{id:e.userId}:null},(null==e?void 0:e.cdnURL)||"",(null==e?void 0:e.merchantId)||"",(null==e?void 0:e.currency)||"",(null==e?void 0:e.storeURL)||null,null==e?void 0:e.isPreviewMode,null==e?void 0:e.callbacks)})[0],$=s(!1),G=$[0],B=$[1],F=s(!1),V=F[0],z=F[1],Y=s(!1),H=Y[0],J=Y[1],q=W.loyaltyWidget.translations,K=JSON.stringify(r(null==q?void 0:q.custom));a(function(){var e=null==q?void 0:q.language,t=(null==q?void 0:q.custom)?r(q.custom):{};if(e){var n=["tr","en","de","nl","fr"].includes(e)?e:"en";if(O.language!==n&&O.changeLanguage(n),Object.keys(t).length>0){var i=S(t);O.addResourceBundle(n,"translation",i,!0,!0)}}},[null==q?void 0:q.language,K]),a(function(){var e=x||window.ikasLoyaltyWidgetConfig;(null==e?void 0:e.onViewModelInitialized)&&e.onViewModelInitialized(W)},[W,x]);var Q=function(){return e(void 0,void 0,void 0,function(){var e,r,i,o,s;return t(this,function(t){switch(t.label){case 0:return W.callbacks?(e=new Set,r=new Set,i=new Set,o=new Set,W.earningMethods.forEach(function(t){var s,a;t.methodType!==y.ORDER_CREATE&&t.methodType!==y.BUY_PRODUCT||n(n([],(null===(s=t.orderSettings)||void 0===s?void 0:s.productFilters)||[],!0),(null===(a=t.productSettings)||void 0===a?void 0:a.productFilters)||[],!0).forEach(function(t){t.type===h.PRODUCT_AND_VARIANT?t.idList.forEach(function(t){t.startsWith("v:")||e.add(t.replace(/^p:/,""))}):t.type===h.CATEGORY?t.idList.forEach(function(e){return r.add(e)}):t.type===h.PRODUCT_BRAND?t.idList.forEach(function(e){return i.add(e)}):t.type===h.PRODUCT_TAG&&t.idList.forEach(function(e){return o.add(e)})})}),W.spendingMethods&&W.spendingMethods.forEach(function(t){var n,s;t.type===T.FREE_PRODUCT&&(null===(n=t.discountSettings)||void 0===n?void 0:n.freeProductId)&&e.add(t.discountSettings.freeProductId),null===(s=t.productFilters)||void 0===s||s.forEach(function(t){t.type===h.PRODUCT_AND_VARIANT?t.idList.forEach(function(t){t.startsWith("v:")||e.add(t.replace(/^p:/,""))}):t.type===h.CATEGORY?t.idList.forEach(function(e){return r.add(e)}):t.type===h.PRODUCT_BRAND?t.idList.forEach(function(e){return i.add(e)}):t.type===h.PRODUCT_TAG&&t.idList.forEach(function(e){return o.add(e)})})}),s=[],e.size>0&&W.callbacks.getProducts&&s.push(W.callbacks.getProducts(Array.from(e)).then(function(e){W.products=e})),r.size>0&&W.callbacks.getCategories&&s.push(W.callbacks.getCategories(Array.from(r)).then(function(e){return W.categories=e})),i.size>0&&W.callbacks.getBrands&&s.push(W.callbacks.getBrands(Array.from(i)).then(function(e){return W.brands=e})),o.size>0&&W.callbacks.getTags&&s.push(W.callbacks.getTags(Array.from(o)).then(function(e){return W.tags=e})),[4,Promise.all(s)]):[2];case 1:return t.sent(),[2]}})})};a(function(){e(void 0,void 0,void 0,function(){var e,n,r,i,o,s;return t(this,function(t){switch(t.label){case 0:if(!W.callbacks)return[3,6];t.label=1;case 1:return t.trys.push([1,4,5,6]),e=[W.callbacks.getLoyaltyWidget(),W.callbacks.listEarningMethods(),W.callbacks.listLoyaltyProgramTier({})],[4,Promise.all(e)];case 2:return n=t.sent(),r=n[0],i=n[1],o=n[2],W.loyaltyWidget=r instanceof v?r:new v(r||{}),W.earningMethods=i.map(function(e){return new u(e)}),W.tiers=o||[],[4,Q()];case 3:return t.sent(),[3,6];case 4:return s=t.sent(),console.error("Failed to initialize loyalty data",s),[3,6];case 5:return B(!0),[7];case 6:return[2]}})})},[]),a(function(){if(window.IkasEvents){var e=function(e){var t,n,r=null===(t=e.data)||void 0===t?void 0:t.customer;(null==r?void 0:r.id)&&(null===(n=W.ikasEventUser)||void 0===n?void 0:n.id)!==r.id&&(W.ikasEventUser=r,W.userRefreshTrigger++,W.cartRefreshTrigger++)},t=function(e){var t,n,r,i,o,s=null===(n=null===(t=e.data)||void 0===t?void 0:t.cart)||void 0===n?void 0:n.id;0===(null===(o=null===(i=null===(r=e.data)||void 0===r?void 0:r.cart)||void 0===i?void 0:i.orderLineItems)||void 0===o?void 0:o.length)?W.cartId=null:W.cartId=s,W.cartRefreshTrigger++},n={CUSTOMER_LOGIN:e,CUSTOMER_VISIT:e,CUSTOMER_LOGOUT:function(){W.ikasEventUser=null,W.user=null,W.resetPointHistory(),W.userRefreshTrigger++,W.cartRefreshTrigger++},ADD_TO_CART:function(e){return t(e)},REMOVE_FROM_CART:t,REMOVE_LOYALTY_POINTS:function(){W.cartRefreshTrigger++,W.userRefreshTrigger++},PAGE_VIEW:function(e){var t,n,r=null===(t=e.data)||void 0===t?void 0:t.customer;if(null==r?void 0:r.id){var i=!W.ikasEventUser,o=(null===(n=W.ikasEventUser)||void 0===n?void 0:n.subscriptionStatus)!==r.subscriptionStatus;(i||o)&&(W.ikasEventUser=r,W.userRefreshTrigger++,W.cartRefreshTrigger++)}}},r="ikas-loyalty-widget-subscriber";try{window.IkasEvents.subscribe({id:r,callback:function(e){var t=n[e.type];t&&t(e)}})}catch(e){console.error("Failed to subscribe to IkasEvents",e)}return function(){var e;(null===(e=window.IkasEvents)||void 0===e?void 0:e.unsubscribe)&&window.IkasEvents.unsubscribe(r)}}},[W]),a(function(){e(void 0,void 0,void 0,function(){var e,n,r,i,o;return t(this,function(t){switch(t.label){case 0:if(V)return[2];if(z(!0),!W.callbacks||!(null===(o=W.ikasEventUser)||void 0===o?void 0:o.id))return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Promise.all([W.callbacks.getLoyaltyCustomerInfo(),W.callbacks.listLoyaltyProgramPointHistory({})])];case 2:return e=t.sent(),n=e[0],r=e[1],W.user=n?new d(n):null,n||(W.ikasEventUser=null),W.setPointHistoryFirstPage(r),[3,4];case 3:return i=t.sent(),console.error("Failed to fetch user data",i),[3,4];case 4:return z(!1),[2]}})})},[null===(U=W.ikasEventUser)||void 0===U?void 0:U.id,W.userRefreshTrigger]),a(function(){e(void 0,void 0,void 0,function(){var e,n,r;return t(this,function(t){switch(t.label){case 0:if(H)return[2];if(J(!0),!W.callbacks||!(null===(r=W.ikasEventUser)||void 0===r?void 0:r.id))return[3,6];t.label=1;case 1:return t.trys.push([1,4,,5]),[4,W.callbacks.listSpendingMethodsByCartId(W.cartId)];case 2:return e=t.sent(),W.spendingMethods=e.map(function(e){return new f(e)}),[4,Q()];case 3:return t.sent(),[3,5];case 4:return n=t.sent(),console.error("Failed to fetch cart data",n),[3,5];case 5:return[3,7];case 6:W.spendingMethods=[],t.label=7;case 7:return J(!1),[2]}})})},[W.cartId,W.cartRefreshTrigger,null===(j=W.ikasEventUser)||void 0===j?void 0:j.id]);var X=function(){W.setWidgetMode(p.MINI_MODE),setTimeout(function(){W.resetNavigation()},300)};a(function(){return W.currentWidgetMode===p.WIDGET_MODE?document.body.style.overflow="hidden":document.body.style.overflow="",function(){document.body.style.overflow=""}},[W.currentWidgetMode]);var Z=s(null),ee=Z[0],te=Z[1],ne=s(null),re=ne[0],ie=ne[1],oe=W.navigationStack.length,se=oe>1?W.navigationStack[1]:null,ae=oe>2?W.navigationStack[2]:null;a(function(){se&&te(se)},[se]),a(function(){ae&&ie(ae)},[ae]);var le=W.loyaltyWidget.settings.position||m.RIGHT,ce=W.loyaltyWidget.settings.type||g.DRAWER,de=function(e){switch(e){case E.CREDIT_SPENDING_METHODS_SCREEN:return o.createElement(I,{viewModel:W,onBack:function(){return W.popScreen()},onClose:X});case E.CREDIT_EARNING_METHODS_SCREEN:return o.createElement(b,{viewModel:W,onBack:function(){return W.popScreen()},onClose:X});case E.CREDIT_HISTORY_SCREEN:return o.createElement(w,{viewModel:W,onBack:function(){return W.popScreen()},onClose:X});case E.LOYALTY_LEVEL_SCREEN:return o.createElement(_,{viewModel:W,onBack:function(){return W.popScreen()},onClose:X});case E.GIFT_PRODUCT_SELECTION_SCREEN:return o.createElement(M,{viewModel:W,onBack:function(){return W.popScreen()},onClose:X});default:return null}};if(!G)return null;var ue=(null==x?void 0:x.position)||(null===(N=window.ikasLoyaltyWidgetConfig)||void 0===N?void 0:N.position)||"fixed";return o.createElement(l,{i18n:O},o.createElement(D,{$layoutType:ce,$widgetPosition:le,$widgetMode:W.currentWidgetMode,$position:ue,onClick:function(){W.currentWidgetMode===p.WIDGET_MODE&&X()},className:"ikas-storefront-widget"},o.createElement(P,{$isVisible:W.currentWidgetMode===p.MINI_MODE,$widgetPosition:le},o.createElement(k,{viewModel:W,isInitialized:G}),o.createElement(R,{viewModel:W})),o.createElement(A,{$layoutType:ce,$isOpen:W.currentWidgetMode===p.WIDGET_MODE,$widgetPosition:le,onClick:function(e){return e.stopPropagation()}},o.createElement(L,{$isActive:W.isMainScreen,$layer:0,$layoutType:ce},o.createElement(C,{viewModel:W,onClose:X,onNavigate:function(e){return W.pushScreen(e)}})),o.createElement(L,{$isActive:!!se,$layer:1,$layoutType:ce},de(se||ee)),o.createElement(L,{$isActive:!!ae,$layer:2,$layoutType:ce},de(ae||re)))))});export{U as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e
|
|
1
|
+
import{__awaiter as e,__generator as t,__assign as o}from'./../../../ext/tslib/tslib.es6.mjs.js';import{observer as n}from"mobx-react";import i from"react";import'./../../../ext/react-i18next/dist/es/context.js';import{useTranslation as r}from'./../../../ext/react-i18next/dist/es/useTranslation.js';import{ChevronLeft as s}from"../../../assets/icons/chevron-left.js";import{XClose as c}from"../../../assets/icons/x-close.js";import{EarningMethodTypeEnum as l,WidgetMode as a}from"../../../models/types/index.js";import m from"../main-screen/earning-methods-section/index.js";import{Container as d,Header as u,IconButton as f,Title as E,Content as p}from"./style.js";var g=n(function(n){var g=n.viewModel,v=n.onBack,b=n.onClose,k=r().t;return i.createElement(d,null,i.createElement(u,null,i.createElement(f,{onClick:v},i.createElement(s,null)),i.createElement(E,null,k("screens.creditEarningMethods")),i.createElement(f,{onClick:b},i.createElement(c,null))),i.createElement(p,null,i.createElement(m,{containerStyle:{paddingRight:16,paddingLeft:16},viewModel:g,getActionProps:function(n){return n.methodType===l.CUSTOMER_REGISTER?{actionText:k("common.create"),onClick:function(){g.storeUrl&&(g.setWidgetMode(a.MINI_MODE),window.location.href="".concat(g.storeUrl,"/account/register"))}}:n.methodType===l.ENABLE_SUBSCRIPTION?{loading:g.isActionLoading,actionText:k("common.allow"),onClick:function(){return e(void 0,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return(null===(e=g.callbacks)||void 0===e?void 0:e.subscribeToMarketingNotifications)?(g.isActionLoading=!0,[4,g.callbacks.subscribeToMarketingNotifications()]):[3,2];case 1:t.sent()&&(g.ikasEventUser=o(o({},g.ikasEventUser),{subscriptionStatus:"SUBSCRIBED"}),g.userRefreshTrigger++),g.isActionLoading=!1,t.label=2;case 2:return[2]}})})}}:null}})))});export{g as default};
|