@salla.sa/twilight-components 2.14.353 → 2.14.354
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/bell-ring-BfKPinNo.js +13 -0
- package/dist/cjs/{interfaces-CX9-6aLf.js → camera-DytepEoK.js} +0 -11
- package/dist/cjs/cancel-De6vslRA.js +13 -0
- package/dist/cjs/cart-s-x1Fshk.js +13 -0
- package/dist/cjs/check-circle2-BDvlT4_n.js +13 -0
- package/dist/cjs/{check-CLRvuniI.js → check-x3w3-gpj.js} +2 -2
- package/dist/cjs/{filepond-7SxqaoXb.js → filepond-CuKErtOy.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DwIv84hN.js → filepond-plugin-file-poster-d-8BSuST.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-NUNnIo4Q.js → filepond-plugin-file-validate-size-zgI_JcqY.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-CXI-hfww.js → filepond-plugin-file-validate-type-Cy8IgG2P.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-fBeBGIBb.js → filepond-plugin-image-edit-9ZAUzCvh.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BmLTdQ6d.js → filepond-plugin-image-exif-orientation-DzNe_tY2.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CssKRM6n.js → filepond-plugin-image-preview-Cfna6xTB.js} +1 -1
- package/dist/{esm/gift-C0JNGIpa.js → cjs/gift-CJ-3Yw_x.js} +4 -2
- package/dist/cjs/image-BoZ6Hums.js +13 -0
- package/dist/cjs/{index-B5soIVRX.js → index-Ce40E8tZ.js} +136 -12
- package/dist/cjs/{index-B9TEdQDE.js → index-ff-xJfhj.js} +1 -1
- package/dist/cjs/interfaces-CRqrf5RX.js +15 -0
- package/dist/cjs/keyboard_arrow_down-DHJ3FFZq.js +13 -0
- package/dist/cjs/keyboard_arrow_right-BayM_Il2.js +21 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/minus-CCryh1qf.js +21 -0
- package/dist/cjs/salla-accordion-body_3.cjs.entry.js +775 -0
- package/dist/cjs/salla-accordion_6.cjs.entry.js +768 -0
- package/dist/cjs/salla-add-product-button_4.cjs.entry.js +2389 -0
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +194 -0
- 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_7.cjs.entry.js +1565 -0
- package/dist/cjs/{salla-cart-item-offers.cjs.entry.js → salla-cart-item-offers_2.cjs.entry.js} +104 -5
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1661 -0
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
- package/dist/cjs/salla-count-down_2.cjs.entry.js +302 -0
- package/dist/cjs/salla-custom-fields.cjs.entry.js +4 -3
- 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-gifting.cjs.entry.js +488 -0
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +91 -0
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +34 -0
- package/dist/cjs/salla-localization-modal.cjs.entry.js +137 -0
- package/dist/cjs/salla-login-modal.cjs.entry.js +320 -0
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty.cjs.entry.js +211 -0
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +40 -0
- package/dist/cjs/salla-menu.cjs.entry.js +139 -0
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +220 -0
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +598 -0
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +69 -0
- 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-modal.cjs.entry.js +206 -0
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +3 -3
- package/dist/cjs/salla-order-totals-card.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-placeholder.cjs.entry.js +51 -0
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +66 -0
- package/dist/cjs/salla-products-list.cjs.entry.js +762 -0
- package/dist/cjs/salla-products-slider.cjs.entry.js +115 -0
- package/dist/cjs/salla-progress-bar.cjs.entry.js +73 -0
- package/dist/cjs/salla-quick-order.cjs.entry.js +239 -0
- package/dist/cjs/salla-rating-modal.cjs.entry.js +453 -0
- package/dist/cjs/salla-scopes.cjs.entry.js +180 -0
- package/dist/cjs/salla-search.cjs.entry.js +153 -0
- package/dist/cjs/salla-skeleton.cjs.entry.js +36 -0
- package/dist/cjs/salla-slider.cjs.entry.js +10389 -0
- package/dist/cjs/salla-social-share.cjs.entry.js +165 -0
- package/dist/cjs/salla-social.cjs.entry.js +3 -3
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +157 -0
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +275 -0
- package/dist/cjs/salla-user-profile.cjs.entry.js +145 -0
- package/dist/cjs/salla-user-settings.cjs.entry.js +88 -0
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/search-c7Aa7lM9.js +13 -0
- package/dist/cjs/{special-discount-OVG_9Kf9.js → special-discount-DC2oXurL.js} +0 -8
- package/dist/cjs/star-DGcH7Yso.js +13 -0
- package/dist/cjs/star2-R146a27p.js +13 -0
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-C6fk8_TR.js → vanilla-picker-zQsXQIff.js} +1 -1
- package/dist/cjs/{whatsapp2-D7Sbg8Ey.js → whatsapp2-BdMd5Gx1.js} +2 -2
- package/dist/collection/collection-manifest.json +55 -1
- package/dist/collection/components/salla-product-options/salla-product-options.js +36 -3
- package/dist/components/index.js +2 -2
- package/dist/components/salla-product-options2.js +19 -2
- package/dist/esm/bell-ring-D3mWkc-3.js +11 -0
- package/dist/esm/{interfaces-CBT_Nxny.js → camera-C6jIkM-X.js} +1 -12
- package/dist/esm/cancel-BsLF_HK7.js +11 -0
- package/dist/esm/cart-DY4LZmNP.js +11 -0
- package/dist/esm/{check-uTyAzPSy.js → check-BsXh13x8.js} +2 -2
- package/dist/esm/check-circle2-BV4kqbdL.js +11 -0
- package/dist/esm/{filepond-Cuqyleyy.js → filepond-DEzyRrdH.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-C6Wara8q.js → filepond-plugin-file-poster-DyLcCcHM.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-D-M3KSxo.js → filepond-plugin-file-validate-size-Cxp5Yzea.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DzAl1VI8.js → filepond-plugin-file-validate-type-D2qNOQP4.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-flutfc9I.js → filepond-plugin-image-edit-DndTlA7m.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-B2UkG6iE.js → filepond-plugin-image-exif-orientation-CiT1CQoK.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-B4u8N2nE.js → filepond-plugin-image-preview-DBG7keFZ.js} +1 -1
- package/dist/{cjs/gift-BPDUPIY_.js → esm/gift-BChI23pG.js} +2 -4
- package/dist/esm/image-C-tzSDxw.js +11 -0
- package/dist/esm/{index-6mr785rH.js → index-B74h9G6a.js} +137 -13
- package/dist/esm/{index-xWIb6INF.js → index-BLw7mdtM.js} +1 -1
- package/dist/esm/interfaces-OF8QcbMM.js +15 -0
- package/dist/esm/keyboard_arrow_down-DCZbpt2a.js +11 -0
- package/dist/esm/keyboard_arrow_right-Vqpj4CWE.js +18 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/minus-DfeagqF1.js +18 -0
- package/dist/esm/salla-accordion-body_3.entry.js +771 -0
- package/dist/esm/salla-accordion_6.entry.js +761 -0
- package/dist/esm/salla-add-product-button_4.entry.js +2384 -0
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +191 -0
- 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_7.entry.js +1539 -0
- package/dist/esm/{salla-cart-item-offers.entry.js → salla-cart-item-offers_2.entry.js} +104 -6
- package/dist/esm/salla-comment-form_8.entry.js +1652 -0
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +3 -3
- package/dist/esm/salla-count-down_2.entry.js +299 -0
- package/dist/esm/salla-custom-fields.entry.js +3 -2
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +486 -0
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +89 -0
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +32 -0
- package/dist/esm/salla-localization-modal.entry.js +135 -0
- package/dist/esm/salla-login-modal.entry.js +318 -0
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +3 -3
- package/dist/esm/salla-loyalty.entry.js +209 -0
- package/dist/esm/salla-maintenance-alert.entry.js +38 -0
- package/dist/esm/salla-menu.entry.js +137 -0
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +217 -0
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +595 -0
- package/dist/esm/salla-multiple-bundle-product.entry.js +67 -0
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +204 -0
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +3 -3
- package/dist/esm/salla-order-totals-card.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-placeholder.entry.js +49 -0
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +64 -0
- package/dist/esm/salla-products-list.entry.js +760 -0
- package/dist/esm/salla-products-slider.entry.js +113 -0
- package/dist/esm/salla-progress-bar.entry.js +71 -0
- package/dist/esm/salla-quick-order.entry.js +237 -0
- package/dist/esm/salla-rating-modal.entry.js +451 -0
- package/dist/esm/salla-scopes.entry.js +178 -0
- package/dist/esm/salla-search.entry.js +151 -0
- package/dist/esm/salla-skeleton.entry.js +34 -0
- package/dist/esm/salla-slider.entry.js +10387 -0
- package/dist/esm/salla-social-share.entry.js +163 -0
- package/dist/esm/salla-social.entry.js +2 -2
- package/dist/esm/salla-tab-content_3.entry.js +153 -0
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +273 -0
- package/dist/esm/salla-user-profile.entry.js +143 -0
- package/dist/esm/salla-user-settings.entry.js +86 -0
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/search-BscTeWDc.js +11 -0
- package/dist/esm/{special-discount-yRO-ZESF.js → special-discount-Ctkfc4K-.js} +1 -8
- package/dist/esm/star-ZT7ehBBk.js +11 -0
- package/dist/esm/star2-D4oPi1Ov.js +11 -0
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-B4PKRAhm.js → vanilla-picker-CtwkXTap.js} +1 -1
- package/dist/esm/{whatsapp2-DWksgowB.js → whatsapp2-CgR-T_ZS.js} +2 -2
- package/dist/twilight/{p-2a26c1d6.entry.js → p-0134b4fd.entry.js} +1 -1
- package/dist/twilight/{p-d4aaeef4.entry.js → p-01daaaa6.entry.js} +1 -1
- package/dist/twilight/p-07da7390.entry.js +4 -0
- package/dist/twilight/{p-81702ecb.entry.js → p-08badc32.entry.js} +1 -1
- package/dist/twilight/{p-4bc98557.entry.js → p-0aa5a12a.entry.js} +1 -1
- package/dist/twilight/{p-6f576591.entry.js → p-10dcd981.entry.js} +1 -1
- package/dist/twilight/{p-5067322a.entry.js → p-212a0710.entry.js} +1 -1
- package/dist/twilight/p-229275db.entry.js +4 -0
- package/dist/twilight/{p-dde21f4b.entry.js → p-232185ec.entry.js} +1 -1
- package/dist/twilight/{p-12e49031.entry.js → p-2a927eac.entry.js} +1 -1
- package/dist/twilight/p-2d880232.entry.js +4 -0
- package/dist/twilight/p-2de9df64.entry.js +4 -0
- package/dist/twilight/p-309a0ba4.entry.js +4 -0
- package/dist/twilight/{p-e909d28b.entry.js → p-32732ca7.entry.js} +1 -1
- package/dist/twilight/{p-19e07b9e.entry.js → p-32ca34ec.entry.js} +1 -1
- package/dist/twilight/{p-9946fa76.entry.js → p-33093880.entry.js} +1 -1
- package/dist/twilight/p-3cffa4c9.entry.js +4 -0
- package/dist/twilight/p-3d0bb451.entry.js +4 -0
- package/dist/twilight/p-3e0d814c.entry.js +4 -0
- package/dist/twilight/p-4036d5dc.entry.js +4 -0
- package/dist/twilight/p-40fe4b01.entry.js +4 -0
- package/dist/twilight/p-47ac0ca5.entry.js +4 -0
- package/dist/twilight/{p-5bf05092.entry.js → p-4cd9da44.entry.js} +1 -1
- package/dist/twilight/p-5c9281d3.entry.js +4 -0
- package/dist/twilight/p-5d044466.entry.js +4 -0
- package/dist/twilight/p-5d21334a.entry.js +4 -0
- package/dist/twilight/{p-c096e336.entry.js → p-654429df.entry.js} +1 -1
- package/dist/twilight/p-6b8453be.entry.js +4 -0
- package/dist/twilight/p-6be7bbb0.entry.js +4 -0
- package/dist/twilight/{p-4253fc44.entry.js → p-6c8f5c94.entry.js} +1 -1
- package/dist/twilight/{p-6f5d02c6.entry.js → p-6fa02770.entry.js} +1 -1
- package/dist/twilight/p-7040ea33.entry.js +4 -0
- package/dist/twilight/p-8c189d76.entry.js +4 -0
- package/dist/twilight/p-8f1f052c.entry.js +4 -0
- package/dist/twilight/{p-ac6fc286.entry.js → p-9051a540.entry.js} +1 -1
- package/dist/twilight/p-9f1c561f.entry.js +4 -0
- package/dist/twilight/{p-B2SkkGH8.js → p-B69XOH6h.js} +1 -1
- package/dist/twilight/{p-6mr785rH.js → p-B74h9G6a.js} +2 -2
- package/dist/twilight/{p-C0JNGIpa.js → p-BChI23pG.js} +1 -1
- package/dist/twilight/{p-C_h1JDCU.js → p-BCxm-ISm.js} +1 -1
- package/dist/twilight/{p-Bp_xKTyn.js → p-BPqZ249Z.js} +1 -1
- package/dist/twilight/p-BV4kqbdL.js +4 -0
- package/dist/twilight/p-BsLF_HK7.js +4 -0
- package/dist/twilight/{p-uTyAzPSy.js → p-BsXh13x8.js} +1 -1
- package/dist/twilight/p-BscTeWDc.js +4 -0
- package/dist/twilight/p-C-tzSDxw.js +4 -0
- package/dist/twilight/p-C6jIkM-X.js +4 -0
- package/dist/twilight/p-CO-PeZ27.js +4 -0
- package/dist/twilight/{p-ChfiVIJv.js → p-CQq81yb5.js} +1 -1
- package/dist/twilight/{p-DWksgowB.js → p-CgR-T_ZS.js} +1 -1
- package/dist/twilight/p-Ctkfc4K-.js +4 -0
- package/dist/twilight/p-D3mWkc-3.js +4 -0
- package/dist/twilight/p-D4oPi1Ov.js +4 -0
- package/dist/twilight/p-DCZbpt2a.js +4 -0
- package/dist/twilight/p-DY4LZmNP.js +4 -0
- package/dist/twilight/p-DfeagqF1.js +4 -0
- package/dist/twilight/{p-Cuxsz9f-.js → p-DpsbV3x1.js} +1 -1
- package/dist/twilight/p-OF8QcbMM.js +4 -0
- package/dist/twilight/p-Vqpj4CWE.js +4 -0
- package/dist/twilight/p-ZT7ehBBk.js +4 -0
- package/dist/twilight/{p-tFBCbVoG.js → p-_-aXm0Wb.js} +1 -1
- package/dist/twilight/p-a100bd38.entry.js +4 -0
- package/dist/twilight/{p-0c87ef6c.entry.js → p-a2756650.entry.js} +1 -1
- package/dist/twilight/{p-8b018d82.entry.js → p-aab45a16.entry.js} +1 -1
- package/dist/twilight/p-aae761ff.entry.js +4 -0
- package/dist/twilight/p-afd61e47.entry.js +4 -0
- package/dist/twilight/p-b1fc6dfc.entry.js +4 -0
- package/dist/twilight/p-b206a0a1.entry.js +4 -0
- package/dist/twilight/p-b2332516.entry.js +4 -0
- package/dist/twilight/{p-18ebec2c.entry.js → p-b588ef46.entry.js} +1 -1
- package/dist/twilight/p-b71fc1b5.entry.js +4 -0
- package/dist/twilight/{p-zHj-W7EE.js → p-bVqtOl1F.js} +1 -1
- package/dist/twilight/{p-300624bb.entry.js → p-bf65b263.entry.js} +1 -1
- package/dist/twilight/{p-33ea3141.entry.js → p-c56a47b0.entry.js} +1 -1
- package/dist/twilight/p-c73189e3.entry.js +4 -0
- package/dist/twilight/p-d1203242.entry.js +4 -0
- package/dist/twilight/p-d4edfed4.entry.js +4 -0
- package/dist/twilight/{p-6472200c.entry.js → p-d86ce978.entry.js} +1 -1
- package/dist/twilight/{p-fa585081.entry.js → p-d9e7973d.entry.js} +1 -1
- package/dist/twilight/p-e3e33238.entry.js +4 -0
- package/dist/twilight/p-e6bb7362.entry.js +4 -0
- package/dist/twilight/{p-28900b2e.entry.js → p-e7813c80.entry.js} +1 -1
- package/dist/twilight/p-ec2fd37e.entry.js +4 -0
- package/dist/twilight/{p-b60db6c8.entry.js → p-ec77c523.entry.js} +1 -1
- package/dist/twilight/{p-8c7b7712.entry.js → p-efc18ce6.entry.js} +1 -1
- package/dist/twilight/p-f4039c40.entry.js +4 -0
- package/dist/twilight/p-f47b130c.entry.js +4 -0
- package/dist/twilight/{p-7e39343d.entry.js → p-f57ca123.entry.js} +1 -1
- package/dist/twilight/{p-2d209f96.entry.js → p-f5ad6572.entry.js} +1 -1
- package/dist/twilight/p-fc65084f.entry.js +4 -0
- package/dist/twilight/p-fd81a311.entry.js +4 -0
- package/dist/twilight/{p-16b8d78c.entry.js → p-fe983809.entry.js} +1 -1
- package/dist/twilight/{p-BijadG7g.js → p-i5J7XGS6.js} +1 -1
- package/dist/twilight/{p-DnELO4MH.js → p-shFpk0H3.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +8 -1
- package/dist/types/components.d.ts +4 -0
- package/package.json +5 -5
- package/dist/cjs/salla-accordion_62.cjs.entry.js +0 -22470
- package/dist/cjs/salla-review-card.cjs.entry.js +0 -183
- package/dist/cjs/salla-reviews-page.cjs.entry.js +0 -695
- package/dist/cjs/salla-reviews.cjs.entry.js +0 -106
- package/dist/esm/salla-accordion_62.entry.js +0 -22389
- package/dist/esm/salla-review-card.entry.js +0 -181
- package/dist/esm/salla-reviews-page.entry.js +0 -693
- package/dist/esm/salla-reviews.entry.js +0 -104
- package/dist/twilight/p-67830f2a.entry.js +0 -4
- package/dist/twilight/p-751dddd4.entry.js +0 -4
- package/dist/twilight/p-9b22a7eb.entry.js +0 -4
- package/dist/twilight/p-CBT_Nxny.js +0 -4
- package/dist/twilight/p-Dz7o69vX.js +0 -4
- package/dist/twilight/p-a515a8cc.entry.js +0 -4
- package/dist/twilight/p-c4821f8b.entry.js +0 -4
- package/dist/twilight/p-de807340.entry.js +0 -4
- package/dist/twilight/p-yRO-ZESF.js +0 -4
- package/dist/cjs/{twitter-pOrUNjXi.js → facebook-DbXua6B9.js} +2 -2
- package/dist/esm/{twitter-Dz7o69vX.js → facebook-CO-PeZ27.js} +2 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-B74h9G6a.js';
|
|
5
|
+
|
|
6
|
+
const sallaListTileCss = "";
|
|
7
|
+
|
|
8
|
+
const SallaListTile = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
/**
|
|
12
|
+
* Designates the component as anchor and applies the `href` attribute.
|
|
13
|
+
*/
|
|
14
|
+
this.href = undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Designates the target attribute. This should only be applied when using the `href` prop.
|
|
17
|
+
*/
|
|
18
|
+
this.target = "_self";
|
|
19
|
+
}
|
|
20
|
+
generateClass() {
|
|
21
|
+
return {
|
|
22
|
+
"s-list-tile-item": true,
|
|
23
|
+
"s-list-tile-item-href": !!this.href
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
return (h(Host, { key: '1e84d5e259adbf61502fbe1ee771ce948c87f218' }, h("a", { key: '5e28c64a0f1c62e6749a32859180e705f99af27e', class: this.generateClass(), href: this.href || "#", target: this.target, "aria-label": "List Tile Link" }, h("div", { key: 'ace3fdaae7332c4c23ab411f0b97cb0699c26ec2', class: "s-list-tile-item-icon" }, h("slot", { key: 'f8790cd45f2004691b156ef96d12a0f003d99899', name: 'icon' })), h("div", { key: 'a788d022e2afe3cd383c321f4100dafbae84f844', class: "s-list-tile-item-content" }, h("div", { key: 'a07afce13d054e11236ffb282901de9db3d23923', class: "s-list-tile-item-title" }, h("slot", { key: '43c23495cfb026ddba8739dcc1a619ec25fe98e0', name: 'title' })), h("div", { key: 'db5e2767a4220ee5d658b3b9384c28d0e105febb', class: "s-list-tile-item-subtitle" }, h("slot", { key: '245f602055419b1f32fa943805a72c6a207eea3f', name: "subtitle" }))), h("div", { key: '394a2d1402d3e8346cbc1ebd8d410405ed568c77', class: "s-list-tile-item-action" }, h("slot", { key: '6086eb6b1f9894f5a3a77ca484c74dd06f0d468f', name: 'action' })))));
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
SallaListTile.style = sallaListTileCss;
|
|
31
|
+
|
|
32
|
+
export { SallaListTile as salla_list_tile };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { r as registerInstance, h, a as getElement } from './index-B74h9G6a.js';
|
|
5
|
+
|
|
6
|
+
const SallaLocalizationModal = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.translationLoaded = false;
|
|
10
|
+
this.languages = [];
|
|
11
|
+
this.currencies = [];
|
|
12
|
+
this.hasError = false;
|
|
13
|
+
/**
|
|
14
|
+
* Current language (existing or newly selected)
|
|
15
|
+
*/
|
|
16
|
+
this.language = salla.config.get('user.language_code');
|
|
17
|
+
/**
|
|
18
|
+
* Current currency (existing or newly selected)
|
|
19
|
+
*/
|
|
20
|
+
this.currency = salla.config.get('user.currency_code');
|
|
21
|
+
salla.event.on('localization::open', () => this.open());
|
|
22
|
+
salla.lang.onLoaded(() => {
|
|
23
|
+
this.translationLoaded = true;
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* letting developer to insert his own slot like:
|
|
27
|
+
* <salla-localization>
|
|
28
|
+
* <div slot="language">...{name}....</div>
|
|
29
|
+
* <div slot="currency">...{name}....</div>
|
|
30
|
+
* </salla-localization>
|
|
31
|
+
* Because scoped templates not supported in stencil );
|
|
32
|
+
* we made a workaround to pass language & currency attributes, then replace names in rendering
|
|
33
|
+
*/
|
|
34
|
+
this.languageSlot = this.host.querySelector('[slot="language"]')?.innerHTML || '<label class="s-localization-modal-label" for="lang-{code}"><span>{name}</span></label>';
|
|
35
|
+
this.currencySlot = this.host.querySelector('[slot="currency"]')?.innerHTML || '<label class="s-localization-modal-label" for="currency-{code}"><span>{name}</span><small class="s-localization-modal-currency">{code}</small></label>';
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* open the component
|
|
39
|
+
*/
|
|
40
|
+
async open() {
|
|
41
|
+
this.modal.open();
|
|
42
|
+
return await salla.api.withoutNotifier(() => this.getLanguages())
|
|
43
|
+
.then(() => this.getCurrencies())
|
|
44
|
+
.then(() => {
|
|
45
|
+
if (this.languages.length < 2 && this.currencies.length < 2) {
|
|
46
|
+
this.modal.close();
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
.catch(e => {
|
|
50
|
+
console.log(e);
|
|
51
|
+
this.hasError = true;
|
|
52
|
+
this.errorMessage = e.response?.data?.error?.message || e.response?.data;
|
|
53
|
+
})
|
|
54
|
+
.finally(() => this.modal.stopLoading());
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Hide the component
|
|
58
|
+
*/
|
|
59
|
+
async close() {
|
|
60
|
+
return this.modal.close();
|
|
61
|
+
}
|
|
62
|
+
async getLanguages() {
|
|
63
|
+
this.language = this.language || salla.config.get('user.language_code');
|
|
64
|
+
return this.languages.length > 1 ? null : await salla.config.languages().then(data => this.languages = data);
|
|
65
|
+
}
|
|
66
|
+
async getCurrencies() {
|
|
67
|
+
this.currency = this.currency || salla.config.get('user.currency_code');
|
|
68
|
+
return this.currencies.length > 1 ? null : await salla.config.currencies().then(data => this.currencies = Object.values(data || {}));
|
|
69
|
+
}
|
|
70
|
+
onChangeCurrency(event) {
|
|
71
|
+
this.currency = event.target.value;
|
|
72
|
+
}
|
|
73
|
+
onChangeLanguage(event) {
|
|
74
|
+
this.language = event.target.value;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Change currency and language to the selected ones.
|
|
78
|
+
*/
|
|
79
|
+
async submit() {
|
|
80
|
+
let url;
|
|
81
|
+
this.btn.load()
|
|
82
|
+
.then(() => {
|
|
83
|
+
if (!this.currency) {
|
|
84
|
+
salla.log('There is no currency!');
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (this.currency === salla.config.get('user.currency_code', 'SAR')) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
url = window.location.href;
|
|
91
|
+
return salla.currency.api.change(this.currency);
|
|
92
|
+
})
|
|
93
|
+
.then(() => {
|
|
94
|
+
if (this.language !== salla.config.get('user.language_code', 'ar')) {
|
|
95
|
+
url = salla.helpers.addParamToUrl('lang', this.language);
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
.then(() => this.btn.stop())
|
|
99
|
+
.then(() => this.close())
|
|
100
|
+
.then(() => {
|
|
101
|
+
if (url) {
|
|
102
|
+
window.location.href = url.replace(`/${salla.config.get('user.language_code')}/`, `/${this.language}/`);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
render() {
|
|
107
|
+
return (h("salla-modal", { key: '8f37a27df315cdc0c28e3294dc91209c852be37f', isLoading: true, class: "s-hidden", ref: modal => this.modal = modal, width: "xs" }, h("div", { key: 'f12693b51bd57a866dd5eb40dedfb824262d69c9', slot: 'loading' }, h("div", { key: 'cf40e4ae38a9bffe76b63688b59638a534dfbfeb', class: "s-localization-modal-skeleton" }, h("salla-skeleton", { key: 'b58668b0c16863b7998832c4be120636b32e4b05', width: '25%', height: '15px' }), h("div", { key: '2277672008dd8895791954ad3f8ac0bf090095cd', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: 'e22fe136879a706972c05b2b9ea8ab85be57b82f', width: '25%', height: '15px' }), h("div", { key: '8800d040033db851d2903c05fe0ce947072aae2e', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: '3248a10d8023fa2c8b411294da1072d4209e9a87', height: '40px', width: '100%' }))), !!this.hasError ?
|
|
108
|
+
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "description" }, this.errorMessage)) :
|
|
109
|
+
h("div", { class: "s-localization-modal-inner" }, this.languages.length > 1 ?
|
|
110
|
+
h("div", { class: "s-localization-modal-section" }, h("label", { class: "s-localization-modal-title" }, salla.lang.get('common.titles.language')), h("div", { class: "s-localization-modal-section-inner" }, this.languages.length < 6 ?
|
|
111
|
+
this.languages.map(lang => h("div", { class: "s-localization-modal-item" }, h("input", { class: "s-localization-modal-input", type: "radio", checked: this.language == lang.iso_code, onChange: () => this.language = lang.iso_code, name: "language", id: 'lang-' + lang.code.toLowerCase(), value: lang.code }), h("div", { class: "s-localization-modal-label-slot", id: "language-slot", innerHTML: this.languageSlot
|
|
112
|
+
.replace(/\{name\}/g, lang.name)
|
|
113
|
+
.replace(/\{code\}/g, lang.code)
|
|
114
|
+
.replace(/\{country_code\}/g, lang.country_code) }))) :
|
|
115
|
+
h("select", { class: "s-localization-modal-select", name: "language", onChange: e => this.onChangeLanguage(e) }, this.languages.map(lang => h("option", { value: lang.code, selected: this.language == lang.code }, lang.name)))))
|
|
116
|
+
: '', this.currencies.length > 1 ?
|
|
117
|
+
h("div", { class: "s-localization-modal-section" }, h("label", { class: "s-localization-modal-title" }, salla.lang.get('common.titles.currency')), h("div", { class: "s-localization-modal-section-inner" }, this.currencies.length < 6 ?
|
|
118
|
+
this.currencies.map(currency => h("div", { class: "s-localization-modal-item" }, h("input", { class: "s-localization-modal-input", type: "radio", name: "currency", checked: this.currency == currency.code, onChange: () => this.currency = currency.code, id: 'currency-' + currency.code, value: currency.code }), h("div", { class: "s-localization-modal-label-slot", id: "currency-slot", innerHTML: this.currencySlot
|
|
119
|
+
.replace(/\{name\}/g, currency.name)
|
|
120
|
+
.replace(/\{code\}/g, currency.code)
|
|
121
|
+
.replace(/\{country_code\}/g, currency.country_code) }))) :
|
|
122
|
+
h("select", { class: "s-localization-modal-select", name: "currency", onChange: e => this.onChangeCurrency(e) }, this.currencies.map(currency => h("option", { value: currency.code, selected: this.currency == currency.code }, currency.name)))))
|
|
123
|
+
: '', h("salla-button", { width: "wide", ref: btn => this.btn = btn, onClick: () => this.submit() }, salla.lang.get('common.elements.ok')))));
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* to reduce dom levels we will move slot data into the parent dom
|
|
127
|
+
*/
|
|
128
|
+
componentDidRender() {
|
|
129
|
+
this.host.querySelectorAll('#currency-slot').forEach(el => el.replaceWith(el.firstChild));
|
|
130
|
+
this.host.querySelectorAll('#language-slot').forEach(el => el.replaceWith(el.firstChild));
|
|
131
|
+
}
|
|
132
|
+
get host() { return getElement(this); }
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export { SallaLocalizationModal as salla_localization_modal };
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { r as registerInstance, h, F as Fragment, a as getElement } from './index-B74h9G6a.js';
|
|
5
|
+
|
|
6
|
+
const sallaLoginModalCss = "iframe{-moz-transition:height 0.3s;-ms-transition:height 0.3s;-o-transition:height 0.3s;-webkit-transition:height 0.3s;transition:height 0.3s;width:100%}";
|
|
7
|
+
|
|
8
|
+
const SallaLoginModal = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
/**
|
|
12
|
+
* Does the merchant/current location for visitor allow to login using mobile, By default outside KSA is `false`
|
|
13
|
+
*/
|
|
14
|
+
this.isMobileAllowed = true;
|
|
15
|
+
/**
|
|
16
|
+
* Does the merchant require registration with email & mobile
|
|
17
|
+
*/
|
|
18
|
+
this.isEmailRequired = false;
|
|
19
|
+
/**
|
|
20
|
+
* Once the api verify success, it will be login the customer in web pages
|
|
21
|
+
*/
|
|
22
|
+
this.supportWebAuth = true;
|
|
23
|
+
/**
|
|
24
|
+
* Reload after a successful login
|
|
25
|
+
*/
|
|
26
|
+
this.withoutReload = false;
|
|
27
|
+
/**
|
|
28
|
+
* The source of opening login modal
|
|
29
|
+
*/
|
|
30
|
+
this.source = '';
|
|
31
|
+
this.htmlElement = document.documentElement;
|
|
32
|
+
this.messages = [];
|
|
33
|
+
this.isClosable = true;
|
|
34
|
+
this.iframeLoaded = false;
|
|
35
|
+
this.scrolling = 'no';
|
|
36
|
+
this.direction = document.dir;
|
|
37
|
+
this.canRenderIframe = false;
|
|
38
|
+
salla.event.on('login::open', (data) => {
|
|
39
|
+
if (!this.isEmailAllowed && !this.isMobileAllowed) {
|
|
40
|
+
salla.logger.warn('Please enable atleast one login type to use this component.');
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this.source = data?.source ?? false;
|
|
44
|
+
this.withoutReload = data?.withoutReload ?? this.withoutReload;
|
|
45
|
+
this.open(data);
|
|
46
|
+
this.openModal();
|
|
47
|
+
});
|
|
48
|
+
salla.event.on('modal::close', (data) => {
|
|
49
|
+
if (this.iframe)
|
|
50
|
+
this.sendMessageToIframe({
|
|
51
|
+
source: 'login',
|
|
52
|
+
type: 'modal_closed',
|
|
53
|
+
data,
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
salla.onReady(() => {
|
|
57
|
+
this.api = salla.config.get('store.api');
|
|
58
|
+
this.storeId = salla.config.get('store.id');
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
componentDidLoad() {
|
|
62
|
+
window.addEventListener('message', (event) => {
|
|
63
|
+
if (event.data.source != "login") {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (!this.inline && !this.canRenderIframe) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
salla.log(`salla-account:: recived an event`, event.data);
|
|
70
|
+
let action = event.data?.type?.replace('iframe::', '');
|
|
71
|
+
let value = event.data.message;
|
|
72
|
+
//if we need skip some events
|
|
73
|
+
// if (action === 'dispatchEvent' && [].includes(value.event)) {
|
|
74
|
+
// return;
|
|
75
|
+
// }
|
|
76
|
+
// if (action == "dispatchEvent") {
|
|
77
|
+
// return this.host.dispatchEvent(new CustomEvent(value.name, {
|
|
78
|
+
// cancelable: true,
|
|
79
|
+
// bubbles: true,
|
|
80
|
+
// detail: value.payload
|
|
81
|
+
// }));
|
|
82
|
+
// }
|
|
83
|
+
if (action == 'ready') {
|
|
84
|
+
if (value.isPasskeyPage) {
|
|
85
|
+
this.createPassKey.postMessage({ source: "login", type: "init_passkey_page", data: {
|
|
86
|
+
token: salla.storage.get('token'),
|
|
87
|
+
store_id: salla.config.get('store.id'),
|
|
88
|
+
locale: salla.config.get('user.language_code'),
|
|
89
|
+
redirect: salla.config.get('store.url')
|
|
90
|
+
} }, salla.config.get('login.url'));
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
this.handleIframeReadyAction();
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (action == 'height') {
|
|
97
|
+
return (this.iframe.height = value?.height + 'px');
|
|
98
|
+
}
|
|
99
|
+
//share the iframe storage, so login too
|
|
100
|
+
if (action == "storage") {
|
|
101
|
+
return this.handleIframeStorageAction(value);
|
|
102
|
+
}
|
|
103
|
+
// if (action == "success") {
|
|
104
|
+
// this.isClosable = true;
|
|
105
|
+
// confetti.startConfetti(1200, 50, 150);
|
|
106
|
+
// }
|
|
107
|
+
if (action == "scrolling") {
|
|
108
|
+
this.scrolling = value;
|
|
109
|
+
this.isClosable = false;
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (action == "direction") {
|
|
113
|
+
return document.dir = this.direction = value ? "rtl" : "ltr";
|
|
114
|
+
}
|
|
115
|
+
if (action == 'notify') {
|
|
116
|
+
return salla.notify[value.type](value.message);
|
|
117
|
+
}
|
|
118
|
+
// temporary condition until we handle both cases separately
|
|
119
|
+
if (action == 'authenticated' || action == 'authenticated_web_auth') {
|
|
120
|
+
!value?.withoutClose && this.close();
|
|
121
|
+
return salla.auth.api.handlAfterAuthenticatedResponse(value, this.supportWebAuth)
|
|
122
|
+
.then(() => !(value?.withoutReload || this.withoutReload) && setTimeout(() => window.location.reload(), 1000));
|
|
123
|
+
}
|
|
124
|
+
if (action == 'dispatchEvent' && value.event == 'auth::verified') {
|
|
125
|
+
salla.log('Ignored dispatchEvent `auth::verified` from iframe');
|
|
126
|
+
//we don't need to fire this event because it have listeners for it, and already it's fired/firing from `salla.auth.api.handlAfterAuthenticatedResponse` already we are handling it
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (action == 'dispatchEvent') {
|
|
130
|
+
return salla.event.emit(value.event, ...value.payload);
|
|
131
|
+
}
|
|
132
|
+
if (action == 'reload') {
|
|
133
|
+
if (value?.withClose)
|
|
134
|
+
this.modal.close();
|
|
135
|
+
return window.location.reload();
|
|
136
|
+
}
|
|
137
|
+
if (action === 'open_page') {
|
|
138
|
+
return window.location.href = value.url;
|
|
139
|
+
}
|
|
140
|
+
if (action === 'open_passkey_page') {
|
|
141
|
+
this.createPassKey = window.open(`${salla.config.get('login.url')}/create-passkey`);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (action === 'guest-checkout') {
|
|
145
|
+
return this.handleGuestCheckout();
|
|
146
|
+
}
|
|
147
|
+
if (action == "close") {
|
|
148
|
+
this.close();
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
this.observeDarkModeChanges();
|
|
152
|
+
setTimeout(() => Salla.event.emit('salla-login::ready'), 1);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Open login component
|
|
156
|
+
*/
|
|
157
|
+
async open(_event = null) {
|
|
158
|
+
/**
|
|
159
|
+
* This is a workaround until we remove all the user objet from twig files
|
|
160
|
+
* When the user is already login, let's reload the page
|
|
161
|
+
*/
|
|
162
|
+
if (!salla.config.isGuest()) {
|
|
163
|
+
if (!this.withoutReload) {
|
|
164
|
+
return location.reload();
|
|
165
|
+
}
|
|
166
|
+
// Fire an event if withoutReload is true
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
return this.modal.open();
|
|
170
|
+
}
|
|
171
|
+
close() {
|
|
172
|
+
Salla.event.emit('salla-login::closing');
|
|
173
|
+
this.modal.close();
|
|
174
|
+
this.iframeLoaded = false;
|
|
175
|
+
this.canRenderIframe = false;
|
|
176
|
+
this.host.dispatchEvent(new CustomEvent('salla-login:closed', {
|
|
177
|
+
cancelable: true,
|
|
178
|
+
bubbles: true,
|
|
179
|
+
detail: null
|
|
180
|
+
}));
|
|
181
|
+
Salla.event.emit('salla-login::closed');
|
|
182
|
+
}
|
|
183
|
+
handleIframeReadyAction() {
|
|
184
|
+
this.sendInitMessage();
|
|
185
|
+
this.sendMessageToIframe({
|
|
186
|
+
source: 'login',
|
|
187
|
+
type: 'width',
|
|
188
|
+
data: document.body.clientWidth,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
observeDarkModeChanges() {
|
|
192
|
+
const observer = new MutationObserver((mutations) => {
|
|
193
|
+
mutations.forEach((mutation) => {
|
|
194
|
+
if (mutation.attributeName === 'class') {
|
|
195
|
+
this.sendMessageToIframe({
|
|
196
|
+
source: 'login',
|
|
197
|
+
type: 'darkMode',
|
|
198
|
+
data: { isDark: this.htmlElement.classList.contains('dark') ? true : false },
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
// observing the HTML element for attribute changes
|
|
204
|
+
observer.observe(this.htmlElement, { attributes: true });
|
|
205
|
+
}
|
|
206
|
+
async handleIframeStorageAction(value) {
|
|
207
|
+
let token, cartUserId = salla.storage.get('cart.user_id');
|
|
208
|
+
let withCartReset = false;
|
|
209
|
+
Object.entries(value).filter(item => !Salla.storage.get(item[0]))
|
|
210
|
+
.forEach(([key, value]) => {
|
|
211
|
+
salla.log('Shared storage from accounts domain', key, value);
|
|
212
|
+
let cleanedValue = (typeof value === 'string') ? value?.replace(/^"|"$/g, '') : value;
|
|
213
|
+
salla.storage.set(key, cleanedValue);
|
|
214
|
+
if (key === 'token') {
|
|
215
|
+
token = cleanedValue;
|
|
216
|
+
}
|
|
217
|
+
if (key === 'user' && cartUserId && (cleanedValue.id !== cartUserId)) {
|
|
218
|
+
withCartReset = true;
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
if (token) {
|
|
222
|
+
this.modal.close();
|
|
223
|
+
Salla.auth.event.tokenFetched(token);
|
|
224
|
+
try {
|
|
225
|
+
await Salla.api.cart.assign();
|
|
226
|
+
}
|
|
227
|
+
catch (err) {
|
|
228
|
+
Salla.log('Error on assign after handle iframe', err);
|
|
229
|
+
}
|
|
230
|
+
withCartReset && Salla.cart.reset();
|
|
231
|
+
try {
|
|
232
|
+
!Salla.auth.api.isSessionless() && await Salla.auth.api.request('auth/jwt');
|
|
233
|
+
if (Salla.auth.api.canRedirect()) {
|
|
234
|
+
setTimeout(() => window.location.reload(), 100);
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
// Match handlAfterAuthenticatedResponse order: loggedIn (fetches profile + emits) -> afterUserLogin
|
|
238
|
+
// Note: auth::verified is omitted here since cart.assign() already handles cart sync above
|
|
239
|
+
await Salla.auth.event.loggedIn({ data: { token } }).then(() => Salla.auth.api.afterUserLogin());
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
catch (err) {
|
|
243
|
+
this.modal.open();
|
|
244
|
+
Salla.log('Error on request auth/jwt after handle iframe', err);
|
|
245
|
+
}
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
withCartReset && Salla.cart.reset();
|
|
249
|
+
}
|
|
250
|
+
sendMessageToIframe(message) {
|
|
251
|
+
if (!this.iframe)
|
|
252
|
+
return;
|
|
253
|
+
return this.iframe.contentWindow.postMessage(message, '*');
|
|
254
|
+
}
|
|
255
|
+
sendInitMessage() {
|
|
256
|
+
let headers = this.headers;
|
|
257
|
+
try {
|
|
258
|
+
headers = typeof headers === 'string' ? JSON.parse(headers) : headers;
|
|
259
|
+
}
|
|
260
|
+
catch (error) {
|
|
261
|
+
console.error('Failed to parse headers!', this.headers, error);
|
|
262
|
+
headers = undefined;
|
|
263
|
+
}
|
|
264
|
+
const storageObject = {
|
|
265
|
+
user: salla.storage.get('user'),
|
|
266
|
+
s_translations: salla.storage.get('s_translations'),
|
|
267
|
+
token: salla.storage.get('token'),
|
|
268
|
+
};
|
|
269
|
+
storageObject.user || (delete storageObject.user);
|
|
270
|
+
storageObject.s_translations || (delete storageObject.s_translations);
|
|
271
|
+
storageObject.token || (delete storageObject.token);
|
|
272
|
+
this.sendMessageToIframe({
|
|
273
|
+
source: "login",
|
|
274
|
+
type: "init",
|
|
275
|
+
data: {
|
|
276
|
+
id: this.storeId,
|
|
277
|
+
lang: salla.lang.locale,
|
|
278
|
+
isDark: this.htmlElement.classList.contains('dark') ? true : false,
|
|
279
|
+
apiUrl: this.api?.replace(/\/+$/, ''),
|
|
280
|
+
supportWebAuth: this.supportWebAuth,
|
|
281
|
+
withoutReload: this.withoutReload,
|
|
282
|
+
inline: this.inline,
|
|
283
|
+
settings: salla.config.all(),
|
|
284
|
+
headers: headers,
|
|
285
|
+
storage: storageObject,
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
async handleGuestCheckout() {
|
|
290
|
+
this.modal.close();
|
|
291
|
+
if (salla.config.isGuest()) {
|
|
292
|
+
await salla.api.cart.syncGuestCart();
|
|
293
|
+
return salla.cart.submit(true);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
openModal() {
|
|
297
|
+
if (!this.canRenderIframe) {
|
|
298
|
+
this.canRenderIframe = true;
|
|
299
|
+
}
|
|
300
|
+
this.modal.open();
|
|
301
|
+
}
|
|
302
|
+
render() {
|
|
303
|
+
if (this.inline) {
|
|
304
|
+
return this.getLoginDom();
|
|
305
|
+
}
|
|
306
|
+
return (h("salla-modal", { class: "s-login-modal", ref: modal => this.modal = modal, width: "xs" }, this.getLoginDom()));
|
|
307
|
+
}
|
|
308
|
+
getLoginDom() {
|
|
309
|
+
if (!this.canRenderIframe) {
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
return h(Fragment, null, h("iframe", { src: `${salla.config.get('login.url', 'https://accounts.salla.com')}?src=${this.source}`, title: "Salla Login", class: "hide-scroll", loading: 'lazy', ref: iframe => { this.iframe = iframe; }, allow: "publickey-credentials-get; publickey-credentials-create", scrolling: this.scrolling, frameborder: "0", width: "100%" }));
|
|
313
|
+
}
|
|
314
|
+
get host() { return getElement(this); }
|
|
315
|
+
};
|
|
316
|
+
SallaLoginModal.style = sallaLoginModalCss;
|
|
317
|
+
|
|
318
|
+
export { SallaLoginModal as salla_login_modal };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-B74h9G6a.js';
|
|
5
5
|
|
|
6
6
|
const sallaLoyaltyPrizeItemCss = "salla-loyalty-prize-item:hover{box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important}";
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
5
|
-
import {
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-B74h9G6a.js';
|
|
5
|
+
import { l as loyaltyProgramIcon } from './gift-BChI23pG.js';
|
|
6
6
|
|
|
7
7
|
const sallaLoyaltyProgramCss = "";
|
|
8
8
|
|
|
@@ -76,7 +76,7 @@ const SallaWalletTable = class {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
|
-
return (h(Host, { key: '9beb3c0146ba1e0d5dc1c60a09c7d38af391bdc6' }, h("div", { key: 'a6ce757cb30de9b2e4d2c7e224b62452b9ce26e9' }, this.isLoadingLoyalty ? (h("salla-loading", null)) : (h("div", null, this.loyaltyPointsArray.length > 0 ? (h("div", null, h("table", { class: "s-loyalty-program-table" }, h("thead", { class: "s-loyalty-program-table-head" }, h("tr", { class: "s-loyalty-program-table-head-tr" }, h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('pages.wallet.points')), h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('pages.wallet.date')), h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('pages.wallet.expiry_date')), h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('common.elements.note')), h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('common.elements.status')))), h("tbody", { class: "s-loyalty-program-table-tbody" }, this.loyaltyPointsArray.map(point => (h("tr", { class: "s-loyalty-program-table-tbody-tr" }, h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, point?.type === 'plus' ? '+' : '', point?.points || '', " ", salla.lang.get('pages.loyalty_program.point')), h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, formatDate(point?.created_at ? Number(point.created_at) * 1000 : undefined)), h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, formatDate(point?.points_expire_date)), h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, translateKey(point?.key)), h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, translateKey(point?.status_key))))))), h("div", { class: "s-infinite-scroll-wrapper" }, !!this.nextPageUrlLoyalty && (h("salla-button", { onClick: this.handleClick, loading: this.isLoadingLoyalty }, salla.lang.get('common.elements.load_more')))))) : (h("div", null, h("div", { class: "s-loyalty-program-table-empty-state" }, h("span", { innerHTML:
|
|
79
|
+
return (h(Host, { key: '9beb3c0146ba1e0d5dc1c60a09c7d38af391bdc6' }, h("div", { key: 'a6ce757cb30de9b2e4d2c7e224b62452b9ce26e9' }, this.isLoadingLoyalty ? (h("salla-loading", null)) : (h("div", null, this.loyaltyPointsArray.length > 0 ? (h("div", null, h("table", { class: "s-loyalty-program-table" }, h("thead", { class: "s-loyalty-program-table-head" }, h("tr", { class: "s-loyalty-program-table-head-tr" }, h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('pages.wallet.points')), h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('pages.wallet.date')), h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('pages.wallet.expiry_date')), h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('common.elements.note')), h("th", { scope: "col", class: "s-loyalty-program-table-head-tr-th" }, salla.lang.get('common.elements.status')))), h("tbody", { class: "s-loyalty-program-table-tbody" }, this.loyaltyPointsArray.map(point => (h("tr", { class: "s-loyalty-program-table-tbody-tr" }, h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, point?.type === 'plus' ? '+' : '', point?.points || '', " ", salla.lang.get('pages.loyalty_program.point')), h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, formatDate(point?.created_at ? Number(point.created_at) * 1000 : undefined)), h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, formatDate(point?.points_expire_date)), h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, translateKey(point?.key)), h("td", { class: "s-loyalty-program-table-tbody-tr-td" }, translateKey(point?.status_key))))))), h("div", { class: "s-infinite-scroll-wrapper" }, !!this.nextPageUrlLoyalty && (h("salla-button", { onClick: this.handleClick, loading: this.isLoadingLoyalty }, salla.lang.get('common.elements.load_more')))))) : (h("div", null, h("div", { class: "s-loyalty-program-table-empty-state" }, h("span", { innerHTML: loyaltyProgramIcon }), h("div", { class: "s-loyalty-program-table-placeholder-title" }, salla.lang.get('pages.loyalty_program.no_loyality_points_title')), h("div", { class: "s-loyalty-program-table-placeholder-sub-title" }, salla.lang.get('pages.loyalty_program.no_loyality_points_sub_title'))))))))));
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
SallaWalletTable.style = sallaLoyaltyProgramCss;
|