@ikas/loyalty-widget-renderer 1.0.0-alpha.74 → 1.0.0-alpha.76
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/locales.d.ts +10 -0
- package/build/models/types/index.d.ts +3 -1
- package/build/models/types/index.js +1 -1
- package/build/renderer/screens/credit-history-screen/index.js +1 -1
- package/build/renderer/screens/main-screen/applied-discount/index.js +1 -1
- package/build/renderer/utils/i18n.d.ts +5 -605
- package/build/renderer/utils/i18n.js +1 -1
- package/build/renderer/utils/locales/de.json.js +1 -1
- package/build/renderer/utils/locales/en.json.js +1 -1
- package/build/renderer/utils/locales/fr.json.js +1 -1
- package/build/renderer/utils/locales/nl.json.js +1 -1
- package/build/renderer/utils/locales/tr.json.js +1 -1
- package/build/storefront-widget-script-injector.iife.js +2 -2
- package/build/storefront-widget-script-injector.iife.js.map +1 -1
- package/package.json +1 -1
package/build/locales.d.ts
CHANGED
|
@@ -95,6 +95,8 @@ declare const locales: {
|
|
|
95
95
|
history: {
|
|
96
96
|
earnedTitle: string;
|
|
97
97
|
spentTitle: string;
|
|
98
|
+
refundTitle: string;
|
|
99
|
+
refillTitle: string;
|
|
98
100
|
};
|
|
99
101
|
screens: {
|
|
100
102
|
creditEarningMethods: string;
|
|
@@ -210,6 +212,8 @@ declare const locales: {
|
|
|
210
212
|
history: {
|
|
211
213
|
earnedTitle: string;
|
|
212
214
|
spentTitle: string;
|
|
215
|
+
refundTitle: string;
|
|
216
|
+
refillTitle: string;
|
|
213
217
|
};
|
|
214
218
|
screens: {
|
|
215
219
|
creditEarningMethods: string;
|
|
@@ -325,6 +329,8 @@ declare const locales: {
|
|
|
325
329
|
history: {
|
|
326
330
|
earnedTitle: string;
|
|
327
331
|
spentTitle: string;
|
|
332
|
+
refundTitle: string;
|
|
333
|
+
refillTitle: string;
|
|
328
334
|
};
|
|
329
335
|
screens: {
|
|
330
336
|
creditEarningMethods: string;
|
|
@@ -440,6 +446,8 @@ declare const locales: {
|
|
|
440
446
|
history: {
|
|
441
447
|
earnedTitle: string;
|
|
442
448
|
spentTitle: string;
|
|
449
|
+
refundTitle: string;
|
|
450
|
+
refillTitle: string;
|
|
443
451
|
};
|
|
444
452
|
screens: {
|
|
445
453
|
creditEarningMethods: string;
|
|
@@ -555,6 +563,8 @@ declare const locales: {
|
|
|
555
563
|
history: {
|
|
556
564
|
earnedTitle: string;
|
|
557
565
|
spentTitle: string;
|
|
566
|
+
refundTitle: string;
|
|
567
|
+
refillTitle: string;
|
|
558
568
|
};
|
|
559
569
|
screens: {
|
|
560
570
|
creditEarningMethods: string;
|
|
@@ -86,7 +86,9 @@ export type ListLoyaltyProgramTierInput = {
|
|
|
86
86
|
};
|
|
87
87
|
export declare enum LoyaltyProgramPointHistoryTypeEnum {
|
|
88
88
|
EARN = "EARN",
|
|
89
|
-
SPEND = "SPEND"
|
|
89
|
+
SPEND = "SPEND",
|
|
90
|
+
REFUND = "REFUND",
|
|
91
|
+
REFILL = "REFILL"
|
|
90
92
|
}
|
|
91
93
|
export interface LoyaltyProgramPointHistoryTypeEnumFilterInput {
|
|
92
94
|
eq?: LoyaltyProgramPointHistoryTypeEnum | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var E,R,T,_,N,
|
|
1
|
+
var E,R,T,_,N,D,I,C;!function(E){E.MAIN_SCREEN="MAIN_SCREEN",E.CREDIT_SPENDING_METHODS_SCREEN="CREDIT_SPENDING_METHODS_SCREEN",E.CREDIT_EARNING_METHODS_SCREEN="CREDIT_EARNING_METHODS_SCREEN",E.CREDIT_HISTORY_SCREEN="CREDIT_HISTORY_SCREEN",E.LOYALTY_LEVEL_SCREEN="LOYALTY_LEVEL_SCREEN"}(E||(E={})),function(E){E.MINI_MODE="MINI_MODE",E.WIDGET_MODE="WIDGET_MODE"}(R||(R={})),function(E){E.BUY_PRODUCT="BUY_PRODUCT",E.CUSTOMER_REGISTER="CUSTOMER_REGISTER",E.CUSTOMER_REVIEW="CUSTOMER_REVIEW",E.CUSTOMER_SEGMENT="CUSTOMER_SEGMENT",E.ENABLE_SUBSCRIPTION="ENABLE_SUBSCRIPTION",E.ORDER_CREATE="ORDER_CREATE"}(T||(T={})),function(E){E.DYNAMIC_ORDER_AMOUNT="DYNAMIC_ORDER_AMOUNT",E.DYNAMIC_ORDER_QUANTITY="DYNAMIC_ORDER_QUANTITY",E.STATIC="STATIC"}(_||(_={})),function(E){E.FIXED_AMOUNT="FIXED_AMOUNT",E.FREE_PRODUCT="FREE_PRODUCT",E.FREE_SHIPPING="FREE_SHIPPING",E.RATIO="RATIO"}(N||(N={})),function(E){E.CATEGORY="CATEGORY",E.DYNAMIC_CATEGORY="DYNAMIC_CATEGORY",E.PRODUCT_AND_VARIANT="PRODUCT_AND_VARIANT",E.PRODUCT_BRAND="PRODUCT_BRAND",E.PRODUCT_TAG="PRODUCT_TAG"}(D||(D={})),function(E){E.MONTH="MONTH",E.WEEK="WEEK",E.YEAR="YEAR"}(I||(I={})),function(E){E.EARN="EARN",E.SPEND="SPEND",E.REFUND="REFUND",E.REFILL="REFILL"}(C||(C={}));export{T as EarningMethodTypeEnum,D as LoyaltyProgramFilterTypeEnum,N as LoyaltyProgramMethodSpendingTypeEnum,_ as LoyaltyProgramPointEarningTypeEnum,C as LoyaltyProgramPointHistoryTypeEnum,E as LoyaltyWidgetScreenTypeEnum,I as PeriodTypeEnum,R as WidgetMode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{observer as e}from"mobx-react";import t from"react";import'./../../../ext/react-i18next/dist/es/context.js';import{useTranslation as
|
|
1
|
+
import{observer as e}from"mobx-react";import t from"react";import'./../../../ext/react-i18next/dist/es/context.js';import{useTranslation as r}from'./../../../ext/react-i18next/dist/es/useTranslation.js';import{XClose as n}from"../../../assets/icons/x-close.js";import{ChevronLeft as l}from"../../../assets/icons/chevron-left.js";import{LoyaltyProgramPointHistoryTypeEnum as a}from"../../../models/types/index.js";import o from"../../components/count-up/index.js";import{Container as i,Header as s,IconButton as c,Title as m,Content as u,PointsSection as d,PointsTitle as E,PointsValue as f,HistoryList as p,HistoryItem as y,HistoryItemLeft as h,HistoryItemTitle as x,HistoryItemDate as g,HistoryItemAmount as j,Divider as R}from"./style.js";var T=e(function(e){var T=e.viewModel,v=e.onBack,F=e.onClose,k=r(),w=k.t,D=k.i18n,L=T.user,N=T.pointHistory;return t.createElement(i,null,t.createElement(s,null,t.createElement(c,{onClick:v},t.createElement(l,null)),t.createElement(m,null,w("screens.creditHistory")),t.createElement(c,{onClick:F},t.createElement(n,null))),t.createElement(u,null,L&&t.createElement(d,{$borderRadius:T.loyaltyWidget.settings.cartBorderRadius},t.createElement(E,null,w("header.earnedPoints")),t.createElement(f,null,t.createElement(o,{end:L.totalPoint}))),t.createElement(p,null,N.map(function(e,r){var n=e.type===a.EARN||e.type===a.REFILL;return t.createElement(t.Fragment,{key:e.id},t.createElement(y,null,t.createElement(h,null,t.createElement(x,null,function(){switch(e.type){case a.EARN:return w("history.earnedTitle");case a.SPEND:return w("history.spentTitle");case a.REFUND:return w("history.refundTitle");case a.REFILL:return w("history.refillTitle");default:return w("history.earnedTitle")}}()),t.createElement(g,null,function(e){if(!e)return"";try{return new Intl.DateTimeFormat(D.language,{day:"numeric",month:"long",year:"numeric"}).format(new Date(e))}catch(t){return e}}(e.createdAt))),t.createElement(j,{$isEarn:n},n?"":"-",e.amount)),r<N.length-1&&t.createElement(R,null))}))))});export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.mjs.js';import{observer as
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.mjs.js';import{observer as r}from"mobx-react";import n from"react";import'./../../../../ext/react-i18next/dist/es/context.js';import{useTranslation as o}from'./../../../../ext/react-i18next/dist/es/useTranslation.js';import{ArrowRight as i}from"../../../../assets/icons/arrow-right.js";import{CheckCircle as c}from"../../../../assets/icons/check-circle.js";import{CheckFillIllustration as s}from"../../../../assets/widget-icons/illustraions/check-fill.js";import{CampaignTypeEnum as a}from"../../../../models/loyalty-customer-info/index.js";import{WidgetIconTypeEnum as l}from"../../../../models/loyalty-widget/types/index.js";import{Container as u,IconWrapper as m,ContentWrapper as d,TextRow as p,ButtonsRow as f,ActionButton as E,Loader as y,ArrowIcon as _}from"./style.js";var g=r(function(r){var g=r.viewModel,h=r.line,v=o().t,T=g.loyaltyWidget.settings.widgetIconType,j=n.useState(!1),w=j[0],b=j[1];return n.createElement(u,null,n.createElement(m,{$iconType:T},function(){switch(T){case l.ILLUSTRATION:return n.createElement(s,null);case l.NORMAL:case l.NONE:default:return n.createElement(c,null)}}()),n.createElement(d,null,n.createElement(p,null,function(){var e=g.formatCurrency(h.discountAmount);switch(h.campaignType){case a.FIXED_AMOUNT:return v("main_screen.appliedDiscount.fixedAmount",{amount:e});case a.FREE_SHIPPING:return v("main_screen.appliedDiscount.freeShipping");case a.RATIO:return v("main_screen.appliedDiscount.ratio",{amount:"%".concat(h.discountAmount)});case a.BUY_X_THEN_GET_Y:return v("main_screen.appliedDiscount.freeProduct");default:return v("main_screen.appliedDiscount.generic",{amount:e})}}()),n.createElement(f,null,n.createElement(E,{$color:"#697586",$disabled:w,onClick:function(){return e(void 0,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:if(!(null===(e=g.callbacks)||void 0===e?void 0:e.removeLoyaltyPointsFromCart))return[3,4];b(!0),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,g.callbacks.removeLoyaltyPointsFromCart()];case 2:return t.sent(),g.cartRefreshTrigger++,g.userRefreshTrigger++,[3,4];case 3:return b(!1),[7];case 4:return[2]}})})}},w&&n.createElement(y,null),v("main_screen.appliedDiscount.remove")),n.createElement(E,{$color:"#121926",$disabled:w,onClick:function(){g.storeUrl&&g.cartId&&(window.location.href="".concat(g.storeUrl,"/checkout?id=").concat(g.cartId,"&step=info"))}},v("main_screen.appliedDiscount.goToCheckout"),n.createElement(_,null,n.createElement(i,null))))))});export{g as default};
|