@ikas/loyalty-widget-renderer 1.0.0-alpha.95 → 1.0.0-alpha.97

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 (47) hide show
  1. package/build/ext/dompurify/dist/purify.es.mjs.js +4 -0
  2. package/build/index.d.ts +2 -0
  3. package/build/index.js +1 -1
  4. package/build/locales.d.ts +65 -0
  5. package/build/models/index.d.ts +5 -0
  6. package/build/models/index.js +1 -1
  7. package/build/models/loyalty-customer-info/index.d.ts +2 -0
  8. package/build/models/loyalty-customer-info/index.js +1 -1
  9. package/build/models/loyalty-program/index.d.ts +5 -0
  10. package/build/models/loyalty-program/index.js +1 -0
  11. package/build/models/loyalty-program-earning-method/index.d.ts +1 -0
  12. package/build/models/loyalty-program-earning-method/index.js +1 -1
  13. package/build/models/loyalty-program-point-history/index.d.ts +1 -0
  14. package/build/models/loyalty-program-point-history/index.js +1 -1
  15. package/build/models/loyalty-widget/faq.d.ts +6 -0
  16. package/build/models/loyalty-widget/faq.js +1 -0
  17. package/build/models/loyalty-widget/index.d.ts +2 -0
  18. package/build/models/loyalty-widget/index.js +1 -1
  19. package/build/models/types/index.d.ts +4 -1
  20. package/build/models/types/index.js +1 -1
  21. package/build/renderer/components/count-up/index.js +1 -1
  22. package/build/renderer/index.js +1 -1
  23. package/build/renderer/screens/credit-history-screen/index.js +1 -1
  24. package/build/renderer/screens/credit-spending-methods-screen/index.js +1 -1
  25. package/build/renderer/screens/faq-screen/index.d.ts +9 -0
  26. package/build/renderer/screens/faq-screen/index.js +1 -0
  27. package/build/renderer/screens/faq-screen/style.d.ts +19 -0
  28. package/build/renderer/screens/faq-screen/style.js +1 -0
  29. package/build/renderer/screens/gift-product-selection-screen/index.js +1 -1
  30. package/build/renderer/screens/loyalty-level-screen/index.js +1 -1
  31. package/build/renderer/screens/main-screen/earning-methods-section/index.js +1 -1
  32. package/build/renderer/screens/main-screen/header/user-logged-section/index.js +1 -1
  33. package/build/renderer/screens/main-screen/header/user-logged-section/style.d.ts +1 -1
  34. package/build/renderer/screens/main-screen/header/user-logged-section/style.js +1 -1
  35. package/build/renderer/screens/main-screen/program-info-section/index.js +1 -1
  36. package/build/renderer/screens/main-screen/spending-methods-section/dynamic-slider.js +1 -1
  37. package/build/renderer/utils/locales/de.json.js +1 -1
  38. package/build/renderer/utils/locales/en.json.js +1 -1
  39. package/build/renderer/utils/locales/fr.json.js +1 -1
  40. package/build/renderer/utils/locales/nl.json.js +1 -1
  41. package/build/renderer/utils/locales/tr.json.js +1 -1
  42. package/build/renderer/utils/sanitize-html.d.ts +1 -0
  43. package/build/renderer/utils/sanitize-html.js +1 -0
  44. package/build/storefront-widget-script-injector.iife.js +10 -6
  45. package/build/storefront-widget-script-injector.iife.js.map +1 -1
  46. package/build/utils.js +1 -1
  47. package/package.json +2 -1
@@ -0,0 +1,4 @@
1
+ /*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */
2
+ function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}
3
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
4
+ function e(e,n){return function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,i,a,l=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(l.push(o.value),l.length!==e);c=!0);}catch(t){u=!0,r=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return l}}(e,n)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const n=Object.entries,o=Object.setPrototypeOf,r=Object.isFrozen,i=Object.getPrototypeOf,a=Object.getOwnPropertyDescriptor;let l=Object.freeze,c=Object.seal,u=Object.create,s="undefined"!=typeof Reflect&&Reflect,f=s.apply,p=s.construct;l||(l=function(t){return t}),c||(c=function(t){return t}),f||(f=function(t,e){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return t.apply(e,o)}),p||(p=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return new t(...n)});const m=P(Array.prototype.forEach),d=P(Array.prototype.lastIndexOf),h=P(Array.prototype.pop),y=P(Array.prototype.push),g=P(Array.prototype.slice),b=P(Array.prototype.splice),S=Array.isArray,T=U(Set),A=P(Set.prototype.add),w=P(Set.prototype.has),E=P(String.prototype.toLowerCase),v=P(String.prototype.toString),O=P(String.prototype.match),x=P(String.prototype.replace),N=P(String.prototype.indexOf),_=P(String.prototype.trim),D=P(Number.prototype.toString),k=P(Boolean.prototype.toString),C="undefined"==typeof BigInt?null:P(BigInt.prototype.toString),R="undefined"==typeof Symbol?null:P(Symbol.prototype.toString),I=P(Object.prototype.hasOwnProperty),L=P(Object.prototype.toString),z=P(RegExp.prototype.test),M=U(TypeError);function P(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return f(t,e,o)}}function U(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return p(t,n)}}function F(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E;if(o&&o(t,null),!S(e))return t;let i=e.length;for(;i--;){let o=e[i];if("string"==typeof o){const t=n(o);t!==o&&(r(e)||(e[i]=t),o=t)}t[o]=!0}return t}function H(t){for(let e=0;e<t.length;e++)I(t,e)||(t[e]=null);return t}function j(t){const o=u(null);for(const i of n(t)){var r=e(i,2);const n=r[0],a=r[1];I(t,n)&&(S(a)?o[n]=H(a):a&&"object"==typeof a&&a.constructor===Object?o[n]=j(a):o[n]=a)}return o}function B(t,e){for(;null!==t;){const n=a(t,e);if(n){if(n.get)return P(n.get);if("function"==typeof n.value)return P(n.value)}t=i(t)}return function(){return null}}const W=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Y=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),G=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),q=l(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),$=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),X=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),K=l(["#text"]),V=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Z=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),J=l(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Q=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),tt=c(/{{[\w\W]*|^[\w\W]*}}/g),et=c(/<%[\w\W]*|^[\w\W]*%>/g),nt=c(/\${[\w\W]*/g),ot=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),rt=c(/^aria-[\-\w]+$/),it=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),at=c(/^(?:\w+script|data):/i),lt=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ct=c(/^html$/i),ut=c(/^[a-z][.\w]*(-[.\w]+)+$/i),st=c(/<[/\w!]/g),ft=c(/<[/\w]/g),pt=c(/<\/no(script|embed|frames)/i),mt=c(/\/>/i),dt=1,ht=3,yt=7,gt=8,bt=9,St=11,Tt=l(F({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),At=function(){return"undefined"==typeof window?null:window},wt=function(t,e,n,o){return I(t,e)&&S(t[e])?F(o.base?j(o.base):{},t[e],o.transform):n},Et=function(t,e,n){const o=I(t,e)?t[e]:void 0;return o&&"object"==typeof o?j(o):n()};var vt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:At();const o=e=>t(e);if(o.version="3.4.17",o.removed=[],!e||!e.document||e.document.nodeType!==bt||!e.Element)return o.isSupported=!1,o;let r=e.document;const s=r,f=s.currentScript;e.DocumentFragment;const p=e.HTMLTemplateElement,U=e.Node,H=e.Element,vt=e.NodeFilter;void 0===e.NamedNodeMap&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const Ot=e.DOMParser,xt=e.trustedTypes,Nt=H.prototype,_t=B(Nt,"cloneNode"),Dt=B(Nt,"remove"),kt=B(Nt,"removeAttributeNode"),Ct=B(Nt,"nextSibling"),Rt=B(Nt,"childNodes"),It=B(Nt,"parentNode"),Lt=B(Nt,"shadowRoot"),zt=B(Nt,"attributes"),Mt=U&&U.prototype?B(U.prototype,"nodeType"):null,Pt=U&&U.prototype?B(U.prototype,"nodeName"):null,Ut=U&&U.prototype?B(U.prototype,"ownerDocument"):null,Ft=function(t){return Mt?Mt(t):t.nodeType},Ht=function(t){return Pt?Pt(t):t.nodeName},jt=function(t,e){for(;null!==t;){const n=a(t,e);if(n)return n.get?P(n.get):null;t=i(t)}return null}(Nt,"namespaceURI"),Bt=function(t){return jt?jt(t):t.namespaceURI};if("function"==typeof p){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let Wt,Yt,Gt="",qt=!1,$t=0;const Xt=function(){if($t>0)throw M('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Kt=function(t){Xt(),$t++;try{return Wt.createHTML(t)}finally{$t--}},Vt=function(){return qt||(Yt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";e&&e.hasAttribute(o)&&(n=e.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(xt,f),qt=!0),Yt},Zt=r,Jt=Zt.implementation,Qt=Zt.createNodeIterator,te=Zt.createDocumentFragment,ee=Zt.getElementsByTagName,ne=s.importNode;let oe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof n&&"function"==typeof It&&Jt&&void 0!==Jt.createHTMLDocument;const re=tt,ie=et,ae=nt,le=ot,ce=rt,ue=at,se=lt,fe=ut;let pe=it,me=null;const de=F({},[...W,...Y,...G,...$,...K]);let he=null;const ye=F({},[...V,...Z,...J,...Q]);let ge=Object.seal(u(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),be=null,Se=null;const Te=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ae=!0,we=!0,Ee=!1,ve=!0,Oe=!1,xe=!0,Ne=!1,_e=!1,De=null,ke=null,Ce=!1,Re=!1,Ie=!1,Le=!1,ze=!0,Me=!1;const Pe="user-content-";let Ue=!0,Fe=!1,He=null,je={},Be=null;const We=F({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ye=null;const Ge=F({},["audio","video","img","source","image","track"]);let qe=null;const $e=F({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xe="http://www.w3.org/1998/Math/MathML",Ke="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml";let Ze=Ve,Je=!1,Qe=null;const tn=F({},[Xe,Ke,Ve],v),en=l(["mi","mo","mn","ms","mtext"]);let nn=F({},en);const on=l(["annotation-xml"]);let rn=F({},on);const an=F({},["title","style","font","a","script"]);let ln=null;const cn=["application/xhtml+xml","text/html"];let un=null,sn=null;const fn=r.createElement("form"),pn=function(t){return t instanceof RegExp||t instanceof Function},mn=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(sn&&sn===t)return;t&&"object"==typeof t||(t={}),t=j(t),ln=-1===cn.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,un="application/xhtml+xml"===ln?v:E,me=wt(t,"ALLOWED_TAGS",de,{transform:un}),he=wt(t,"ALLOWED_ATTR",ye,{transform:un}),Qe=wt(t,"ALLOWED_NAMESPACES",tn,{transform:v}),qe=wt(t,"ADD_URI_SAFE_ATTR",$e,{transform:un,base:$e}),Ye=wt(t,"ADD_DATA_URI_TAGS",Ge,{transform:un,base:Ge}),Be=wt(t,"FORBID_CONTENTS",We,{transform:un}),be=wt(t,"FORBID_TAGS",j({}),{transform:un}),Se=wt(t,"FORBID_ATTR",j({}),{transform:un}),je=!!I(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?j(t.USE_PROFILES):t.USE_PROFILES),Ae=!1!==t.ALLOW_ARIA_ATTR,we=!1!==t.ALLOW_DATA_ATTR,Ee=t.ALLOW_UNKNOWN_PROTOCOLS||!1,ve=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Oe=t.SAFE_FOR_TEMPLATES||!1,xe=!1!==t.SAFE_FOR_XML,Ne=t.WHOLE_DOCUMENT||!1,Re=t.RETURN_DOM||!1,Ie=t.RETURN_DOM_FRAGMENT||!1,Le=t.RETURN_TRUSTED_TYPE||!1,Ce=t.FORCE_BODY||!1,ze=!1!==t.SANITIZE_DOM,Me=t.SANITIZE_NAMED_PROPS||!1,Ue=!1!==t.KEEP_CONTENT,Fe=t.IN_PLACE||!1,pe=function(t){try{return z(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:it,Ze="string"==typeof t.NAMESPACE?t.NAMESPACE:Ve,nn=Et(t,"MATHML_TEXT_INTEGRATION_POINTS",()=>F({},en)),rn=Et(t,"HTML_INTEGRATION_POINTS",()=>F({},on));const e=Et(t,"CUSTOM_ELEMENT_HANDLING",()=>u(null));if(ge=u(null),I(e,"tagNameCheck")&&pn(e.tagNameCheck)&&(ge.tagNameCheck=e.tagNameCheck),I(e,"attributeNameCheck")&&pn(e.attributeNameCheck)&&(ge.attributeNameCheck=e.attributeNameCheck),I(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(ge.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),c(ge),Oe&&(we=!1),Ie&&(Re=!0),je&&(me=F({},K),he=u(null),!0===je.html&&(F(me,W),F(he,V)),!0===je.svg&&(F(me,Y),F(he,Z),F(he,Q)),!0===je.svgFilters&&(F(me,G),F(he,Z),F(he,Q)),!0===je.mathMl&&(F(me,$),F(he,J),F(he,Q))),Te.tagCheck=null,Te.attributeCheck=null,I(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?Te.tagCheck=t.ADD_TAGS:S(t.ADD_TAGS)&&(me===de&&(me=j(me)),F(me,t.ADD_TAGS,un))),I(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?Te.attributeCheck=t.ADD_ATTR:S(t.ADD_ATTR)&&(he===ye&&(he=j(he)),F(he,t.ADD_ATTR,un))),I(t,"ADD_FORBID_CONTENTS")&&S(t.ADD_FORBID_CONTENTS)&&(Be===We&&(Be=j(Be)),F(Be,t.ADD_FORBID_CONTENTS,un)),Ue&&(me["#text"]=!0),Ne&&F(me,["html","head","body"]),me.table&&(F(me,["tbody"]),delete be.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw M('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw M('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const e=Wt;Wt=t.TRUSTED_TYPES_POLICY;try{Gt=Kt("")}catch(t){throw Wt=e,t}}else null===t.TRUSTED_TYPES_POLICY?(Wt=void 0,Gt=""):(void 0===Wt&&(Wt=Vt()),Wt&&"string"==typeof Gt&&(Gt=Kt("")));l&&l(t),sn=t},dn=F({},[...Y,...G,...q]),hn=F({},[...$,...X]),yn=function(t){const e=Bt(t),n=E(Ht(t)),o=It(t);let r,i;return o&&Ft(o)===dt?(r={namespaceURI:Bt(o)},i=E(Ht(o))):(r={namespaceURI:Ze},i="template"),!!Qe[e]&&(e===Ke?function(t,e,n){return e.namespaceURI===Ve?"svg"===t:e.namespaceURI===Xe?"svg"===t&&("annotation-xml"===n||nn[n]):Boolean(dn[t])}(n,r,i):e===Xe?function(t,e,n){return e.namespaceURI===Ve?"math"===t:e.namespaceURI===Ke?"math"===t&&rn[n]:Boolean(hn[t])}(n,r,i):e===Ve?function(t,e,n){return!(e.namespaceURI===Ke&&!rn[n])&&!(e.namespaceURI===Xe&&!nn[n])&&!hn[t]&&(an[t]||!dn[t])}(n,r,i):!("application/xhtml+xml"!==ln||!Qe[e]))},gn=function(t){y(o.removed,{element:t});try{It(t).removeChild(t)}catch(e){if(Dt(t),!It(t))throw M("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},bn=function(t,e,n){try{kt(t,e)}catch(e){try{t.removeAttribute(n)}catch(t){}}},Sn=function(t){En(t);const e=Rt(t);e&&m(g(e),t=>{try{Dt(t)}catch(t){}});const n=Ft(t)===dt?zt(t):null;if(n)for(let e=n.length-1;e>=0;--e){const o=n[e],r=o&&o.name;"string"==typeof r&&bn(t,o,r)}},Tn=function(t,e,n){if(!n)try{n=e.getAttributeNode(t)}catch(t){n=null}y(o.removed,{attribute:n||null,from:e});try{n?kt(e,n):e.removeAttribute(t)}catch(n){try{e.removeAttribute(t)}catch(t){}}if("is"===t)if(Re||Ie)try{gn(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},An=function(t){const e=zt(t);if(e)for(let n=e.length-1;n>=0;--n){const o=e[n],r=o&&o.name;"string"!=typeof r||he[un(r)]||bn(t,o,r)}},wn=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[t];for(;o.length>0;){const t=o.pop();if(!1===e(t))continue;if(n&&Ft(t)===dt){const e=Lt(t);Ln(e)&&o.push(e)}const r=Rt(t);if(r)for(let t=r.length-1;t>=0;--t)o.push(r[t])}},En=function(t){wn(t,t=>{Ft(t)===dt&&An(t)})},vn=function(t){const e=[];return wn(t,t=>{e.push(t)},!0),e},On=function(t,e){let n=!1;return m(o.removed,e=>{e.element&&(n=n||e.element===t,En(e.element))}),function(t,e){const n=T();m(vn(t),t=>{Ft(t)===dt&&A(n,t)}),m(e,t=>{Ft(t)!==dt||w(n,t)||An(t)})}(t,e),n},xn=function(t,e,n,o){const r=Dn(t);let i;for(;i=r.nextNode();)w(o,i)&&!w(He,i)&&(e&&Mn(oe.uponSanitizeShadowNode,i,null),Hn(i,n),$n(i,n),Ln(i.content)&&Xn(i.content))},Nn=function(t,e){return!!xe&&("patchsrc"===t||"for"===t&&"label"!==e&&"output"!==e)},_n=function(t){let e=null,n=null;if(Ce)t="<remove></remove>"+t;else{const e=O(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===ln&&Ze===Ve&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const o=Wt?Kt(t):t;if(Ze===Ve)try{e=(new Ot).parseFromString(o,ln)}catch(t){}if(!e||!e.documentElement){e=Jt.createDocument(Ze,"template",null);try{e.documentElement.innerHTML=Je?Gt:o}catch(t){}}const i=e.body||e.documentElement;return t&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Ze===Ve?ee.call(e,Ne?"html":"body")[0]:Ne?e.documentElement:i},Dn=function(t){const e=Ut?Ut(t):t.ownerDocument;return Qt.call(e||t,t,vt.SHOW_ELEMENT|vt.SHOW_COMMENT|vt.SHOW_TEXT|vt.SHOW_PROCESSING_INSTRUCTION|vt.SHOW_CDATA_SECTION,null)},kn=function(t){return t=x(t,re," "),t=x(t,ie," "),t=x(t,ae," ")},Cn=function(t){var e;Rn(t);const n=null===(e=t.querySelectorAll)||void 0===e?void 0:e.call(t,"template");n&&m(n,t=>{Ln(t.content)&&Cn(t.content)})},Rn=function(t){t.normalize();const e=Ut?Ut(t):t.ownerDocument,n=Qt.call(e||t,t,vt.SHOW_TEXT|vt.SHOW_COMMENT|vt.SHOW_CDATA_SECTION|vt.SHOW_PROCESSING_INSTRUCTION,null);let o=n.nextNode();for(;o;)o.data=kn(o.data),o=n.nextNode()},In=function(t){const e=Pt?Pt(t):null;return"string"==typeof e&&("form"===un(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==zt(t)||"function"!=typeof t.removeAttribute||"function"!=typeof t.removeAttributeNode||"function"!=typeof t.getAttributeNode||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes||t.nodeType!==Mt(t)||t.childNodes!==Rt(t)))},Ln=function(t){if(!Mt||"object"!=typeof t||null===t)return!1;try{return Mt(t)===St}catch(t){return!1}},zn=function(t){if(!Mt||"object"!=typeof t||null===t)return!1;try{return"number"==typeof Mt(t)}catch(t){return!1}};function Mn(t,e,n){0!==t.length&&m(t,t=>{t.call(o,e,n,sn)})}const Pn=function(t,e){if(t instanceof RegExp)return z(t,e);if(t instanceof Function){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return Boolean(t(e,...o))}return!1},Un=function(t,e,n,o){return 0===t.length?e:e===n||e===o?j(e):e},Fn=function(t,e){return t!==e&&null===It(t)&&(Fe&&En(t),!0)},Hn=function(t,e){var n;if(n=t,He&&A(He,n),Mn(oe.beforeSanitizeElements,t,null),Fn(t,e))return!0;if(In(t))return gn(t),!0;const r=un(Ht(t));if(me=Un(oe.uponSanitizeElement,me,de,De),Mn(oe.uponSanitizeElement,t,{tagName:r,allowedTags:me}),Fn(t,e))return!0;if(function(t,e){return!!(xe&&t.hasChildNodes()&&!zn(t.firstElementChild)&&z(st,t.textContent)&&z(st,t.innerHTML))||!!(xe&&Tt[e]&&Ft(t)===dt&&Bt(t)===Ve&&(zn(t.firstElementChild)||"string"==typeof t.textContent&&z(st,t.textContent)))||t.nodeType===yt||!(!xe||t.nodeType!==gt||!z(ft,t.data))}(t,r))return gn(t),!0;if(be[r]||!(Te.tagCheck instanceof Function&&Te.tagCheck(r))&&!me[r]){const n=function(t,e,n){if(!be[e]&&Wn(e)&&Pn(ge.tagNameCheck,e))return!1;if(Ue&&!Be[e]&&!Be[E(e)]){const e=It(t),o=Rt(t);if(o&&e)for(let r=o.length-1;r>=0;--r){const i=t===n?_t(o[r],!0):o[r];e.insertBefore(i,Ct(t))}}return gn(t),!0}(t,r,e);return!(!1!==n||(Mn(oe.afterSanitizeElements,t,null),!Fn(t,e)))||n}if(Ft(t)===dt&&!yn(t))return gn(t),!0;if(("noscript"===r||"noembed"===r||"noframes"===r)&&z(pt,t.innerHTML))return gn(t),!0;if(Oe&&t.nodeType===ht){const e=kn(t.textContent);t.textContent!==e&&(y(o.removed,{element:t.cloneNode()}),t.textContent=e)}return Mn(oe.afterSanitizeElements,t,null),Fn(t,e)},jn=function(t,e,n){if(Se[e])return!1;if(Nn(e,t))return!1;if(ze&&("id"===e||"name"===e)&&(n in r||n in fn))return!1;const o=he[e]||Te.attributeCheck instanceof Function&&Te.attributeCheck(e,t);return!(!we||!z(le,e))||(!(!Ae||!z(ce,e))||(o?!!qe[e]||(!!z(pe,x(n,se,""))||(!("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==N(n,"data:")||!Ye[t])||(!(!Ee||z(ue,x(n,se,"")))||!n))):Wn(t)&&Pn(ge.tagNameCheck,t)&&Pn(ge.attributeNameCheck,e,t)||"is"===e&&ge.allowCustomizedBuiltInElements&&Pn(ge.tagNameCheck,n)))},Bn=F({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Wn=function(t){return!Bn[E(t)]&&z(fe,t)},Yn=function(t,e,n,o){if(Wt&&"object"==typeof xt&&"function"==typeof xt.getAttributeType&&!n)switch(xt.getAttributeType(t,e)){case"TrustedHTML":return Kt(o);case"TrustedScriptURL":return function(t){Xt(),$t++;try{return Wt.createScriptURL(t)}finally{$t--}}(o)}return o},Gn=function(t,e,n,o){try{return n?t.setAttributeNS(n,e,o):t.setAttribute(e,o),!In(t)||(gn(t),!1)}catch(n){return Tn(e,t),!1}},qn=function(t,e){return!(!xe||!z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,e))||"attributename"===E(t)&&null!==O(e,"href")},$n=function(t,e){if(Mn(oe.beforeSanitizeAttributes,t,null),Fn(t,e))return;const n=t.attributes;if(!n||In(t))return;he=Un(oe.uponSanitizeAttribute,he,ye,ke);const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:he,forceKeepAttr:void 0};let i=n.length;const a=un(t.nodeName);for(;i--;){const e=n[i],l=e.name,c=e.namespaceURI,u=e.value,s=un(l),f=u;let p="value"===l?f:_(f),m=!1;r.attrName=s,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,Mn(oe.uponSanitizeAttribute,t,r),p=r.attrValue,!Me||"id"!==s&&"name"!==s||0===N(p,Pe)||(Tn(l,t,e),p=Pe+p,m=!0),qn(l,p)?Tn(l,t,e):r.forceKeepAttr||(r.keepAttr&&(ve||!z(mt,p))?(Oe&&(p=kn(p)),jn(a,s,p)?(p=Yn(a,s,c,p),p!==f&&Gn(t,l,c,p)&&m&&h(o.removed)):Tn(l,t,e)):Tn(l,t,e))}Mn(oe.afterSanitizeAttributes,t,null),Fn(t,e)},Xn=function(t){let e=null;const n=Dn(t);for(Mn(oe.beforeSanitizeShadowDOM,t,null);e=n.nextNode();)if(Mn(oe.uponSanitizeShadowNode,e,null),Hn(e,t),$n(e,t),Ln(e.content)&&Xn(e.content),Ft(e)===dt){const t=Lt(e);Ln(t)&&(Kn(t),Xn(t))}Oe&&Rn(t),Mn(oe.afterSanitizeShadowDOM,t,null)},Kn=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const t=e.pop();if(t.shadow){Xn(t.shadow);continue}const n=t.node,o=Ft(n)===dt,r=Rt(n);if(r)for(let t=r.length-1;t>=0;--t)e.push({node:r[t],shadow:null});if(o){const t=Pt?Pt(n):null;if("string"==typeof t&&"template"===un(t)){const t=n.content;Ln(t)&&e.push({node:t,shadow:null})}}if(o){const t=Lt(n);Ln(t)&&e.push({node:null,shadow:t},{node:t,shadow:null})}}};return o.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,a=null;if(Je=!t,Je&&(t="\x3c!--\x3e"),"string"!=typeof t&&!zn(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return D(t);case"boolean":return k(t);case"bigint":return C?C(t):"0";case"symbol":return R?R(t):"Symbol()";case"undefined":default:return L(t);case"function":case"object":{if(null===t)return L(t);const e=t,n=B(e,"toString");if("function"==typeof n){const t=n(e);return"string"==typeof t?t:L(t)}return L(t)}}}(t)))throw M("dirty is not a string, aborting");if(!o.isSupported)return t;_e?(me=De,he=ke):mn(e),(oe.uponSanitizeElement.length>0||oe.uponSanitizeAttribute.length>0)&&(me=j(me)),oe.uponSanitizeAttribute.length>0&&(he=j(he)),o.removed=[];const l=Fe&&"string"!=typeof t&&zn(t);let c=[];const u=He;if(l){f=t,xe&&wn(f,t=>{const e=Ft(t);if(e===yt||e===gt&&z(ft,t.data)){try{Dt(t)}catch(t){}return!1}if(e===dt){const e=t,n=un(Ht(t));try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&Nn("for",n)&&e.removeAttribute("for")}catch(t){}}return!0});const e=Ht(t);if("string"==typeof e){const n=un(e);if(!me[n]||be[n])throw Sn(t),M("root node is forbidden and cannot be sanitized in-place")}if(In(t))throw Sn(t),M("root node is clobbered and cannot be sanitized in-place");c=vn(t),He=T()}else if(zn(t))n=_n("\x3c!----\x3e"),r=n.ownerDocument.importNode(t,!0),r.nodeType===dt&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r),Kn(n);else{if(!Re&&!Oe&&!Ne&&-1===t.indexOf("<"))return Wt&&Le?Kt(t):t;if(n=_n(t),!n)return Re?null:Le?Gt:""}var f;n&&Ce&&gn(n.firstChild);const p=l?t:n;try{l&&Kn(t);const e=Dn(p);for(;i=e.nextNode();)Hn(i,p),$n(i,p),Ln(i.content)&&Xn(i.content);l&&function(t,e){const n=He;let o=null;const r=()=>(o||(o=T(),m(e,t=>{A(o,t)})),o);for(let e=0;;e++){const o=vn(t),i=[t];let a=!1;if(m(o,t=>{Ft(t)===St?y(i,t):a||w(n,t)||(a=w(r(),t))}),!a)return;if(e>=8)throw M("the tree kept changing during in-place sanitization; refusing to return it");m(i,(e,n)=>{xn(e,n>0,t,r())})}}(t,c)}catch(e){throw l&&(Sn(t),On(t,c)),e}finally{He=u}if(l){if(On(t,c))throw M("a node selected for removal could not be safely returned; refusing to sanitize in place");return Oe&&Cn(t),t}if(Re){if(Oe&&Cn(n),Ie)for(a=te.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(he.shadowroot||he.shadowrootmode)&&(a=ne.call(s,a,!0)),a}let d=Ne?n.outerHTML:n.innerHTML;return Ne&&me["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&z(ct,n.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+d),Oe&&(d=kn(d)),Wt&&Le?Kt(d):d},o.setConfig=function(){mn(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),_e=!0,De=me,ke=he},o.clearConfig=function(){sn=null,_e=!1,De=null,ke=null,Wt=Yt,Gt=""},o.isValidAttribute=function(t,e,n){sn||mn({});const o=un(t),r=un(e);return("string"!=typeof n||!(qn(e,n)||!ve&&z(mt,n)))&&jn(o,r,n)},o.addHook=function(t,e){"function"==typeof e&&I(oe,t)&&y(oe[t],e)},o.removeHook=function(t,e){if(I(oe,t)){if(void 0!==e){const n=d(oe[t],e);return-1===n?void 0:b(oe[t],n,1)[0]}return h(oe[t])}},o.removeHooks=function(t){I(oe,t)&&(oe[t]=[])},o.removeAllHooks=function(){oe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();export{vt as default};
package/build/index.d.ts CHANGED
@@ -4,10 +4,12 @@ export * from "./models/loyalty-widget/types";
4
4
  export * from "./models/loyalty-widget/header";
5
5
  export * from "./models/loyalty-widget/header/header-background";
6
6
  export * from "./models/loyalty-widget/translations";
7
+ export * from "./models/loyalty-widget/faq";
7
8
  export { locales };
8
9
  export * from "./models/image";
9
10
  export * from "./models/button";
10
11
  export * from "./models/loyalty-customer-info";
12
+ export * from "./models/loyalty-program";
11
13
  export * from "./models/loyalty-program-point-history";
12
14
  export * from "./models/loyalty-program-spending-method";
13
15
  export * from "./models/loyalty-program-earning-method";
package/build/index.js CHANGED
@@ -1 +1 @@
1
- export{default as locales}from"./locales.js";export{LoyaltyWidget}from"./models/loyalty-widget/index.js";export{BadgeIconTypeEnum,HeaderBackgroundTypeEnum,ImageTypeEnum,LoyaltyWidgetLayoutTypeEnum,WidgetIconTypeEnum,WidgetPositionEnum}from"./models/loyalty-widget/types/index.js";export{LoyaltyWidgetHeader}from"./models/loyalty-widget/header/index.js";export{LoyaltyWidgetHeaderBackground}from"./models/loyalty-widget/header/header-background/index.js";export{LoyaltyWidgetTranslations}from"./models/loyalty-widget/translations.js";export{IMAGE_SIZE,LoyaltyWidgetImage}from"./models/image/index.js";export{LoyaltyWidgetButton}from"./models/button/index.js";export{CampaignTypeEnum,CartLoyaltyLineData,LoyaltyCustomerInfo,LoyaltyProgramTier,LoyaltyProgramTierTranslation,OrderAmountTypeEnum}from"./models/loyalty-customer-info/index.js";export{LoyaltyProgramPointHistory}from"./models/loyalty-program-point-history/index.js";export{LoyaltyProgramDiscountSettings,LoyaltyProgramSpendingMethod}from"./models/loyalty-program-spending-method/index.js";export{LoyaltyProgramEarningMethod,LoyaltyProgramEarningMethodOrderSettings,LoyaltyProgramEarningMethodProductSettings}from"./models/loyalty-program-earning-method/index.js";export{LoyaltyWidgetSettings}from"./models/loyalty-widget/settings/index.js";export{LoyaltyWidgetViewModel}from"./models/index.js";export{EarningMethodTypeEnum,LoyaltyProgramFilterTypeEnum,LoyaltyProgramMethodSpendingTypeEnum,LoyaltyProgramPointEarningTypeEnum,LoyaltyProgramPointHistoryTypeEnum,LoyaltyWidgetScreenTypeEnum,PeriodTypeEnum,WidgetMode}from"./models/types/index.js";export{BadgeLevel1}from"./assets/badgeLevel1.js";export{BadgeLevel2}from"./assets/badgeLevel2.js";export{BadgeLevel3}from"./assets/badgeLevel3.js";export{BadgeLevel4}from"./assets/badgeLevel4.js";export{XClose}from"./assets/icons/x-close.js";export{CheckCircleFill}from"./assets/icons/check-circle-fill.js";export{ChevronLeft}from"./assets/icons/chevron-left.js";export{Check}from"./assets/icons/check.js";export{ArrowRight}from"./assets/icons/arrow-right.js";export{CheckCircle}from"./assets/icons/check-circle.js";export{BubbleChatDone}from"./assets/widget-icons/normal/bubbleChatDone.js";export{CommentAdd01}from"./assets/widget-icons/normal/commentAdd01.js";export{CouponPercent}from"./assets/widget-icons/normal/couponPercent.js";export{DiscountTag02}from"./assets/widget-icons/normal/discountTag02.js";export{Gift}from"./assets/widget-icons/normal/gift.js";export{MoneyAdd01}from"./assets/widget-icons/normal/moneyAdd01.js";export{PackageDelivered}from"./assets/widget-icons/normal/packageDelivered.js";export{SaveMoneyDollar}from"./assets/widget-icons/normal/saveMoneyDollar.js";export{ShoppingBasketAdd02}from"./assets/widget-icons/normal/shoppingBasketAdd02.js";export{UserAdd01}from"./assets/widget-icons/normal/userAdd01.js";export{InformationCircle}from"./assets/widget-icons/normal/informationCircle.js";export{Refund}from"./assets/widget-icons/normal/refund.js";export{Album02}from"./assets/widget-icons/normal/album02.js";export{UsersIllustration}from"./assets/widget-icons/illustraions/usersIllustration.js";export{BubbleChatIllustration}from"./assets/widget-icons/illustraions/bubbleChatIllustration.js";export{ApprovedChatIllustration}from"./assets/widget-icons/illustraions/approvedChatIllustration.js";export{TshirtIllustration}from"./assets/widget-icons/illustraions/tshirtIllustration.js";export{Medal}from"./assets/widget-icons/illustraions/medal.js";export{GiftIllustration}from"./assets/widget-icons/illustraions/giftIllustration.js";export{ShippingBox}from"./assets/widget-icons/illustraions/shippingBox.js";export{BigSaleMedal}from"./assets/widget-icons/illustraions/bigSaleMedal.js";export{ShoppingCartIllustration}from"./assets/widget-icons/illustraions/shoppingCartIllustration.js";export{InformationCircleIllustration}from"./assets/widget-icons/illustraions/informationCircleIllustration.js";export{CheckFillIllustration}from"./assets/widget-icons/illustraions/check-fill.js";export{RefundIllustration}from"./assets/widget-icons/illustraions/refundIllustration.js";export{Scenery}from"./assets/widget-icons/illustraions/scenery.js";export{default as LoyaltyWidgetRenderer}from"./renderer/index.js";export{flatten,unflatten}from"./renderer/utils/object-utils.js";
1
+ export{default as locales}from"./locales.js";export{LoyaltyWidget}from"./models/loyalty-widget/index.js";export{BadgeIconTypeEnum,HeaderBackgroundTypeEnum,ImageTypeEnum,LoyaltyWidgetLayoutTypeEnum,WidgetIconTypeEnum,WidgetPositionEnum}from"./models/loyalty-widget/types/index.js";export{LoyaltyWidgetHeader}from"./models/loyalty-widget/header/index.js";export{LoyaltyWidgetHeaderBackground}from"./models/loyalty-widget/header/header-background/index.js";export{LoyaltyWidgetTranslations}from"./models/loyalty-widget/translations.js";export{LoyaltyWidgetFaqItem}from"./models/loyalty-widget/faq.js";export{IMAGE_SIZE,LoyaltyWidgetImage}from"./models/image/index.js";export{LoyaltyWidgetButton}from"./models/button/index.js";export{CampaignTypeEnum,CartLoyaltyLineData,LoyaltyCustomerInfo,LoyaltyProgramTier,LoyaltyProgramTierTranslation,OrderAmountTypeEnum}from"./models/loyalty-customer-info/index.js";export{LoyaltyProgram}from"./models/loyalty-program/index.js";export{LoyaltyProgramPointHistory}from"./models/loyalty-program-point-history/index.js";export{LoyaltyProgramDiscountSettings,LoyaltyProgramSpendingMethod}from"./models/loyalty-program-spending-method/index.js";export{LoyaltyProgramEarningMethod,LoyaltyProgramEarningMethodOrderSettings,LoyaltyProgramEarningMethodProductSettings}from"./models/loyalty-program-earning-method/index.js";export{LoyaltyWidgetSettings}from"./models/loyalty-widget/settings/index.js";export{LoyaltyWidgetViewModel}from"./models/index.js";export{EarningMethodTypeEnum,LoyaltyProgramFilterTypeEnum,LoyaltyProgramMethodSpendingTypeEnum,LoyaltyProgramPointEarningTypeEnum,LoyaltyProgramPointHistoryTypeEnum,LoyaltyWidgetScreenTypeEnum,PeriodTypeEnum,WidgetMode}from"./models/types/index.js";export{BadgeLevel1}from"./assets/badgeLevel1.js";export{BadgeLevel2}from"./assets/badgeLevel2.js";export{BadgeLevel3}from"./assets/badgeLevel3.js";export{BadgeLevel4}from"./assets/badgeLevel4.js";export{XClose}from"./assets/icons/x-close.js";export{CheckCircleFill}from"./assets/icons/check-circle-fill.js";export{ChevronLeft}from"./assets/icons/chevron-left.js";export{Check}from"./assets/icons/check.js";export{ArrowRight}from"./assets/icons/arrow-right.js";export{CheckCircle}from"./assets/icons/check-circle.js";export{BubbleChatDone}from"./assets/widget-icons/normal/bubbleChatDone.js";export{CommentAdd01}from"./assets/widget-icons/normal/commentAdd01.js";export{CouponPercent}from"./assets/widget-icons/normal/couponPercent.js";export{DiscountTag02}from"./assets/widget-icons/normal/discountTag02.js";export{Gift}from"./assets/widget-icons/normal/gift.js";export{MoneyAdd01}from"./assets/widget-icons/normal/moneyAdd01.js";export{PackageDelivered}from"./assets/widget-icons/normal/packageDelivered.js";export{SaveMoneyDollar}from"./assets/widget-icons/normal/saveMoneyDollar.js";export{ShoppingBasketAdd02}from"./assets/widget-icons/normal/shoppingBasketAdd02.js";export{UserAdd01}from"./assets/widget-icons/normal/userAdd01.js";export{InformationCircle}from"./assets/widget-icons/normal/informationCircle.js";export{Refund}from"./assets/widget-icons/normal/refund.js";export{Album02}from"./assets/widget-icons/normal/album02.js";export{UsersIllustration}from"./assets/widget-icons/illustraions/usersIllustration.js";export{BubbleChatIllustration}from"./assets/widget-icons/illustraions/bubbleChatIllustration.js";export{ApprovedChatIllustration}from"./assets/widget-icons/illustraions/approvedChatIllustration.js";export{TshirtIllustration}from"./assets/widget-icons/illustraions/tshirtIllustration.js";export{Medal}from"./assets/widget-icons/illustraions/medal.js";export{GiftIllustration}from"./assets/widget-icons/illustraions/giftIllustration.js";export{ShippingBox}from"./assets/widget-icons/illustraions/shippingBox.js";export{BigSaleMedal}from"./assets/widget-icons/illustraions/bigSaleMedal.js";export{ShoppingCartIllustration}from"./assets/widget-icons/illustraions/shoppingCartIllustration.js";export{InformationCircleIllustration}from"./assets/widget-icons/illustraions/informationCircleIllustration.js";export{CheckFillIllustration}from"./assets/widget-icons/illustraions/check-fill.js";export{RefundIllustration}from"./assets/widget-icons/illustraions/refundIllustration.js";export{Scenery}from"./assets/widget-icons/illustraions/scenery.js";export{default as LoyaltyWidgetRenderer}from"./renderer/index.js";export{flatten,unflatten}from"./renderer/utils/object-utils.js";
@@ -17,6 +17,7 @@ declare const locales: {
17
17
  allRewards: string;
18
18
  tiers: string;
19
19
  pointHistory: string;
20
+ faq: string;
20
21
  cartWarning: string;
21
22
  appliedDiscount: {
22
23
  fixedAmount: string;
@@ -57,9 +58,13 @@ declare const locales: {
57
58
  registerButton: string;
58
59
  haveAccount: string;
59
60
  earnedPoints: string;
61
+ availablePoints: string;
62
+ pendingPoints: string;
60
63
  logoAlt: string;
61
64
  };
62
65
  earningMethods: {
66
+ waitingPeriod_one: string;
67
+ waitingPeriod_other: string;
63
68
  xPoints: string;
64
69
  CUSTOMER_REGISTER: {
65
70
  title: string;
@@ -101,6 +106,11 @@ declare const locales: {
101
106
  };
102
107
  };
103
108
  history: {
109
+ availableInDays_one: string;
110
+ availableInDays_other: string;
111
+ availableInMinutes_one: string;
112
+ availableInMinutes_other: string;
113
+ availableInHoursAndMinutes: string;
104
114
  expiresInMinutes_one: string;
105
115
  expiresInMinutes_other: string;
106
116
  expiresInHoursAndMinutes: string;
@@ -134,7 +144,10 @@ declare const locales: {
134
144
  giftProductSelection: string;
135
145
  creditHistory: string;
136
146
  loyaltyLevel: string;
147
+ faq: string;
137
148
  loyaltyLevelScreen: {
149
+ nextTierLabel: string;
150
+ collectPoints: string;
138
151
  afterEarning: string;
139
152
  reachNextTier: string;
140
153
  allTiersCompleted: string;
@@ -167,6 +180,7 @@ declare const locales: {
167
180
  allRewards: string;
168
181
  tiers: string;
169
182
  pointHistory: string;
183
+ faq: string;
170
184
  cartWarning: string;
171
185
  appliedDiscount: {
172
186
  fixedAmount: string;
@@ -207,9 +221,13 @@ declare const locales: {
207
221
  registerButton: string;
208
222
  haveAccount: string;
209
223
  earnedPoints: string;
224
+ availablePoints: string;
225
+ pendingPoints: string;
210
226
  logoAlt: string;
211
227
  };
212
228
  earningMethods: {
229
+ waitingPeriod_one: string;
230
+ waitingPeriod_other: string;
213
231
  xPoints: string;
214
232
  CUSTOMER_REGISTER: {
215
233
  title: string;
@@ -251,6 +269,11 @@ declare const locales: {
251
269
  };
252
270
  };
253
271
  history: {
272
+ availableInDays_one: string;
273
+ availableInDays_other: string;
274
+ availableInMinutes_one: string;
275
+ availableInMinutes_other: string;
276
+ availableInHoursAndMinutes: string;
254
277
  expiresInMinutes_one: string;
255
278
  expiresInMinutes_other: string;
256
279
  expiresInHoursAndMinutes: string;
@@ -284,7 +307,10 @@ declare const locales: {
284
307
  giftProductSelection: string;
285
308
  creditHistory: string;
286
309
  loyaltyLevel: string;
310
+ faq: string;
287
311
  loyaltyLevelScreen: {
312
+ nextTierLabel: string;
313
+ collectPoints: string;
288
314
  afterEarning: string;
289
315
  reachNextTier: string;
290
316
  allTiersCompleted: string;
@@ -317,6 +343,7 @@ declare const locales: {
317
343
  allRewards: string;
318
344
  tiers: string;
319
345
  pointHistory: string;
346
+ faq: string;
320
347
  cartWarning: string;
321
348
  appliedDiscount: {
322
349
  fixedAmount: string;
@@ -357,9 +384,13 @@ declare const locales: {
357
384
  registerButton: string;
358
385
  haveAccount: string;
359
386
  earnedPoints: string;
387
+ availablePoints: string;
388
+ pendingPoints: string;
360
389
  logoAlt: string;
361
390
  };
362
391
  earningMethods: {
392
+ waitingPeriod_one: string;
393
+ waitingPeriod_other: string;
363
394
  xPoints: string;
364
395
  CUSTOMER_REGISTER: {
365
396
  title: string;
@@ -401,6 +432,11 @@ declare const locales: {
401
432
  };
402
433
  };
403
434
  history: {
435
+ availableInDays_one: string;
436
+ availableInDays_other: string;
437
+ availableInMinutes_one: string;
438
+ availableInMinutes_other: string;
439
+ availableInHoursAndMinutes: string;
404
440
  expiresInMinutes_one: string;
405
441
  expiresInMinutes_other: string;
406
442
  expiresInHoursAndMinutes: string;
@@ -434,7 +470,10 @@ declare const locales: {
434
470
  giftProductSelection: string;
435
471
  creditHistory: string;
436
472
  loyaltyLevel: string;
473
+ faq: string;
437
474
  loyaltyLevelScreen: {
475
+ nextTierLabel: string;
476
+ collectPoints: string;
438
477
  afterEarning: string;
439
478
  reachNextTier: string;
440
479
  allTiersCompleted: string;
@@ -467,6 +506,7 @@ declare const locales: {
467
506
  allRewards: string;
468
507
  tiers: string;
469
508
  pointHistory: string;
509
+ faq: string;
470
510
  cartWarning: string;
471
511
  appliedDiscount: {
472
512
  fixedAmount: string;
@@ -507,9 +547,13 @@ declare const locales: {
507
547
  registerButton: string;
508
548
  haveAccount: string;
509
549
  earnedPoints: string;
550
+ availablePoints: string;
551
+ pendingPoints: string;
510
552
  logoAlt: string;
511
553
  };
512
554
  earningMethods: {
555
+ waitingPeriod_one: string;
556
+ waitingPeriod_other: string;
513
557
  xPoints: string;
514
558
  CUSTOMER_REGISTER: {
515
559
  title: string;
@@ -551,6 +595,11 @@ declare const locales: {
551
595
  };
552
596
  };
553
597
  history: {
598
+ availableInDays_one: string;
599
+ availableInDays_other: string;
600
+ availableInMinutes_one: string;
601
+ availableInMinutes_other: string;
602
+ availableInHoursAndMinutes: string;
554
603
  expiresInMinutes_one: string;
555
604
  expiresInMinutes_other: string;
556
605
  expiresInHoursAndMinutes: string;
@@ -584,7 +633,10 @@ declare const locales: {
584
633
  giftProductSelection: string;
585
634
  creditHistory: string;
586
635
  loyaltyLevel: string;
636
+ faq: string;
587
637
  loyaltyLevelScreen: {
638
+ nextTierLabel: string;
639
+ collectPoints: string;
588
640
  afterEarning: string;
589
641
  reachNextTier: string;
590
642
  allTiersCompleted: string;
@@ -617,6 +669,7 @@ declare const locales: {
617
669
  allRewards: string;
618
670
  tiers: string;
619
671
  pointHistory: string;
672
+ faq: string;
620
673
  cartWarning: string;
621
674
  appliedDiscount: {
622
675
  fixedAmount: string;
@@ -657,9 +710,13 @@ declare const locales: {
657
710
  registerButton: string;
658
711
  haveAccount: string;
659
712
  earnedPoints: string;
713
+ availablePoints: string;
714
+ pendingPoints: string;
660
715
  logoAlt: string;
661
716
  };
662
717
  earningMethods: {
718
+ waitingPeriod_one: string;
719
+ waitingPeriod_other: string;
663
720
  xPoints: string;
664
721
  CUSTOMER_REGISTER: {
665
722
  title: string;
@@ -701,6 +758,11 @@ declare const locales: {
701
758
  };
702
759
  };
703
760
  history: {
761
+ availableInDays_one: string;
762
+ availableInDays_other: string;
763
+ availableInMinutes_one: string;
764
+ availableInMinutes_other: string;
765
+ availableInHoursAndMinutes: string;
704
766
  expiresInMinutes_one: string;
705
767
  expiresInMinutes_other: string;
706
768
  expiresInHoursAndMinutes: string;
@@ -734,7 +796,10 @@ declare const locales: {
734
796
  giftProductSelection: string;
735
797
  creditHistory: string;
736
798
  loyaltyLevel: string;
799
+ faq: string;
737
800
  loyaltyLevelScreen: {
801
+ nextTierLabel: string;
802
+ collectPoints: string;
738
803
  afterEarning: string;
739
804
  reachNextTier: string;
740
805
  allTiersCompleted: string;
@@ -1,4 +1,5 @@
1
1
  import { LoyaltyCustomerInfo, LoyaltyProgramTier } from "./loyalty-customer-info";
2
+ import { LoyaltyProgram } from "./loyalty-program";
2
3
  import { LoyaltyProgramEarningMethod } from "./loyalty-program-earning-method";
3
4
  import { LoyaltyProgramPointHistory } from "./loyalty-program-point-history";
4
5
  import { LoyaltyProgramSpendingMethod } from "./loyalty-program-spending-method";
@@ -10,6 +11,7 @@ export declare class LoyaltyWidgetViewModel {
10
11
  isMiniModeDescriptionClosed: boolean;
11
12
  isLoading: boolean;
12
13
  isActionLoading: boolean;
14
+ previewExpandedFaqId: string | null;
13
15
  loyaltyWidget: LoyaltyWidget;
14
16
  userRefreshTrigger: number;
15
17
  cartRefreshTrigger: number;
@@ -21,6 +23,7 @@ export declare class LoyaltyWidgetViewModel {
21
23
  currency: string;
22
24
  isPreviewMode: boolean;
23
25
  user: LoyaltyCustomerInfo | null;
26
+ loyaltyProgram: LoyaltyProgram | null;
24
27
  categories: Category[] | null;
25
28
  products: Product[];
26
29
  brands: Brand[];
@@ -36,6 +39,8 @@ export declare class LoyaltyWidgetViewModel {
36
39
  pushScreen(screen: LoyaltyWidgetScreenTypeEnum): void;
37
40
  popScreen(): void;
38
41
  resetNavigation(): void;
42
+ setPreviewExpandedFaqId(id: string | null): void;
43
+ get faqItems(): import("..").LoyaltyWidgetFaqItem[];
39
44
  get shouldShowSpendingMethods(): boolean;
40
45
  setWidgetMode(mode: WidgetMode): void;
41
46
  closeMiniModeDescription(): void;
@@ -1 +1 @@
1
- import{__assign as t}from'./../ext/tslib/tslib.es6.mjs.js';import{makeObservable as i,observable as e,computed as o,action as n}from"mobx";import{markDescriptionClosedForSession as r,markDescriptionPermanentlyClosed as s,isDescriptionClosedForCurrentSession as d,isDescriptionPermanentlyClosed as a}from"../utils.js";import{LoyaltyCustomerInfo as c}from"./loyalty-customer-info/index.js";import{LoyaltyProgramEarningMethod as h}from"./loyalty-program-earning-method/index.js";import{LoyaltyProgramSpendingMethod as u}from"./loyalty-program-spending-method/index.js";import{LoyaltyWidget as p}from"./loyalty-widget/index.js";import{LoyaltyWidgetScreenTypeEnum as g,WidgetMode as l}from"./types/index.js";var y=function(){function y(r,s,y,M,f,m,v){void 0===r&&(r={}),this.userRefreshTrigger=0,this.cartRefreshTrigger=0,this.navigationStack=[g.MAIN_SCREEN],this.currentWidgetMode=m?l.WIDGET_MODE:l.MINI_MODE,this.isMiniModeDescriptionClosed=d()||a(),this.isLoading=r.isLoading||!1,this.isActionLoading=r.isActionLoading||!1,this.loyaltyWidget=new p(r.loyaltyWidget),this.cdnURL=s,this.merchantId=y,this.storeUrl=f||r.storeUrl||"",this.currency=M,this.isPreviewMode=m||!1,this.cartId=r.cartId||null,this.ikasEventUser=r.ikasEventUser||null,this.user=r.user?new c(r.user):null,this.earningMethods=r.earningMethods?r.earningMethods.map(function(t){return new h(t)}):[],this.spendingMethods=r.spendingMethods?r.spendingMethods.map(function(t){return new u(t)}):[],this.tiers=r.tiers?r.tiers:[],this.categories=r.categories?r.categories:[],this.products=r.products?r.products:[],this.brands=r.brands?r.brands:[],this.tags=r.tags?r.tags:[],this.pointHistory=r.pointHistory?r.pointHistory:[],this.callbacks=v||void 0,i(this,t(t({cartId:e},m?{}:{loyaltyWidget:e}),{isLoading:e,isActionLoading:e,cdnURL:e,merchantId:e,storeUrl:e,currency:e,navigationStack:e,currentScreen:o,isMainScreen:o,pushScreen:n.bound,popScreen:n.bound,resetNavigation:n.bound,setWidgetMode:n.bound,closeMiniModeDescription:n.bound,formatCurrency:n.bound,currentWidgetMode:e,isMiniModeDescriptionClosed:e,user:e,earningMethods:e,spendingMethods:e,tiers:e,categories:e,products:e,brands:e,tags:e,pointHistory:e,ikasEventUser:e,userRefreshTrigger:e,cartRefreshTrigger:e,shouldShowSpendingMethods:o}))}return Object.defineProperty(y.prototype,"currentScreen",{get:function(){return this.navigationStack[this.navigationStack.length-1]},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"isMainScreen",{get:function(){return this.currentScreen===g.MAIN_SCREEN},enumerable:!1,configurable:!0}),y.prototype.pushScreen=function(t){this.currentScreen!==t&&this.navigationStack.push(t)},y.prototype.popScreen=function(){this.navigationStack.length>1&&this.navigationStack.pop()},y.prototype.resetNavigation=function(){this.navigationStack=[g.MAIN_SCREEN]},Object.defineProperty(y.prototype,"shouldShowSpendingMethods",{get:function(){return!!this.user&&(!(this.user.totalPoint<=0)&&0!==this.spendingMethods.length)},enumerable:!1,configurable:!0}),y.prototype.setWidgetMode=function(t){var i,e;this.currentWidgetMode=t,t!==l.WIDGET_MODE||this.isPreviewMode||(this.isMiniModeDescriptionClosed=!0,r(),(null===(e=null===(i=this.loyaltyWidget)||void 0===i?void 0:i.miniMode)||void 0===e?void 0:e.hideDescriptionAfterClose)&&s())},y.prototype.closeMiniModeDescription=function(){var t,i;this.isMiniModeDescriptionClosed=!0,r(),(null===(i=null===(t=this.loyaltyWidget)||void 0===t?void 0:t.miniMode)||void 0===i?void 0:i.hideDescriptionAfterClose)&&s()},y.prototype.formatCurrency=function(t){var i;return(null===(i=this.callbacks)||void 0===i?void 0:i.formatCurrency)?this.callbacks.formatCurrency(t):"".concat(t.toFixed(2)," ").concat(this.currency)},y}();export{y as LoyaltyWidgetViewModel};
1
+ import{__assign as t}from'./../ext/tslib/tslib.es6.mjs.js';import{makeObservable as e,observable as i,computed as o,action as r}from"mobx";import{markDescriptionClosedForSession as n,markDescriptionPermanentlyClosed as s,isDescriptionClosedForCurrentSession as a,isDescriptionPermanentlyClosed as d}from"../utils.js";import{LoyaltyCustomerInfo as c}from"./loyalty-customer-info/index.js";import{LoyaltyProgram as l}from"./loyalty-program/index.js";import{LoyaltyProgramEarningMethod as u}from"./loyalty-program-earning-method/index.js";import{LoyaltyProgramSpendingMethod as p}from"./loyalty-program-spending-method/index.js";import{LoyaltyWidget as h}from"./loyalty-widget/index.js";import{LoyaltyWidgetScreenTypeEnum as g,WidgetMode as y}from"./types/index.js";var m=function(){function m(n,s,m,f,M,v,b){void 0===n&&(n={}),this.previewExpandedFaqId=null,this.userRefreshTrigger=0,this.cartRefreshTrigger=0,this.navigationStack=[g.MAIN_SCREEN],this.currentWidgetMode=v?y.WIDGET_MODE:y.MINI_MODE,this.isMiniModeDescriptionClosed=a()||d(),this.isLoading=n.isLoading||!1,this.isActionLoading=n.isActionLoading||!1,this.loyaltyWidget=new h(n.loyaltyWidget),this.cdnURL=s,this.merchantId=m,this.storeUrl=M||n.storeUrl||"",this.currency=f,this.isPreviewMode=v||!1,this.cartId=n.cartId||null,this.ikasEventUser=n.ikasEventUser||null,this.user=n.user?new c(n.user):null,this.loyaltyProgram=n.loyaltyProgram?new l(n.loyaltyProgram):null,this.earningMethods=n.earningMethods?n.earningMethods.map(function(t){return new u(t)}):[],this.spendingMethods=n.spendingMethods?n.spendingMethods.map(function(t){return new p(t)}):[],this.tiers=n.tiers?n.tiers:[],this.categories=n.categories?n.categories:[],this.products=n.products?n.products:[],this.brands=n.brands?n.brands:[],this.tags=n.tags?n.tags:[],this.pointHistory=n.pointHistory?n.pointHistory:[],this.callbacks=b||void 0,e(this,t(t({cartId:i},v?{}:{loyaltyWidget:i}),{isLoading:i,isActionLoading:i,cdnURL:i,merchantId:i,storeUrl:i,currency:i,navigationStack:i,currentScreen:o,isMainScreen:o,pushScreen:r.bound,popScreen:r.bound,resetNavigation:r.bound,previewExpandedFaqId:i,setPreviewExpandedFaqId:r.bound,faqItems:o,setWidgetMode:r.bound,closeMiniModeDescription:r.bound,formatCurrency:r.bound,currentWidgetMode:i,isMiniModeDescriptionClosed:i,user:i,loyaltyProgram:i,earningMethods:i,spendingMethods:i,tiers:i,categories:i,products:i,brands:i,tags:i,pointHistory:i,ikasEventUser:i,userRefreshTrigger:i,cartRefreshTrigger:i,shouldShowSpendingMethods:o}))}return Object.defineProperty(m.prototype,"currentScreen",{get:function(){return this.navigationStack[this.navigationStack.length-1]},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isMainScreen",{get:function(){return this.currentScreen===g.MAIN_SCREEN},enumerable:!1,configurable:!0}),m.prototype.pushScreen=function(t){this.currentScreen!==t&&this.navigationStack.push(t)},m.prototype.popScreen=function(){this.navigationStack.length>1&&this.navigationStack.pop()},m.prototype.resetNavigation=function(){this.navigationStack=[g.MAIN_SCREEN]},m.prototype.setPreviewExpandedFaqId=function(t){this.previewExpandedFaqId=t},Object.defineProperty(m.prototype,"faqItems",{get:function(){return this.loyaltyWidget.faqItems.filter(function(t){return!!t.question.trim()})},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"shouldShowSpendingMethods",{get:function(){return!!this.user&&(!(this.user.availablePoint<=0)&&0!==this.spendingMethods.length)},enumerable:!1,configurable:!0}),m.prototype.setWidgetMode=function(t){var e,i;this.currentWidgetMode=t,t!==y.WIDGET_MODE||this.isPreviewMode||(this.isMiniModeDescriptionClosed=!0,n(),(null===(i=null===(e=this.loyaltyWidget)||void 0===e?void 0:e.miniMode)||void 0===i?void 0:i.hideDescriptionAfterClose)&&s())},m.prototype.closeMiniModeDescription=function(){var t,e;this.isMiniModeDescriptionClosed=!0,n(),(null===(e=null===(t=this.loyaltyWidget)||void 0===t?void 0:t.miniMode)||void 0===e?void 0:e.hideDescriptionAfterClose)&&s()},m.prototype.formatCurrency=function(t){var e;return(null===(e=this.callbacks)||void 0===e?void 0:e.formatCurrency)?this.callbacks.formatCurrency(t):"".concat(t.toFixed(2)," ").concat(this.currency)},m}();export{m as LoyaltyWidgetViewModel};
@@ -29,6 +29,8 @@ export declare class CartLoyaltyLineData {
29
29
  constructor(data?: Partial<CartLoyaltyLineData>);
30
30
  }
31
31
  export declare class LoyaltyCustomerInfo {
32
+ availablePoint: number;
33
+ cumulativeEarnedPoints: number;
32
34
  customerTier: LoyaltyProgramTier | null;
33
35
  loyaltyProgramCustomerId: string;
34
36
  loyaltyProgramId: string;
@@ -1 +1 @@
1
- import{makeObservable as t,observable as e}from"mobx";import{LoyaltyProgramPeriod as i}from"../common/index.js";var n,o,r=function(i){void 0===i&&(i={}),this.locale=i.locale||"",this.name=i.name||"",t(this,{locale:e,name:e})},l=function(n){void 0===n&&(n={}),this.id=n.id||"",this.name=n.name||"",this.pointsRequired=n.pointsRequired||null,this.tierPointMultiplier=n.tierPointMultiplier||null,this.loyaltyProgramId=n.loyaltyProgramId||"",this.customerSegmentId=n.customerSegmentId||null,this.createdAt=n.createdAt||null,this.updatedAt=n.updatedAt||null,this.deleted=n.deleted||!1,this.isActive=n.isActive||!1,this.period=n.period?new i(n.period):null,this.translations=n.translations?n.translations.map(function(t){return new r(t)}):null,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.campaignType=i.campaignType||null,this.discountAmount=i.discountAmount||0,this.discountAmountType=i.discountAmountType||o.AMOUNT,this.discountPercentage=void 0!==i.discountPercentage&&null!==i.discountPercentage?i.discountPercentage:null,this.loyaltySpendingMethodId=i.loyaltySpendingMethodId||"",this.pointUsed=i.pointUsed||0,t(this,{campaignType:e,discountAmount:e,discountAmountType:e,discountPercentage:e,loyaltySpendingMethodId:e,pointUsed:e})},d=function(i){void 0===i&&(i={}),this.customerTier=i.customerTier?new l(i.customerTier):null,this.loyaltyProgramCustomerId=i.loyaltyProgramCustomerId||"",this.loyaltyProgramId=i.loyaltyProgramId||"",this.totalPoint=i.totalPoint||0,this.nextTierRequiredPoint=void 0!==i.nextTierRequiredPoint&&null!==i.nextTierRequiredPoint?i.nextTierRequiredPoint:null,this.cartLoyaltyLines=i.cartLoyaltyLines?i.cartLoyaltyLines.map(function(t){return new s(t)}):null,t(this,{customerTier:e,loyaltyProgramCustomerId:e,loyaltyProgramId:e,totalPoint:e,nextTierRequiredPoint:e,cartLoyaltyLines:e})};!function(t){t.BUY_X_THEN_GET_Y="BUY_X_THEN_GET_Y",t.FIXED_AMOUNT="FIXED_AMOUNT",t.FREE_SHIPPING="FREE_SHIPPING",t.RATIO="RATIO"}(n||(n={})),function(t){t.AMOUNT="AMOUNT",t.RATIO="RATIO"}(o||(o={}));export{n as CampaignTypeEnum,s as CartLoyaltyLineData,d as LoyaltyCustomerInfo,l as LoyaltyProgramTier,r as LoyaltyProgramTierTranslation,o as OrderAmountTypeEnum};
1
+ import{makeObservable as t,observable as i}from"mobx";import{LoyaltyProgramPeriod as e}from"../common/index.js";var n,o,l=function(e){void 0===e&&(e={}),this.locale=e.locale||"",this.name=e.name||"",t(this,{locale:i,name:i})},a=function(n){void 0===n&&(n={}),this.id=n.id||"",this.name=n.name||"",this.pointsRequired=n.pointsRequired||null,this.tierPointMultiplier=n.tierPointMultiplier||null,this.loyaltyProgramId=n.loyaltyProgramId||"",this.customerSegmentId=n.customerSegmentId||null,this.createdAt=n.createdAt||null,this.updatedAt=n.updatedAt||null,this.deleted=n.deleted||!1,this.isActive=n.isActive||!1,this.period=n.period?new e(n.period):null,this.translations=n.translations?n.translations.map(function(t){return new l(t)}):null,t(this,{id:i,name:i,pointsRequired:i,tierPointMultiplier:i,loyaltyProgramId:i,customerSegmentId:i,createdAt:i,updatedAt:i,deleted:i,isActive:i,period:i,translations:i})},r=function(e){void 0===e&&(e={}),this.campaignType=e.campaignType||null,this.discountAmount=e.discountAmount||0,this.discountAmountType=e.discountAmountType||o.AMOUNT,this.discountPercentage=void 0!==e.discountPercentage&&null!==e.discountPercentage?e.discountPercentage:null,this.loyaltySpendingMethodId=e.loyaltySpendingMethodId||"",this.pointUsed=e.pointUsed||0,t(this,{campaignType:i,discountAmount:i,discountAmountType:i,discountPercentage:i,loyaltySpendingMethodId:i,pointUsed:i})},s=function(e){var n,o;void 0===e&&(e={}),this.availablePoint=null!==(n=e.availablePoint)&&void 0!==n?n:0,this.cumulativeEarnedPoints=null!==(o=e.cumulativeEarnedPoints)&&void 0!==o?o:0,this.customerTier=e.customerTier?new a(e.customerTier):null,this.loyaltyProgramCustomerId=e.loyaltyProgramCustomerId||"",this.loyaltyProgramId=e.loyaltyProgramId||"",this.totalPoint=e.totalPoint||0,this.nextTierRequiredPoint=void 0!==e.nextTierRequiredPoint&&null!==e.nextTierRequiredPoint?e.nextTierRequiredPoint:null,this.cartLoyaltyLines=e.cartLoyaltyLines?e.cartLoyaltyLines.map(function(t){return new r(t)}):null,t(this,{availablePoint:i,cumulativeEarnedPoints:i,customerTier:i,loyaltyProgramCustomerId:i,loyaltyProgramId:i,totalPoint:i,nextTierRequiredPoint:i,cartLoyaltyLines:i})};!function(t){t.BUY_X_THEN_GET_Y="BUY_X_THEN_GET_Y",t.FIXED_AMOUNT="FIXED_AMOUNT",t.FREE_SHIPPING="FREE_SHIPPING",t.RATIO="RATIO"}(n||(n={})),function(t){t.AMOUNT="AMOUNT",t.RATIO="RATIO"}(o||(o={}));export{n as CampaignTypeEnum,r as CartLoyaltyLineData,s as LoyaltyCustomerInfo,a as LoyaltyProgramTier,l as LoyaltyProgramTierTranslation,o as OrderAmountTypeEnum};
@@ -0,0 +1,5 @@
1
+ export declare class LoyaltyProgram {
2
+ id: string;
3
+ waitingPeriodDays: number | null;
4
+ constructor(data?: Partial<LoyaltyProgram>);
5
+ }
@@ -0,0 +1 @@
1
+ import{makeObservable as i,observable as o}from"mobx";var t=function(t){var a;void 0===t&&(t={}),this.id=t.id||"",this.waitingPeriodDays=null!==(a=t.waitingPeriodDays)&&void 0!==a?a:null,i(this,{id:o,waitingPeriodDays:o})};export{t as LoyaltyProgram};
@@ -33,5 +33,6 @@ export declare class LoyaltyProgramEarningMethod {
33
33
  translations: LoyaltyProgramMethodTranslation[] | null;
34
34
  updatedAt: any | null;
35
35
  validityPeriod: LoyaltyProgramPeriod | null;
36
+ waitingPeriodDays: number | null;
36
37
  constructor(data?: Partial<LoyaltyProgramEarningMethod>);
37
38
  }
@@ -1 +1 @@
1
- import{makeObservable as t,observable as i}from"mobx";import{EarningMethodTypeEnum as n,LoyaltyProgramPointEarningTypeEnum as e}from"../types/index.js";import{LoyaltyProgramFilter as r,LoyaltyProgramPointLimit as d,LoyaltyProgramMethodTranslation as o,LoyaltyProgramPeriod as s}from"../common/index.js";var a=function(n){void 0===n&&(n={}),this.maxOrderAmount=n.maxOrderAmount||null,this.minOrderAmount=n.minOrderAmount||0,this.productFilters=n.productFilters?n.productFilters.map(function(t){return new r(t)}):null,t(this,{maxOrderAmount:i,minOrderAmount:i,productFilters:i})},l=function(n){void 0===n&&(n={}),this.maxProductQuantity=n.maxProductQuantity||null,this.minProductQuantity=n.minProductQuantity||null,this.productFilters=n.productFilters?n.productFilters.map(function(t){return new r(t)}):null,t(this,{maxProductQuantity:i,minProductQuantity:i,productFilters:i})},u=function(r){void 0===r&&(r={}),this.amountPerPointsEarned=r.amountPerPointsEarned||null,this.createdAt=r.createdAt||null,this.deleted=r.deleted||!1,this.description=r.description||null,this.earnedPointLimit=r.earnedPointLimit?new d(r.earnedPointLimit):null,this.id=r.id||"",this.isActive=r.isActive||!1,this.lastValidityDate=r.lastValidityDate||null,this.loyaltyProgramId=r.loyaltyProgramId||"",this.methodType=r.methodType||n.ORDER_CREATE,this.orderSettings=r.orderSettings?new a(r.orderSettings):null,this.pointEarningType=r.pointEarningType||e.STATIC,this.pointsEarned=r.pointsEarned||0,this.productSettings=r.productSettings?new l(r.productSettings):null,this.quantityPerPointsEarned=r.quantityPerPointsEarned||null,this.segmentId=r.segmentId||null,this.tierIds=r.tierIds||null,this.translations=r.translations?r.translations.map(function(t){return new o(t)}):null,this.updatedAt=r.updatedAt||null,this.validityPeriod=r.validityPeriod?new s(r.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{u as LoyaltyProgramEarningMethod,a as LoyaltyProgramEarningMethodOrderSettings,l as LoyaltyProgramEarningMethodProductSettings};
1
+ import{makeObservable as t,observable as i}from"mobx";import{EarningMethodTypeEnum as n,LoyaltyProgramPointEarningTypeEnum as e}from"../types/index.js";import{LoyaltyProgramFilter as r,LoyaltyProgramPointLimit as d,LoyaltyProgramMethodTranslation as o,LoyaltyProgramPeriod as s}from"../common/index.js";var a=function(n){void 0===n&&(n={}),this.maxOrderAmount=n.maxOrderAmount||null,this.minOrderAmount=n.minOrderAmount||0,this.productFilters=n.productFilters?n.productFilters.map(function(t){return new r(t)}):null,t(this,{maxOrderAmount:i,minOrderAmount:i,productFilters:i})},l=function(n){void 0===n&&(n={}),this.maxProductQuantity=n.maxProductQuantity||null,this.minProductQuantity=n.minProductQuantity||null,this.productFilters=n.productFilters?n.productFilters.map(function(t){return new r(t)}):null,t(this,{maxProductQuantity:i,minProductQuantity:i,productFilters:i})},u=function(r){var u;void 0===r&&(r={}),this.waitingPeriodDays=null!==(u=r.waitingPeriodDays)&&void 0!==u?u:null,this.amountPerPointsEarned=r.amountPerPointsEarned||null,this.createdAt=r.createdAt||null,this.deleted=r.deleted||!1,this.description=r.description||null,this.earnedPointLimit=r.earnedPointLimit?new d(r.earnedPointLimit):null,this.id=r.id||"",this.isActive=r.isActive||!1,this.lastValidityDate=r.lastValidityDate||null,this.loyaltyProgramId=r.loyaltyProgramId||"",this.methodType=r.methodType||n.ORDER_CREATE,this.orderSettings=r.orderSettings?new a(r.orderSettings):null,this.pointEarningType=r.pointEarningType||e.STATIC,this.pointsEarned=r.pointsEarned||0,this.productSettings=r.productSettings?new l(r.productSettings):null,this.quantityPerPointsEarned=r.quantityPerPointsEarned||null,this.segmentId=r.segmentId||null,this.tierIds=r.tierIds||null,this.translations=r.translations?r.translations.map(function(t){return new o(t)}):null,this.updatedAt=r.updatedAt||null,this.validityPeriod=r.validityPeriod?new s(r.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,waitingPeriodDays:i})};export{u as LoyaltyProgramEarningMethod,a as LoyaltyProgramEarningMethodOrderSettings,l as LoyaltyProgramEarningMethodProductSettings};
@@ -1,6 +1,7 @@
1
1
  import { LoyaltyProgramPointHistoryTypeEnum } from "../types";
2
2
  export declare class LoyaltyProgramPointHistory {
3
3
  amount: number;
4
+ availableDate: any | null;
4
5
  createdAt: any | null;
5
6
  customerId: string;
6
7
  customerReviewId: string | null;
@@ -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||null,this.customerId=d.customerId||"",this.customerReviewId=d.customerReviewId||null,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.productVariantId=d.productVariantId||null,this.updatedAt=d.updatedAt||null,t(this,{amount:e,createdAt:e,customerId:e,customerReviewId:e,deleted:e,expireDate:e,id:e,loyaltyProgramCustomerId:e,loyaltyProgramEarningMethodId:e,loyaltyProgramId:e,loyaltyProgramSpendingMethodId:e,orderId:e,type:e,productVariantId:e,updatedAt:e})};export{d as LoyaltyProgramPointHistory};
1
+ import{makeObservable as t,observable as e}from"mobx";import{LoyaltyProgramPointHistoryTypeEnum as r}from"../types/index.js";var d=function(d){var a;void 0===d&&(d={}),this.amount=d.amount||0,this.availableDate=null!==(a=d.availableDate)&&void 0!==a?a:null,this.createdAt=d.createdAt||null,this.customerId=d.customerId||"",this.customerReviewId=d.customerReviewId||null,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.productVariantId=d.productVariantId||null,this.updatedAt=d.updatedAt||null,t(this,{amount:e,availableDate:e,createdAt:e,customerId:e,customerReviewId:e,deleted:e,expireDate:e,id:e,loyaltyProgramCustomerId:e,loyaltyProgramEarningMethodId:e,loyaltyProgramId:e,loyaltyProgramSpendingMethodId:e,orderId:e,type:e,productVariantId:e,updatedAt:e})};export{d as LoyaltyProgramPointHistory};
@@ -0,0 +1,6 @@
1
+ export declare class LoyaltyWidgetFaqItem {
2
+ id: string;
3
+ question: string;
4
+ answer: string;
5
+ constructor(data?: Partial<LoyaltyWidgetFaqItem>);
6
+ }
@@ -0,0 +1 @@
1
+ import{makeObservable as s,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';var e=function(e){void 0===e&&(e={}),this.id=e.id||o(),this.question=e.question||"",this.answer=e.answer||"",s(this,{id:i,question:i,answer:i})};export{e as LoyaltyWidgetFaqItem};
@@ -1,5 +1,6 @@
1
1
  import { MiniMode } from "models/mini-mode";
2
2
  import { LoyaltyWidgetButton } from "../button";
3
+ import { LoyaltyWidgetFaqItem } from "./faq";
3
4
  import { LoyaltyWidgetHeader } from "./header";
4
5
  import { LoyaltyWidgetSettings } from "./settings";
5
6
  import { LoyaltyWidgetTranslations } from "./translations";
@@ -10,5 +11,6 @@ export declare class LoyaltyWidget {
10
11
  button: LoyaltyWidgetButton;
11
12
  miniMode: MiniMode;
12
13
  translations: LoyaltyWidgetTranslations;
14
+ faqItems: LoyaltyWidgetFaqItem[];
13
15
  constructor(data?: Partial<LoyaltyWidget>);
14
16
  }
@@ -1 +1 @@
1
- import{makeObservable as i,observable as t}from"mobx";import'./../../ext/uuid/dist/esm-browser/stringify.js';import'./../../ext/uuid/dist/esm-browser/v3.js';import s from'./../../ext/uuid/dist/esm-browser/v4.js';import'./../../ext/uuid/dist/esm-browser/v5.js';import{MiniMode as e}from"../mini-mode/index.js";import{LoyaltyWidgetButton as o}from"../button/index.js";import{LoyaltyWidgetHeader as n}from"./header/index.js";import{LoyaltyWidgetSettings as r}from"./settings/index.js";import{LoyaltyWidgetTranslations as d}from"./translations.js";var m=function(m){void 0===m&&(m={}),this.id=m.id||s(),this.header=m.header?new n(m.header):new n({}),this.settings=m.settings?new r(m.settings):new r({}),this.miniMode=m.miniMode?new e(m.miniMode):new e({}),this.button=m.button?new o(m.button):new o({}),this.translations=m.translations?new d(m.translations):new d({}),i(this,{id:t,miniMode:t,button:t,header:t,settings:t,translations:t})};export{m as LoyaltyWidget};
1
+ import{makeObservable as t,observable as i}from"mobx";import'./../../ext/uuid/dist/esm-browser/stringify.js';import'./../../ext/uuid/dist/esm-browser/v3.js';import s from'./../../ext/uuid/dist/esm-browser/v4.js';import'./../../ext/uuid/dist/esm-browser/v5.js';import{MiniMode as e}from"../mini-mode/index.js";import{LoyaltyWidgetButton as o}from"../button/index.js";import{LoyaltyWidgetFaqItem as n}from"./faq.js";import{LoyaltyWidgetHeader as r}from"./header/index.js";import{LoyaltyWidgetSettings as m}from"./settings/index.js";import{LoyaltyWidgetTranslations as d}from"./translations.js";var a=function(a){void 0===a&&(a={}),this.id=a.id||s(),this.header=a.header?new r(a.header):new r({}),this.settings=a.settings?new m(a.settings):new m({}),this.miniMode=a.miniMode?new e(a.miniMode):new e({}),this.button=a.button?new o(a.button):new o({}),this.translations=a.translations?new d(a.translations):new d({}),this.faqItems=(a.faqItems||[]).map(function(t){return new n(t)}),t(this,{id:i,miniMode:i,button:i,header:i,settings:i,translations:i,faqItems:i})};export{a as LoyaltyWidget};
@@ -1,5 +1,6 @@
1
1
  import { LoyaltyWidgetViewModel } from "models";
2
2
  import type { LoyaltyCustomerInfo, LoyaltyProgramTier } from "../loyalty-customer-info";
3
+ import type { LoyaltyProgram } from "../loyalty-program";
3
4
  import type { LoyaltyProgramEarningMethod } from "../loyalty-program-earning-method";
4
5
  import type { LoyaltyProgramPointHistory } from "../loyalty-program-point-history";
5
6
  import { LoyaltyProgramSpendingMethod } from "../loyalty-program-spending-method";
@@ -10,7 +11,8 @@ export declare enum LoyaltyWidgetScreenTypeEnum {
10
11
  CREDIT_EARNING_METHODS_SCREEN = "CREDIT_EARNING_METHODS_SCREEN",
11
12
  CREDIT_HISTORY_SCREEN = "CREDIT_HISTORY_SCREEN",
12
13
  LOYALTY_LEVEL_SCREEN = "LOYALTY_LEVEL_SCREEN",
13
- GIFT_PRODUCT_SELECTION_SCREEN = "GIFT_PRODUCT_SELECTION_SCREEN"
14
+ GIFT_PRODUCT_SELECTION_SCREEN = "GIFT_PRODUCT_SELECTION_SCREEN",
15
+ FAQ_SCREEN = "FAQ_SCREEN"
14
16
  }
15
17
  export declare enum WidgetMode {
16
18
  MINI_MODE = "MINI_MODE",
@@ -113,6 +115,7 @@ export type ListLoyaltyProgramPointHistoryInput = {
113
115
  export type LoyaltyWidgetCallbacks = {
114
116
  listSpendingMethodsByCartId: (cartId?: string | null) => Promise<LoyaltyProgramSpendingMethod[]>;
115
117
  getLoyaltyCustomerInfo: () => Promise<LoyaltyCustomerInfo | null>;
118
+ getLoyaltyProgram?: () => Promise<LoyaltyProgram | null>;
116
119
  listEarningMethods: () => Promise<LoyaltyProgramEarningMethod[]>;
117
120
  listLoyaltyProgramTier: (input: ListLoyaltyProgramTierInput) => Promise<LoyaltyProgramTier[]>;
118
121
  listLoyaltyProgramPointHistory: (input: ListLoyaltyProgramPointHistoryInput) => Promise<LoyaltyProgramPointHistory[]>;
@@ -1 +1 @@
1
- var E,R,T,_,N,C,D,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",E.GIFT_PRODUCT_SELECTION_SCREEN="GIFT_PRODUCT_SELECTION_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"}(C||(C={})),function(E){E.MONTH="MONTH",E.WEEK="WEEK",E.YEAR="YEAR"}(D||(D={})),function(E){E.EARN="EARN",E.SPEND="SPEND",E.REFUND="REFUND",E.REFILL="REFILL",E.MANUAL_EARN="MANUAL_EARN",E.MANUAL_DEDUCT="MANUAL_DEDUCT"}(A||(A={}));export{T as EarningMethodTypeEnum,C as LoyaltyProgramFilterTypeEnum,N as LoyaltyProgramMethodSpendingTypeEnum,_ as LoyaltyProgramPointEarningTypeEnum,A as LoyaltyProgramPointHistoryTypeEnum,E as LoyaltyWidgetScreenTypeEnum,D as PeriodTypeEnum,R as WidgetMode};
1
+ var E,R,_,T,N,C,A,D;!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.GIFT_PRODUCT_SELECTION_SCREEN="GIFT_PRODUCT_SELECTION_SCREEN",E.FAQ_SCREEN="FAQ_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"}(_||(_={})),function(E){E.DYNAMIC_ORDER_AMOUNT="DYNAMIC_ORDER_AMOUNT",E.DYNAMIC_ORDER_QUANTITY="DYNAMIC_ORDER_QUANTITY",E.STATIC="STATIC"}(T||(T={})),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"}(C||(C={})),function(E){E.MONTH="MONTH",E.WEEK="WEEK",E.YEAR="YEAR"}(A||(A={})),function(E){E.EARN="EARN",E.SPEND="SPEND",E.REFUND="REFUND",E.REFILL="REFILL",E.MANUAL_EARN="MANUAL_EARN",E.MANUAL_DEDUCT="MANUAL_DEDUCT"}(D||(D={}));export{_ as EarningMethodTypeEnum,C as LoyaltyProgramFilterTypeEnum,N as LoyaltyProgramMethodSpendingTypeEnum,T as LoyaltyProgramPointEarningTypeEnum,D as LoyaltyProgramPointHistoryTypeEnum,E as LoyaltyWidgetScreenTypeEnum,A as PeriodTypeEnum,R as WidgetMode};
@@ -1 +1 @@
1
- import r,{useState as n,useRef as t,useEffect as e}from"react";var u=function(u){var a=u.end,c=u.duration,i=void 0===c?1e3:c,o=n(a),m=o[0],l=o[1],f=t(null),v=t(a);return e(function(){var r;v.current=m,f.current=null;var n=function(t){f.current||(f.current=t);var e=Math.min((t-f.current)/i,1),u=1-Math.pow(1-e,4),c=Math.round(v.current+(a-v.current)*u);l(c),e<1&&(r=requestAnimationFrame(n))};return r=requestAnimationFrame(n),function(){return cancelAnimationFrame(r)}},[a,i]),r.createElement(r.Fragment,null,m)};export{u as default};
1
+ import r,{useState as n,useRef as t,useEffect as e}from"react";var u=function(u){var a=u.end,c=u.duration,i=void 0===c?1e3:c,o=n(a),m=o[0],l=o[1],f=t(null),v=t(a);return e(function(){if(m!==a){var r;v.current=m,f.current=null;var n=function(t){f.current||(f.current=t);var e=Math.min((t-f.current)/i,1),u=1-Math.pow(1-e,4),c=1===e?a:Math.round(v.current+(a-v.current)*u);l(c),e<1&&(r=requestAnimationFrame(n))};return r=requestAnimationFrame(n),function(){return cancelAnimationFrame(r)}}},[a,i]),r.createElement(r.Fragment,null,m)};export{u as default};