@ikas/loyalty-widget-renderer 1.0.0-alpha.29 → 1.0.0-alpha.3
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/_virtual/index.js +1 -0
- package/build/_virtual/index2.js +1 -0
- package/build/_virtual/react-is.development.js +1 -0
- package/build/_virtual/react-is.development2.js +1 -0
- package/build/_virtual/react-is.production.js +1 -0
- package/build/_virtual/react-is.production.min.js +1 -0
- package/build/assets/widget-icons/illustraions/medal.js +1 -1
- package/build/ext/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js +1 -0
- package/build/ext/@emotion/memoize/dist/memoize.browser.esm.js +1 -0
- package/build/ext/@emotion/stylis/dist/stylis.browser.esm.js +1 -0
- package/build/ext/@emotion/unitless/dist/unitless.browser.esm.js +1 -0
- package/build/ext/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +1 -0
- package/build/ext/hoist-non-react-statics/ext/react-is/cjs/react-is.development.js +9 -0
- package/build/ext/hoist-non-react-statics/ext/react-is/cjs/react-is.production.min.js +9 -0
- package/build/ext/hoist-non-react-statics/ext/react-is/index.js +1 -0
- package/build/ext/react-is/cjs/react-is.development.js +10 -0
- package/build/ext/react-is/cjs/react-is.production.js +10 -0
- package/build/ext/react-is/index.js +1 -0
- package/build/ext/styled-components/dist/styled-components.browser.esm.js +1 -0
- package/build/ext/tslib/tslib.es6.mjs.js +1 -1
- package/build/index.d.ts +1 -5
- package/build/index.js +1 -1
- package/build/models/base.d.ts +4 -0
- package/build/models/base.js +1 -0
- package/build/models/category/index.d.ts +5 -0
- package/build/models/image/index.d.ts +2 -1
- package/build/models/image/index.js +1 -1
- package/build/models/index.d.ts +2 -2
- package/build/models/index.js +1 -1
- package/build/models/loyalty-customer-info/index.d.ts +7 -7
- package/build/models/loyalty-customer-info/index.js +1 -1
- package/build/models/loyalty-program-earning-method/index.d.ts +30 -16
- 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 +20 -6
- package/build/models/loyalty-program-spending-method/index.js +1 -1
- package/build/models/loyalty-widget/header/header-background/index.d.ts +2 -1
- package/build/models/loyalty-widget/header/header-background/index.js +1 -1
- package/build/models/loyalty-widget/header-background/index.d.ts +9 -0
- package/build/models/loyalty-widget/settings/index.js +1 -1
- package/build/models/types/index.d.ts +35 -2
- package/build/models/types/index.js +1 -1
- package/build/renderer/components/button/index.js +1 -1
- package/build/renderer/components/button/style.js +1 -1
- package/build/renderer/components/loyalty-method-card/style.js +1 -1
- package/build/renderer/components/section-title/style.js +1 -1
- package/build/renderer/components/style/typography.js +1 -1
- package/build/renderer/index.d.ts +2 -4
- 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.js +1 -1
- package/build/renderer/screens/credit-spending-methods-screen/index.js +1 -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.js +1 -1
- 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/style.js +1 -1
- package/build/renderer/screens/main-screen/header/style.d.ts +2 -4
- 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.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 +1 -5
- 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.js +1 -1
- package/build/renderer/screens/main-screen/style.js +1 -1
- package/build/renderer/style.d.ts +2 -9
- package/build/renderer/style.js +1 -1
- package/build/renderer/utils/i18n.d.ts +2 -2
- package/build/renderer/utils/i18n.js +1 -1
- package/build/utils.d.ts +1 -2
- package/build/utils.js +1 -1
- package/package.json +10 -8
- package/build/ext/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/classCallCheck.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/createClass.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/defineProperty.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/inherits.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/iterableToArray.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/nonIterableRest.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/slicedToArray.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/toArray.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/toPrimitive.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/toPropertyKey.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/typeof.js +0 -1
- package/build/ext/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -1
- package/build/ext/i18next/dist/esm/i18next.js +0 -1
- package/build/ext/react-i18next/dist/es/I18nextProvider.js +0 -1
- package/build/ext/react-i18next/dist/es/context.js +0 -1
- package/build/ext/react-i18next/dist/es/unescape.js +0 -1
- package/build/ext/react-i18next/dist/es/useTranslation.js +0 -1
- package/build/ext/react-i18next/dist/es/utils.js +0 -1
- package/build/injector.d.ts +0 -5
- package/build/loyalty-widget-script-injector.iife.js +0 -68
- package/build/loyalty-widget-script-injector.iife.js.map +0 -1
- package/build/models/common/index.d.ts +0 -21
- package/build/models/common/index.js +0 -1
- package/build/renderer/components/style/icon-wrapper.d.ts +0 -4
- package/build/renderer/components/style/icon-wrapper.js +0 -1
|
@@ -1,13 +1,27 @@
|
|
|
1
|
-
import { LoyaltyProgramMethodSpendingTypeEnum } from "../types";
|
|
2
|
-
|
|
1
|
+
import { LoyaltyProgramMethodSpendingTypeEnum, LoyaltyProgramFilterTypeEnum } 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
|
+
idList: string[];
|
|
9
|
+
type: LoyaltyProgramFilterTypeEnum;
|
|
10
|
+
constructor(data?: Partial<LoyaltyProgramFilter>);
|
|
11
|
+
}
|
|
3
12
|
export declare class LoyaltyProgramDiscountSettings {
|
|
4
13
|
discountAmount: number | null;
|
|
5
14
|
freeProductId: string | null;
|
|
6
15
|
point: number;
|
|
7
16
|
constructor(data?: Partial<LoyaltyProgramDiscountSettings>);
|
|
8
17
|
}
|
|
18
|
+
export declare class LoyaltyProgramMethodTranslation {
|
|
19
|
+
description: string | null;
|
|
20
|
+
locale: string | null;
|
|
21
|
+
constructor(data?: Partial<LoyaltyProgramMethodTranslation>);
|
|
22
|
+
}
|
|
9
23
|
export declare class LoyaltyProgramSpendingMethod {
|
|
10
|
-
createdAt:
|
|
24
|
+
createdAt: string;
|
|
11
25
|
deleted: boolean;
|
|
12
26
|
description: string | null;
|
|
13
27
|
discountSettings: LoyaltyProgramDiscountSettings | null;
|
|
@@ -16,9 +30,9 @@ export declare class LoyaltyProgramSpendingMethod {
|
|
|
16
30
|
isDynamic: boolean;
|
|
17
31
|
loyaltyProgramId: string;
|
|
18
32
|
pointUsageLimit: LoyaltyProgramPointLimit | null;
|
|
19
|
-
productFilters: LoyaltyProgramFilter[]
|
|
20
|
-
translations: LoyaltyProgramMethodTranslation[]
|
|
33
|
+
productFilters: LoyaltyProgramFilter[];
|
|
34
|
+
translations: LoyaltyProgramMethodTranslation[];
|
|
21
35
|
type: LoyaltyProgramMethodSpendingTypeEnum;
|
|
22
|
-
updatedAt:
|
|
36
|
+
updatedAt: string;
|
|
23
37
|
constructor(data?: Partial<LoyaltyProgramSpendingMethod>);
|
|
24
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as t,observable as i}from"mobx";import{LoyaltyProgramMethodSpendingTypeEnum as n}from"../types/index.js";
|
|
1
|
+
import{makeObservable as t,observable as i}from"mobx";import{LoyaltyProgramMethodSpendingTypeEnum as n,LoyaltyProgramFilterTypeEnum as s}from"../types/index.js";var o=function(n){void 0===n&&(n={}),this.maxPointLimit=n.maxPointLimit||null,this.minPointLimit=n.minPointLimit||null,t(this,{maxPointLimit:i,minPointLimit:i})},e=function(n){void 0===n&&(n={}),this.idList=n.idList||[],this.type=n.type||s.PRODUCT_AND_VARIANT,t(this,{idList:i,type:i})},d=function(n){void 0===n&&(n={}),this.discountAmount=n.discountAmount||null,this.freeProductId=n.freeProductId||null,this.point=n.point||0,t(this,{discountAmount:i,freeProductId:i,point:i})},r=function(n){void 0===n&&(n={}),this.description=n.description||null,this.locale=n.locale||null,t(this,{description:i,locale:i})},l=function(s){void 0===s&&(s={}),this.createdAt=s.createdAt||"",this.deleted=s.deleted||!1,this.description=s.description||null,this.discountSettings=s.discountSettings?new d(s.discountSettings):null,this.id=s.id||"",this.isActive=s.isActive||!1,this.isDynamic=s.isDynamic||!1,this.loyaltyProgramId=s.loyaltyProgramId||"",this.pointUsageLimit=s.pointUsageLimit?new o(s.pointUsageLimit):null,this.productFilters=s.productFilters?s.productFilters.map(function(t){return new e(t)}):[],this.translations=s.translations?s.translations.map(function(t){return new r(t)}):[],this.type=s.type||n.FIXED_AMOUNT,this.updatedAt=s.updatedAt||"",t(this,{createdAt:i,deleted:i,description:i,discountSettings:i,id:i,isActive:i,isDynamic:i,loyaltyProgramId:i,pointUsageLimit:i,productFilters:i,translations:i,type:i,updatedAt:i})};export{d as LoyaltyProgramDiscountSettings,e as LoyaltyProgramFilter,r as LoyaltyProgramMethodTranslation,o as LoyaltyProgramPointLimit,l as LoyaltyProgramSpendingMethod};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { BaseModel } from "models/base";
|
|
1
2
|
import { LoyaltyWidgetImage } from "models/image";
|
|
2
3
|
import { HeaderBackgroundTypeEnum } from "../../types";
|
|
3
|
-
export declare class LoyaltyWidgetHeaderBackground {
|
|
4
|
+
export declare class LoyaltyWidgetHeaderBackground extends BaseModel {
|
|
4
5
|
bgColor: string | null;
|
|
5
6
|
image: LoyaltyWidgetImage | null;
|
|
6
7
|
type: HeaderBackgroundTypeEnum;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as
|
|
1
|
+
import{__extends as o}from'./../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as r,observable as e}from"mobx";import{BaseModel as i}from"../../../base.js";import{LoyaltyWidgetImage as m}from"../../../image/index.js";import{HeaderBackgroundTypeEnum as t}from"../../types/index.js";var s=function(i){function s(o){var s=i.call(this,o)||this;return s.bgColor=o.bgColor||null,s.image=o.image?new m(o.image):null,s.type=o.type||t.COLOR,r(s,{bgColor:e,image:e,type:e}),s}return o(s,i),s}(i);export{s as LoyaltyWidgetHeaderBackground};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseModel } from "models/base";
|
|
2
|
+
import { LoyaltyWidgetImage } from "models/image";
|
|
3
|
+
import { HeaderBackgroundTypeEnum } from "../types";
|
|
4
|
+
export declare class LoyaltyWidgetHeaderBackground extends BaseModel {
|
|
5
|
+
bgColor: string | null;
|
|
6
|
+
image: LoyaltyWidgetImage | null;
|
|
7
|
+
type: HeaderBackgroundTypeEnum;
|
|
8
|
+
constructor(data: Partial<LoyaltyWidgetHeaderBackground>);
|
|
9
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as o,observable as i}from"mobx";import{WidgetPositionEnum as r,LoyaltyWidgetLayoutTypeEnum as e,WidgetIconTypeEnum as t,BadgeIconTypeEnum as p}from"../types/index.js";var d=function(d){var s;void 0===d&&(d={}),this.position=d.position||r.RIGHT,this.type=d.type||e.
|
|
1
|
+
import{makeObservable as o,observable as i}from"mobx";import{WidgetPositionEnum as r,LoyaltyWidgetLayoutTypeEnum as e,WidgetIconTypeEnum as t,BadgeIconTypeEnum as p}from"../types/index.js";var d=function(d){var s;void 0===d&&(d={}),this.position=d.position||r.RIGHT,this.type=d.type||e.WIDGET,this.primaryColor=d.primaryColor||null,this.cartBorderRadius=null!==(s=d.cartBorderRadius)&&void 0!==s?s:0,this.widgetIconType=d.widgetIconType||t.NORMAL,this.badgeIconLevel=d.badgeIconLevel||p.LEVEL_1,o(this,{position:i,type:i,primaryColor:i,cartBorderRadius:i,widgetIconType:i,badgeIconLevel:i})};export{d as LoyaltyWidgetSettings};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LoyaltyProgramSpendingMethod } from "../loyalty-program-spending-method";
|
|
2
2
|
import type { LoyaltyProgramEarningMethod } from "../loyalty-program-earning-method";
|
|
3
|
-
import type { LoyaltyCustomerInfo
|
|
3
|
+
import type { LoyaltyCustomerInfo } from "../loyalty-customer-info";
|
|
4
4
|
import type { LoyaltyWidget } from "../loyalty-widget";
|
|
5
5
|
import type { LoyaltyProgramPointHistory } from "../loyalty-program-point-history";
|
|
6
6
|
export declare enum LoyaltyWidgetScreenTypeEnum {
|
|
@@ -41,6 +41,11 @@ export declare enum PeriodTypeEnum {
|
|
|
41
41
|
WEEK = "WEEK",
|
|
42
42
|
YEAR = "YEAR"
|
|
43
43
|
}
|
|
44
|
+
export declare class LoyaltyProgramPeriod {
|
|
45
|
+
period: string;
|
|
46
|
+
periodType: PeriodTypeEnum;
|
|
47
|
+
constructor(data?: Partial<LoyaltyProgramPeriod>);
|
|
48
|
+
}
|
|
44
49
|
export type Category = {
|
|
45
50
|
id: string;
|
|
46
51
|
name: string;
|
|
@@ -75,16 +80,45 @@ export type StringFilterInput = {
|
|
|
75
80
|
endsWith?: string;
|
|
76
81
|
nendsWith?: string;
|
|
77
82
|
};
|
|
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
|
+
};
|
|
78
101
|
export type ListLoyaltyProgramTierInput = {
|
|
79
102
|
id?: StringFilterInput;
|
|
103
|
+
includeDeleted?: boolean;
|
|
80
104
|
loyaltyProgramId?: StringFilterInput;
|
|
81
105
|
};
|
|
82
106
|
export declare enum LoyaltyProgramPointHistoryTypeEnum {
|
|
83
107
|
EARN = "EARN",
|
|
84
108
|
SPEND = "SPEND"
|
|
85
109
|
}
|
|
110
|
+
export type LoyaltyProgramPointHistoryTypeEnumFilterInput = {
|
|
111
|
+
eq?: LoyaltyProgramPointHistoryTypeEnum;
|
|
112
|
+
in?: LoyaltyProgramPointHistoryTypeEnum[];
|
|
113
|
+
ne?: LoyaltyProgramPointHistoryTypeEnum;
|
|
114
|
+
nin?: LoyaltyProgramPointHistoryTypeEnum[];
|
|
115
|
+
};
|
|
86
116
|
export type ListLoyaltyProgramPointHistoryInput = {
|
|
117
|
+
customerId?: StringFilterInput;
|
|
118
|
+
includeDeleted?: boolean;
|
|
87
119
|
loyaltyProgramId?: StringFilterInput;
|
|
120
|
+
sort?: string;
|
|
121
|
+
type?: LoyaltyProgramPointHistoryTypeEnumFilterInput;
|
|
88
122
|
};
|
|
89
123
|
export type LoyaltyWidgetCallbacks = {
|
|
90
124
|
listSpendingMethodsByCartId: (cartId?: string | null) => Promise<LoyaltyProgramSpendingMethod[]>;
|
|
@@ -108,5 +142,4 @@ export type IkasLoyaltyWidgetConfig = {
|
|
|
108
142
|
currency: string;
|
|
109
143
|
locale: string;
|
|
110
144
|
callbacks: LoyaltyWidgetCallbacks;
|
|
111
|
-
position?: "fixed" | "absolute";
|
|
112
145
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{makeObservable as E,observable as R}from"mobx";var T,_,N,C,O,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"}(T||(T={})),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"}(_||(_={})),function(E){E.DYNAMIC_ORDER_AMOUNT="DYNAMIC_ORDER_AMOUNT",E.DYNAMIC_ORDER_QUANTITY="DYNAMIC_ORDER_QUANTITY",E.STATIC="STATIC"}(N||(N={})),function(E){E.FIXED_AMOUNT="FIXED_AMOUNT",E.FREE_PRODUCT="FREE_PRODUCT",E.FREE_SHIPPING="FREE_SHIPPING",E.RATIO="RATIO"}(C||(C={})),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"}(O||(O={})),function(E){E.MONTH="MONTH",E.WEEK="WEEK",E.YEAR="YEAR"}(A||(A={}));var D,I=function(T){void 0===T&&(T={}),this.period=T.period||"",this.periodType=T.periodType||A.MONTH,E(this,{period:R,periodType:R})};!function(E){E.EARN="EARN",E.SPEND="SPEND"}(D||(D={}));export{_ as EarningMethodTypeEnum,O as LoyaltyProgramFilterTypeEnum,C as LoyaltyProgramMethodSpendingTypeEnum,I as LoyaltyProgramPeriod,N as LoyaltyProgramPointEarningTypeEnum,D as LoyaltyProgramPointHistoryTypeEnum,T as LoyaltyWidgetScreenTypeEnum,A as PeriodTypeEnum};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"react";import{
|
|
1
|
+
import o from"react";import{Button as t,Loader as e}from"./style.js";var r=function(r){var i=r.children,d=r.onClick,l=r.button,n=r.fontSize,a=r.paddingSize,u=r.fullWidth,b=void 0!==u&&u,s=r.disabled,f=void 0!==s&&s,C=r.isLoading,c=void 0!==C&&C;return o.createElement(t,{onClick:d,fullWidth:b,fontSize:n,paddingSize:a,borderRadius:l.buttonRadius,bgColor:l.bgColor,textColor:l.textColor,borderColor:l.borderColor,disabled:f||c},c&&o.createElement(e,null),i)};export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import r,{keyframes as o}from
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import r,{keyframes as o}from'./../../../ext/styled-components/dist/styled-components.browser.esm.js';import{textXSMedium as e,textSM as t,textSMMedium as i,textMDMedium as d,textLGSemiBold as a,displayXSSemiBold as s}from"../style/typography.js";var l,u,p,c={textXSMedium:e,textSM:t,textSMMedium:i,textMDMedium:d,textLGSemiBold:a,displayXSSemiBold:s},m={small:"8px",medium:"10px 16px"},b=r.button(l||(l=n(["\n border: none;\n cursor: ",";\n transition: all 0.2s ease;\n opacity: ",";\n pointer-events: ",";\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 gap: 8px;\n\n &:hover {\n opacity: 0.9;\n }\n"],["\n border: none;\n cursor: ",";\n transition: all 0.2s ease;\n opacity: ",";\n pointer-events: ",";\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 gap: 8px;\n\n &:hover {\n opacity: 0.9;\n }\n"])),function(n){return n.disabled?"not-allowed":"pointer"},function(n){return n.disabled?.5:1},function(n){return n.disabled?"none":"auto"},function(n){return c[n.fontSize]},function(n){return m[n.paddingSize]},function(n){return n.borderRadius},function(n){return n.fullWidth?"100%":"auto"},function(n){var r;return null!==(r=n.bgColor)&&void 0!==r?r:"transparent"},function(n){var r;return null!==(r=n.textColor)&&void 0!==r?r:"inherit"},function(n){return n.borderColor?"1px solid ".concat(n.borderColor):"none"}),f=o(u||(u=n(["\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n"],["\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n"]))),x=r.div(p||(p=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 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 animation: "," 1s linear infinite;\n"])),f);export{b as Button,x as Loader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import{WidgetIconTypeEnum as e}from"../../../models/loyalty-widget/types/index.js";import
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import{WidgetIconTypeEnum as e}from"../../../models/loyalty-widget/types/index.js";import t,{css as r}from'./../../../ext/styled-components/dist/styled-components.browser.esm.js';import{textSMMedium as i,textSM as o}from"../style/typography.js";var s,a,d,p,l,f,c,x,g,u,m,b=t.div(s||(s=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"],["\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"])),function(n){return n.$padding||"16px 14px"},function(n){return n.$borderRadius},function(n){return n.$isCompleted?"0.8":"1"}),y=t.div(a||(a=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"]))),h=t.div(l||(l=n(["\n display: flex;\n width: 36px;\n height: 36px;\n\n justify-content: center;\n align-items: center;\n\n ","\n\n ","\n"],["\n display: flex;\n width: 36px;\n height: 36px;\n\n justify-content: center;\n align-items: center;\n\n ","\n\n ","\n"])),function(t){return t.$iconType===e.ILLUSTRATION&&r(d||(d=n(["\n border-radius: 40px;\n background: #f6f6f6;\n "],["\n border-radius: 40px;\n background: #f6f6f6;\n "])))},function(t){return t.$iconType===e.NORMAL&&r(p||(p=n(["\n border-radius: 8px;\n border: 1px solid #e3e8ef;\n background: #fff;\n box-shadow: 0 -3px 1px 0 rgba(238, 242, 246, 0.5) inset,\n 0 4px 1px 0 rgba(38, 69, 109, 0), 0 2px 1px 0 rgba(38, 69, 109, 0.01),\n 0 1px 1px 0 rgba(38, 69, 109, 0.02), 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: 0 -3px 1px 0 rgba(238, 242, 246, 0.5) inset,\n 0 4px 1px 0 rgba(38, 69, 109, 0), 0 2px 1px 0 rgba(38, 69, 109, 0.01),\n 0 1px 1px 0 rgba(38, 69, 109, 0.02), 0 1px 1px 0 rgba(38, 69, 109, 0.03);\n\n svg {\n color: #4b5565;\n }\n "])))}),w=t.div(f||(f=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"]))),v=t.div(c||(c=n(["\n color: #121926;\n ","\n"],["\n color: #121926;\n ","\n"])),i),j=t.div(x||(x=n(["\n color: #121926;\n ","\n"],["\n color: #121926;\n ","\n"])),o),$=t.div(g||(g=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"}),k=t.div(u||(u=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: opacity 300ms ease-in-out, 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: opacity 300ms ease-in-out, padding-top 300ms ease-in-out;\n"])),o,function(n){return n.$isOpen?"20px":"0px"},function(n){return n.$isOpen?1:0}),O=t.button(m||(m=n(["\n border: none;\n background: none;\n cursor: pointer;\n transform: rotate(",");\n transition: transform 0.2s ease-in-out;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #9aa4b2;\n padding: 4px;\n"],["\n border: none;\n background: none;\n cursor: pointer;\n transform: rotate(",");\n transition: transform 0.2s ease-in-out;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #9aa4b2;\n padding: 4px;\n"])),function(n){return n.$isOpen?"270deg":"180deg"});export{k as AccordionInner,$ as AccordionWrapper,O as ArrowButton,b as Container,w as Content,j as Description,y as Header,h as IconWrapper,v as Title};
|
|
@@ -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 o from'./../../../ext/styled-components/dist/styled-components.browser.esm.js';import{textSMMedium as s}from"../style/typography.js";var m,p=o.div(m||(m=n(["\n ","\n margin: 0;\n padding: 16px 24px;\n"],["\n ","\n margin: 0;\n padding: 16px 24px;\n"])),s);export{p as Title};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import t,{css as e}from
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import t,{css as e}from'./../../../ext/styled-components/dist/styled-components.browser.esm.js';var o,i,l,f,s,p,h,x,g,r,a=e(o||(o=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"]))),m=e(i||(i=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"]))),d=e(l||(l=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"]))),y=e(f||(f=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"]))),c=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"]))),w=e(p||(p=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"]))),z=e(h||(h=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"]))),b=e(x||(x=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"]))),u=e(g||(g=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"]))),j=t.span(r||(r=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"])),m);export{j as Badge,u as displayXSSemiBold,w as textLGMedium,z as textLGSemiBold,c as textMDMedium,m as textSM,d as textSMMedium,y as textSMSemiBold,b as textXLSemiBold,a as textXSMedium};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
type Props = {
|
|
4
|
-
config?: IkasLoyaltyWidgetConfig;
|
|
5
|
-
};
|
|
2
|
+
import "./utils/i18n";
|
|
3
|
+
type Props = {};
|
|
6
4
|
declare const LoyaltyWidgetRenderer: React.FC<Props>;
|
|
7
5
|
export default LoyaltyWidgetRenderer;
|
package/build/renderer/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t,__spreadArray as
|
|
1
|
+
import{__awaiter as e,__generator as t,__spreadArray as r}from'./../ext/tslib/tslib.es6.mjs.js';import n,{useState as o,useRef as s,useEffect as i}from"react";import{observer as c}from"mobx-react";import"./utils/i18n.js";import{LoyaltyWidgetScreenTypeEnum as a,EarningMethodTypeEnum as l,LoyaltyProgramFilterTypeEnum as d,LoyaltyProgramMethodSpendingTypeEnum as u}from"../models/types/index.js";import f from"./screens/main-screen/index.js";import m from"./screens/credit-spending-methods-screen/index.js";import p from"./screens/credit-earning-methods-screen/index.js";import E from"./screens/credit-history-screen/index.js";import y from"./screens/loyalty-level-screen/index.js";import{LoyaltyWidgetViewModel as g}from"../models/index.js";import{LoyaltyWidget as h}from"../models/loyalty-widget/index.js";import{LoyaltyProgramSpendingMethod as C}from"../models/loyalty-program-spending-method/index.js";import{LoyaltyCustomerInfo as v}from"../models/loyalty-customer-info/index.js";import{LoyaltyProgramEarningMethod as R}from"../models/loyalty-program-earning-method/index.js";import{LoyaltyProgramPointHistory as b}from"../models/loyalty-program-point-history/index.js";import{Container as S,Drawer as I,ScreenWrapper as k}from"./style.js";var A=c(function(){var c=o(function(){var e=window.ikasLoyaltyWidgetConfig;return new g({cartId:e?e.cartId:null},e.cdnURL,e.merchantId,e.currency,e.locale,e.callbacks)})[0],A=s(!0);i(function(){e(void 0,void 0,void 0,function(){var e,n,o,s,i,a,f,m,p,E,y,g,S,I;return t(this,function(t){switch(t.label){case 0:if(!c.callbacks)return[3,6];t.label=1;case 1:return t.trys.push([1,4,5,6]),e=[c.callbacks.getLoyaltyWidget(),c.callbacks.listEarningMethods(),c.callbacks.listLoyaltyProgramTier({includeDeleted:!1})],c.cartId&&(e.push(c.callbacks.listSpendingMethodsByCartId(c.cartId)),e.push(c.callbacks.getLoyaltyCustomerInfo()),e.push(c.callbacks.listLoyaltyProgramPointHistory({}))),[4,Promise.all(e)];case 2:return n=t.sent(),o=n[0],s=n[1],i=n[2],a=[],f=null,m=[],c.cartId&&(a=n[3],f=n[4],m=n[5]),c.loyaltyWidget=new h(o),c.earningMethods=s.map(function(e){return new R(e)}),c.tiers=i||[],c.cartId&&(c.spendingMethods=a.map(function(e){return new C(e)}),c.user=f?new v(f):null,c.pointHistory=m?m.map(function(e){return new b(e)}):[]),p=new Set,E=new Set,y=new Set,g=new Set,c.earningMethods.forEach(function(e){var t,n;e.methodType===l.ORDER_CREATE&&r(r([],(null===(t=e.orderSettings)||void 0===t?void 0:t.productFilters)||[],!0),(null===(n=e.productSettings)||void 0===n?void 0:n.productFilters)||[],!0).forEach(function(e){e.type===d.PRODUCT_AND_VARIANT?e.idList.forEach(function(e){return p.add(e)}):e.type===d.CATEGORY?e.idList.forEach(function(e){return E.add(e)}):e.type===d.PRODUCT_BRAND?e.idList.forEach(function(e){return y.add(e)}):e.type===d.PRODUCT_TAG&&e.idList.forEach(function(e){return g.add(e)})})}),c.spendingMethods&&c.spendingMethods.forEach(function(e){var t,r;e.type===u.FREE_PRODUCT&&(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)&&p.add(e.discountSettings.freeProductId),null===(r=e.productFilters)||void 0===r||r.forEach(function(e){e.type===d.PRODUCT_AND_VARIANT?e.idList.forEach(function(e){return p.add(e)}):e.type===d.CATEGORY?e.idList.forEach(function(e){return E.add(e)}):e.type===d.PRODUCT_BRAND?e.idList.forEach(function(e){return y.add(e)}):e.type===d.PRODUCT_TAG&&e.idList.forEach(function(e){return g.add(e)})})}),S=[],p.size>0&&c.callbacks.getProducts&&S.push(c.callbacks.getProducts(Array.from(p)).then(function(e){return c.products=e})),E.size>0&&c.callbacks.getCategories&&S.push(c.callbacks.getCategories(Array.from(E)).then(function(e){return c.categories=e})),y.size>0&&c.callbacks.getBrands&&S.push(c.callbacks.getBrands(Array.from(y)).then(function(e){return c.brands=e})),g.size>0&&c.callbacks.getTags&&S.push(c.callbacks.getTags(Array.from(g)).then(function(e){return c.tags=e})),[4,Promise.all(S)];case 3:return t.sent(),[3,6];case 4:return I=t.sent(),console.error("Failed to initialize loyalty data",I),[3,6];case 5:return A.current=!1,[7];case 6:return[2]}})})},[]),i(function(){if(!A.current){e(void 0,void 0,void 0,function(){var e,r,n,o,s;return t(this,function(t){switch(t.label){case 0:if(!c.callbacks)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Promise.all([c.callbacks.listSpendingMethodsByCartId(c.cartId),c.callbacks.getLoyaltyCustomerInfo(),c.callbacks.listLoyaltyProgramPointHistory({})])];case 2:return e=t.sent(),r=e[0],n=e[1],o=e[2],c.spendingMethods=r.map(function(e){return new C(e)}),c.user=n?new v(n):null,c.pointHistory=o?o.map(function(e){return new b(e)}):[],[3,4];case 3:return s=t.sent(),console.error("Failed to fetch cart dependent data",s),[3,4];case 4:return[2]}})})}},[c.cartId]);var N=function(e){c.selectedScreen=e},_=function(){var e;(null===(e=c.callbacks)||void 0===e?void 0:e.onWidgetClose)&&c.callbacks.onWidgetClose()},T=c.selectedScreen===a.MAIN_SCREEN,w=o(null),M=w[0],L=w[1];i(function(){c.selectedScreen!==a.MAIN_SCREEN&&L(c.selectedScreen)},[c.selectedScreen]);var P=T?M:c.selectedScreen;return n.createElement(S,null,n.createElement(I,null,n.createElement(k,{$isActive:T,$isMain:!0},n.createElement(f,{viewModel:c,onClose:_,onNavigate:N})),n.createElement(k,{$isActive:!T,$isMain:!1},function(){switch(P){case a.CREDIT_SPENDING_METHODS_SCREEN:return n.createElement(m,{viewModel:c,onBack:function(){return N(a.MAIN_SCREEN)},onClose:_});case a.CREDIT_EARNING_METHODS_SCREEN:return n.createElement(p,{viewModel:c,onBack:function(){return N(a.MAIN_SCREEN)},onClose:_});case a.CREDIT_HISTORY_SCREEN:return n.createElement(E,{viewModel:c,onBack:function(){return N(a.MAIN_SCREEN)},onClose:_});case a.LOYALTY_LEVEL_SCREEN:return n.createElement(y,{viewModel:c,onBack:function(){return N(a.MAIN_SCREEN)},onClose:_});default:return null}}())))});export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"mobx-react";import
|
|
1
|
+
import e from"react";import{observer as t}from"mobx-react";import{useTranslation as n}from"react-i18next";import o from"../main-screen/earning-methods-section/index.js";import{ChevronLeft as r}from"../../../assets/icons/chevron-left.js";import{XClose as l}from"../../../assets/icons/x-close.js";import{Container as c,Header as i,IconButton as m,Title as a,Content as s}from"./style.js";import{EarningMethodTypeEnum as d}from"../../../models/types/index.js";var f=t(function(t){var f=t.viewModel,p=t.onBack,E=t.onClose,u=n().t;return e.createElement(c,null,e.createElement(i,null,e.createElement(m,{onClick:p},e.createElement(r,null)),e.createElement(a,null,u("screens.creditEarningMethods")),e.createElement(m,{onClick:E},e.createElement(l,null))),e.createElement(s,null,e.createElement(o,{containerStyle:{paddingRight:16,paddingLeft:16},viewModel:f,getActionProps:function(e){return e.methodType===d.CUSTOMER_REGISTER?{actionText:u("common.create"),onClick:function(){}}:e.methodType===d.ENABLE_SUBSCRIPTION?{actionText:u("common.allow"),onClick:function(){}}:null}})))});export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import o from
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import o from'./../../../ext/styled-components/dist/styled-components.browser.esm.js';import{textMDMedium as e}from"../../components/style/typography.js";var t,i,r,d,l,p=o.div(t||(t=n(["\n display: flex;\n flex-direction: column;\n height: 100%;\n"],["\n display: flex;\n flex-direction: column;\n height: 100%;\n"]))),s=o.div(i||(i=n(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px;\n border-bottom: 1px solid #EEF2F6;\n position: sticky;\n top: 0;\n background-color: #ffffff;\n z-index: 10;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px;\n border-bottom: 1px solid #EEF2F6;\n position: sticky;\n top: 0;\n background-color: #ffffff;\n z-index: 10;\n"]))),c=o.div(r||(r=n(["\n ","\n color: #121926;\n text-align: center;\n flex: 1;\n"],["\n ","\n color: #121926;\n text-align: center;\n flex: 1;\n"])),e),f=o.button(d||(d=n(["\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #697586;\n \n &:hover {\n opacity: 0.8;\n }\n"],["\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #697586;\n \n &:hover {\n opacity: 0.8;\n }\n"]))),a=o.div(l||(l=n(["\n padding-top: 20px;\n padding-bottom: 20px;\n flex: 1;\n overflow-y: auto;\n"],["\n padding-top: 20px;\n padding-bottom: 20px;\n flex: 1;\n overflow-y: auto;\n"])));export{p as Container,a as Content,s as Header,f as IconButton,c as Title};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"mobx-react";import
|
|
1
|
+
import e from"react";import{observer as t}from"mobx-react";import{useTranslation as n}from"react-i18next";import{XClose as r}from"../../../assets/icons/x-close.js";import{ChevronLeft as l}from"../../../assets/icons/chevron-left.js";import{Container as a,Header as m,IconButton as o,Title as c,Content as i,PointsSection as s,PointsTitle as u,PointsValue as E,HistoryList as f,HistoryItem as p,HistoryItemLeft as d,HistoryItemTitle as y,HistoryItemDate as h,HistoryItemAmount as v,Divider as x}from"./style.js";import{LoyaltyProgramPointHistoryTypeEnum as j}from"../../../models/types/index.js";var k=t(function(t){var k=t.viewModel,g=t.onBack,w=t.onClose,C=n().t,T=k.user,A=k.pointHistory,D=k.locale;return e.createElement(a,null,e.createElement(m,null,e.createElement(o,{onClick:g},e.createElement(l,null)),e.createElement(c,null,C("screens.creditHistory")),e.createElement(o,{onClick:w},e.createElement(r,null))),e.createElement(i,null,T&&e.createElement(s,null,e.createElement(u,null,C("header.earnedPoints")),e.createElement(E,null,T.totalPoint)),e.createElement(f,null,A.map(function(t,n){var r=t.type===j.EARN;return e.createElement(e.Fragment,{key:t.id},e.createElement(p,null,e.createElement(d,null,e.createElement(y,null,C(r?"history.earnedTitle":"history.spentTitle")),e.createElement(h,null,function(e){if(!e)return"";try{return new Intl.DateTimeFormat(D,{day:"numeric",month:"long",year:"numeric"}).format(new Date(e))}catch(t){return e}}(t.createdAt))),e.createElement(v,{$isEarn:r},r?"":"-",t.amount)),n<A.length-1&&e.createElement(x,null))}))))});export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import e from
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import e from'./../../../ext/styled-components/dist/styled-components.browser.esm.js';import{textMDMedium as o,textSMMedium as i,textXLSemiBold as p,textXSMedium as t,textLGMedium as r}from"../../components/style/typography.js";var d,l,a,x,f,c,s,g,b,m,u,y,v,h,w,j=e.div(d||(d=n(["\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: #ffffff;\n"],["\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: #ffffff;\n"]))),k=e.div(l||(l=n(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px;\n border-bottom: 1px solid #eef2f6;\n position: sticky;\n top: 0;\n background-color: #ffffff;\n z-index: 10;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px;\n border-bottom: 1px solid #eef2f6;\n position: sticky;\n top: 0;\n background-color: #ffffff;\n z-index: 10;\n"]))),z=e.div(a||(a=n(["\n ","\n color: #121926;\n text-align: center;\n flex: 1;\n"],["\n ","\n color: #121926;\n text-align: center;\n flex: 1;\n"])),o),_=e.button(x||(x=n(["\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #697586;\n\n &:hover {\n opacity: 0.8;\n }\n"],["\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #697586;\n\n &:hover {\n opacity: 0.8;\n }\n"]))),E=e.div(f||(f=n(["\n padding-top: 20px;\n padding-bottom: 20px;\n flex: 1;\n overflow-y: auto;\n"],["\n padding-top: 20px;\n padding-bottom: 20px;\n flex: 1;\n overflow-y: auto;\n"]))),$=e.div(c||(c=n(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px;\n border-radius: 6px;\n border: 1px solid #eef2f6;\n background: #fff;\n box-shadow: 0 7px 2px 0 rgba(0, 0, 0, 0), 0 5px 2px 0 rgba(0, 0, 0, 0.01),\n 0 3px 2px 0 rgba(0, 0, 0, 0.02), 0 1px 1px 0 rgba(0, 0, 0, 0.03),\n 0 0 1px 0 rgba(0, 0, 0, 0.04);\n margin: 0 16px 24px 16px;\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px;\n border-radius: 6px;\n border: 1px solid #eef2f6;\n background: #fff;\n box-shadow: 0 7px 2px 0 rgba(0, 0, 0, 0), 0 5px 2px 0 rgba(0, 0, 0, 0.01),\n 0 3px 2px 0 rgba(0, 0, 0, 0.02), 0 1px 1px 0 rgba(0, 0, 0, 0.03),\n 0 0 1px 0 rgba(0, 0, 0, 0.04);\n margin: 0 16px 24px 16px;\n"]))),q=e.div(s||(s=n(["\n ","\n color: #121926;\n"],["\n ","\n color: #121926;\n"])),i),A=e.div(g||(g=n(["\n ","\n color: #121926;\n"],["\n ","\n color: #121926;\n"])),p),B=e.div(b||(b=n(["\n display: flex;\n flex-direction: column;\n padding: 0 16px;\n margin-top: 4px;\n"],["\n display: flex;\n flex-direction: column;\n padding: 0 16px;\n margin-top: 4px;\n"]))),C=e.div(m||(m=n(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 12px 0 6px;\n gap: 16px;\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 12px 0 6px;\n gap: 16px;\n"]))),D=e.div(u||(u=n(["\n display: flex;\n flex-direction: column;\n gap: 4px;\n"],["\n display: flex;\n flex-direction: column;\n gap: 4px;\n"]))),F=e.div(y||(y=n(["\n ","\n color: #121926;\n"],["\n ","\n color: #121926;\n"])),i),G=e.div(v||(v=n(["\n ","\n color: #697586;\n"],["\n ","\n color: #697586;\n"])),t),H=e.div(h||(h=n(["\n ","\n color: ",";\n"],["\n ","\n color: ",";\n"])),r,function(n){return n.$isEarn?"#121926":"#697586"}),I=e.div(w||(w=n(["\n height: 1px;\n background-color: #eef2f6;\n margin: 16px 0;\n width: 100%;\n"],["\n height: 1px;\n background-color: #eef2f6;\n margin: 16px 0;\n width: 100%;\n"])));export{j as Container,E as Content,I as Divider,k as Header,C as HistoryItem,H as HistoryItemAmount,G as HistoryItemDate,D as HistoryItemLeft,F as HistoryItemTitle,B as HistoryList,_ as IconButton,$ as PointsSection,q as PointsTitle,A as PointsValue,z as Title};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"mobx-react";import
|
|
1
|
+
import e from"react";import{observer as t}from"mobx-react";import{useTranslation as n}from"react-i18next";import r from"../main-screen/spending-methods-section/index.js";import{ChevronLeft as l}from"../../../assets/icons/chevron-left.js";import{XClose as o}from"../../../assets/icons/x-close.js";import{Container as c,Header as m,IconButton as a,Title as i,Content as s,PointsSection as u,PointsTitle as d,PointsValue as E}from"./style.js";var f=t(function(t){var f=t.viewModel,p=t.onBack,v=t.onClose,x=n().t,h=f.user;return e.createElement(c,null,e.createElement(m,null,e.createElement(a,{onClick:p},e.createElement(l,null)),e.createElement(i,null,x("screens.creditSpendingMethods")),e.createElement(a,{onClick:v},e.createElement(o,null))),e.createElement(s,null,h&&e.createElement(u,null,e.createElement(d,null,x("header.earnedPoints")),e.createElement(E,null,h.totalPoint)),e.createElement(r,{viewModel:f,mode:"accordion",getActionProps:function(e){return null}})))});export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import o from
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import o from'./../../../ext/styled-components/dist/styled-components.browser.esm.js';import{textMDMedium as e,textSMMedium as t,textXLSemiBold as r}from"../../components/style/typography.js";var p,i,d,f,a,x,l,s,c=o.div(p||(p=n(["\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: #ffffff;\n"],["\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: #ffffff;\n"]))),g=o.div(i||(i=n(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px;\n border-bottom: 1px solid #eef2f6;\n position: sticky;\n top: 0;\n background-color: #ffffff;\n z-index: 10;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px;\n border-bottom: 1px solid #eef2f6;\n position: sticky;\n top: 0;\n background-color: #ffffff;\n z-index: 10;\n"]))),b=o.div(d||(d=n(["\n ","\n color: #121926;\n text-align: center;\n flex: 1;\n"],["\n ","\n color: #121926;\n text-align: center;\n flex: 1;\n"])),e),m=o.button(f||(f=n(["\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #697586;\n\n &:hover {\n opacity: 0.8;\n }\n"],["\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #697586;\n\n &:hover {\n opacity: 0.8;\n }\n"]))),u=o.div(a||(a=n(["\n padding-top: 20px;\n padding-bottom: 20px;\n flex: 1;\n overflow-y: auto;\n"],["\n padding-top: 20px;\n padding-bottom: 20px;\n flex: 1;\n overflow-y: auto;\n"]))),y=o.div(x||(x=n(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px;\n border-radius: 6px;\n border: 1px solid #eef2f6;\n background: #fff;\n box-shadow: 0 7px 2px 0 rgba(0, 0, 0, 0), 0 5px 2px 0 rgba(0, 0, 0, 0.01),\n 0 3px 2px 0 rgba(0, 0, 0, 0.02), 0 1px 1px 0 rgba(0, 0, 0, 0.03),\n 0 0 1px 0 rgba(0, 0, 0, 0.04);\n margin: 0 16px 28px 16px;\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px;\n border-radius: 6px;\n border: 1px solid #eef2f6;\n background: #fff;\n box-shadow: 0 7px 2px 0 rgba(0, 0, 0, 0), 0 5px 2px 0 rgba(0, 0, 0, 0.01),\n 0 3px 2px 0 rgba(0, 0, 0, 0.02), 0 1px 1px 0 rgba(0, 0, 0, 0.03),\n 0 0 1px 0 rgba(0, 0, 0, 0.04);\n margin: 0 16px 28px 16px;\n"]))),v=o.div(l||(l=n(["\n ","\n color: #121926;\n"],["\n ","\n color: #121926;\n"])),t),j=o.div(s||(s=n(["\n ","\n color: #121926;\n"],["\n ","\n color: #121926;\n"])),r);export{c as Container,u as Content,g as Header,m as IconButton,y as PointsSection,v as PointsTitle,j as PointsValue,b as Title};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__spreadArray as e}from'./../../../ext/tslib/tslib.es6.mjs.js';import t,{useMemo as n}from"react";import{observer as l}from"mobx-react";import
|
|
1
|
+
import{__spreadArray as e}from'./../../../ext/tslib/tslib.es6.mjs.js';import t,{useMemo as n}from"react";import{observer as l}from"mobx-react";import{useTranslation as r}from"react-i18next";import{ChevronLeft as o}from"../../../assets/icons/chevron-left.js";import{XClose as i}from"../../../assets/icons/x-close.js";import{Container as c,Header as a,IconButton as u,Title as m,Content as s,PointsSection as d,PointsText as p,PointsValue as E,ProgressBarContainer as f,ProgressBarFill as v,DescriptionText as y,TimelineContainer as x,TimelineItem as g,TimelineLine as P,CheckIconContainer as h,CurrentIndicator as q,CurrentIndicatorDot as R,UpcomingIndicator as L,TimelineContent as j,TimelineTitle as k,TimelineDescription as S,MultiplierSection as T,MultiplierValue as b}from"./style.js";import{Check as C}from"../../../assets/icons/check.js";var I=l(function(l){var I=l.viewModel,M=l.onBack,$=l.onClose,N=r().t,w=I.user,B=I.tiers,W=n(function(){return e([],B,!0).sort(function(e,t){return(e.pointsRequired||0)-(t.pointsRequired||0)})},[B]),_=n(function(){return(null==w?void 0:w.customerTierId)?W.findIndex(function(e){var t;return e.id===(null===(t=w.customerTierId)||void 0===t?void 0:t.id)}):-1},[W,null==w?void 0:w.customerTierId]);console.log("currentTierIndex",_);var z=n(function(){return w?-1===_?W.find(function(e){return(e.pointsRequired||0)>w.totalPoint})||W[0]:W[_+1]||null:null},[W,_,w]),A=n(function(){return w?z?0===(z.pointsRequired||0)?100:Math.min(w.totalPoint/(z.pointsRequired||1)*100,100):100:0},[w,z]),D=n(function(){return w&&z?Math.max(0,(z.pointsRequired||0)-w.totalPoint):0},[w,z]);return w?t.createElement(c,null,t.createElement(a,null,t.createElement(u,{onClick:M},t.createElement(o,null)),t.createElement(m,null,N("screens.loyaltyLevel")),t.createElement(u,{onClick:$},t.createElement(i,null))),t.createElement(s,null,t.createElement(d,null,t.createElement("div",null,t.createElement(p,null,N("header.earnedPoints")),t.createElement(E,null,w.totalPoint," ",N("common.points"))),t.createElement(f,null,t.createElement(v,{$percentage:A,$color:I.loyaltyWidget.header.background.bgColor||void 0})),t.createElement(y,null,z?N("screens.loyaltyLevelScreen.reachNextTier",{tierName:z.name,points:D}):N("screens.loyaltyLevelScreen.allTiersCompleted"))),t.createElement(x,null,W.map(function(e,n){var l="upcoming";_>-1?l=n<_?"completed":n===_?"current":"upcoming":w.totalPoint>=(e.pointsRequired||0)&&(l="completed");var r=n===W.length-1;return t.createElement(g,{key:e.id},t.createElement(P,{$isLast:r}),"completed"===l?t.createElement(h,null,t.createElement(C,null)):"current"===l?t.createElement(q,null,t.createElement(R,null)):t.createElement(L,null),t.createElement(j,null,t.createElement(k,{$status:l},e.name),t.createElement(S,{$status:l},e.pointsRequired||0," ",N("common.points")," ",N("screens.loyaltyLevelScreen.afterEarning")),(e.tierPointMultiplier||1)>1&&t.createElement(T,null,N("screens.loyaltyLevelScreen.multiplierPrefix")," ",t.createElement(b,null,e.tierPointMultiplier||1,"x")," ",N("screens.loyaltyLevelScreen.multiplierSuffix"))))})))):null});export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import e,{css as
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import e,{css as o}from'./../../../ext/styled-components/dist/styled-components.browser.esm.js';import{textMDMedium as i,textSM as t,textSMMedium as r,textSMSemiBold as d}from"../../components/style/typography.js";var a,p,l,x,c,s,f,g,u,b,h,m,y,v,k,w,j,B,$,z,A,C,G,E,_,F=e.div(a||(a=n(["\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: #ffffff;\n"],["\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: #ffffff;\n"]))),L=e.div(p||(p=n(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px;\n border-bottom: 1px solid #eef2f6;\n position: sticky;\n top: 0;\n background-color: #ffffff;\n z-index: 10;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px;\n border-bottom: 1px solid #eef2f6;\n position: sticky;\n top: 0;\n background-color: #ffffff;\n z-index: 10;\n"]))),q=e.div(l||(l=n(["\n ","\n color: #121926;\n text-align: center;\n flex: 1;\n"],["\n ","\n color: #121926;\n text-align: center;\n flex: 1;\n"])),i),D=e.button(x||(x=n(["\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #697586;\n\n &:hover {\n opacity: 0.8;\n }\n"],["\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #697586;\n\n &:hover {\n opacity: 0.8;\n }\n"]))),H=e.div(c||(c=n(["\n padding: 20px 16px;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n flex: 1;\n"],["\n padding: 20px 16px;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 24px;\n flex: 1;\n"]))),I=e.div(s||(s=n(["\n display: flex;\n width: 100%;\n padding: 16px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 16px;\n border-radius: 6px;\n border: 1px solid var(--Gray-Blue-100, #eef2f6);\n background: var(--Basic-50, #fff);\n box-shadow: 0 7px 2px 0 rgba(0, 0, 0, 0), 0 5px 2px 0 rgba(0, 0, 0, 0.01),\n 0 3px 2px 0 rgba(0, 0, 0, 0.02), 0 1px 1px 0 rgba(0, 0, 0, 0.03),\n 0 0 1px 0 rgba(0, 0, 0, 0.04);\n box-sizing: border-box;\n"],["\n display: flex;\n width: 100%;\n padding: 16px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 16px;\n border-radius: 6px;\n border: 1px solid var(--Gray-Blue-100, #eef2f6);\n background: var(--Basic-50, #fff);\n box-shadow: 0 7px 2px 0 rgba(0, 0, 0, 0), 0 5px 2px 0 rgba(0, 0, 0, 0.01),\n 0 3px 2px 0 rgba(0, 0, 0, 0.02), 0 1px 1px 0 rgba(0, 0, 0, 0.03),\n 0 0 1px 0 rgba(0, 0, 0, 0.04);\n box-sizing: border-box;\n"]))),J=e.div(f||(f=n(["\n ","\n color: #4B5565;\n text-align: center;\n"],["\n ","\n color: #4B5565;\n text-align: center;\n"])),t),K=e.div(g||(g=n(["\n ","\n color: #121926;\n margin-top: 2px;\n text-align: center;\n"],["\n ","\n color: #121926;\n margin-top: 2px;\n text-align: center;\n"])),i),M=e.div(u||(u=n(["\n width: 100%;\n height: 8px;\n border-radius: 4px;\n background: #eef2f6;\n overflow: hidden;\n"],["\n width: 100%;\n height: 8px;\n border-radius: 4px;\n background: #eef2f6;\n overflow: hidden;\n"]))),N=e.div(b||(b=n(["\n width: ","%;\n height: 100%;\n border-radius: 4px;\n background: linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0.5) 0%,\n rgba(255, 255, 255, 0.5) 100%\n ),\n ",";\n transition: width 0.3s ease-in-out;\n"],["\n width: ","%;\n height: 100%;\n border-radius: 4px;\n background: linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0.5) 0%,\n rgba(255, 255, 255, 0.5) 100%\n ),\n ",";\n transition: width 0.3s ease-in-out;\n"])),function(n){return n.$percentage},function(n){return n.$color||"#4F46E5"}),O=e.div(h||(h=n(["\n color: #4b5565;\n text-align: center;\n ","\n"],["\n color: #4b5565;\n text-align: center;\n ","\n"])),t),P=e.div(m||(m=n(["\n display: flex;\n flex-direction: column;\n width: 100%;\n padding: 0 6px;\n box-sizing: border-box;\n"],["\n display: flex;\n flex-direction: column;\n width: 100%;\n padding: 0 6px;\n box-sizing: border-box;\n"]))),Q=e.div(y||(y=n(["\n display: flex;\n gap: 16px;\n position: relative;\n padding-bottom: 32px;\n\n &:last-child {\n padding-bottom: 0;\n }\n"],["\n display: flex;\n gap: 16px;\n position: relative;\n padding-bottom: 32px;\n\n &:last-child {\n padding-bottom: 0;\n }\n"]))),R=e.div(v||(v=n(["\n position: absolute;\n left: 10px; /* Center of the 20px icon */\n top: 26px;\n bottom: 0;\n width: 1px;\n background-color: #9aa4b2;\n display: ",";\n"],["\n position: absolute;\n left: 10px; /* Center of the 20px icon */\n top: 26px;\n bottom: 0;\n width: 1px;\n background-color: #9aa4b2;\n display: ",";\n"])),function(n){return n.$isLast?"none":"block"}),S=e.div(k||(k=n(["\n flex: 1;\n display: flex;\n flex-direction: column;\n"],["\n flex: 1;\n display: flex;\n flex-direction: column;\n"]))),T=e.div(j||(j=n(["\n ","\n color: ",";\n\n ","\n"],["\n ","\n color: ",";\n\n ","\n"])),r,function(n){return"completed"===n.$status?"#697586":"#121926"},function(e){return"completed"===e.$status&&o(w||(w=n(["\n text-decoration-line: line-through;\n "],["\n text-decoration-line: line-through;\n "])))}),U=e.div($||($=n(["\n ","\n margin-top: 2px;\n color: ","; /* Current #4B5565. Completed #9AA4B2 */\n\n ","\n"],["\n ","\n margin-top: 2px;\n color: ","; /* Current #4B5565. Completed #9AA4B2 */\n\n ","\n"])),t,function(n){return"completed"===n.$status?"#9AA4B2":"#4B5565"},function(e){return"completed"===e.$status&&o(B||(B=n(["\n text-decoration-line: line-through;\n "],["\n text-decoration-line: line-through;\n "])))}),V=e.div(z||(z=n(["\n padding: 8px 16px;\n align-self: stretch;\n border-radius: 6px;\n background: var(--Gray-Blue-50, #f8fafc);\n margin-top: 12px;\n ","\n color: #4B5565;\n"],["\n padding: 8px 16px;\n align-self: stretch;\n border-radius: 6px;\n background: var(--Gray-Blue-50, #f8fafc);\n margin-top: 12px;\n ","\n color: #4B5565;\n"])),t),W=e.span(A||(A=n(["\n ","\n color: #5864E2;\n"],["\n ","\n color: #5864E2;\n"])),d),X=e.div(C||(C=n(["\n display: flex;\n width: 20px;\n height: 20px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 5px;\n\n border-radius: 10px;\n background: rgba(73, 90, 255, 0.1);\n\n svg {\n color: #495aff;\n }\n"],["\n display: flex;\n width: 20px;\n height: 20px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 5px;\n\n border-radius: 10px;\n background: rgba(73, 90, 255, 0.1);\n\n svg {\n color: #495aff;\n }\n"]))),Y=e.div(G||(G=n(["\n display: flex;\n width: 20px;\n height: 20px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 5px;\n\n border-radius: 10px;\n border: 0.8px solid #5864e2;\n background: #fff;\n"],["\n display: flex;\n width: 20px;\n height: 20px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 5px;\n\n border-radius: 10px;\n border: 0.8px solid #5864e2;\n background: #fff;\n"]))),Z=e.div(E||(E=n(["\n width: 10px;\n height: 10px;\n flex-shrink: 0;\n\n border-radius: 5px;\n background: #5864e2;\n"],["\n width: 10px;\n height: 10px;\n flex-shrink: 0;\n\n border-radius: 5px;\n background: #5864e2;\n"]))),nn=e.div(_||(_=n(["\n display: flex;\n width: 20px;\n height: 20px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 5px;\n border-radius: 10px;\n background: rgba(73, 90, 255, 0.1);\n"],["\n display: flex;\n width: 20px;\n height: 20px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 5px;\n border-radius: 10px;\n background: rgba(73, 90, 255, 0.1);\n"])));export{X as CheckIconContainer,F as Container,H as Content,Y as CurrentIndicator,Z as CurrentIndicatorDot,O as DescriptionText,L as Header,D as IconButton,V as MultiplierSection,W as MultiplierValue,I as PointsSection,J as PointsText,K as PointsValue,M as ProgressBarContainer,N as ProgressBarFill,P as TimelineContainer,S as TimelineContent,U as TimelineDescription,Q as TimelineItem,R as TimelineLine,T as TimelineTitle,q as Title,nn as UpcomingIndicator};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from'./../../../../ext/tslib/tslib.es6.mjs.js';import t from"react";import{observer as o}from"mobx-react";import
|
|
1
|
+
import{__assign as e}from'./../../../../ext/tslib/tslib.es6.mjs.js';import t from"react";import{observer as o}from"mobx-react";import{useTranslation as i}from"react-i18next";import{EarningMethodTypeEnum as n}from"../../../../models/types/index.js";import{getEarningMethodTitle as r,getEarningMethodIcon as d}from"../../../../utils.js";import l from"../../../components/loyalty-method-card/index.js";import{getEarningMethodDescriptionV2 as s}from"../../../utils/loyalty-details.js";var a=o(function(e){var o=e.method,a=e.viewModel,m=e.mode,c=e.actionText,p=e.onClick,u=i(),g=u.t,f=u.i18n,x=a.loyaltyWidget,y=f.language,v=o.translations.find(function(e){return e.locale===y}),h=(null==v?void 0:v.description)||o.description||r(o),E=d(o.methodType,x.settings.widgetIconType),T=o.orderSettings,R=(null==T?void 0:T.productFilters)||[],C=o.methodType===n.ORDER_CREATE&&T&&(T.minOrderAmount>0||T.maxOrderAmount>0||R.length>0),M=C?"accordion":m,b="",j="";if(C){b=g("earningMethods.xPoints",{points:o.pointsEarned});var w=s(g,o,a);w&&(j=t.createElement("div",{style:{fontSize:"14px",color:"#475467",lineHeight:"20px",fontWeight:400}},w))}else b=s(g,o,a)||g("earningMethods.xPoints",{points:o.pointsEarned});var k=!!a.user&&o.methodType===n.CUSTOMER_REGISTER;return t.createElement(l,{title:h,description:b,icon:E,action:c&&p?{text:c,onClick:p}:void 0,isCompleted:k,mode:M,settings:{borderRadius:x.settings.cartBorderRadius,widgetIconType:x.settings.widgetIconType,button:x.button}},j)}),m=o(function(o){var i=o.viewModel,n=o.containerStyle,r=o.mode,d=void 0===r?"card":r,l=o.getActionProps,s=i.earningMethods;return t.createElement("div",{style:e({display:"flex",flexDirection:"column",gap:"12px",padding:"0 24px"},n)},s.map(function(e){var o=l?l(e):null;return t.createElement(a,{key:e.id,method:e,viewModel:i,mode:d,actionText:null==o?void 0:o.actionText,onClick:null==o?void 0:o.onClick})}))});export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"mobx-react";import
|
|
1
|
+
import e from"react";import{observer as t}from"mobx-react";import{useTranslation as r}from"react-i18next";import{Container as n,TitleSection as l,RegisterText as o,RegisterDescription as m,Actions as a,HaveAccount as i,Link as c}from"./style.js";import u from"../../../../components/button/index.js";var d=t(function(t){var d=r().t,p=t.viewModel.loyaltyWidget.button;return e.createElement(n,null,e.createElement(l,null,e.createElement(o,null,d("header.register_title")),e.createElement(m,null,d("header.registerDescription"))),e.createElement(a,null,e.createElement(u,{button:p,fontSize:"textMDMedium",paddingSize:"medium"},d("header.registerButton")),e.createElement(i,null,d("header.haveAccount")," ",e.createElement(c,null,d("common.login")))))});export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from'./../../../../../ext/tslib/tslib.es6.mjs.js';import e from
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../../../ext/tslib/tslib.es6.mjs.js';import e from'./../../../../../ext/styled-components/dist/styled-components.browser.esm.js';import{textSM as o}from"../../../../components/style/typography.js";var i,t,l,p,r,c,s,x=e.div(i||(i=n(["\n display: flex;\n flex-direction: column;\n padding: 20px 16px;\n gap: 32px;\n align-items: center;\n"],["\n display: flex;\n flex-direction: column;\n padding: 20px 16px;\n gap: 32px;\n align-items: center;\n"]))),a=e.div(t||(t=n(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n"],["\n display: flex;\n flex-direction: column;\n gap: 8px;\n"]))),d=e.div(l||(l=n(["\n color: #121926;\n text-align: center;\n\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 24px;\n"],["\n color: #121926;\n text-align: center;\n\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 24px;\n"]))),f=e.div(p||(p=n(["\n color: #4b5565;\n text-align: center;\n ","\n"],["\n color: #4b5565;\n text-align: center;\n ","\n"])),o),g=e.div(r||(r=n(["\n display: flex;\n flex-direction: column;\n gap: 12px;\n"],["\n display: flex;\n flex-direction: column;\n gap: 12px;\n"]))),m=e.span(c||(c=n(["\n color: #4b5565;\n text-align: center;\n ","\n"],["\n color: #4b5565;\n text-align: center;\n ","\n"])),o),y=e.div(s||(s=n(["\n display: inline-block;\n cursor: pointer;\n color: #14141a;\n font-weight: 500;\n"],["\n display: inline-block;\n cursor: pointer;\n color: #14141a;\n font-weight: 500;\n"])));export{g as Actions,x as Container,m as HaveAccount,y as Link,f as RegisterDescription,d as RegisterText,a as TitleSection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"mobx-react";import{Container as
|
|
1
|
+
import e from"react";import{observer as t}from"mobx-react";import{Container as r,TopSection as o,CloseButton as n,Content as i,Card as l}from"./style.js";import a from"./logo-section/index.js";import s from"./title-section/index.js";import c from"./auth-user-section/index.js";import m from"./user-logged-section/index.js";import{XClose as d}from"../../../../assets/icons/x-close.js";import{ImageTypeEnum as f}from"../../../../models/loyalty-widget/types/index.js";var u=t(function(t){var u=t.viewModel,g=t.onClose,p=t.onCardHeightChange,v=t.headerGap,h=u.loyaltyWidget,E=u.user,y=h.header.background;h.settings;var x=e.useRef(null);return e.useEffect(function(){if(p){var e=x.current;if(e){var t=function(){p(e.getBoundingClientRect().height)};if(t(),"undefined"!=typeof ResizeObserver){var r=new ResizeObserver(function(){t()});return r.observe(e),function(){r.disconnect()}}}}},[p]),e.createElement(r,null,e.createElement(o,{$headerBackground:y,$gap:v},h.header.logo.type===f.SHOW&&h.header.logo.src&&e.createElement(a,{logo:h.header.logo}),e.createElement(s,{layout:h}),e.createElement(n,{onClick:g},e.createElement(d,null))),e.createElement(i,null,e.createElement(l,{ref:x},E?e.createElement(m,{viewModel:u}):e.createElement(c,{viewModel:u}))))});export{u as default};
|
|
@@ -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 e from'./../../../../../ext/styled-components/dist/styled-components.browser.esm.js';var t,i,s=e.div(t||(t=n(["\n display: flex;\n justify-content: space-between;\n gap: 12px;\n align-items: center;\n width: 100%;\n height: 100%;\n"],["\n display: flex;\n justify-content: space-between;\n gap: 12px;\n align-items: center;\n width: 100%;\n height: 100%;\n"]))),o=e.img(i||(i=n(["\n max-width: 150px;\n max-height: 30px;\n object-fit: contain;\n"],["\n max-width: 150px;\n max-height: 30px;\n object-fit: contain;\n"])));export{s as Container,o as Logo};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LoyaltyWidgetHeaderBackground } from "models/loyalty-widget/header/header-background";
|
|
2
2
|
export declare const CARD_OVERLAP_TOP = 48;
|
|
3
3
|
type TopSectionProps = {
|
|
4
|
-
$
|
|
5
|
-
$bgColor: string | null;
|
|
6
|
-
$bgImageSrc?: string | null;
|
|
4
|
+
$headerBackground: LoyaltyWidgetHeaderBackground;
|
|
7
5
|
$gap?: number;
|
|
8
6
|
};
|
|
9
7
|
export declare const Container: import("styled-components").StyledComponent<"header", any, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from'./../../../../ext/tslib/tslib.es6.mjs.js';import{HeaderBackgroundTypeEnum as e}from"../../../../models/loyalty-widget/types/index.js";import o,{css as r}from
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../../ext/tslib/tslib.es6.mjs.js';import{HeaderBackgroundTypeEnum as e}from"../../../../models/loyalty-widget/types/index.js";import o,{css as r}from'./../../../../ext/styled-components/dist/styled-components.browser.esm.js';var i,t,p,a,d,l,s,x,c,g,b=48,u=o.header(i||(i=n(["\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: visible;\n"],["\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: visible;\n"]))),f=o.div(s||(s=n(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: ",";\n padding: 24px 20px ","px 24px;\n\n ","\n"],["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: ",";\n padding: 24px 20px ","px 24px;\n\n ","\n"])),function(n){var e=n.$gap;return void 0!==e?"".concat(e,"px"):"56px"},48,function(o){var i=o.$headerBackground,s=i.type,x=i.bgColor,c=i.image;return s===e.IMAGE?(null==c?void 0:c.src)?r(p||(p=n(["\n background-image: url(",");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n "],["\n background-image: url(",");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n "])),c.src):r(t||(t=n([""],[""]))):x?s===e.GRADIENT?r(d||(d=n(["\n background: radial-gradient(\n 92.35% 100% at 50% 0%,\n rgba(255, 255, 255, 0.5) 0%,\n rgba(0, 0, 0, 0.5) 100%\n ),\n ",";\n "],["\n background: radial-gradient(\n 92.35% 100% at 50% 0%,\n rgba(255, 255, 255, 0.5) 0%,\n rgba(0, 0, 0, 0.5) 100%\n ),\n ",";\n "])),x):r(l||(l=n(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),x):r(a||(a=n([""],[""])))}),m=o.div(x||(x=n(["\n position: absolute;\n left: 20px;\n right: 20px;\n top: calc(100% - ","px);\n display: flex;\n z-index: 1;\n"],["\n position: absolute;\n left: 20px;\n right: 20px;\n top: calc(100% - ","px);\n display: flex;\n z-index: 1;\n"])),48),y=o.div(c||(c=n(["\n display: flex;\n flex-direction: column;\n width: 100%;\n background: white;\n border: 1px solid #eef2f6;\n border-radius: 6px;\n box-shadow: 0 5px 2px 0 rgba(0, 0, 0, 0.01), 0 3px 2px 0 rgba(0, 0, 0, 0.02),\n 0 1px 1px 0 rgba(0, 0, 0, 0.03), 0 0 1px 0 rgba(0, 0, 0, 0.04);\n"],["\n display: flex;\n flex-direction: column;\n width: 100%;\n background: white;\n border: 1px solid #eef2f6;\n border-radius: 6px;\n box-shadow: 0 5px 2px 0 rgba(0, 0, 0, 0.01), 0 3px 2px 0 rgba(0, 0, 0, 0.02),\n 0 1px 1px 0 rgba(0, 0, 0, 0.03), 0 0 1px 0 rgba(0, 0, 0, 0.04);\n"]))),v=o.div(g||(g=n(["\n position: absolute;\n right: 20px;\n top: 24px;\n display: flex;\n padding: 4px;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n\n svg {\n color: #f7f5ff;\n }\n"],["\n position: absolute;\n right: 20px;\n top: 24px;\n display: flex;\n padding: 4px;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n\n svg {\n color: #f7f5ff;\n }\n"])));export{b as CARD_OVERLAP_TOP,y as Card,v as CloseButton,u as Container,m as Content,f as TopSection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"mobx-react";import
|
|
1
|
+
import e from"react";import{observer as t}from"mobx-react";import{useTranslation as r}from"react-i18next";import{Container as o,LoyaltyProgramText as a,LoyaltyTitle as l}from"./style.js";var m=t(function(t){var m=r().t;return e.createElement(o,null,e.createElement(a,{$textColor:t.layout.header.textColor||"white"},m("header.title")),e.createElement(l,{$textColor:t.layout.header.textColor||"white"},m("header.subtitle")))});export{m as default};
|
|
@@ -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 o from'./../../../../../ext/styled-components/dist/styled-components.browser.esm.js';var t,e,i,l=o.div(t||(t=n(["\n display: flex;\n flex-direction: column;\n gap: 2px;\n margin-bottom: 24px;\n"],["\n display: flex;\n flex-direction: column;\n gap: 2px;\n margin-bottom: 24px;\n"]))),r=o.div(e||(e=n(["\n color: ",";\n opacity: 0.6;\n\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 24px; /* 150% */\n"],["\n color: ",";\n opacity: 0.6;\n\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 24px; /* 150% */\n"])),function(n){return n.$textColor}),p=o.div(i||(i=n(["\n color: ",";\n font-size: 20.211px;\n font-style: normal;\n font-weight: 600;\n line-height: 25.263px;\n letter-spacing: -0.202px;\n"],["\n color: ",";\n font-size: 20.211px;\n font-style: normal;\n font-weight: 600;\n line-height: 25.263px;\n letter-spacing: -0.202px;\n"])),function(n){return n.$textColor});export{l as Container,r as LoyaltyProgramText,p as LoyaltyTitle};
|