@ikas/loyalty-widget-renderer 1.0.0-alpha.80 → 1.0.0-alpha.82

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.
Files changed (51) hide show
  1. package/build/assets/index.d.ts +4 -0
  2. package/build/assets/widget-icons/illustraions/refundIllustration.d.ts +2 -0
  3. package/build/assets/widget-icons/illustraions/refundIllustration.js +1 -0
  4. package/build/assets/widget-icons/illustraions/scenery.d.ts +2 -0
  5. package/build/assets/widget-icons/illustraions/scenery.js +1 -0
  6. package/build/assets/widget-icons/normal/album02.d.ts +2 -0
  7. package/build/assets/widget-icons/normal/album02.js +1 -0
  8. package/build/assets/widget-icons/normal/refund.d.ts +2 -0
  9. package/build/assets/widget-icons/normal/refund.js +1 -0
  10. package/build/index.js +1 -1
  11. package/build/locales.d.ts +30 -0
  12. package/build/models/index.d.ts +6 -1
  13. package/build/models/index.js +1 -1
  14. package/build/models/loyalty-customer-info/index.d.ts +1 -1
  15. package/build/models/loyalty-customer-info/index.js +1 -1
  16. package/build/models/loyalty-program-point-history/index.d.ts +2 -0
  17. package/build/models/loyalty-program-point-history/index.js +1 -1
  18. package/build/models/loyalty-program-spending-method/index.d.ts +1 -0
  19. package/build/models/loyalty-program-spending-method/index.js +1 -1
  20. package/build/models/loyalty-widget/header/header-background/index.d.ts +1 -0
  21. package/build/models/loyalty-widget/header/header-background/index.js +1 -1
  22. package/build/models/types/index.d.ts +9 -1
  23. package/build/models/types/index.js +1 -1
  24. package/build/renderer/index.js +1 -1
  25. package/build/renderer/screens/credit-history-screen/index.js +1 -1
  26. package/build/renderer/screens/gift-product-selection-screen/index.d.ts +9 -0
  27. package/build/renderer/screens/gift-product-selection-screen/index.js +1 -0
  28. package/build/renderer/screens/gift-product-selection-screen/style.d.ts +20 -0
  29. package/build/renderer/screens/gift-product-selection-screen/style.js +1 -0
  30. package/build/renderer/screens/loyalty-level-screen/index.js +1 -1
  31. package/build/renderer/screens/loyalty-level-screen/style.d.ts +3 -1
  32. package/build/renderer/screens/loyalty-level-screen/style.js +1 -1
  33. package/build/renderer/screens/main-screen/header/user-logged-section/index.js +1 -1
  34. package/build/renderer/screens/main-screen/header/user-logged-section/style.d.ts +3 -1
  35. package/build/renderer/screens/main-screen/header/user-logged-section/style.js +1 -1
  36. package/build/renderer/screens/main-screen/spending-methods-section/dynamic-slider.js +1 -1
  37. package/build/renderer/screens/main-screen/spending-methods-section/index.js +1 -1
  38. package/build/renderer/style.d.ts +1 -1
  39. package/build/renderer/style.js +1 -1
  40. package/build/renderer/utils/locales/de.json.js +1 -1
  41. package/build/renderer/utils/locales/en.json.js +1 -1
  42. package/build/renderer/utils/locales/fr.json.js +1 -1
  43. package/build/renderer/utils/locales/nl.json.js +1 -1
  44. package/build/renderer/utils/locales/tr.json.js +1 -1
  45. package/build/renderer/utils/spending-method-utils.d.ts +20 -0
  46. package/build/renderer/utils/spending-method-utils.js +1 -0
  47. package/build/storefront-widget-script-injector.iife.js +6 -6
  48. package/build/storefront-widget-script-injector.iife.js.map +1 -1
  49. package/build/utils.d.ts +1 -0
  50. package/build/utils.js +1 -1
  51. package/package.json +1 -1
package/build/utils.d.ts CHANGED
@@ -32,6 +32,7 @@ export declare const getEarningMethodIcon: (earningMethod: EarningMethodTypeEnum
32
32
  export declare const getHistoryEarningMethodLabel: (earningMethodType: EarningMethodTypeEnum) => string;
33
33
  export declare const getEarningMethodTitle: (earningMethod: LoyaltyProgramEarningMethod) => string;
34
34
  export declare const getSpendingMethodIcon: (spendingMethod: LoyaltyProgramMethodSpendingTypeEnum, widgetIconType: WidgetIconTypeEnum) => React.JSX.Element | null;
35
+ export declare const getRefundIcon: (widgetIconType: WidgetIconTypeEnum) => React.JSX.Element | null;
35
36
  export declare const getSpendingMethodTitle: (method: LoyaltyProgramSpendingMethod) => string;
36
37
  export declare const getSpendingMethodDescription: (method: LoyaltyProgramSpendingMethod, viewModel: LoyaltyWidgetViewModel) => string | React.JSX.Element;
37
38
  export {};
package/build/utils.js CHANGED
@@ -1 +1 @@
1
- import{__makeTemplateObject as e,__assign as t}from'./ext/tslib/tslib.es6.mjs.js';import n from"react";import'./ext/react-i18next/dist/es/context.js';import{useTranslation as r}from'./ext/react-i18next/dist/es/useTranslation.js';import s from'./ext/i18next/dist/esm/i18next.js';import i from"styled-components";import{ArrowRight as l}from"./assets/icons/arrow-right.js";import{BubbleChatDone as o}from"./assets/widget-icons/normal/bubbleChatDone.js";import{CommentAdd01 as a}from"./assets/widget-icons/normal/commentAdd01.js";import{CouponPercent as E}from"./assets/widget-icons/normal/couponPercent.js";import{DiscountTag02 as c}from"./assets/widget-icons/normal/discountTag02.js";import{Gift as m}from"./assets/widget-icons/normal/gift.js";import{MoneyAdd01 as d}from"./assets/widget-icons/normal/moneyAdd01.js";import{PackageDelivered as u}from"./assets/widget-icons/normal/packageDelivered.js";import{SaveMoneyDollar as R}from"./assets/widget-icons/normal/saveMoneyDollar.js";import{ShoppingBasketAdd02 as p}from"./assets/widget-icons/normal/shoppingBasketAdd02.js";import{UserAdd01 as T}from"./assets/widget-icons/normal/userAdd01.js";import{UsersIllustration as _}from"./assets/widget-icons/illustraions/usersIllustration.js";import{BubbleChatIllustration as S}from"./assets/widget-icons/illustraions/bubbleChatIllustration.js";import{ApprovedChatIllustration as g}from"./assets/widget-icons/illustraions/approvedChatIllustration.js";import{TshirtIllustration as I}from"./assets/widget-icons/illustraions/tshirtIllustration.js";import{Medal as f}from"./assets/widget-icons/illustraions/medal.js";import{GiftIllustration as O}from"./assets/widget-icons/illustraions/giftIllustration.js";import{ShippingBox as N}from"./assets/widget-icons/illustraions/shippingBox.js";import{BigSaleMedal as C}from"./assets/widget-icons/illustraions/bigSaleMedal.js";import{ShoppingCartIllustration as M}from"./assets/widget-icons/illustraions/shoppingCartIllustration.js";import{BankCoin as U}from"./assets/widget-icons/illustraions/bankCoin.js";import{WidgetIconTypeEnum as h}from"./models/loyalty-widget/types/index.js";import{EarningMethodTypeEnum as A,LoyaltyWidgetScreenTypeEnum as D,LoyaltyProgramPointEarningTypeEnum as y,LoyaltyProgramMethodSpendingTypeEnum as x}from"./models/types/index.js";import{FlexibleValueContainer as j}from"./renderer/components/flexible-value-container/index.js";import{textSM as P,textXSMedium as v,textXS as w}from"./renderer/components/style/typography.js";var L,b,B,G,F,Y,H,V,k,W="ikas-storefront-widget",X=function(){try{var e=localStorage.getItem("ikas_session_id");return e&&JSON.parse(e).id||null}catch(e){return null}},J=function(){try{var e=localStorage.getItem(W);return e?JSON.parse(e):{}}catch(e){return{}}},q=function(e){try{var n=J(),r=t(t({},n),e);localStorage.setItem(W,JSON.stringify(r))}catch(e){}},z=function(){var e=X();return!!e&&J().closedDescriptionSessionId===e},K=function(){var e=X();e&&q({closedDescriptionSessionId:e})},Q=((L={})[h.ILLUSTRATION]=((b={})[A.CUSTOMER_REGISTER]=n.createElement(_,null),b[A.ENABLE_SUBSCRIPTION]=n.createElement(g,null),b[A.BUY_PRODUCT]=n.createElement(I,null),b[A.CUSTOMER_REVIEW]=n.createElement(S,null),b[A.CUSTOMER_SEGMENT]=n.createElement(E,null),b[A.ORDER_CREATE]=n.createElement(M,null),b),L[h.NORMAL]=((B={})[A.CUSTOMER_REGISTER]=n.createElement(T,null),B[A.ENABLE_SUBSCRIPTION]=n.createElement(o,null),B[A.BUY_PRODUCT]=n.createElement(R,null),B[A.CUSTOMER_REVIEW]=n.createElement(a,null),B[A.CUSTOMER_SEGMENT]=n.createElement(E,null),B[A.ORDER_CREATE]=n.createElement(p,null),B),L),Z=((G={})[h.ILLUSTRATION]=((F={})[D.MAIN_SCREEN]=n.createElement("div",null),F[D.CREDIT_EARNING_METHODS_SCREEN]=n.createElement(f,null),F[D.CREDIT_SPENDING_METHODS_SCREEN]=n.createElement(C,null),F[D.CREDIT_HISTORY_SCREEN]=n.createElement("div",null),F[D.LOYALTY_LEVEL_SCREEN]=n.createElement("div",null),F),G[h.NORMAL]=((Y={})[D.MAIN_SCREEN]=n.createElement("div",null),Y[D.CREDIT_EARNING_METHODS_SCREEN]=n.createElement(d,null),Y[D.CREDIT_SPENDING_METHODS_SCREEN]=n.createElement(E,null),Y[D.CREDIT_HISTORY_SCREEN]=n.createElement("div",null),Y[D.LOYALTY_LEVEL_SCREEN]=n.createElement("div",null),Y),G),$=function(e,t){return t&&t!==h.NONE&&Z[t]?Z[t][e]:null},ee=function(e,t){return t&&t!==h.NONE&&Q[t]?Q[t][e]:null},te=function(e){var t=r().t;switch(e){case A.CUSTOMER_REGISTER:return t("history.earningMethodLabels.CUSTOMER_REGISTER");case A.ENABLE_SUBSCRIPTION:return t("history.earningMethodLabels.ENABLE_SUBSCRIPTION");case A.CUSTOMER_REVIEW:return t("history.earningMethodLabels.CUSTOMER_REVIEW");case A.ORDER_CREATE:return t("history.earningMethodLabels.ORDER_CREATE");case A.BUY_PRODUCT:return t("history.earningMethodLabels.BUY_PRODUCT");case A.CUSTOMER_SEGMENT:return t("history.earningMethodLabels.CUSTOMER_SEGMENT");default:return""}},ne=function(e){var t=r().t;switch(e.methodType){case A.CUSTOMER_REGISTER:return t("earningMethods.CUSTOMER_REGISTER.title");case A.ENABLE_SUBSCRIPTION:return t("earningMethods.ENABLE_SUBSCRIPTION.title");case A.CUSTOMER_REVIEW:return t("earningMethods.CUSTOMER_REVIEW.title");case A.ORDER_CREATE:if(e.pointEarningType===y.DYNAMIC_ORDER_AMOUNT)return t("earningMethods.ORDER_CREATE.RECEIVE_POINTS_ON_SPEND.title");if(e.pointEarningType===y.STATIC)return t("earningMethods.ORDER_CREATE.BASE.title");case A.BUY_PRODUCT:return t("earningMethods.BUY_PRODUCT.title");case A.CUSTOMER_SEGMENT:return t("earningMethods.CUSTOMER_SEGMENT.title");default:return""}},re=function(e,t){var r,s,i;return t===h.NONE?null:((r={})[h.ILLUSTRATION]=((s={})[x.FIXED_AMOUNT]=n.createElement(U,null),s[x.RATIO]=n.createElement(U,null),s[x.FREE_PRODUCT]=n.createElement(O,null),s[x.FREE_SHIPPING]=n.createElement(N,null),s),r[h.NORMAL]=((i={})[x.FIXED_AMOUNT]=n.createElement(c,null),i[x.RATIO]=n.createElement(c,null),i[x.FREE_PRODUCT]=n.createElement(m,null),i[x.FREE_SHIPPING]=n.createElement(u,null),i),r)[t][e]},se=function(e){var t,n=r().t,i=s.language,l=null===(t=e.translations)||void 0===t?void 0:t.find(function(e){return e.locale===i});if(null==l?void 0:l.description)return l.description;if(e.description)return e.description;switch(e.type){case x.FIXED_AMOUNT:return e.isDynamic?n("spendingMethods.FIXED_AMOUNT.dynamicTitle"):n("spendingMethods.FIXED_AMOUNT.title");case x.RATIO:return n("spendingMethods.RATIO.title");case x.FREE_SHIPPING:return n("spendingMethods.FREE_SHIPPING.title");case x.FREE_PRODUCT:return n("spendingMethods.FREE_PRODUCT.title");default:return""}},ie=i.span(H||(H=e(["\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 @media (max-width: 600px) {\n ","\n }\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 @media (max-width: 600px) {\n ","\n }\n"])),P,v),le=i.span(V||(V=e(["\n ","\n color: #364152;\n\n @media (max-width: 600px) {\n ","\n }\n"],["\n ","\n color: #364152;\n\n @media (max-width: 600px) {\n ","\n }\n"])),P,w),oe=i.span(k||(k=e(["\n color: #697586;\n display: flex;\n align-items: center;\n"],["\n color: #697586;\n display: flex;\n align-items: center;\n"]))),ae=function(e,t){var s,i,o=r().t,a=(null===(s=e.discountSettings)||void 0===s?void 0:s.point)||0,E=null===(i=e.discountSettings)||void 0===i?void 0:i.discountAmount,c=function(e,r){return void 0===r&&(r=!1),n.createElement(j,null,function(s){return s?n.createElement(n.Fragment,null,n.createElement(le,null,o("earningMethods.xPoints",{points:a})),n.createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},n.createElement(oe,null,n.createElement(l,null)),n.createElement(ie,null,r&&"number"==typeof e?t.formatCurrency(e):e))):n.createElement(n.Fragment,null,n.createElement(le,null,o("earningMethods.xPoints",{points:a})),n.createElement(oe,null,n.createElement(l,null)),n.createElement(ie,null,r&&"number"==typeof e?t.formatCurrency(e):e))})};return e.type===x.FIXED_AMOUNT&&E?c(E,!0):e.type===x.RATIO&&E?c("%".concat(E)):o("earningMethods.xPoints",{points:a})};export{ee as getEarningMethodIcon,ne as getEarningMethodTitle,te as getHistoryEarningMethodLabel,X as getIkasSessionId,$ as getScreenIcon,ae as getSpendingMethodDescription,re as getSpendingMethodIcon,se as getSpendingMethodTitle,J as getWidgetStorage,z as isDescriptionClosedForCurrentSession,K as markDescriptionClosedForSession,q as setWidgetStorage};
1
+ import{__makeTemplateObject as e,__assign as t}from'./ext/tslib/tslib.es6.mjs.js';import n from"react";import'./ext/react-i18next/dist/es/context.js';import{useTranslation as r}from'./ext/react-i18next/dist/es/useTranslation.js';import s from'./ext/i18next/dist/esm/i18next.js';import i from"styled-components";import{ArrowRight as l}from"./assets/icons/arrow-right.js";import{BubbleChatDone as o}from"./assets/widget-icons/normal/bubbleChatDone.js";import{CommentAdd01 as a}from"./assets/widget-icons/normal/commentAdd01.js";import{CouponPercent as E}from"./assets/widget-icons/normal/couponPercent.js";import{DiscountTag02 as c}from"./assets/widget-icons/normal/discountTag02.js";import{Gift as m}from"./assets/widget-icons/normal/gift.js";import{MoneyAdd01 as u}from"./assets/widget-icons/normal/moneyAdd01.js";import{PackageDelivered as d}from"./assets/widget-icons/normal/packageDelivered.js";import{SaveMoneyDollar as R}from"./assets/widget-icons/normal/saveMoneyDollar.js";import{ShoppingBasketAdd02 as p}from"./assets/widget-icons/normal/shoppingBasketAdd02.js";import{UserAdd01 as T}from"./assets/widget-icons/normal/userAdd01.js";import{Refund as _}from"./assets/widget-icons/normal/refund.js";import{UsersIllustration as S}from"./assets/widget-icons/illustraions/usersIllustration.js";import{BubbleChatIllustration as I}from"./assets/widget-icons/illustraions/bubbleChatIllustration.js";import{ApprovedChatIllustration as O}from"./assets/widget-icons/illustraions/approvedChatIllustration.js";import{TshirtIllustration as f}from"./assets/widget-icons/illustraions/tshirtIllustration.js";import{Medal as g}from"./assets/widget-icons/illustraions/medal.js";import{GiftIllustration as N}from"./assets/widget-icons/illustraions/giftIllustration.js";import{ShippingBox as C}from"./assets/widget-icons/illustraions/shippingBox.js";import{BigSaleMedal as M}from"./assets/widget-icons/illustraions/bigSaleMedal.js";import{ShoppingCartIllustration as U}from"./assets/widget-icons/illustraions/shoppingCartIllustration.js";import{RefundIllustration as h}from"./assets/widget-icons/illustraions/refundIllustration.js";import{BankCoin as A}from"./assets/widget-icons/illustraions/bankCoin.js";import{WidgetIconTypeEnum as D}from"./models/loyalty-widget/types/index.js";import{EarningMethodTypeEnum as y,LoyaltyWidgetScreenTypeEnum as x,LoyaltyProgramPointEarningTypeEnum as j,LoyaltyProgramMethodSpendingTypeEnum as L}from"./models/types/index.js";import{FlexibleValueContainer as P}from"./renderer/components/flexible-value-container/index.js";import{textSM as w,textXSMedium as v,textXS as b}from"./renderer/components/style/typography.js";var G,B,F,Y,H,V,k,W,X,J="ikas-storefront-widget",q=function(){try{var e=localStorage.getItem("ikas_session_id");return e&&JSON.parse(e).id||null}catch(e){return null}},z=function(){try{var e=localStorage.getItem(J);return e?JSON.parse(e):{}}catch(e){return{}}},K=function(e){try{var n=z(),r=t(t({},n),e);localStorage.setItem(J,JSON.stringify(r))}catch(e){}},Q=function(){var e=q();return!!e&&z().closedDescriptionSessionId===e},Z=function(){var e=q();e&&K({closedDescriptionSessionId:e})},$=((G={})[D.ILLUSTRATION]=((B={})[y.CUSTOMER_REGISTER]=n.createElement(S,null),B[y.ENABLE_SUBSCRIPTION]=n.createElement(O,null),B[y.BUY_PRODUCT]=n.createElement(f,null),B[y.CUSTOMER_REVIEW]=n.createElement(I,null),B[y.CUSTOMER_SEGMENT]=n.createElement(E,null),B[y.ORDER_CREATE]=n.createElement(U,null),B),G[D.NORMAL]=((F={})[y.CUSTOMER_REGISTER]=n.createElement(T,null),F[y.ENABLE_SUBSCRIPTION]=n.createElement(o,null),F[y.BUY_PRODUCT]=n.createElement(R,null),F[y.CUSTOMER_REVIEW]=n.createElement(a,null),F[y.CUSTOMER_SEGMENT]=n.createElement(E,null),F[y.ORDER_CREATE]=n.createElement(p,null),F),G),ee=((Y={})[D.ILLUSTRATION]=((H={})[x.MAIN_SCREEN]=n.createElement("div",null),H[x.CREDIT_EARNING_METHODS_SCREEN]=n.createElement(g,null),H[x.CREDIT_SPENDING_METHODS_SCREEN]=n.createElement(M,null),H[x.CREDIT_HISTORY_SCREEN]=n.createElement("div",null),H[x.LOYALTY_LEVEL_SCREEN]=n.createElement("div",null),H[x.GIFT_PRODUCT_SELECTION_SCREEN]=n.createElement(N,null),H),Y[D.NORMAL]=((V={})[x.MAIN_SCREEN]=n.createElement("div",null),V[x.CREDIT_EARNING_METHODS_SCREEN]=n.createElement(u,null),V[x.CREDIT_SPENDING_METHODS_SCREEN]=n.createElement(E,null),V[x.CREDIT_HISTORY_SCREEN]=n.createElement("div",null),V[x.LOYALTY_LEVEL_SCREEN]=n.createElement("div",null),V[x.GIFT_PRODUCT_SELECTION_SCREEN]=n.createElement(m,null),V),Y),te=function(e,t){return t&&t!==D.NONE&&ee[t]?ee[t][e]:null},ne=function(e,t){return t&&t!==D.NONE&&$[t]?$[t][e]:null},re=function(e){var t=r().t;switch(e){case y.CUSTOMER_REGISTER:return t("history.earningMethodLabels.CUSTOMER_REGISTER");case y.ENABLE_SUBSCRIPTION:return t("history.earningMethodLabels.ENABLE_SUBSCRIPTION");case y.CUSTOMER_REVIEW:return t("history.earningMethodLabels.CUSTOMER_REVIEW");case y.ORDER_CREATE:return t("history.earningMethodLabels.ORDER_CREATE");case y.BUY_PRODUCT:return t("history.earningMethodLabels.BUY_PRODUCT");case y.CUSTOMER_SEGMENT:return t("history.earningMethodLabels.CUSTOMER_SEGMENT");default:return""}},se=function(e){var t=r().t;switch(e.methodType){case y.CUSTOMER_REGISTER:return t("earningMethods.CUSTOMER_REGISTER.title");case y.ENABLE_SUBSCRIPTION:return t("earningMethods.ENABLE_SUBSCRIPTION.title");case y.CUSTOMER_REVIEW:return t("earningMethods.CUSTOMER_REVIEW.title");case y.ORDER_CREATE:if(e.pointEarningType===j.DYNAMIC_ORDER_AMOUNT)return t("earningMethods.ORDER_CREATE.RECEIVE_POINTS_ON_SPEND.title");if(e.pointEarningType===j.STATIC)return t("earningMethods.ORDER_CREATE.BASE.title");case y.BUY_PRODUCT:return t("earningMethods.BUY_PRODUCT.title");case y.CUSTOMER_SEGMENT:return t("earningMethods.CUSTOMER_SEGMENT.title");default:return""}},ie=function(e,t){var r,s,i;return t===D.NONE?null:((r={})[D.ILLUSTRATION]=((s={})[L.FIXED_AMOUNT]=n.createElement(A,null),s[L.RATIO]=n.createElement(A,null),s[L.FREE_PRODUCT]=n.createElement(N,null),s[L.FREE_SHIPPING]=n.createElement(C,null),s),r[D.NORMAL]=((i={})[L.FIXED_AMOUNT]=n.createElement(c,null),i[L.RATIO]=n.createElement(c,null),i[L.FREE_PRODUCT]=n.createElement(m,null),i[L.FREE_SHIPPING]=n.createElement(d,null),i),r)[t][e]},le=function(e){var t;return e&&e!==D.NONE?((t={})[D.ILLUSTRATION]=n.createElement(h,null),t[D.NORMAL]=n.createElement(_,null),t)[e]:null},oe=function(e){var t,n=r().t,i=s.language,l=null===(t=e.translations)||void 0===t?void 0:t.find(function(e){return e.locale===i});if(null==l?void 0:l.description)return l.description;if(e.description)return e.description;switch(e.type){case L.FIXED_AMOUNT:return e.isDynamic?n("spendingMethods.FIXED_AMOUNT.dynamicTitle"):n("spendingMethods.FIXED_AMOUNT.title");case L.RATIO:return n("spendingMethods.RATIO.title");case L.FREE_SHIPPING:return n("spendingMethods.FREE_SHIPPING.title");case L.FREE_PRODUCT:return n("spendingMethods.FREE_PRODUCT.title");default:return""}},ae=i.span(k||(k=e(["\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 @media (max-width: 600px) {\n ","\n }\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 @media (max-width: 600px) {\n ","\n }\n"])),w,v),Ee=i.span(W||(W=e(["\n ","\n color: #364152;\n\n @media (max-width: 600px) {\n ","\n }\n"],["\n ","\n color: #364152;\n\n @media (max-width: 600px) {\n ","\n }\n"])),w,b),ce=i.span(X||(X=e(["\n color: #697586;\n display: flex;\n align-items: center;\n"],["\n color: #697586;\n display: flex;\n align-items: center;\n"]))),me=function(e,t){var s,i,o=r().t,a=(null===(s=e.discountSettings)||void 0===s?void 0:s.point)||0,E=null===(i=e.discountSettings)||void 0===i?void 0:i.discountAmount,c=function(e,r){return void 0===r&&(r=!1),n.createElement(P,null,function(s){return s?n.createElement(n.Fragment,null,n.createElement(Ee,null,o("earningMethods.xPoints",{points:a})),n.createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},n.createElement(ce,null,n.createElement(l,null)),n.createElement(ae,null,r&&"number"==typeof e?t.formatCurrency(e):e))):n.createElement(n.Fragment,null,n.createElement(Ee,null,o("earningMethods.xPoints",{points:a})),n.createElement(ce,null,n.createElement(l,null)),n.createElement(ae,null,r&&"number"==typeof e?t.formatCurrency(e):e))})};return e.type===L.FIXED_AMOUNT&&E?c(E,!0):e.type===L.RATIO&&E?c("%".concat(E)):o("earningMethods.xPoints",{points:a})};export{ne as getEarningMethodIcon,se as getEarningMethodTitle,re as getHistoryEarningMethodLabel,q as getIkasSessionId,le as getRefundIcon,te as getScreenIcon,me as getSpendingMethodDescription,ie as getSpendingMethodIcon,oe as getSpendingMethodTitle,z as getWidgetStorage,Q as isDescriptionClosedForCurrentSession,Z as markDescriptionClosedForSession,K as setWidgetStorage};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/loyalty-widget-renderer",
3
- "version": "1.0.0-alpha.80",
3
+ "version": "1.0.0-alpha.82",
4
4
  "description": "",
5
5
  "author": "ucy",
6
6
  "license": "ISC",