@salla.sa/twilight-components 2.14.242 → 2.14.243
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/dist/cjs/{app-globals-CVeZYGxB.js → app-globals-BBNXZqkK.js} +3 -3
- package/dist/cjs/{app-globals-CVeZYGxB.js.map → app-globals-BBNXZqkK.js.map} +1 -1
- package/dist/cjs/{index-DJaUOUEA.js → index-PeQbW4nk.js} +4 -4
- package/dist/cjs/index-PeQbW4nk.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion-head.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_51.cjs.entry.js +1 -1
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/esm/{app-globals-DFw3DLIF.js → app-globals-D1P1rERf.js} +3 -3
- package/dist/esm/{app-globals-DFw3DLIF.js.map → app-globals-D1P1rERf.js.map} +1 -1
- package/dist/esm/{index-9b729OAn.js → index-CuTX1FnY.js} +4 -4
- package/dist/esm/index-CuTX1FnY.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body.entry.js +1 -1
- package/dist/esm/salla-accordion-head.entry.js +1 -1
- package/dist/esm/salla-accordion.entry.js +1 -1
- package/dist/esm/salla-add-product-button_51.entry.js +1 -1
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-booking-field_2.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-options.entry.js +1 -1
- package/dist/esm/salla-review-card.entry.js +1 -1
- package/dist/esm/salla-reviews-page.entry.js +1 -1
- package/dist/esm/salla-reviews.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm-es5/{app-globals-DFw3DLIF.js → app-globals-D1P1rERf.js} +2 -2
- package/dist/esm-es5/{app-globals-DFw3DLIF.js.map → app-globals-D1P1rERf.js.map} +1 -1
- package/dist/esm-es5/{index-9b729OAn.js → index-CuTX1FnY.js} +3 -3
- package/dist/esm-es5/index-CuTX1FnY.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-accordion-body.entry.js +1 -1
- package/dist/esm-es5/salla-accordion-head.entry.js +1 -1
- package/dist/esm-es5/salla-accordion.entry.js +1 -1
- package/dist/esm-es5/salla-add-product-button_51.entry.js +1 -1
- package/dist/esm-es5/salla-advertisement.entry.js +1 -1
- package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
- package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
- package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
- package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
- package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
- package/dist/esm-es5/salla-contacts.entry.js +1 -1
- package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
- package/dist/esm-es5/salla-filters.entry.js +1 -1
- package/dist/esm-es5/salla-installment.entry.js +1 -1
- package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm-es5/salla-loyalty-program.entry.js +1 -1
- package/dist/esm-es5/salla-metadata.entry.js +1 -1
- package/dist/esm-es5/salla-notification-item.entry.js +1 -1
- package/dist/esm-es5/salla-notifications.entry.js +1 -1
- package/dist/esm-es5/salla-offer.entry.js +1 -1
- package/dist/esm-es5/salla-order-summary.entry.js +1 -1
- package/dist/esm-es5/salla-orders.entry.js +1 -1
- package/dist/esm-es5/salla-payments.entry.js +1 -1
- package/dist/esm-es5/salla-price-range.entry.js +1 -1
- package/dist/esm-es5/salla-product-options.entry.js +1 -1
- package/dist/esm-es5/salla-review-card.entry.js +1 -1
- package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
- package/dist/esm-es5/salla-reviews.entry.js +1 -1
- package/dist/esm-es5/salla-social.entry.js +1 -1
- package/dist/esm-es5/salla-tiered-offer.entry.js +1 -1
- package/dist/esm-es5/salla-tooltip.entry.js +1 -1
- package/dist/esm-es5/salla-verify.entry.js +1 -1
- package/dist/esm-es5/salla-wallet.entry.js +1 -1
- package/dist/esm-es5/twilight.js +1 -1
- package/dist/twilight/{p-9d9532b8.entry.js → p-003b86a2.entry.js} +2 -2
- package/dist/twilight/{p-1e5a2920.entry.js → p-0284f6e2.entry.js} +2 -2
- package/dist/twilight/{p-4f0e3200.entry.js → p-05fb4f81.entry.js} +2 -2
- package/dist/twilight/{p-4808ad99.system.entry.js → p-063fa20b.system.entry.js} +2 -2
- package/dist/twilight/{p-4825d388.entry.js → p-08ee1adb.entry.js} +2 -2
- package/dist/twilight/{p-c8151ab6.entry.js → p-0d0b4f23.entry.js} +2 -2
- package/dist/twilight/{p-c5e96aa9.entry.js → p-1446a7c2.entry.js} +2 -2
- package/dist/twilight/{p-c67a10e4.system.entry.js → p-220790b2.system.entry.js} +2 -2
- package/dist/twilight/{p-ef3f7aa2.entry.js → p-2736e1ff.entry.js} +2 -2
- package/dist/twilight/{p-2cc79952.entry.js → p-27ebf315.entry.js} +2 -2
- package/dist/twilight/{p-4519db39.system.entry.js → p-28ef27bf.system.entry.js} +2 -2
- package/dist/twilight/{p-9cfeaa42.entry.js → p-30d7fdbe.entry.js} +2 -2
- package/dist/twilight/{p-b0cce2cc.entry.js → p-32915043.entry.js} +2 -2
- package/dist/twilight/{p-6bd7d328.entry.js → p-334407c3.entry.js} +2 -2
- package/dist/twilight/{p-570786ff.system.entry.js → p-393e3ade.system.entry.js} +2 -2
- package/dist/twilight/{p-853b0235.system.entry.js → p-39b35702.system.entry.js} +3 -3
- package/dist/twilight/{p-81e4f9ad.system.entry.js → p-4e6ec042.system.entry.js} +2 -2
- package/dist/twilight/p-4e898b33.system.entry.js +5 -0
- package/dist/twilight/{p-a84192ba.system.entry.js → p-56c6ed6f.system.entry.js} +2 -2
- package/dist/twilight/{p-2fb30390.system.entry.js → p-5ba5e28c.system.entry.js} +2 -2
- package/dist/twilight/{p-3c5a1df2.entry.js → p-5baa9220.entry.js} +2 -2
- package/dist/twilight/{p-e55eb9fd.system.entry.js → p-5da4dd8f.system.entry.js} +2 -2
- package/dist/twilight/{p-3a03b512.system.entry.js → p-63bd7c4d.system.entry.js} +2 -2
- package/dist/twilight/{p-de6b2d28.system.entry.js → p-63e43b3e.system.entry.js} +2 -2
- package/dist/twilight/{p-6819efbb.entry.js → p-69ae28c3.entry.js} +2 -2
- package/dist/twilight/{p-92b44893.system.entry.js → p-6c759bad.system.entry.js} +2 -2
- package/dist/twilight/{p-8d2b2e83.entry.js → p-6e05d698.entry.js} +2 -2
- package/dist/twilight/{p-d866b4b3.entry.js → p-7426b31e.entry.js} +2 -2
- package/dist/twilight/{p-5d7eff34.entry.js → p-744e409d.entry.js} +2 -2
- package/dist/twilight/{p-2efe373b.system.entry.js → p-74908f36.system.entry.js} +2 -2
- package/dist/twilight/p-785c5a57.system.entry.js +5 -0
- package/dist/twilight/{p-d8ebfd19.entry.js → p-7ad55888.entry.js} +2 -2
- package/dist/twilight/{p-377aa6d4.entry.js → p-80b4ae24.entry.js} +2 -2
- package/dist/twilight/{p-44f0aa72.entry.js → p-83b5566c.entry.js} +2 -2
- package/dist/twilight/{p-e7494f56.system.entry.js → p-83cd5d0b.system.entry.js} +2 -2
- package/dist/twilight/{p-8f44bec7.system.entry.js → p-8811aac2.system.entry.js} +2 -2
- package/dist/twilight/{p-d147530e.entry.js → p-88aec04f.entry.js} +2 -2
- package/dist/twilight/{p-59bef03d.entry.js → p-8aa88636.entry.js} +2 -2
- package/dist/twilight/{p-213165ca.entry.js → p-8f374b32.entry.js} +2 -2
- package/dist/twilight/p-8f3dc4ca.entry.js +5 -0
- package/dist/twilight/{p-d7ebbd4e.system.entry.js → p-95c80bb4.system.entry.js} +2 -2
- package/dist/twilight/{p-103acf28.system.entry.js → p-9dd09d48.system.entry.js} +2 -2
- package/dist/twilight/{p-CwqZi9Jw.system.js.map → p-B0AUXP9f.system.js.map} +1 -1
- package/dist/twilight/{p-BSJYFYjL.system.js.map → p-B0j3eMiq.system.js.map} +1 -1
- package/dist/twilight/{p-BfSqqIzv.system.js.map → p-B3kLCvjX.system.js.map} +1 -1
- package/dist/twilight/{p-Ce7ba8qn.system.js.map → p-BBw9QCsf.system.js.map} +1 -1
- package/dist/twilight/{p-CcBmKuXH.system.js → p-BE-HKstx.system.js} +2 -2
- package/dist/twilight/{p-CcBmKuXH.system.js.map → p-BE-HKstx.system.js.map} +1 -1
- package/dist/twilight/{p-D6h8x_9u.system.js.map → p-BHYlCBiV.system.js.map} +1 -1
- package/dist/twilight/{p-C2GBlfF7.js → p-BVv_u7n4.js} +2 -2
- package/dist/twilight/{p-C2GBlfF7.js.map → p-BVv_u7n4.js.map} +1 -1
- package/dist/twilight/{p-CUhlEilx.system.js.map → p-BYTS2SC9.system.js.map} +1 -1
- package/dist/twilight/{p-DtsGcxvj.system.js.map → p-Bh4_ZPZ5.system.js.map} +1 -1
- package/dist/twilight/{p-D4L8yQG9.system.js.map → p-Bhru9cVq.system.js.map} +1 -1
- package/dist/twilight/{p-Cts2FJ_l.system.js → p-BpP5yEur.system.js} +2 -2
- package/dist/twilight/{p-Cts2FJ_l.system.js.map → p-BpP5yEur.system.js.map} +1 -1
- package/dist/twilight/{p-DkEQyxiJ.system.js.map → p-BuUayMpr.system.js.map} +1 -1
- package/dist/twilight/{p-CPPkAxL6.system.js.map → p-C04Q3gx_.system.js.map} +1 -1
- package/dist/twilight/{p-CJE1TAdg.system.js.map → p-C0RKEO6f.system.js.map} +1 -1
- package/dist/twilight/{p-cmP329Ib.system.js.map → p-C0sn7ZS2.system.js.map} +1 -1
- package/dist/twilight/{p-DmROPGmI.system.js.map → p-CCCFkKQu.system.js.map} +1 -1
- package/dist/twilight/{p-CuiwcdnF.system.js.map → p-CFGGBiPW.system.js.map} +1 -1
- package/dist/twilight/{p-BL4JCeRv.system.js.map → p-CYSGJCmD.system.js.map} +1 -1
- package/dist/twilight/{p-BIq8f4ja.system.js.map → p-CkgcmCNn.system.js.map} +1 -1
- package/dist/twilight/{p-9b729OAn.js → p-CuTX1FnY.js} +3 -3
- package/dist/twilight/p-CuTX1FnY.js.map +1 -0
- package/dist/twilight/{p-hguDbfki.system.js.map → p-D20TiGFZ.system.js.map} +1 -1
- package/dist/twilight/{p-D8nhmz8a.system.js → p-D5-Y1pzI.system.js} +3 -3
- package/dist/twilight/p-D5-Y1pzI.system.js.map +1 -0
- package/dist/twilight/{p-fsS3K05F.system.js.map → p-D62V7Hng.system.js.map} +1 -1
- package/dist/twilight/{p-BLQy_whM.system.js.map → p-D7ZSa6fW.system.js.map} +1 -1
- package/dist/twilight/{p-BCFhwSDC.system.js.map → p-DHVOQr5r.system.js.map} +1 -1
- package/dist/twilight/{p-ChnVjZGZ.system.js.map → p-DQUVo72n.system.js.map} +1 -1
- package/dist/twilight/{p-BGN_H23b.system.js.map → p-DbIOy6jy.system.js.map} +1 -1
- package/dist/twilight/{p-CoMj9FQl.system.js.map → p-DcLr_jJB.system.js.map} +1 -1
- package/dist/twilight/{p-BR4AEmmd.system.js.map → p-DpO3Qexd.system.js.map} +1 -1
- package/dist/twilight/{p-BOK-IBaI.system.js.map → p-Dpndr6az.system.js.map} +1 -1
- package/dist/twilight/{p-0d3OVzqh.system.js.map → p-DwHxzDwE.system.js.map} +1 -1
- package/dist/twilight/{p-H0xRLzQG.system.js.map → p-DybtpGuk.system.js.map} +1 -1
- package/dist/twilight/{p-DtFWPcj9.system.js.map → p-IKzuEIjQ.system.js.map} +1 -1
- package/dist/twilight/{p-D3RvTuse.system.js.map → p-NeruYUVP.system.js.map} +1 -1
- package/dist/twilight/{p-e7812eee.system.entry.js → p-a1fa1c6b.system.entry.js} +2 -2
- package/dist/twilight/{p-9a9cea9f.system.entry.js → p-aedd03ef.system.entry.js} +2 -2
- package/dist/twilight/{p-434d4e46.system.entry.js → p-b14283ef.system.entry.js} +2 -2
- package/dist/twilight/{p-758231d6.entry.js → p-b1478709.entry.js} +2 -2
- package/dist/twilight/{p-5c4735d4.entry.js → p-b2f1072f.entry.js} +2 -2
- package/dist/twilight/{p-290ed7a3.entry.js → p-b637209c.entry.js} +2 -2
- package/dist/twilight/{p-daab72d9.system.entry.js → p-b65866f7.system.entry.js} +3 -3
- package/dist/twilight/{p-6a05c8a7.entry.js → p-b8f6634f.entry.js} +2 -2
- package/dist/twilight/{p-675f61b3.entry.js → p-ba62fa0e.entry.js} +2 -2
- package/dist/twilight/{p-0228e57b.system.entry.js → p-bc4549b0.system.entry.js} +2 -2
- package/dist/twilight/{p-17139edc.entry.js → p-bfa87551.entry.js} +2 -2
- package/dist/twilight/{p-f25034a5.system.entry.js → p-c169aaf9.system.entry.js} +2 -2
- package/dist/twilight/{p-c1ba5826.system.entry.js → p-c7aebfba.system.entry.js} +2 -2
- package/dist/twilight/{p-4823dd50.entry.js → p-cf0431dc.entry.js} +2 -2
- package/dist/twilight/{p-6f175079.system.entry.js → p-daaf2576.system.entry.js} +2 -2
- package/dist/twilight/{p-b91925bc.entry.js → p-e2f8e416.entry.js} +2 -2
- package/dist/twilight/{p-3f525377.system.entry.js → p-ea22747c.system.entry.js} +2 -2
- package/dist/twilight/{p-708be213.system.entry.js → p-ec4270cd.system.entry.js} +2 -2
- package/dist/twilight/{p-de5eb851.system.entry.js → p-f3bae608.system.entry.js} +2 -2
- package/dist/twilight/{p-57963695.system.entry.js → p-f5776c7f.system.entry.js} +2 -2
- package/dist/twilight/{p-df83c722.system.entry.js → p-f5cde0cf.system.entry.js} +2 -2
- package/dist/twilight/{p-325b3d57.entry.js → p-f90fafa7.entry.js} +2 -2
- package/dist/twilight/{p-4f8cfb95.system.entry.js → p-f9bf2cb6.system.entry.js} +2 -2
- package/dist/twilight/{p-BAuVrq4d.system.js.map → p-fB8ikiKI.system.js.map} +1 -1
- package/dist/twilight/{p-Bb8uRHi2.system.js.map → p-fWxyHW35.system.js.map} +1 -1
- package/dist/twilight/{p-9e2c530b.entry.js → p-fc788f66.entry.js} +2 -2
- package/dist/twilight/{p-DmPY-r_Z.system.js.map → p-pCPxTgN4.system.js.map} +1 -1
- package/dist/twilight/{p-B-MUzZIx.system.js.map → p-uwvO2G-i.system.js.map} +1 -1
- package/dist/twilight/{p-iySJ93Xi.system.js.map → p-zJ65Et2a.system.js.map} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/package.json +5 -5
- package/dist/cjs/index-DJaUOUEA.js.map +0 -1
- package/dist/esm/index-9b729OAn.js.map +0 -1
- package/dist/esm-es5/index-9b729OAn.js.map +0 -1
- package/dist/twilight/p-4140d30e.system.entry.js +0 -5
- package/dist/twilight/p-6b9aa749.entry.js +0 -5
- package/dist/twilight/p-916b00a3.system.entry.js +0 -5
- package/dist/twilight/p-9b729OAn.js.map +0 -1
- package/dist/twilight/p-D8nhmz8a.system.js.map +0 -1
- /package/dist/twilight/{p-9d9532b8.entry.js.map → p-003b86a2.entry.js.map} +0 -0
- /package/dist/twilight/{p-1e5a2920.entry.js.map → p-0284f6e2.entry.js.map} +0 -0
- /package/dist/twilight/{p-4f0e3200.entry.js.map → p-05fb4f81.entry.js.map} +0 -0
- /package/dist/twilight/{p-4808ad99.system.entry.js.map → p-063fa20b.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-4825d388.entry.js.map → p-08ee1adb.entry.js.map} +0 -0
- /package/dist/twilight/{p-c8151ab6.entry.js.map → p-0d0b4f23.entry.js.map} +0 -0
- /package/dist/twilight/{p-c5e96aa9.entry.js.map → p-1446a7c2.entry.js.map} +0 -0
- /package/dist/twilight/{p-c67a10e4.system.entry.js.map → p-220790b2.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-ef3f7aa2.entry.js.map → p-2736e1ff.entry.js.map} +0 -0
- /package/dist/twilight/{p-2cc79952.entry.js.map → p-27ebf315.entry.js.map} +0 -0
- /package/dist/twilight/{p-4519db39.system.entry.js.map → p-28ef27bf.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9cfeaa42.entry.js.map → p-30d7fdbe.entry.js.map} +0 -0
- /package/dist/twilight/{p-b0cce2cc.entry.js.map → p-32915043.entry.js.map} +0 -0
- /package/dist/twilight/{p-6bd7d328.entry.js.map → p-334407c3.entry.js.map} +0 -0
- /package/dist/twilight/{p-570786ff.system.entry.js.map → p-393e3ade.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-853b0235.system.entry.js.map → p-39b35702.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-81e4f9ad.system.entry.js.map → p-4e6ec042.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-4140d30e.system.entry.js.map → p-4e898b33.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-a84192ba.system.entry.js.map → p-56c6ed6f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-2fb30390.system.entry.js.map → p-5ba5e28c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3c5a1df2.entry.js.map → p-5baa9220.entry.js.map} +0 -0
- /package/dist/twilight/{p-e55eb9fd.system.entry.js.map → p-5da4dd8f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3a03b512.system.entry.js.map → p-63bd7c4d.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-de6b2d28.system.entry.js.map → p-63e43b3e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6819efbb.entry.js.map → p-69ae28c3.entry.js.map} +0 -0
- /package/dist/twilight/{p-92b44893.system.entry.js.map → p-6c759bad.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-8d2b2e83.entry.js.map → p-6e05d698.entry.js.map} +0 -0
- /package/dist/twilight/{p-d866b4b3.entry.js.map → p-7426b31e.entry.js.map} +0 -0
- /package/dist/twilight/{p-5d7eff34.entry.js.map → p-744e409d.entry.js.map} +0 -0
- /package/dist/twilight/{p-2efe373b.system.entry.js.map → p-74908f36.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-916b00a3.system.entry.js.map → p-785c5a57.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-d8ebfd19.entry.js.map → p-7ad55888.entry.js.map} +0 -0
- /package/dist/twilight/{p-377aa6d4.entry.js.map → p-80b4ae24.entry.js.map} +0 -0
- /package/dist/twilight/{p-44f0aa72.entry.js.map → p-83b5566c.entry.js.map} +0 -0
- /package/dist/twilight/{p-e7494f56.system.entry.js.map → p-83cd5d0b.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-8f44bec7.system.entry.js.map → p-8811aac2.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-d147530e.entry.js.map → p-88aec04f.entry.js.map} +0 -0
- /package/dist/twilight/{p-59bef03d.entry.js.map → p-8aa88636.entry.js.map} +0 -0
- /package/dist/twilight/{p-213165ca.entry.js.map → p-8f374b32.entry.js.map} +0 -0
- /package/dist/twilight/{p-6b9aa749.entry.js.map → p-8f3dc4ca.entry.js.map} +0 -0
- /package/dist/twilight/{p-d7ebbd4e.system.entry.js.map → p-95c80bb4.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-103acf28.system.entry.js.map → p-9dd09d48.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e7812eee.system.entry.js.map → p-a1fa1c6b.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9a9cea9f.system.entry.js.map → p-aedd03ef.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-434d4e46.system.entry.js.map → p-b14283ef.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-758231d6.entry.js.map → p-b1478709.entry.js.map} +0 -0
- /package/dist/twilight/{p-5c4735d4.entry.js.map → p-b2f1072f.entry.js.map} +0 -0
- /package/dist/twilight/{p-290ed7a3.entry.js.map → p-b637209c.entry.js.map} +0 -0
- /package/dist/twilight/{p-daab72d9.system.entry.js.map → p-b65866f7.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6a05c8a7.entry.js.map → p-b8f6634f.entry.js.map} +0 -0
- /package/dist/twilight/{p-675f61b3.entry.js.map → p-ba62fa0e.entry.js.map} +0 -0
- /package/dist/twilight/{p-0228e57b.system.entry.js.map → p-bc4549b0.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-17139edc.entry.js.map → p-bfa87551.entry.js.map} +0 -0
- /package/dist/twilight/{p-f25034a5.system.entry.js.map → p-c169aaf9.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-c1ba5826.system.entry.js.map → p-c7aebfba.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-4823dd50.entry.js.map → p-cf0431dc.entry.js.map} +0 -0
- /package/dist/twilight/{p-6f175079.system.entry.js.map → p-daaf2576.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-b91925bc.entry.js.map → p-e2f8e416.entry.js.map} +0 -0
- /package/dist/twilight/{p-3f525377.system.entry.js.map → p-ea22747c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-708be213.system.entry.js.map → p-ec4270cd.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-de5eb851.system.entry.js.map → p-f3bae608.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-57963695.system.entry.js.map → p-f5776c7f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-df83c722.system.entry.js.map → p-f5cde0cf.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-325b3d57.entry.js.map → p-f90fafa7.entry.js.map} +0 -0
- /package/dist/twilight/{p-4f8cfb95.system.entry.js.map → p-f9bf2cb6.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9e2c530b.entry.js.map → p-fc788f66.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as i,h as s,g as t}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as i,h as s,g as t}from"./p-CuTX1FnY.js";import{I as e}from"./p-uTyAzPSy.js";var r=` <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="currentcolor" />\n</svg>`;var a=` <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="#DDDDDD" />\n</svg>`;var n=` <svg width="12" height="17" view-box="0 0 12 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M6 16.2501C9.10658 16.2501 11.625 13.7317 11.625 10.6251C11.625 9.976 11.4523 9.35252 11.25 8.77232C9.99998 10.0075 9.05002 10.6251 8.4 10.6251C11.3966 5.37512 9.75 3.12512 5.25 0.125122C5.625 3.87475 3.15302 5.58043 2.14634 6.52757C1.0559 7.5535 0.375 9.00977 0.375 10.6251C0.375 13.7317 2.89339 16.2501 6 16.2501ZM6.53205 2.92636C8.96333 4.98908 8.97495 6.59185 7.09725 9.88157C6.5265 10.8815 7.2486 12.1251 8.4 12.1251C8.9163 12.1251 9.43807 11.9745 9.98917 11.6789C9.52342 13.4466 7.91393 14.7501 6 14.7501C3.72182 14.7501 1.875 12.9033 1.875 10.6251C1.875 9.47072 2.34959 8.39582 3.17419 7.62002C3.2687 7.53115 3.74812 7.1062 3.76858 7.08782C4.08646 6.8017 4.34835 6.54985 4.60718 6.2727C5.52998 5.28461 6.19283 4.18735 6.53205 2.92636Z" fill="currentcolor" />\n </svg>`;const l=":host{display:block}";const d=class{constructor(s){i(this,s);this.currentSlide=0;this.showPurchaseCount=false;this.startPoint={x:0,y:0};this.isSwiping=false;this.isRTL="rtl";this.handlePointerDown=i=>{var s;if(!i.isPrimary)return;(s=this.sliderElement)===null||s===void 0?void 0:s.setPointerCapture(i.pointerId);this.startSwipe(i.clientX,i.clientY);i.preventDefault()};this.handlePointerMove=i=>{if(!this.isSwiping||!i.isPrimary)return;i.preventDefault()};this.handlePointerUp=i=>{var s;if(!this.isSwiping||!i.isPrimary)return;(s=this.sliderElement)===null||s===void 0?void 0:s.releasePointerCapture(i.pointerId);this.endSwipe(i.clientX,i.clientY)};this.handlePointerCancel=i=>{var s;if(!this.isSwiping||!i.isPrimary)return;(s=this.sliderElement)===null||s===void 0?void 0:s.releasePointerCapture(i.pointerId);this.isSwiping=false};this.goToSlide=i=>{this.currentSlide=Math.max(0,Math.min(i,this.images.length-1))}}async componentDidLoad(){var i,s;await salla.onReady();this.showPurchaseCount=!!salla.config.get("store.settings.product.total_sold_enabled",false);this.isRTL=salla.config.get("theme.is_rtl",true);this.purchasedCount=salla.lang.getWithDefault("blocks.home.reviews.purchased_count",this.isRTL?` تم شراءه ${(i=this.review.product)===null||i===void 0?void 0:i.sold_quantity} مرة`:`Purchased ${this.review.product.sold_quantity} times`,{count:(s=this.review.product)===null||s===void 0?void 0:s.sold_quantity});this.initializeSlider()}disconnectedCallback(){this.removeEventListeners()}get images(){var i,s;const{review:t}=this;return((i=t===null||t===void 0?void 0:t.images)===null||i===void 0?void 0:i.length)>1?t.images.map(((i,s)=>({url:i,alt:"",id:s}))):((s=t===null||t===void 0?void 0:t.product)===null||s===void 0?void 0:s.images)||[]}get hasMultipleImages(){return this.images.length>1}get slideTransform(){const i=this.isRTL?1:-1;return`translateX(${this.currentSlide*100*i}%)`}initializeSlider(){if(!this.hasMultipleImages)return;this.sliderElement=this.el.querySelector(".s-review-card-slider-container");if(!this.sliderElement)return;this.sliderElement.style.touchAction="pan-y pinch-zoom";this.addEventListeners()}addEventListeners(){if(!this.sliderElement)return;this.sliderElement.addEventListener("pointerdown",this.handlePointerDown,{passive:false});this.sliderElement.addEventListener("pointermove",this.handlePointerMove,{passive:false});this.sliderElement.addEventListener("pointerup",this.handlePointerUp,{passive:true});this.sliderElement.addEventListener("pointercancel",this.handlePointerCancel,{passive:true})}removeEventListeners(){if(!this.sliderElement)return;this.sliderElement.removeEventListener("pointerdown",this.handlePointerDown);this.sliderElement.removeEventListener("pointermove",this.handlePointerMove);this.sliderElement.removeEventListener("pointerup",this.handlePointerUp);this.sliderElement.removeEventListener("pointercancel",this.handlePointerCancel)}startSwipe(i,s){this.startPoint={x:i,y:s};this.isSwiping=true}componentDidRender(){this.removeEventListeners();this.addEventListeners()}endSwipe(i,s){this.isSwiping=false;const t=i-this.startPoint.x;const e=s-this.startPoint.y;this.processSwipe(t,e)}processSwipe(i,s){const t=10;if(Math.abs(i)<t||Math.abs(s)>Math.abs(i))return;const e=i<0;const r=this.isRTL?!e:e;if(r){this.goToNextSlide()}else{this.goToPrevSlide()}}goToNextSlide(){if(this.currentSlide<this.images.length-1){this.currentSlide++}}goToPrevSlide(){if(this.currentSlide>0){this.currentSlide--}}renderStars(){return Array(5).fill(null).map(((i,t)=>s("span",{key:t,innerHTML:this.review.stars>=t+1?r:a})))}renderDots(){return this.images.map((({url:i},t)=>s("button",{key:i||t,type:"button",class:`s-review-card-slider-dot ${this.currentSlide===t?"active":""}`,onClick:()=>this.goToSlide(t),"aria-label":`Go to slide ${t+1}`,onPointerDown:()=>this.goToSlide(t)})))}renderSlider(){if(!this.hasMultipleImages)return null;return s("div",{class:"s-review-card-slider-container"},s("div",{class:"s-review-card-slides",style:{transform:this.slideTransform}},this.images.map((i=>s("div",{key:i===null||i===void 0?void 0:i.id,class:"s-review-card-slider-slide"},s("img",{src:i.url,alt:i.alt||"Product image",width:275,height:275,loading:"lazy",draggable:false}))))),s("div",{class:"s-review-card-slider-dots"},this.renderDots()))}renderSingleImage(){var i,t;const e=(t=(i=this.review)===null||i===void 0?void 0:i.product)===null||t===void 0?void 0:t.image;if(!e||this.hasMultipleImages)return null;return s("img",{src:e.url,alt:e.alt||"Product image",class:"s-review-card-image",width:275,height:275,loading:"lazy",decoding:"async",draggable:false})}renderHeader(){var i,t;return s("div",{class:"s-review-card-header"},s("div",{class:"s-review-card-reviewer-name"},s("p",null,(i=this.review)===null||i===void 0?void 0:i.name),((t=this.review)===null||t===void 0?void 0:t.has_order)&&s("span",{class:"s-review-card-verified-icon",innerHTML:e})),s("div",{class:"s-review-card-stars"},this.renderStars()))}renderProductInfo(){var i,t,e,r,a;const l=(i=this.review)===null||i===void 0?void 0:i.product;if(!l)return null;return s("a",{href:(e=(t=this.review)===null||t===void 0?void 0:t.product)===null||e===void 0?void 0:e.url,class:"s-review-card-product-container"},s("img",{alt:((r=l.image)===null||r===void 0?void 0:r.alt)||"Product",src:(a=l.image)===null||a===void 0?void 0:a.url,class:"s-review-card-product-image",width:60,height:60,loading:"lazy",decoding:"async",draggable:false}),s("div",{class:"s-review-card-product-details"},s("p",{class:"s-review-card-product-details-name"},l.name),this.showPurchaseCount?s("p",{class:"s-review-card-product-details-purchase-count"},s("span",{innerHTML:n}),this.purchasedCount):null))}render(){var i;return s("div",{key:"8797bb6b8123ab8a8d4536eb990dcde15e1ddd06",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),o(),s("div",{key:"b2b3bdc4e8a63aae9103eca5274003b49d4bf19e",class:"s-review-card-content"},this.renderHeader(),s("p",{key:"0e64b3fe2ae5e59a1899515c04063f74b9828001",class:"s-review-card-review-content",innerHTML:(i=this.review)===null||i===void 0?void 0:i.content}),o(),this.renderProductInfo()))}get el(){return t(this)}};const o=i=>s("div",{class:`s-review-card-divider ${""}`});d.style=l;export{d as salla_review_card};
|
|
5
|
+
//# sourceMappingURL=p-fc788f66.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-DmPY-r_Z.system.js","sources":["src/components/salla-verify/salla-verify.scss?tag=salla-verify","src/components/salla-verify/salla-verify.tsx"],"sourcesContent":["/*\n* Verify Component: verify step in login and register and displays after the user change it's phone number.\n* You can use these classes to target the elements in the component.\n*/\n\nsalla-verify {\n display: block;\n}\n\n.s-verify {\n &-host{\n \n }\n &-message {\n\n }\n &-label {\n\n }\n &-codes {\n\n }\n &-input {\n // Hide number input arrows\n /* Chrome, Safari, Edge, Opera */\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n &[type=number] {\n -moz-appearance: textfield;\n }\n }\n &-footer {\n\n }\n &-submit {\n\n }\n &-resend-message {\n\n }\n &-timer {\n\n }\n &-resend {\n\n }\n &-back {\n \n }\n}\n","import { Component, Host, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport AndroidPhoneIcon from '../../assets/svg/android-phone.svg';\nimport MailIcon from '../../assets/svg/mail.svg';\n\n/**\n * @slot footer - Replaces the footer, by default it contains: verify button, resend, and timer\n * @slot after-footer - placeholder position\n */\n@Component({ tag: 'salla-verify', styleUrl: 'salla-verify.scss' })\n\nexport class SallaVerify {\n constructor() {\n salla.lang.onLoaded(() => {\n this.translationLoaded = true;\n this.title = salla.lang.get('pages.profile.verify_title') + salla.lang.get('common.elements.' + this.type);\n this.modal?.setTitle(this.title);\n });\n\n if (this.display == 'inline') {\n this.modal = { open: () => '', close: () => '', setTitle: () => '' };\n return;\n }\n\n //todo:: change this way, now we fire the event from the backend, we should listen to salla.profile.event.onUpdated\n salla.event.on('profile::verification', data => {\n let payload = Array.isArray(data) ? data[0] : data;\n this.isProfileVerify = true;\n this.open(payload);\n this.title = salla.lang.get('pages.profile.verify_title') + salla.lang.get('common.elements.' + payload.type);\n this.modal?.setTitle(this.title);\n });\n\n salla.event.on('modalClosed', () => {\n this.resendAfter = 0;\n this.timer.innerHTML = '30 : 00';\n });\n\n }\n\n private modal: HTMLSallaModalElement | any;\n private body: HTMLDivElement;\n private code: HTMLInputElement;\n private btn: HTMLSallaButtonElement;\n private resendMessage: HTMLParagraphElement;\n private timer: HTMLElement;\n private resend: HTMLAnchorElement;\n private otpInputs: NodeListOf<HTMLInputElement>;\n private firstOtpInput: HTMLInputElement;\n private data: { type: 'mobile' | 'email', phone?: string, country_code?: string, email?: string };\n\n @State() translationLoaded: boolean = false;\n\n @Element() host: HTMLElement;\n /**\n * Should render component without modal\n */\n @Prop() display: 'inline' | 'modal' = 'modal';\n\n /**\n * Verifying method\n */\n @Prop({ mutable: true }) type: 'mobile' | 'email' = 'mobile';\n /**\n * should auto reloading the page after success verification\n */\n @Prop() autoReload: boolean = true;\n\n /**\n * Once the api verify success, it will be login the customer in web pages\n */\n @Prop() supportWebAuth: boolean = true;\n\n /**\n * Event when success verification\n */\n @Event() verified: EventEmitter;\n\n @State() title: string;\n\n @State() resendAfter: number = 30;\n @State() hasError: boolean;\n @State() errorMessage: string;\n /**\n * to use: `salla.api.auth.verify` or `salla.profile.verify`\n */\n @State() isProfileVerify: boolean = false;\n \n private splitNumber(e: any) {\n this.resetError();\n let data = e.data || e.target.value; // Chrome doesn't get the e.data, it's always empty, fallback to value then.\n if (!data) return; // Shouldn't happen, just in case.\n if (data.length === 1) return; // Here is a normal behavior, not a paste action.\n this.modifyNext(e.target, data);\n }\n \n private modifyNext(el: HTMLInputElement, data: string) {\n el.value = data[0]; // Apply first item to first input\n data = data.substring(1); // remove the first char.\n if (el.nextElementSibling && data.length) {\n // Do the same with the next element and next data\n this.modifyNext(el.nextElementSibling as HTMLInputElement, data);\n } else if (!el.nextElementSibling && data.length === 0) {\n el.focus();\n } else if (el.nextElementSibling && data.length === 0) {\n (el.nextElementSibling as HTMLInputElement).focus();\n }\n }\n \n private checkAllInputs() {\n let allFilled = true;\n for (let i = 0; i < this.otpInputs.length; i++) {\n if (this.otpInputs[i].value === '') {\n allFilled = false;\n }\n }\n return allFilled;\n }\n\n private handleKeyUp(ev) {\n this.resetError();\n if (['Alt', 'Shift', 'Control', 'AltGraph', 'Ctrl'].includes(ev.key)) {\n return;\n }\n let key = ev.keyCode || ev.charCode;\n if (ev.target.value) {\n ev.target.nextElementSibling?.focus();\n ev.target.nextElementSibling?.select();\n } else if ([8, 46].includes(key)) {\n ev.target.previousElementSibling?.focus();\n ev.target.previousElementSibling?.select();\n }\n // If the target is populated to quickly, value length can be > 1\n if (ev.target.value.length > 1) {\n this.splitNumber(ev);\n }\n }\n\n private handlePaste(ev: ClipboardEvent) {\n this.resetError();\n const clipboardText = salla.helpers.number(ev.clipboardData.getData('text')) || '';\n let text = clipboardText.replace(/[^0-9]/g, '');\n \n text = text.substring(0, this.otpInputs.length);\n\n this.otpInputs.forEach(input => input.value = '');\n this.modifyNext(this.otpInputs[0], text);\n }\n\n private handleInput(ev) {\n this.resetError();\n salla.helpers.inputDigitsOnly(ev.target)\n // check if all otpInputs has values then send the request\n if (this.checkAllInputs()) {\n setTimeout(() => {\n this.toggleOTPSubmit();\n }, 100);\n }\n }\n\n private resetError() {\n this.hasError = false;\n this.errorMessage = '';\n }\n private handleFocus(ev) {\n // If the focus element is the first one, do nothing\n if (ev.target === this.firstOtpInput) return;\n // If value of input 1 is empty, focus it.\n if (this.firstOtpInput?.value == '') {\n this.firstOtpInput.focus();\n }\n // If value of a previous input is empty, focus it.\n // To remove if you don't wanna force user respecting the fields order.\n if (ev.target.previousElementSibling.value == '') {\n ev.target.previousElementSibling.focus();\n }\n }\n\n /**\n * Get current code\n * @return {string}\n */\n @Method()\n async getCode() {\n return this.code.value;\n }\n\n /**\n * Open verifying modal\n * @param data\n */\n @Method()\n async open(data) {\n this.data = data;\n this.data.type = this.data.type || this.type;\n this.type = this.data.type;\n this.resendTimer();\n this.otpInputs = this.body.querySelectorAll('.s-verify-input');\n this.firstOtpInput = this.body.querySelector('#otp-1');\n this.reset();\n this.resetError();\n this.display == 'modal' && this.modal?.setTitle(this.title);\n this.modal.open();\n this.firstOtpInput?.addEventListener('input', e => this.splitNumber(e));\n // focus the first input after opening the modal\n setTimeout(() => this.otpInputs[0].focus(), 100);\n }\n\n private toggleOTPSubmit() {\n let otp = []\n this.otpInputs.forEach(input => input.value && otp.push(input.value));\n\n this.code.value = otp.join('');\n\n if (otp.length === 4) {\n this.btn.disable()\n this.btn.click();\n return;\n }\n\n this.btn.enable()\n }\n\n private reset() {\n this.otpInputs.forEach((input) => input.value = '');\n this.code.value = '';\n this.otpInputs[0].focus();\n }\n\n private resendTimer() {\n this.resendMessage.style.display = 'block';\n this.resend.style.display = 'none';\n this.resendAfter = 30;\n\n let timerId = setInterval(() => {\n if (this.resendAfter <= 0) {\n clearInterval(timerId);\n this.resend.style.display = 'block';\n this.resendMessage.style.display = 'none';\n } else {\n this.timer.innerHTML = `${this.resendAfter >= 10 ? this.resendAfter : '0' + this.resendAfter} : 00`;\n this.resendAfter--;\n }\n }, 1000);\n }\n\n private resendCode() {\n return this.btn.stop()\n .then(() => this.btn.disable())\n .then(() => {\n this.otpInputs.forEach(input => input.value = '');\n this.otpInputs[0].focus();\n })\n .then(() => salla.api.auth.resend(this.data))\n .finally(() => this.resendTimer());\n }\n\n private submit() {\n //if code not 4 digits, focus on the after filled input,\n if (this.code.value.length < 4) {\n this.otpInputs[this.code.value.length].focus();\n salla.log('Trying to submit without 4 digits!');\n return;\n }\n\n let data = { code: this.code.value, ...this.data };\n\n return this.btn.load()\n .then(() => this.btn.disable())\n .then(() => this.isProfileVerify ? salla.profile.verify(data) : salla.auth.verify(data, this.supportWebAuth))\n .then(response => this.verified.emit(response))\n .then(() => this.btn.stop() && this.btn.disable())\n .then(() => this.modal.close())\n .then(() => this.autoReload && window.location.reload())\n .catch((error) => {\n this.hasError = true;\n this.errorMessage = error.response?.data?.error?.message || salla.lang.get('common.errors.error_occurred');\n if (!error.response) {\n console.log('Unexpected error', error);\n } else {\n salla.logger.error(error);\n }\n this.btn.stop() && this.btn.enable() && this.reset()\n });\n }\n\n render() {\n return this.display == 'inline' ? <Host>{this.myBody()}</Host> :\n <salla-modal width=\"xs\" class=\"s-verify\" ref={modal => this.modal = modal}\n modal-title={this.title}>\n <span slot='icon' class=\"s-verify-header-icon\" innerHTML={this.type == \"mobile\" ? AndroidPhoneIcon : MailIcon}></span>\n {this.myBody()}\n </salla-modal>;\n }\n\n\n private myBody() {\n return (\n <div class=\"s-verify-body\" ref={body => this.body = body}>\n <div class=\"s-verify-message\" innerHTML={salla.lang.get('pages.profile.verify_message')} />\n <slot name=\"mobile\" />\n <slot name=\"email\" />\n <input type=\"hidden\" name=\"code\" maxlength=\"4\" required ref={code => this.code = code} />\n <div class={{\"s-verify-codes\": true, \"has-error\": this.hasError}} dir=\"ltr\">\n {[1, 2, 3, 4].map((i) => <input type=\"number\" autocomplete=\"one-time-code\" pattern=\"[0-9]*\" inputmode=\"numeric\"\n maxlength=\"1\" value=\"\" id={`otp-${i}`} class={{\"s-verify-input\": true, \"s-has-error\": this.hasError}}\n onInput={e => this.handleInput(e)}\n onPaste={e => this.handlePaste(e)}\n onKeyUp={e => this.handleKeyUp(e)}\n onFocus={e => this.handleFocus(e)}\n required />)}\n </div>\n {this.hasError && this.errorMessage ? <span class=\"s-verify-error-message\">\n {this.errorMessage}\n </span> : ''}\n <div slot=\"footer\" class=\"s-verify-footer\">\n <salla-button class=\"s-verify-submit\" loader-position='center' disabled={true}\n onClick={() => this.submit()}\n ref={b => this.btn = b}>\n {salla.lang.get('pages.profile.verify')}\n </salla-button>\n <p class=\"s-verify-resend-message\" ref={el => this.resendMessage = el}>\n {salla.lang.get('blocks.header.resend_after')}\n <b class=\"s-verify-timer\" ref={el => this.timer = el}></b></p>\n <a href=\"#\" class=\"s-verify-resend\" onClick={() => this.resendCode()}\n ref={el => this.resend = el}>{salla.lang.get('blocks.comments.submit')}</a>\n </div>\n <slot name=\"after-footer\" />\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;MAAA,MAAM,cAAc,GAAG,4NAA4N;;YCUtO,WAAW,2BAAA,MAAA;MACtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;MAuCS,QAAA,IAAiB,CAAA,iBAAA,GAAY,KAAK;MAG3C;;MAEG;MACK,QAAA,IAAO,CAAA,OAAA,GAAuB,OAAO;MAE7C;;MAEG;MACsB,QAAA,IAAI,CAAA,IAAA,GAAuB,QAAQ;MAC5D;;MAEG;MACK,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI;MAElC;;MAEG;MACK,QAAA,IAAc,CAAA,cAAA,GAAY,IAAI;MAS7B,QAAA,IAAW,CAAA,WAAA,GAAW,EAAE;MAGjC;;MAEG;MACM,QAAA,IAAe,CAAA,eAAA,GAAY,KAAK;MAzEvC,QAAA,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAK;;MACvB,YAAA,IAAI,CAAC,iBAAiB,GAAG,IAAI;kBAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,4BAA4B,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAAC;MAC1G,YAAA,CAAA,EAAA,GAAA,IAAI,CAAC,KAAK,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,QAAQ,CAAC,IAAI,CAAC,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G,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAK,CACzE,EACN,CAAA,CAAA,MAAA,EAAA,EAAM,IAAI,EAAC,cAAc,EAAG,CAAA,CACxB;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"p-pCPxTgN4.system.js","sources":["src/components/salla-verify/salla-verify.scss?tag=salla-verify","src/components/salla-verify/salla-verify.tsx"],"sourcesContent":["/*\n* Verify Component: verify step in login and register and displays after the user change it's phone number.\n* You can use these classes to target the elements in the component.\n*/\n\nsalla-verify {\n display: block;\n}\n\n.s-verify {\n &-host{\n \n }\n &-message {\n\n }\n &-label {\n\n }\n &-codes {\n\n }\n &-input {\n // Hide number input arrows\n /* Chrome, Safari, Edge, Opera */\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n &[type=number] {\n -moz-appearance: textfield;\n }\n }\n &-footer {\n\n }\n &-submit {\n\n }\n &-resend-message {\n\n }\n &-timer {\n\n }\n &-resend {\n\n }\n &-back {\n \n }\n}\n","import { Component, Host, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport AndroidPhoneIcon from '../../assets/svg/android-phone.svg';\nimport MailIcon from '../../assets/svg/mail.svg';\n\n/**\n * @slot footer - Replaces the footer, by default it contains: verify button, resend, and timer\n * @slot after-footer - placeholder position\n */\n@Component({ tag: 'salla-verify', styleUrl: 'salla-verify.scss' })\n\nexport class SallaVerify {\n constructor() {\n salla.lang.onLoaded(() => {\n this.translationLoaded = true;\n this.title = salla.lang.get('pages.profile.verify_title') + salla.lang.get('common.elements.' + this.type);\n this.modal?.setTitle(this.title);\n });\n\n if (this.display == 'inline') {\n this.modal = { open: () => '', close: () => '', setTitle: () => '' };\n return;\n }\n\n //todo:: change this way, now we fire the event from the backend, we should listen to salla.profile.event.onUpdated\n salla.event.on('profile::verification', data => {\n let payload = Array.isArray(data) ? data[0] : data;\n this.isProfileVerify = true;\n this.open(payload);\n this.title = salla.lang.get('pages.profile.verify_title') + salla.lang.get('common.elements.' + payload.type);\n this.modal?.setTitle(this.title);\n });\n\n salla.event.on('modalClosed', () => {\n this.resendAfter = 0;\n this.timer.innerHTML = '30 : 00';\n });\n\n }\n\n private modal: HTMLSallaModalElement | any;\n private body: HTMLDivElement;\n private code: HTMLInputElement;\n private btn: HTMLSallaButtonElement;\n private resendMessage: HTMLParagraphElement;\n private timer: HTMLElement;\n private resend: HTMLAnchorElement;\n private otpInputs: NodeListOf<HTMLInputElement>;\n private firstOtpInput: HTMLInputElement;\n private data: { type: 'mobile' | 'email', phone?: string, country_code?: string, email?: string };\n\n @State() translationLoaded: boolean = false;\n\n @Element() host: HTMLElement;\n /**\n * Should render component without modal\n */\n @Prop() display: 'inline' | 'modal' = 'modal';\n\n /**\n * Verifying method\n */\n @Prop({ mutable: true }) type: 'mobile' | 'email' = 'mobile';\n /**\n * should auto reloading the page after success verification\n */\n @Prop() autoReload: boolean = true;\n\n /**\n * Once the api verify success, it will be login the customer in web pages\n */\n @Prop() supportWebAuth: boolean = true;\n\n /**\n * Event when success verification\n */\n @Event() verified: EventEmitter;\n\n @State() title: string;\n\n @State() resendAfter: number = 30;\n @State() hasError: boolean;\n @State() errorMessage: string;\n /**\n * to use: `salla.api.auth.verify` or `salla.profile.verify`\n */\n @State() isProfileVerify: boolean = false;\n \n private splitNumber(e: any) {\n this.resetError();\n let data = e.data || e.target.value; // Chrome doesn't get the e.data, it's always empty, fallback to value then.\n if (!data) return; // Shouldn't happen, just in case.\n if (data.length === 1) return; // Here is a normal behavior, not a paste action.\n this.modifyNext(e.target, data);\n }\n \n private modifyNext(el: HTMLInputElement, data: string) {\n el.value = data[0]; // Apply first item to first input\n data = data.substring(1); // remove the first char.\n if (el.nextElementSibling && data.length) {\n // Do the same with the next element and next data\n this.modifyNext(el.nextElementSibling as HTMLInputElement, data);\n } else if (!el.nextElementSibling && data.length === 0) {\n el.focus();\n } else if (el.nextElementSibling && data.length === 0) {\n (el.nextElementSibling as HTMLInputElement).focus();\n }\n }\n \n private checkAllInputs() {\n let allFilled = true;\n for (let i = 0; i < this.otpInputs.length; i++) {\n if (this.otpInputs[i].value === '') {\n allFilled = false;\n }\n }\n return allFilled;\n }\n\n private handleKeyUp(ev) {\n this.resetError();\n if (['Alt', 'Shift', 'Control', 'AltGraph', 'Ctrl'].includes(ev.key)) {\n return;\n }\n let key = ev.keyCode || ev.charCode;\n if (ev.target.value) {\n ev.target.nextElementSibling?.focus();\n ev.target.nextElementSibling?.select();\n } else if ([8, 46].includes(key)) {\n ev.target.previousElementSibling?.focus();\n ev.target.previousElementSibling?.select();\n }\n // If the target is populated to quickly, value length can be > 1\n if (ev.target.value.length > 1) {\n this.splitNumber(ev);\n }\n }\n\n private handlePaste(ev: ClipboardEvent) {\n this.resetError();\n const clipboardText = salla.helpers.number(ev.clipboardData.getData('text')) || '';\n let text = clipboardText.replace(/[^0-9]/g, '');\n \n text = text.substring(0, this.otpInputs.length);\n\n this.otpInputs.forEach(input => input.value = '');\n this.modifyNext(this.otpInputs[0], text);\n }\n\n private handleInput(ev) {\n this.resetError();\n salla.helpers.inputDigitsOnly(ev.target)\n // check if all otpInputs has values then send the request\n if (this.checkAllInputs()) {\n setTimeout(() => {\n this.toggleOTPSubmit();\n }, 100);\n }\n }\n\n private resetError() {\n this.hasError = false;\n this.errorMessage = '';\n }\n private handleFocus(ev) {\n // If the focus element is the first one, do nothing\n if (ev.target === this.firstOtpInput) return;\n // If value of input 1 is empty, focus it.\n if (this.firstOtpInput?.value == '') {\n this.firstOtpInput.focus();\n }\n // If value of a previous input is empty, focus it.\n // To remove if you don't wanna force user respecting the fields order.\n if (ev.target.previousElementSibling.value == '') {\n ev.target.previousElementSibling.focus();\n }\n }\n\n /**\n * Get current code\n * @return {string}\n */\n @Method()\n async getCode() {\n return this.code.value;\n }\n\n /**\n * Open verifying modal\n * @param data\n */\n @Method()\n async open(data) {\n this.data = data;\n this.data.type = this.data.type || this.type;\n this.type = this.data.type;\n this.resendTimer();\n this.otpInputs = this.body.querySelectorAll('.s-verify-input');\n this.firstOtpInput = this.body.querySelector('#otp-1');\n this.reset();\n this.resetError();\n this.display == 'modal' && this.modal?.setTitle(this.title);\n this.modal.open();\n this.firstOtpInput?.addEventListener('input', e => this.splitNumber(e));\n // focus the first input after opening the modal\n setTimeout(() => this.otpInputs[0].focus(), 100);\n }\n\n private toggleOTPSubmit() {\n let otp = []\n this.otpInputs.forEach(input => input.value && otp.push(input.value));\n\n this.code.value = otp.join('');\n\n if (otp.length === 4) {\n this.btn.disable()\n this.btn.click();\n return;\n }\n\n this.btn.enable()\n }\n\n private reset() {\n this.otpInputs.forEach((input) => input.value = '');\n this.code.value = '';\n this.otpInputs[0].focus();\n }\n\n private resendTimer() {\n this.resendMessage.style.display = 'block';\n this.resend.style.display = 'none';\n this.resendAfter = 30;\n\n let timerId = setInterval(() => {\n if (this.resendAfter <= 0) {\n clearInterval(timerId);\n this.resend.style.display = 'block';\n this.resendMessage.style.display = 'none';\n } else {\n this.timer.innerHTML = `${this.resendAfter >= 10 ? this.resendAfter : '0' + this.resendAfter} : 00`;\n this.resendAfter--;\n }\n }, 1000);\n }\n\n private resendCode() {\n return this.btn.stop()\n .then(() => this.btn.disable())\n .then(() => {\n this.otpInputs.forEach(input => input.value = '');\n this.otpInputs[0].focus();\n })\n .then(() => salla.api.auth.resend(this.data))\n .finally(() => this.resendTimer());\n }\n\n private submit() {\n //if code not 4 digits, focus on the after filled input,\n if (this.code.value.length < 4) {\n this.otpInputs[this.code.value.length].focus();\n salla.log('Trying to submit without 4 digits!');\n return;\n }\n\n let data = { code: this.code.value, ...this.data };\n\n return this.btn.load()\n .then(() => this.btn.disable())\n .then(() => this.isProfileVerify ? salla.profile.verify(data) : salla.auth.verify(data, this.supportWebAuth))\n .then(response => this.verified.emit(response))\n .then(() => this.btn.stop() && this.btn.disable())\n .then(() => this.modal.close())\n .then(() => this.autoReload && window.location.reload())\n .catch((error) => {\n this.hasError = true;\n this.errorMessage = error.response?.data?.error?.message || salla.lang.get('common.errors.error_occurred');\n if (!error.response) {\n console.log('Unexpected error', error);\n } else {\n salla.logger.error(error);\n }\n this.btn.stop() && this.btn.enable() && this.reset()\n });\n }\n\n render() {\n return this.display == 'inline' ? <Host>{this.myBody()}</Host> :\n <salla-modal width=\"xs\" class=\"s-verify\" ref={modal => this.modal = modal}\n modal-title={this.title}>\n <span slot='icon' class=\"s-verify-header-icon\" innerHTML={this.type == \"mobile\" ? AndroidPhoneIcon : MailIcon}></span>\n {this.myBody()}\n </salla-modal>;\n }\n\n\n private myBody() {\n return (\n <div class=\"s-verify-body\" ref={body => this.body = body}>\n <div class=\"s-verify-message\" innerHTML={salla.lang.get('pages.profile.verify_message')} />\n <slot name=\"mobile\" />\n <slot name=\"email\" />\n <input type=\"hidden\" name=\"code\" maxlength=\"4\" required ref={code => this.code = code} />\n <div class={{\"s-verify-codes\": true, \"has-error\": this.hasError}} dir=\"ltr\">\n {[1, 2, 3, 4].map((i) => <input type=\"number\" autocomplete=\"one-time-code\" pattern=\"[0-9]*\" inputmode=\"numeric\"\n maxlength=\"1\" value=\"\" id={`otp-${i}`} class={{\"s-verify-input\": true, \"s-has-error\": this.hasError}}\n onInput={e => this.handleInput(e)}\n onPaste={e => this.handlePaste(e)}\n onKeyUp={e => this.handleKeyUp(e)}\n onFocus={e => this.handleFocus(e)}\n required />)}\n </div>\n {this.hasError && this.errorMessage ? <span class=\"s-verify-error-message\">\n {this.errorMessage}\n </span> : ''}\n <div slot=\"footer\" class=\"s-verify-footer\">\n <salla-button class=\"s-verify-submit\" loader-position='center' disabled={true}\n onClick={() => this.submit()}\n ref={b => this.btn = b}>\n {salla.lang.get('pages.profile.verify')}\n </salla-button>\n <p class=\"s-verify-resend-message\" ref={el => this.resendMessage = el}>\n {salla.lang.get('blocks.header.resend_after')}\n <b class=\"s-verify-timer\" ref={el => this.timer = el}></b></p>\n <a href=\"#\" class=\"s-verify-resend\" onClick={() => this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.js","sources":["src/components/salla-filters/salla-filters.scss?tag=salla-filters","src/components/salla-filters/salla-filters.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.s-rating-stars-small {\n line-height: 12px;\n}\n.s-filters-radio{\n background-image: none !important;\n}","import { Component, Element, h, Event, EventEmitter, Host, Method, Prop, State } from '@stencil/core';\nimport { Filter, FilterOptionTypes } from \"./interfaces\";\nimport Helper from '../../Helpers/Helper';\n@Component({\n tag: 'salla-filters',\n styleUrl: 'salla-filters.scss',\n})\nexport class SallaFilters {\n\n constructor() {\n salla.event.on('filters::hidden', () => this.host.style.display = 'none');\n\n salla.lang.onLoaded(() => {\n this.apply = salla.lang.get('pages.checkout.apply');\n this.reset = salla.lang.get('pages.categories.filters_reset');\n });\n\n salla.event.on('filters::fetched', ({ filters }) => {\n this.host.style.display = '';\n let freshFilterData: any = {};\n this.filters = filters\n .map((filter: Filter) => {\n filter.label = {\n category_id: salla.lang.get('common.titles.categories'),\n brand_id: salla.lang.get('common.titles.brands'),\n rating: salla.lang.get('pages.categories.filter_rating'),\n price: salla.lang.get('pages.categories.filter_price'),\n }[filter.key] || filter.label;\n // filter.type = FilterOptionTypes.VALUES;\n if (filter.key == 'rating') {\n filter.type = FilterOptionTypes.VALUES;\n //@ts-ignore\n let { max, min } = filter.values;\n //@ts-ignore\n filter.values = [5, 4, 3, 2, 1].filter(stars => stars >= min || stars <= max)\n }\n if (this.filtersData.variants && filter.type == FilterOptionTypes.VARIANTS) {\n freshFilterData.variants = this.filtersData.variants;\n }\n if (this.filtersData[filter.key] && filter.type !== FilterOptionTypes.VARIANTS) {\n freshFilterData[filter.key] = this.filtersData[filter.key];\n }\n let searchParams = new URLSearchParams(window.location.search);\n let hasFilters = false;\n for (let key of searchParams.keys()) {\n if (key.includes('filters')) {\n hasFilters = true;\n break; // No need to continue checking once a match is found\n }\n }\n if (salla.config.get('page.slug') == \"product.index\" && Object.keys(freshFilterData).length == 0 && !hasFilters) {\n // Append the current category to the url if there are no pre-selected filters\n let currentUrl = window.location.href;\n let filterValue = salla.config.get('page.id');\n let separator = currentUrl.indexOf('?') !== -1 ? '&' : '?';\n let newUrl = currentUrl + separator + 'filters[category_id]=' + filterValue;\n freshFilterData.category_id = filterValue;\n window.history.pushState({ path: newUrl }, '', newUrl);\n }\n return filter;\n });\n this.filtersData = freshFilterData;\n this.host.childNodes.forEach(async (widget: HTMLSallaFiltersWidgetElement) => widget.setWidgetHeight && await widget.setWidgetHeight())\n });\n }\n\n async componentWillLoad() {\n try {\n const searchParams = new URLSearchParams(window.location.search);\n this.filtersData = await Helper.extractFiltersFromUrl(searchParams);\n } catch (e) {\n console.warn('failed to get filters from URL', e.message);\n }\n }\n\n\n @Element() host: HTMLElement;\n\n /**\n * Array of filter options\n */\n @Prop({ reflect: true, mutable: true }) filters?: Filter[];\n\n private isReady = false;//to avoid triggering the changed event\n\n @State() isSidebarOpen: boolean;\n @State() filtersData: object | any = {}\n @State() apply: string;\n @State() reset: string;\n\n /**\n * Custom event fired when the selected filters are changed.\n */\n @Event() changed: EventEmitter;\n\n /**\n * Method to get filter data.\n */\n @Method()\n async getFilters() {\n return this.filtersData;\n }\n\n /**\n * Apply filter action.\n */\n @Method()\n async applyFilters() {\n if (!this.isReady) {\n return;\n }\n let hasFilters = Object.keys(this.filtersData).length > 0;\n setTimeout(() => {\n if (hasFilters) {\n let url = new URL(window.location.href);\n for (const [key] of url.searchParams.entries()) {\n if (key.startsWith(\"filters\")) {\n url.searchParams.delete(key);\n }\n }\n let encodedFilterValues = this.encodeFilters(this.filtersData)\n let sanitizedFilterValues = url.search.split(\"&\").filter(item => !item.includes('filters')).join(\"&\")\n if (sanitizedFilterValues) {\n url.search = url.search.split(\"&filters\")[0] + \"&\" + encodedFilterValues\n } else {\n url.search = `?${encodedFilterValues}`\n }\n window.history.pushState({}, '', url.href);\n }\n else {\n let url = new URL(window.location.href);\n url.searchParams?.delete('filters');\n window.history.pushState({}, '', url.toString());\n }\n salla.event.emit('salla-filters::changed', this.filtersData);\n this.changed.emit(this.filtersData);\n }, 300);\n }\n\n\n private encodeFilters(filters, parentKey = 'filters') {\n const encodedFilters = [];\n\n for (const key in filters) {\n if (Object.prototype.hasOwnProperty.call(filters, key)) {\n const value = filters[key];\n\n const fullKey = parentKey ? `${parentKey}[${key}]` : key;\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n encodedFilters.push(`${fullKey}[${i}]=${value[i]}`)\n }\n }\n else if (typeof value === 'object' && value !== null) {\n encodedFilters.push(this.encodeFilters(value, fullKey));\n } else {\n // const encodedKey = encodeURIComponent(fullKey);\n // const encodedValue = encodeURIComponent(value);\n let result = `${fullKey}=${value}`\n encodedFilters.push(result);\n }\n }\n }\n return encodedFilters.join('&');\n };\n\n /**\n * Reset selected filters.\n */\n @Method()\n async resetFilters() {\n this.removeFiltersQueryParams()\n this.filtersData = {};\n this.host.childNodes.forEach((widget: HTMLSallaFiltersWidgetElement) => widget.reset && widget.reset())\n salla.event.emit('salla-filters::reset');\n return this.applyFilters();\n }\n\n private removeFiltersQueryParams() {\n const searchParams = new URLSearchParams(window.location.search);\n\n const newUrl = Array.from(searchParams.keys())\n .filter(key => !key.startsWith('filters['))\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(searchParams.get(key))}`)\n .join('&');\n\n const finalUrl = newUrl ? `${window.location.pathname}?${newUrl}` : window.location.pathname;\n window.history.pushState({}, '', finalUrl);\n }\n\n /**\n * @param {{target:HTMLInputElement}} event\n * @param option\n * @param value\n * @private\n */\n private handleOptionChange(event, option: Filter, value) {\n if (option.type === FilterOptionTypes.RANGE) {\n this.filtersData[option.key] = value;\n\n }\n let isChecked = event.target.checked;\n\n if (option.type === FilterOptionTypes.VARIANTS) {\n this.filtersData.variants = this.filtersData.variants || {};\n isChecked && (this.filtersData.variants[option.key] = value);\n isChecked || (delete this.filtersData.variants[option.key]);\n }\n\n else if (event.target.type == \"radio\") {\n isChecked && (this.filtersData[option.key] = value);\n isChecked || (delete this.filtersData[option.key]);\n }\n\n //it's checkbox\n // add if condition to avoid error when the filter is not existed in the filtersData\n else if (event.target.type == \"checkbox\") {\n this.filtersData[option.key] = this.filtersData[option.key] || [];\n if (isChecked) {\n this.filtersData[option.key].push(value);\n\n }\n this.filtersData[option.key] = this.filtersData[option.key].filter(val => val != value);\n }\n this.applyFilters();\n }\n\n\n\n render() {\n return <Host>\n {this.filters?.map(option => <salla-filters-widget\n option={option}\n filtersData={this.filtersData}\n onChanged={({ detail: { event, option, value } }) => {\n this.handleOptionChange(event, option, value)\n }} />)}\n\n {this.filters?.length ? <div class=\"s-filters-footer\">\n {/* <salla-button color='primary' onClick={() => this.applyFilters()}>{this.apply}</salla-button> */}\n <salla-button color='gray' fill='outline' onClick={() => this.resetFilters()}>{this.reset}</salla-button>\n </div> : ''}\n </Host>;\n }\n\n componentDidLoad() {\n this.isReady = true;\n }\n}\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MAAA,MAAM,eAAe,GAAG,+GAA+G;;YCO1H,YAAY,4BAAA,MAAA;MAEvB,IAAA,WAAA,CAAA,OAAA,EAAA;;;MA0EQ,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC;MAGf,QAAA,IAAW,CAAA,WAAA,GAAiB,EAAE;cA5ErC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,iBAAiB,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;MAEzE,QAAA,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAK;kBACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,sBAAsB,CAAC;kBACnD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gCAAgC,CAAC;MAC/D,SAAC,CAAC;MAEF,QAAA,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,kBAAkB,EAAE,CAAC,EAAE,OAAO,EAAE,KAAI;k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AAG,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,kBAAkB,EAAA,EAEnD,CAAA,CAAA,cAAA,EAAA,EAAc,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAA,EAAG,IAAI,CAAC,KAAK,CAAgB,CACrG,GAAG,EAAE,CACN;;UAGT,gBAAgB,GAAA;MACd,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"p-uwvO2G-i.system.js","sources":["src/components/salla-filters/salla-filters.scss?tag=salla-filters","src/components/salla-filters/salla-filters.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.s-rating-stars-small {\n line-height: 12px;\n}\n.s-filters-radio{\n background-image: none !important;\n}","import { Component, Element, h, Event, EventEmitter, Host, Method, Prop, State } from '@stencil/core';\nimport { Filter, FilterOptionTypes } from \"./interfaces\";\nimport Helper from '../../Helpers/Helper';\n@Component({\n tag: 'salla-filters',\n styleUrl: 'salla-filters.scss',\n})\nexport class SallaFilters {\n\n constructor() {\n salla.event.on('filters::hidden', () => this.host.style.display = 'none');\n\n salla.lang.onLoaded(() => {\n this.apply = salla.lang.get('pages.checkout.apply');\n this.reset = salla.lang.get('pages.categories.filters_reset');\n });\n\n salla.event.on('filters::fetched', ({ filters }) => {\n this.host.style.display = '';\n let freshFilterData: any = {};\n this.filters = filters\n .map((filter: Filter) => {\n filter.label = {\n category_id: salla.lang.get('common.titles.categories'),\n brand_id: salla.lang.get('common.titles.brands'),\n rating: salla.lang.get('pages.categories.filter_rating'),\n price: salla.lang.get('pages.categories.filter_price'),\n }[filter.key] || filter.label;\n // filter.type = FilterOptionTypes.VALUES;\n if (filter.key == 'rating') {\n filter.type = FilterOptionTypes.VALUES;\n //@ts-ignore\n let { max, min } = filter.values;\n //@ts-ignore\n filter.values = [5, 4, 3, 2, 1].filter(stars => stars >= min || stars <= max)\n }\n if (this.filtersData.variants && filter.type == FilterOptionTypes.VARIANTS) {\n freshFilterData.variants = this.filtersData.variants;\n }\n if (this.filtersData[filter.key] && filter.type !== FilterOptionTypes.VARIANTS) {\n freshFilterData[filter.key] = this.filtersData[filter.key];\n }\n let searchParams = new URLSearchParams(window.location.search);\n let hasFilters = false;\n for (let key of searchParams.keys()) {\n if (key.includes('filters')) {\n hasFilters = true;\n break; // No need to continue checking once a match is found\n }\n }\n if (salla.config.get('page.slug') == \"product.index\" && Object.keys(freshFilterData).length == 0 && !hasFilters) {\n // Append the current category to the url if there are no pre-selected filters\n let currentUrl = window.location.href;\n let filterValue = salla.config.get('page.id');\n let separator = currentUrl.indexOf('?') !== -1 ? '&' : '?';\n let newUrl = currentUrl + separator + 'filters[category_id]=' + filterValue;\n freshFilterData.category_id = filterValue;\n window.history.pushState({ path: newUrl }, '', newUrl);\n }\n return filter;\n });\n this.filtersData = freshFilterData;\n this.host.childNodes.forEach(async (widget: HTMLSallaFiltersWidgetElement) => widget.setWidgetHeight && await widget.setWidgetHeight())\n });\n }\n\n async componentWillLoad() {\n try {\n const searchParams = new URLSearchParams(window.location.search);\n this.filtersData = await Helper.extractFiltersFromUrl(searchParams);\n } catch (e) {\n console.warn('failed to get filters from URL', e.message);\n }\n }\n\n\n @Element() host: HTMLElement;\n\n /**\n * Array of filter options\n */\n @Prop({ reflect: true, mutable: true }) filters?: Filter[];\n\n private isReady = false;//to avoid triggering the changed event\n\n @State() isSidebarOpen: boolean;\n @State() filtersData: object | any = {}\n @State() apply: string;\n @State() reset: string;\n\n /**\n * Custom event fired when the selected filters are changed.\n */\n @Event() changed: EventEmitter;\n\n /**\n * Method to get filter data.\n */\n @Method()\n async getFilters() {\n return this.filtersData;\n }\n\n /**\n * Apply filter action.\n */\n @Method()\n async applyFilters() {\n if (!this.isReady) {\n return;\n }\n let hasFilters = Object.keys(this.filtersData).length > 0;\n setTimeout(() => {\n if (hasFilters) {\n let url = new URL(window.location.href);\n for (const [key] of url.searchParams.entries()) {\n if (key.startsWith(\"filters\")) {\n url.searchParams.delete(key);\n }\n }\n let encodedFilterValues = this.encodeFilters(this.filtersData)\n let sanitizedFilterValues = url.search.split(\"&\").filter(item => !item.includes('filters')).join(\"&\")\n if (sanitizedFilterValues) {\n url.search = url.search.split(\"&filters\")[0] + \"&\" + encodedFilterValues\n } else {\n url.search = `?${encodedFilterValues}`\n }\n window.history.pushState({}, '', url.href);\n }\n else {\n let url = new URL(window.location.href);\n url.searchParams?.delete('filters');\n window.history.pushState({}, '', url.toString());\n }\n salla.event.emit('salla-filters::changed', this.filtersData);\n this.changed.emit(this.filtersData);\n }, 300);\n }\n\n\n private encodeFilters(filters, parentKey = 'filters') {\n const encodedFilters = [];\n\n for (const key in filters) {\n if (Object.prototype.hasOwnProperty.call(filters, key)) {\n const value = filters[key];\n\n const fullKey = parentKey ? `${parentKey}[${key}]` : key;\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n encodedFilters.push(`${fullKey}[${i}]=${value[i]}`)\n }\n }\n else if (typeof value === 'object' && value !== null) {\n encodedFilters.push(this.encodeFilters(value, fullKey));\n } else {\n // const encodedKey = encodeURIComponent(fullKey);\n // const encodedValue = encodeURIComponent(value);\n let result = `${fullKey}=${value}`\n encodedFilters.push(result);\n }\n }\n }\n return encodedFilters.join('&');\n };\n\n /**\n * Reset selected filters.\n */\n @Method()\n async resetFilters() {\n this.removeFiltersQueryParams()\n this.filtersData = {};\n this.host.childNodes.forEach((widget: HTMLSallaFiltersWidgetElement) => widget.reset && widget.reset())\n salla.event.emit('salla-filters::reset');\n return this.applyFilters();\n }\n\n private removeFiltersQueryParams() {\n const searchParams = new URLSearchParams(window.location.search);\n\n const newUrl = Array.from(searchParams.keys())\n .filter(key => !key.startsWith('filters['))\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(searchParams.get(key))}`)\n .join('&');\n\n const finalUrl = newUrl ? `${window.location.pathname}?${newUrl}` : window.location.pathname;\n window.history.pushState({}, '', finalUrl);\n }\n\n /**\n * @param {{target:HTMLInputElement}} event\n * @param option\n * @param value\n * @private\n */\n private handleOptionChange(event, option: Filter, value) {\n if (option.type === FilterOptionTypes.RANGE) {\n this.filtersData[option.key] = value;\n\n }\n let isChecked = event.target.checked;\n\n if (option.type === FilterOptionTypes.VARIANTS) {\n this.filtersData.variants = this.filtersData.variants || {};\n isChecked && (this.filtersData.variants[option.key] = value);\n isChecked || (delete this.filtersData.variants[option.key]);\n }\n\n else if (event.target.type == \"radio\") {\n isChecked && (this.filtersData[option.key] = value);\n isChecked || (delete this.filtersData[option.key]);\n }\n\n //it's checkbox\n // add if condition to avoid error when the filter is not existed in the filtersData\n else if (event.target.type == \"checkbox\") {\n this.filtersData[option.key] = this.filtersData[option.key] || [];\n if (isChecked) {\n this.filtersData[option.key].push(value);\n\n }\n this.filtersData[option.key] = this.filtersData[option.key].filter(val => val != value);\n }\n this.applyFilters();\n }\n\n\n\n render() {\n return <Host>\n {this.filters?.map(option => <salla-filters-widget\n option={option}\n filtersData={this.filtersData}\n onChanged={({ detail: { event, option, value } }) => {\n this.handleOptionChange(event, option, value)\n }} />)}\n\n {this.filters?.length ? <div class=\"s-filters-footer\">\n {/* <salla-button color='primary' onClick={() => this.applyFilters()}>{this.apply}</salla-button> */}\n <salla-button color='gray' fill='outline' onClick={() => this.resetFilters()}>{this.reset}</salla-button>\n </div> : ''}\n </Host>;\n }\n\n componentDidLoad() {\n this.isReady = true;\n }\n}\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MAAA,MAAM,eAAe,GAAG,+GAA+G;;YCO1H,YAAY,4BAAA,MAAA;MAEvB,IAAA,WAAA,CAAA,OAAA,EAAA;;;MA0EQ,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC;MAGf,QAAA,IAAW,CAAA,WAAA,GAAiB,EAAE;cA5ErC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,iBAAiB,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,KA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AAM,EAAE,MAAM,EACd,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,KAAI;0BAClD,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC;MAC/C,iBAAC,GAAI,CAAC,EAEP,CAAA,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,MAAM,IAAG,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,kBAAkB,EAAA,EAEnD,CAAA,CAAA,cAAA,EAAA,EAAc,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAA,EAAG,IAAI,CAAC,KAAK,CAAgB,CACrG,GAAG,EAAE,CACN;;UAGT,gBAAgB,GAAA;MACd,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-iySJ93Xi.system.js","sources":["src/components/salla-loyalty-program/salla-loyalty-program.scss?tag=salla-loyalty-program","src/components/salla-loyalty-program/salla-loyalty-program.tsx"],"sourcesContent":["","import { Component, Host, h, State } from '@stencil/core';\nimport { LoyaltyItem } from './interfaces';\nimport GiftIcon from '../../assets/svg/gift.svg';\n\nconst formatDate = (timestamp?: number | string) => {\n if (!timestamp) return '';\n return new Date(Number(timestamp)).toLocaleDateString(salla.lang.locale, {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: 'numeric',\n });\n};\n\nconst translateKey = (key?: string) => {\n if (!key) return '';\n try {\n const k = key.toLowerCase();\n const translation = salla.lang.get(`pages.loyalty_program.${k}`);\n return translation === `pages.loyalty_program.${k}` ? key : translation;\n } catch {\n return key;\n }\n};\n\n@Component({\n tag: 'salla-loyalty-program',\n styleUrl: 'salla-loyalty-program.scss',\n})\nexport class SallaWalletTable {\n @State() loyaltyPointsArray: Array<LoyaltyItem> = [];\n @State() isLoadingLoyalty: boolean = false;\n @State() nextPageUrlLoyalty: string = '';\n\n componentWillLoad() {\n return salla.onReady().then(() => {\n this.loadLoyaltyPoints();\n });\n }\n\n private handleClick = () => {\n this.loadMoreLoyaltyPoints();\n };\n\n private async loadLoyaltyPoints() {\n this.isLoadingLoyalty = true;\n try {\n let url = `/balance/points?page=1`;\n let resp = await salla.api.request(url);\n \n this.loyaltyPointsArray = resp.data;\n this.nextPageUrlLoyalty = resp.cursor.next; \n \n } catch (error) {\n console.error('Error loading loyalty points transactions', error);\n } finally {\n this.isLoadingLoyalty = false;\n }\n }\n\n private async loadMoreLoyaltyPoints() {\n if (!this.nextPageUrlLoyalty) return;\n this.isLoadingLoyalty = true;\n try {\n let resp = await salla.api.request(this.nextPageUrlLoyalty);\n \n this.loyaltyPointsArray = [...this.loyaltyPointsArray, ...resp.data]; \n this.nextPageUrlLoyalty = resp.cursor?.next || '';\n \n } catch (error) {\n console.error('Error loading more loyalty points', error);\n } finally {\n this.isLoadingLoyalty = false;\n }\n }\n\n render() {\n return (\n <Host>\n <div>\n {this.isLoadingLoyalty ? (\n <salla-loading></salla-loading>\n ) : (\n <div>\n {this.loyaltyPointsArray.length > 0 ? (\n <div>\n <table class=\"s-loyalty-program-table\">\n <thead class=\"s-loyalty-program-table-head\">\n <tr class=\"s-loyalty-program-table-head-tr\">\n <th scope=\"col\" class=\"s-loyalty-program-table-head-tr-th\">{salla.lang.get('pages.wallet.points')}</th>\n <th scope=\"col\" class=\"s-loyalty-program-table-head-tr-th\">{salla.lang.get('pages.wallet.date')}</th>\n <th scope=\"col\" class=\"s-loyalty-program-table-head-tr-th\">{salla.lang.get('pages.wallet.expiry_date')}</th>\n <th scope=\"col\" class=\"s-loyalty-program-table-head-tr-th\">{salla.lang.get('common.elements.note')}</th>\n <th scope=\"col\" class=\"s-loyalty-program-table-head-tr-th\">{salla.lang.get('common.elements.status')}</th>\n </tr>\n </thead>\n <tbody class=\"s-loyalty-program-table-tbody\">\n {this.loyaltyPointsArray.map(point => (\n <tr class=\"s-loyalty-program-table-tbody-tr\">\n <td class=\"s-loyalty-program-table-tbody-tr-td\">\n {point?.type === 'plus' ? '+' : ''}\n {point?.points || ''} {salla.lang.get('pages.loyalty_program.point')}\n </td>\n <td class=\"s-loyalty-program-table-tbody-tr-td\">\n {formatDate(point?.created_at ? Number(point.created_at) * 1000 : undefined)}\n </td>\n <td class=\"s-loyalty-program-table-tbody-tr-td\">\n {formatDate(point?.points_expire_date)}\n </td>\n <td class=\"s-loyalty-program-table-tbody-tr-td\">\n {translateKey(point?.key)}\n </td>\n <td class=\"s-loyalty-program-table-tbody-tr-td\">\n {translateKey(point?.status_key)}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n <div class=\"s-infinite-scroll-wrapper\">\n {!!this.nextPageUrlLoyalty && (\n <salla-button onClick={this.handleClick} loading={this.isLoadingLoyalty}>\n {salla.lang.get('common.elements.load_more')}\n </salla-button>\n )}\n </div>\n </div>\n ) : (\n <div>\n <div class=\"s-loyalty-program-table-empty-state\">\n <span innerHTML={GiftIcon}></span>\n <div class=\"s-loyalty-program-table-placeholder-title\">\n {salla.lang.get('pages.loyalty_program.no_loyality_points_title')}\n </div>\n <div class=\"s-loyalty-program-table-placeholder-sub-title\">\n {salla.lang.get('pages.loyalty_program.no_loyality_points_sub_title')}\n </div>\n </div>\n </div>\n )}\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;YAAA,MAAM,sBAAsB,GAAG,EAAE;;YCIjC,MAAM,UAAU,GAAG,CAAC,SAA2B,KAAI;YACjD,IAAA,IAAI,CAAC,SAAS;YAAE,QAAA,OAAO,EAAE;YACzB,IAAA,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CA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AE,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,gBAAgB,EACpE,EAAA,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAC/B,CAChB,CACG,CACF,KAEN,CAAA,CAAA,KAAA,EAAA,IAAA,EACE,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,qCAAqC,EAAA,EAC9C,CAAM,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,QAAQ,EAAS,CAAA,EAClC,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,2CAA2C,EAAA,EACnD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAC7D,EACN,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,+CAA+C,EAAA,EACvD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oDAAoD,CAAC,CACjE,CACF,CACF,CACP,CACG,CACP,CACG,CACD;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"p-zJ65Et2a.system.js","sources":["src/components/salla-loyalty-program/salla-loyalty-program.scss?tag=salla-loyalty-program","src/components/salla-loyalty-program/salla-loyalty-program.tsx"],"sourcesContent":["","import { Component, Host, h, State } from '@stencil/core';\nimport { LoyaltyItem } from './interfaces';\nimport GiftIcon from '../../assets/svg/gift.svg';\n\nconst formatDate = (timestamp?: number | string) => {\n if (!timestamp) return '';\n return new Date(Number(timestamp)).toLocaleDateString(salla.lang.locale, {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: 'numeric',\n });\n};\n\nconst translateKey = (key?: string) => {\n if (!key) return '';\n try {\n const k = key.toLowerCase();\n const translation = salla.lang.get(`pages.loyalty_program.${k}`);\n return translation === `pages.loyalty_program.${k}` ? key : translation;\n } catch {\n return key;\n }\n};\n\n@Component({\n tag: 'salla-loyalty-program',\n styleUrl: 'salla-loyalty-program.scss',\n})\nexport class SallaWalletTable {\n @State() loyaltyPointsArray: Array<LoyaltyItem> = [];\n @State() isLoadingLoyalty: boolean = false;\n @State() nextPageUrlLoyalty: string = '';\n\n componentWillLoad() {\n return salla.onReady().then(() => {\n this.loadLoyaltyPoints();\n });\n }\n\n private handleClick = () => {\n this.loadMoreLoyaltyPoints();\n };\n\n private async loadLoyaltyPoints() {\n this.isLoadingLoyalty = true;\n try {\n let url = `/balance/points?page=1`;\n let resp = await salla.api.request(url);\n \n this.loyaltyPointsArray = resp.data;\n this.nextPageUrlLoyalty = resp.cursor.next; \n \n } catch (error) {\n console.error('Error loading loyalty points transactions', error);\n } finally {\n this.isLoadingLoyalty = false;\n }\n }\n\n private async loadMoreLoyaltyPoints() {\n if (!this.nextPageUrlLoyalty) return;\n this.isLoadingLoyalty = true;\n try {\n let resp = await salla.api.request(this.nextPageUrlLoyalty);\n \n this.loyaltyPointsArray = [...this.loyaltyPointsArray, ...resp.data]; \n this.nextPageUrlLoyalty = resp.cursor?.next || '';\n \n } catch (error) {\n console.error('Error loading more loyalty points', error);\n } finally {\n this.isLoadingLoyalty = false;\n }\n }\n\n render() {\n return (\n <Host>\n <div>\n {this.isLoadingLoyalty ? (\n <salla-loading></salla-loading>\n ) : (\n <div>\n {this.loyaltyPointsArray.length > 0 ? (\n <div>\n <table class=\"s-loyalty-program-table\">\n <thead class=\"s-loyalty-program-table-head\">\n <tr class=\"s-loyalty-program-table-head-tr\">\n <th scope=\"col\" class=\"s-loyalty-program-table-head-tr-th\">{salla.lang.get('pages.wallet.points')}</th>\n <th scope=\"col\" class=\"s-loyalty-program-table-head-tr-th\">{salla.lang.get('pages.wallet.date')}</th>\n <th scope=\"col\" class=\"s-loyalty-program-table-head-tr-th\">{salla.lang.get('pages.wallet.expiry_date')}</th>\n <th scope=\"col\" class=\"s-loyalty-program-table-head-tr-th\">{salla.lang.get('common.elements.note')}</th>\n <th scope=\"col\" class=\"s-loyalty-program-table-head-tr-th\">{salla.lang.get('common.elements.status')}</th>\n </tr>\n </thead>\n <tbody class=\"s-loyalty-program-table-tbody\">\n {this.loyaltyPointsArray.map(point => (\n <tr class=\"s-loyalty-program-table-tbody-tr\">\n <td class=\"s-loyalty-program-table-tbody-tr-td\">\n {point?.type === 'plus' ? '+' : ''}\n {point?.points || ''} {salla.lang.get('pages.loyalty_program.point')}\n </td>\n <td class=\"s-loyalty-program-table-tbody-tr-td\">\n {formatDate(point?.created_at ? Number(point.created_at) * 1000 : undefined)}\n </td>\n <td class=\"s-loyalty-program-table-tbody-tr-td\">\n {formatDate(point?.points_expire_date)}\n </td>\n <td class=\"s-loyalty-program-table-tbody-tr-td\">\n {translateKey(point?.key)}\n </td>\n <td class=\"s-loyalty-program-table-tbody-tr-td\">\n {translateKey(point?.status_key)}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n <div class=\"s-infinite-scroll-wrapper\">\n {!!this.nextPageUrlLoyalty && (\n <salla-button onClick={this.handleClick} loading={this.isLoadingLoyalty}>\n {salla.lang.get('common.elements.load_more')}\n </salla-button>\n )}\n </div>\n </div>\n ) : (\n <div>\n <div class=\"s-loyalty-program-table-empty-state\">\n <span innerHTML={GiftIcon}></span>\n <div class=\"s-loyalty-program-table-placeholder-title\">\n {salla.lang.get('pages.loyalty_program.no_loyality_points_title')}\n </div>\n <div class=\"s-loyalty-program-table-placeholder-sub-title\">\n {salla.lang.get('pages.loyalty_program.no_loyality_points_sub_title')}\n </div>\n </div>\n </div>\n )}\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;YAAA,MAAM,sBAAsB,GAAG,EAAE;;YCIjC,MAAM,UAAU,GAAG,CAAC,SAA2B,KAAI;YACjD,IAAA,IAAI,CAAC,SAAS;YAAE,QAAA,OAAO,EAAE;YACzB,IAAA,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE;YACvE,QAAA,OAAO,EAAE,MAAM;YACf,QAAA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C,2BAA2B,CAAC,CAC/B,CAChB,CACG,CACF,KAEN,CAAA,CAAA,KAAA,EAAA,IAAA,EACE,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,qCAAqC,EAAA,EAC9C,CAAM,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,QAAQ,EAAS,CAAA,EAClC,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,2CAA2C,EAAA,EACnD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAC7D,EACN,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,+CAA+C,EAAA,EACvD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oDAAoD,CAAC,CACjE,CACF,CACF,CACP,CACG,CACP,CACG,CACD;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{p as e,b as a}from"./p-9b729OAn.js";export{s as setNonce}from"./p-9b729OAn.js";import{g as t}from"./p-C2GBlfF7.js";var l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((async e=>{await t();return a(JSON.parse('[["p-9d9532b8",[[0,"salla-offer",{"productCardComponent":[1,"product-card-component"],"offersList":[32],"userCurrency":[32],"isMultipleBank":[32],"title":[32],"currentPage":[32],"hasCustomComponent":[32],"isBankOffer":[32],"canRender":[32],"showOffer":[32],"offer_with_price_text":[32],"with_discount_text":[32],"product_discount_text":[32],"special_offer_text":[32],"multipleBankOfferTitleText":[32],"multipleBankOfferTitleDescription":[32],"buy_quantity_text":[32]}]]],["p-4f0e3200",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"hideOutLabel":[1,"hide-out-label"],"uniqueKey":[1,"unique-key"],"config":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32],"selectDonationAmount":[32],"selectAmount":[32],"isCustomDonation":[32],"selectedOptions":[32],"canDisabled":[32],"selectedSkus":[32],"selectedOutSkus":[32],"disableCardValue":[32],"availableDigitalCardValues":[32],"setOptionsData":[64],"getSelectedOptionsData":[64],"reportValidity":[64],"hasOutOfStockOption":[64],"getSelectedOptions":[64],"getOption":[64]}]]],["p-2cc79952",[[0,"salla-filters",{"filters":[1040],"isSidebarOpen":[32],"filtersData":[32],"apply":[32],"reset":[32],"getFilters":[64],"applyFilters":[64],"resetFilters":[64]}]]],["p-17139edc",[[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"hasError":[32],"errorMessage":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["p-8d2b2e83",[[0,"salla-loyalty-program",{"loyaltyPointsArray":[32],"isLoadingLoyalty":[32],"nextPageUrlLoyalty":[32]}]]],["p-4823dd50",[[0,"salla-notifications",{"loadMoreText":[1,"load-more-text"],"itemPerPage":[2,"item-per-page"],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"no_notifications_trans":[32],"load_more_text_trans":[32]}]]],["p-c5e96aa9",[[0,"salla-order-summary",{"orderId":[514,"order-id"],"codeCopied":[32],"noItemFound":[32],"order_items":[32]}]]],["p-d866b4b3",[[0,"salla-reviews",{"displayAllLink":[516,"display-all-link"],"source":[513],"sourceValue":[513,"source-value"],"limit":[514],"type":[1],"sort":[1],"hideCustomerInfo":[4,"hide-customer-info"],"reviews":[32],"isRTL":[32],"showReviews":[32],"testimonialText":[32],"displayAllLinkText":[32]}]]],["p-b0cce2cc",[[0,"salla-reviews-page",{"reviews":[32],"isLoading":[32],"pagination":[32],"sort":[32]}]]],["p-4825d388",[[0,"salla-wallet",{"transactionsArray":[32],"balance":[32],"isLoading":[32],"nextPageUrl":[32]}]]],["p-d147530e",[[0,"salla-conditional-offer",{"offer":[32],"products":[32],"isLoading":[32],"canRender":[32]}]]],["p-5d7eff34",[[0,"salla-orders",{"params":[16],"loadMoreText":[1,"load-more-text"],"orderNumberText":[32],"totalOrderText":[32],"orderDateText":[32],"orderStatusText":[32],"noOrderText":[32],"load_more_text_trans":[32],"languageCode":[32],"orders":[32],"pagination":[32],"hasInfiniteScroll":[32],"total":[32],"nextPage":[32],"showPlaceholder":[32]}]]],["p-44f0aa72",[[0,"salla-tiered-offer",{"tieredOfferData":[32],"apiOfferData":[32],"currentTierIndex":[32],"currentTier":[32],"activeTabTier":[32],"canRender":[32],"isLoading":[32],"loyaltyProgramText":[32],"currentTierText":[32],"discountText":[32],"benefitText":[32]}]]],["p-758231d6",[[4,"salla-accordion",{"collapsible":[4],"collapsed":[1540],"dir":[32]},[[4,"salla::language.change","directionChangedHandler"],[0,"accordionToggle","handleCollapse"]]]]],["p-6b9aa749",[[4,"salla-accordion-body"]]],["p-377aa6d4",[[4,"salla-accordion-head",{"collapsible":[4],"collapsed":[1540]}]]],["p-5c4735d4",[[0,"salla-advertisement",{"position":[32],"advertisements":[32],"advertIcon":[32],"currentSlug":[32]}]]],["p-290ed7a3",[[0,"salla-app-install-alert",{"data":[32],"ctaLink":[32],"open":[32],"closing":[32]}]]],["p-6a05c8a7",[[0,"salla-apps-icons",{"hideTitle":[4,"hide-title"],"appsTitle":[1,"apps-title"],"vertical":[4],"apps":[32]}]]],["p-213165ca",[[0,"salla-cart-item-offers",{"quantity":[2],"offers":[1],"itemId":[2,"item-id"],"productPrice":[2,"product-price"],"internalQuantity":[32],"internalOffers":[32],"internalProductPrice":[32],"showAll":[32],"freeLabel":[32],"receivedOffer":[32],"discountAmountLabel":[32],"showMoreOffers":[32]}]]],["p-675f61b3",[[0,"salla-contacts",{"contactsTitle":[1025,"contacts-title"],"hideTitle":[4,"hide-title"],"isHeader":[4,"is-header"],"horizontal":[4],"iconsOnly":[4,"icons-only"],"contacts":[32],"iconsList":[32]}]]],["p-325b3d57",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"country":[1],"tabbyIsActive":[32],"spotiiIsActive":[32],"tamaraIsActive":[32],"mispayActive":[32],"emkanIsActive":[32],"madfuActive":[32],"rajehiIsActive":[32],"installment_sheria_text":[32]}]]],["p-59bef03d",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-ef3f7aa2",[[0,"salla-metadata",{"entity":[1],"entityId":[8,"entity-id"],"specs":[32],"download":[32]}]]],["p-d8ebfd19",[[0,"salla-payments",{"exclude":[1040]}]]],["p-6bd7d328",[[0,"salla-social",{"links":[32],"iconsList":[32]}]]],["p-1e5a2920",[[4,"salla-filters-widget",{"withLoadMore":[1028,"with-load-more"],"filtersData":[16,"filters-data"],"option":[16],"isOpen":[32],"isShowMore":[32],"showMoreLabel":[32],"showLessLabel":[32],"page":[32],"setWidgetHeight":[64],"reset":[64],"showMore":[64],"toggleWidget":[64]}]]],["p-c8151ab6",[[0,"salla-notification-item",{"notification":[16]}]]],["p-9e2c530b",[[0,"salla-review-card",{"review":[16],"currentSlide":[32],"purchasedCount":[32],"showPurchaseCount":[32]}]]],["p-6819efbb",[[4,"salla-tooltip",{"text":[1],"targetId":[1,"target-id"],"show":[32]},[[9,"mouseover","handleMouseOver"],[9,"mouseout","handleMouseOut"]]]]],["p-3c5a1df2",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"offer_type":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[64]}],[4,"salla-gifting",{"productId":[2,"product-id"],"widgetTitle":[1,"widget-title"],"widgetSubtitle":[1,"widget-subtitle"],"physicalProducts":[4,"physical-products"],"vertical":[4],"formSelector":[1025,"form-selector"],"sectionTitle":[32],"sectionSubtitle":[32],"sectionBtnText":[32],"giftDetails":[32],"selectImageForYourGift":[32],"selectImageOrUpload":[32],"selectGiftMessage":[32],"giftCustomText":[32],"textId":[32],"incorrectGiftText":[32],"nextStep":[32],"senderNameLabel":[32],"receiverNameFieldLabel":[32],"receiverMobileFieldLabel":[32],"receiverCountryFieldLabel":[32],"ksa":[32],"selectCountry":[32],"selectCity":[32],"selectCityInfo":[32],"receiverCityFieldLabel":[32],"receiverEmailFieldLabel":[32],"emailPlaceholder":[32],"sendLater":[32],"selectSendDateAndTime":[32],"canNotEditOrderAfterSelectDate":[32],"sendGift":[32],"donationRequired":[32],"currentStep":[32],"showCalendar":[32],"showGiftText":[32],"currentLang":[32],"parentClass":[32],"errors":[32],"gift":[32],"selectedGiftTextOption":[32],"selectedCountryId":[32],"selectedCountryCode":[32],"loadingCities":[32],"parsedFormData":[32],"showTextArea":[32],"selectedImage":[32],"uploadedImage":[32],"selectedText":[32],"senderName":[32],"errorMessage":[32],"hasError":[32],"quantity":[32],"deliveryDate":[32],"timeZone":[32],"receiverName":[32],"receiverMobile":[32],"receiverCountryCode":[32],"receiverEmail":[32],"hostId":[32],"receiverCity":[32],"open":[64],"close":[64],"goToStep2":[64]}],[4,"salla-loyalty",{"prizePoints":[1544,"prize-points"],"customerPoints":[1538,"customer-points"],"prizeTitle":[1537,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1025,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[0,"salla-comments",{"itemId":[2,"item-id"],"loadMoreText":[1,"load-more-text"],"hideForm":[4,"hide-form"],"blockTitle":[1,"block-title"],"hideTitle":[4,"hide-title"],"type":[1],"showFormAvatar":[4,"show-form-avatar"],"hideBought":[4,"hide-bought"],"sort":[1],"testimonials":[4],"comments":[32],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"mostHelpfulLabel":[32],"noComments":[32],"comment_title":[32],"comment_name":[32],"placeholder_text":[32],"showRatingSummary":[32],"allowLikes":[32],"reload":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"placeholder_title":[32],"placeholder_description":[32],"modal_title":[32],"hasError":[32],"open":[64],"close":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"showContactWidget":[32],"errorMessage":[32],"dragAndDropFilesLabel":[32],"contactSubjectLabel":[32],"editReviewLabel":[32],"allowedImagesTypesLabel":[32],"addImagesLabel":[32],"editImagesLabel":[32],"threeImagesMax":[32],"areYouSureLabel":[32],"confirmDeletionLabel":[32],"cancelLabel":[32],"confirmDeleteBtn":[32],"updatedSuccessfullyLabel":[32],"deletedSuccessfullyLabel":[32],"allowAttachImages":[32],"allowContactSupport":[32],"contactUsLabel":[32],"images":[32],"productImages":[32],"editItemImages":[32],"contact_body":[32],"editMode":[32],"defaultMode":[32],"deleteMode":[32],"shouldOpenDeleteModal":[32],"editType":[32],"editFeedbackId":[32],"deleteFeedbackId":[32],"editItem":[32],"open":[64],"close":[64]}],[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"hasError":[32],"loading":[32],"close":[64],"open":[64],"handleSubmit":[64]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-user-profile",{"customFields":[1,"custom-fields"],"minAge":[2,"min-age"],"userData":[32],"isEditable":[32],"userDefinedFields":[32],"disableAction":[32],"isLoading":[32],"first_name_trans":[32],"last_name_trans":[32],"birthday_trans":[32],"birthday_placeholder_trans":[32],"gender_trans":[32],"gender_placeholder_trans":[32],"male_trans":[32],"female_trans":[32],"email_trans":[32],"mobile_trans":[32],"save_btn_trans":[32],"drag_and_drop_trans":[32],"browse_trans":[32],"email_required_trans":[32],"invalid_email_trans":[32],"setCustomFields":[64]}],[0,"salla-quick-order",{"quickOrderTitle":[1025,"quick-order-title"],"subTitle":[1025,"sub-title"],"payButtonTitle":[1025,"pay-button-title"],"confirmPayButtonTitle":[1025,"confirm-pay-button-title"],"agreementText":[1025,"agreement-text"],"isEmailRequired":[1028,"is-email-required"],"productId":[1025,"product-id"],"thanksMessage":[1025,"thanks-message"],"quickOrderStyle":[1025,"quick-order-style"],"user":[32],"isAvailable":[32],"oneClick":[32],"expanded":[32],"isTermsRequired":[32],"countryCode":[32],"submitSucess":[32],"placeHolderEmail":[32],"emailOptional":[32],"agreementShowText":[32],"agreementModalHead":[32],"userNameLabel":[32],"termsChecked":[32]}],[0,"salla-user-settings",{"deactivateAccount":[32],"promotionalMsgs":[32],"hideMyName":[32],"hideMyNameDesc":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32],"canHideName":[32],"isHiddenName":[32],"isNotifiable":[32]}],[0,"salla-bottom-alert",{"type":[513],"icon":[513],"message":[513],"actionUrl":[513,"action-url"],"actionLabel":[513,"action-label"],"storeId":[32],"template":[32],"loading":[32],"templateData":[32],"defaultMessage":[32],"defaultActionLabel":[32],"storeFeatures":[32],"storeDetails":[32],"storePrice":[32],"storePriceDetails":[32],"theDeveloper":[32],"templateInformation":[32],"buyTheTemplate":[32],"isRtl":[32],"storeName":[32]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"maxWords":[2,"max-words"],"showAction":[4,"show-action"],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]],{"search_term":["handleSearch"]}],[0,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"inline":[516],"storeId":[1032,"store-id"],"api":[1],"headers":[1025],"withoutReload":[1028,"without-reload"],"source":[32],"messages":[32],"isClosable":[32],"iframeLoaded":[32],"scrolling":[32],"direction":[32],"canRenderIframe":[32],"open":[64]}],[0,"salla-menu",{"source":[1],"sourceValue":[1,"source-value"],"topnav":[4],"useReactLink":[4,"use-react-link"],"limit":[2],"menus":[32]}],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64],"refresh":[64]}],[4,"salla-alert",{"message":[1],"variant":[1],"icon":[1]}],[0,"salla-breadcrumb",{"breadcrumbs":[32]}],[4,"salla-cart-summary",{"showCartLabel":[4,"show-cart-label"],"cartSummaryCount":[32],"cartSummaryTotal":[32],"cartLabel":[32],"animateToCart":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"loadMoreText":[1,"load-more-text"],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[0,"salla-maintenance-alert",{"title":[32],"message":[32],"buttonTitle":[32]}],[4,"salla-quantity-input",{"cartItemId":[8,"cart-item-id"],"quantity":[32],"fireChangeEvent":[32],"decrease":[64],"increase":[64],"setValue":[64]},null,{"quantity":["watchPropHandler"]}],[4,"salla-user-menu",{"inline":[516],"avatarOnly":[516,"avatar-only"],"showHeader":[516,"show-header"],"relativeDropdown":[516,"relative-dropdown"],"accountLoading":[32],"opened":[32],"notifications":[32],"orders":[32],"pending_orders":[32],"wishlist":[32],"profile":[32],"rating":[32],"wallet":[32],"loyalty_program":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"is_loggedIn":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[32]}],[0,"salla-products-slider",{"blockTitle":[1,"block-title"],"subTitle":[1,"sub-title"],"sliderId":[1,"slider-id"],"displayAllUrl":[1,"display-all-url"],"autoplay":[1028],"source":[1537],"sourceValue":[1,"source-value"],"limit":[1026],"sliderConfig":[520,"slider-config"],"productCardComponent":[1,"product-card-component"],"includes":[1040],"productsData":[32],"isReady":[32],"sourceValueIsValid":[32],"hasCustomComponent":[32],"apiUrl":[32],"parsedSourceValue":[32]}],[4,"salla-map",{"name":[1],"required":[4],"readonly":[4],"searchable":[1028],"lat":[1026],"lng":[1026],"apiKey":[1025,"api-key"],"modalTitle":[1,"modal-title"],"zoom":[1026],"theme":[1025],"modalActivityTitle":[32],"confirmButtonTitle":[32],"locateButtonTitle":[32],"locateButtonEdit":[32],"searchPlaceholder":[32],"searchInputValue":[32],"formattedAddress":[32],"geolocationError":[32],"searchInput":[32],"mapInput":[32],"mapElement":[32],"selectedLat":[32],"selectedLng":[32],"open":[64]}],[0,"salla-reviews-summary",{"itemId":[2,"item-id"],"data":[32],"canRender":[32],"basedOnLabel":[32],"recommendedLabel":[32],"showRatingSummary":[32],"recommendationOnly":[32],"showRecommendation":[32]}],[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}],[4,"salla-drawer",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"drawerTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]},[[0,"keyup","handleKeyUp"]],{"visible":["handleVisible"]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1537],"format":[1],"showCancelButton":[4,"show-cancel-button"],"showTextField":[4,"show-text-field"],"enableAlpha":[4,"enable-alpha"],"widgetColor":[32],"setPickerOption":[64],"movePopUp":[64],"setColorValue":[64],"openPicker":[64],"closePicker":[64],"destroyPicker":[64]}],[0,"salla-products-list",{"source":[1537],"sourceValue":[1032,"source-value"],"limit":[1026],"sortBy":[1025,"sort-by"],"filtersResults":[1540,"filters-results"],"horizontalCards":[516,"horizontal-cards"],"rowCards":[516,"row-cards"],"autoload":[1028],"loadMoreText":[1,"load-more-text"],"productCardComponent":[1,"product-card-component"],"includes":[1040],"page":[32],"nextPage":[32],"hasInfiniteScroll":[32],"hasCustomComponent":[32],"sourceValueIsValid":[32],"placeholderText":[32],"endOfText":[32],"failedLoadMore":[32],"currentPage":[32],"currentCategoryIdFilter":[32],"isReady":[32],"showPlaceholder":[32],"switchToNormalBehavior":[32],"parsedFilters":[32],"filtersSnapshot":[32],"setFilters":[64],"reload":[64]}],[0,"salla-comment-item",{"comment":[16],"hideBought":[16,"hide-bought"],"has_bought_trans":[32],"rated_trans":[32],"waiting_approval_trans":[32],"has_order_trans":[32],"allowLikes":[32],"allowAttachImages":[32],"helpfulLabel":[32],"likesCount":[32],"likedComments":[32]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]],[4,"salla-product-card",{"product":[1],"horizontal":[4],"shadowOnHover":[4,"shadow-on-hover"],"hideAddBtn":[4,"hide-add-btn"],"fullImage":[4,"full-image"],"minimal":[4],"isSpecial":[4,"is-special"],"showQuantity":[4,"show-quantity"],"productData":[32],"fitImageHeight":[32],"remained":[32],"outOfStock":[32],"donationAmount":[32],"startingPrice":[32],"addToCart":[32],"placeholder":[32]}],[0,"salla-datetime-picker",{"value":[1537],"required":[4],"name":[513],"placeholder":[1],"allowInput":[4,"allow-input"],"allowInvalidPreload":[4,"allow-invalid-preload"],"altFormat":[1,"alt-format"],"altInput":[4,"alt-input"],"altInputClass":[1,"alt-input-class"],"appendTo":[16,"append-to"],"ariaDateFormat":[1,"aria-date-format"],"autoFillDefaultTime":[4,"auto-fill-default-time"],"clickOpens":[4,"click-opens"],"closeOnSelect":[4,"close-on-select"],"conjunction":[1],"dateFormat":[1,"date-format"],"defaultDate":[8,"default-date"],"defaultHour":[2,"default-hour"],"defaultMinute":[2,"default-minute"],"defaultSeconds":[2,"default-seconds"],"disable":[16],"disableMobile":[4,"disable-mobile"],"enable":[16],"enableSeconds":[4,"enable-seconds"],"enableTime":[4,"enable-time"],"formatDate":[16,"format-date"],"hourIncrement":[2,"hour-increment"],"inline":[4],"locale":[1],"maxDate":[8,"max-date"],"maxTime":[8,"max-time"],"minDate":[8,"min-date"],"minTime":[8,"min-time"],"minuteIncrement":[2,"minute-increment"],"mode":[1],"monthSelectorType":[1,"month-selector-type"],"nextArrow":[1,"next-arrow"],"noCalendar":[4,"no-calendar"],"dateParser":[16,"date-parser"],"position":[1],"positionElement":[16,"position-element"],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4],"disabled":[4]}],[4,"salla-add-product-button",{"channels":[513],"subscribedOptions":[1,"subscribed-options"],"quickBuy":[1540,"quick-buy"],"quantity":[514],"donatingAmount":[514,"donating-amount"],"notifyOptionsAvailability":[516,"notify-options-availability"],"productId":[520,"product-id"],"supportStickyBar":[516,"support-sticky-bar"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"hasOutOfStockOption":[32],"hasSubscribedOptions":[32],"selectedOptions":[32],"showQuickBuy":[32],"isApplePayActive":[32],"buyNowText":[32]}],[0,"salla-count-down",{"date":[1],"preOrder":[1,"pre-order"],"boxed":[4],"size":[1],"color":[1],"labeled":[4],"endText":[1,"end-text"],"digits":[1],"endOfDay":[4,"end-of-day"],"daysLabel":[32],"hoursLabel":[32],"minutesLabel":[32],"secondsLabel":[32],"endLabel":[32],"invalidDate":[32],"offerEnded":[32],"countInterval":[32],"days":[32],"hours":[32],"minutes":[32],"seconds":[32],"endCountDown":[64]}],[0,"salla-file-upload",{"value":[1544],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"type":[1],"accept":[1537],"fileId":[2,"file-id"],"url":[1025],"method":[1],"formData":[1,"form-data"],"required":[4],"maxFileSize":[1,"max-file-size"],"disabled":[4],"allowDrop":[4,"allow-drop"],"allowBrowse":[4,"allow-browse"],"allowPaste":[4,"allow-paste"],"allowMultiple":[4,"allow-multiple"],"allowReplace":[4,"allow-replace"],"allowRevert":[4,"allow-revert"],"allowRemove":[4,"allow-remove"],"allowProcess":[4,"allow-process"],"allowReorder":[4,"allow-reorder"],"allowImagePreview":[4,"allow-image-preview"],"imagePreviewHeight":[2,"image-preview-height"],"filePosterHeight":[2,"file-poster-height"],"storeAsFile":[4,"store-as-file"],"forceRevert":[4,"force-revert"],"maxFilesCount":[2,"max-files-count"],"maxParallelUploads":[2,"max-parallel-uploads"],"checkValidity":[4,"check-validity"],"itemInsertLocation":[1,"item-insert-location"],"itemInsertInterval":[2,"item-insert-interval"],"credits":[4],"dropOnPage":[4,"drop-on-page"],"dropOnElement":[4,"drop-on-element"],"dropValidation":[4,"drop-validation"],"ignoredFiles":[16,"ignored-files"],"instantUpload":[1028,"instant-upload"],"chunkUploads":[4,"chunk-uploads"],"chunkForce":[4,"chunk-force"],"chunkSize":[2,"chunk-size"],"chunkRetryDelays":[16,"chunk-retry-delays"],"labelDecimalSeparator":[1,"label-decimal-separator"],"labelThousandsSeparator":[1,"label-thousands-separator"],"labelIdle":[1025,"label-idle"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"max_images_count":[32],"max_count_hint":[32],"uploadedFiles":[32],"isListScrollerListenerAdded":[32],"showMaxCountHint":[32],"setOption":[64]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[0,"salla-product-availability",{"channels":[1],"notifyOptionsAvailability":[4,"notify-options-availability"],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]},null,{"channels":["channelsWatcher"]}],[0,"salla-quick-buy",{"type":[1025],"productId":[1025,"product-id"],"cartId":[1025,"cart-id"],"amount":[1538],"currency":[1025],"options":[16],"isRequireShipping":[1028,"is-require-shipping"],"applePayOnly":[1028,"apple-pay-only"],"isApplePayActive":[32],"quickBuy":[32]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"height":[1025],"header":[1025],"stripped":[1028],"message":[1025],"unit":[1025],"color":[1025],"hideUnits":[4,"hide-units"]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2],"reviews":[2],"withLabel":[4,"with-label"],"editable":[4],"translationsLoaded":[32],"labels":[32],"reviewLabel":[32],"selectedStar":[32]}],[4,"salla-slider",{"blockTitle":[513,"block-title"],"listenToThumbnailsOption":[516,"listen-to-thumbnails-option"],"blockSubtitle":[513,"block-subtitle"],"displayAllUrl":[513,"display-all-url"],"arrowsCentered":[516,"arrows-centered"],"verticalThumbs":[516,"vertical-thumbs"],"gridThumbs":[516,"grid-thumbs"],"vertical":[516],"autoHeight":[516,"auto-height"],"showControls":[516,"show-controls"],"controlsOuter":[516,"controls-outer"],"showThumbsControls":[4,"show-thumbs-controls"],"autoPlay":[4,"auto-play"],"slidesPerView":[1,"slides-per-view"],"pagination":[4],"centered":[4],"loop":[4],"direction":[1537],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"swiperScript":[32],"displayAllTitle":[32],"windowWidth":[32],"sliderInstance":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"slideToLoop":[64],"slideNextLoop":[64],"slidePrevLoop":[64],"slideReset":[64],"slideToClosest":[64],"update":[64],"updateAutoHeight":[64],"updateSlides":[64],"updateProgress":[64],"updateSlidesClasses":[64],"getSlides":[64],"updateSize":[64],"sliderInit":[64],"thumbsSliderInstance":[64],"thumbsSliderInit":[64],"thumbsSliderUpdate":[64],"thumbsSliderUpdateSlides":[64],"getThumbsUpdateSize":[64],"thumbsSlideTo":[64],"getThumbsSlides":[64]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}],[0,"salla-tel-input",{"phone":[1025],"autofocus":[516],"name":[1],"disabled":[4],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]},[[0,"keyup","handleKeyUp"]],{"visible":["handleVisible"]}],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"type":[513],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["p-9cfeaa42",[[0,"salla-booking-field",{"option":[16],"productId":[2,"product-id"],"bookNowLabel":[32],"editLabel":[32],"bookedLabel":[32],"selectDate":[32],"bookingUrl":[32],"iframeReady":[32],"reservations":[32],"reservationsInput":[32]}],[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-b91925bc",[[0,"salla-price-range",{"minPrice":[1032,"min-price"],"maxPrice":[1032,"max-price"],"option":[16],"filtersData":[520,"filters-data"],"min":[32],"max":[32],"priceOptions":[32],"moreThanLabel":[32],"lessThanLabel":[32],"toLabel":[32],"fromLabel":[32],"typing":[32],"isMin":[32],"isRTL":[32],"reset":[64]}]]]]'),e)}));
|
|
4
|
+
import{p as e,b as a}from"./p-CuTX1FnY.js";export{s as setNonce}from"./p-CuTX1FnY.js";import{g as t}from"./p-BVv_u7n4.js";var l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((async e=>{await t();return a(JSON.parse('[["p-003b86a2",[[0,"salla-offer",{"productCardComponent":[1,"product-card-component"],"offersList":[32],"userCurrency":[32],"isMultipleBank":[32],"title":[32],"currentPage":[32],"hasCustomComponent":[32],"isBankOffer":[32],"canRender":[32],"showOffer":[32],"offer_with_price_text":[32],"with_discount_text":[32],"product_discount_text":[32],"special_offer_text":[32],"multipleBankOfferTitleText":[32],"multipleBankOfferTitleDescription":[32],"buy_quantity_text":[32]}]]],["p-05fb4f81",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"hideOutLabel":[1,"hide-out-label"],"uniqueKey":[1,"unique-key"],"config":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32],"selectDonationAmount":[32],"selectAmount":[32],"isCustomDonation":[32],"selectedOptions":[32],"canDisabled":[32],"selectedSkus":[32],"selectedOutSkus":[32],"disableCardValue":[32],"availableDigitalCardValues":[32],"setOptionsData":[64],"getSelectedOptionsData":[64],"reportValidity":[64],"hasOutOfStockOption":[64],"getSelectedOptions":[64],"getOption":[64]}]]],["p-27ebf315",[[0,"salla-filters",{"filters":[1040],"isSidebarOpen":[32],"filtersData":[32],"apply":[32],"reset":[32],"getFilters":[64],"applyFilters":[64],"resetFilters":[64]}]]],["p-bfa87551",[[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"hasError":[32],"errorMessage":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["p-6e05d698",[[0,"salla-loyalty-program",{"loyaltyPointsArray":[32],"isLoadingLoyalty":[32],"nextPageUrlLoyalty":[32]}]]],["p-cf0431dc",[[0,"salla-notifications",{"loadMoreText":[1,"load-more-text"],"itemPerPage":[2,"item-per-page"],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"no_notifications_trans":[32],"load_more_text_trans":[32]}]]],["p-1446a7c2",[[0,"salla-order-summary",{"orderId":[514,"order-id"],"codeCopied":[32],"noItemFound":[32],"order_items":[32]}]]],["p-7426b31e",[[0,"salla-reviews",{"displayAllLink":[516,"display-all-link"],"source":[513],"sourceValue":[513,"source-value"],"limit":[514],"type":[1],"sort":[1],"hideCustomerInfo":[4,"hide-customer-info"],"reviews":[32],"isRTL":[32],"showReviews":[32],"testimonialText":[32],"displayAllLinkText":[32]}]]],["p-32915043",[[0,"salla-reviews-page",{"reviews":[32],"isLoading":[32],"pagination":[32],"sort":[32]}]]],["p-08ee1adb",[[0,"salla-wallet",{"transactionsArray":[32],"balance":[32],"isLoading":[32],"nextPageUrl":[32]}]]],["p-88aec04f",[[0,"salla-conditional-offer",{"offer":[32],"products":[32],"isLoading":[32],"canRender":[32]}]]],["p-744e409d",[[0,"salla-orders",{"params":[16],"loadMoreText":[1,"load-more-text"],"orderNumberText":[32],"totalOrderText":[32],"orderDateText":[32],"orderStatusText":[32],"noOrderText":[32],"load_more_text_trans":[32],"languageCode":[32],"orders":[32],"pagination":[32],"hasInfiniteScroll":[32],"total":[32],"nextPage":[32],"showPlaceholder":[32]}]]],["p-83b5566c",[[0,"salla-tiered-offer",{"tieredOfferData":[32],"apiOfferData":[32],"currentTierIndex":[32],"currentTier":[32],"activeTabTier":[32],"canRender":[32],"isLoading":[32],"loyaltyProgramText":[32],"currentTierText":[32],"discountText":[32],"benefitText":[32]}]]],["p-b1478709",[[4,"salla-accordion",{"collapsible":[4],"collapsed":[1540],"dir":[32]},[[4,"salla::language.change","directionChangedHandler"],[0,"accordionToggle","handleCollapse"]]]]],["p-8f3dc4ca",[[4,"salla-accordion-body"]]],["p-80b4ae24",[[4,"salla-accordion-head",{"collapsible":[4],"collapsed":[1540]}]]],["p-b2f1072f",[[0,"salla-advertisement",{"position":[32],"advertisements":[32],"advertIcon":[32],"currentSlug":[32]}]]],["p-b637209c",[[0,"salla-app-install-alert",{"data":[32],"ctaLink":[32],"open":[32],"closing":[32]}]]],["p-b8f6634f",[[0,"salla-apps-icons",{"hideTitle":[4,"hide-title"],"appsTitle":[1,"apps-title"],"vertical":[4],"apps":[32]}]]],["p-8f374b32",[[0,"salla-cart-item-offers",{"quantity":[2],"offers":[1],"itemId":[2,"item-id"],"productPrice":[2,"product-price"],"internalQuantity":[32],"internalOffers":[32],"internalProductPrice":[32],"showAll":[32],"freeLabel":[32],"receivedOffer":[32],"discountAmountLabel":[32],"showMoreOffers":[32]}]]],["p-ba62fa0e",[[0,"salla-contacts",{"contactsTitle":[1025,"contacts-title"],"hideTitle":[4,"hide-title"],"isHeader":[4,"is-header"],"horizontal":[4],"iconsOnly":[4,"icons-only"],"contacts":[32],"iconsList":[32]}]]],["p-f90fafa7",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"country":[1],"tabbyIsActive":[32],"spotiiIsActive":[32],"tamaraIsActive":[32],"mispayActive":[32],"emkanIsActive":[32],"madfuActive":[32],"rajehiIsActive":[32],"installment_sheria_text":[32]}]]],["p-8aa88636",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-2736e1ff",[[0,"salla-metadata",{"entity":[1],"entityId":[8,"entity-id"],"specs":[32],"download":[32]}]]],["p-7ad55888",[[0,"salla-payments",{"exclude":[1040]}]]],["p-334407c3",[[0,"salla-social",{"links":[32],"iconsList":[32]}]]],["p-0284f6e2",[[4,"salla-filters-widget",{"withLoadMore":[1028,"with-load-more"],"filtersData":[16,"filters-data"],"option":[16],"isOpen":[32],"isShowMore":[32],"showMoreLabel":[32],"showLessLabel":[32],"page":[32],"setWidgetHeight":[64],"reset":[64],"showMore":[64],"toggleWidget":[64]}]]],["p-0d0b4f23",[[0,"salla-notification-item",{"notification":[16]}]]],["p-fc788f66",[[0,"salla-review-card",{"review":[16],"currentSlide":[32],"purchasedCount":[32],"showPurchaseCount":[32]}]]],["p-69ae28c3",[[4,"salla-tooltip",{"text":[1],"targetId":[1,"target-id"],"show":[32]},[[9,"mouseover","handleMouseOver"],[9,"mouseout","handleMouseOut"]]]]],["p-5baa9220",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"offer_type":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[64]}],[4,"salla-gifting",{"productId":[2,"product-id"],"widgetTitle":[1,"widget-title"],"widgetSubtitle":[1,"widget-subtitle"],"physicalProducts":[4,"physical-products"],"vertical":[4],"formSelector":[1025,"form-selector"],"sectionTitle":[32],"sectionSubtitle":[32],"sectionBtnText":[32],"giftDetails":[32],"selectImageForYourGift":[32],"selectImageOrUpload":[32],"selectGiftMessage":[32],"giftCustomText":[32],"textId":[32],"incorrectGiftText":[32],"nextStep":[32],"senderNameLabel":[32],"receiverNameFieldLabel":[32],"receiverMobileFieldLabel":[32],"receiverCountryFieldLabel":[32],"ksa":[32],"selectCountry":[32],"selectCity":[32],"selectCityInfo":[32],"receiverCityFieldLabel":[32],"receiverEmailFieldLabel":[32],"emailPlaceholder":[32],"sendLater":[32],"selectSendDateAndTime":[32],"canNotEditOrderAfterSelectDate":[32],"sendGift":[32],"donationRequired":[32],"currentStep":[32],"showCalendar":[32],"showGiftText":[32],"currentLang":[32],"parentClass":[32],"errors":[32],"gift":[32],"selectedGiftTextOption":[32],"selectedCountryId":[32],"selectedCountryCode":[32],"loadingCities":[32],"parsedFormData":[32],"showTextArea":[32],"selectedImage":[32],"uploadedImage":[32],"selectedText":[32],"senderName":[32],"errorMessage":[32],"hasError":[32],"quantity":[32],"deliveryDate":[32],"timeZone":[32],"receiverName":[32],"receiverMobile":[32],"receiverCountryCode":[32],"receiverEmail":[32],"hostId":[32],"receiverCity":[32],"open":[64],"close":[64],"goToStep2":[64]}],[4,"salla-loyalty",{"prizePoints":[1544,"prize-points"],"customerPoints":[1538,"customer-points"],"prizeTitle":[1537,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1025,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[0,"salla-comments",{"itemId":[2,"item-id"],"loadMoreText":[1,"load-more-text"],"hideForm":[4,"hide-form"],"blockTitle":[1,"block-title"],"hideTitle":[4,"hide-title"],"type":[1],"showFormAvatar":[4,"show-form-avatar"],"hideBought":[4,"hide-bought"],"sort":[1],"testimonials":[4],"comments":[32],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"mostHelpfulLabel":[32],"noComments":[32],"comment_title":[32],"comment_name":[32],"placeholder_text":[32],"showRatingSummary":[32],"allowLikes":[32],"reload":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"placeholder_title":[32],"placeholder_description":[32],"modal_title":[32],"hasError":[32],"open":[64],"close":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"showContactWidget":[32],"errorMessage":[32],"dragAndDropFilesLabel":[32],"contactSubjectLabel":[32],"editReviewLabel":[32],"allowedImagesTypesLabel":[32],"addImagesLabel":[32],"editImagesLabel":[32],"threeImagesMax":[32],"areYouSureLabel":[32],"confirmDeletionLabel":[32],"cancelLabel":[32],"confirmDeleteBtn":[32],"updatedSuccessfullyLabel":[32],"deletedSuccessfullyLabel":[32],"allowAttachImages":[32],"allowContactSupport":[32],"contactUsLabel":[32],"images":[32],"productImages":[32],"editItemImages":[32],"contact_body":[32],"editMode":[32],"defaultMode":[32],"deleteMode":[32],"shouldOpenDeleteModal":[32],"editType":[32],"editFeedbackId":[32],"deleteFeedbackId":[32],"editItem":[32],"open":[64],"close":[64]}],[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"hasError":[32],"loading":[32],"close":[64],"open":[64],"handleSubmit":[64]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-user-profile",{"customFields":[1,"custom-fields"],"minAge":[2,"min-age"],"userData":[32],"isEditable":[32],"userDefinedFields":[32],"disableAction":[32],"isLoading":[32],"first_name_trans":[32],"last_name_trans":[32],"birthday_trans":[32],"birthday_placeholder_trans":[32],"gender_trans":[32],"gender_placeholder_trans":[32],"male_trans":[32],"female_trans":[32],"email_trans":[32],"mobile_trans":[32],"save_btn_trans":[32],"drag_and_drop_trans":[32],"browse_trans":[32],"email_required_trans":[32],"invalid_email_trans":[32],"setCustomFields":[64]}],[0,"salla-quick-order",{"quickOrderTitle":[1025,"quick-order-title"],"subTitle":[1025,"sub-title"],"payButtonTitle":[1025,"pay-button-title"],"confirmPayButtonTitle":[1025,"confirm-pay-button-title"],"agreementText":[1025,"agreement-text"],"isEmailRequired":[1028,"is-email-required"],"productId":[1025,"product-id"],"thanksMessage":[1025,"thanks-message"],"quickOrderStyle":[1025,"quick-order-style"],"user":[32],"isAvailable":[32],"oneClick":[32],"expanded":[32],"isTermsRequired":[32],"countryCode":[32],"submitSucess":[32],"placeHolderEmail":[32],"emailOptional":[32],"agreementShowText":[32],"agreementModalHead":[32],"userNameLabel":[32],"termsChecked":[32]}],[0,"salla-user-settings",{"deactivateAccount":[32],"promotionalMsgs":[32],"hideMyName":[32],"hideMyNameDesc":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32],"canHideName":[32],"isHiddenName":[32],"isNotifiable":[32]}],[0,"salla-bottom-alert",{"type":[513],"icon":[513],"message":[513],"actionUrl":[513,"action-url"],"actionLabel":[513,"action-label"],"storeId":[32],"template":[32],"loading":[32],"templateData":[32],"defaultMessage":[32],"defaultActionLabel":[32],"storeFeatures":[32],"storeDetails":[32],"storePrice":[32],"storePriceDetails":[32],"theDeveloper":[32],"templateInformation":[32],"buyTheTemplate":[32],"isRtl":[32],"storeName":[32]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"maxWords":[2,"max-words"],"showAction":[4,"show-action"],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]],{"search_term":["handleSearch"]}],[0,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"inline":[516],"storeId":[1032,"store-id"],"api":[1],"headers":[1025],"withoutReload":[1028,"without-reload"],"source":[32],"messages":[32],"isClosable":[32],"iframeLoaded":[32],"scrolling":[32],"direction":[32],"canRenderIframe":[32],"open":[64]}],[0,"salla-menu",{"source":[1],"sourceValue":[1,"source-value"],"topnav":[4],"useReactLink":[4,"use-react-link"],"limit":[2],"menus":[32]}],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64],"refresh":[64]}],[4,"salla-alert",{"message":[1],"variant":[1],"icon":[1]}],[0,"salla-breadcrumb",{"breadcrumbs":[32]}],[4,"salla-cart-summary",{"showCartLabel":[4,"show-cart-label"],"cartSummaryCount":[32],"cartSummaryTotal":[32],"cartLabel":[32],"animateToCart":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"loadMoreText":[1,"load-more-text"],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[0,"salla-maintenance-alert",{"title":[32],"message":[32],"buttonTitle":[32]}],[4,"salla-quantity-input",{"cartItemId":[8,"cart-item-id"],"quantity":[32],"fireChangeEvent":[32],"decrease":[64],"increase":[64],"setValue":[64]},null,{"quantity":["watchPropHandler"]}],[4,"salla-user-menu",{"inline":[516],"avatarOnly":[516,"avatar-only"],"showHeader":[516,"show-header"],"relativeDropdown":[516,"relative-dropdown"],"accountLoading":[32],"opened":[32],"notifications":[32],"orders":[32],"pending_orders":[32],"wishlist":[32],"profile":[32],"rating":[32],"wallet":[32],"loyalty_program":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"is_loggedIn":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[32]}],[0,"salla-products-slider",{"blockTitle":[1,"block-title"],"subTitle":[1,"sub-title"],"sliderId":[1,"slider-id"],"displayAllUrl":[1,"display-all-url"],"autoplay":[1028],"source":[1537],"sourceValue":[1,"source-value"],"limit":[1026],"sliderConfig":[520,"slider-config"],"productCardComponent":[1,"product-card-component"],"includes":[1040],"productsData":[32],"isReady":[32],"sourceValueIsValid":[32],"hasCustomComponent":[32],"apiUrl":[32],"parsedSourceValue":[32]}],[4,"salla-map",{"name":[1],"required":[4],"readonly":[4],"searchable":[1028],"lat":[1026],"lng":[1026],"apiKey":[1025,"api-key"],"modalTitle":[1,"modal-title"],"zoom":[1026],"theme":[1025],"modalActivityTitle":[32],"confirmButtonTitle":[32],"locateButtonTitle":[32],"locateButtonEdit":[32],"searchPlaceholder":[32],"searchInputValue":[32],"formattedAddress":[32],"geolocationError":[32],"searchInput":[32],"mapInput":[32],"mapElement":[32],"selectedLat":[32],"selectedLng":[32],"open":[64]}],[0,"salla-reviews-summary",{"itemId":[2,"item-id"],"data":[32],"canRender":[32],"basedOnLabel":[32],"recommendedLabel":[32],"showRatingSummary":[32],"recommendationOnly":[32],"showRecommendation":[32]}],[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}],[4,"salla-drawer",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"drawerTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]},[[0,"keyup","handleKeyUp"]],{"visible":["handleVisible"]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1537],"format":[1],"showCancelButton":[4,"show-cancel-button"],"showTextField":[4,"show-text-field"],"enableAlpha":[4,"enable-alpha"],"widgetColor":[32],"setPickerOption":[64],"movePopUp":[64],"setColorValue":[64],"openPicker":[64],"closePicker":[64],"destroyPicker":[64]}],[0,"salla-products-list",{"source":[1537],"sourceValue":[1032,"source-value"],"limit":[1026],"sortBy":[1025,"sort-by"],"filtersResults":[1540,"filters-results"],"horizontalCards":[516,"horizontal-cards"],"rowCards":[516,"row-cards"],"autoload":[1028],"loadMoreText":[1,"load-more-text"],"productCardComponent":[1,"product-card-component"],"includes":[1040],"page":[32],"nextPage":[32],"hasInfiniteScroll":[32],"hasCustomComponent":[32],"sourceValueIsValid":[32],"placeholderText":[32],"endOfText":[32],"failedLoadMore":[32],"currentPage":[32],"currentCategoryIdFilter":[32],"isReady":[32],"showPlaceholder":[32],"switchToNormalBehavior":[32],"parsedFilters":[32],"filtersSnapshot":[32],"setFilters":[64],"reload":[64]}],[0,"salla-comment-item",{"comment":[16],"hideBought":[16,"hide-bought"],"has_bought_trans":[32],"rated_trans":[32],"waiting_approval_trans":[32],"has_order_trans":[32],"allowLikes":[32],"allowAttachImages":[32],"helpfulLabel":[32],"likesCount":[32],"likedComments":[32]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]],[4,"salla-product-card",{"product":[1],"horizontal":[4],"shadowOnHover":[4,"shadow-on-hover"],"hideAddBtn":[4,"hide-add-btn"],"fullImage":[4,"full-image"],"minimal":[4],"isSpecial":[4,"is-special"],"showQuantity":[4,"show-quantity"],"productData":[32],"fitImageHeight":[32],"remained":[32],"outOfStock":[32],"donationAmount":[32],"startingPrice":[32],"addToCart":[32],"placeholder":[32]}],[0,"salla-datetime-picker",{"value":[1537],"required":[4],"name":[513],"placeholder":[1],"allowInput":[4,"allow-input"],"allowInvalidPreload":[4,"allow-invalid-preload"],"altFormat":[1,"alt-format"],"altInput":[4,"alt-input"],"altInputClass":[1,"alt-input-class"],"appendTo":[16,"append-to"],"ariaDateFormat":[1,"aria-date-format"],"autoFillDefaultTime":[4,"auto-fill-default-time"],"clickOpens":[4,"click-opens"],"closeOnSelect":[4,"close-on-select"],"conjunction":[1],"dateFormat":[1,"date-format"],"defaultDate":[8,"default-date"],"defaultHour":[2,"default-hour"],"defaultMinute":[2,"default-minute"],"defaultSeconds":[2,"default-seconds"],"disable":[16],"disableMobile":[4,"disable-mobile"],"enable":[16],"enableSeconds":[4,"enable-seconds"],"enableTime":[4,"enable-time"],"formatDate":[16,"format-date"],"hourIncrement":[2,"hour-increment"],"inline":[4],"locale":[1],"maxDate":[8,"max-date"],"maxTime":[8,"max-time"],"minDate":[8,"min-date"],"minTime":[8,"min-time"],"minuteIncrement":[2,"minute-increment"],"mode":[1],"monthSelectorType":[1,"month-selector-type"],"nextArrow":[1,"next-arrow"],"noCalendar":[4,"no-calendar"],"dateParser":[16,"date-parser"],"position":[1],"positionElement":[16,"position-element"],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4],"disabled":[4]}],[4,"salla-add-product-button",{"channels":[513],"subscribedOptions":[1,"subscribed-options"],"quickBuy":[1540,"quick-buy"],"quantity":[514],"donatingAmount":[514,"donating-amount"],"notifyOptionsAvailability":[516,"notify-options-availability"],"productId":[520,"product-id"],"supportStickyBar":[516,"support-sticky-bar"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"hasOutOfStockOption":[32],"hasSubscribedOptions":[32],"selectedOptions":[32],"showQuickBuy":[32],"isApplePayActive":[32],"buyNowText":[32]}],[0,"salla-count-down",{"date":[1],"preOrder":[1,"pre-order"],"boxed":[4],"size":[1],"color":[1],"labeled":[4],"endText":[1,"end-text"],"digits":[1],"endOfDay":[4,"end-of-day"],"daysLabel":[32],"hoursLabel":[32],"minutesLabel":[32],"secondsLabel":[32],"endLabel":[32],"invalidDate":[32],"offerEnded":[32],"countInterval":[32],"days":[32],"hours":[32],"minutes":[32],"seconds":[32],"endCountDown":[64]}],[0,"salla-file-upload",{"value":[1544],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"type":[1],"accept":[1537],"fileId":[2,"file-id"],"url":[1025],"method":[1],"formData":[1,"form-data"],"required":[4],"maxFileSize":[1,"max-file-size"],"disabled":[4],"allowDrop":[4,"allow-drop"],"allowBrowse":[4,"allow-browse"],"allowPaste":[4,"allow-paste"],"allowMultiple":[4,"allow-multiple"],"allowReplace":[4,"allow-replace"],"allowRevert":[4,"allow-revert"],"allowRemove":[4,"allow-remove"],"allowProcess":[4,"allow-process"],"allowReorder":[4,"allow-reorder"],"allowImagePreview":[4,"allow-image-preview"],"imagePreviewHeight":[2,"image-preview-height"],"filePosterHeight":[2,"file-poster-height"],"storeAsFile":[4,"store-as-file"],"forceRevert":[4,"force-revert"],"maxFilesCount":[2,"max-files-count"],"maxParallelUploads":[2,"max-parallel-uploads"],"checkValidity":[4,"check-validity"],"itemInsertLocation":[1,"item-insert-location"],"itemInsertInterval":[2,"item-insert-interval"],"credits":[4],"dropOnPage":[4,"drop-on-page"],"dropOnElement":[4,"drop-on-element"],"dropValidation":[4,"drop-validation"],"ignoredFiles":[16,"ignored-files"],"instantUpload":[1028,"instant-upload"],"chunkUploads":[4,"chunk-uploads"],"chunkForce":[4,"chunk-force"],"chunkSize":[2,"chunk-size"],"chunkRetryDelays":[16,"chunk-retry-delays"],"labelDecimalSeparator":[1,"label-decimal-separator"],"labelThousandsSeparator":[1,"label-thousands-separator"],"labelIdle":[1025,"label-idle"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"max_images_count":[32],"max_count_hint":[32],"uploadedFiles":[32],"isListScrollerListenerAdded":[32],"showMaxCountHint":[32],"setOption":[64]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[0,"salla-product-availability",{"channels":[1],"notifyOptionsAvailability":[4,"notify-options-availability"],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]},null,{"channels":["channelsWatcher"]}],[0,"salla-quick-buy",{"type":[1025],"productId":[1025,"product-id"],"cartId":[1025,"cart-id"],"amount":[1538],"currency":[1025],"options":[16],"isRequireShipping":[1028,"is-require-shipping"],"applePayOnly":[1028,"apple-pay-only"],"isApplePayActive":[32],"quickBuy":[32]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"height":[1025],"header":[1025],"stripped":[1028],"message":[1025],"unit":[1025],"color":[1025],"hideUnits":[4,"hide-units"]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2],"reviews":[2],"withLabel":[4,"with-label"],"editable":[4],"translationsLoaded":[32],"labels":[32],"reviewLabel":[32],"selectedStar":[32]}],[4,"salla-slider",{"blockTitle":[513,"block-title"],"listenToThumbnailsOption":[516,"listen-to-thumbnails-option"],"blockSubtitle":[513,"block-subtitle"],"displayAllUrl":[513,"display-all-url"],"arrowsCentered":[516,"arrows-centered"],"verticalThumbs":[516,"vertical-thumbs"],"gridThumbs":[516,"grid-thumbs"],"vertical":[516],"autoHeight":[516,"auto-height"],"showControls":[516,"show-controls"],"controlsOuter":[516,"controls-outer"],"showThumbsControls":[4,"show-thumbs-controls"],"autoPlay":[4,"auto-play"],"slidesPerView":[1,"slides-per-view"],"pagination":[4],"centered":[4],"loop":[4],"direction":[1537],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"swiperScript":[32],"displayAllTitle":[32],"windowWidth":[32],"sliderInstance":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"slideToLoop":[64],"slideNextLoop":[64],"slidePrevLoop":[64],"slideReset":[64],"slideToClosest":[64],"update":[64],"updateAutoHeight":[64],"updateSlides":[64],"updateProgress":[64],"updateSlidesClasses":[64],"getSlides":[64],"updateSize":[64],"sliderInit":[64],"thumbsSliderInstance":[64],"thumbsSliderInit":[64],"thumbsSliderUpdate":[64],"thumbsSliderUpdateSlides":[64],"getThumbsUpdateSize":[64],"thumbsSlideTo":[64],"getThumbsSlides":[64]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}],[0,"salla-tel-input",{"phone":[1025],"autofocus":[516],"name":[1],"disabled":[4],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]},[[0,"keyup","handleKeyUp"]],{"visible":["handleVisible"]}],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"type":[513],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["p-30d7fdbe",[[0,"salla-booking-field",{"option":[16],"productId":[2,"product-id"],"bookNowLabel":[32],"editLabel":[32],"bookedLabel":[32],"selectDate":[32],"bookingUrl":[32],"iframeReady":[32],"reservations":[32],"reservationsInput":[32]}],[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-e2f8e416",[[0,"salla-price-range",{"minPrice":[1032,"min-price"],"maxPrice":[1032,"max-price"],"option":[16],"filtersData":[520,"filters-data"],"min":[32],"max":[32],"priceOptions":[32],"moreThanLabel":[32],"lessThanLabel":[32],"toLabel":[32],"fromLabel":[32],"typing":[32],"isMin":[32],"isRTL":[32],"reset":[64]}]]]]'),e)}));
|
|
5
5
|
//# sourceMappingURL=twilight.esm.js.map
|
|
@@ -115,7 +115,7 @@ DOMTokenList
|
|
|
115
115
|
var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
|
|
116
116
|
var start = function() {
|
|
117
117
|
// if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
|
|
118
|
-
var url = new URL('./p-
|
|
118
|
+
var url = new URL('./p-BpP5yEur.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
|
|
119
119
|
System.import(url.href);
|
|
120
120
|
};
|
|
121
121
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salla.sa/twilight-components",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.243",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"author": "Salla Team <support@salla.dev> (https://salla.dev)",
|
|
6
6
|
"bugs": {
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"typescript": "^5.4.5"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@salla.sa/applepay": "2.14.
|
|
84
|
-
"@salla.sa/twilight": "2.14.
|
|
85
|
-
"@salla.sa/twilight-tailwind-theme": "2.14.
|
|
83
|
+
"@salla.sa/applepay": "2.14.243",
|
|
84
|
+
"@salla.sa/twilight": "2.14.243",
|
|
85
|
+
"@salla.sa/twilight-tailwind-theme": "2.14.243",
|
|
86
86
|
"@types/node": "^20.4.8",
|
|
87
87
|
"animejs": "^3.2.2",
|
|
88
88
|
"filepond": "^4.30.6",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"vanilla-lazyload": "^17.8.5",
|
|
101
101
|
"vanilla-picker": "^2.12.2"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "10443847d08f0ce8f963f3f1ccf69f9743acdea3"
|
|
104
104
|
}
|