@ikas/loyalty-widget-renderer 1.0.0-alpha.14 → 1.0.0-alpha.16

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.
@@ -1 +1 @@
1
- import{makeObservable as t,observable as e}from'./../ext/mobx/dist/mobx.esm.js';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,l,h,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=l,this.locale=h,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
+ import{makeObservable as t,observable as e}from'./../ext/mobx/dist/mobx.esm.js';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,l,h,g){void 0===d&&(d={}),this.selectedScreen=d.selectedScreen||i.MAIN_SCREEN,this.isLoading=d.isLoading||!1,this.loyaltyWidget=d.loyaltyWidget?d.loyaltyWidget:new s,this.cdnURL=a,this.merchantId=c,this.storeUrl=d.storeUrl||"",this.currency=l,this.locale=h,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 +1 @@
1
- import e from"react";import{observer as t}from'./../../../ext/mobx-react/dist/mobxreact.esm.js';import'./../../../ext/react-i18next/dist/es/context.js';import{useTranslation as o}from'./../../../ext/react-i18next/dist/es/useTranslation.js';import n from"./header/index.js";import r from"../../components/section-title/index.js";import i from"./earning-methods-section/index.js";import m from"./spending-methods-section/index.js";import a from"./program-info-section/index.js";import{Container as s,Content as l,Section as d}from"./style.js";import{CARD_OVERLAP_TOP as c}from"./header/style.js";import{EarningMethodTypeEnum as p}from"../../../models/types/index.js";import{ImageTypeEnum as u}from"../../../models/loyalty-widget/types/index.js";var f=t(function(t){var f=t.viewModel,g=t.onClose,x=t.onNavigate,h=o().t,E=e.useState(0),T=E[0],y=E[1],j=e.useState(56),v=j[0],M=j[1],C=Math.max(T-c+32,32),S=f.user,_=f.spendingMethods.length>0,w=!!S&&_;return e.createElement(s,null,e.createElement(n,{viewModel:f,onClose:g,onCardHeightChange:y,headerGap:v}),e.createElement(l,{$topPadding:C,onScroll:function(e){var t=f.loyaltyWidget.header.logo;if(t.type===u.SHOW&&t.src){var o=e.currentTarget.scrollTop,n=Math.max(16,56-o);M(n)}}},e.createElement(d,null,e.createElement(r,{style:{paddingTop:0}},h(w?"main_screen.spendingMethodsTitle":"main_screen.earningMethodsTitle")),w?e.createElement(m,{viewModel:f,mode:"card",getActionProps:function(e){return null}}):e.createElement(i,{viewModel:f,getActionProps:function(e){return e.methodType===p.CUSTOMER_REGISTER?{actionText:h("common.create"),onClick:function(){}}:e.methodType===p.ENABLE_SUBSCRIPTION?{actionText:h("common.allow"),onClick:function(){}}:null}})),e.createElement(d,null,e.createElement(r,{style:{paddingTop:0}},h("main_screen.programInfoTitle")),e.createElement(a,{viewModel:f,onNavigate:x}))))});export{f as default};
1
+ import e from"react";import{observer as t}from'./../../../ext/mobx-react/dist/mobxreact.esm.js';import'./../../../ext/react-i18next/dist/es/context.js';import{useTranslation as o}from'./../../../ext/react-i18next/dist/es/useTranslation.js';import n from"./header/index.js";import r from"../../components/section-title/index.js";import i from"./earning-methods-section/index.js";import m from"./spending-methods-section/index.js";import a from"./program-info-section/index.js";import{Container as s,Content as l,Section as d}from"./style.js";import{CARD_OVERLAP_TOP as c}from"./header/style.js";import{EarningMethodTypeEnum as p}from"../../../models/types/index.js";import{ImageTypeEnum as g}from"../../../models/loyalty-widget/types/index.js";var u=t(function(t){var u=t.viewModel,f=t.onClose,h=t.onNavigate,x=o().t,E=e.useState(0),T=E[0],y=E[1],j=e.useState(56),M=j[0],v=j[1],C=Math.max(T-c+32,32),S=u.user,_=u.spendingMethods.length>0,w=!!S&&_,I=u.earningMethods.length>0,N=w||I;return e.createElement(s,null,e.createElement(n,{viewModel:u,onClose:f,onCardHeightChange:y,headerGap:M}),e.createElement(l,{$topPadding:C,onScroll:function(e){var t=u.loyaltyWidget.header.logo;if(t.type===g.SHOW&&t.src){var o=e.currentTarget.scrollTop,n=Math.max(16,56-o);v(n)}}},N&&e.createElement(d,null,e.createElement(r,{style:{paddingTop:0}},x(w?"main_screen.spendingMethodsTitle":"main_screen.earningMethodsTitle")),w?e.createElement(m,{viewModel:u,mode:"card",getActionProps:function(e){return null}}):e.createElement(i,{viewModel:u,getActionProps:function(e){return e.methodType===p.CUSTOMER_REGISTER?{actionText:x("common.create"),onClick:function(){}}:e.methodType===p.ENABLE_SUBSCRIPTION?{actionText:x("common.allow"),onClick:function(){}}:null}})),e.createElement(d,null,e.createElement(r,{style:{paddingTop:0}},x("main_screen.programInfoTitle")),e.createElement(a,{viewModel:u,onNavigate:h}))))});export{u as default};
@@ -1 +1 @@
1
- import{__makeTemplateObject as n}from'./../ext/tslib/tslib.es6.mjs.js';import o,{css as t}from"styled-components";var i,r,e,f,a,s=o.div(i||(i=n(["\n position: ",";\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n width: 100%;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 9999;\n"],["\n position: ",";\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n width: 100%;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 9999;\n"])),function(n){return n.$position||"fixed"}),d=o.div(r||(r=n(["\n position: absolute;\n top: 0;\n right: 0;\n width: 520px;\n max-width: 100%;\n height: 100%;\n background-color: #ffffff;\n \n overflow-x: hidden;\n box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);\n"],["\n position: absolute;\n top: 0;\n right: 0;\n width: 520px;\n max-width: 100%;\n height: 100%;\n background-color: #ffffff;\n \n overflow-x: hidden;\n box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);\n"]))),h=o.div(a||(a=n(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #ffffff;\n transition: transform 0.3s ease-in-out;\n overflow-y: auto;\n\n ","\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #ffffff;\n transition: transform 0.3s ease-in-out;\n overflow-y: auto;\n\n ","\n"])),function(o){var i=o.$isActive;return o.$isMain?t(e||(e=n(["\n transform: translateX(",");\n z-index: 1;\n "],["\n transform: translateX(",");\n z-index: 1;\n "])),i?"0%":"-100%"):t(f||(f=n(["\n transform: translateX(",");\n z-index: 2;\n "],["\n transform: translateX(",");\n z-index: 2;\n "])),i?"0%":"100%")});export{s as Container,d as Drawer,h as ScreenWrapper};
1
+ import{__makeTemplateObject as n}from'./../ext/tslib/tslib.es6.mjs.js';import o,{css as t}from"styled-components";var i,r,e,f,a,s=o.div(i||(i=n(["\n position: ",";\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n width: 100%;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 9999;\n"],["\n position: ",";\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n width: 100%;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 9999;\n"])),function(n){return n.$position||"fixed"}),d=o.div(r||(r=n(["\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n background-color: #ffffff;\n \n overflow-x: hidden;\n box-shadow: -2px 0 8px rgba(36, 30, 30, 0.15);\n\n width: 100%;\n @media (min-width: 381px) {\n width: 380px;\n }\n"],["\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n background-color: #ffffff;\n \n overflow-x: hidden;\n box-shadow: -2px 0 8px rgba(36, 30, 30, 0.15);\n\n width: 100%;\n @media (min-width: 381px) {\n width: 380px;\n }\n"]))),h=o.div(a||(a=n(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #ffffff;\n transition: transform 0.3s ease-in-out;\n overflow-y: auto;\n\n ","\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #ffffff;\n transition: transform 0.3s ease-in-out;\n overflow-y: auto;\n\n ","\n"])),function(o){var i=o.$isActive;return o.$isMain?t(e||(e=n(["\n transform: translateX(",");\n z-index: 1;\n "],["\n transform: translateX(",");\n z-index: 1;\n "])),i?"0%":"-100%"):t(f||(f=n(["\n transform: translateX(",");\n z-index: 2;\n "],["\n transform: translateX(",");\n z-index: 2;\n "])),i?"0%":"100%")});export{s as Container,d as Drawer,h as ScreenWrapper};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/loyalty-widget-renderer",
3
- "version": "1.0.0-alpha.14",
3
+ "version": "1.0.0-alpha.16",
4
4
  "description": "",
5
5
  "author": "ucy",
6
6
  "license": "ISC",