@salla.sa/twilight-components 2.14.220 → 2.14.222
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-2vTvVXxF.js → app-globals-DPedpk8u.js} +3 -3
- package/dist/cjs/{app-globals-2vTvVXxF.js.map → app-globals-DPedpk8u.js.map} +1 -1
- package/dist/cjs/{index-B04Y8RyW.js → index-BDn6fH9S.js} +8 -4
- package/dist/cjs/index-BDn6fH9S.js.map +1 -0
- package/dist/cjs/loader.cjs.js +3 -3
- 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 +16 -5
- 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 +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 +338 -0
- package/dist/cjs/salla-tiered-offer.cjs.entry.js.map +1 -0
- package/dist/cjs/salla-tiered-offer.entry.cjs.js.map +1 -0
- 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 +3 -3
- package/dist/collection/assets/svg/diamond-02.svg +4 -0
- package/dist/collection/assets/svg/gold.svg +6 -0
- package/dist/collection/assets/svg/star-rounded.svg +3 -0
- package/dist/collection/assets/svg/stars.svg +5 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/salla-conditional-offer/salla-conditional-offer.js +15 -4
- package/dist/collection/components/salla-conditional-offer/salla-conditional-offer.js.map +1 -1
- package/dist/collection/components/salla-tiered-offer/constants.js +12 -0
- package/dist/collection/components/salla-tiered-offer/constants.js.map +1 -0
- package/dist/collection/components/salla-tiered-offer/interfaces.js +9 -0
- package/dist/collection/components/salla-tiered-offer/interfaces.js.map +1 -0
- package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.css +26 -0
- package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js +288 -0
- package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js.map +1 -0
- package/dist/collection/components/salla-tiered-offer/utils.js +38 -0
- package/dist/collection/components/salla-tiered-offer/utils.js.map +1 -0
- package/dist/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/salla-conditional-offer.js +15 -4
- package/dist/components/salla-conditional-offer.js.map +1 -1
- package/dist/components/salla-tiered-offer.d.ts +11 -0
- package/dist/components/salla-tiered-offer.js +371 -0
- package/dist/components/salla-tiered-offer.js.map +1 -0
- package/dist/esm/{app-globals-DRz9_J1y.js → app-globals-wLakfxcp.js} +3 -3
- package/dist/esm/{app-globals-DRz9_J1y.js.map → app-globals-wLakfxcp.js.map} +1 -1
- package/dist/esm/{index-L1Wml9tS.js → index-Dj2SrCy0.js} +8 -4
- package/dist/esm/index-Dj2SrCy0.js.map +1 -0
- package/dist/esm/loader.js +4 -4
- 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 +16 -5
- 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 +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 +336 -0
- package/dist/esm/salla-tiered-offer.entry.js.map +1 -0
- 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 +4 -4
- package/dist/esm-es5/{app-globals-DRz9_J1y.js → app-globals-wLakfxcp.js} +2 -2
- package/dist/esm-es5/{app-globals-DRz9_J1y.js.map → app-globals-wLakfxcp.js.map} +1 -1
- package/dist/esm-es5/{index-L1Wml9tS.js → index-Dj2SrCy0.js} +3 -3
- package/dist/esm-es5/index-Dj2SrCy0.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-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 +2 -2
- 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 +2 -2
- package/dist/esm-es5/salla-notification-item.entry.js +1 -1
- package/dist/esm-es5/salla-notifications.entry.js +2 -2
- package/dist/esm-es5/salla-offer.entry.js +1 -1
- package/dist/esm-es5/salla-order-summary.entry.js +2 -2
- package/dist/esm-es5/salla-orders.entry.js +2 -2
- 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 +5 -0
- package/dist/esm-es5/salla-tiered-offer.entry.js.map +1 -0
- 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-2ac20d02.entry.js → p-00ce3e65.entry.js} +2 -2
- package/dist/twilight/{p-e00746e9.system.entry.js → p-02cc2225.system.entry.js} +2 -2
- package/dist/twilight/{p-0a469ba7.system.entry.js → p-0b16f452.system.entry.js} +3 -3
- package/dist/twilight/{p-3bdebf0d.entry.js → p-109136fc.entry.js} +2 -2
- package/dist/twilight/{p-fe959c9a.system.entry.js → p-12adb702.system.entry.js} +2 -2
- package/dist/twilight/{p-12a13525.entry.js → p-16dfee33.entry.js} +2 -2
- package/dist/twilight/{p-1ccd8b8e.entry.js → p-18537486.entry.js} +2 -2
- package/dist/twilight/{p-2cd40336.system.entry.js → p-1cbc4329.system.entry.js} +2 -2
- package/dist/twilight/{p-fbaa093c.entry.js → p-1cf1344e.entry.js} +2 -2
- package/dist/twilight/{p-a477ee76.system.entry.js → p-1d6100c4.system.entry.js} +2 -2
- package/dist/twilight/{p-75ec194e.system.entry.js → p-29567106.system.entry.js} +2 -2
- package/dist/twilight/{p-962cd525.entry.js → p-315c5fd3.entry.js} +2 -2
- package/dist/twilight/{p-184f98b1.entry.js → p-337fca82.entry.js} +2 -2
- package/dist/twilight/{p-5b8bf0e6.system.entry.js → p-3b02f780.system.entry.js} +2 -2
- package/dist/twilight/{p-Burnn1Qt.js → p-4drPVtGP.js} +2 -2
- package/dist/twilight/{p-Burnn1Qt.js.map → p-4drPVtGP.js.map} +1 -1
- package/dist/twilight/{p-7b7618d5.entry.js → p-5394cdeb.entry.js} +2 -2
- package/dist/twilight/{p-38526ba5.system.entry.js → p-55306475.system.entry.js} +2 -2
- package/dist/twilight/{p-b1ad7c75.entry.js → p-59763129.entry.js} +2 -2
- package/dist/twilight/{p-52156f6d.system.entry.js → p-5cd7ff6d.system.entry.js} +2 -2
- package/dist/twilight/{p-5c918974.entry.js → p-5e1f0ddf.entry.js} +2 -2
- package/dist/twilight/p-618eb3f2.system.entry.js +5 -0
- package/dist/twilight/p-618eb3f2.system.entry.js.map +1 -0
- package/dist/twilight/{p-f6c410c6.entry.js → p-67b54ac4.entry.js} +2 -2
- package/dist/twilight/p-67ebf87e.system.entry.js +5 -0
- package/dist/twilight/{p-76137ff1.entry.js → p-688dd765.entry.js} +2 -2
- package/dist/twilight/{p-284dae41.system.entry.js → p-6ec767ac.system.entry.js} +2 -2
- package/dist/twilight/{p-1af18eb4.entry.js → p-70e74f3c.entry.js} +2 -2
- package/dist/twilight/{p-d9c2f2b0.system.entry.js → p-7236a037.system.entry.js} +2 -2
- package/dist/twilight/{p-30c8b458.system.entry.js → p-7436f972.system.entry.js} +2 -2
- package/dist/twilight/{p-8d9a5dc0.entry.js → p-74647582.entry.js} +2 -2
- package/dist/twilight/{p-Cl_CHxGj.system.js.map → p-78vq_YNh.system.js.map} +1 -1
- package/dist/twilight/{p-c781f7a7.entry.js → p-8162a820.entry.js} +2 -2
- package/dist/twilight/p-864f1430.system.entry.js +5 -0
- package/dist/twilight/{p-47b6e06b.system.entry.js → p-865fc401.system.entry.js} +2 -2
- package/dist/twilight/{p-bfb9457b.system.entry.js → p-87206bd7.system.entry.js} +2 -2
- package/dist/twilight/p-8c08dafb.entry.js +5 -0
- package/dist/twilight/{p-0e4f26bb.system.entry.js → p-8ce2a142.system.entry.js} +2 -2
- package/dist/twilight/{p-60e6d7e6.system.entry.js → p-8d28bf6e.system.entry.js} +2 -2
- package/dist/twilight/{p-d07e552b.system.entry.js → p-97337c52.system.entry.js} +2 -2
- package/dist/twilight/{p-08258532.entry.js → p-9e54e404.entry.js} +2 -2
- package/dist/twilight/{p-C9IwdXDn.system.js.map → p-B-EmhPha.system.js.map} +1 -1
- package/dist/twilight/{p-B0ThVjj_.system.js.map → p-B6apPCKk.system.js.map} +1 -1
- package/dist/twilight/{p-D_Of4cjl.system.js.map → p-BC5TR2o4.system.js.map} +1 -1
- package/dist/twilight/{p-Bvg9GRmu.system.js.map → p-BFLzwSRe.system.js.map} +1 -1
- package/dist/twilight/{p-DFlc0grl.system.js.map → p-BIlNLy1w.system.js.map} +1 -1
- package/dist/twilight/{p-j7nJelMY.system.js.map → p-B_H7JnAQ.system.js.map} +1 -1
- package/dist/twilight/{p-BWD1Mdmj.system.js.map → p-BfizdcIv.system.js.map} +1 -1
- package/dist/twilight/{p-BfxbBmpF.system.js.map → p-BgVK0PPB.system.js.map} +1 -1
- package/dist/twilight/{p-BUNm7oxn.system.js → p-BtfcvLWi.system.js} +2 -2
- package/dist/twilight/{p-BUNm7oxn.system.js.map → p-BtfcvLWi.system.js.map} +1 -1
- package/dist/twilight/{p-BP344v_q.system.js.map → p-BxPxFmIf.system.js.map} +1 -1
- package/dist/twilight/{p-9jT7Wo1H.system.js.map → p-C6Mc-nga.system.js.map} +1 -1
- package/dist/twilight/{p-nuRa4ECK.system.js.map → p-CAhB5SXO.system.js.map} +1 -1
- package/dist/twilight/{p-cWZujtjd.system.js.map → p-CD5EBKFr.system.js.map} +1 -1
- package/dist/twilight/{p-egmUBeji.system.js.map → p-CDPN9ikP.system.js.map} +1 -1
- package/dist/twilight/{p-YvHIMjOJ.system.js.map → p-CE_xhQMS.system.js.map} +1 -1
- package/dist/twilight/{p-Cee0DssD.system.js.map → p-CIzZIur3.system.js.map} +1 -1
- package/dist/twilight/p-CaVNqQXu.system.js +5 -0
- package/dist/twilight/{p-ByGP8fWO.system.js.map → p-CaVNqQXu.system.js.map} +1 -1
- package/dist/twilight/{p-DPreD4Hr.system.js.map → p-CfNLozg0.system.js.map} +1 -1
- package/dist/twilight/p-ClaSC-3N.system.js.map +1 -0
- package/dist/twilight/{p-CIghWdV5.system.js.map → p-Cm8GjH45.system.js.map} +1 -1
- package/dist/twilight/{p-BftU992I.system.js.map → p-CpJOChwF.system.js.map} +1 -1
- package/dist/twilight/{p-BWnEoSJY.system.js.map → p-CsweHiBJ.system.js.map} +1 -1
- package/dist/twilight/{p-CpzD5fce.system.js.map → p-CtiUKful.system.js.map} +1 -1
- package/dist/twilight/{p-nvgYekhd.system.js.map → p-D0vXKNzE.system.js.map} +1 -1
- package/dist/twilight/{p-BCvHzhOW.system.js.map → p-D6fGvShW.system.js.map} +1 -1
- package/dist/twilight/{p-BlpV9vce.system.js.map → p-DInbMpRZ.system.js.map} +1 -1
- package/dist/twilight/{p-DVqtOGyR.system.js.map → p-DRUO4ntA.system.js.map} +1 -1
- package/dist/twilight/{p-L1Wml9tS.js → p-Dj2SrCy0.js} +3 -3
- package/dist/twilight/p-Dj2SrCy0.js.map +1 -0
- package/dist/twilight/{p-DuTXkmaO.system.js → p-DvJ_tnSw.system.js} +6 -6
- package/dist/twilight/p-DvJ_tnSw.system.js.map +1 -0
- package/dist/twilight/{p-DUDOY-ZS.system.js.map → p-DvQIv_6Y.system.js.map} +1 -1
- package/dist/twilight/{p-DwLeLHva.system.js.map → p-Dx2JzDoP.system.js.map} +1 -1
- package/dist/twilight/{p-DmQdqVWv.system.js.map → p-Dzal8dOY.system.js.map} +1 -1
- package/dist/twilight/p-FGWU4ai_.system.js.map +1 -0
- package/dist/twilight/{p-DvZ3uG1Y.system.js.map → p-LondrlGD.system.js.map} +1 -1
- package/dist/twilight/{p-tI_9cOVN.system.js.map → p-Q2yReOd3.system.js.map} +1 -1
- package/dist/twilight/{p-ByVXW9BA.system.js.map → p-WlDhq-4G.system.js.map} +1 -1
- package/dist/twilight/{p-cbadf894.system.entry.js → p-a20b6984.system.entry.js} +2 -2
- package/dist/twilight/{p-b4b5a600.system.entry.js → p-a439d5c1.system.entry.js} +2 -2
- package/dist/twilight/{p-62ba5382.entry.js → p-a531e0e4.entry.js} +2 -2
- package/dist/twilight/{p-342e13e4.system.entry.js → p-acaa2f80.system.entry.js} +2 -2
- package/dist/twilight/{p-154d97db.system.entry.js → p-ae7962ba.system.entry.js} +2 -2
- package/dist/twilight/{p-039b45e6.system.entry.js → p-b167e712.system.entry.js} +2 -2
- package/dist/twilight/{p-9a3f6331.entry.js → p-b42c8720.entry.js} +2 -2
- package/dist/twilight/{p-4291c03c.system.entry.js → p-b477f55b.system.entry.js} +2 -2
- package/dist/twilight/{p-50f789e5.entry.js → p-bc918d89.entry.js} +2 -2
- package/dist/twilight/{p-96d501d2.entry.js → p-c3adc5d9.entry.js} +2 -2
- package/dist/twilight/{p-5a577bf3.system.entry.js → p-c842f73f.system.entry.js} +2 -2
- package/dist/twilight/{p-f72dd4b6.system.entry.js → p-c8cea269.system.entry.js} +2 -2
- package/dist/twilight/{p-90fc2489.entry.js → p-d37bad6f.entry.js} +2 -2
- package/dist/twilight/{p-af1f9cd6.entry.js → p-d85581c6.entry.js} +2 -2
- package/dist/twilight/{p-666189da.system.entry.js → p-d8d9cdcd.system.entry.js} +2 -2
- package/dist/twilight/{p-be1034af.system.entry.js → p-de891990.system.entry.js} +2 -2
- package/dist/twilight/{p-6c83517d.entry.js → p-def552bd.entry.js} +2 -2
- package/dist/twilight/{p-228d58df.system.entry.js → p-e4f73083.system.entry.js} +2 -2
- package/dist/twilight/{p-a3ab451d.entry.js → p-e5872e75.entry.js} +2 -2
- package/dist/twilight/{p-d0a760cc.entry.js → p-ed4c7158.entry.js} +2 -2
- package/dist/twilight/p-ee443b00.entry.js +5 -0
- package/dist/twilight/p-ee443b00.entry.js.map +1 -0
- package/dist/twilight/{p-789f0166.system.entry.js → p-f1f3d74e.system.entry.js} +2 -2
- package/dist/twilight/{p-ca88566e.entry.js → p-f3b8551c.entry.js} +2 -2
- package/dist/twilight/{p-c63ddf33.entry.js → p-f41e7eed.entry.js} +2 -2
- package/dist/twilight/{p-6fcc8ed3.entry.js → p-f4918259.entry.js} +2 -2
- package/dist/twilight/p-f594b721.entry.js +5 -0
- package/dist/twilight/p-f594b721.entry.js.map +1 -0
- package/dist/twilight/{p-5b4f648e.entry.js → p-f9d8f20d.entry.js} +2 -2
- package/dist/twilight/p-fb59e3b5.entry.js +5 -0
- package/dist/twilight/p-ffb9ab7b.system.entry.js +5 -0
- package/dist/twilight/p-ffb9ab7b.system.entry.js.map +1 -0
- package/dist/twilight/{p-DKke2twA.system.js.map → p-jlCh1xBh.system.js.map} +1 -1
- package/dist/twilight/salla-conditional-offer.entry.esm.js.map +1 -1
- package/dist/twilight/salla-tiered-offer.entry.esm.js.map +1 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/dist/types/components/salla-tiered-offer/constants.d.ts +2 -0
- package/dist/types/components/salla-tiered-offer/interfaces.d.ts +44 -0
- package/dist/types/components/salla-tiered-offer/salla-tiered-offer.d.ts +39 -0
- package/dist/types/components/salla-tiered-offer/utils.d.ts +19 -0
- package/dist/types/components.d.ts +13 -0
- package/package.json +5 -5
- package/dist/cjs/index-B04Y8RyW.js.map +0 -1
- package/dist/esm/index-L1Wml9tS.js.map +0 -1
- package/dist/esm-es5/index-L1Wml9tS.js.map +0 -1
- package/dist/twilight/p-0225792d.system.entry.js +0 -5
- package/dist/twilight/p-0225792d.system.entry.js.map +0 -1
- package/dist/twilight/p-2c11821b.entry.js +0 -5
- package/dist/twilight/p-4fd3a01d.entry.js +0 -5
- package/dist/twilight/p-4fd3a01d.entry.js.map +0 -1
- package/dist/twilight/p-57bbd96b.system.entry.js +0 -5
- package/dist/twilight/p-BIOQiBj0.system.js.map +0 -1
- package/dist/twilight/p-ByGP8fWO.system.js +0 -5
- package/dist/twilight/p-DuTXkmaO.system.js.map +0 -1
- package/dist/twilight/p-L1Wml9tS.js.map +0 -1
- package/dist/twilight/p-a198f405.entry.js +0 -5
- package/dist/twilight/p-e58e21db.system.entry.js +0 -5
- /package/dist/twilight/{p-2ac20d02.entry.js.map → p-00ce3e65.entry.js.map} +0 -0
- /package/dist/twilight/{p-e00746e9.system.entry.js.map → p-02cc2225.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-0a469ba7.system.entry.js.map → p-0b16f452.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3bdebf0d.entry.js.map → p-109136fc.entry.js.map} +0 -0
- /package/dist/twilight/{p-fe959c9a.system.entry.js.map → p-12adb702.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-12a13525.entry.js.map → p-16dfee33.entry.js.map} +0 -0
- /package/dist/twilight/{p-1ccd8b8e.entry.js.map → p-18537486.entry.js.map} +0 -0
- /package/dist/twilight/{p-2cd40336.system.entry.js.map → p-1cbc4329.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-fbaa093c.entry.js.map → p-1cf1344e.entry.js.map} +0 -0
- /package/dist/twilight/{p-a477ee76.system.entry.js.map → p-1d6100c4.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-75ec194e.system.entry.js.map → p-29567106.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-962cd525.entry.js.map → p-315c5fd3.entry.js.map} +0 -0
- /package/dist/twilight/{p-184f98b1.entry.js.map → p-337fca82.entry.js.map} +0 -0
- /package/dist/twilight/{p-5b8bf0e6.system.entry.js.map → p-3b02f780.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-7b7618d5.entry.js.map → p-5394cdeb.entry.js.map} +0 -0
- /package/dist/twilight/{p-38526ba5.system.entry.js.map → p-55306475.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-b1ad7c75.entry.js.map → p-59763129.entry.js.map} +0 -0
- /package/dist/twilight/{p-52156f6d.system.entry.js.map → p-5cd7ff6d.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-5c918974.entry.js.map → p-5e1f0ddf.entry.js.map} +0 -0
- /package/dist/twilight/{p-f6c410c6.entry.js.map → p-67b54ac4.entry.js.map} +0 -0
- /package/dist/twilight/{p-57bbd96b.system.entry.js.map → p-67ebf87e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-76137ff1.entry.js.map → p-688dd765.entry.js.map} +0 -0
- /package/dist/twilight/{p-284dae41.system.entry.js.map → p-6ec767ac.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-1af18eb4.entry.js.map → p-70e74f3c.entry.js.map} +0 -0
- /package/dist/twilight/{p-d9c2f2b0.system.entry.js.map → p-7236a037.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-30c8b458.system.entry.js.map → p-7436f972.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-8d9a5dc0.entry.js.map → p-74647582.entry.js.map} +0 -0
- /package/dist/twilight/{p-c781f7a7.entry.js.map → p-8162a820.entry.js.map} +0 -0
- /package/dist/twilight/{p-e58e21db.system.entry.js.map → p-864f1430.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-47b6e06b.system.entry.js.map → p-865fc401.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-bfb9457b.system.entry.js.map → p-87206bd7.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-a198f405.entry.js.map → p-8c08dafb.entry.js.map} +0 -0
- /package/dist/twilight/{p-0e4f26bb.system.entry.js.map → p-8ce2a142.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-60e6d7e6.system.entry.js.map → p-8d28bf6e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-d07e552b.system.entry.js.map → p-97337c52.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-08258532.entry.js.map → p-9e54e404.entry.js.map} +0 -0
- /package/dist/twilight/{p-cbadf894.system.entry.js.map → p-a20b6984.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-b4b5a600.system.entry.js.map → p-a439d5c1.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-62ba5382.entry.js.map → p-a531e0e4.entry.js.map} +0 -0
- /package/dist/twilight/{p-342e13e4.system.entry.js.map → p-acaa2f80.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-154d97db.system.entry.js.map → p-ae7962ba.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-039b45e6.system.entry.js.map → p-b167e712.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9a3f6331.entry.js.map → p-b42c8720.entry.js.map} +0 -0
- /package/dist/twilight/{p-4291c03c.system.entry.js.map → p-b477f55b.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-50f789e5.entry.js.map → p-bc918d89.entry.js.map} +0 -0
- /package/dist/twilight/{p-96d501d2.entry.js.map → p-c3adc5d9.entry.js.map} +0 -0
- /package/dist/twilight/{p-5a577bf3.system.entry.js.map → p-c842f73f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-f72dd4b6.system.entry.js.map → p-c8cea269.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-90fc2489.entry.js.map → p-d37bad6f.entry.js.map} +0 -0
- /package/dist/twilight/{p-af1f9cd6.entry.js.map → p-d85581c6.entry.js.map} +0 -0
- /package/dist/twilight/{p-666189da.system.entry.js.map → p-d8d9cdcd.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-be1034af.system.entry.js.map → p-de891990.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6c83517d.entry.js.map → p-def552bd.entry.js.map} +0 -0
- /package/dist/twilight/{p-228d58df.system.entry.js.map → p-e4f73083.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-a3ab451d.entry.js.map → p-e5872e75.entry.js.map} +0 -0
- /package/dist/twilight/{p-d0a760cc.entry.js.map → p-ed4c7158.entry.js.map} +0 -0
- /package/dist/twilight/{p-789f0166.system.entry.js.map → p-f1f3d74e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-ca88566e.entry.js.map → p-f3b8551c.entry.js.map} +0 -0
- /package/dist/twilight/{p-c63ddf33.entry.js.map → p-f41e7eed.entry.js.map} +0 -0
- /package/dist/twilight/{p-6fcc8ed3.entry.js.map → p-f4918259.entry.js.map} +0 -0
- /package/dist/twilight/{p-5b4f648e.entry.js.map → p-f9d8f20d.entry.js.map} +0 -0
- /package/dist/twilight/{p-2c11821b.entry.js.map → p-fb59e3b5.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function a(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,s){function r(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i["throw"](e))}catch(e){s(e)}}function c(e){e.done?n(e.value):a(e.value).then(r,o)}c((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,r;return r={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function o(e){return function(t){return c([e,t])}}function c(o){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,o[0]&&(n=0)),n)try{if(i=1,a&&(s=o[0]&2?a["return"]:o[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,o[1])).done)return s;if(a=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;a=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){n.label=o[1];break}if(o[0]===6&&n.label<s[1]){n.label=s[1];s=o;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(o);break}if(s[2])n.ops.pop();n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e];a=0}finally{i=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-DuTXkmaO.system.js"],(function(e){"use strict";var t,n,i,a,s;return{setters:[function(e){t=e.r;n=e.c;i=e.h;a=e.H;s=e.g}],execute:function(){var r='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>calendar-time</title>\n<path d="M22.667 17.333c-0.737 0-1.333 0.596-1.333 1.333v2.667h-2.667c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h4c0.737 0 1.333-0.596 1.333-1.333v-4c0-0.737-0.596-1.333-1.333-1.333zM28 2.667h-2.667v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h5.363c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-5.363c-0.736 0-1.333-0.597-1.333-1.333v-21.333c0-0.736 0.597-1.333 1.333-1.333h2.667v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333v2.696c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.696c0-2.205-1.795-4-4-4zM22 12c-5.515 0-10 4.485-10 10s4.485 10 10 10 10-4.485 10-10-4.485-10-10-10zM22 29.333c-4.043 0-7.333-3.291-7.333-7.333s3.291-7.333 7.333-7.333 7.333 3.291 7.333 7.333-3.291 7.333-7.333 7.333z"></path>\n</svg>\n';var o='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>calendar</title>\n<path d="M28 2.667h-2.667v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-21.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.599 1.333-1.333 1.333h-24c-0.736 0-1.333-0.599-1.333-1.333v-13.333h26.667zM29.333 12h-26.667v-5.333c0-0.736 0.599-1.333 1.333-1.333h2.667v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n';var c='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>time</title>\n<path d="M16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333zM16 8c-0.736 0-1.333 0.596-1.333 1.333v6.667h-4c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h5.333c0.736 0 1.333-0.596 1.333-1.333v-8c0-0.737-0.597-1.333-1.333-1.333z"></path>\n</svg>\n';var l=":host{display:block}";var u=e("salla_booking_field",function(){function e(e){var i=this;t(this,e);this.invalidInput=n(this,"invalidInput");this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment","حجز موعد");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment","تعديل الموعد");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully","تمت اضافة الموعد بنجاح");this.selectDate=salla.lang.get("pages.cart.select_appointment_date","حدد تاريخ الموعد");this.bookingUrl="";this.iframeReady=false;this.reservations=[];salla.lang.onLoaded((function(){return i.setTranslations()}));Salla.event.on("booking::open",(function(e){return i.handleBookingOpen(e)}))}e.prototype.setTranslations=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=function(e,t,n){return new Promise((function(i){salla.helpers.setNested(salla.lang.messages[e],t,n);i(true)}))};return[4,e("ar.trans","pages.cart.book_an_appointment","حجز موعد")];case 1:t.sent();return[4,e("en.trans","pages.cart.book_an_appointment","Book an Appointment")];case 2:t.sent();return[4,e("ar.trans","pages.cart.edit_an_appointment","تعديل الموعد")];case 3:t.sent();return[4,e("en.trans","pages.cart.edit_an_appointment","Edit an Appointment")];case 4:t.sent();return[4,e("ar.trans","pages.cart.booked_successfully","تمت اضافة الموعد بنجاح")];case 5:t.sent();return[4,e("en.trans","pages.cart.booked_successfully","Booked Successfully")];case 6:t.sent();return[4,e("ar.trans","pages.cart.select_appointment_date","حدد تاريخ الموعد")];case 7:t.sent();return[4,e("en.trans","pages.cart.select_appointment_date","Select appointment date")];case 8:t.sent();this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully");this.selectDate=salla.lang.get("pages.cart.select_appointment_date");return[2]}}))}))};e.prototype.openBookingModal=function(e,t){var n=this;if(t===void 0){t=false}if(t&&(!e.detail||typeof e.detail!=="number"||e.detail!==this.productId)){return}if(salla.config.isGuest()){this.setAfterReloadEvent("booking::open-after-reload",this.productId);salla.event.dispatch("login::open");return}salla.booking.add(this.productId,false).then((function(e){if(e.data.redirect.to!=="booking"){throw new Error("Unexpected redirect!")}salla.event.dispatch("booking::open",{url:e.data.redirect.url,id:n.productId})})).catch((function(e){salla.error(salla.lang.get("common.errors.error_occurred"));salla.logger.error(e.response||e)}))};e.prototype.handleBookingOpen=function(e){var t=this;if(e.id!==this.productId)return;this.bookingUrl=salla.url.addParamToUrl("product_id",e.id,e.url);this.iframeReady=true;setTimeout((function(){t.modal.setTitle(t.selectDate);t.modal.open()}),100)};e.prototype.setAfterReloadEvent=function(e,t){salla.storage.set("afterReloadEvent",{event:e,payload:t})};e.prototype.emitAfterReloadEvent=function(){var e=salla.storage.get("afterReloadEvent");if(e&&e.event){var t=new CustomEvent(e.event,{detail:e.payload});window.dispatchEvent(t);salla.storage.remove("afterReloadEvent")}};e.prototype.componentWillLoad=function(){if(this.option&&this.option.details.length){this.reservations=this.option.details}};e.prototype.componentDidLoad=function(){var e=this;window.addEventListener("booking::open-after-reload",(function(t){return e.openBookingModal(t,true)}));this.emitAfterReloadEvent();window.addEventListener("message",this.handleMessageEvent.bind(this));this.reservationsInput.addEventListener("invalid",(function(t){return e.invalidInput.emit(t)}));this.reservationsInput.addEventListener("input",(function(){e.reservationsInput.setCustomValidity("");e.reservationsInput.reportValidity()}))};e.prototype.handleMessageEvent=function(e){var t,n;if(e.data.source!=="booking")return;var i=e.data.type;var a=e.data.message;if(localStorage.getItem("debug"))console.log("Received an action:".concat(i),e.data);if(i==="error"){if((t=a.fields)===null||t===void 0?void 0:t.reservation){salla.notify.error(a.fields.reservation[0]);return}var s=Object.values(a.fields||[a.message]).flat().map((function(e){return"<li>".concat(e,"</li>")})).join("");salla.notify.error("<ul>".concat(s,"</ul>"))}if(i==="success"){if(Number(a.productId)!==Number(this.productId))return;this.reservations=a.data.reservations.map((function(e){if(e.time&&e.time.length>0){var t=e.time[0];return{date:e.date,day:e.day,from_timestamp:t.from,to_timestamp:t.to}}return null})).filter((function(e){return e!==null}));salla.notify.success(this.bookedLabel);(n=this.modal)===null||n===void 0?void 0:n.close();setTimeout((function(){return window.location.reload()}))}if(i==="height"){this.iframe.height=(a===null||a===void 0?void 0:a.height)+"px"}};e.prototype.bookingModal=function(){var e=this;return i("salla-modal",{class:"s-booking-field-modal",ref:function(t){return e.modal=t},width:"md",position:"middle",noPadding:true},i("iframe",{ref:function(t){return e.iframe=t},src:this.bookingUrl,frameborder:"0"}))};e.prototype.renderReservationDate=function(e){return i("span",{class:e.from_timestamp?"s-booking-field-reservations-has-time":""},i("i",{class:"s-booking-field-reservations-icon",innerHTML:o}),e.date)};e.prototype.renderReservationTime=function(e){if(!e.from_timestamp)return"";return i("span",{class:"s-booking-field-reservations-time"},i("i",{class:"s-booking-field-reservations-icon",innerHTML:c}),i("span",null,e.from_timestamp," - ",e.to_timestamp))};e.prototype.render=function(){var e=this;return i(a,{key:"56540a5278d395485a411e712929f32cf76f637e"},i("div",{key:"63673b28b671596d47f4f014223e9c5012f3b671",class:"s-booking-field-main"},this.option.required||this.reservations.length>0?i("div",{class:"s-booking-field-price"},i("span",{innerHTML:salla.money(this.option.price)})):"",i("salla-button",{key:"6d9ffa722391aa0234454fe9ddc90f3477268489",class:"s-booking-field-book-now",size:"small",loaderPosition:"center",fill:"outline",onClick:function(t){return e.openBookingModal(t,false)}},i("span",{key:"dcc8a2b68be4596199e7c776f4501764fd25523f",class:"s-booking-field-book-now-content"},i("span",{key:"b4b2eaf369a5fa822c84b376808c7ee16d8d2598",innerHTML:r}),this.reservations.length?this.editLabel:this.bookNowLabel))),this.reservations.length>0&&i("div",{key:"2684b88bdaf47133dbcaaf6c96f1b81d4ee7ca70",class:"s-booking-field-reservations"},this.reservations.map((function(t,n){return i("div",{key:n,class:"s-booking-field-reservations-item"},e.renderReservationDate(t),e.renderReservationTime(t))}))),i("input",{key:"3d20fcb5fbca8a9e340344d41c316619aec03050",class:"s-hidden",name:this.option.name,required:this.option.required,value:JSON.stringify(this.reservations)==="[]"?"":JSON.stringify(this.reservations),ref:function(t){return e.reservationsInput=t}}),this.iframeReady&&this.bookingModal())};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());u.style=l;var f=e("salla_conditional_fields",function(){function e(e){t(this,e)}e.prototype.hideAllOptions=function(e){var t=this;this.host.querySelectorAll('[data-show-when^="options['.concat(e,'"]')).forEach((function(e){e.classList.add("hidden");t.hideAllOptions(e.dataset.optionId);t.disableInputs(e)}))};e.prototype.disableInputs=function(e){e.querySelectorAll("[name]").forEach((function(e){var t;e.setAttribute("disabled","");e.removeAttribute("required");if(((t=e===null||e===void 0?void 0:e.tagName)===null||t===void 0?void 0:t.toLowerCase())==="select"){e.value=""}if(["checkbox"].includes(e.getAttribute("type"))&&e.hasOwnProperty("checked")){e.checked=false}}))};e.prototype.changeHandler=function(e){var t=this;var n;salla.event.emit("salla-onditional-fields::change",e);salla.log("Received the change event: ",e);if(!e.target||!["SELECT"].includes(e.target.tagName)&&!["checkbox","radio"].includes(e.target.getAttribute("type"))){salla.log("Ignore the change because is not a supported input: "+(((n=e===null||e===void 0?void 0:e.target)===null||n===void 0?void 0:n.tagName)||"N/A"));return}var i=e.target.name.replace("[]","");var a=e.target.getAttribute("type")==="checkbox";var s=e.target.getAttribute("type")==="radio";salla.log("Trying to find all elements with condition:",'[data-show-when^="'.concat(i,'"]'));this.host.querySelectorAll('[data-show-when^="'.concat(i,'"]')).forEach((function(n){var i=!(n===null||n===void 0?void 0:n.dataset.showWhen.includes("!="));var r=n===null||n===void 0?void 0:n.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$3").trim();var o;if(a){var c=Array.from(t.host.querySelectorAll('input[name="'.concat(e.target.name,'"]:checked')),(function(e){return e===null||e===void 0?void 0:e.value}));o=c.includes(r.toString())}else if(s){o=e.target.checked&&e.target.value===r}else{o=r===e.target.value}salla.log("The input is ",a?"Multiple":s?"Radio":"Single"," value:",o);var l=i&&o||!i&&!o;if(l){n.classList.remove("hidden");n.querySelectorAll("[name]").forEach((function(e){e.removeAttribute("disabled");var t=e.closest(".s-product-options-option");if(t.dataset.optionRequired==="true"){e.setAttribute("required","")}if(e.getAttribute("type")==="checkbox"){var n=Array.from(document.querySelectorAll('input[type="checkbox"][name="'.concat(e.getAttribute("name"),'"]')));var i=n.some((function(e){return e.checked}));if(i){n.forEach((function(e){e.removeAttribute("required")}))}}}))}else{t.hideAllOptions(n.dataset.optionId);n.classList.add("hidden");t.disableInputs(n)}}))};e.prototype.componentDidRender=function(){var e=this;this.host.querySelectorAll("[data-show-when]").forEach((function(t){var n;var i=(n=t===null||t===void 0?void 0:t.dataset)===null||n===void 0?void 0:n.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$1").trim();if(!i){return}e.changeHandler({target:e.host.querySelector('[name^="'+i+'"]')})}))};e.prototype.render=function(){return i(a,{key:"aed72d12357c54338c231d5d4c259a510f8b4e95"},i("slot",{key:"84c5af881a45cee9fa71f5e2e63ee9b92aad76c9"}))};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}())}}}));
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-DvJ_tnSw.system.js"],(function(e){"use strict";var t,n,i,a,s;return{setters:[function(e){t=e.r;n=e.c;i=e.h;a=e.H;s=e.g}],execute:function(){var r='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>calendar-time</title>\n<path d="M22.667 17.333c-0.737 0-1.333 0.596-1.333 1.333v2.667h-2.667c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h4c0.737 0 1.333-0.596 1.333-1.333v-4c0-0.737-0.596-1.333-1.333-1.333zM28 2.667h-2.667v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h5.363c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-5.363c-0.736 0-1.333-0.597-1.333-1.333v-21.333c0-0.736 0.597-1.333 1.333-1.333h2.667v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333v2.696c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.696c0-2.205-1.795-4-4-4zM22 12c-5.515 0-10 4.485-10 10s4.485 10 10 10 10-4.485 10-10-4.485-10-10-10zM22 29.333c-4.043 0-7.333-3.291-7.333-7.333s3.291-7.333 7.333-7.333 7.333 3.291 7.333 7.333-3.291 7.333-7.333 7.333z"></path>\n</svg>\n';var o='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>calendar</title>\n<path d="M28 2.667h-2.667v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-13.333v-1.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333h-2.667c-2.205 0-4 1.795-4 4v21.333c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-21.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.599 1.333-1.333 1.333h-24c-0.736 0-1.333-0.599-1.333-1.333v-13.333h26.667zM29.333 12h-26.667v-5.333c0-0.736 0.599-1.333 1.333-1.333h2.667v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h13.333v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n';var c='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>time</title>\n<path d="M16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333zM16 8c-0.736 0-1.333 0.596-1.333 1.333v6.667h-4c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h5.333c0.736 0 1.333-0.596 1.333-1.333v-8c0-0.737-0.597-1.333-1.333-1.333z"></path>\n</svg>\n';var l=":host{display:block}";var u=e("salla_booking_field",function(){function e(e){var i=this;t(this,e);this.invalidInput=n(this,"invalidInput");this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment","حجز موعد");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment","تعديل الموعد");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully","تمت اضافة الموعد بنجاح");this.selectDate=salla.lang.get("pages.cart.select_appointment_date","حدد تاريخ الموعد");this.bookingUrl="";this.iframeReady=false;this.reservations=[];salla.lang.onLoaded((function(){return i.setTranslations()}));Salla.event.on("booking::open",(function(e){return i.handleBookingOpen(e)}))}e.prototype.setTranslations=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=function(e,t,n){return new Promise((function(i){salla.helpers.setNested(salla.lang.messages[e],t,n);i(true)}))};return[4,e("ar.trans","pages.cart.book_an_appointment","حجز موعد")];case 1:t.sent();return[4,e("en.trans","pages.cart.book_an_appointment","Book an Appointment")];case 2:t.sent();return[4,e("ar.trans","pages.cart.edit_an_appointment","تعديل الموعد")];case 3:t.sent();return[4,e("en.trans","pages.cart.edit_an_appointment","Edit an Appointment")];case 4:t.sent();return[4,e("ar.trans","pages.cart.booked_successfully","تمت اضافة الموعد بنجاح")];case 5:t.sent();return[4,e("en.trans","pages.cart.booked_successfully","Booked Successfully")];case 6:t.sent();return[4,e("ar.trans","pages.cart.select_appointment_date","حدد تاريخ الموعد")];case 7:t.sent();return[4,e("en.trans","pages.cart.select_appointment_date","Select appointment date")];case 8:t.sent();this.bookNowLabel=salla.lang.get("pages.cart.book_an_appointment");this.editLabel=salla.lang.get("pages.cart.edit_an_appointment");this.bookedLabel=salla.lang.get("pages.cart.booked_successfully");this.selectDate=salla.lang.get("pages.cart.select_appointment_date");return[2]}}))}))};e.prototype.openBookingModal=function(e,t){var n=this;if(t===void 0){t=false}if(t&&(!e.detail||typeof e.detail!=="number"||e.detail!==this.productId)){return}if(salla.config.isGuest()){this.setAfterReloadEvent("booking::open-after-reload",this.productId);salla.event.dispatch("login::open");return}salla.booking.add(this.productId,false).then((function(e){if(e.data.redirect.to!=="booking"){throw new Error("Unexpected redirect!")}salla.event.dispatch("booking::open",{url:e.data.redirect.url,id:n.productId})})).catch((function(e){salla.error(salla.lang.get("common.errors.error_occurred"));salla.logger.error(e.response||e)}))};e.prototype.handleBookingOpen=function(e){var t=this;if(e.id!==this.productId)return;this.bookingUrl=salla.url.addParamToUrl("product_id",e.id,e.url);this.iframeReady=true;setTimeout((function(){t.modal.setTitle(t.selectDate);t.modal.open()}),100)};e.prototype.setAfterReloadEvent=function(e,t){salla.storage.set("afterReloadEvent",{event:e,payload:t})};e.prototype.emitAfterReloadEvent=function(){var e=salla.storage.get("afterReloadEvent");if(e&&e.event){var t=new CustomEvent(e.event,{detail:e.payload});window.dispatchEvent(t);salla.storage.remove("afterReloadEvent")}};e.prototype.componentWillLoad=function(){if(this.option&&this.option.details.length){this.reservations=this.option.details}};e.prototype.componentDidLoad=function(){var e=this;window.addEventListener("booking::open-after-reload",(function(t){return e.openBookingModal(t,true)}));this.emitAfterReloadEvent();window.addEventListener("message",this.handleMessageEvent.bind(this));this.reservationsInput.addEventListener("invalid",(function(t){return e.invalidInput.emit(t)}));this.reservationsInput.addEventListener("input",(function(){e.reservationsInput.setCustomValidity("");e.reservationsInput.reportValidity()}))};e.prototype.handleMessageEvent=function(e){var t,n;if(e.data.source!=="booking")return;var i=e.data.type;var a=e.data.message;if(localStorage.getItem("debug"))console.log("Received an action:".concat(i),e.data);if(i==="error"){if((t=a.fields)===null||t===void 0?void 0:t.reservation){salla.notify.error(a.fields.reservation[0]);return}var s=Object.values(a.fields||[a.message]).flat().map((function(e){return"<li>".concat(e,"</li>")})).join("");salla.notify.error("<ul>".concat(s,"</ul>"))}if(i==="success"){if(Number(a.productId)!==Number(this.productId))return;this.reservations=a.data.reservations.map((function(e){if(e.time&&e.time.length>0){var t=e.time[0];return{date:e.date,day:e.day,from_timestamp:t.from,to_timestamp:t.to}}return null})).filter((function(e){return e!==null}));salla.notify.success(this.bookedLabel);(n=this.modal)===null||n===void 0?void 0:n.close();setTimeout((function(){return window.location.reload()}))}if(i==="height"){this.iframe.height=(a===null||a===void 0?void 0:a.height)+"px"}};e.prototype.bookingModal=function(){var e=this;return i("salla-modal",{class:"s-booking-field-modal",ref:function(t){return e.modal=t},width:"md",position:"middle",noPadding:true},i("iframe",{ref:function(t){return e.iframe=t},src:this.bookingUrl,frameborder:"0"}))};e.prototype.renderReservationDate=function(e){return i("span",{class:e.from_timestamp?"s-booking-field-reservations-has-time":""},i("i",{class:"s-booking-field-reservations-icon",innerHTML:o}),e.date)};e.prototype.renderReservationTime=function(e){if(!e.from_timestamp)return"";return i("span",{class:"s-booking-field-reservations-time"},i("i",{class:"s-booking-field-reservations-icon",innerHTML:c}),i("span",null,e.from_timestamp," - ",e.to_timestamp))};e.prototype.render=function(){var e=this;return i(a,{key:"56540a5278d395485a411e712929f32cf76f637e"},i("div",{key:"63673b28b671596d47f4f014223e9c5012f3b671",class:"s-booking-field-main"},this.option.required||this.reservations.length>0?i("div",{class:"s-booking-field-price"},i("span",{innerHTML:salla.money(this.option.price)})):"",i("salla-button",{key:"6d9ffa722391aa0234454fe9ddc90f3477268489",class:"s-booking-field-book-now",size:"small",loaderPosition:"center",fill:"outline",onClick:function(t){return e.openBookingModal(t,false)}},i("span",{key:"dcc8a2b68be4596199e7c776f4501764fd25523f",class:"s-booking-field-book-now-content"},i("span",{key:"b4b2eaf369a5fa822c84b376808c7ee16d8d2598",innerHTML:r}),this.reservations.length?this.editLabel:this.bookNowLabel))),this.reservations.length>0&&i("div",{key:"2684b88bdaf47133dbcaaf6c96f1b81d4ee7ca70",class:"s-booking-field-reservations"},this.reservations.map((function(t,n){return i("div",{key:n,class:"s-booking-field-reservations-item"},e.renderReservationDate(t),e.renderReservationTime(t))}))),i("input",{key:"3d20fcb5fbca8a9e340344d41c316619aec03050",class:"s-hidden",name:this.option.name,required:this.option.required,value:JSON.stringify(this.reservations)==="[]"?"":JSON.stringify(this.reservations),ref:function(t){return e.reservationsInput=t}}),this.iframeReady&&this.bookingModal())};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());u.style=l;var f=e("salla_conditional_fields",function(){function e(e){t(this,e)}e.prototype.hideAllOptions=function(e){var t=this;this.host.querySelectorAll('[data-show-when^="options['.concat(e,'"]')).forEach((function(e){e.classList.add("hidden");t.hideAllOptions(e.dataset.optionId);t.disableInputs(e)}))};e.prototype.disableInputs=function(e){e.querySelectorAll("[name]").forEach((function(e){var t;e.setAttribute("disabled","");e.removeAttribute("required");if(((t=e===null||e===void 0?void 0:e.tagName)===null||t===void 0?void 0:t.toLowerCase())==="select"){e.value=""}if(["checkbox"].includes(e.getAttribute("type"))&&e.hasOwnProperty("checked")){e.checked=false}}))};e.prototype.changeHandler=function(e){var t=this;var n;salla.event.emit("salla-onditional-fields::change",e);salla.log("Received the change event: ",e);if(!e.target||!["SELECT"].includes(e.target.tagName)&&!["checkbox","radio"].includes(e.target.getAttribute("type"))){salla.log("Ignore the change because is not a supported input: "+(((n=e===null||e===void 0?void 0:e.target)===null||n===void 0?void 0:n.tagName)||"N/A"));return}var i=e.target.name.replace("[]","");var a=e.target.getAttribute("type")==="checkbox";var s=e.target.getAttribute("type")==="radio";salla.log("Trying to find all elements with condition:",'[data-show-when^="'.concat(i,'"]'));this.host.querySelectorAll('[data-show-when^="'.concat(i,'"]')).forEach((function(n){var i=!(n===null||n===void 0?void 0:n.dataset.showWhen.includes("!="));var r=n===null||n===void 0?void 0:n.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$3").trim();var o;if(a){var c=Array.from(t.host.querySelectorAll('input[name="'.concat(e.target.name,'"]:checked')),(function(e){return e===null||e===void 0?void 0:e.value}));o=c.includes(r.toString())}else if(s){o=e.target.checked&&e.target.value===r}else{o=r===e.target.value}salla.log("The input is ",a?"Multiple":s?"Radio":"Single"," value:",o);var l=i&&o||!i&&!o;if(l){n.classList.remove("hidden");n.querySelectorAll("[name]").forEach((function(e){e.removeAttribute("disabled");var t=e.closest(".s-product-options-option");if(t.dataset.optionRequired==="true"){e.setAttribute("required","")}if(e.getAttribute("type")==="checkbox"){var n=Array.from(document.querySelectorAll('input[type="checkbox"][name="'.concat(e.getAttribute("name"),'"]')));var i=n.some((function(e){return e.checked}));if(i){n.forEach((function(e){e.removeAttribute("required")}))}}}))}else{t.hideAllOptions(n.dataset.optionId);n.classList.add("hidden");t.disableInputs(n)}}))};e.prototype.componentDidRender=function(){var e=this;this.host.querySelectorAll("[data-show-when]").forEach((function(t){var n;var i=(n=t===null||t===void 0?void 0:t.dataset)===null||n===void 0?void 0:n.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$1").trim();if(!i){return}e.changeHandler({target:e.host.querySelector('[name^="'+i+'"]')})}))};e.prototype.render=function(){return i(a,{key:"aed72d12357c54338c231d5d4c259a510f8b4e95"},i("slot",{key:"84c5af881a45cee9fa71f5e2e63ee9b92aad76c9"}))};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}())}}}));
|
|
5
|
+
//# sourceMappingURL=p-6ec767ac.system.entry.js.map
|
|
@@ -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-Dj2SrCy0.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 l=` <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 n=":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 n=(i=this.review)===null||i===void 0?void 0:i.product;if(!n)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=n.image)===null||r===void 0?void 0:r.alt)||"Product",src:(a=n.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"},n.name),this.showPurchaseCount?s("p",{class:"s-review-card-product-details-purchase-count"},s("span",{innerHTML:l}),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=n;export{d as salla_review_card};
|
|
5
|
+
//# sourceMappingURL=p-70e74f3c.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(i,t,e,n){function r(i){return i instanceof e?i:new e((function(t){t(i)}))}return new(e||(e=Promise))((function(e,s){function a(i){try{u(n.next(i))}catch(i){s(i)}}function o(i){try{u(n["throw"](i))}catch(i){s(i)}}function u(i){i.done?e(i.value):r(i.value).then(a,o)}u((n=n.apply(i,t||[])).next())}))};var __generator=this&&this.__generator||function(i,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(i){return function(t){return u([i,t])}}function u(o){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(e=0)),e)try{if(n=1,r&&(s=o[0]&2?r["return"]:o[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,o[1])).done)return s;if(r=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;r=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){e.label=o[1];break}if(o[0]===6&&e.label<s[1]){e.label=s[1];s=o;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(o);break}if(s[2])e.ops.pop();e.trys.pop();continue}o=t.call(i,e)}catch(i){o=[6,i];r=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-DvJ_tnSw.system.js","./p-Dxc5oJG6.system.js"],(function(i){"use strict";var t,e,n,r;return{setters:[function(i){t=i.r;e=i.h;n=i.g},function(i){r=i.I}],execute:function(){var s=' <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 o=' <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>';var u=":host{display:block}";var l=i("salla_review_card",function(){function i(i){var e=this;t(this,i);this.currentSlide=0;this.showPurchaseCount=false;this.startPoint={x:0,y:0};this.isSwiping=false;this.isRTL="rtl";this.handlePointerDown=function(i){var t;if(!i.isPrimary)return;(t=e.sliderElement)===null||t===void 0?void 0:t.setPointerCapture(i.pointerId);e.startSwipe(i.clientX,i.clientY);i.preventDefault()};this.handlePointerMove=function(i){if(!e.isSwiping||!i.isPrimary)return;i.preventDefault()};this.handlePointerUp=function(i){var t;if(!e.isSwiping||!i.isPrimary)return;(t=e.sliderElement)===null||t===void 0?void 0:t.releasePointerCapture(i.pointerId);e.endSwipe(i.clientX,i.clientY)};this.handlePointerCancel=function(i){var t;if(!e.isSwiping||!i.isPrimary)return;(t=e.sliderElement)===null||t===void 0?void 0:t.releasePointerCapture(i.pointerId);e.isSwiping=false};this.goToSlide=function(i){e.currentSlide=Math.max(0,Math.min(i,e.images.length-1))}}i.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var i,t;return __generator(this,(function(e){switch(e.label){case 0:return[4,salla.onReady()];case 1:e.sent();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?" تم شراءه ".concat((i=this.review.product)===null||i===void 0?void 0:i.sold_quantity," مرة"):"Purchased ".concat(this.review.product.sold_quantity," times"),{count:(t=this.review.product)===null||t===void 0?void 0:t.sold_quantity});this.initializeSlider();return[2]}}))}))};i.prototype.disconnectedCallback=function(){this.removeEventListeners()};Object.defineProperty(i.prototype,"images",{get:function(){var i,t;var e=this.review;return((i=e===null||e===void 0?void 0:e.images)===null||i===void 0?void 0:i.length)>1?e.images.map((function(i,t){return{url:i,alt:"",id:t}})):((t=e===null||e===void 0?void 0:e.product)===null||t===void 0?void 0:t.images)||[]},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"hasMultipleImages",{get:function(){return this.images.length>1},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"slideTransform",{get:function(){var i=this.isRTL?1:-1;return"translateX(".concat(this.currentSlide*100*i,"%)")},enumerable:false,configurable:true});i.prototype.initializeSlider=function(){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()};i.prototype.addEventListeners=function(){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})};i.prototype.removeEventListeners=function(){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)};i.prototype.startSwipe=function(i,t){this.startPoint={x:i,y:t};this.isSwiping=true};i.prototype.componentDidRender=function(){this.removeEventListeners();this.addEventListeners()};i.prototype.endSwipe=function(i,t){this.isSwiping=false;var e=i-this.startPoint.x;var n=t-this.startPoint.y;this.processSwipe(e,n)};i.prototype.processSwipe=function(i,t){var e=10;if(Math.abs(i)<e||Math.abs(t)>Math.abs(i))return;var n=i<0;var r=this.isRTL?!n:n;if(r){this.goToNextSlide()}else{this.goToPrevSlide()}};i.prototype.goToNextSlide=function(){if(this.currentSlide<this.images.length-1){this.currentSlide++}};i.prototype.goToPrevSlide=function(){if(this.currentSlide>0){this.currentSlide--}};i.prototype.renderStars=function(){var i=this;return Array(5).fill(null).map((function(t,n){return e("span",{key:n,innerHTML:i.review.stars>=n+1?s:a})}))};i.prototype.renderDots=function(){var i=this;return this.images.map((function(t,n){var r=t.url;return e("button",{key:r||n,type:"button",class:"s-review-card-slider-dot ".concat(i.currentSlide===n?"active":""),onClick:function(){return i.goToSlide(n)},"aria-label":"Go to slide ".concat(n+1),onPointerDown:function(){return i.goToSlide(n)}})}))};i.prototype.renderSlider=function(){if(!this.hasMultipleImages)return null;return e("div",{class:"s-review-card-slider-container"},e("div",{class:"s-review-card-slides",style:{transform:this.slideTransform}},this.images.map((function(i){return e("div",{key:i===null||i===void 0?void 0:i.id,class:"s-review-card-slider-slide"},e("img",{src:i.url,alt:i.alt||"Product image",width:275,height:275,loading:"lazy",draggable:false}))}))),e("div",{class:"s-review-card-slider-dots"},this.renderDots()))};i.prototype.renderSingleImage=function(){var i,t;var n=(t=(i=this.review)===null||i===void 0?void 0:i.product)===null||t===void 0?void 0:t.image;if(!n||this.hasMultipleImages)return null;return e("img",{src:n.url,alt:n.alt||"Product image",class:"s-review-card-image",width:275,height:275,loading:"lazy",decoding:"async",draggable:false})};i.prototype.renderHeader=function(){var i,t;return e("div",{class:"s-review-card-header"},e("div",{class:"s-review-card-reviewer-name"},e("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)&&e("span",{class:"s-review-card-verified-icon",innerHTML:r})),e("div",{class:"s-review-card-stars"},this.renderStars()))};i.prototype.renderProductInfo=function(){var i,t,n,r,s;var a=(i=this.review)===null||i===void 0?void 0:i.product;if(!a)return null;return e("a",{href:(n=(t=this.review)===null||t===void 0?void 0:t.product)===null||n===void 0?void 0:n.url,class:"s-review-card-product-container"},e("img",{alt:((r=a.image)===null||r===void 0?void 0:r.alt)||"Product",src:(s=a.image)===null||s===void 0?void 0:s.url,class:"s-review-card-product-image",width:60,height:60,loading:"lazy",decoding:"async",draggable:false}),e("div",{class:"s-review-card-product-details"},e("p",{class:"s-review-card-product-details-name"},a.name),this.showPurchaseCount?e("p",{class:"s-review-card-product-details-purchase-count"},e("span",{innerHTML:o}),this.purchasedCount):null))};i.prototype.render=function(){var i;return e("div",{key:"8797bb6b8123ab8a8d4536eb990dcde15e1ddd06",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),c(),e("div",{key:"b2b3bdc4e8a63aae9103eca5274003b49d4bf19e",class:"s-review-card-content"},this.renderHeader(),e("p",{key:"0e64b3fe2ae5e59a1899515c04063f74b9828001",class:"s-review-card-review-content",innerHTML:(i=this.review)===null||i===void 0?void 0:i.content}),c(),this.renderProductInfo()))};Object.defineProperty(i.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return i}());var c=function(i){return e("div",{class:"s-review-card-divider ".concat("")})};l.style=u}}}));
|
|
5
|
+
//# sourceMappingURL=p-7236a037.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(r,t,e,i){function n(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,a){function s(r){try{o(i.next(r))}catch(r){a(r)}}function u(r){try{o(i["throw"](r))}catch(r){a(r)}}function o(r){r.done?e(r.value):n(r.value).then(s,u)}o((i=i.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(r){return function(t){return o([r,t])}}function o(u){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,u[0]&&(e=0)),e)try{if(i=1,n&&(a=u[0]&2?n["return"]:u[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;if(n=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;n=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){e.label=u[1];break}if(u[0]===6&&e.label<a[1]){e.label=a[1];a=u;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(u);break}if(a[2])e.ops.pop();e.trys.pop();continue}u=t.call(r,e)}catch(r){u=[6,r];n=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(r,t,e){if(e||arguments.length===2)for(var i=0,n=t.length,a;i<n;i++){if(a||!(i in t)){if(!a)a=Array.prototype.slice.call(t,0,i);a[i]=t[i]}}return r.concat(a||Array.prototype.slice.call(t))};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-DuTXkmaO.system.js","./p-B8FGqfEh.system.js","./p-C-c0Msup.system.js","./p-CLqFzsVe.system.js"],(function(r){"use strict";var t,e,i,n,a,s,u,o,f;return{setters:[function(r){t=r.a;e=r.d;i=r.e;n=r.f;a=r.r;s=r.h;u=r.g},function(r){o=r.S},function(r){f=r.H},null],execute:function(){var l;var c;function v(){if(c)return l;c=1;var r=t();var e=function(){return r.Date.now()};l=e;return l}var h;var d;function p(){if(d)return h;d=1;var r=/\s/;function t(t){var e=t.length;while(e--&&r.test(t.charAt(e))){}return e}h=t;return h}var g;var w;function m(){if(w)return g;w=1;var r=p();var t=/^\s+/;function e(e){return e?e.slice(0,r(e)+1).replace(t,""):e}g=e;return g}var y;var b;function _(){if(b)return y;b=1;var r=m(),t=e(),n=i();var a=0/0;var s=/^[-+]0x[0-9a-f]+$/i;var u=/^0b[01]+$/i;var o=/^0o[0-7]+$/i;var f=parseInt;function l(e){if(typeof e=="number"){return e}if(n(e)){return a}if(t(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=t(i)?i+"":i}if(typeof e!="string"){return e===0?e:+e}e=r(e);var l=u.test(e);return l||o.test(e)?f(e.slice(2),l?2:8):s.test(e)?a:+e}y=l;return y}var k;var T;function A(){if(T)return k;T=1;var r=e(),t=v(),i=_();var n="Expected a function";var a=Math.max,s=Math.min;function u(e,u,o){var f,l,c,v,h,d,p=0,g=false,w=false,m=true;if(typeof e!="function"){throw new TypeError(n)}u=i(u)||0;if(r(o)){g=!!o.leading;w="maxWait"in o;c=w?a(i(o.maxWait)||0,u):c;m="trailing"in o?!!o.trailing:m}function y(r){var t=f,i=l;f=l=undefined;p=r;v=e.apply(i,t);return v}function b(r){p=r;h=setTimeout(T,u);return g?y(r):v}function _(r){var t=r-d,e=r-p,i=u-t;return w?s(i,c-e):i}function k(r){var t=r-d,e=r-p;return d===undefined||t>=u||t<0||w&&e>=c}function T(){var r=t();if(k(r)){return A(r)}h=setTimeout(T,_(r))}function A(r){h=undefined;if(m&&f){return y(r)}f=l=undefined;return v}function E(){if(h!==undefined){clearTimeout(h)}p=0;f=d=l=h=undefined}function x(){return h===undefined?v:A(t())}function M(){var r=t(),e=k(r);f=arguments;l=this;d=r;if(e){if(h===undefined){return b(d)}if(w){clearTimeout(h);h=setTimeout(T,u);return y(d)}}if(h===undefined){h=setTimeout(T,u)}return v}M.cancel=E;M.flush=x;return M}k=u;return k}var E;var x;function M(){if(x)return E;x=1;var r=A(),t=e();var i="Expected a function";function n(e,n,a){var s=true,u=true;if(typeof e!="function"){throw new TypeError(i)}if(t(a)){s="leading"in a?!!a.leading:s;u="trailing"in a?!!a.trailing:u}return r(e,n,{leading:s,maxWait:n,trailing:u})}E=n;return E}var S=M();var j=n(S);var C=function(){function r(r){var t=this;this.grid=r;this.create=function(){t.mutationObserver.observe(t.grid,{childList:true});for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];t.resizeObserver.observe(i)}};this.onContainerMutation=function(r){var e=r.flatMap((function(r){return Array.from(r.removedNodes)}));var i=r.flatMap((function(r){return Array.from(r.addedNodes)}));for(var n=0,a=e;n<a.length;n++){var s=a[n];if(s instanceof Element){t.resizeObserver.unobserve(s)}}for(var u=0,o=i;u<o.length;u++){var s=o[u];if(s instanceof Element){t.resizeObserver.observe(s)}}if(e.length>0&&i.length===0){t.update()}};this.onChildrenResize=function(r){var e=r.filter((function(r){return r.target.parentElement!==null}));if(e.length>0){t.update()}};this.update=j((function(){var r=window.getComputedStyle(t.grid);if(r.getPropertyValue("display").includes("grid")===false){t.clean();return}var e=L(t.grid);if(e.length<=1){t.clean();return}var i=Number.parseFloat(r.getPropertyValue("row-gap").trim())||0;var n=Array.from(t.grid.children);for(var a=0;a<e.length;a++){var s=n[a];s===null||s===void 0?void 0:s.style.removeProperty("margin-top")}for(var u=0;u<n.length;u++){var o=n[u-e.length];var f=n[u];if(o!==undefined&&f!==undefined){var l=o.getBoundingClientRect().bottom;f.style.removeProperty("margin-top");var c=f.getBoundingClientRect().top;if(c-i!==l){var v=Math.round((l-(c-i)+Number.EPSILON)*100)/100;f.style.setProperty("margin-top","".concat(v,"px"))}}}}),32);this.destroy=function(){t.resizeObserver.disconnect();t.mutationObserver.disconnect();t.clean()};this.clean=function(){for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];i.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}r.prototype[Symbol.dispose]=function(){this.destroy()};return r}();function L(r){var t=window.getComputedStyle(r);var e=t.getPropertyValue("grid-template-columns");return e.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}var O=":host{display:block}";var q=r("salla_reviews_page",function(){function r(r){a(this,r);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}r.prototype.getUrlParams=function(){var r=new URLSearchParams(window.location.search);return{sort:r.get("sort")||null,page:Number.parseInt(r.get("page"))||1}};r.prototype.updateUrlParams=function(r){var t=new URL(window.location.href);for(var e=0,i=Object.entries(r);e<i.length;e++){var n=i[e],a=n[0],s=n[1];if(s){t.searchParams.set(a,s.toString())}else{t.searchParams.delete(a)}}window.history.replaceState({},"",t.toString())};r.prototype.fetchReviews=function(r,t){var e=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:t||e.page||1,sort:r||e.sort||null}})};r.prototype.initializeMasonry=function(){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(t){r=this.el.querySelector(".s-reviews-page-grid");if(!r)return[2];try{new C(r);salla.logger.info("Masonry initialized successfully")}catch(r){salla.logger.error("Masonry initialization failed:",r)}return[2]}))}))};r.prototype.animateReviewCards=function(){var r=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");f.animateItems(r)};r.prototype.initiateInfiniteScroll=function(){var r=this;var t,e,i;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){var t,e;return((e=(t=r.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)||null},history:false,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(function(){r.isLoading=true}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(t){r.pagination=t.pagination;r.reviews=__spreadArray(__spreadArray([],r.reviews,true),t.data,true);r.isLoading=false;r.updateUrlParams({page:t.pagination.current_page})}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("error",(function(t){salla.logger.error("Error loading more reviews:",t);r.isLoading=false}))};r.prototype.componentDidRender=function(){var r=this;setTimeout((function(){requestAnimationFrame(r.animateReviewCards.bind(r))}),176)};r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,salla.onReady()];case 1:n.sent();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");t=this.getUrlParams();return[4,this.fetchReviews(t.sort)];case 2:e=n.sent();this.sort=t.sort;this.reviews=e.data;this.pagination=e.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(r=this.pagination)===null||r===void 0?void 0:r.total);return[3,4];case 3:i=n.sent();salla.logger.error("Error loading reviews:",i);return[3,4];case 4:return[2]}}))}))};r.prototype.handleSorting=function(r){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:t=r.target.value;this.sort=t;this.updateUrlParams({sort:t,page:1});return[4,this.fetchReviews(t,1)];case 1:e=i.sent();this.reviews=e.data;this.pagination=e.pagination;return[2]}}))}))};r.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,this.initializeMasonry()];case 1:r.sent();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1});return[2]}}))}))};r.prototype.disconnectedCallback=function(){if(this.infiniteScroll){this.infiniteScroll.destroy()}};r.prototype.renderSortingOptions=function(){var r=this;var t=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return t.map((function(t){return s("option",{key:t.value,value:t.value,selected:t.value===r.sort},t.label)}))};r.prototype.render=function(){var r=this;var t,e;return s("host",{key:"2108b6bebdc8a651705e45d169fb10127c3c215e"},s("div",{key:"84972824884151462a1040bdc53c334b733cd7fb",class:"s-reviews-page-header-wrapper"},s("h2",{key:"80905de0950443f7e2b1c28d63bcb7f3fa47dc0c",class:"s-reviews-page-title"},this.langTitlesReviews,s("span",{key:"d51385e66a1dee802786b50d063501b6397ce345",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),s("div",{key:"2fc74d0b61d0377f0d14a5fd15a4d852e6850932",class:"s-reviews-page-filter-wrapper"},s("label",{key:"8d1363a2b2f6722f1c56445b5ba33a98f241b106",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),s("select",{key:"eb27d82e25fa609b25d5ca825381285c0a40cc5b",onChange:function(t){return r.handleSorting(t)},disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?s("main",{class:"s-reviews-page-grid",ref:function(t){r.wrapper=t}},this.reviews.map((function(r){return s("salla-review-card",{key:r.id,review:r})}))):s("div",{class:"s-products-list-placeholder"},s("span",{innerHTML:o}),s("p",null,this.placeholderText)),((e=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)&&this.reviews.length?s("div",{class:"s-reviews-page-load-more-container"},s("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()},onKeyUp:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}},this.langLoadMore)):null)};Object.defineProperty(r.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});return r}());q.style=O}}}));
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-DvJ_tnSw.system.js","./p-B8FGqfEh.system.js","./p-C-c0Msup.system.js","./p-CLqFzsVe.system.js"],(function(r){"use strict";var t,e,i,n,a,s,u,o,f;return{setters:[function(r){t=r.a;e=r.d;i=r.e;n=r.f;a=r.r;s=r.h;u=r.g},function(r){o=r.S},function(r){f=r.H},null],execute:function(){var l;var c;function v(){if(c)return l;c=1;var r=t();var e=function(){return r.Date.now()};l=e;return l}var h;var d;function p(){if(d)return h;d=1;var r=/\s/;function t(t){var e=t.length;while(e--&&r.test(t.charAt(e))){}return e}h=t;return h}var w;var g;function m(){if(g)return w;g=1;var r=p();var t=/^\s+/;function e(e){return e?e.slice(0,r(e)+1).replace(t,""):e}w=e;return w}var y;var b;function _(){if(b)return y;b=1;var r=m(),t=e(),n=i();var a=0/0;var s=/^[-+]0x[0-9a-f]+$/i;var u=/^0b[01]+$/i;var o=/^0o[0-7]+$/i;var f=parseInt;function l(e){if(typeof e=="number"){return e}if(n(e)){return a}if(t(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=t(i)?i+"":i}if(typeof e!="string"){return e===0?e:+e}e=r(e);var l=u.test(e);return l||o.test(e)?f(e.slice(2),l?2:8):s.test(e)?a:+e}y=l;return y}var k;var T;function A(){if(T)return k;T=1;var r=e(),t=v(),i=_();var n="Expected a function";var a=Math.max,s=Math.min;function u(e,u,o){var f,l,c,v,h,d,p=0,w=false,g=false,m=true;if(typeof e!="function"){throw new TypeError(n)}u=i(u)||0;if(r(o)){w=!!o.leading;g="maxWait"in o;c=g?a(i(o.maxWait)||0,u):c;m="trailing"in o?!!o.trailing:m}function y(r){var t=f,i=l;f=l=undefined;p=r;v=e.apply(i,t);return v}function b(r){p=r;h=setTimeout(T,u);return w?y(r):v}function _(r){var t=r-d,e=r-p,i=u-t;return g?s(i,c-e):i}function k(r){var t=r-d,e=r-p;return d===undefined||t>=u||t<0||g&&e>=c}function T(){var r=t();if(k(r)){return A(r)}h=setTimeout(T,_(r))}function A(r){h=undefined;if(m&&f){return y(r)}f=l=undefined;return v}function E(){if(h!==undefined){clearTimeout(h)}p=0;f=d=l=h=undefined}function x(){return h===undefined?v:A(t())}function M(){var r=t(),e=k(r);f=arguments;l=this;d=r;if(e){if(h===undefined){return b(d)}if(g){clearTimeout(h);h=setTimeout(T,u);return y(d)}}if(h===undefined){h=setTimeout(T,u)}return v}M.cancel=E;M.flush=x;return M}k=u;return k}var E;var x;function M(){if(x)return E;x=1;var r=A(),t=e();var i="Expected a function";function n(e,n,a){var s=true,u=true;if(typeof e!="function"){throw new TypeError(i)}if(t(a)){s="leading"in a?!!a.leading:s;u="trailing"in a?!!a.trailing:u}return r(e,n,{leading:s,maxWait:n,trailing:u})}E=n;return E}var S=M();var j=n(S);var C=function(){function r(r){var t=this;this.grid=r;this.create=function(){t.mutationObserver.observe(t.grid,{childList:true});for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];t.resizeObserver.observe(i)}};this.onContainerMutation=function(r){var e=r.flatMap((function(r){return Array.from(r.removedNodes)}));var i=r.flatMap((function(r){return Array.from(r.addedNodes)}));for(var n=0,a=e;n<a.length;n++){var s=a[n];if(s instanceof Element){t.resizeObserver.unobserve(s)}}for(var u=0,o=i;u<o.length;u++){var s=o[u];if(s instanceof Element){t.resizeObserver.observe(s)}}if(e.length>0&&i.length===0){t.update()}};this.onChildrenResize=function(r){var e=r.filter((function(r){return r.target.parentElement!==null}));if(e.length>0){t.update()}};this.update=j((function(){var r=window.getComputedStyle(t.grid);if(r.getPropertyValue("display").includes("grid")===false){t.clean();return}var e=L(t.grid);if(e.length<=1){t.clean();return}var i=Number.parseFloat(r.getPropertyValue("row-gap").trim())||0;var n=Array.from(t.grid.children);for(var a=0;a<e.length;a++){var s=n[a];s===null||s===void 0?void 0:s.style.removeProperty("margin-top")}for(var u=0;u<n.length;u++){var o=n[u-e.length];var f=n[u];if(o!==undefined&&f!==undefined){var l=o.getBoundingClientRect().bottom;f.style.removeProperty("margin-top");var c=f.getBoundingClientRect().top;if(c-i!==l){var v=Math.round((l-(c-i)+Number.EPSILON)*100)/100;f.style.setProperty("margin-top","".concat(v,"px"))}}}}),32);this.destroy=function(){t.resizeObserver.disconnect();t.mutationObserver.disconnect();t.clean()};this.clean=function(){for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];i.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}r.prototype[Symbol.dispose]=function(){this.destroy()};return r}();function L(r){var t=window.getComputedStyle(r);var e=t.getPropertyValue("grid-template-columns");return e.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}var q=":host{display:block}";var z=r("salla_reviews_page",function(){function r(r){a(this,r);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}r.prototype.getUrlParams=function(){var r=new URLSearchParams(window.location.search);return{sort:r.get("sort")||null,page:Number.parseInt(r.get("page"))||1}};r.prototype.updateUrlParams=function(r){var t=new URL(window.location.href);for(var e=0,i=Object.entries(r);e<i.length;e++){var n=i[e],a=n[0],s=n[1];if(s){t.searchParams.set(a,s.toString())}else{t.searchParams.delete(a)}}window.history.replaceState({},"",t.toString())};r.prototype.fetchReviews=function(r,t){var e=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:t||e.page||1,sort:r||e.sort||null}})};r.prototype.initializeMasonry=function(){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(t){r=this.el.querySelector(".s-reviews-page-grid");if(!r)return[2];try{new C(r);salla.logger.info("Masonry initialized successfully")}catch(r){salla.logger.error("Masonry initialization failed:",r)}return[2]}))}))};r.prototype.animateReviewCards=function(){var r=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");f.animateItems(r)};r.prototype.initiateInfiniteScroll=function(){var r=this;var t,e,i;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){var t,e;return((e=(t=r.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)||null},history:false,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(function(){r.isLoading=true}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(t){r.pagination=t.pagination;r.reviews=__spreadArray(__spreadArray([],r.reviews,true),t.data,true);r.isLoading=false;r.updateUrlParams({page:t.pagination.current_page})}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("error",(function(t){salla.logger.error("Error loading more reviews:",t);r.isLoading=false}))};r.prototype.componentDidRender=function(){var r=this;setTimeout((function(){requestAnimationFrame(r.animateReviewCards.bind(r))}),176)};r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,salla.onReady()];case 1:n.sent();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");t=this.getUrlParams();return[4,this.fetchReviews(t.sort)];case 2:e=n.sent();this.sort=t.sort;this.reviews=e.data;this.pagination=e.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(r=this.pagination)===null||r===void 0?void 0:r.total);return[3,4];case 3:i=n.sent();salla.logger.error("Error loading reviews:",i);return[3,4];case 4:return[2]}}))}))};r.prototype.handleSorting=function(r){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:t=r.target.value;this.sort=t;this.updateUrlParams({sort:t,page:1});return[4,this.fetchReviews(t,1)];case 1:e=i.sent();this.reviews=e.data;this.pagination=e.pagination;return[2]}}))}))};r.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,this.initializeMasonry()];case 1:r.sent();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1});return[2]}}))}))};r.prototype.disconnectedCallback=function(){if(this.infiniteScroll){this.infiniteScroll.destroy()}};r.prototype.renderSortingOptions=function(){var r=this;var t=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return t.map((function(t){return s("option",{key:t.value,value:t.value,selected:t.value===r.sort},t.label)}))};r.prototype.render=function(){var r=this;var t,e;return s("host",{key:"2108b6bebdc8a651705e45d169fb10127c3c215e"},s("div",{key:"84972824884151462a1040bdc53c334b733cd7fb",class:"s-reviews-page-header-wrapper"},s("h2",{key:"80905de0950443f7e2b1c28d63bcb7f3fa47dc0c",class:"s-reviews-page-title"},this.langTitlesReviews,s("span",{key:"d51385e66a1dee802786b50d063501b6397ce345",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),s("div",{key:"2fc74d0b61d0377f0d14a5fd15a4d852e6850932",class:"s-reviews-page-filter-wrapper"},s("label",{key:"8d1363a2b2f6722f1c56445b5ba33a98f241b106",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),s("select",{key:"eb27d82e25fa609b25d5ca825381285c0a40cc5b",onChange:function(t){return r.handleSorting(t)},disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?s("main",{class:"s-reviews-page-grid",ref:function(t){r.wrapper=t}},this.reviews.map((function(r){return s("salla-review-card",{key:r.id,review:r})}))):s("div",{class:"s-products-list-placeholder"},s("span",{innerHTML:o}),s("p",null,this.placeholderText)),((e=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)&&this.reviews.length?s("div",{class:"s-reviews-page-load-more-container"},s("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()},onKeyUp:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}},this.langLoadMore)):null)};Object.defineProperty(r.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});return r}());z.style=q}}}));
|
|
5
|
+
//# sourceMappingURL=p-7436f972.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,c as s,h as e,H as i,g as l}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as t,c as s,h as e,H as i,g as l}from"./p-Dj2SrCy0.js";import{F as a}from"./p-DL4h2bc3.js";import{H as r}from"./p-DjVGZdqd.js";import"./p-CgtvEd63.js";const o=":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";const n=class{constructor(e){t(this,e);this.changed=s(this,"changed");this.isReady=false;this.filtersData={};salla.event.on("filters::hidden",(()=>this.host.style.display="none"));salla.lang.onLoaded((()=>{this.apply=salla.lang.get("pages.checkout.apply");this.reset=salla.lang.get("pages.categories.filters_reset")}));salla.event.on("filters::fetched",(({filters:t})=>{this.host.style.display="";let s={};this.filters=t.map((t=>{t.label={category_id:salla.lang.get("common.titles.categories"),brand_id:salla.lang.get("common.titles.brands"),rating:salla.lang.get("pages.categories.filter_rating"),price:salla.lang.get("pages.categories.filter_price")}[t.key]||t.label;if(t.key=="rating"){t.type=a.VALUES;let{max:s,min:e}=t.values;t.values=[5,4,3,2,1].filter((t=>t>=e||t<=s))}if(this.filtersData.variants&&t.type==a.VARIANTS){s.variants=this.filtersData.variants}if(this.filtersData[t.key]&&t.type!==a.VARIANTS){s[t.key]=this.filtersData[t.key]}let e=new URLSearchParams(window.location.search);let i=false;for(let t of e.keys()){if(t.includes("filters")){i=true;break}}if(salla.config.get("page.slug")=="product.index"&&Object.keys(s).length==0&&!i){let t=window.location.href;let e=salla.config.get("page.id");let i=t.indexOf("?")!==-1?"&":"?";let l=t+i+"filters[category_id]="+e;s.category_id=e;window.history.pushState({path:l},"",l)}return t}));this.filtersData=s;this.host.childNodes.forEach((async t=>t.setWidgetHeight&&await t.setWidgetHeight()))}))}async componentWillLoad(){try{const t=new URLSearchParams(window.location.search);this.filtersData=await r.extractFiltersFromUrl(t)}catch(t){console.warn("failed to get filters from URL",t.message)}}async getFilters(){return this.filtersData}async applyFilters(){if(!this.isReady){return}let t=Object.keys(this.filtersData).length>0;setTimeout((()=>{var s;if(t){let t=new URL(window.location.href);for(const[s]of t.searchParams.entries()){if(s.startsWith("filters")){t.searchParams.delete(s)}}let s=this.encodeFilters(this.filtersData);let e=t.search.split("&").filter((t=>!t.includes("filters"))).join("&");if(e){t.search=t.search.split("&filters")[0]+"&"+s}else{t.search=`?${s}`}window.history.pushState({},"",t.href)}else{let t=new URL(window.location.href);(s=t.searchParams)===null||s===void 0?void 0:s.delete("filters");window.history.pushState({},"",t.toString())}salla.event.emit("salla-filters::changed",this.filtersData);this.changed.emit(this.filtersData)}),300)}encodeFilters(t,s="filters"){const e=[];for(const i in t){if(Object.prototype.hasOwnProperty.call(t,i)){const l=t[i];const a=s?`${s}[${i}]`:i;if(Array.isArray(l)){for(let t=0;t<l.length;t++){e.push(`${a}[${t}]=${l[t]}`)}}else if(typeof l==="object"&&l!==null){e.push(this.encodeFilters(l,a))}else{let t=`${a}=${l}`;e.push(t)}}}return e.join("&")}async resetFilters(){this.removeFiltersQueryParams();this.filtersData={};this.host.childNodes.forEach((t=>t.reset&&t.reset()));salla.event.emit("salla-filters::reset");return this.applyFilters()}removeFiltersQueryParams(){const t=new URLSearchParams(window.location.search);const s=Array.from(t.keys()).filter((t=>!t.startsWith("filters["))).map((s=>`${encodeURIComponent(s)}=${encodeURIComponent(t.get(s))}`)).join("&");const e=s?`${window.location.pathname}?${s}`:window.location.pathname;window.history.pushState({},"",e)}handleOptionChange(t,s,e){if(s.type===a.RANGE){this.filtersData[s.key]=e}let i=t.target.checked;if(s.type===a.VARIANTS){this.filtersData.variants=this.filtersData.variants||{};i&&(this.filtersData.variants[s.key]=e);i||delete this.filtersData.variants[s.key]}else if(t.target.type=="radio"){i&&(this.filtersData[s.key]=e);i||delete this.filtersData[s.key]}else if(t.target.type=="checkbox"){this.filtersData[s.key]=this.filtersData[s.key]||[];if(i){this.filtersData[s.key].push(e)}this.filtersData[s.key]=this.filtersData[s.key].filter((t=>t!=e))}this.applyFilters()}render(){var t,s;return e(i,{key:"d62d9a867f140a911cb5da11a1034511fd230745"},(t=this.filters)===null||t===void 0?void 0:t.map((t=>e("salla-filters-widget",{option:t,filtersData:this.filtersData,onChanged:({detail:{event:t,option:s,value:e}})=>{this.handleOptionChange(t,s,e)}}))),((s=this.filters)===null||s===void 0?void 0:s.length)?e("div",{class:"s-filters-footer"},e("salla-button",{color:"gray",fill:"outline",onClick:()=>this.resetFilters()},this.reset)):"")}componentDidLoad(){this.isReady=true}get host(){return l(this)}};n.style=o;export{n as salla_filters};
|
|
5
|
+
//# sourceMappingURL=p-74647582.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-Cl_CHxGj.system.js","sources":["src/components/salla-orders/salla-orders.scss?tag=salla-orders","src/components/salla-orders/salla-orders.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, State, h, Prop, Element } from '@stencil/core';\nimport { Order, OrderQueryParameters } from './interface'\nimport {Pagination} from \"../../interfaces\"\nimport Helper from '../../Helpers/Helper';\n\n@Component({\n tag: 'salla-orders',\n styleUrl: 'salla-orders.scss',\n})\nexport class SallaOrder {\n\n constructor() {\n salla.lang.onLoaded(() => {\n this.languageCode = salla.lang.locale\n this.orderNumberText = salla.lang.get('pages.thank_you.order_id');\n this.totalOrderText = salla.lang.get('pages.orders.total')\n this.orderDateText = salla.lang.get('pages.orders.date')\n this.orderStatusText = salla.lang.get('pages.orders.status')\n this.noOrderText = salla.lang.get('pages.orders.non_orders')\n this.load_more_text_trans = salla.lang.get('common.elements.load_more')\n })\n }\n\n /**\n * Query Parameter to send along with the fetch request\n */\n @Prop() params: OrderQueryParameters;\n\n /**\n * Load more text\n */\n @Prop() loadMoreText: string;\n\n @State() orderNumberText: string = salla.lang.get('pages.thank_you.order_id')\n @State() totalOrderText: string = salla.lang.get('pages.orders.total')\n @State() orderDateText: string = salla.lang.get('pages.orders.date')\n @State() orderStatusText: string = salla.lang.get('pages.orders.status')\n @State() noOrderText: string = salla.lang.get('pages.orders.non_orders')\n @State() load_more_text_trans = salla.lang.get('common.elements.load_more');\n @State() languageCode: string = salla.lang.locale\n\n @State() orders: Array<Order> = [];\n @State() pagination: Pagination;\n @State() hasInfiniteScroll: boolean;\n @State() total: number;\n @State() nextPage: string;\n @State() showPlaceholder: boolean;\n\n private status: any;\n private btnLoader: any;\n private infiniteScroll: any;\n private wrapper: HTMLElement;\n\n @Element() host: HTMLElement;\n\n // Show/hide loading\n private loading(isLoading = true) {\n let btnText = this.status?.querySelector('.s-button-text');\n if (btnText) {\n Helper.toggleElementClassIf(btnText, 's-button-hide', 's-button-show', () => isLoading);\n this.btnLoader.style.display = isLoading ? 'inherit' : 'none';\n }\n }\n\n private initiateInfiniteScroll() {\n if (!this.hasInfiniteScroll) {\n return;\n }\n\n if (!this.wrapper) {\n salla.logger.error('Wrapper is undefined. Cannot initiate infinite scroll.');\n return;\n }\n\n this.infiniteScroll = salla.infiniteScroll.initiate(this.wrapper, this.wrapper, {\n path: () => this.nextPage,\n history: false,\n nextPage: this.nextPage,\n scrollThreshold: false,\n }, true);\n\n this.infiniteScroll?.on('request', _response => {\n this.loading();\n });\n\n this.infiniteScroll?.on('load', response => {\n this.loading(false);\n this.pagination = response.pagination;\n this.nextPage = response.pagination?.links?.next || null;\n this.handleResponse(response.data).forEach(data => {\n this.wrapper.append(data)\n })\n let items = this.host.querySelectorAll('.s-orders-table-tbody-tr:not(.animated)');\n Helper.animateItems(items);\n });\n\n this.infiniteScroll?.on('error', (e) => {\n salla.logger.error('Error loading more comments:', e);\n });\n\n }\n\n // Get next page\n async loadMore() {\n this.infiniteScroll.loadNextPage();\n }\n\n private handleResponse(orderList: Array<Order>) {\n return orderList.map(order => this.getSingleOrderItem(order));\n }\n\n private async loadInitialData() {\n const url = new URL(window.location.href);\n \n await salla.order.api.fetch({ ...this.params, types: [\"\"], feedback_status: url.searchParams.get('feedback_status') }).then((resp) => {\n this.orders = resp.data\n this.hasInfiniteScroll = !!resp.pagination?.links.next;\n this.pagination = resp.pagination;\n this.total = resp.pagination?.total;\n this.nextPage = resp.pagination?.links?.next || null;\n if (!this.orders.length) {\n this.showPlaceholder = true;\n return this.loading(false);\n }\n setTimeout(() => {\n this.handleResponse(resp.data).forEach(data => {\n this.wrapper.append(data)\n })\n this.initiateInfiniteScroll();\n let items = this.wrapper.querySelectorAll('.s-orders-table-tbody-tr:not(.animated)');\n Helper.animateItems(items);\n }, 100)\n }).catch(error => {\n this.showPlaceholder = true;\n this.loading(false)\n salla.logger.error(error)\n })\n }\n\n private getSingleOrderItem(order: Order): HTMLTableRowElement {\n const tr = document.createElement('tr');\n tr.classList.add('s-orders-table-tbody-tr', 's-orders-table-tbody-tr-shadow'); \n \n const td1 = document.createElement('td');\n td1.classList.add('s-orders-table-tbody-tr-td');\n const div1 = document.createElement('div');\n div1.classList.add('s-orders-table-tbody-tr-td-content');\n const span1 = document.createElement('span');\n span1.classList.add('s-orders-mobile-title');\n span1.textContent = this.orderNumberText + ':';\n const span2 = document.createElement('span');\n span2.classList.add('s-orders-reference-id');\n span2.textContent = '#' + order.reference_id;\n div1.appendChild(span1);\n div1.appendChild(span2);\n if (order.source == 'buy_as_gift') {\n const giftIcon = document.createElement('i');\n giftIcon.classList.add('sicon-gift-sharing', 's-orders-buy-as-gift-icon');\n div1.appendChild(giftIcon);\n }\n const anchor1 = document.createElement('a');\n anchor1.href = order.url;\n div1.appendChild(anchor1);\n const div2 = document.createElement('div');\n div2.classList.add('s-orders-copy-to-clipboard-button');\n const sallaButton = document.createElement('salla-button');\n sallaButton.classList.add('relative');\n sallaButton.setAttribute('color', 'dark');\n sallaButton.setAttribute('shape', 'link');\n sallaButton.dataset.content = order.reference_id.toString();\n sallaButton.addEventListener('click', (event) => {\n Helper.copyToClipboard(event)\n Helper.toggleElementClassIf(sallaButton, 'copied', 'code-to-copy', () => true);\n setTimeout(() => {\n Helper.toggleElementClassIf(sallaButton, 'code-to-copy', 'copied', () => true)\n }, 1000);\n });\n const span3 = document.createElement('span');\n span3.textContent = '#' + order.reference_id;\n const copyIcon = document.createElement('i');\n copyIcon.classList.add('sicon-swap-stroke', 's-orders-copy-to-clipboard-button-icon');\n // Check the text direction\n let isRTL = salla.config.get('theme.is_rtl', true);\n if (isRTL) {\n // Append the icon and then the span\n sallaButton.appendChild(copyIcon);\n sallaButton.appendChild(span3);\n } else {\n // Append the span and then the icon\n sallaButton.appendChild(span3);\n sallaButton.appendChild(copyIcon);\n }\n\n div2.appendChild(sallaButton);\n div1.appendChild(div2);\n td1.appendChild(div1);\n tr.appendChild(td1);\n\n const td2 = document.createElement('td');\n td2.classList.add('s-orders-table-tbody-tr-td');\n const div3 = document.createElement('div');\n div3.classList.add('s-orders-table-tbody-tr-td-content');\n const span4 = document.createElement('span');\n span4.classList.add('s-orders-mobile-title');\n span4.textContent = this.totalOrderText + ':';\n const div4 = document.createElement('div');\n div4.innerHTML = salla.money(order.total);\n const anchor2 = document.createElement('a');\n anchor2.href = order.url;\n div3.appendChild(span4);\n div3.appendChild(div4);\n div3.appendChild(anchor2);\n td2.appendChild(div3);\n tr.appendChild(td2);\n\n const td3 = document.createElement('td');\n td3.classList.add('s-orders-table-tbody-tr-td');\n const div5 = document.createElement('div');\n div5.classList.add('s-orders-table-tbody-tr-td-content');\n const span5 = document.createElement('span');\n span5.classList.add('s-orders-mobile-title');\n span5.textContent = this.orderDateText + ':';\n const div6 = document.createElement('div');\n div6.textContent = Helper.formatDateFromString(order.created_at.date, salla.helpers.number, this.languageCode);\n const anchor3 = document.createElement('a');\n anchor3.href = order.url;\n div5.appendChild(span5);\n div5.appendChild(div6);\n div5.appendChild(anchor3);\n td3.appendChild(div5);\n tr.appendChild(td3);\n\n const td4 = document.createElement('td');\n td4.classList.add('s-orders-table-tbody-tr-td');\n const div7 = document.createElement('div');\n div7.classList.add('s-orders-table-tbody-tr-td-content');\n const span6 = document.createElement('span');\n span6.classList.add('s-orders-mobile-title');\n span6.textContent = this.orderStatusText + ':';\n const statusSpan = document.createElement('span');\n statusSpan.classList.add('s-orders-status-container');\n statusSpan.style.color = order.status.color;\n const statusIcon = document.createElement('i');\n statusIcon.classList.add(order.status.icon);\n const statusName = document.createElement('span');\n statusName.textContent = order.status.name;\n statusSpan.appendChild(statusIcon);\n statusSpan.appendChild(statusName);\n div7.appendChild(span6);\n div7.appendChild(statusSpan);\n const starIcon = document.createElement('i');\n starIcon.classList.add('sicon-star2', 's-orders-status-rated', order.is_rated ? 's-orders-rated-text' : 's-orders-unrated-text');\n div7.appendChild(starIcon);\n const anchor4 = document.createElement('a');\n anchor4.href = order.url;\n div7.appendChild(anchor4);\n td4.appendChild(div7);\n tr.appendChild(td4);\n\n return tr;\n }\n\n render() {\n if (this.showPlaceholder) {\n return <div class=\"s-orders-no-content\">\n <i class=\"sicon-packed-box icon\"></i>\n <p>{this.noOrderText}</p>\n </div>\n }\n return <div class=\"s-orders-wrapper\">\n <table class=\"s-orders-table\">\n <thead class=\"s-orders-table-head\">\n <tr class=\"s-orders-table-head-tr\">\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.orderNumberText}\n </th>\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.totalOrderText}\n </th>\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.orderDateText}\n </th>\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.orderStatusText}\n </th>\n </tr>\n </thead>\n <tbody class=\"s-orders-table-tbody\" ref={(el) => (this.wrapper = el)}>\n\n </tbody>\n </table>\n\n {this.nextPage && (\n <div class=\"s-infinite-scroll-wrapper\" ref={status => this.status = status}>\n <button onClick={() => this.loadMore()} class=\"s-infinite-scroll-btn s-button-btn s-button-primary\">\n <span class=\"s-button-text s-infinite-scroll-btn-text\">{this.loadMoreText ?? this.load_more_text_trans}</span>\n <span class=\"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader\" ref={btnLoader => this.btnLoader = btnLoader} style={{ \"display\": \"none\" }}></span>\n </button>\n </div>\n )}\n </div>\n }\n\n componentWillLoad() {\n return salla.onReady()\n .then(() => this.loadInitialData())\n .then( () => this.initiateInfiniteScroll())\n }\n}\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAAA,MAAM,cAAc,GAAG,sBAAsB;;YCShC,UAAU,2BAAA,MAAA;MAErB,IAAA,WAAA,CAAA,OAAA,EAAA;;cAsBS,IAAe,CAAA,eAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,0BAA0B,CAAC;cACpE,IAAc,CAAA,cAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC;cAC7D,IAAa,CAAA,aAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC;cAC3D,IAAe,CAAA,eAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC;cAC/D,IAAW,CAAA,WAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,yBAAyB,CAAC;cAC/D,IAAoB,CAAA,oBAAA,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,2BAA2B,CAAC;cAClE,IAAA,CAAA,YAAY,GAAW,KAAK,CAAC,IAAI,CAAC,MAAM;MAExC,QAAA,IAAM,CAAA,MAAA,GAAiB,EAAE;MA7BhC,QAAA,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAK;kBACvB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM;kBACrC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,0BAA0B,CAAC;kBACjE,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC;kBAC1D,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC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CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,0CAA0C,EAAA,EAAE,CAAA,EAAA,GAAA,IAAI,CAAC,YAAY,MAAI,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAA,IAAI,CAAC,oBAAoB,CAAQ,EAC9G,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,qEAAqE,EAAC,GAAG,EAAE,SAAS,IAAI,IAAI,CAAC,SAAS,GAAG,SAAS,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAAA,CAAS,CAC9J,CACL,CACP,CACG;;UAGR,iBAAiB,GAAA;cACf,OAAO,KAAK,CAAC,OAAO;mBACnB,IAAI,CAAC,MAAM,IAAI,CAAC,eAAe,EAAE;mBACjC,IAAI,CAAE,MAAM,IAAI,CAAC,sBAAsB,EAAE,CAAC;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"p-78vq_YNh.system.js","sources":["src/components/salla-orders/salla-orders.scss?tag=salla-orders","src/components/salla-orders/salla-orders.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, State, h, Prop, Element } from '@stencil/core';\nimport { Order, OrderQueryParameters } from './interface'\nimport {Pagination} from \"../../interfaces\"\nimport Helper from '../../Helpers/Helper';\n\n@Component({\n tag: 'salla-orders',\n styleUrl: 'salla-orders.scss',\n})\nexport class SallaOrder {\n\n constructor() {\n salla.lang.onLoaded(() => {\n this.languageCode = salla.lang.locale\n this.orderNumberText = salla.lang.get('pages.thank_you.order_id');\n this.totalOrderText = salla.lang.get('pages.orders.total')\n this.orderDateText = salla.lang.get('pages.orders.date')\n this.orderStatusText = salla.lang.get('pages.orders.status')\n this.noOrderText = salla.lang.get('pages.orders.non_orders')\n this.load_more_text_trans = salla.lang.get('common.elements.load_more')\n })\n }\n\n /**\n * Query Parameter to send along with the fetch request\n */\n @Prop() params: OrderQueryParameters;\n\n /**\n * Load more text\n */\n @Prop() loadMoreText: string;\n\n @State() orderNumberText: string = salla.lang.get('pages.thank_you.order_id')\n @State() totalOrderText: string = salla.lang.get('pages.orders.total')\n @State() orderDateText: string = salla.lang.get('pages.orders.date')\n @State() orderStatusText: string = salla.lang.get('pages.orders.status')\n @State() noOrderText: string = salla.lang.get('pages.orders.non_orders')\n @State() load_more_text_trans = salla.lang.get('common.elements.load_more');\n @State() languageCode: string = salla.lang.locale\n\n @State() orders: Array<Order> = [];\n @State() pagination: Pagination;\n @State() hasInfiniteScroll: boolean;\n @State() total: number;\n @State() nextPage: string;\n @State() showPlaceholder: boolean;\n\n private status: any;\n private btnLoader: any;\n private infiniteScroll: any;\n private wrapper: HTMLElement;\n\n @Element() host: HTMLElement;\n\n // Show/hide loading\n private loading(isLoading = true) {\n let btnText = this.status?.querySelector('.s-button-text');\n if (btnText) {\n Helper.toggleElementClassIf(btnText, 's-button-hide', 's-button-show', () => isLoading);\n this.btnLoader.style.display = isLoading ? 'inherit' : 'none';\n }\n }\n\n private initiateInfiniteScroll() {\n if (!this.hasInfiniteScroll) {\n return;\n }\n\n if (!this.wrapper) {\n salla.logger.error('Wrapper is undefined. Cannot initiate infinite scroll.');\n return;\n }\n\n this.infiniteScroll = salla.infiniteScroll.initiate(this.wrapper, this.wrapper, {\n path: () => this.nextPage,\n history: false,\n nextPage: this.nextPage,\n scrollThreshold: false,\n }, true);\n\n this.infiniteScroll?.on('request', _response => {\n this.loading();\n });\n\n this.infiniteScroll?.on('load', response => {\n this.loading(false);\n this.pagination = response.pagination;\n this.nextPage = response.pagination?.links?.next || null;\n this.handleResponse(response.data).forEach(data => {\n this.wrapper.append(data)\n })\n let items = this.host.querySelectorAll('.s-orders-table-tbody-tr:not(.animated)');\n Helper.animateItems(items);\n });\n\n this.infiniteScroll?.on('error', (e) => {\n salla.logger.error('Error loading more comments:', e);\n });\n\n }\n\n // Get next page\n async loadMore() {\n this.infiniteScroll.loadNextPage();\n }\n\n private handleResponse(orderList: Array<Order>) {\n return orderList.map(order => this.getSingleOrderItem(order));\n }\n\n private async loadInitialData() {\n const url = new URL(window.location.href);\n \n await salla.order.api.fetch({ ...this.params, types: [\"\"], feedback_status: url.searchParams.get('feedback_status') }).then((resp) => {\n this.orders = resp.data\n this.hasInfiniteScroll = !!resp.pagination?.links.next;\n this.pagination = resp.pagination;\n this.total = resp.pagination?.total;\n this.nextPage = resp.pagination?.links?.next || null;\n if (!this.orders.length) {\n this.showPlaceholder = true;\n return this.loading(false);\n }\n setTimeout(() => {\n this.handleResponse(resp.data).forEach(data => {\n this.wrapper.append(data)\n })\n this.initiateInfiniteScroll();\n let items = this.wrapper.querySelectorAll('.s-orders-table-tbody-tr:not(.animated)');\n Helper.animateItems(items);\n }, 100)\n }).catch(error => {\n this.showPlaceholder = true;\n this.loading(false)\n salla.logger.error(error)\n })\n }\n\n private getSingleOrderItem(order: Order): HTMLTableRowElement {\n const tr = document.createElement('tr');\n tr.classList.add('s-orders-table-tbody-tr', 's-orders-table-tbody-tr-shadow'); \n \n const td1 = document.createElement('td');\n td1.classList.add('s-orders-table-tbody-tr-td');\n const div1 = document.createElement('div');\n div1.classList.add('s-orders-table-tbody-tr-td-content');\n const span1 = document.createElement('span');\n span1.classList.add('s-orders-mobile-title');\n span1.textContent = this.orderNumberText + ':';\n const span2 = document.createElement('span');\n span2.classList.add('s-orders-reference-id');\n span2.textContent = '#' + order.reference_id;\n div1.appendChild(span1);\n div1.appendChild(span2);\n if (order.source == 'buy_as_gift') {\n const giftIcon = document.createElement('i');\n giftIcon.classList.add('sicon-gift-sharing', 's-orders-buy-as-gift-icon');\n div1.appendChild(giftIcon);\n }\n const anchor1 = document.createElement('a');\n anchor1.href = order.url;\n div1.appendChild(anchor1);\n const div2 = document.createElement('div');\n div2.classList.add('s-orders-copy-to-clipboard-button');\n const sallaButton = document.createElement('salla-button');\n sallaButton.classList.add('relative');\n sallaButton.setAttribute('color', 'dark');\n sallaButton.setAttribute('shape', 'link');\n sallaButton.dataset.content = order.reference_id.toString();\n sallaButton.addEventListener('click', (event) => {\n Helper.copyToClipboard(event)\n Helper.toggleElementClassIf(sallaButton, 'copied', 'code-to-copy', () => true);\n setTimeout(() => {\n Helper.toggleElementClassIf(sallaButton, 'code-to-copy', 'copied', () => true)\n }, 1000);\n });\n const span3 = document.createElement('span');\n span3.textContent = '#' + order.reference_id;\n const copyIcon = document.createElement('i');\n copyIcon.classList.add('sicon-swap-stroke', 's-orders-copy-to-clipboard-button-icon');\n // Check the text direction\n let isRTL = salla.config.get('theme.is_rtl', true);\n if (isRTL) {\n // Append the icon and then the span\n sallaButton.appendChild(copyIcon);\n sallaButton.appendChild(span3);\n } else {\n // Append the span and then the icon\n sallaButton.appendChild(span3);\n sallaButton.appendChild(copyIcon);\n }\n\n div2.appendChild(sallaButton);\n div1.appendChild(div2);\n td1.appendChild(div1);\n tr.appendChild(td1);\n\n const td2 = document.createElement('td');\n td2.classList.add('s-orders-table-tbody-tr-td');\n const div3 = document.createElement('div');\n div3.classList.add('s-orders-table-tbody-tr-td-content');\n const span4 = document.createElement('span');\n span4.classList.add('s-orders-mobile-title');\n span4.textContent = this.totalOrderText + ':';\n const div4 = document.createElement('div');\n div4.innerHTML = salla.money(order.total);\n const anchor2 = document.createElement('a');\n anchor2.href = order.url;\n div3.appendChild(span4);\n div3.appendChild(div4);\n div3.appendChild(anchor2);\n td2.appendChild(div3);\n tr.appendChild(td2);\n\n const td3 = document.createElement('td');\n td3.classList.add('s-orders-table-tbody-tr-td');\n const div5 = document.createElement('div');\n div5.classList.add('s-orders-table-tbody-tr-td-content');\n const span5 = document.createElement('span');\n span5.classList.add('s-orders-mobile-title');\n span5.textContent = this.orderDateText + ':';\n const div6 = document.createElement('div');\n div6.textContent = Helper.formatDateFromString(order.created_at.date, salla.helpers.number, this.languageCode);\n const anchor3 = document.createElement('a');\n anchor3.href = order.url;\n div5.appendChild(span5);\n div5.appendChild(div6);\n div5.appendChild(anchor3);\n td3.appendChild(div5);\n tr.appendChild(td3);\n\n const td4 = document.createElement('td');\n td4.classList.add('s-orders-table-tbody-tr-td');\n const div7 = document.createElement('div');\n div7.classList.add('s-orders-table-tbody-tr-td-content');\n const span6 = document.createElement('span');\n span6.classList.add('s-orders-mobile-title');\n span6.textContent = this.orderStatusText + ':';\n const statusSpan = document.createElement('span');\n statusSpan.classList.add('s-orders-status-container');\n statusSpan.style.color = order.status.color;\n const statusIcon = document.createElement('i');\n statusIcon.classList.add(order.status.icon);\n const statusName = document.createElement('span');\n statusName.textContent = order.status.name;\n statusSpan.appendChild(statusIcon);\n statusSpan.appendChild(statusName);\n div7.appendChild(span6);\n div7.appendChild(statusSpan);\n const starIcon = document.createElement('i');\n starIcon.classList.add('sicon-star2', 's-orders-status-rated', order.is_rated ? 's-orders-rated-text' : 's-orders-unrated-text');\n div7.appendChild(starIcon);\n const anchor4 = document.createElement('a');\n anchor4.href = order.url;\n div7.appendChild(anchor4);\n td4.appendChild(div7);\n tr.appendChild(td4);\n\n return tr;\n }\n\n render() {\n if (this.showPlaceholder) {\n return <div class=\"s-orders-no-content\">\n <i class=\"sicon-packed-box icon\"></i>\n <p>{this.noOrderText}</p>\n </div>\n }\n return <div class=\"s-orders-wrapper\">\n <table class=\"s-orders-table\">\n <thead class=\"s-orders-table-head\">\n <tr class=\"s-orders-table-head-tr\">\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.orderNumberText}\n </th>\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.totalOrderText}\n </th>\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.orderDateText}\n </th>\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.orderStatusText}\n </th>\n </tr>\n </thead>\n <tbody class=\"s-orders-table-tbody\" ref={(el) => (this.wrapper = el)}>\n\n </tbody>\n </table>\n\n {this.nextPage && (\n <div class=\"s-infinite-scroll-wrapper\" ref={status => this.status = status}>\n <button onClick={() => this.loadMore()} class=\"s-infinite-scroll-btn s-button-btn s-button-primary\">\n <span class=\"s-button-text s-infinite-scroll-btn-text\">{this.loadMoreText ?? this.load_more_text_trans}</span>\n <span class=\"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader\" ref={btnLoader => this.btnLoader = btnLoader} style={{ \"display\": \"none\" }}></span>\n </button>\n </div>\n )}\n </div>\n }\n\n componentWillLoad() {\n return salla.onReady()\n .then(() => this.loadInitialData())\n .then( () => this.initiateInfiniteScroll())\n }\n}\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAAA,MAAM,cAAc,GAAG,sBAAsB;;YCShC,UAAU,2BAAA,MAAA;MAErB,IAAA,WAAA,CAAA,OAAA,EAAA;;cAsBS,IAAe,CAAA,eAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,0BAA0B,CAAC;cACpE,IAAc,CAAA,cAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC;cAC7D,IAAa,CAAA,aAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC;cAC3D,IAAe,CAAA,eAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC;cAC/D,IAAW,CAAA,WAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,yBAAyB,CAAC;cAC/D,IAAoB,CAAA,oBAAA,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,2BAA2B,CAAC;cAClE,IAAA,CAAA,YAAY,GAAW,KAAK,CAAC,IAAI,CAAC,MAAM;MAExC,QAAA,IAAM,CAAA,MAAA,GAAiB,EAAE;MA7BhC,QAAA,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAK;kBACvB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM;kBACrC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,0BAA0B,CAAC;kBACjE,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,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EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAC,qDAAqD,EAAA,EACjG,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,0CAA0C,EAAA,EAAE,CAAA,EAAA,GAAA,IAAI,CAAC,YAAY,MAAI,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAA,IAAI,CAAC,oBAAoB,CAAQ,EAC9G,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,qEAAqE,EAAC,GAAG,EAAE,SAAS,IAAI,IAAI,CAAC,SAAS,GAAG,SAAS,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAAA,CAAS,CAC9J,CACL,CACP,CACG;;UAGR,iBAAiB,GAAA;cACf,OAAO,KAAK,CAAC,OAAO;mBACnB,IAAI,CAAC,MAAM,IAAI,CAAC,eAAe,EAAE;mBACjC,IAAI,CAAE,MAAM,IAAI,CAAC,sBAAsB,EAAE,CAAC;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as s,H as a,g as c}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as t,h as s,H as a,g as c}from"./p-Dj2SrCy0.js";import{w as e}from"./p-DWksgowB.js";import{M as n}from"./p-DmgxDvXL.js";var i=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>iphone</title>\n<path d="M15.053 27.613c0.133 0.12 0.28 0.213 0.44 0.28s0.333 0.107 0.507 0.107c0.36 0 0.693-0.135 0.947-0.387 0.12-0.135 0.213-0.28 0.28-0.44 0.080-0.16 0.107-0.333 0.107-0.507 0-0.347-0.147-0.695-0.387-0.947-0.507-0.493-1.387-0.493-1.893 0-0.12 0.12-0.213 0.267-0.28 0.44-0.067 0.16-0.107 0.333-0.107 0.507s0.040 0.347 0.107 0.507 0.16 0.305 0.28 0.44zM24 0h-16c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h16c2.205 0 4-1.795 4-4v-24c0-2.205-1.795-4-4-4zM25.333 28c0 0.736-0.599 1.333-1.333 1.333h-16c-0.735 0-1.333-0.597-1.333-1.333v-4h18.667zM25.333 21.333h-18.667v-17.333c0-0.735 0.599-1.333 1.333-1.333h16c0.735 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n`;var o=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>phone</title>\n<path d="M30.823 21.713l-3.883-3.883c-1.569-1.568-4.12-1.568-5.689 0l-2.568 2.568c-3.063-1.499-5.583-4.019-7.081-7.083l2.568-2.567c0.759-0.76 1.177-1.771 1.177-2.845s-0.419-2.084-1.179-2.844l-3.881-3.881c-1.52-1.521-4.171-1.521-5.689 0l-1.845 1.847c-2.22 2.219-3.183 5.407-2.573 8.527 1.98 10.144 10.125 18.292 20.269 20.271 0.616 0.121 1.236 0.18 1.849 0.18 2.492 0 4.896-0.972 6.677-2.752l1.847-1.847c1.568-1.571 1.568-4.121 0.001-5.691zM28.936 25.517l-1.845 1.847c-1.592 1.592-3.883 2.283-6.132 1.841-9.089-1.776-16.388-9.075-18.163-18.165-0.439-2.247 0.249-4.539 1.841-6.129l1.847-1.847c0.256-0.257 0.596-0.397 0.959-0.397s0.703 0.14 0.959 0.397l3.883 3.883c0.256 0.256 0.397 0.596 0.397 0.959s-0.141 0.703-0.397 0.96l-3.22 3.217c-0.383 0.384-0.496 0.959-0.287 1.457 1.813 4.339 5.343 7.868 9.683 9.684 0.497 0.207 1.073 0.095 1.457-0.288l3.22-3.22c0.529-0.529 1.389-0.528 1.917 0l3.881 3.883c0.528 0.529 0.528 1.389 0 1.919z"></path>\n</svg>\n`;var l=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>paper-plane-o</title>\n<path d="M31.5 0.482c0.375 0.268 0.554 0.696 0.482 1.143l-4.571 27.429c-0.054 0.339-0.268 0.625-0.571 0.804-0.161 0.089-0.357 0.143-0.554 0.143-0.143 0-0.286-0.036-0.429-0.089l-9.411-3.839-5.321 5.839c-0.214 0.25-0.518 0.375-0.839 0.375-0.143 0-0.286-0.018-0.411-0.071-0.446-0.179-0.732-0.607-0.732-1.071v-8.071l-8.429-3.446c-0.411-0.161-0.679-0.536-0.714-0.982-0.036-0.429 0.196-0.839 0.571-1.054l29.714-17.143c0.375-0.232 0.857-0.214 1.214 0.036zM25.393 27.25l3.946-23.625-25.607 14.768 6 2.446 15.411-11.411-8.536 14.232z"></path>\n</svg>\n`;const h=".unicode{unicode-bidi:-webkit-plaintext;unicode-bidi:plaintext}";const r=class{constructor(s){t(this,s);var a;this.contacts=salla.config.get("store.contacts");this.iconsList={mobile:i,whatsapp:e,phone:o,telegram:l,email:n};this.contactSlot=((a=this.host.querySelector('[slot="contact"]'))===null||a===void 0?void 0:a.innerHTML)||`<a href={link} class="s-contacts-item"><span class="s-contacts-icon">{icon}</span>${!this.iconsOnly&&"<span class='unicode'>{value}</span>"}</a>`;salla.onReady((()=>{this.contacts=salla.config.get("store.contacts")}));salla.lang.onLoaded((()=>{this.contactsTitle=this.contactsTitle||salla.lang.get("blocks.footer.social")}))}getContactsArray(){return Object.entries(this.contacts).filter((([t,s])=>s!=="")).map((([t,s])=>({type:t,value:s})))}getContactLink(t){const s=this.contacts[t];switch(t){case"phone":case"mobile":return`tel:${s}`;case"whatsapp":return salla.url.get("whatsapp/send");case"email":return`mailto:${s}`;case"telegram":return s.startsWith("https://t.me/")?s:`https://t.me/${s}`;default:return s}}getContactIcon(t){return this.iconsList[t]}componentWillLoad(){return new Promise((t=>salla.onReady(t)))}render(){const t=this.getContactsArray();if(!t||t.length==0){return}if(this.isHeader){return s(a,{class:"s-contacts s-contacts-header"},t.filter((t=>t.type=="phone"||t.type=="email")).map(((t,a)=>s("a",{href:this.getContactLink(t.type),key:a,class:"s-contacts-topnav-link"},t.type==="email"?t.value:[s("span",null,this.contactsTitle,": "),s("a",{class:"unicode",href:this.iconsList[t.type]},t.value)]))))}return s(a,{class:"s-contacts"},!this.hideTitle&&s("h3",{class:"s-contacts-title"},this.contactsTitle),s("div",{class:{"s-contacts-list":true,"s-contacts-list-horizontal":this.horizontal,"s-contacts-list-vertical":!this.horizontal,"s-contacts-list-icons-only":this.iconsOnly}},t.map(((t,a)=>s("div",{key:a,id:"contact-slot",innerHTML:this.contactSlot.replace(/\{icon\}/g,this.getContactIcon(t.type)).replace(/\{value\}/g,t.value.toString()).replace(/\{link\}/g,this.getContactLink(t.type))})))))}componentDidRender(){var t;(t=this.host.querySelector('[slot="contact"]'))===null||t===void 0?void 0:t.remove()}get host(){return c(this)}};r.style=h;export{r as salla_contacts};
|
|
5
|
+
//# sourceMappingURL=p-8162a820.entry.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
System.register(["./p-DvJ_tnSw.system.js"],(function(e){"use strict";var t,c,n;return{setters:[function(e){t=e.r;c=e.h;n=e.H}],execute:function(){var r="";var b=e("salla_accordion_body",function(){function e(e){t(this,e)}e.prototype.render=function(){return c(n,{key:"298d42a5bf1bcefdb181ec35060220cf749b56ed",class:"s-accordion-body-wrapper"},c("slot",{key:"6ab081e8b71b5dc69fb66fbdec82b4725ab53b0d"}))};return e}());b.style=r}}}));
|
|
5
|
+
//# sourceMappingURL=p-864f1430.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-DvJ_tnSw.system.js"],(function(t){"use strict";var s,n,a,i;return{setters:[function(t){s=t.r;n=t.h;a=t.H;i=t.g}],execute:function(){var r=":host{display:block}";var e=t("salla_apps_icons",function(){function t(t){var n=this;s(this,t);var a;this.apps=salla.config.get("store.apps");this.appSlot=((a=this.host.querySelector('[slot="app"]'))===null||a===void 0?void 0:a.innerHTML)||"<img alt={name} src={icon} />";salla.onReady((function(){n.apps=salla.config.get("store.apps")}));salla.lang.onLoaded((function(){n.appsTitle=salla.lang.get("blocks.footer.download_apps")}))}t.prototype.getAppsArray=function(){return Object.entries(this.apps).map((function(t){var s=t[0],n=t[1];return{name:s,value:n}}))};t.prototype.componentWillLoad=function(){return new Promise((function(t){return salla.onReady(t)}))};t.prototype.render=function(){var t=this;var s=this.getAppsArray();if(Array.isArray(s)&&!s.length){return}return n(a,{class:"s-apps-icons"},!this.hideTitle&&n("h3",null,this.appsTitle),n("div",{class:{"s-apps-icons-list":true,vertical:this.vertical}},s.map((function(s,a){return n("a",{key:a,href:s.value,rel:"noreferrer",target:"_blank",class:"s-apps-icons-item",id:"app-slot",innerHTML:t.appSlot.replace(/\{icon\}/g,salla.url.cdn("images/".concat(s.name,".png"))).replace(/\{name\}/g,s.name)})}))))};t.prototype.componentDidRender=function(){var t;(t=this.host.querySelector('[slot="app"]'))===null||t===void 0?void 0:t.remove()};Object.defineProperty(t.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());e.style=r}}}));
|
|
5
|
+
//# sourceMappingURL=p-865fc401.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-DvJ_tnSw.system.js"],(function(t){"use strict";var e,i,s,a;return{setters:[function(t){e=t.r;i=t.h;s=t.H;a=t.g}],execute:function(){var n="";var c=t("salla_accordion",function(){function t(t){e(this,t);this.collapsible=true;this.collapsed=true;this.dir=document.dir||"rtl"}t.prototype.directionChangedHandler=function(t){this.dir=t.detail.dir};t.prototype.handleCollapse=function(t){this.collapsed=t.detail.payload.collapsed};t.prototype.setcollapsibleProp=function(){var t=this.host.querySelector("salla-accordion-head");if(this.collapsible&&t){t.setAttribute("collapsible","true");t.setAttribute("collapsed",this.collapsed.toString())}};t.prototype.componentDidRender=function(){this.setcollapsibleProp();var t=this.host.querySelector("salla-accordion-body");if(this.collapsible){this.host.setAttribute("data-collapsed",this.collapsed.toString());t===null||t===void 0?void 0:t.setAttribute("data-collapsed",this.collapsed.toString())}};t.prototype.render=function(){return i(s,{key:"30e906d87cba59e197e71460bb24e578455f2d28",class:"s-accordion-wrapper ".concat(this.dir),"data-collapsed":this.collapsed.toString()},i("slot",{key:"8c26efc12856022567e5abe587c7537a5776285b"}))};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());c.style=n}}}));
|
|
5
|
+
//# sourceMappingURL=p-87206bd7.system.entry.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import{r as c,h as r,H as s}from"./p-Dj2SrCy0.js";const b="";const o=class{constructor(r){c(this,r)}render(){return r(s,{key:"298d42a5bf1bcefdb181ec35060220cf749b56ed",class:"s-accordion-body-wrapper"},r("slot",{key:"6ab081e8b71b5dc69fb66fbdec82b4725ab53b0d"}))}};o.style=b;export{o as salla_accordion_body};
|
|
5
|
+
//# sourceMappingURL=p-8c08dafb.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-DvJ_tnSw.system.js"],(function(i){"use strict";var e,t;return{setters:[function(i){e=i.r;t=i.h}],execute:function(){var a="";var c=i("salla_notification_item",function(){function i(i){e(this,i)}i.prototype.render=function(){return t("a",{key:"f4818ac9b7dc2573dd1ac8aa31aabc82454ea439",href:this.notification.url,class:{"s-notifications-item":true,"s-notifications-item-shadow":true,"s-notifications-item-read":!this.notification.is_new}},t("span",{key:"3766a4eb835408bf293054be3e04a561e1510728",class:"s-notifications-item-icon"},t("i",{key:"e9b1e4a18f22e765053b7d62f83a4af6e426bd47",class:{"s-notifications-item-icon sicon-bell-ring":true,"s-notifications-item-icon-new":this.notification.is_new}})),t("div",{key:"2005bcf68b61bb0aa5606480f703e4ee4cfbd415",class:"s-notifications-item-content"},t("div",{key:"a60fdc96431899c0c3183512ea81477f52e550d0",class:"s-notifications-item-content-leading"},t("h4",{key:"fb0eb1efe08440a1e2c12dc1af263adba0413d2b"},this.notification.title),t("p",{key:"c32790ad29bd267323d86e5c3abdec1ab75c09b2"},this.notification.sub_title)),t("span",{key:"e8fbfea5e91fe7d16c489a285502eaab08b16fd5",class:"s-notifications-item-content-trailing"},t("i",{key:"ea9fb9cf6ac2f9c84cde152fa1381e884971cba4",class:"sicon-time s-notifications-item-content-trailing-icon"}),t("span",{key:"1fb25f1463210c8ab467dff8aea22d9c4510301c"},this.notification.date))))};return i}());c.style=a}}}));
|
|
5
|
+
//# sourceMappingURL=p-8ce2a142.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,s){function a(t){try{l(n.next(t))}catch(t){s(t)}}function c(t){try{l(n["throw"](t))}catch(t){s(t)}}function l(t){t.done?i(t.value):r(t.value).then(a,c)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(t){return function(e){return l([t,e])}}function l(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(i=0)),i)try{if(n=1,r&&(s=c[0]&2?r["return"]:c[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,c[1])).done)return s;if(r=0,s)c=[c[0]&2,s.value];switch(c[0]){case 0:case 1:s=c;break;case 4:i.label++;return{value:c[1],done:false};case 5:i.label++;r=c[1];c=[0];continue;case 7:c=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){i.label=c[1];break}if(c[0]===6&&i.label<s[1]){i.label=s[1];s=c;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(c);break}if(s[2])i.ops.pop();i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t];r=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-DvJ_tnSw.system.js","./p-D5o2VQTp.system.js"],(function(t){"use strict";var e,i,n,r,s;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H},function(t){s=t.a}],execute:function(){var a='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>arrow-right</title>\n<path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>\n</svg>\n';var c=":host{display:block}.rtl .rtl-range-slider,[dir=rtl] .rtl-range-slider{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.rtl .rtl-range-numbers,[dir=rtl] .rtl-range-numbers{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.rtl .form-select,.rtl select,[dir=rtl] .form-select,[dir=rtl] select{background-position:left 0.5rem center;padding-right:12px}.rtl .menu-divide li:not(:last-child):after,[dir=rtl] .menu-divide li:not(:last-child):after{left:0;right:auto}input[type=range]::-webkit-slider-thumb{pointer-events:all;width:24px;height:24px;-webkit-appearance:none}[type=checkbox]:checked{background-size:80%}";var l=t("salla_price_range",function(){function t(t){e(this,t);this.changed=i(this,"changed");this.min=0;this.max=1e4;this.moreThanLabel="أكثر من";this.lessThanLabel="أقل من";this.toLabel="الى";this.fromLabel="من";this.typing=false;this.isMin=false;this.isRTL=salla.config.get("theme.is_rtl",true);this.filterValues=[]}t.prototype.connectedCallback=function(){var t=this;var e;if(this.filtersData&&((e=this.filtersData)===null||e===void 0?void 0:e.price)){this.minPrice=this.filtersData.price.min;this.maxPrice=this.filtersData.price.max}salla.lang.onLoaded((function(){t.moreThanLabel=salla.lang.getWithDefault("common.elements.more_than",t.moreThanLabel);t.lessThanLabel=salla.lang.getWithDefault("common.elements.less_than",t.lessThanLabel);t.toLabel=salla.lang.getWithDefault("common.elements.to",t.toLabel);t.fromLabel=salla.lang.getWithDefault("common.elements.from",t.fromLabel)}));if(this.option.values.length==1){return}if(this.option.values.length<=5){this.filterValues=this.option.values;return}var i=Math.ceil(this.option.values.length/5);for(var n=0;n<this.option.values.length;n+=i){this.filterValues.push(this.option.values.slice(n,n+i).reduce((function(t,e){t.to=e.to;t.count+=e.count;return t})))}};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.minInput.value=null;this.maxInput.value=null;this.minPrice=null;this.maxPrice=null;return[2]}))}))};t.prototype.getPriceLabel=function(t){if(isNaN(t.from)||t.from<1){return"".concat(this.lessThanLabel," ").concat(salla.money(t.to))}if(isNaN(t.to)||t.to<1){return"".concat(this.moreThanLabel," ").concat(salla.money(t.from))}return"".concat(salla.money(t.from)," ").concat(this.toLabel," ").concat(salla.money(t.to))};t.prototype.minInputValidation=function(t){if(t&&(t>this.max||this.maxPrice&&t>this.maxPrice)){return}if(t<this.min){this.minPrice=this.min;return}if(t){this.minPrice=t}};t.prototype.maxInputValidation=function(t){if(t&&(t<this.min||this.minPrice&&t<this.minPrice)){return}if(t>this.max){this.maxPrice=this.max;return}};t.prototype.changedEventHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){salla.helpers.inputDigitsOnly(this.minInput);salla.helpers.inputDigitsOnly(this.maxInput);e=this.minPrice?+this.minPrice*1:null;i=this.maxPrice?+this.maxPrice*1:null;if(!this.maxPrice){this.maxPrice=""}if(this.isMin){this.minInputValidation(e)}else{if(!this.minPrice){this.minPrice=0}this.maxInputValidation(i)}this.isReady&&this.changed.emit({event:t,option:this.option,value:{max:this.maxPrice,min:this.minPrice}});return[2]}))}))};t.prototype.handleMinMaxPrice=function(t,e){this.minPrice=e.from;this.maxPrice=e.to!=="*"?e.to:"";this.changedEventHandler(t)};t.prototype.isChecked=function(t){if(!this.minPrice&&!this.maxPrice){return false}var e=(t.from<1||t.from=="*")&&this.minPrice==0||t.from==this.minPrice;var i=t.to=="*"||!t.to||t.to==this.maxPrice;return e&&i};t.prototype.handleMinPrice=function(t){this.isMin=true;var e=t.target.value;this.minPrice=e===""?0:e};t.prototype.handleMaxPrice=function(t){this.isMin=false;var e=t.target.value;this.maxPrice=e===undefined?"":e};t.prototype.render=function(){var t=this;return n(r,{key:"e257e65621d724438fd4fdd74cdec45596a81cd0"},this.filterValues.map((function(e,i){return n("label",{class:"s-filters-label",htmlFor:"".concat(t.option.key,"-").concat(i),key:i},n("input",{id:"".concat(t.option.key,"-").concat(i),name:"price",type:"radio",checked:t.isChecked(e),class:"s-filters-radio",onChange:function(i){return t.handleMinMaxPrice(i,e)}}),n("span",{innerHTML:t.getPriceLabel(e)}))})),n("div",{key:"097faf8d72b3c441bc22041a5643f91f61bbdd40",class:"flex justify-center items-center"},n("div",{key:"6adaa2b16c015de4ab5e254d4a9be05bb65b7848",class:"relative max-w-xl w-full"},n("div",{key:"3667d98c1e0886fc31600d23dd5a41a18d5ff8d0",class:"s-price-range-inputs"},n("div",{key:"98fdc0fdc9632318daa4664d4798154a17fe700a",class:"s-price-range-relative"},n("div",{key:"addd7b56c1e2496dba50db7ec320f8f5ea129d42",class:"s-price-range-currency"}," ",salla.config.currency().symbol),n("input",{key:"d36e129fd777ccfe30cf8d974dd96cf82e64c805",type:"number",maxlength:"5",ref:function(e){return t.minInput=e},onBlur:function(e){return t.handleMinPrice(e)},value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),n("div",{key:"b1fcc176d31d724c646291262e42c6a74e75f299",class:"s-price-range-gray-text"}," -"),n("div",{key:"93db8728b9f118be78549c6839a4d85d4664a3dc",class:"s-price-range-relative"},n("div",{key:"7b63ca0ffd946d34549768bf87876868842478a4",class:"s-price-range-currency"}," ",salla.config.currency().symbol),n("input",{key:"ba005f3834bc2179e1346cae746b7c734abaf0dd",type:"number",maxlength:"5",ref:function(e){return t.maxInput=e},onBlur:function(e){return t.handleMaxPrice(e)},value:this.maxPrice,placeholder:this.toLabel,class:"s-price-range-number-input","aria-describedby":"price-currency"})),n("salla-button",{key:"74283ca210bf2f85a4e5d7dde69372e55453a5a5",color:"gray",shape:"icon",size:"small",fill:"outline",onClick:function(e){return t.changedEventHandler(e)}},n("span",{key:"04600f026e465f96f98d54841e8c7bd7d1c849bd",innerHTML:this.isRTL?s:a}))))))};t.prototype.componentDidLoad=function(){this.isReady=true};return t}());l.style=c}}}));
|
|
5
|
+
//# sourceMappingURL=p-8d28bf6e.system.entry.js.map
|