@salla.sa/twilight-components 2.14.165 → 2.14.167
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/{Helper-CNYy9P5b.js → Helper-u2kVaP5K.js} +15 -10
- package/dist/cjs/{Helper-CNYy9P5b.js.map → Helper-u2kVaP5K.js.map} +1 -1
- package/dist/cjs/{app-globals-CLKa7CxZ.js → app-globals-CqcxWCqd.js} +3 -3
- package/dist/cjs/{app-globals-CLKa7CxZ.js.map → app-globals-CqcxWCqd.js.map} +1 -1
- package/dist/cjs/{index-DwI-asuB.js → index-D-KtTWOY.js} +4 -4
- package/dist/cjs/{index-DwI-asuB.js.map → index-D-KtTWOY.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-add-product-button_49.cjs.entry.js +2 -2
- 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 +3 -3
- package/dist/cjs/salla-conditional-offer.cjs.entry.js.map +1 -1
- package/dist/cjs/salla-conditional-offer.entry.cjs.js.map +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- 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-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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/cjs/salla-reviews.cjs.entry.js +2 -2
- package/dist/cjs/salla-social.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/collection/Helpers/Helper.js +13 -8
- package/dist/collection/Helpers/Helper.js.map +1 -1
- package/dist/collection/components/salla-conditional-offer/interfaces.js.map +1 -1
- package/dist/collection/components/salla-conditional-offer/salla-conditional-offer.js +2 -2
- package/dist/collection/components/salla-conditional-offer/salla-conditional-offer.js.map +1 -1
- package/dist/components/Helper.js +13 -8
- package/dist/components/Helper.js.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/salla-conditional-offer.js +2 -2
- package/dist/components/salla-conditional-offer.js.map +1 -1
- package/dist/esm/{Helper-BrCHOtZG.js → Helper-MNQx5g4A.js} +15 -10
- package/dist/{esm-es5/Helper-BrCHOtZG.js.map → esm/Helper-MNQx5g4A.js.map} +1 -1
- package/dist/esm/{app-globals-BEpO9R3l.js → app-globals-BW7wDI-P.js} +3 -3
- package/dist/esm/{app-globals-BEpO9R3l.js.map → app-globals-BW7wDI-P.js.map} +1 -1
- package/dist/esm/{index-J7qEULJ3.js → index-HB9ZridH.js} +4 -4
- package/dist/esm/{index-J7qEULJ3.js.map → index-HB9ZridH.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-add-product-button_49.entry.js +2 -2
- 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 +3 -3
- package/dist/esm/salla-conditional-offer.entry.js.map +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +2 -2
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/esm/salla-reviews.entry.js +2 -2
- package/dist/esm/salla-social.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/{Helper-BrCHOtZG.js → Helper-MNQx5g4A.js} +3 -3
- package/dist/{esm/Helper-BrCHOtZG.js.map → esm-es5/Helper-MNQx5g4A.js.map} +1 -1
- package/dist/esm-es5/{app-globals-BEpO9R3l.js → app-globals-BW7wDI-P.js} +2 -2
- package/dist/esm-es5/{app-globals-BEpO9R3l.js.map → app-globals-BW7wDI-P.js.map} +1 -1
- package/dist/esm-es5/{index-J7qEULJ3.js → index-HB9ZridH.js} +3 -3
- package/dist/esm-es5/{index-J7qEULJ3.js.map → index-HB9ZridH.js.map} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-add-product-button_49.entry.js +4 -4
- 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-conditional-offer.entry.js.map +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-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-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-f61f99af.system.entry.js → p-018a4264.system.entry.js} +2 -2
- package/dist/twilight/{p-c44a640c.system.entry.js → p-0adaa176.system.entry.js} +2 -2
- package/dist/twilight/{p-de71b833.system.entry.js → p-0b0da808.system.entry.js} +2 -2
- package/dist/twilight/{p-82a852e2.entry.js → p-115ce83d.entry.js} +2 -2
- package/dist/twilight/{p-c67dc90e.entry.js → p-11a0fecd.entry.js} +2 -2
- package/dist/twilight/{p-11e9d88e.entry.js → p-140a0990.entry.js} +2 -2
- package/dist/twilight/{p-1a2823ab.system.entry.js → p-18082ec1.system.entry.js} +2 -2
- package/dist/twilight/{p-3207c8af.entry.js → p-1af9dbf8.entry.js} +2 -2
- package/dist/twilight/{p-5acb00e9.entry.js → p-1c53591a.entry.js} +2 -2
- package/dist/twilight/{p-caedd7b1.system.entry.js → p-25cbcf1c.system.entry.js} +2 -2
- package/dist/twilight/{p-780b5680.system.entry.js → p-27aebbcd.system.entry.js} +2 -2
- package/dist/twilight/{p-ad217e73.entry.js → p-2b99b086.entry.js} +2 -2
- package/dist/twilight/{p-8b2a752d.entry.js → p-2d1f7977.entry.js} +2 -2
- package/dist/twilight/{p-9a6cff9b.entry.js → p-3a78e4d7.entry.js} +2 -2
- package/dist/twilight/{p-8e27602f.entry.js → p-3ab4a46b.entry.js} +2 -2
- package/dist/twilight/{p-3fc1e9c7.entry.js → p-3cfec44f.entry.js} +2 -2
- package/dist/twilight/{p-ef420f46.system.entry.js → p-3dbc2c39.system.entry.js} +2 -2
- package/dist/twilight/{p-de943b4a.system.entry.js → p-42e676d3.system.entry.js} +6 -6
- package/dist/twilight/{p-c0834115.entry.js → p-4ead18f6.entry.js} +2 -2
- package/dist/twilight/{p-D_SLvvpC.system.js → p-4qgD8zrp.system.js} +3 -3
- package/dist/twilight/{p-D_SLvvpC.system.js.map → p-4qgD8zrp.system.js.map} +1 -1
- package/dist/twilight/p-4xZSWcLX.system.js.map +1 -0
- package/dist/twilight/{p-a477a2e9.system.entry.js → p-54d76fcb.system.entry.js} +2 -2
- package/dist/twilight/{p-1a72da5e.entry.js → p-571fd3fe.entry.js} +2 -2
- package/dist/twilight/{p-dc401a12.entry.js → p-62e836b7.entry.js} +2 -2
- package/dist/twilight/{p-64b972d6.system.entry.js → p-63c55af5.system.entry.js} +2 -2
- package/dist/twilight/{p-06b0e8a2.system.entry.js → p-657759bd.system.entry.js} +2 -2
- package/dist/twilight/{p-db0e816c.entry.js → p-65a5aea9.entry.js} +2 -2
- package/dist/twilight/{p-fbd83058.system.entry.js → p-6969cf59.system.entry.js} +2 -2
- package/dist/twilight/{p-294c65f5.system.entry.js → p-6b8b9a13.system.entry.js} +2 -2
- package/dist/twilight/{p-64e7ca31.entry.js → p-777b4d0d.entry.js} +2 -2
- package/dist/twilight/{p-1eb39a14.entry.js → p-7b4e7a7e.entry.js} +2 -2
- package/dist/twilight/p-7f3c4a51.system.entry.js +5 -0
- package/dist/twilight/p-7f3c4a51.system.entry.js.map +1 -0
- package/dist/twilight/{p-0a32cc75.system.entry.js → p-83c8210e.system.entry.js} +2 -2
- package/dist/twilight/{p-a3687a63.entry.js → p-95846a36.entry.js} +2 -2
- package/dist/twilight/{p-a8df268a.system.entry.js → p-9b5db207.system.entry.js} +2 -2
- package/dist/twilight/{p-5168f09e.entry.js → p-9d53cdd8.entry.js} +2 -2
- package/dist/twilight/{p-a01e293f.entry.js → p-9f0d1bdc.entry.js} +2 -2
- package/dist/twilight/{p-CorPzHaH.system.js → p-BDAthD3J.system.js} +3 -3
- package/dist/twilight/{p-CorPzHaH.system.js.map → p-BDAthD3J.system.js.map} +1 -1
- package/dist/twilight/{p-DJiizJ4b.system.js.map → p-BQvQcx7N.system.js.map} +1 -1
- package/dist/twilight/{p-DV89BlHK.system.js.map → p-BTHAzAMQ.system.js.map} +1 -1
- package/dist/twilight/{p-Bc9mP0Tj.js → p-BqMvN5Kj.js} +2 -2
- package/dist/twilight/{p-Bc9mP0Tj.js.map → p-BqMvN5Kj.js.map} +1 -1
- package/dist/twilight/{p-DoNnqGCA.system.js.map → p-Bu3GSKpN.system.js.map} +1 -1
- package/dist/twilight/{p-5qHOiOEG.system.js → p-CD871YNy.system.js} +2 -2
- package/dist/twilight/{p-5qHOiOEG.system.js.map → p-CD871YNy.system.js.map} +1 -1
- package/dist/twilight/{p-DZBSYZ_d.system.js.map → p-CQNKVsuc.system.js.map} +1 -1
- package/dist/twilight/{p-h7cV22mx.system.js.map → p-Cbo6DTNd.system.js.map} +1 -1
- package/dist/twilight/{p-Dm_LtWrx.system.js.map → p-CfbhNoJK.system.js.map} +1 -1
- package/dist/twilight/{p-CedhiSw6.system.js → p-CqnUDkqq.system.js} +2 -2
- package/dist/twilight/{p-CedhiSw6.system.js.map → p-CqnUDkqq.system.js.map} +1 -1
- package/dist/twilight/{p-DCUj41Mt.system.js.map → p-CxoV9-M0.system.js.map} +1 -1
- package/dist/twilight/{p-B3rGe_Hy.system.js.map → p-D4UzUaL6.system.js.map} +1 -1
- package/dist/twilight/{p-CHgtzste.system.js.map → p-D8gru-kY.system.js.map} +1 -1
- package/dist/twilight/{p-BPyD0Crl.system.js.map → p-DCau09Ja.system.js.map} +1 -1
- package/dist/twilight/{p-D1_lKraG.js → p-DPqQW4oH.js} +2 -2
- package/dist/twilight/{p-D1_lKraG.js.map → p-DPqQW4oH.js.map} +1 -1
- package/dist/twilight/{p-BYFZi_tY.system.js.map → p-DU96usjD.system.js.map} +1 -1
- package/dist/twilight/{p-C_1hB8Jw.system.js.map → p-DVm8JX0_.system.js.map} +1 -1
- package/dist/twilight/{p-BUAKEoUt.system.js.map → p-Dc1sSeqy.system.js.map} +1 -1
- package/dist/twilight/{p-xsz6hPFN.system.js.map → p-DiOMIMGR.system.js.map} +1 -1
- package/dist/twilight/{p-CM0EfxV2.system.js.map → p-DnQPJ8nb.system.js.map} +1 -1
- package/dist/twilight/{p-hv0AIHfN.system.js.map → p-DtJ60QVH.system.js.map} +1 -1
- package/dist/twilight/{p-DsQCMe-l.system.js.map → p-DtzirMaL.system.js.map} +1 -1
- package/dist/twilight/{p-J7qEULJ3.js → p-HB9ZridH.js} +3 -3
- package/dist/twilight/{p-J7qEULJ3.js.map → p-HB9ZridH.js.map} +1 -1
- package/dist/twilight/{p-CHCjS-hz.system.js.map → p-IKkAUd7v.system.js.map} +1 -1
- package/dist/twilight/{p-DHW_modQ.system.js.map → p-JNV6VoJP.system.js.map} +1 -1
- package/dist/twilight/{p-xrI_N8qW.system.js.map → p-JsJqzbss.system.js.map} +1 -1
- package/dist/twilight/{p-D7zFhKev.system.js.map → p-KCNcL1Nf.system.js.map} +1 -1
- package/dist/twilight/{p-Bi4sZblK.system.js.map → p-MTv28B5b.system.js.map} +1 -1
- package/dist/twilight/{p-BU3cD5wy.system.js.map → p-NwgMlLD3.system.js.map} +1 -1
- package/dist/twilight/{p-Bj9dDUF7.system.js.map → p-Rx3u4GRS.system.js.map} +1 -1
- package/dist/twilight/{p-CIHC34It.system.js.map → p-YoeZhUmk.system.js.map} +1 -1
- package/dist/twilight/{p-O4oN54iK.system.js.map → p-bH2k6BVg.system.js.map} +1 -1
- package/dist/twilight/{p-132bdb8f.system.entry.js → p-ba627edf.system.entry.js} +2 -2
- package/dist/twilight/{p-6edbf189.system.entry.js → p-bff46bc5.system.entry.js} +2 -2
- package/dist/twilight/{p-5c2dd4e1.entry.js → p-c8c58cb2.entry.js} +2 -2
- package/dist/twilight/{p-6s6OLvTX.system.js.map → p-cEbMaIWW.system.js.map} +1 -1
- package/dist/twilight/{p-621aac4b.system.entry.js → p-cc093f3f.system.entry.js} +2 -2
- package/dist/twilight/{p-dab1d726.entry.js → p-ccb0d6ba.entry.js} +2 -2
- package/dist/twilight/{p-c6a68b34.entry.js → p-d801fe6e.entry.js} +7 -7
- package/dist/twilight/{p-b37f2115.system.entry.js → p-d97da348.system.entry.js} +2 -2
- package/dist/twilight/{p-52da4b80.entry.js → p-dc42fa00.entry.js} +2 -2
- package/dist/twilight/{p-085e9df1.system.entry.js → p-deaef62c.system.entry.js} +2 -2
- package/dist/twilight/{p-b4d7d84c.system.entry.js → p-e4995b27.system.entry.js} +2 -2
- package/dist/twilight/{p-31173585.system.entry.js → p-e5dd5833.system.entry.js} +2 -2
- package/dist/twilight/{p-3a2a5a42.system.entry.js → p-e694d085.system.entry.js} +2 -2
- package/dist/twilight/{p-fe494a9f.system.entry.js → p-e7a279f5.system.entry.js} +2 -2
- package/dist/twilight/{p-73d4057c.entry.js → p-e7a9c16d.entry.js} +2 -2
- package/dist/twilight/{p-d7f28b04.system.entry.js → p-eb73d789.system.entry.js} +2 -2
- package/dist/twilight/{p-34b659b8.system.entry.js → p-ee38e0ca.system.entry.js} +2 -2
- package/dist/twilight/{p-3bec12f2.entry.js → p-f4fa6e8a.entry.js} +2 -2
- package/dist/twilight/{p-bc8ab410.entry.js → p-f935e6b0.entry.js} +2 -2
- package/dist/twilight/{p-2acdaacb.entry.js → p-fac2eb83.entry.js} +2 -2
- package/dist/twilight/p-ffad31bf.entry.js +5 -0
- package/dist/twilight/p-ffad31bf.entry.js.map +1 -0
- package/dist/twilight/{p-f3c2a247.system.entry.js → p-fff3ded4.system.entry.js} +2 -2
- package/dist/twilight/{p-Dcd-LDR-.system.js.map → p-jANnJoRR.system.js.map} +1 -1
- package/dist/twilight/salla-conditional-offer.entry.esm.js.map +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/dist/types/Helpers/Helper.d.ts +6 -4
- package/dist/types/components/salla-conditional-offer/interfaces.d.ts +1 -1
- package/package.json +5 -5
- package/dist/twilight/p-6d3f3ed2.system.entry.js +0 -5
- package/dist/twilight/p-6d3f3ed2.system.entry.js.map +0 -1
- package/dist/twilight/p-Diwt86HM.system.js.map +0 -1
- package/dist/twilight/p-e4c31868.entry.js +0 -5
- package/dist/twilight/p-e4c31868.entry.js.map +0 -1
- /package/dist/twilight/{p-f61f99af.system.entry.js.map → p-018a4264.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-c44a640c.system.entry.js.map → p-0adaa176.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-de71b833.system.entry.js.map → p-0b0da808.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-82a852e2.entry.js.map → p-115ce83d.entry.js.map} +0 -0
- /package/dist/twilight/{p-c67dc90e.entry.js.map → p-11a0fecd.entry.js.map} +0 -0
- /package/dist/twilight/{p-11e9d88e.entry.js.map → p-140a0990.entry.js.map} +0 -0
- /package/dist/twilight/{p-1a2823ab.system.entry.js.map → p-18082ec1.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3207c8af.entry.js.map → p-1af9dbf8.entry.js.map} +0 -0
- /package/dist/twilight/{p-5acb00e9.entry.js.map → p-1c53591a.entry.js.map} +0 -0
- /package/dist/twilight/{p-caedd7b1.system.entry.js.map → p-25cbcf1c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-780b5680.system.entry.js.map → p-27aebbcd.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-ad217e73.entry.js.map → p-2b99b086.entry.js.map} +0 -0
- /package/dist/twilight/{p-8b2a752d.entry.js.map → p-2d1f7977.entry.js.map} +0 -0
- /package/dist/twilight/{p-9a6cff9b.entry.js.map → p-3a78e4d7.entry.js.map} +0 -0
- /package/dist/twilight/{p-8e27602f.entry.js.map → p-3ab4a46b.entry.js.map} +0 -0
- /package/dist/twilight/{p-3fc1e9c7.entry.js.map → p-3cfec44f.entry.js.map} +0 -0
- /package/dist/twilight/{p-ef420f46.system.entry.js.map → p-3dbc2c39.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-de943b4a.system.entry.js.map → p-42e676d3.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-c0834115.entry.js.map → p-4ead18f6.entry.js.map} +0 -0
- /package/dist/twilight/{p-a477a2e9.system.entry.js.map → p-54d76fcb.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-1a72da5e.entry.js.map → p-571fd3fe.entry.js.map} +0 -0
- /package/dist/twilight/{p-dc401a12.entry.js.map → p-62e836b7.entry.js.map} +0 -0
- /package/dist/twilight/{p-64b972d6.system.entry.js.map → p-63c55af5.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-06b0e8a2.system.entry.js.map → p-657759bd.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-db0e816c.entry.js.map → p-65a5aea9.entry.js.map} +0 -0
- /package/dist/twilight/{p-fbd83058.system.entry.js.map → p-6969cf59.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-294c65f5.system.entry.js.map → p-6b8b9a13.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-64e7ca31.entry.js.map → p-777b4d0d.entry.js.map} +0 -0
- /package/dist/twilight/{p-1eb39a14.entry.js.map → p-7b4e7a7e.entry.js.map} +0 -0
- /package/dist/twilight/{p-0a32cc75.system.entry.js.map → p-83c8210e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-a3687a63.entry.js.map → p-95846a36.entry.js.map} +0 -0
- /package/dist/twilight/{p-a8df268a.system.entry.js.map → p-9b5db207.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-5168f09e.entry.js.map → p-9d53cdd8.entry.js.map} +0 -0
- /package/dist/twilight/{p-a01e293f.entry.js.map → p-9f0d1bdc.entry.js.map} +0 -0
- /package/dist/twilight/{p-132bdb8f.system.entry.js.map → p-ba627edf.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6edbf189.system.entry.js.map → p-bff46bc5.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-5c2dd4e1.entry.js.map → p-c8c58cb2.entry.js.map} +0 -0
- /package/dist/twilight/{p-621aac4b.system.entry.js.map → p-cc093f3f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-dab1d726.entry.js.map → p-ccb0d6ba.entry.js.map} +0 -0
- /package/dist/twilight/{p-c6a68b34.entry.js.map → p-d801fe6e.entry.js.map} +0 -0
- /package/dist/twilight/{p-b37f2115.system.entry.js.map → p-d97da348.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-52da4b80.entry.js.map → p-dc42fa00.entry.js.map} +0 -0
- /package/dist/twilight/{p-085e9df1.system.entry.js.map → p-deaef62c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-b4d7d84c.system.entry.js.map → p-e4995b27.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-31173585.system.entry.js.map → p-e5dd5833.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3a2a5a42.system.entry.js.map → p-e694d085.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-fe494a9f.system.entry.js.map → p-e7a279f5.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-73d4057c.entry.js.map → p-e7a9c16d.entry.js.map} +0 -0
- /package/dist/twilight/{p-d7f28b04.system.entry.js.map → p-eb73d789.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-34b659b8.system.entry.js.map → p-ee38e0ca.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3bec12f2.entry.js.map → p-f4fa6e8a.entry.js.map} +0 -0
- /package/dist/twilight/{p-bc8ab410.entry.js.map → p-f935e6b0.entry.js.map} +0 -0
- /package/dist/twilight/{p-2acdaacb.entry.js.map → p-fac2eb83.entry.js.map} +0 -0
- /package/dist/twilight/{p-f3c2a247.system.entry.js.map → p-fff3ded4.system.entry.js.map} +0 -0
package/dist/esm/loader.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { b as bootstrapLazy } from './index-
|
|
5
|
-
export { s as setNonce } from './index-
|
|
6
|
-
import { g as globalScripts } from './app-globals-
|
|
4
|
+
import { b as bootstrapLazy } from './index-HB9ZridH.js';
|
|
5
|
+
export { s as setNonce } from './index-HB9ZridH.js';
|
|
6
|
+
import { g as globalScripts } from './app-globals-BW7wDI-P.js';
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement, f as getDefaultExportFromCjs, F as Fragment, i as axios } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement, f as getDefaultExportFromCjs, F as Fragment, i as axios } from './index-HB9ZridH.js';
|
|
5
5
|
import { a as anime } from './anime.es-CgtvEd63.js';
|
|
6
6
|
import { A as ArrowDownIcon, S as SpecialDiscountIcon } from './special-discount-yRO-ZESF.js';
|
|
7
7
|
import { I as IconVerified } from './check-uTyAzPSy.js';
|
|
8
|
-
import { H as Helper } from './Helper-
|
|
8
|
+
import { H as Helper } from './Helper-MNQx5g4A.js';
|
|
9
9
|
import { a as arrowLeft } from './arrow-left-BedNk7k1.js';
|
|
10
10
|
import { S as ShoppingBag } from './shopping-bag-DiKTtDW5.js';
|
|
11
11
|
import { M as MailIcon } from './mail-DmgxDvXL.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, g as getElement } from './index-HB9ZridH.js';
|
|
5
5
|
import { a as anime } from './anime.es-CgtvEd63.js';
|
|
6
6
|
|
|
7
7
|
const sallaAdvertisementCss = ":host{display:block}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-HB9ZridH.js';
|
|
5
5
|
|
|
6
6
|
const sallaAppInstallAlertCss = ":host{display:block}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-HB9ZridH.js';
|
|
5
5
|
|
|
6
6
|
const sallaAppsIconsCss = ":host{display:block}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-HB9ZridH.js';
|
|
5
5
|
|
|
6
6
|
var BookingTime = `<!-- Generated by IcoMoon.io -->
|
|
7
7
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h } from './index-
|
|
4
|
+
import { r as registerInstance, h } from './index-HB9ZridH.js';
|
|
5
5
|
import { S as SpecialDiscountIcon, A as ArrowDownIcon } from './special-discount-yRO-ZESF.js';
|
|
6
6
|
|
|
7
7
|
var GiftIcon = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-HB9ZridH.js';
|
|
5
5
|
|
|
6
6
|
var DiscountType;
|
|
7
7
|
(function (DiscountType) {
|
|
@@ -62,9 +62,9 @@ const SallaConditionalOffer = class {
|
|
|
62
62
|
updateInitialOfferValue() {
|
|
63
63
|
return salla.api.cart.details().then(({ data: { cart } }) => this.updateOfferValues(cart));
|
|
64
64
|
}
|
|
65
|
-
updateOfferValues({ items,
|
|
65
|
+
updateOfferValues({ items, sub_total }) {
|
|
66
66
|
var _a;
|
|
67
|
-
const current_value = this.offer.details.based_on === OfferType.PRODUCT_COUNT ? items.reduce((count, { quantity }) => count + quantity, 0) :
|
|
67
|
+
const current_value = this.offer.details.based_on === OfferType.PRODUCT_COUNT ? items.reduce((count, { quantity }) => count + quantity, 0) : sub_total;
|
|
68
68
|
//we need to assign the offer object a new reference to trigger re-rendering
|
|
69
69
|
this.offer = Object.assign(Object.assign({}, this.offer), { details: Object.assign(Object.assign({}, (_a = this.offer) === null || _a === void 0 ? void 0 : _a.details), { current_value }) });
|
|
70
70
|
return this.offer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"salla-conditional-offer.entry.js","sources":["src/components/salla-conditional-offer/interfaces.ts","src/components/salla-conditional-offer/salla-conditional-offer.scss?tag=salla-conditional-offer","src/components/salla-conditional-offer/salla-conditional-offer.tsx"],"sourcesContent":["import type { Product } from \"@salla.sa/twilight/types/common\";\n\nexport enum DiscountType {\n PERCENTAGE = \"percentage\",\n FIXED = \"fixed\",\n FREE_PRODUCT = \"free_product\",\n}\n\nexport enum OfferType {\n PRODUCT_COUNT = \"products_count\",\n PRODUCT_PURCHASE = \"order_amount\",\n}\n\nexport interface Discount {\n type?: DiscountType;\n value?: number;\n min_spend?: number;\n max_discount?: number;\n}\n\nexport interface OfferDetails {\n based_on?: OfferType;\n ends_at?: number;\n start_value?: number;\n end_value?: number;\n current_value?: number;\n discounts?: Discount[];\n}\n\nexport interface Offer {\n id?: number;\n type?: string;\n title?: string;\n description?: string;\n details?: OfferDetails | null;\n}\n\n\nexport interface ProductDetail {\n id?: number;\n sku?: string;\n name?: string;\n description?: string;\n url?: string;\n promotion_title?: null;\n subtitle?: null;\n type?: string;\n status?: string;\n price?: number;\n base_currency_price?: BaseCurrencyPrice;\n sale_price?: number;\n regular_price?: number;\n starting_price?: null;\n quantity?: null;\n max_quantity?: number;\n discount_ends?: null;\n is_taxable?: boolean;\n has_read_more?: boolean;\n can_add_note?: boolean;\n can_show_remained_quantity?: boolean;\n can_upload_file?: boolean;\n has_custom_form?: boolean;\n has_metadata?: boolean;\n is_on_sale?: boolean;\n is_hidden_quantity?: boolean;\n is_available?: boolean;\n is_out_of_stock?: boolean;\n is_require_shipping?: boolean;\n weight?: null;\n calories?: null;\n image?: Image;\n currency?: string;\n}\n\nexport interface BaseCurrencyPrice {\n currency?: string;\n amount?: number;\n}\n\nexport interface Image {\n url?: string;\n alt?: string;\n}\n\nexport interface UpdatedCart {\n items: Array<Product>;\n total: number;\n}\n",":host {\n display: block;\n}","import { Component, Host, State, h } from \"@stencil/core\";\nimport {\n type Discount,\n DiscountType,\n type Offer,\n OfferType,\n type UpdatedCart,\n} from \"./interfaces\";\nimport type { Product } from \"@salla.sa/twilight/types/common\";\n\n@Component({\n tag: \"salla-conditional-offer\",\n styleUrl: \"salla-conditional-offer.scss\",\n})\nexport class SallaConditionalOffer {\n\n @State() offer: Offer = null;\n @State() products: Record<string, Pick<Product, 'image' | 'url'>> = {}\n @State() isLoading = true\n @State() canRender = true\n\n componentWillLoad() {\n salla.onReady().then(() => {\n if (!salla.config.get('store.features')?.includes('conditional-offer') || (salla.storage.get(\"cart\") !== '' && !salla.storage.get(\"cart\")?.summary?.count)) {\n throw new Error('feature or cart object does not existed');\n }\n })\n .then(() => salla.api.cart.offers())\n .then(({ data }: { data: Offer[] }) => {\n //it's okay if there is an exception here, all thens will be skipped, and will catch the error,\n this.offer = data.find(offer => offer.type === \"conditional\")\n\n if (!this.offer) {\n throw new Error('No conditional offer has been activated in the merchant dashboard');\n }\n\n this.offer.details.discounts.unshift(({ value: 0, min_spend: 0 }))\n return this.updateInitialOfferValue()\n }).then(() => this.getProducts()).then(() => salla.event.on(\"cart::updated\", (updatedCart: UpdatedCart) => this.updateOfferValues(updatedCart)))\n .catch(error => {\n this.canRender = false\n salla.logger.warn('salla-conditional-offer:: ', error)\n }).finally(() => {\n this.isLoading = false\n })\n\n }\n\n private getProducts() {\n const freeProductIDs = this.offer.details.discounts.filter(({ type }) => type === DiscountType.FREE_PRODUCT).map(({ value }) => value)\n if (freeProductIDs.length > 0) {\n return salla.product.fetch({ source: 'selected', source_value: freeProductIDs }).then(({ data }: { data: Array<Product> }) => {\n data.forEach(({ id, url, image }) => {\n this.products[id] = { url, image }\n })\n })\n }\n }\n\n private updateInitialOfferValue() {\n return salla.api.cart.details().then(({ data: { cart } }: { data: { cart: UpdatedCart } }) => this.updateOfferValues(cart))\n }\n\n private updateOfferValues({ items, total }: UpdatedCart) {\n const current_value = this.offer.details.based_on === OfferType.PRODUCT_COUNT ? items.reduce((count: number, { quantity }) => count + quantity, 0,) : total\n //we need to assign the offer object a new reference to trigger re-rendering\n this.offer = {\n ...this.offer, details: {\n ...this.offer?.details, current_value,\n }\n }\n return this.offer\n }\n\n private getCheckpointContent(discount: Discount) {\n\n if (discount.type === DiscountType.PERCENTAGE) return `${discount.value}%`\n\n if (discount.type === DiscountType.FIXED) return salla.money(discount.value)\n\n if (discount.type !== DiscountType.FREE_PRODUCT) {\n salla.logger.error(`salla-conditional-offer:: unexpected type (${discount.type})!`);\n return \"\";\n }\n\n const productItem = this.products[discount.value]\n\n if (!productItem) {\n salla.logger.error(`salla-conditional-offer:: there is no product with id (${discount.value})!`);\n return \"\";\n }\n\n return <a class=\"s-conditional-offer-product-link\" href={productItem.url} >\n <img\n class=\"s-conditional-offer-checkpoint-image-content\"\n loading=\"lazy\"\n decoding=\"async\"\n alt={productItem?.image?.alt || \"\"}\n src={productItem?.image?.url} />\n </a>\n }\n\n private getOfferType(discount: Discount): string {\n const basedOn = this.offer.details?.based_on;\n if (basedOn === OfferType.PRODUCT_COUNT) return salla.lang.choice(\"blocks.header.products_count\", discount.min_spend);\n if (basedOn === OfferType.PRODUCT_PURCHASE) return salla.money(discount.min_spend);\n\n salla.logger.warn(`salla-conditional-offer:: Unexpected offer detail's based_on value: ${basedOn}`);\n return `${discount.min_spend}`;\n }\n\n private clamp(value: number, min: number, max: number) {\n return Math.max(min, Math.min(value, max));\n }\n\n private mapValueRanges(value: number, initialMinRange: number, initialMaxRange: number, newMinRange: number, newMaxRange: number) {\n\n const newRange = ((value - initialMinRange) * (newMaxRange - newMinRange)) / (initialMaxRange - initialMinRange) + newMinRange;\n\n if (newRange === Number.POSITIVE_INFINITY) return 100\n\n if (newRange === Number.NEGATIVE_INFINITY) return 0\n\n return this.clamp(newRange, 0, 100)\n }\n\n private getCheckPointView(discount: Discount, index: number) {\n const checkpointIndex = this.offer.details.discounts.findIndex(({ min_spend }) => min_spend === discount.min_spend);\n const previousCheckpointValue = this.offer.details.discounts[checkpointIndex - 1]?.min_spend ?? 0;\n const progressPercentage = this.mapValueRanges(this.offer.details.current_value, previousCheckpointValue, discount.min_spend, 0, 100);\n const isActive = discount.min_spend <= this.offer.details.current_value;\n\n return (\n <div class=\"s-conditional-offer-checkpoint-container\">\n {index > 0 ? [\n <div key=\"progress-line\" class=\"s-conditional-offer-progress-line-container\">\n <div class=\"s-conditional-offer-progress-line-inactive\" />\n <div class=\"s-conditional-offer-progress-line-active\" style={{ width: `${progressPercentage}%` }} />\n </div>,\n <div key=\"checkpoint\" class={`s-conditional-offer-checkpoint ${isActive ? \"s-conditional-offer-active-checkpoint\" : \"\"}`} >\n <div class={`s-conditional-offer-item-avatar-content ${isActive ? \"active\" : \"\"}`} innerHTML={this.products && this.getCheckpointContent(discount)}>\n </div>\n <div class={`s-conditional-offer-checkpoint-label ${isActive ? \"active\" : \"\"}`} innerHTML={this.getOfferType(discount)} />\n\n </div>\n ] :\n <div key=\"label\" class={{ \"s-conditional-offer-checkpoint-label\": true, \"first-checkpoint\": index === 0, active: isActive }} innerHTML={this.getOfferType(discount)} />\n }\n </div>\n );\n }\n\n private getLoadingSkeletonView() {\n return <Host class=\"s-conditional-offer-container\" >\n <div class=\"s-conditional-offer-skeleton-inner-container\">\n <div class=\"s-conditional-offer-skeleton-subtitle\">\n <salla-skeleton height=\"16px\" width=\"30%\" />\n </div>\n\n <div class=\"s-conditional-offer-skeleton-subtitle\">\n <salla-skeleton height=\"16px\" width=\"35%\" />\n </div>\n <div class=\"s-conditional-offer-skeleton-checkpoints-wrapper\">\n {Array(3).fill(null).map(() => (\n [<salla-skeleton key=\"checkpoint-line\" height=\"8px\" />,\n <div key=\"checkpoint\">\n <salla-skeleton height=\"60px\" width=\"60px\" type=\"circle\" />\n </div>]\n ))}\n </div>\n\n </div>\n </Host>\n }\n\n render() {\n if (!this.canRender) return null\n if (this.isLoading) return this.getLoadingSkeletonView()\n\n return <Host class=\"s-conditional-offer-container\">\n <div class=\"s-conditional-offer-title-wrapper\">\n <div class=\"s-conditional-offer-title\">{this.offer.title}</div>\n {this.offer.description ? <div class=\"s-conditional-offer-subtitle\">\n {this.offer.description} <i class=\"sicon-information\" />\n </div> : null}\n </div>\n <div class=\"s-conditional-offer-progress-container\">\n {this.offer.details.discounts.map((discount, index) => (\n <div class={{ \"flex-1\": index > 0 }} key={discount.min_spend}>\n {this.getCheckPointView(discount, index)}\n </div>\n ))}\n </div>\n </Host>\n }\n}\n"],"names":[],"mappings":";;;;;AAEA,IAAY,YAIX;AAJD,CAAA,UAAY,YAAY,EAAA;AACpB,IAAA,YAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,YAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,YAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AACjC,CAAC,EAJW,YAAY,KAAZ,YAAY,GAIvB,EAAA,CAAA,CAAA;AAED,IAAY,SAGX;AAHD,CAAA,UAAY,SAAS,EAAA;AACjB,IAAA,SAAA,CAAA,eAAA,CAAA,GAAA,gBAAgC;AAChC,IAAA,SAAA,CAAA,kBAAA,CAAA,GAAA,cAAiC;AACrC,CAAC,EAHW,SAAS,KAAT,SAAS,GAGpB,EAAA,CAAA,CAAA;;ACXD,MAAM,wBAAwB,GAAG,sBAAsB;;MCc1C,qBAAqB,GAAA,MAAA;AAJlC,IAAA,WAAA,CAAA,OAAA,EAAA;;AAMa,QAAA,IAAK,CAAA,KAAA,GAAU,IAAI;AACnB,QAAA,IAAQ,CAAA,QAAA,GAAm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,KAAA,EAAA,EAAA,KAAK,EAAC,2BAA2B,EAAA,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAO,EAC9D,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,8BAA8B,EAAA,EAC9D,IAAI,CAAC,KAAK,CAAC,WAAW,OAAE,CAAG,CAAA,GAAA,EAAA,EAAA,KAAK,EAAC,mBAAmB,EAAA,CAAG,CACtD,GAAG,IAAI,CACX,EACN,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,wCAAwC,EAC9C,EAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,MAC9C,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,QAAQ,CAAC,SAAS,EACvD,EAAA,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,KAAK,CAAC,CACtC,CACT,CAAC,CACA,CACH;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"salla-conditional-offer.entry.js","sources":["src/components/salla-conditional-offer/interfaces.ts","src/components/salla-conditional-offer/salla-conditional-offer.scss?tag=salla-conditional-offer","src/components/salla-conditional-offer/salla-conditional-offer.tsx"],"sourcesContent":["import type { Product } from \"@salla.sa/twilight/types/common\";\n\nexport enum DiscountType {\n PERCENTAGE = \"percentage\",\n FIXED = \"fixed\",\n FREE_PRODUCT = \"free_product\",\n}\n\nexport enum OfferType {\n PRODUCT_COUNT = \"products_count\",\n PRODUCT_PURCHASE = \"order_amount\",\n}\n\nexport interface Discount {\n type?: DiscountType;\n value?: number;\n min_spend?: number;\n max_discount?: number;\n}\n\nexport interface OfferDetails {\n based_on?: OfferType;\n ends_at?: number;\n start_value?: number;\n end_value?: number;\n current_value?: number;\n discounts?: Discount[];\n}\n\nexport interface Offer {\n id?: number;\n type?: string;\n title?: string;\n description?: string;\n details?: OfferDetails | null;\n}\n\n\nexport interface ProductDetail {\n id?: number;\n sku?: string;\n name?: string;\n description?: string;\n url?: string;\n promotion_title?: null;\n subtitle?: null;\n type?: string;\n status?: string;\n price?: number;\n base_currency_price?: BaseCurrencyPrice;\n sale_price?: number;\n regular_price?: number;\n starting_price?: null;\n quantity?: null;\n max_quantity?: number;\n discount_ends?: null;\n is_taxable?: boolean;\n has_read_more?: boolean;\n can_add_note?: boolean;\n can_show_remained_quantity?: boolean;\n can_upload_file?: boolean;\n has_custom_form?: boolean;\n has_metadata?: boolean;\n is_on_sale?: boolean;\n is_hidden_quantity?: boolean;\n is_available?: boolean;\n is_out_of_stock?: boolean;\n is_require_shipping?: boolean;\n weight?: null;\n calories?: null;\n image?: Image;\n currency?: string;\n}\n\nexport interface BaseCurrencyPrice {\n currency?: string;\n amount?: number;\n}\n\nexport interface Image {\n url?: string;\n alt?: string;\n}\n\nexport interface UpdatedCart {\n items: Array<Product>;\n sub_total: number;\n}\n",":host {\n display: block;\n}","import { Component, Host, State, h } from \"@stencil/core\";\nimport {\n type Discount,\n DiscountType,\n type Offer,\n OfferType,\n type UpdatedCart,\n} from \"./interfaces\";\nimport type { Product } from \"@salla.sa/twilight/types/common\";\n\n@Component({\n tag: \"salla-conditional-offer\",\n styleUrl: \"salla-conditional-offer.scss\",\n})\nexport class SallaConditionalOffer {\n\n @State() offer: Offer = null;\n @State() products: Record<string, Pick<Product, 'image' | 'url'>> = {}\n @State() isLoading = true\n @State() canRender = true\n\n componentWillLoad() {\n salla.onReady().then(() => {\n if (!salla.config.get('store.features')?.includes('conditional-offer') || (salla.storage.get(\"cart\") !== '' && !salla.storage.get(\"cart\")?.summary?.count)) {\n throw new Error('feature or cart object does not existed');\n }\n })\n .then(() => salla.api.cart.offers())\n .then(({ data }: { data: Offer[] }) => {\n //it's okay if there is an exception here, all thens will be skipped, and will catch the error,\n this.offer = data.find(offer => offer.type === \"conditional\")\n\n if (!this.offer) {\n throw new Error('No conditional offer has been activated in the merchant dashboard');\n }\n\n this.offer.details.discounts.unshift(({ value: 0, min_spend: 0 }))\n return this.updateInitialOfferValue()\n }).then(() => this.getProducts()).then(() => salla.event.on(\"cart::updated\", (updatedCart: UpdatedCart) => this.updateOfferValues(updatedCart)))\n .catch(error => {\n this.canRender = false\n salla.logger.warn('salla-conditional-offer:: ', error)\n }).finally(() => {\n this.isLoading = false\n })\n\n }\n\n private getProducts() {\n const freeProductIDs = this.offer.details.discounts.filter(({ type }) => type === DiscountType.FREE_PRODUCT).map(({ value }) => value)\n if (freeProductIDs.length > 0) {\n return salla.product.fetch({ source: 'selected', source_value: freeProductIDs }).then(({ data }: { data: Array<Product> }) => {\n data.forEach(({ id, url, image }) => {\n this.products[id] = { url, image }\n })\n })\n }\n }\n\n private updateInitialOfferValue() {\n return salla.api.cart.details().then(({ data: { cart } }: { data: { cart: UpdatedCart } }) => this.updateOfferValues(cart))\n }\n\n private updateOfferValues({ items, sub_total }: UpdatedCart) {\n const current_value = this.offer.details.based_on === OfferType.PRODUCT_COUNT ? items.reduce((count: number, { quantity }) => count + quantity, 0,) : sub_total\n //we need to assign the offer object a new reference to trigger re-rendering\n this.offer = {\n ...this.offer, details: {\n ...this.offer?.details, current_value,\n }\n }\n return this.offer\n }\n\n private getCheckpointContent(discount: Discount) {\n\n if (discount.type === DiscountType.PERCENTAGE) return `${discount.value}%`\n\n if (discount.type === DiscountType.FIXED) return salla.money(discount.value)\n\n if (discount.type !== DiscountType.FREE_PRODUCT) {\n salla.logger.error(`salla-conditional-offer:: unexpected type (${discount.type})!`);\n return \"\";\n }\n\n const productItem = this.products[discount.value]\n\n if (!productItem) {\n salla.logger.error(`salla-conditional-offer:: there is no product with id (${discount.value})!`);\n return \"\";\n }\n\n return <a class=\"s-conditional-offer-product-link\" href={productItem.url} >\n <img\n class=\"s-conditional-offer-checkpoint-image-content\"\n loading=\"lazy\"\n decoding=\"async\"\n alt={productItem?.image?.alt || \"\"}\n src={productItem?.image?.url} />\n </a>\n }\n\n private getOfferType(discount: Discount): string {\n const basedOn = this.offer.details?.based_on;\n if (basedOn === OfferType.PRODUCT_COUNT) return salla.lang.choice(\"blocks.header.products_count\", discount.min_spend);\n if (basedOn === OfferType.PRODUCT_PURCHASE) return salla.money(discount.min_spend);\n\n salla.logger.warn(`salla-conditional-offer:: Unexpected offer detail's based_on value: ${basedOn}`);\n return `${discount.min_spend}`;\n }\n\n private clamp(value: number, min: number, max: number) {\n return Math.max(min, Math.min(value, max));\n }\n\n private mapValueRanges(value: number, initialMinRange: number, initialMaxRange: number, newMinRange: number, newMaxRange: number) {\n\n const newRange = ((value - initialMinRange) * (newMaxRange - newMinRange)) / (initialMaxRange - initialMinRange) + newMinRange;\n\n if (newRange === Number.POSITIVE_INFINITY) return 100\n\n if (newRange === Number.NEGATIVE_INFINITY) return 0\n\n return this.clamp(newRange, 0, 100)\n }\n\n private getCheckPointView(discount: Discount, index: number) {\n const checkpointIndex = this.offer.details.discounts.findIndex(({ min_spend }) => min_spend === discount.min_spend);\n const previousCheckpointValue = this.offer.details.discounts[checkpointIndex - 1]?.min_spend ?? 0;\n const progressPercentage = this.mapValueRanges(this.offer.details.current_value, previousCheckpointValue, discount.min_spend, 0, 100);\n const isActive = discount.min_spend <= this.offer.details.current_value;\n\n return (\n <div class=\"s-conditional-offer-checkpoint-container\">\n {index > 0 ? [\n <div key=\"progress-line\" class=\"s-conditional-offer-progress-line-container\">\n <div class=\"s-conditional-offer-progress-line-inactive\" />\n <div class=\"s-conditional-offer-progress-line-active\" style={{ width: `${progressPercentage}%` }} />\n </div>,\n <div key=\"checkpoint\" class={`s-conditional-offer-checkpoint ${isActive ? \"s-conditional-offer-active-checkpoint\" : \"\"}`} >\n <div class={`s-conditional-offer-item-avatar-content ${isActive ? \"active\" : \"\"}`} innerHTML={this.products && this.getCheckpointContent(discount)}>\n </div>\n <div class={`s-conditional-offer-checkpoint-label ${isActive ? \"active\" : \"\"}`} innerHTML={this.getOfferType(discount)} />\n\n </div>\n ] :\n <div key=\"label\" class={{ \"s-conditional-offer-checkpoint-label\": true, \"first-checkpoint\": index === 0, active: isActive }} innerHTML={this.getOfferType(discount)} />\n }\n </div>\n );\n }\n\n private getLoadingSkeletonView() {\n return <Host class=\"s-conditional-offer-container\" >\n <div class=\"s-conditional-offer-skeleton-inner-container\">\n <div class=\"s-conditional-offer-skeleton-subtitle\">\n <salla-skeleton height=\"16px\" width=\"30%\" />\n </div>\n\n <div class=\"s-conditional-offer-skeleton-subtitle\">\n <salla-skeleton height=\"16px\" width=\"35%\" />\n </div>\n <div class=\"s-conditional-offer-skeleton-checkpoints-wrapper\">\n {Array(3).fill(null).map(() => (\n [<salla-skeleton key=\"checkpoint-line\" height=\"8px\" />,\n <div key=\"checkpoint\">\n <salla-skeleton height=\"60px\" width=\"60px\" type=\"circle\" />\n </div>]\n ))}\n </div>\n\n </div>\n </Host>\n }\n\n render() {\n if (!this.canRender) return null\n if (this.isLoading) return this.getLoadingSkeletonView()\n\n return <Host class=\"s-conditional-offer-container\">\n <div class=\"s-conditional-offer-title-wrapper\">\n <div class=\"s-conditional-offer-title\">{this.offer.title}</div>\n {this.offer.description ? <div class=\"s-conditional-offer-subtitle\">\n {this.offer.description} <i class=\"sicon-information\" />\n </div> : null}\n </div>\n <div class=\"s-conditional-offer-progress-container\">\n {this.offer.details.discounts.map((discount, index) => (\n <div class={{ \"flex-1\": index > 0 }} key={discount.min_spend}>\n {this.getCheckPointView(discount, index)}\n </div>\n ))}\n </div>\n </Host>\n }\n}\n"],"names":[],"mappings":";;;;;AAEA,IAAY,YAIX;AAJD,CAAA,UAAY,YAAY,EAAA;AACpB,IAAA,YAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,YAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,YAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AACjC,CAAC,EAJW,YAAY,KAAZ,YAAY,GAIvB,EAAA,CAAA,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
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-HB9ZridH.js';
|
|
5
5
|
import { w as whatsapp } from './whatsapp2-DWksgowB.js';
|
|
6
6
|
import { M as MailIcon } from './mail-DmgxDvXL.js';
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
5
|
-
import { H as Helper } from './Helper-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-HB9ZridH.js';
|
|
5
|
+
import { H as Helper } from './Helper-MNQx5g4A.js';
|
|
6
6
|
import { F as FilterOptionTypes } from './interfaces-DL4h2bc3.js';
|
|
7
7
|
import './anime.es-CgtvEd63.js';
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-HB9ZridH.js';
|
|
5
5
|
import { F as FilterOptionTypes } from './interfaces-DL4h2bc3.js';
|
|
6
|
-
import { H as Helper } from './Helper-
|
|
6
|
+
import { H as Helper } from './Helper-MNQx5g4A.js';
|
|
7
7
|
import './anime.es-CgtvEd63.js';
|
|
8
8
|
|
|
9
9
|
const sallaFiltersCss = ":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-HB9ZridH.js';
|
|
5
5
|
|
|
6
6
|
const sallaInstallmentCss = "salla-installment:empty{display:none}#tabbyPromoWrapper{background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px;border:unset !important;font-weight:500}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;-webkit-box-shadow:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--main-text-color);font-size:var(--font-sm);line-height:1.25;padding:20px 20px 20px 115px !important;background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);border:unset !important;font-family:inherit !important;font-weight:500}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper{margin-bottom:20px}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px !important;top:35px !important;margin:0 !important;height:24px !important}.ltr .tamara-product-widget .tamara-logo{right:20px !important;left:auto !important}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}.s-installment-mispay-wrapper,.s-installment-madfu-wrapper,.s-installment-emkan-wrapper,.s-installment-rajehi-wrapper{font-size:14px;text-align:right;padding:20px;gap:42px;direction:rtl;line-height:22px;color:rgb(0, 0, 0);min-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;background-color:white;border-radius:10px;margin:15px 0;display:-ms-flexbox;display:flex;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.s-installment-mispay-wrapper:hover,.s-installment-madfu-wrapper:hover,.s-installment-emkan-wrapper:hover,.s-installment-rajehi-wrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.s-installment-mispay-content,.s-installment-madfu-content,.s-installment-emkan-content,.s-installment-rajehi-content{display:-ms-flexbox;display:flex;-ms-flex-direction:row-reverse;flex-direction:row-reverse;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;gap:1rem}.ltr .s-installment-mispay-content,.ltr .s-installment-madfu-content,.ltr .s-installment-emkan-content,.ltr .s-installment-rajehi-content{-ms-flex-direction:row;flex-direction:row}.s-installment-mispay-content-text,.s-installment-madfu-content-text,.s-installment-emkan-content-text,.s-installment-rajehi-content-text{color:var(--main-text-color);font-size:14px;font-weight:500;margin:0 16px 0 0;width:80%;left:14px;text-align:left}.s-installment-mispay-content img,.s-installment-madfu-content img,.s-installment-emkan-content img,.s-installment-rajehi-content img{height:28px;width:70px;display:inline-block;max-height:100%;vertical-align:middle;fill:none;stroke:unset;width:auto}.rtl .s-installment-mispay-content-text,.rtl .s-installment-madfu-content-text,.rtl .s-installment-emkan-content-text,.rtl .s-installment-rajehi-content-text{right:14px;text-align:right;margin:0 0 0 16px}.rtl .s-installment-mispay-content img,.rtl .s-installment-madfu-content img,.rtl .s-installment-emkan-content img,.rtl .s-installment-rajehi-content img{left:14px !important}.ltr .s-installment-mispay-content img,.ltr .s-installment-madfu-content img,.ltr .s-installment-emkan-content img,.ltr .s-installment-rajehi-content img{right:14px !important}.s-installment-rajehi-content img{width:70px !important;height:40px !important}.s-installment-emkan-content img{height:35px !important}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-HB9ZridH.js';
|
|
5
5
|
|
|
6
6
|
const sallaLoyaltyPrizeItemCss = "salla-loyalty-prize-item:hover{-webkit-box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important;box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important}";
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
5
|
-
import { H as Helper } from './Helper-
|
|
4
|
+
import { r as registerInstance, h, g as getElement } from './index-HB9ZridH.js';
|
|
5
|
+
import { H as Helper } from './Helper-MNQx5g4A.js';
|
|
6
6
|
import './anime.es-CgtvEd63.js';
|
|
7
7
|
|
|
8
8
|
const sallaNotificationsCss = "";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h } from './index-
|
|
4
|
+
import { r as registerInstance, h } from './index-HB9ZridH.js';
|
|
5
5
|
import { I as IconVerified } from './check-uTyAzPSy.js';
|
|
6
6
|
|
|
7
7
|
var iconFileArchive = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
5
|
-
import { H as Helper } from './Helper-
|
|
4
|
+
import { r as registerInstance, h, g as getElement } from './index-HB9ZridH.js';
|
|
5
|
+
import { H as Helper } from './Helper-MNQx5g4A.js';
|
|
6
6
|
import './anime.es-CgtvEd63.js';
|
|
7
7
|
|
|
8
8
|
const sallaOrdersCss = ":host{display:block}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-HB9ZridH.js';
|
|
5
5
|
|
|
6
6
|
const sallaPaymentsCss = ":host{display:block}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-HB9ZridH.js';
|
|
5
5
|
import { a as arrowLeft } from './arrow-left-BedNk7k1.js';
|
|
6
6
|
|
|
7
7
|
var arrowRight = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-HB9ZridH.js';
|
|
5
5
|
import { I as IconVerified } from './check-uTyAzPSy.js';
|
|
6
6
|
import { C as CameraIcon } from './camera-C6jIkM-X.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, g as getElement } from './index-HB9ZridH.js';
|
|
5
5
|
import { I as IconVerified } from './check-uTyAzPSy.js';
|
|
6
6
|
|
|
7
7
|
var IconStar2 = ` <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { a as require_root, d as requireIsObject, e as requireIsSymbol, f as getDefaultExportFromCjs, r as registerInstance, h, g as getElement } from './index-
|
|
4
|
+
import { a as require_root, d as requireIsObject, e as requireIsSymbol, f as getDefaultExportFromCjs, r as registerInstance, h, g as getElement } from './index-HB9ZridH.js';
|
|
5
5
|
import { S as ShoppingBag } from './shopping-bag-DiKTtDW5.js';
|
|
6
|
-
import { H as Helper } from './Helper-
|
|
6
|
+
import { H as Helper } from './Helper-MNQx5g4A.js';
|
|
7
7
|
import './anime.es-CgtvEd63.js';
|
|
8
8
|
|
|
9
9
|
var now_1;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h } from './index-
|
|
4
|
+
import { r as registerInstance, h } from './index-HB9ZridH.js';
|
|
5
5
|
import { a as arrowLeft } from './arrow-left-BedNk7k1.js';
|
|
6
|
-
import { H as Helper } from './Helper-
|
|
6
|
+
import { H as Helper } from './Helper-MNQx5g4A.js';
|
|
7
7
|
import './anime.es-CgtvEd63.js';
|
|
8
8
|
|
|
9
9
|
var IconQuoteOpen = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-HB9ZridH.js';
|
|
5
5
|
import { f as facebook, t as twitter } from './twitter-Dz7o69vX.js';
|
|
6
6
|
|
|
7
7
|
var instagram = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, g as getElement } from './index-HB9ZridH.js';
|
|
5
5
|
|
|
6
6
|
const sallaTooltipCss = ".s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;-webkit-transform:translateX(-39%);transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;-webkit-transition:opacity 0.3s;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:\"\";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){-webkit-transform:translateX(-72%);transform:translateX(-72%)}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-HB9ZridH.js';
|
|
5
5
|
import { M as MailIcon } from './mail-DmgxDvXL.js';
|
|
6
6
|
|
|
7
7
|
var AndroidPhoneIcon = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-HB9ZridH.js';
|
|
5
5
|
|
|
6
6
|
const sallaWalletCss = ".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:-ms-flexbox !important;display:flex !important;-ms-flex-align:center !important;align-items:center !important;-ms-flex-pack:start !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:-webkit-max-content;width:-moz-max-content;width:max-content;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}";
|
|
7
7
|
|
package/dist/esm/twilight.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
5
|
-
export { s as setNonce } from './index-
|
|
6
|
-
import { g as globalScripts } from './app-globals-
|
|
4
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-HB9ZridH.js';
|
|
5
|
+
export { s as setNonce } from './index-HB9ZridH.js';
|
|
6
|
+
import { g as globalScripts } from './app-globals-BW7wDI-P.js';
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
Stencil Client Patch Browser v4.35.1 | MIT Licensed | https://stenciljs.com
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,r,n){function
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,r,n){function a(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function u(t){try{c(n.next(t))}catch(t){i(t)}}function o(t){try{c(n["throw"](t))}catch(t){i(t)}}function c(t){t.done?r(t.value):a(t.value).then(u,o)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,u;return u={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function o(t){return function(e){return c([t,e])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(u&&(u=0,o[0]&&(r=0)),r)try{if(n=1,a&&(i=o[0]&2?a["return"]:o[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,o[1])).done)return i;if(a=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;a=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){r.label=o[1];break}if(o[0]===6&&r.label<i[1]){r.label=i[1];i=o;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(o);break}if(i[2])r.ops.pop();r.trys.pop();continue}o=e.call(t,r)}catch(t){o=[6,t];a=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,a=e.length,i;n<a;n++){if(i||!(n in e)){if(!i)i=Array.prototype.slice.call(e,0,n);i[n]=e[n]}}return t.concat(i||Array.prototype.slice.call(e))};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/import{a as anime}from"./anime.es-CgtvEd63.js";salla.event.setMaxListeners(100);var Helper=function(){function t(){}t.prototype.setIncludes=function(t){this.includes=t;return this};t.prototype.toggleElementClassIf=function(t,e,r,n){var i
|
|
5
|
-
//# sourceMappingURL=Helper-
|
|
4
|
+
*/import{a as anime}from"./anime.es-CgtvEd63.js";salla.event.setMaxListeners(100);var Helper=function(){function t(){}t.prototype.setIncludes=function(t){this.includes=t;return this};t.prototype.toggleElementClassIf=function(t,e,r,n){var a,i;e=Array.isArray(e)?e:e.split(" ");r=Array.isArray(r)?r:r.split(" ");var u=n(t);t===null||t===void 0?void 0:(a=t.classList).remove.apply(a,u?r:e);t===null||t===void 0?void 0:(i=t.classList).add.apply(i,u?e:r);return this};t.prototype.toggleClassIf=function(t,e,r,n){var a=this;document.querySelectorAll(t).forEach((function(t){return a.toggleElementClassIf(t,e,r,n)}));return this};t.prototype.isValidEmail=function(t){var e=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return e.test(String(t).toLowerCase())};t.prototype.filterEmojies=function(t){var e=/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g;return t.replace(e,"")};t.prototype.debounce=function(t){var e=[];for(var r=1;r<arguments.length;r++){e[r-1]=arguments[r]}if(!this.debounce_){this.debounce_=salla.helpers.debounce((function(t){var e=[];for(var r=1;r<arguments.length;r++){e[r-1]=arguments[r]}return t.apply(void 0,e)}),500)}return this.debounce_.apply(this,__spreadArray([t],e,false))};t.prototype.getProductsSource=function(t){return{"brands.single":"brands","product.index":"categories","product.index.latest":"latest","product.index.offers":"offers","product.index.search":"search","customer.wishlist":"wishlist","landing-page":"landing-page","product.index.tag":"tags","product.index.sales":"sales","components.most_sales_products":"sales"}[t||salla.config.get("page.slug")]||t||"latest"};t.prototype.getPageTitleForSource=function(t){t={brands:"common.titles.brands",latest:"blocks.home.latest_products",offers:"common.titles.discounts",sales:"common.titles.most_sales"}[t];return t?salla.lang.get(t):""};t.prototype.getProductsSourceValue=function(t,e){var r=this.getProductsSource(t);var n=null;if(e){try{n=typeof e==="string"?JSON.parse(e):e}catch(t){console.error("Failed to parse JSON string in sourceValue:",t)}}if(!["search","json","offers","latest","sales","related"].includes(r)){if(Array.isArray(n)&&n.length){return n}if(Array.isArray(n)&&!n.length){return""}if(typeof n==="number"){return[n]}if(!e&&["categories","tags","brands"].includes(t)){return[salla.config.get("page.id")]}}if(n||e){return n||e}if(r==="search"){return new URLSearchParams(window.location.search).get("q")||""}return salla.config.get("page.id")};t.prototype.extractFiltersFromUrl=function(t){var e={};t.forEach((function(t,r){var n=r.match(/^filters\[(.*?)\](\[(.*?)\])?$/u);if(n){var a=n[1];var i=n[3];if(i){e[a]=e[a]||{};e[a][i]=t}else{e[a]=t}}else{var u=r.match(/^(.*?)$/u);if(u){e[u[1]]=t}}}));return e};t.prototype.injectExtraFieldsToResponse=function(t){return __awaiter(this,void 0,void 0,(function(){var e,r,n,a;return __generator(this,(function(i){switch(i.label){case 0:if(!t||!this.includes)return[2,t];e=t.data.map((function(t){return t.id}));i.label=1;case 1:i.trys.push([1,4,,5]);return[4,this.fetchImagesAndOptions(e)];case 2:r=i.sent().data;this.injectOptionsAndImages(t.data,r);if(!this.includes.includes("metadata")){return[2,t]}return[4,salla.api.metadata.fetchValues("product",e)];case 3:n=i.sent();t.data.forEach((function(t){t["metadata"]=n.data.find((function(e){return parseInt(e.entity_id)===parseInt(t.id)}))}));return[2,t];case 4:a=i.sent();console.error("Error in injectExtraFieldsToResponse:",a);throw a;case 5:return[2]}}))}))};t.prototype.fetchImagesAndOptions=function(t){return this.productsIncludes().length?salla.api.product.fetchOptions(t,{with:this.productsIncludes()}):Promise.resolve({data:[]})};t.prototype.injectOptionsAndImages=function(t,e){var r=this;return e.length?t.map((function(t){r.includes.filter((function(t){return t!=="metadata"})).forEach((function(r){var n=e.find((function(e){return parseInt(e.id)===parseInt(t.id)}));t[r]=n?n[r]:null}));return t})):null};t.prototype.productsIncludes=function(){var t;return(t=this.includes)===null||t===void 0?void 0:t.filter((function(t){return t!="metadata"}))};t.prototype.parseJson=function(t){if(typeof t!=="string"){return t}try{return JSON.parse(t)}catch(t){salla.logger.error("Failed to parse includes as JSON:",t)}return null};t.prototype.getProductSchemaMarkupScript=function(t){var e,r;var n=document.createElement("script");n.type="application/ld+json";var a={"@context":"http://schema.org","@type":"Product",name:t===null||t===void 0?void 0:t.name,image:((e=t===null||t===void 0?void 0:t.image)===null||e===void 0?void 0:e.url)||(t===null||t===void 0?void 0:t.thumbnail),description:t===null||t===void 0?void 0:t.description,brand:{"@type":"Brand",logo:(r=t===null||t===void 0?void 0:t.brand)===null||r===void 0?void 0:r.logo},offers:{"@type":"Offer",price:t===null||t===void 0?void 0:t.price}};n.text=JSON.stringify(a);return n};t.prototype.createProductSchema=function(t,e){var r;var n={productID:"".concat(t.id),"@type":"Product",name:t.name,url:t.url,image:t.image.url||t.image,description:t.description||t.subtitle||t.name,offers:{"@type":"Offer",url:t.url,priceCurrency:t.currency,price:t.price,itemCondition:"NewCondition",availability:t.is_available?"InStock":"OutOfStock",priceValidUntil:t.discount_ends||new Date((new Date).setDate((new Date).getDate()+7)).toISOString().split("T")[0],priceSpecification:{"@type":"PriceSpecification",price:t.regular_price,priceCurrency:t.currency,valueAddedTaxIncluded:t.is_taxable},seller:{"@type":"Organization",name:salla.config.get("store.name")}}};if((r=t.rating)===null||r===void 0?void 0:r.stars){n.aggregateRating={"@type":"AggregateRating",ratingValue:t.rating.stars,reviewCount:t.rating.count}}return{"@type":"ListItem",position:e,item:n}};t.prototype.generateProductSchema=function(t){var e=this;var r="salla-product-schema-script";if(document.getElementById(r)){salla.logger.warn("already added schema-script with id (".concat(r,")!"));return}var n=document.createElement("script");n.type="application/ld+json";n.id=r;var a={"@context":"https://schema.org","@type":"ItemList",name:salla.config.get("page.title"),itemListElement:t.map((function(t,r){return e.createProductSchema(t,r+1)}))};n.textContent=JSON.stringify(a);document.head.appendChild(n)};t.prototype.formatDateFromString=function(t,e,r){if(r===void 0){r="en"}var n=new Date(t);var a={en:"Invalid Date",ar:"تاريخ غير صالح"};if(isNaN(n.getTime())){return a[r]}var i={en:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ar:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]};var u={en:["January","February","March","April","May","June","July","August","September","October","November","December"],ar:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]};var o=i[r][n.getDay()];var c=e(n.getDate(),r==="en");var s=u[r][n.getMonth()];var d=e(n.getFullYear(),r==="en");return"".concat(o," ").concat(c," ").concat(s," ").concat(d)};t.prototype.copyToClipboard=function(t){var e=t.target.innerText;navigator.clipboard.writeText(e).then((function(){console.log("Text copied to clipboard: "+e)})).catch((function(t){console.error("Unable to copy text to clipboard",t)}))};t.prototype.animateItems=function(t){if(!t)return;anime({targets:t,opacity:[0,1],duration:1200,translateY:[20,0],delay:function(t,e){return e*100},easing:"easeOutExpo",complete:function(e){t.forEach((function(t){t.classList.add("animated")}))}})};t.prototype.createReviewObject=function(t){return{"@type":"Review",author:{"@type":"Person",name:t.name},reviewBody:t.content,reviewRating:{"@type":"Rating",bestRating:"5",ratingValue:t.stars,worstRating:"1"}}};t.prototype.generateReviewSchema=function(t){var e=this;var r=document.createElement("script");r.type="application/ld+json";var n={"@context":"http://schema.org/","@type":"Store",name:salla.config.get("store.name"),url:salla.config.get("store.url"),review:t.map((function(t){return e.createReviewObject(t)})),aggregateRating:{"@type":"AggregateRating",ratingValue:t.reduce((function(t,e){return t+e.stars}),0)/t.length,reviewCount:t.length}};r.textContent=JSON.stringify(n);document.head.appendChild(r)};return t}();var Helper$1=new Helper;export{Helper$1 as H};
|
|
5
|
+
//# sourceMappingURL=Helper-MNQx5g4A.js.map
|