@ikas/loyalty-widget-renderer 1.0.0-alpha.61 → 1.0.0-alpha.8
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/use-sync-external-store-shim.development.js +1 -0
- package/build/_virtual/use-sync-external-store-shim.production.js +1 -0
- package/build/assets/index.d.ts +0 -1
- package/build/assets/widget-icons/illustraions/medal.js +1 -1
- 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/IcuTransUtils/htmlEntityDecoder.js +1 -0
- package/build/ext/react-i18next/dist/es/context.js +1 -1
- package/build/ext/react-i18next/dist/es/defaults.js +1 -0
- package/build/ext/react-i18next/dist/es/i18nInstance.js +1 -0
- package/build/ext/react-i18next/dist/es/initReactI18next.js +1 -0
- 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/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +10 -0
- package/build/ext/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +10 -0
- package/build/ext/use-sync-external-store/shim/index.js +1 -0
- package/build/index.d.ts +0 -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 -2
- package/build/models/image/index.js +1 -1
- package/build/models/index.d.ts +5 -16
- package/build/models/index.js +1 -1
- package/build/models/loyalty-customer-info/index.d.ts +8 -8
- 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 -7
- 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/index.d.ts +1 -1
- package/build/models/loyalty-widget/header-background/index.d.ts +9 -0
- package/build/models/loyalty-widget/index.d.ts +2 -2
- package/build/models/loyalty-widget/index.js +1 -1
- package/build/models/loyalty-widget/settings/index.js +1 -1
- package/build/models/types/index.d.ts +36 -13
- package/build/models/types/index.js +1 -1
- package/build/renderer/components/button/index.js +1 -1
- package/build/renderer/components/button/style.d.ts +0 -1
- package/build/renderer/components/button/style.js +1 -1
- package/build/renderer/components/loyalty-method-card/index.d.ts +1 -2
- package/build/renderer/components/loyalty-method-card/index.js +1 -1
- package/build/renderer/components/loyalty-method-card/style.js +1 -1
- package/build/renderer/components/style/typography.d.ts +1 -3
- package/build/renderer/components/style/typography.js +1 -1
- package/build/renderer/index.js +1 -1
- package/build/renderer/screens/credit-earning-methods-screen/index.js +1 -1
- package/build/renderer/screens/credit-history-screen/index.js +1 -1
- package/build/renderer/screens/credit-history-screen/style.d.ts +1 -3
- 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 +1 -3
- package/build/renderer/screens/credit-spending-methods-screen/style.js +1 -1
- package/build/renderer/screens/loyalty-level-screen/index.js +1 -1
- package/build/renderer/screens/loyalty-level-screen/style.d.ts +2 -6
- package/build/renderer/screens/loyalty-level-screen/style.js +1 -1
- package/build/renderer/screens/main-screen/earning-methods-section/index.d.ts +0 -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/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 +1 -3
- package/build/renderer/screens/main-screen/header/logo-section/style.js +1 -1
- package/build/renderer/screens/main-screen/header/style.d.ts +5 -11
- 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/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 +3 -11
- 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 +0 -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 -18
- package/build/renderer/style.js +1 -1
- package/build/renderer/utils/i18n.js +1 -1
- package/build/renderer/utils/locales/en.json.js +1 -1
- package/build/renderer/utils/locales/tr.json.js +1 -1
- package/build/renderer/utils/loyalty-details.js +1 -1
- package/build/utils.d.ts +4 -6
- package/build/utils.js +1 -1
- package/package.json +11 -23
- package/build/assets/icons/arrow-right.d.ts +0 -2
- package/build/assets/icons/arrow-right.js +0 -1
- 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/injector.d.ts +0 -5
- package/build/models/common/index.d.ts +0 -21
- package/build/models/common/index.js +0 -1
- package/build/models/mini-mode/index.d.ts +0 -7
- package/build/models/mini-mode/index.js +0 -1
- package/build/renderer/components/count-up/index.d.ts +0 -7
- package/build/renderer/components/count-up/index.js +0 -1
- package/build/renderer/components/flexible-value-container/index.d.ts +0 -16
- package/build/renderer/components/flexible-value-container/index.js +0 -1
- package/build/renderer/components/mini-mode-button/index.d.ts +0 -7
- package/build/renderer/components/mini-mode-button/index.js +0 -1
- package/build/renderer/components/mini-mode-button/style.d.ts +0 -6
- package/build/renderer/components/mini-mode-button/style.js +0 -1
- package/build/renderer/components/mini-mode-description/index.d.ts +0 -7
- package/build/renderer/components/mini-mode-description/index.js +0 -1
- package/build/renderer/components/mini-mode-description/style.d.ts +0 -3
- package/build/renderer/components/mini-mode-description/style.js +0 -1
- package/build/renderer/components/style/icon-wrapper.d.ts +0 -4
- package/build/renderer/components/style/icon-wrapper.js +0 -1
- package/build/storefront-widget-script-injector.iife.js +0 -68
- package/build/storefront-widget-script-injector.iife.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { BaseModel } from "models/base";
|
|
1
2
|
import { ImageTypeEnum } from "models/loyalty-widget/types";
|
|
2
3
|
export declare const IMAGE_SIZE = 1080;
|
|
3
|
-
export declare class LoyaltyWidgetImage {
|
|
4
|
+
export declare class LoyaltyWidgetImage extends BaseModel {
|
|
4
5
|
link: string | null;
|
|
5
6
|
cdnURL: string | null;
|
|
6
7
|
merchantId: string | null;
|
|
7
8
|
imageId: string | null;
|
|
8
9
|
type: ImageTypeEnum;
|
|
9
|
-
maxHeight: number;
|
|
10
10
|
constructor(data: Partial<LoyaltyWidgetImage>);
|
|
11
11
|
get src(): string | undefined;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as
|
|
1
|
+
import{__extends as t}from'./../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as e,observable as n,computed as i}from"mobx";import{BaseModel as r}from"../base.js";import{ImageTypeEnum as c}from"../loyalty-widget/types/index.js";var o=1080,m=function(r){function o(t){var o=r.call(this,t)||this;return o.imageId=t.imageId||null,o.link=t.link||null,o.cdnURL=t.cdnURL||null,o.merchantId=t.merchantId||null,o.type=t.type||c.SHOW,e(o,{imageId:n,link:n,cdnURL:n,merchantId:n,type:n,src:i}),o}return t(o,r),Object.defineProperty(o.prototype,"src",{get:function(){if(this.imageId)return"".concat(this.cdnURL,"images/").concat(this.merchantId,"/").concat(this.imageId,"/image_").concat(1080,".jpeg")},enumerable:!1,configurable:!0}),o}(r);export{o as IMAGE_SIZE,m as LoyaltyWidgetImage};
|
package/build/models/index.d.ts
CHANGED
|
@@ -1,26 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LoyaltyWidget } from "./loyalty-widget";
|
|
2
|
+
import { LoyaltyWidgetCallbacks, LoyaltyWidgetScreenTypeEnum, Category, Product, Brand, Tag, LoyaltyProgramTier } from "./types";
|
|
3
|
+
import { LoyaltyProgramSpendingMethod } from "./loyalty-program-spending-method";
|
|
2
4
|
import { LoyaltyProgramEarningMethod } from "./loyalty-program-earning-method";
|
|
5
|
+
import { LoyaltyCustomerInfo } from "./loyalty-customer-info";
|
|
3
6
|
import { LoyaltyProgramPointHistory } from "./loyalty-program-point-history";
|
|
4
|
-
import { LoyaltyProgramSpendingMethod } from "./loyalty-program-spending-method";
|
|
5
|
-
import { LoyaltyWidget } from "./loyalty-widget";
|
|
6
|
-
import { Brand, Category, LoyaltyWidgetCallbacks, LoyaltyWidgetScreenTypeEnum, Product, Tag, WidgetMode } from "./types";
|
|
7
7
|
export declare class LoyaltyWidgetViewModel {
|
|
8
8
|
selectedScreen: LoyaltyWidgetScreenTypeEnum;
|
|
9
|
-
currentWidgetMode: WidgetMode;
|
|
10
|
-
isMiniModeDescriptionClosed: boolean;
|
|
11
9
|
isLoading: boolean;
|
|
12
|
-
isActionLoading: boolean;
|
|
13
10
|
loyaltyWidget: LoyaltyWidget;
|
|
14
|
-
userRefreshTrigger: number;
|
|
15
|
-
cartRefreshTrigger: number;
|
|
16
11
|
cartId?: string | null;
|
|
17
|
-
ikasEventUser: any | null;
|
|
18
12
|
cdnURL: string;
|
|
19
13
|
merchantId: string;
|
|
20
14
|
storeUrl: string;
|
|
21
15
|
currency: string;
|
|
22
16
|
locale: string;
|
|
23
|
-
isPreviewMode: boolean;
|
|
24
17
|
user: LoyaltyCustomerInfo | null;
|
|
25
18
|
categories: Category[] | null;
|
|
26
19
|
products: Product[];
|
|
@@ -31,9 +24,5 @@ export declare class LoyaltyWidgetViewModel {
|
|
|
31
24
|
tiers: LoyaltyProgramTier[];
|
|
32
25
|
pointHistory: LoyaltyProgramPointHistory[];
|
|
33
26
|
callbacks?: LoyaltyWidgetCallbacks;
|
|
34
|
-
constructor(data: Partial<LoyaltyWidgetViewModel> | undefined, cdnURL: string, merchantId: string, currency: string, locale: string,
|
|
35
|
-
get shouldShowSpendingMethods(): boolean;
|
|
36
|
-
setWidgetMode(mode: WidgetMode): void;
|
|
37
|
-
closeMiniModeDescription(): void;
|
|
38
|
-
formatCurrency(price: number): string;
|
|
27
|
+
constructor(data: Partial<LoyaltyWidgetViewModel> | undefined, cdnURL: string, merchantId: string, currency: string, locale: string, callbacks?: LoyaltyWidgetCallbacks);
|
|
39
28
|
}
|
package/build/models/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{makeObservable as t,observable as e}from"mobx";import{LoyaltyWidget as s}from"./loyalty-widget/index.js";import{LoyaltyWidgetScreenTypeEnum as i}from"./types/index.js";import{LoyaltyProgramSpendingMethod as r}from"./loyalty-program-spending-method/index.js";import{LoyaltyProgramEarningMethod as o}from"./loyalty-program-earning-method/index.js";import{LoyaltyCustomerInfo as n}from"./loyalty-customer-info/index.js";var d=function(d,a,c,h,l,g){void 0===d&&(d={}),this.selectedScreen=d.selectedScreen||i.MAIN_SCREEN,this.isLoading=d.isLoading||!1,this.loyaltyWidget=d.loyaltyWidget?new s(d.loyaltyWidget):new s,this.cdnURL=a,this.merchantId=c,this.storeUrl=d.storeUrl||"",this.currency=h,this.locale=l,this.cartId=d.cartId||null,this.user=d.user?new n(d.user):null,this.earningMethods=d.earningMethods?d.earningMethods.map(function(t){return new o(t)}):[],this.spendingMethods=d.spendingMethods?d.spendingMethods.map(function(t){return new r(t)}):[],this.tiers=d.tiers?d.tiers:[],this.categories=d.categories?d.categories:[],this.products=d.products?d.products:[],this.brands=d.brands?d.brands:[],this.tags=d.tags?d.tags:[],this.pointHistory=d.pointHistory?d.pointHistory:[],this.callbacks=g||void 0,t(this,{cartId:e,loyaltyWidget:e,isLoading:e,cdnURL:e,merchantId:e,storeUrl:e,currency:e,locale:e,selectedScreen:e,user:e,earningMethods:e,spendingMethods:e,tiers:e,categories:e,products:e,brands:e,tags:e,pointHistory:e})};export{d as LoyaltyWidgetViewModel};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LoyaltyProgramPeriod } from "../
|
|
1
|
+
import { LoyaltyProgramPeriod } from "../types";
|
|
2
2
|
export declare class LoyaltyProgramTierTranslation {
|
|
3
3
|
locale: string;
|
|
4
4
|
name: string;
|
|
@@ -7,20 +7,20 @@ export declare class LoyaltyProgramTierTranslation {
|
|
|
7
7
|
export declare class LoyaltyProgramTier {
|
|
8
8
|
id: string;
|
|
9
9
|
name: string;
|
|
10
|
-
pointsRequired: number
|
|
11
|
-
tierPointMultiplier: number
|
|
10
|
+
pointsRequired: number;
|
|
11
|
+
tierPointMultiplier: number;
|
|
12
12
|
loyaltyProgramId: string;
|
|
13
|
-
customerSegmentId: string
|
|
14
|
-
createdAt:
|
|
15
|
-
updatedAt:
|
|
13
|
+
customerSegmentId: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
16
|
deleted: boolean;
|
|
17
17
|
isActive: boolean;
|
|
18
18
|
period: LoyaltyProgramPeriod | null;
|
|
19
|
-
translations: LoyaltyProgramTierTranslation[]
|
|
19
|
+
translations: LoyaltyProgramTierTranslation[];
|
|
20
20
|
constructor(data?: Partial<LoyaltyProgramTier>);
|
|
21
21
|
}
|
|
22
22
|
export declare class LoyaltyCustomerInfo {
|
|
23
|
-
|
|
23
|
+
customerTierId: LoyaltyProgramTier | null;
|
|
24
24
|
loyaltyProgramCustomerId: string;
|
|
25
25
|
loyaltyProgramId: string;
|
|
26
26
|
totalPoint: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as t,observable as
|
|
1
|
+
import{makeObservable as t,observable as e}from"mobx";import{LoyaltyProgramPeriod as i}from"../types/index.js";var o=function(i){void 0===i&&(i={}),this.locale=i.locale||"",this.name=i.name||"",t(this,{locale:e,name:e})},r=function(r){void 0===r&&(r={}),this.id=r.id||"",this.name=r.name||"",this.pointsRequired=r.pointsRequired||0,this.tierPointMultiplier=r.tierPointMultiplier||0,this.loyaltyProgramId=r.loyaltyProgramId||"",this.customerSegmentId=r.customerSegmentId||"",this.createdAt=r.createdAt||"",this.updatedAt=r.updatedAt||"",this.deleted=r.deleted||!1,this.isActive=r.isActive||!1,this.period=r.period?new i(r.period):null,this.translations=r.translations?r.translations.map(function(t){return new o(t)}):[],t(this,{id:e,name:e,pointsRequired:e,tierPointMultiplier:e,loyaltyProgramId:e,customerSegmentId:e,createdAt:e,updatedAt:e,deleted:e,isActive:e,period:e,translations:e})},s=function(i){void 0===i&&(i={}),this.customerTierId=i.customerTierId?new r(i.customerTierId):null,this.loyaltyProgramCustomerId=i.loyaltyProgramCustomerId||"",this.loyaltyProgramId=i.loyaltyProgramId||"",this.totalPoint=i.totalPoint||0,t(this,{customerTierId:e,loyaltyProgramCustomerId:e,loyaltyProgramId:e,totalPoint:e})};export{s as LoyaltyCustomerInfo,r as LoyaltyProgramTier,o as LoyaltyProgramTierTranslation};
|
|
@@ -1,37 +1,51 @@
|
|
|
1
|
-
import { EarningMethodTypeEnum, LoyaltyProgramPointEarningTypeEnum } from "../types";
|
|
2
|
-
|
|
1
|
+
import { EarningMethodTypeEnum, LoyaltyProgramPointEarningTypeEnum, LoyaltyProgramPeriod, LoyaltyProgramFilterTypeEnum } from "../types";
|
|
2
|
+
export declare class LoyaltyProgramPointLimit {
|
|
3
|
+
maxPointLimit: number;
|
|
4
|
+
minPointLimit: number;
|
|
5
|
+
constructor(data?: Partial<LoyaltyProgramPointLimit>);
|
|
6
|
+
}
|
|
7
|
+
export declare class LoyaltyProgramFilter {
|
|
8
|
+
type: LoyaltyProgramFilterTypeEnum;
|
|
9
|
+
idList: string[];
|
|
10
|
+
constructor(data?: Partial<LoyaltyProgramFilter>);
|
|
11
|
+
}
|
|
3
12
|
export declare class LoyaltyProgramEarningMethodOrderSettings {
|
|
4
|
-
maxOrderAmount: number
|
|
13
|
+
maxOrderAmount: number;
|
|
5
14
|
minOrderAmount: number;
|
|
6
|
-
productFilters: LoyaltyProgramFilter[]
|
|
15
|
+
productFilters: LoyaltyProgramFilter[];
|
|
7
16
|
constructor(data?: Partial<LoyaltyProgramEarningMethodOrderSettings>);
|
|
8
17
|
}
|
|
9
18
|
export declare class LoyaltyProgramEarningMethodProductSettings {
|
|
10
|
-
maxProductQuantity: number
|
|
11
|
-
minProductQuantity: number
|
|
12
|
-
productFilters: LoyaltyProgramFilter[]
|
|
19
|
+
maxProductQuantity: number;
|
|
20
|
+
minProductQuantity: number;
|
|
21
|
+
productFilters: LoyaltyProgramFilter[];
|
|
13
22
|
constructor(data?: Partial<LoyaltyProgramEarningMethodProductSettings>);
|
|
14
23
|
}
|
|
24
|
+
export declare class LoyaltyProgramMethodTranslation {
|
|
25
|
+
description: string;
|
|
26
|
+
locale: string;
|
|
27
|
+
constructor(data?: Partial<LoyaltyProgramMethodTranslation>);
|
|
28
|
+
}
|
|
15
29
|
export declare class LoyaltyProgramEarningMethod {
|
|
16
|
-
amountPerPointsEarned: number
|
|
17
|
-
createdAt:
|
|
30
|
+
amountPerPointsEarned: number;
|
|
31
|
+
createdAt: string;
|
|
18
32
|
deleted: boolean;
|
|
19
|
-
description: string
|
|
33
|
+
description: string;
|
|
20
34
|
earnedPointLimit: LoyaltyProgramPointLimit | null;
|
|
21
35
|
id: string;
|
|
22
36
|
isActive: boolean;
|
|
23
|
-
lastValidityDate:
|
|
37
|
+
lastValidityDate: string;
|
|
24
38
|
loyaltyProgramId: string;
|
|
25
39
|
methodType: EarningMethodTypeEnum;
|
|
26
40
|
orderSettings: LoyaltyProgramEarningMethodOrderSettings | null;
|
|
27
41
|
pointEarningType: LoyaltyProgramPointEarningTypeEnum;
|
|
28
42
|
pointsEarned: number;
|
|
29
43
|
productSettings: LoyaltyProgramEarningMethodProductSettings | null;
|
|
30
|
-
quantityPerPointsEarned: number
|
|
31
|
-
segmentId: string
|
|
32
|
-
tierIds: string[]
|
|
33
|
-
translations: LoyaltyProgramMethodTranslation[]
|
|
34
|
-
updatedAt:
|
|
44
|
+
quantityPerPointsEarned: number;
|
|
45
|
+
segmentId: string;
|
|
46
|
+
tierIds: string[];
|
|
47
|
+
translations: LoyaltyProgramMethodTranslation[];
|
|
48
|
+
updatedAt: string;
|
|
35
49
|
validityPeriod: LoyaltyProgramPeriod | null;
|
|
36
50
|
constructor(data?: Partial<LoyaltyProgramEarningMethod>);
|
|
37
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as t,observable as i}from"mobx";import{EarningMethodTypeEnum as n,LoyaltyProgramPointEarningTypeEnum as e
|
|
1
|
+
import{makeObservable as t,observable as i}from"mobx";import{EarningMethodTypeEnum as n,LoyaltyProgramPointEarningTypeEnum as e,LoyaltyProgramPeriod as r,LoyaltyProgramFilterTypeEnum as o}from"../types/index.js";var d=function(n){void 0===n&&(n={}),this.maxPointLimit=n.maxPointLimit||0,this.minPointLimit=n.minPointLimit||0,t(this,{maxPointLimit:i,minPointLimit:i})},s=function(n){void 0===n&&(n={}),this.type=n.type||o.CATEGORY,this.idList=n.idList||[],t(this,{type:i,idList:i})},a=function(n){void 0===n&&(n={}),this.maxOrderAmount=n.maxOrderAmount||0,this.minOrderAmount=n.minOrderAmount||0,this.productFilters=n.productFilters?n.productFilters.map(function(t){return new s(t)}):[],t(this,{maxOrderAmount:i,minOrderAmount:i,productFilters:i})},u=function(n){void 0===n&&(n={}),this.maxProductQuantity=n.maxProductQuantity||0,this.minProductQuantity=n.minProductQuantity||0,this.productFilters=n.productFilters?n.productFilters.map(function(t){return new s(t)}):[],t(this,{maxProductQuantity:i,minProductQuantity:i,productFilters:i})},m=function(n){void 0===n&&(n={}),this.description=n.description||"",this.locale=n.locale||"",t(this,{description:i,locale:i})},l=function(o){void 0===o&&(o={}),this.amountPerPointsEarned=o.amountPerPointsEarned||0,this.createdAt=o.createdAt||"",this.deleted=o.deleted||!1,this.description=o.description||"",this.earnedPointLimit=o.earnedPointLimit?new d(o.earnedPointLimit):null,this.id=o.id||"",this.isActive=o.isActive||!1,this.lastValidityDate=o.lastValidityDate||"",this.loyaltyProgramId=o.loyaltyProgramId||"",this.methodType=o.methodType||n.ORDER_CREATE,this.orderSettings=o.orderSettings?new a(o.orderSettings):null,this.pointEarningType=o.pointEarningType||e.STATIC,this.pointsEarned=o.pointsEarned||0,this.productSettings=o.productSettings?new u(o.productSettings):null,this.quantityPerPointsEarned=o.quantityPerPointsEarned||0,this.segmentId=o.segmentId||"",this.tierIds=o.tierIds||[],this.translations=o.translations?o.translations.map(function(t){return new m(t)}):[],this.updatedAt=o.updatedAt||"",this.validityPeriod=o.validityPeriod?new r(o.validityPeriod):null,t(this,{amountPerPointsEarned:i,createdAt:i,deleted:i,description:i,earnedPointLimit:i,id:i,isActive:i,lastValidityDate:i,loyaltyProgramId:i,methodType:i,orderSettings:i,pointEarningType:i,pointsEarned:i,productSettings:i,quantityPerPointsEarned:i,segmentId:i,tierIds:i,translations:i,updatedAt:i,validityPeriod:i})};export{l as LoyaltyProgramEarningMethod,a as LoyaltyProgramEarningMethodOrderSettings,u as LoyaltyProgramEarningMethodProductSettings,s as LoyaltyProgramFilter,m as LoyaltyProgramMethodTranslation,d as LoyaltyProgramPointLimit};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { LoyaltyProgramPointHistoryTypeEnum } from "../types";
|
|
2
2
|
export declare class LoyaltyProgramPointHistory {
|
|
3
3
|
amount: number;
|
|
4
|
-
createdAt:
|
|
4
|
+
createdAt: string;
|
|
5
5
|
customerId: string;
|
|
6
6
|
deleted: boolean;
|
|
7
|
-
expireDate:
|
|
7
|
+
expireDate: string | null;
|
|
8
8
|
id: string;
|
|
9
9
|
loyaltyProgramCustomerId: string;
|
|
10
10
|
loyaltyProgramEarningMethodId: string | null;
|
|
@@ -12,6 +12,6 @@ export declare class LoyaltyProgramPointHistory {
|
|
|
12
12
|
loyaltyProgramSpendingMethodId: string | null;
|
|
13
13
|
orderId: string | null;
|
|
14
14
|
type: LoyaltyProgramPointHistoryTypeEnum;
|
|
15
|
-
updatedAt:
|
|
15
|
+
updatedAt: string;
|
|
16
16
|
constructor(data?: Partial<LoyaltyProgramPointHistory>);
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as t,observable as e}from"mobx";import{LoyaltyProgramPointHistoryTypeEnum as r}from"../types/index.js";var d=function(d){void 0===d&&(d={}),this.amount=d.amount||0,this.createdAt=d.createdAt||
|
|
1
|
+
import{makeObservable as t,observable as e}from"mobx";import{LoyaltyProgramPointHistoryTypeEnum as r}from"../types/index.js";var d=function(d){void 0===d&&(d={}),this.amount=d.amount||0,this.createdAt=d.createdAt||"",this.customerId=d.customerId||"",this.deleted=d.deleted||!1,this.expireDate=d.expireDate||null,this.id=d.id||"",this.loyaltyProgramCustomerId=d.loyaltyProgramCustomerId||"",this.loyaltyProgramEarningMethodId=d.loyaltyProgramEarningMethodId||null,this.loyaltyProgramId=d.loyaltyProgramId||"",this.loyaltyProgramSpendingMethodId=d.loyaltyProgramSpendingMethodId||null,this.orderId=d.orderId||null,this.type=d.type||r.EARN,this.updatedAt=d.updatedAt||"",t(this,{amount:e,createdAt:e,customerId:e,deleted:e,expireDate:e,id:e,loyaltyProgramCustomerId:e,loyaltyProgramEarningMethodId:e,loyaltyProgramId:e,loyaltyProgramSpendingMethodId:e,orderId:e,type:e,updatedAt:e})};export{d as LoyaltyProgramPointHistory};
|
|
@@ -1,25 +1,38 @@
|
|
|
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;
|
|
14
28
|
id: string;
|
|
15
29
|
isActive: boolean;
|
|
16
|
-
isAvailable: boolean | null;
|
|
17
30
|
isDynamic: boolean;
|
|
18
31
|
loyaltyProgramId: string;
|
|
19
32
|
pointUsageLimit: LoyaltyProgramPointLimit | null;
|
|
20
|
-
productFilters: LoyaltyProgramFilter[]
|
|
21
|
-
translations: LoyaltyProgramMethodTranslation[]
|
|
33
|
+
productFilters: LoyaltyProgramFilter[];
|
|
34
|
+
translations: LoyaltyProgramMethodTranslation[];
|
|
22
35
|
type: LoyaltyProgramMethodSpendingTypeEnum;
|
|
23
|
-
updatedAt:
|
|
36
|
+
updatedAt: string;
|
|
24
37
|
constructor(data?: Partial<LoyaltyProgramSpendingMethod>);
|
|
25
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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LoyaltyWidgetImage } from "../image";
|
|
2
2
|
import { LoyaltyWidgetButton } from "../button";
|
|
3
3
|
import { LoyaltyWidgetHeader } from "./header";
|
|
4
4
|
import { LoyaltyWidgetSettings } from "./settings";
|
|
@@ -7,6 +7,6 @@ export declare class LoyaltyWidget {
|
|
|
7
7
|
settings: LoyaltyWidgetSettings;
|
|
8
8
|
header: LoyaltyWidgetHeader;
|
|
9
9
|
button: LoyaltyWidgetButton;
|
|
10
|
-
|
|
10
|
+
miniModeLogo: LoyaltyWidgetImage;
|
|
11
11
|
constructor(data?: Partial<LoyaltyWidget>);
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as e,observable as i}from"mobx";import'./../../ext/uuid/dist/esm-browser/stringify.js';import'./../../ext/uuid/dist/esm-browser/v3.js';import
|
|
1
|
+
import{makeObservable as e,observable as i}from"mobx";import'./../../ext/uuid/dist/esm-browser/stringify.js';import'./../../ext/uuid/dist/esm-browser/v3.js';import o from'./../../ext/uuid/dist/esm-browser/v4.js';import'./../../ext/uuid/dist/esm-browser/v5.js';import{LoyaltyWidgetImage as t}from"../image/index.js";import{LoyaltyWidgetButton as s}from"../button/index.js";import{LoyaltyWidgetHeader as d}from"./header/index.js";import{LoyaltyWidgetSettings as n}from"./settings/index.js";var r=function(r){void 0===r&&(r={}),this.id=r.id||o(),this.header=r.header?new d(r.header):new d({}),this.settings=r.settings?new n(r.settings):new n({}),this.miniModeLogo=r.miniModeLogo?new t(r.miniModeLogo):new t({}),this.button=r.button?new s(r.button):new s({}),e(this,{id:i,miniModeLogo:i,button:i,header:i,settings:i})};export{r as LoyaltyWidget};
|
|
@@ -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,9 +1,8 @@
|
|
|
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
|
-
import { LoyaltyWidgetViewModel } from "models";
|
|
7
6
|
export declare enum LoyaltyWidgetScreenTypeEnum {
|
|
8
7
|
MAIN_SCREEN = "MAIN_SCREEN",
|
|
9
8
|
CREDIT_SPENDING_METHODS_SCREEN = "CREDIT_SPENDING_METHODS_SCREEN",
|
|
@@ -11,10 +10,6 @@ export declare enum LoyaltyWidgetScreenTypeEnum {
|
|
|
11
10
|
CREDIT_HISTORY_SCREEN = "CREDIT_HISTORY_SCREEN",
|
|
12
11
|
LOYALTY_LEVEL_SCREEN = "LOYALTY_LEVEL_SCREEN"
|
|
13
12
|
}
|
|
14
|
-
export declare enum WidgetMode {
|
|
15
|
-
MINI_MODE = "MINI_MODE",
|
|
16
|
-
WIDGET_MODE = "WIDGET_MODE"
|
|
17
|
-
}
|
|
18
13
|
export declare enum EarningMethodTypeEnum {
|
|
19
14
|
BUY_PRODUCT = "BUY_PRODUCT",
|
|
20
15
|
CUSTOMER_REGISTER = "CUSTOMER_REGISTER",
|
|
@@ -46,6 +41,11 @@ export declare enum PeriodTypeEnum {
|
|
|
46
41
|
WEEK = "WEEK",
|
|
47
42
|
YEAR = "YEAR"
|
|
48
43
|
}
|
|
44
|
+
export declare class LoyaltyProgramPeriod {
|
|
45
|
+
period: string;
|
|
46
|
+
periodType: PeriodTypeEnum;
|
|
47
|
+
constructor(data?: Partial<LoyaltyProgramPeriod>);
|
|
48
|
+
}
|
|
49
49
|
export type Category = {
|
|
50
50
|
id: string;
|
|
51
51
|
name: string;
|
|
@@ -80,16 +80,45 @@ export type StringFilterInput = {
|
|
|
80
80
|
endsWith?: string;
|
|
81
81
|
nendsWith?: string;
|
|
82
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
|
+
};
|
|
83
101
|
export type ListLoyaltyProgramTierInput = {
|
|
84
102
|
id?: StringFilterInput;
|
|
103
|
+
includeDeleted?: boolean;
|
|
85
104
|
loyaltyProgramId?: StringFilterInput;
|
|
86
105
|
};
|
|
87
106
|
export declare enum LoyaltyProgramPointHistoryTypeEnum {
|
|
88
107
|
EARN = "EARN",
|
|
89
108
|
SPEND = "SPEND"
|
|
90
109
|
}
|
|
110
|
+
export type LoyaltyProgramPointHistoryTypeEnumFilterInput = {
|
|
111
|
+
eq?: LoyaltyProgramPointHistoryTypeEnum;
|
|
112
|
+
in?: LoyaltyProgramPointHistoryTypeEnum[];
|
|
113
|
+
ne?: LoyaltyProgramPointHistoryTypeEnum;
|
|
114
|
+
nin?: LoyaltyProgramPointHistoryTypeEnum[];
|
|
115
|
+
};
|
|
91
116
|
export type ListLoyaltyProgramPointHistoryInput = {
|
|
117
|
+
customerId?: StringFilterInput;
|
|
118
|
+
includeDeleted?: boolean;
|
|
92
119
|
loyaltyProgramId?: StringFilterInput;
|
|
120
|
+
sort?: string;
|
|
121
|
+
type?: LoyaltyProgramPointHistoryTypeEnumFilterInput;
|
|
93
122
|
};
|
|
94
123
|
export type LoyaltyWidgetCallbacks = {
|
|
95
124
|
listSpendingMethodsByCartId: (cartId?: string | null) => Promise<LoyaltyProgramSpendingMethod[]>;
|
|
@@ -100,23 +129,17 @@ export type LoyaltyWidgetCallbacks = {
|
|
|
100
129
|
useLoyaltyPoints: (input: AddLoyaltyToCartInput) => Promise<boolean>;
|
|
101
130
|
removeLoyaltyPointsFromCart: () => Promise<void>;
|
|
102
131
|
getLoyaltyWidget: () => Promise<LoyaltyWidget>;
|
|
132
|
+
onWidgetClose: () => void;
|
|
103
133
|
getProducts: (ids: string[]) => Promise<Product[]>;
|
|
104
134
|
getCategories: (ids: string[]) => Promise<Category[]>;
|
|
105
135
|
getBrands: (ids: string[]) => Promise<Brand[]>;
|
|
106
136
|
getTags: (ids: string[]) => Promise<Tag[]>;
|
|
107
|
-
subscribeToMarketingNotifications: () => Promise<boolean>;
|
|
108
|
-
formatCurrency?: (price: number) => string;
|
|
109
137
|
};
|
|
110
138
|
export type IkasLoyaltyWidgetConfig = {
|
|
111
139
|
cartId?: string | null;
|
|
112
|
-
userId?: string | null;
|
|
113
140
|
cdnURL: string;
|
|
114
141
|
merchantId: string;
|
|
115
142
|
currency: string;
|
|
116
143
|
locale: string;
|
|
117
|
-
storeURL?: string | null;
|
|
118
144
|
callbacks: LoyaltyWidgetCallbacks;
|
|
119
|
-
position?: "fixed" | "absolute";
|
|
120
|
-
isPreviewMode?: boolean;
|
|
121
|
-
onViewModelInitialized?: (viewModel: LoyaltyWidgetViewModel) => void;
|
|
122
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
|
|
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};
|
|
@@ -11,6 +11,5 @@ 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>;
|
|
15
14
|
export declare const Loader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
15
|
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 r,{keyframes as o}from"styled-components";import{textXSMedium as t,textSM as e,textSMMedium as i,textMDMedium as d,textLGSemiBold as a,displayXSSemiBold as l}from"../style/typography.js";var s,u,p,c={textXSMedium:t,textSM:e,textSMMedium:i,textMDMedium:d,textLGSemiBold:a,displayXSSemiBold:l},b={small:"8px",medium:"10px 16px"},f=r.button(s||(s=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 b[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"}),m=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"])),m);export{f as Button,x as Loader};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { LoyaltyWidgetButton } from "models/button";
|
|
3
2
|
import { WidgetIconTypeEnum } from "models/loyalty-widget/types";
|
|
3
|
+
import { LoyaltyWidgetButton } from "models/button";
|
|
4
4
|
export type LoyaltyMethodCardProps = {
|
|
5
5
|
title: string;
|
|
6
6
|
description: string | React.ReactNode;
|
|
@@ -8,7 +8,6 @@ export type LoyaltyMethodCardProps = {
|
|
|
8
8
|
action?: {
|
|
9
9
|
text: string;
|
|
10
10
|
onClick: () => void;
|
|
11
|
-
loading?: boolean;
|
|
12
11
|
};
|
|
13
12
|
isCompleted?: boolean;
|
|
14
13
|
mode: "card" | "accordion";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import e,{useState as t}from"react";import{observer as n}from"mobx-react";import l from"../button/index.js";import{CheckCircleFill as i}from"../../../assets/icons/check-circle-fill.js";import{ChevronLeft as r}from"../../../assets/icons/chevron-left.js";import{Container as o,Header as c,IconWrapper as a,Content as m,Title as s,Description as d,ArrowButton as p,AccordionWrapper as u,AccordionInner as f}from"./style.js";var E=n(function(n){var E=n.title,x=n.description,g=n.icon,$=n.action,b=n.isCompleted,v=n.mode,y=n.children,C=n.padding,k=n.settings,j=t(!1),h=j[0],O=j[1],S=!b&&(null==$?void 0:$.text)&&(null==$?void 0:$.onClick);return e.createElement(o,{$borderRadius:k.borderRadius,$isCompleted:b,$padding:C},e.createElement(c,{onClick:function(){"accordion"===v&&O(!h)},style:{cursor:"accordion"===v?"pointer":"default"}},e.createElement(a,{$iconType:k.widgetIconType},g),e.createElement(m,null,e.createElement(s,null,E),e.createElement(d,null,x)),"card"===v?e.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},b&&e.createElement(i,null),S&&e.createElement(l,{button:k.button,paddingSize:"small",fontSize:"textSMMedium",onClick:$.onClick},$.text)):e.createElement(p,{$isOpen:h},e.createElement(r,null))),"accordion"===v&&e.createElement(u,{$isOpen:h},e.createElement(f,{$isOpen:h},y)))});export{E 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{WidgetIconTypeEnum as e}from"../../../models/loyalty-widget/types/index.js";import t,{css as r}from"styled-components";import{textSMMedium as i,textSM as o}from"../style/typography.js";var a,s,d,p,l,f,c,x,g,u,m,b=t.div(a||(a=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(s||(s=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),$=t.div(x||(x=n(["\n color: #121926;\n ","\n"],["\n color: #121926;\n ","\n"])),o),j=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,j as AccordionWrapper,O as ArrowButton,b as Container,w as Content,$ as Description,y as Header,h as IconWrapper,v as Title};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
declare const textXS: import("styled-components").FlattenSimpleInterpolation;
|
|
2
1
|
declare const textXSMedium: import("styled-components").FlattenSimpleInterpolation;
|
|
3
2
|
declare const textSM: import("styled-components").FlattenSimpleInterpolation;
|
|
4
3
|
declare const textSMMedium: import("styled-components").FlattenSimpleInterpolation;
|
|
5
4
|
declare const textSMSemiBold: import("styled-components").FlattenSimpleInterpolation;
|
|
6
|
-
declare const textMD: import("styled-components").FlattenSimpleInterpolation;
|
|
7
5
|
declare const textMDMedium: import("styled-components").FlattenSimpleInterpolation;
|
|
8
6
|
declare const textLGMedium: import("styled-components").FlattenSimpleInterpolation;
|
|
9
7
|
declare const textLGSemiBold: import("styled-components").FlattenSimpleInterpolation;
|
|
10
8
|
declare const textXLSemiBold: import("styled-components").FlattenSimpleInterpolation;
|
|
11
9
|
declare const displayXSSemiBold: import("styled-components").FlattenSimpleInterpolation;
|
|
12
10
|
declare const Badge: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
13
|
-
export {
|
|
11
|
+
export { textXSMedium, textSM, textSMMedium, textSMSemiBold, textMDMedium, textLGMedium, textLGSemiBold, textXLSemiBold, displayXSSemiBold, Badge, };
|