@salla.sa/twilight-components 1.0.100 → 1.0.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/cjs/{index-3771e52a.js → index-b4140db0.js} +18 -11
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/salla-add-product-button.cjs.entry.js +85 -0
- package/dist/cjs/{salla-add-product-button_6.cjs.entry.js → salla-branches_13.cjs.entry.js} +1015 -80
- package/dist/cjs/salla-conditional-fields.cjs.entry.js +4 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-quantity-input.cjs.entry.js +2 -2
- package/dist/cjs/twilight-components.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +13 -28
- package/dist/collection/components/salla-branches/salla-branches.css +0 -3
- package/dist/collection/components/salla-branches/salla-branches.js +9 -5
- package/dist/collection/components/salla-button/salla-button.css +0 -3
- package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +3 -1
- package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.css +0 -3
- package/dist/collection/components/salla-installment/salla-installment.css +0 -3
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.css +2 -5
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +3 -2
- package/dist/collection/components/salla-login-modal/salla-login-modal.css +0 -3
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +16 -5
- package/dist/collection/components/salla-modal/salla-modal.css +0 -3
- package/dist/collection/components/salla-modal/salla-modal.js +12 -11
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.css +0 -3
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -0
- package/dist/collection/components/salla-product-availability/salla-product-availability.css +0 -3
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +18 -13
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.css +0 -3
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +2 -2
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.css +0 -3
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.css +0 -3
- package/dist/collection/components/salla-search/salla-search.css +0 -3
- package/dist/collection/components/salla-tel-input/salla-tel-input.css +2 -5
- package/dist/collection/components/salla-verify/salla-verify.css +0 -3
- package/dist/collection/global/app.js +23 -0
- package/dist/collection/plugins/tailwind-theme/index.js +3 -4
- package/dist/components/index.d.ts +17 -5
- package/dist/components/index.js +17 -0
- package/dist/components/salla-add-product-button.js +14 -12
- package/dist/components/salla-branches.js +8 -4
- package/dist/components/salla-conditional-fields.js +3 -1
- package/dist/components/salla-localization-modal.js +4 -3
- package/dist/components/salla-login-modal.js +11 -3
- package/dist/components/salla-modal2.js +6 -6
- package/dist/components/salla-offer-modal.js +1 -0
- package/dist/components/salla-product-availability2.js +17 -12
- package/dist/components/salla-quantity-input.js +1 -1
- package/dist/components/salla-tel-input2.js +3 -3
- package/dist/esm/{index-ee729716.js → index-20b84fd0.js} +18 -11
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/salla-add-product-button.entry.js +81 -0
- package/dist/esm/{salla-add-product-button_6.entry.js → salla-branches_13.entry.js} +1008 -80
- package/dist/esm/salla-conditional-fields.entry.js +4 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-quantity-input.entry.js +2 -2
- package/dist/esm/twilight-components.js +3 -3
- package/dist/twilight-components/{p-f0f7a51b.entry.js → p-15fac4f2.entry.js} +1 -1
- package/dist/twilight-components/p-27d01075.entry.js +4 -0
- package/dist/twilight-components/{p-9a75d4ec.entry.js → p-5ee94c9e.entry.js} +1 -1
- package/dist/twilight-components/p-6f4f4260.entry.js +4 -0
- package/dist/twilight-components/p-7b5b8647.entry.js +4 -0
- package/dist/twilight-components/p-c2bef5f2.js +5 -0
- package/dist/twilight-components/twilight-components.esm.js +1 -1
- package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +1 -2
- package/dist/types/components/salla-login-modal/salla-login-modal.d.ts +1 -1
- package/dist/types/components.d.ts +17 -13
- package/dist/types/global/app.d.ts +3 -0
- package/example/assets/tailwind.css +3938 -3
- package/example/assets/translations.js +4981 -0
- package/example/index.html +177 -155
- package/package.json +17 -14
- package/dist/cjs/salla-branches.cjs.entry.js +0 -94
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +0 -93
- package/dist/cjs/salla-localization-modal.cjs.entry.js +0 -120
- package/dist/cjs/salla-login-modal.cjs.entry.js +0 -196
- package/dist/cjs/salla-offer-modal.cjs.entry.js +0 -144
- package/dist/cjs/salla-rating-modal.cjs.entry.js +0 -177
- package/dist/cjs/salla-rating-stars.cjs.entry.js +0 -76
- package/dist/cjs/salla-verify.cjs.entry.js +0 -168
- package/dist/esm/salla-branches.entry.js +0 -90
- package/dist/esm/salla-infinite-scroll.entry.js +0 -89
- package/dist/esm/salla-localization-modal.entry.js +0 -116
- package/dist/esm/salla-login-modal.entry.js +0 -192
- package/dist/esm/salla-offer-modal.entry.js +0 -140
- package/dist/esm/salla-rating-modal.entry.js +0 -173
- package/dist/esm/salla-rating-stars.entry.js +0 -72
- package/dist/esm/salla-verify.entry.js +0 -164
- package/dist/twilight-components/p-00c61851.entry.js +0 -4
- package/dist/twilight-components/p-058ae0f8.entry.js +0 -4
- package/dist/twilight-components/p-27530b47.entry.js +0 -4
- package/dist/twilight-components/p-3f90fa16.entry.js +0 -4
- package/dist/twilight-components/p-5c1d4ef9.entry.js +0 -4
- package/dist/twilight-components/p-714ff288.entry.js +0 -4
- package/dist/twilight-components/p-77af5fef.entry.js +0 -4
- package/dist/twilight-components/p-a268e672.entry.js +0 -4
- package/dist/twilight-components/p-d566f357.js +0 -4
- package/dist/twilight-components/p-df7417e4.entry.js +0 -4
- package/dist/twilight-components/p-e97c00e1.entry.js +0 -4
- package/example/.DS_Store +0 -0
- package/example/.gitignore +0 -2
- package/example/dist/.DS_Store +0 -0
- package/example/dist/demo.js +0 -153
- package/example/dist/flags.png +0 -0
- package/example/dist/flags@2x.png +0 -0
- package/example/dist/intlTelInput.min.css +0 -1
- package/example/dist/tailwind.css +0 -3856
- package/example/dist/translations.js +0 -1
- package/example/dist/twilight.js +0 -437
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
let e,t,l=!1,n=!1,s=!1,o=!1;const i="undefined"!=typeof window?window:{},r=i.document||{head:{}},c={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,l,n)=>e.addEventListener(t,l,n),rel:(e,t,l,n)=>e.removeEventListener(t,l,n),ce:(e,t)=>new CustomEvent(e,t)},f=e=>Promise.resolve(e),u=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),a=(e,t,l)=>{l&&l.map((([l,n,s])=>{const o=d(e,l),i=$(t,s),r=h(l);c.ael(o,n,i,r),(t.o=t.o||[]).push((()=>c.rel(o,n,i,r)))}))},$=(e,t)=>l=>{try{256&e.t?e.i[t](l):(e.u=e.u||[]).push([t,l])}catch(e){ue(e)}},d=(e,t)=>8&t?i:e,h=e=>0!=(2&e),y="http://www.w3.org/1999/xlink",m=new WeakMap,p=e=>"sc-"+e.$,b={},w=e=>"object"==(e=typeof e)||"function"===e,g=(e,t,...l)=>{let n=null,s=null,o=null,i=!1,r=!1;const c=[],f=t=>{for(let l=0;l<t.length;l++)n=t[l],Array.isArray(n)?f(n):null!=n&&"boolean"!=typeof n&&((i="function"!=typeof e&&!w(n))&&(n+=""),i&&r?c[c.length-1].h+=n:c.push(i?k(null,n):n),r=i)};if(f(l),t){t.key&&(s=t.key),t.name&&(o=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=k(e,null);return u.m=t,c.length>0&&(u.p=c),u.g=s,u.k=o,u},k=(e,t)=>({t:0,S:e,h:t,v:null,p:null,m:null,g:null,k:null}),S={},v=(e,t,l,n,s,o)=>{if(l!==n){let r=fe(e,t),f=t.toLowerCase();if("class"===t){const t=e.classList,s=x(l),o=x(n);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in l)n&&null!=n[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in n)l&&n[t]===l[t]||(t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if("key"===t);else if("ref"===t)n&&n(e);else if(r||"o"!==t[0]||"n"!==t[1]){const i=w(n);if((r||i&&null!==n)&&!s)try{if(e.tagName.includes("-"))e[t]=n;else{const s=null==n?"":n;"list"===t?r=!1:null!=l&&e[t]==s||(e[t]=s)}}catch(e){}let c=!1;f!==(f=f.replace(/^xlink\:?/,""))&&(t=f,c=!0),null==n||!1===n?!1===n&&""!==e.getAttribute(t)||(c?e.removeAttributeNS(y,t):e.removeAttribute(t)):(!r||4&o||s)&&!i&&(n=!0===n?"":n,c?e.setAttributeNS(y,t,n):e.setAttribute(t,n))}else t="-"===t[2]?t.slice(3):fe(i,f)?f.slice(2):f[2]+t.slice(3),l&&c.rel(e,t,l,!1),n&&c.ael(e,t,n,!1)}},j=/\s/,x=e=>e?e.split(j):[],M=(e,t,l,n)=>{const s=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.m||b,i=t.m||b;for(n in o)n in i||v(s,n,o[n],void 0,l,t.t);for(n in i)v(s,n,o[n],i[n],l,t.t)},O=(n,o,i)=>{const c=o.p[i];let f,u,a,$=0;if(l||(s=!0,"slot"===c.S&&(c.t|=c.p?2:1)),null!==c.h)f=c.v=r.createTextNode(c.h);else if(1&c.t)f=c.v=r.createTextNode("");else if(f=c.v=r.createElement(2&c.t?"slot-fb":c.S),M(null,c,!1),c.p)for($=0;$<c.p.length;++$)u=O(n,c,$),u&&f.appendChild(u);return f["s-hn"]=t,3&c.t&&(f["s-sr"]=!0,f["s-cr"]=e,f["s-sn"]=c.k||"",a=n&&n.p&&n.p[i],a&&a.S===c.S&&n.v&&C(n.v,!1)),f},C=(e,l)=>{c.t|=1;const n=e.childNodes;for(let e=n.length-1;e>=0;e--){const o=n[e];o["s-hn"]!==t&&o["s-ol"]&&(L(o).insertBefore(o,I(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),l&&C(o,l)}c.t&=-2},R=(e,t,l,n,s,o)=>{let i,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(;s<=o;++s)n[s]&&(i=O(null,l,s),i&&(n[s].v=i,r.insertBefore(i,I(t))))},P=(e,t,l,s,o)=>{for(;t<=l;++t)(s=e[t])&&(o=s.v,F(s),n=!0,o["s-ol"]?o["s-ol"].remove():C(o,!0),o.remove())},T=(e,t)=>e.S===t.S&&("slot"===e.S?e.k===t.k:e.g===t.g),I=e=>e&&e["s-ol"]||e,L=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,N=(e,t)=>{const l=t.v=e.v,n=e.p,s=t.p,o=t.h;let i;null===o?("slot"===t.S||M(e,t,!1),null!==n&&null!==s?((e,t,l,n)=>{let s,o,i=0,r=0,c=0,f=0,u=t.length-1,a=t[0],$=t[u],d=n.length-1,h=n[0],y=n[d];for(;i<=u&&r<=d;)if(null==a)a=t[++i];else if(null==$)$=t[--u];else if(null==h)h=n[++r];else if(null==y)y=n[--d];else if(T(a,h))N(a,h),a=t[++i],h=n[++r];else if(T($,y))N($,y),$=t[--u],y=n[--d];else if(T(a,y))"slot"!==a.S&&"slot"!==y.S||C(a.v.parentNode,!1),N(a,y),e.insertBefore(a.v,$.v.nextSibling),a=t[++i],y=n[--d];else if(T($,h))"slot"!==a.S&&"slot"!==y.S||C($.v.parentNode,!1),N($,h),e.insertBefore($.v,a.v),$=t[--u],h=n[++r];else{for(c=-1,f=i;f<=u;++f)if(t[f]&&null!==t[f].g&&t[f].g===h.g){c=f;break}c>=0?(o=t[c],o.S!==h.S?s=O(t&&t[r],l,c):(N(o,h),t[c]=void 0,s=o.v),h=n[++r]):(s=O(t&&t[r],l,r),h=n[++r]),s&&L(a.v).insertBefore(s,I(a.v))}i>u?R(e,null==n[d+1]?null:n[d+1].v,l,n,r,d):r>d&&P(t,i,u)})(l,n,t,s):null!==s?(null!==e.h&&(l.textContent=""),R(l,null,t,s,0,s.length-1)):null!==n&&P(n,0,n.length-1)):(i=l["s-cr"])?i.parentNode.textContent=o:e.h!==o&&(l.data=o)},E=e=>{const t=e.childNodes;let l,n,s,o,i,r;for(n=0,s=t.length;n<s;n++)if(l=t[n],1===l.nodeType){if(l["s-sr"])for(i=l["s-sn"],l.hidden=!1,o=0;o<s;o++)if(r=t[o].nodeType,t[o]["s-hn"]!==l["s-hn"]||""!==i){if(1===r&&i===t[o].getAttribute("slot")){l.hidden=!0;break}}else if(1===r||3===r&&""!==t[o].textContent.trim()){l.hidden=!0;break}E(l)}},W=[],A=e=>{let t,l,s,o,i,r,c=0;const f=e.childNodes,u=f.length;for(;c<u;c++){if(t=f[c],t["s-sr"]&&(l=t["s-cr"])&&l.parentNode)for(s=l.parentNode.childNodes,o=t["s-sn"],r=s.length-1;r>=0;r--)l=s[r],l["s-cn"]||l["s-nr"]||l["s-hn"]===t["s-hn"]||(D(l,o)?(i=W.find((e=>e.j===l)),n=!0,l["s-sn"]=l["s-sn"]||o,i?i.M=t:W.push({M:t,j:l}),l["s-sr"]&&W.map((e=>{D(e.j,l["s-sn"])&&(i=W.find((e=>e.j===l)),i&&!e.M&&(e.M=i.M))}))):W.some((e=>e.j===l))||W.push({j:l}));1===t.nodeType&&A(t)}},D=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,F=e=>{e.m&&e.m.ref&&e.m.ref(null),e.p&&e.p.map(F)},H=e=>ie(e).O,U=(e,t,l)=>{const n=H(e);return{emit:e=>q(n,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},q=(e,t,l)=>{const n=c.ce(t,l);return e.dispatchEvent(n),n},V=(e,t)=>{t&&!e.C&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.C=t)))},_=(e,t)=>{if(e.t|=16,!(4&e.t))return V(e,e.R),ge((()=>z(e,t)));e.t|=512},z=(e,t)=>{const l=e.i;let n;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>Q(l,e,t))),e.u=null),n=Q(l,"componentWillLoad")),X(n,(()=>B(e,l,t)))},B=async(e,t,l)=>{const n=e.O,s=n["s-rc"];l&&(e=>{const t=e.P;((e,t)=>{let l=p(t);const n=de.get(l);if(e=11===e.nodeType?e:r,n)if("string"==typeof n){let t,s=m.get(e=e.head||e);s||m.set(e,s=new Set),s.has(l)||(e.host&&(t=e.querySelector(`[sty-id="${l}"]`))?t.innerHTML=n:(t=r.createElement("style"),t.innerHTML=n,e.insertBefore(t,e.querySelector("link"))),s&&s.add(l))}else e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n])})(e.O.getRootNode(),t)})(e);G(e,t),s&&(s.map((e=>e())),n["s-rc"]=void 0);{const t=n["s-p"],l=()=>J(e);0===t.length?l():(Promise.all(t).then(l),e.t|=4,t.length=0)}},G=(o,i)=>{try{i=i.render(),o.t&=-17,o.t|=2,((o,i)=>{const f=o.O,u=o.P,a=o.T||k(null,null),$=(e=>e&&e.S===S)(i)?i:g(null,null,i);if(t=f.tagName,u.I&&($.m=$.m||{},u.I.map((([e,t])=>$.m[t]=f[e]))),$.S=null,$.t|=4,o.T=$,$.v=a.v=f,e=f["s-cr"],l=0!=(1&u.t),n=!1,N(a,$),c.t|=1,s){let e,t,l,n,s,o;A($.v);let i=0;for(;i<W.length;i++)e=W[i],t=e.j,t["s-ol"]||(l=r.createTextNode(""),l["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=l,t));for(i=0;i<W.length;i++)if(e=W[i],t=e.j,e.M){for(n=e.M.parentNode,s=e.M.nextSibling,l=t["s-ol"];l=l.previousSibling;)if(o=l["s-nr"],o&&o["s-sn"]===t["s-sn"]&&n===o.parentNode&&(o=o.nextSibling,!o||!o["s-nr"])){s=o;break}(!s&&n!==t.parentNode||t.nextSibling!==s)&&t!==s&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),n.insertBefore(t,s))}else 1===t.nodeType&&(t.hidden=!0)}n&&E($.v),c.t&=-2,W.length=0})(o,i)}catch(e){ue(e,o.O)}return null},J=e=>{const t=e.O,l=e.i,n=e.R;Q(l,"componentDidRender"),64&e.t||(e.t|=64,Y(t),Q(l,"componentDidLoad"),e.L(t),n||K()),e.N(t),e.C&&(e.C(),e.C=void 0),512&e.t&&we((()=>_(e,!1))),e.t&=-517},K=()=>{Y(r.documentElement),we((()=>q(i,"appload",{detail:{namespace:"twilight-components"}})))},Q=(e,t,l)=>{if(e&&e[t])try{return e[t](l)}catch(e){ue(e)}},X=(e,t)=>e&&e.then?e.then(t):t(),Y=e=>e.classList.add("hydrated"),Z=(e,t,l,n,s,o,i)=>{let r,c,f,u;if(1===o.nodeType){for(r=o.getAttribute("c-id"),r&&(c=r.split("."),c[0]!==i&&"0"!==c[0]||(f={t:0,W:c[0],A:c[1],D:c[2],F:c[3],S:o.tagName.toLowerCase(),v:o,m:null,p:null,g:null,k:null,h:null},t.push(f),o.removeAttribute("c-id"),e.p||(e.p=[]),e.p[f.F]=f,e=f,n&&"0"===f.D&&(n[f.F]=f.v))),u=o.childNodes.length-1;u>=0;u--)Z(e,t,l,n,s,o.childNodes[u],i);if(o.shadowRoot)for(u=o.shadowRoot.childNodes.length-1;u>=0;u--)Z(e,t,l,n,s,o.shadowRoot.childNodes[u],i)}else if(8===o.nodeType)c=o.nodeValue.split("."),c[1]!==i&&"0"!==c[1]||(r=c[0],f={t:0,W:c[1],A:c[2],D:c[3],F:c[4],v:o,m:null,p:null,g:null,k:null,S:null,h:null},"t"===r?(f.v=o.nextSibling,f.v&&3===f.v.nodeType&&(f.h=f.v.textContent,t.push(f),o.remove(),e.p||(e.p=[]),e.p[f.F]=f,n&&"0"===f.D&&(n[f.F]=f.v))):f.W===i&&("s"===r?(f.S="slot",o["s-sn"]=c[5]?f.k=c[5]:"",o["s-sr"]=!0,l.push(f),e.p||(e.p=[]),e.p[f.F]=f):"r"===r&&(s["s-cr"]=o,o["s-cn"]=!0)));else if(e&&"style"===e.S){const t=k(null,o.textContent);t.v=o,t.F="0",e.p=[t]}},ee=(e,t)=>{if(1===e.nodeType){let l=0;for(;l<e.childNodes.length;l++)ee(e.childNodes[l],t);if(e.shadowRoot)for(l=0;l<e.shadowRoot.childNodes.length;l++)ee(e.shadowRoot.childNodes[l],t)}else if(8===e.nodeType){const l=e.nodeValue.split(".");"o"===l[0]&&(t.set(l[1]+"."+l[2],e),e.nodeValue="",e["s-en"]=l[3])}},te=(e,t,l)=>{if(t.H){e.watchers&&(t.U=e.watchers);const n=Object.entries(t.H),s=e.prototype;if(n.map((([e,[n]])=>{31&n||2&l&&32&n?Object.defineProperty(s,e,{get(){return((e,t)=>ie(this).q.get(t))(0,e)},set(l){((e,t,l,n)=>{const s=ie(e),o=s.O,i=s.q.get(t),r=s.t,c=s.i;if(l=((e,t)=>null==e||w(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,n.H[t][0]),(!(8&r)||void 0===i)&&l!==i&&(!Number.isNaN(i)||!Number.isNaN(l))&&(s.q.set(t,l),c)){if(n.U&&128&r){const e=n.U[t];e&&e.map((e=>{try{c[e](l,i,t)}catch(e){ue(e,o)}}))}2==(18&r)&&_(s,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0}):1&l&&64&n&&Object.defineProperty(s,e,{value(...t){const l=ie(this);return l.V.then((()=>l.i[e](...t)))}})})),1&l){const l=new Map;s.attributeChangedCallback=function(e,t,n){c.jmp((()=>{const t=l.get(e);if(this.hasOwnProperty(t))n=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==n)return;this[t]=(null!==n||"boolean"!=typeof this[t])&&n}))},e.observedAttributes=n.filter((([e,t])=>15&t[0])).map((([e,n])=>{const s=n[1]||e;return l.set(s,e),512&n[0]&&t.I.push([e,s]),s}))}}return e},le=e=>{if(0==(1&c.t)){const t=ie(e),l=t.P,n=()=>{};if(1&t.t)a(e,t,l._);else{let n;t.t|=1,n=e.getAttribute("s-id"),n&&((e,t,l,n)=>{const s=e.shadowRoot,o=[],i=n.T=k(t,null);c.B||ee(r.body,c.B=new Map),e["s-id"]=l,e.removeAttribute("s-id"),Z(i,o,[],null,e,e,l),o.map((e=>{const l=e.W+"."+e.A,n=c.B.get(l),o=e.v;n&&""===n["s-en"]&&n.parentNode.insertBefore(o,n.nextSibling),s||(o["s-hn"]=t,n&&(o["s-ol"]=n,o["s-ol"]["s-nr"]=o)),c.B.delete(l)}))})(e,l.$,n,t),n||12&l.t&&ne(e);{let l=e;for(;l=l.parentNode||l.host;)if(1===l.nodeType&&l.hasAttribute("s-id")&&l["s-p"]||l["s-p"]){V(t,t.R=l);break}}l.H&&Object.entries(l.H).map((([t,[l]])=>{if(31&l&&e.hasOwnProperty(t)){const l=e[t];delete e[t],e[t]=l}})),(async(e,t,l,n,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=$e(l)).then){const e=()=>{};s=await s,e()}s.isProxied||(l.U=s.watchers,te(s,l,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){ue(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=p(l);if(!de.has(t)){const n=()=>{};((e,t,l)=>{let n=de.get(e);u&&l?(n=n||new CSSStyleSheet,"string"==typeof n?n=t:n.replaceSync(t)):n=t,de.set(e,n)})(t,e,!!(1&l.t)),n()}}}const o=t.R,i=()=>_(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,l)}n()}},ne=e=>{const t=e["s-cr"]=r.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},se=(e,t={})=>{const l=[],n=t.exclude||[],s=i.customElements,o=r.head,f=o.querySelector("meta[charset]"),u=r.createElement("style"),a=[];let $,d=!0;Object.assign(c,t),c.l=new URL(t.resourcesUrl||"./",r.baseURI).href,c.t|=2,e.map((e=>{e[1].map((t=>{const o={t:t[0],$:t[1],H:t[2],_:t[3]};o.H=t[2],o._=t[3],o.I=[],o.U={};const i=o.$,r=class extends HTMLElement{constructor(e){super(e),ce(e=this,o)}connectedCallback(){$&&(clearTimeout($),$=null),d?a.push(this):c.jmp((()=>le(this)))}disconnectedCallback(){c.jmp((()=>(()=>{if(0==(1&c.t)){const e=ie(this);e.o&&(e.o.map((e=>e())),e.o=void 0)}})()))}componentOnReady(){return ie(this).G}};o.J=e[0],n.includes(i)||s.get(i)||(l.push(i),s.define(i,te(r,o,1)))}))})),u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles",""),o.insertBefore(u,f?f.nextSibling:o.firstChild),d=!1,a.length?a.map((e=>e.connectedCallback())):c.jmp((()=>$=setTimeout(K,30)))},oe=new WeakMap,ie=e=>oe.get(e),re=(e,t)=>oe.set(t.i=e,t),ce=(e,t)=>{const l={t:0,O:e,P:t,q:new Map};return l.V=new Promise((e=>l.N=e)),l.G=new Promise((e=>l.L=e)),e["s-p"]=[],e["s-rc"]=[],a(e,l,t._),oe.set(e,l)},fe=(e,t)=>t in e,ue=(e,t)=>(0,console.error)(e,t),ae=new Map,$e=e=>{const t=e.$.replace(/-/g,"_"),l=e.J,n=ae.get(l);return n?n[t]:import(`./${l}.entry.js`).then((e=>(ae.set(l,e),e[t])),ue)
|
|
5
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},de=new Map,he=[],ye=[],me=(e,t)=>l=>{e.push(l),o||(o=!0,t&&4&c.t?we(be):c.raf(be))},pe=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ue(e)}e.length=0},be=()=>{pe(he),pe(ye),(o=he.length>0)&&c.raf(be)},we=e=>f().then(e),ge=me(ye,!0);export{S as H,se as b,U as c,H as g,g as h,f as p,re as r}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{p as e,b as a}from"./p-
|
|
4
|
+
import{p as e,b as a}from"./p-c2bef5f2.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-7b5b8647",[[4,"salla-login-modal",{isEmailAllowed:[1028,"is-email-allowed"],isMobileAllowed:[1028,"is-mobile-allowed"],isEmailRequired:[1028,"is-email-required"],title:[32],loginTypeTitle:[32],loginText:[32],smsLabel:[32],mobileLabel:[32],emailLabel:[32],enterText:[32],bySMSText:[32],byEmailText:[32],emailErrorMsg:[32],firstNameLabel:[32],lastNameLabel:[32],firstNameErrorMsg:[32],lastNameErrorMsg:[32],open:[64]},[[8,"verified","onVerified"]]],[0,"salla-rating-modal",{orderId:[2,"order-id"],order:[32],open:[64],close:[64]}],[4,"salla-branches",{position:[1],displayAs:[1,"display-as"],browseProductsFrom:[1,"browse-products-from"],branches:[16],current:[1026],open:[32],selected:[32],isOpenedBefore:[32],show:[64],hide:[64]}],[0,"salla-localization-modal",{language:[1537],currency:[1537],languages:[32],currencies:[32],languagesTitle:[32],currenciesTitle:[32],isLoading:[32],open:[64],close:[64],submit:[64]}],[0,"salla-offer-modal",{offer:[32],offer_name:[32],offer_message:[32],offer_expires_in:[32],remember_my_choice:[32],add_to_cart:[32],out_of_stock:[32],open:[64],showOffer:[64]}],[0,"salla-search",{inline:[4],oval:[4],height:[2],results:[32],placeholder:[32],noResultsText:[32],typing:[32],debounce:[32],search_term:[32]}],[4,"salla-infinite-scroll",{nextPage:[1,"next-page"],autoload:[1028],container:[1],item:[1],loadMore:[32],noMore:[32],failedToLoad:[32]}],[0,"salla-product-availability",{channels:[1],productId:[2,"product-id"],isSubscribed:[1028,"is-subscribed"],subTitle:[32],mobileLabel:[32],emailLabel:[32],emailPlaceholder:[32],subscribedMessage:[32],title_:[32],emailErrorMsg:[32],isVisitorSubscribed:[32]}],[4,"salla-verify",{display:[1],type:[1025],autoReload:[4,"auto-reload"],title:[32],resendAfter:[32],isProfileVerify:[32],getCode:[64],open:[64]}],[0,"salla-rating-stars",{name:[1],size:[1],value:[2]}],[0,"salla-tel-input",{phone:[1025],name:[1],countryCode:[1025,"country-code"],mobileRequired:[32],countryCodeLabel:[32],mobileLabel:[32],tooShort:[32],tooLong:[32],invalidCountryCode:[32],invalidNumber:[32],errorMap:[32],getValues:[64],isValid:[64]}],[4,"salla-button",{shape:[513],color:[513],fill:[513],size:[513],width:[513],loading:[516],disabled:[516],loaderPosition:[1,"loader-position"],href:[1],load:[64],stop:[64],setText:[64],disable:[64],enable:[64]}],[4,"salla-modal",{isClosable:[1028,"is-closable"],width:[513],position:[513],visible:[516],isLoading:[1540,"is-loading"],subTitleFirst:[4,"sub-title-first"],noPadding:[4,"no-padding"],subTitle:[1,"sub-title"],icon:[1],iconStyle:[1,"icon-style"],imageIcon:[1,"image-icon"],modalTitle:[32],open:[64],close:[64],setTitle:[64],loading:[64],stopLoading:[64]}]]],["p-6f4f4260",[[4,"salla-add-product-button",{channels:[513],quantity:[514],donatingAmount:[514,"donating-amount"],productId:[520,"product-id"],productStatus:[513,"product-status"],productType:[513,"product-type"]}]]],["p-27d01075",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-15fac4f2",[[0,"salla-installment",{price:[1],language:[1],currency:[1],tamaraIsActive:[32],tabbyIsActive:[32],spotiiIsActive:[32]}]]],["p-5ee94c9e",[[4,"salla-quantity-input",{quantity:[32],decrease:[64],increase:[64],setValue:[64]}]]]],e)));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
export declare class SallaAddProductButton {
|
|
3
3
|
private hostAttributes;
|
|
4
|
-
private btn
|
|
4
|
+
private btn?;
|
|
5
5
|
private hasLabel;
|
|
6
6
|
channels: string;
|
|
7
7
|
quantity: number;
|
|
@@ -14,7 +14,6 @@ export declare class SallaAddProductButton {
|
|
|
14
14
|
/**
|
|
15
15
|
* Is the button currently disabled
|
|
16
16
|
*/
|
|
17
|
-
disabled: boolean;
|
|
18
17
|
host: HTMLElement;
|
|
19
18
|
private getLabel;
|
|
20
19
|
private addProductToCart;
|
|
@@ -8,10 +8,6 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
|
8
8
|
export namespace Components {
|
|
9
9
|
interface SallaAddProductButton {
|
|
10
10
|
"channels": string;
|
|
11
|
-
/**
|
|
12
|
-
* Is the button currently disabled
|
|
13
|
-
*/
|
|
14
|
-
"disabled": boolean;
|
|
15
11
|
"donatingAmount": number;
|
|
16
12
|
"productId": any;
|
|
17
13
|
"productStatus": 'sale' | 'out' | 'out-and-notify';
|
|
@@ -149,7 +145,7 @@ export namespace Components {
|
|
|
149
145
|
/**
|
|
150
146
|
* Open login component
|
|
151
147
|
*/
|
|
152
|
-
"open": () => Promise<HTMLElement>;
|
|
148
|
+
"open": (event?: any) => Promise<HTMLElement>;
|
|
153
149
|
}
|
|
154
150
|
interface SallaModal {
|
|
155
151
|
/**
|
|
@@ -319,6 +315,18 @@ export namespace Components {
|
|
|
319
315
|
"type": 'mobile' | 'email';
|
|
320
316
|
}
|
|
321
317
|
}
|
|
318
|
+
export interface SallaAddProductButtonCustomEvent<T> extends CustomEvent<T> {
|
|
319
|
+
detail: T;
|
|
320
|
+
target: HTMLSallaAddProductButtonElement;
|
|
321
|
+
}
|
|
322
|
+
export interface SallaTelInputCustomEvent<T> extends CustomEvent<T> {
|
|
323
|
+
detail: T;
|
|
324
|
+
target: HTMLSallaTelInputElement;
|
|
325
|
+
}
|
|
326
|
+
export interface SallaVerifyCustomEvent<T> extends CustomEvent<T> {
|
|
327
|
+
detail: T;
|
|
328
|
+
target: HTMLSallaVerifyElement;
|
|
329
|
+
}
|
|
322
330
|
declare global {
|
|
323
331
|
interface HTMLSallaAddProductButtonElement extends Components.SallaAddProductButton, HTMLStencilElement {
|
|
324
332
|
}
|
|
@@ -445,13 +453,9 @@ declare global {
|
|
|
445
453
|
declare namespace LocalJSX {
|
|
446
454
|
interface SallaAddProductButton {
|
|
447
455
|
"channels"?: string;
|
|
448
|
-
/**
|
|
449
|
-
* Is the button currently disabled
|
|
450
|
-
*/
|
|
451
|
-
"disabled"?: boolean;
|
|
452
456
|
"donatingAmount"?: number;
|
|
453
|
-
"onFailed"?: (event:
|
|
454
|
-
"onSuccess"?: (event:
|
|
457
|
+
"onFailed"?: (event: SallaAddProductButtonCustomEvent<any>) => void;
|
|
458
|
+
"onSuccess"?: (event: SallaAddProductButtonCustomEvent<any>) => void;
|
|
455
459
|
"productId"?: any;
|
|
456
460
|
"productStatus"?: 'sale' | 'out' | 'out-and-notify';
|
|
457
461
|
"productType"?: 'product' | 'service' | 'codes' | 'digital' | 'food' | 'donating' | 'group_products';
|
|
@@ -628,7 +632,7 @@ declare namespace LocalJSX {
|
|
|
628
632
|
* input name
|
|
629
633
|
*/
|
|
630
634
|
"name"?: string;
|
|
631
|
-
"onEnterClicked"?: (event:
|
|
635
|
+
"onEnterClicked"?: (event: SallaTelInputCustomEvent<any>) => void;
|
|
632
636
|
/**
|
|
633
637
|
* Current mobile number
|
|
634
638
|
*/
|
|
@@ -646,7 +650,7 @@ declare namespace LocalJSX {
|
|
|
646
650
|
/**
|
|
647
651
|
* Event when success verification
|
|
648
652
|
*/
|
|
649
|
-
"onVerified"?: (event:
|
|
653
|
+
"onVerified"?: (event: SallaVerifyCustomEvent<any>) => void;
|
|
650
654
|
/**
|
|
651
655
|
* Verifying method
|
|
652
656
|
*/
|