@salla.sa/twilight-components 2.14.411 → 2.14.412
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/{filepond-DmIUNeKc.js → filepond-BO-XBD1i.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-C8AOgqzV.js → filepond-plugin-file-poster-DJIG7vOj.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-C1uEA-N4.js → filepond-plugin-file-validate-size-Bhtuy-Ar.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-CAYEi5xZ.js → filepond-plugin-file-validate-type-BQhRvZvr.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DeGtwB2d.js → filepond-plugin-image-edit-C4unOPfE.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BL0bCUVQ.js → filepond-plugin-image-exif-orientation-QreJIoqS.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Dih1Wn_X.js → filepond-plugin-image-preview-aiURUVDo.js} +1 -1
- package/dist/cjs/{functions-CcFdqlpK.js → functions-qbO9xyMC.js} +1 -1
- package/dist/cjs/{index-BBXwu2T_.js → index-BtHm_lmK.js} +1 -1
- package/dist/cjs/{index-PZNCZxVn.js → index-DR2nrv6V.js} +6 -6
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/{salla-add-product-button_4.cjs.entry.js → salla-add-product-button_5.cjs.entry.js} +130 -1
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.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-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-bullet-delivery.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.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-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
- 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-reward.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.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-modal.cjs.entry.js +1 -1
- 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-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-reward-action_4.cjs.entry.js +3 -3
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.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/{tracked-promise-DDi0ylD7.js → tracked-promise-Dlrrx6bS.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-OPSqChB9.js → vanilla-picker-BgvVWFWW.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/salla-bought-together/interfaces.js +1 -0
- package/dist/collection/components/salla-bought-together/salla-bought-together.css +18 -0
- package/dist/collection/components/salla-bought-together/salla-bought-together.js +174 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-bought-together.d.ts +11 -0
- package/dist/components/salla-bought-together.js +174 -0
- package/dist/esm/{filepond-905U04xY.js → filepond-BdAJ1Q3U.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-BWkARu_j.js → filepond-plugin-file-poster-_P46glp3.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-C0PJYzhi.js → filepond-plugin-file-validate-size-Cs7iDcpm.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Bglz2iC6.js → filepond-plugin-file-validate-type-BokfkNG5.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-3aH_4pIL.js → filepond-plugin-image-edit-DqujritR.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-B1h3s1nQ.js → filepond-plugin-image-exif-orientation-CTqsgDyW.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-CAiiia6W.js → filepond-plugin-image-preview-zoBFIa44.js} +1 -1
- package/dist/esm/{functions-GzuwX5HS.js → functions-CEdm6lBq.js} +1 -1
- package/dist/esm/{index-xT-Vt0D7.js → index-DXkuZzsm.js} +1 -1
- package/dist/esm/{index-rIbWLXjW.js → index-eYsXdqjv.js} +6 -6
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/{salla-add-product-button_4.entry.js → salla-add-product-button_5.entry.js} +130 -2
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.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-badge.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +10 -10
- package/dist/esm/salla-bullet-delivery.entry.js +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.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-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner.entry.js +2 -2
- package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
- package/dist/esm/salla-loyalty-panel.entry.js +3 -3
- 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-reward.entry.js +2 -2
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.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-modal.entry.js +1 -1
- 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-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card_2.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-progress-bar.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-reward-action_4.entry.js +3 -3
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.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/{tracked-promise-BQ3oDpFo.js → tracked-promise-DC9Saija.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-Cv_dc6oT.js → vanilla-picker-DdyyxtyV.js} +1 -1
- package/dist/twilight/{p-98862c7d.entry.js → p-040057c7.entry.js} +1 -1
- package/dist/twilight/{p-f2203ac6.entry.js → p-046ef0cf.entry.js} +1 -1
- package/dist/twilight/{p-80adbd86.entry.js → p-04a3bd3a.entry.js} +1 -1
- package/dist/twilight/{p-c3087e4b.entry.js → p-083bfceb.entry.js} +1 -1
- package/dist/twilight/{p-b003a630.entry.js → p-0b6cfdc6.entry.js} +1 -1
- package/dist/twilight/{p-9faa8a9e.entry.js → p-0c773a98.entry.js} +1 -1
- package/dist/twilight/{p-4aacfcb8.entry.js → p-0fee8df2.entry.js} +1 -1
- package/dist/twilight/p-12e78aef.entry.js +4 -0
- package/dist/twilight/{p-7dd1b438.entry.js → p-18046a80.entry.js} +1 -1
- package/dist/twilight/{p-fda57a16.entry.js → p-18428cad.entry.js} +1 -1
- package/dist/twilight/{p-62a8bf31.entry.js → p-18e4e822.entry.js} +1 -1
- package/dist/twilight/{p-15a53fe6.entry.js → p-1c2c212f.entry.js} +1 -1
- package/dist/twilight/{p-d6b4621a.entry.js → p-1d9e9e5e.entry.js} +1 -1
- package/dist/twilight/{p-0ad7c855.entry.js → p-1f18bb8c.entry.js} +1 -1
- package/dist/twilight/{p-c2c428e7.entry.js → p-24121404.entry.js} +1 -1
- package/dist/twilight/{p-24216a35.entry.js → p-28a276b7.entry.js} +1 -1
- package/dist/twilight/{p-6c84e2a0.entry.js → p-2beb780e.entry.js} +1 -1
- package/dist/twilight/{p-78bcabea.entry.js → p-2d29eae4.entry.js} +1 -1
- package/dist/twilight/{p-18b593a9.entry.js → p-2ea91f4d.entry.js} +1 -1
- package/dist/twilight/{p-dfa1ddc1.entry.js → p-371ea2ac.entry.js} +1 -1
- package/dist/twilight/{p-56f8e93f.entry.js → p-38df842f.entry.js} +1 -1
- package/dist/twilight/{p-a9f516c8.entry.js → p-3a0482aa.entry.js} +1 -1
- package/dist/twilight/{p-2a45676f.entry.js → p-3dd609ff.entry.js} +1 -1
- package/dist/twilight/{p-57a1bd5e.entry.js → p-473e829b.entry.js} +1 -1
- package/dist/twilight/{p-49457497.entry.js → p-4c7e5ca7.entry.js} +1 -1
- package/dist/twilight/{p-D-wDhUx5.js → p-4rGFyB1b.js} +1 -1
- package/dist/twilight/{p-ca62e17c.entry.js → p-543482d0.entry.js} +1 -1
- package/dist/twilight/{p-38b0d747.entry.js → p-569db60a.entry.js} +1 -1
- package/dist/twilight/{p-9adacf19.entry.js → p-63b091c3.entry.js} +1 -1
- package/dist/twilight/{p-cc551a73.entry.js → p-67b3a063.entry.js} +1 -1
- package/dist/twilight/{p-92863280.entry.js → p-6a50e4ab.entry.js} +1 -1
- package/dist/twilight/{p-5c3711fb.entry.js → p-6ffe96cf.entry.js} +1 -1
- package/dist/twilight/{p-d680ef32.entry.js → p-70e26072.entry.js} +1 -1
- package/dist/twilight/{p-c9e78561.entry.js → p-78b27b6f.entry.js} +1 -1
- package/dist/twilight/{p-1da1f13f.entry.js → p-809d8765.entry.js} +1 -1
- package/dist/twilight/{p-31a5bd84.entry.js → p-82d315dc.entry.js} +1 -1
- package/dist/twilight/{p-9b289072.entry.js → p-82fc9f8a.entry.js} +1 -1
- package/dist/twilight/{p-dcbd52a9.entry.js → p-86494434.entry.js} +1 -1
- package/dist/twilight/{p-09de8e38.entry.js → p-880974c0.entry.js} +1 -1
- package/dist/twilight/{p-d218c2ff.entry.js → p-914ef875.entry.js} +1 -1
- package/dist/twilight/{p-70e21348.entry.js → p-92c3525a.entry.js} +1 -1
- package/dist/twilight/{p-8afeb013.entry.js → p-92ee979a.entry.js} +1 -1
- package/dist/twilight/{p-a5a4a9c4.entry.js → p-98dfc58c.entry.js} +1 -1
- package/dist/twilight/{p-0c751ad3.entry.js → p-9da33e90.entry.js} +1 -1
- package/dist/twilight/p-9f51245d.entry.js +4 -0
- package/dist/twilight/{p-4c527044.entry.js → p-9fea03ff.entry.js} +1 -1
- package/dist/twilight/{p-BEG98TtY.js → p-B-gehnpX.js} +1 -1
- package/dist/twilight/{p-l3RnLhEs.js → p-BrL7ZFF-.js} +1 -1
- package/dist/twilight/{p-_9i6OtFf.js → p-Bt5MNLrr.js} +1 -1
- package/dist/twilight/{p-B6nHsUmY.js → p-C4iKSe6r.js} +1 -1
- package/dist/twilight/{p-_uYeO1XY.js → p-CZP8nF-D.js} +1 -1
- package/dist/twilight/{p-CTLj8xU3.js → p-CdKOsdhF.js} +1 -1
- package/dist/twilight/{p-B5aVfdOq.js → p-CdQPD_4N.js} +1 -1
- package/dist/twilight/{p-D0khSRlI.js → p-CkMgy4QX.js} +1 -1
- package/dist/twilight/{p-ba7hQHgb.js → p-DgUXy-oM.js} +1 -1
- package/dist/twilight/{p-8oz_tYCT.js → p-VP7525fx.js} +1 -1
- package/dist/twilight/{p-0362115c.entry.js → p-a0792c90.entry.js} +1 -1
- package/dist/twilight/{p-7179b561.entry.js → p-a74e2625.entry.js} +1 -1
- package/dist/twilight/{p-8b5ab33f.entry.js → p-a97da8bc.entry.js} +1 -1
- package/dist/twilight/p-aced00e2.entry.js +4 -0
- package/dist/twilight/{p-5f08ca5c.entry.js → p-b04f3b37.entry.js} +1 -1
- package/dist/twilight/{p-a492282a.entry.js → p-b258ef5c.entry.js} +1 -1
- package/dist/twilight/{p-c8dedc2d.entry.js → p-ba81b8d6.entry.js} +1 -1
- package/dist/twilight/{p-0d04fb8c.entry.js → p-bab9b1ad.entry.js} +1 -1
- package/dist/twilight/{p-dde28f2e.entry.js → p-c00c26f4.entry.js} +1 -1
- package/dist/twilight/{p-9f597738.entry.js → p-c0ea9ff2.entry.js} +1 -1
- package/dist/twilight/{p-a0c775b0.entry.js → p-c11f0af9.entry.js} +1 -1
- package/dist/twilight/{p-dfeeb15e.entry.js → p-c38311a2.entry.js} +1 -1
- package/dist/twilight/{p-cb77c16b.entry.js → p-c6a56a0c.entry.js} +1 -1
- package/dist/twilight/{p-1716e7bf.entry.js → p-c8821c21.entry.js} +1 -1
- package/dist/twilight/{p-9020d179.entry.js → p-c8b8ea5c.entry.js} +1 -1
- package/dist/twilight/{p-0a39c576.entry.js → p-c8f6bc81.entry.js} +1 -1
- package/dist/twilight/{p-78647833.entry.js → p-cb5fbe10.entry.js} +1 -1
- package/dist/twilight/{p-67ec0369.entry.js → p-cf4c9420.entry.js} +1 -1
- package/dist/twilight/{p-df55b402.entry.js → p-d400841e.entry.js} +1 -1
- package/dist/twilight/{p-aad3c860.entry.js → p-d49fd79d.entry.js} +1 -1
- package/dist/twilight/{p-ffeb8d66.entry.js → p-d6a5df0d.entry.js} +1 -1
- package/dist/twilight/{p-3134ec55.entry.js → p-d6a86efa.entry.js} +1 -1
- package/dist/twilight/{p-70b821e0.entry.js → p-dbe6cc9c.entry.js} +1 -1
- package/dist/twilight/{p-7ac1d258.entry.js → p-e2cec9f6.entry.js} +1 -1
- package/dist/twilight/{p-17bc3083.entry.js → p-e5e1574f.entry.js} +1 -1
- package/dist/twilight/{p-c39c381b.entry.js → p-e89e8a20.entry.js} +1 -1
- package/dist/twilight/{p-rIbWLXjW.js → p-eYsXdqjv.js} +1 -1
- package/dist/twilight/{p-03327bdb.entry.js → p-eadaf058.entry.js} +1 -1
- package/dist/twilight/{p-746b703c.entry.js → p-eae4b2c9.entry.js} +1 -1
- package/dist/twilight/p-ed6e8053.entry.js +4 -0
- package/dist/twilight/{p-464ebb66.entry.js → p-f267b033.entry.js} +1 -1
- package/dist/twilight/{p-d950df54.entry.js → p-f3105e54.entry.js} +1 -1
- package/dist/twilight/{p-6477aa16.entry.js → p-f3d76113.entry.js} +1 -1
- package/dist/twilight/{p-fb9806d9.entry.js → p-f91399b4.entry.js} +1 -1
- package/dist/twilight/{p-4597e9a0.entry.js → p-faae4443.entry.js} +1 -1
- package/dist/twilight/{p-941e5a4a.entry.js → p-fea8186b.entry.js} +1 -1
- package/dist/twilight/{p-05618953.entry.js → p-ff972c8b.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bought-together/interfaces.d.ts +15 -0
- package/dist/types/components/salla-bought-together/salla-bought-together.d.ts +23 -0
- package/dist/types/components.d.ts +23 -0
- package/package.json +5 -5
- package/dist/twilight/p-4a549dd4.entry.js +0 -4
- package/dist/twilight/p-7ea9101c.entry.js +0 -4
- package/dist/twilight/p-d29c6154.entry.js +0 -4
- package/dist/twilight/p-e37fe440.entry.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as e,H as a}from"./p-
|
|
4
|
+
import{r as s,h as e,H as a}from"./p-eYsXdqjv.js";var t='\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>user-off</title>\n<path d="M10.837 19.309c-4.963 1.284-8.171 4.303-8.171 7.691v3.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-3.667c0-2.101 2.48-4.155 6.172-5.109 0.713-0.184 1.141-0.912 0.957-1.625-0.184-0.711-0.908-1.137-1.625-0.956zM12.859 3.715c0.933-0.685 2.020-1.048 3.141-1.048 2.941 0 5.333 2.392 5.333 5.333 0 1.121-0.363 2.208-1.048 3.141-0.436 0.593-0.308 1.428 0.284 1.864 0.239 0.175 0.515 0.259 0.788 0.259 0.411 0 0.815-0.188 1.076-0.544 1.025-1.393 1.567-3.025 1.567-4.72 0-4.412-3.588-8-8-8-1.695 0-3.327 0.541-4.721 1.567-0.592 0.435-0.72 1.269-0.284 1.864 0.436 0.593 1.269 0.721 1.864 0.284zM31.609 29.724l-29.333-29.333c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l29.333 29.333c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885z"></path>\n</svg>\n';const i=class{constructor(e){s(this,e),this.deactivateAccount=salla.lang.get("pages.profile.deactivate_account"),this.promotionalMsgs=salla.lang.get("pages.profile.promotional_messages"),this.hideMyName=salla.lang.get("pages.profile.hide_my_name"),this.hideMyNameDesc=salla.lang.get("pages.profile.hide_my_name_desc"),this.deactivateDesc=salla.lang.get("pages.profile.deactivate_account_description"),this.promotionalMsgsDesc=salla.lang.get("pages.profile.promotional_messages_description"),this.sorryForLeavingText=salla.lang.get("pages.profile.warning_for_deactivate"),this.warningText=salla.lang.get("pages.profile.sorry_for_leaving"),this.keepAccount=salla.lang.get("pages.profile.keep_account"),this.buttonLoading=!1,this.canHideName=salla.config.get("store.settings.rating.can_customer_hide_name"),salla.onReady((()=>{this.isHiddenName=salla.config.get("user.is_hidden_name"),this.isNotifiable=salla.config.get("user.is_notifiable"),this.canHideName=salla.config.get("store.settings.rating.can_customer_hide_name"),this.isNotifiable&&this.isHiddenName||salla.event.on("profile::info.fetched",(s=>{this.isHiddenName=s.data.is_hidden_name,this.isNotifiable=s.data.is_notifiable}))})),salla.lang.onLoaded((()=>{this.deactivateAccount=salla.lang.get("pages.profile.deactivate_account"),this.promotionalMsgs=salla.lang.get("pages.profile.promotional_messages"),this.hideMyName=salla.lang.get("pages.profile.hide_my_name"),this.hideMyNameDesc=salla.lang.get("pages.profile.hide_my_name_desc"),this.deactivateDesc=salla.lang.get("pages.profile.deactivate_account_description"),this.promotionalMsgsDesc=salla.lang.get("pages.profile.promotional_messages_description"),this.warningText=salla.lang.get("pages.profile.warning_for_deactivate"),this.sorryForLeavingText=salla.lang.get("pages.profile.sorry_for_leaving"),this.keepAccount=salla.lang.get("pages.profile.keep_account")}))}toggleSetting(s,e){salla.profile.updateSettings({name:s,value:e.target.checked})}capitalizeText(s){return s.charAt(0).toUpperCase()+s.slice(1)}openDeactivateModal(){this.confirmationModal.setTitle(this.capitalizeText(this.deactivateAccount)),this.confirmationModal.open()}async deleteAccount(){await salla.profile.delete().finally((()=>this.confirmationModal.close()))}render(){return e(a,{key:"b37f8e7cd7fe59dfd4f4e1efe455e74d33d4b91e",class:"s-user-settings-wrapper"},this.canHideName&&e("div",{key:"7cf5f1ed489159ef1c754fc8368b390d35cc273d",class:"s-user-settings-section"},e("salla-list-tile",{key:"961843ff5de245febf4b5d9d4a96d47b44aeaff3"},e("div",{key:"bdfa266ee2694e410ff2bc8d6ec31b5210e7bf08",slot:"icon",class:"s-user-settings-section-icon"},e("span",{key:"8ff08646cb3b3ba8d157f07cb4d54a6f515409a7",innerHTML:'\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>user-cancel</title>\n<path d="M29.885 16l1.724-1.724c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-1.724 1.724-1.724-1.724c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l1.724 1.724-1.724 1.724c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l1.724-1.724 1.724 1.724c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885zM10.667 16c4.043 0 7.333-3.289 7.333-7.333s-3.291-7.333-7.333-7.333-7.333 3.289-7.333 7.333 3.291 7.333 7.333 7.333zM10.667 4c2.573 0 4.667 2.093 4.667 4.667s-2.093 4.667-4.667 4.667-4.667-2.093-4.667-4.667 2.093-4.667 4.667-4.667zM10.667 18.667c-5.881 0-10.667 3.813-10.667 8.5v2.167c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-3.217 3.588-5.833 8-5.833s8 2.616 8 5.833v2.167c0 0.736 0.596 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-4.687-4.785-8.5-10.667-8.5z"></path>\n</svg>\n'})),e("div",{key:"8030d07722d9ad730676dafd1323b93a361f91da",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.hideMyName)),e("div",{key:"f4c524dfe45418f0dd7395e998b1c16aa951a5f9",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.hideMyNameDesc)),e("div",{key:"74569032acb01ff1037104dcaf46f13c18c16803",slot:"action",class:"s-user-settings-section-action"},e("label",{key:"6002a8368a587dbd8d3fd3fc1231e52ee44ebbbe",class:"s-toggle"},e("input",{key:"2e9a622f9a670ef0f314c6183c57c851334a7df5",class:"s-toggle-input",checked:this.isHiddenName,onChange:s=>this.toggleSetting("is_hidden_name",s),type:"checkbox"}),e("div",{key:"ca57daef65f550d53c1f947b41d3fb488bd38a95",class:"s-toggle-switcher"}))))),e("div",{key:"b81a0200e08c0eca176060362792a45d9d7ad41e",class:"s-user-settings-section"},e("salla-list-tile",{key:"ebcdac4056d21cbbd218b246cdd6c5bfa7bc2ac3"},e("div",{key:"df3a675745a0945498f3f45e11016f9f9c71ce6d",slot:"icon",class:"s-user-settings-section-icon"},e("span",{key:"b5accc798ca95bd803f9c721f96fe62ca27e8ecf",innerHTML:'\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>bullhorn</title>\n<path d="M30.129 0.264c-0.339-0.252-0.776-0.328-1.179-0.208l-24.951 7.485v-0.216c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v14.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-0.112l3.448 1.207-0.595 1.704c-0.321 1.019-0.227 2.103 0.267 3.051s1.327 1.647 2.345 1.968l6.359 2.004c0.399 0.127 0.804 0.187 1.201 0.187 1.699 0 3.277-1.091 3.812-2.785l0.423-1.295 7.633 2.672c0.143 0.049 0.292 0.075 0.44 0.075 0.273 0 0.543-0.084 0.772-0.247 0.352-0.249 0.561-0.655 0.561-1.087v-28c0-0.421-0.199-0.819-0.537-1.069zM18.297 28.4c-0.221 0.701-0.973 1.089-1.673 0.871l-6.357-2.004c-0.34-0.108-0.617-0.34-0.781-0.656s-0.196-0.676-0.101-0.977l0.581-1.665 8.777 3.072zM28 27.453l-24-8.4v-8.728l24-7.2z"></path>\n</svg>\n'})),e("div",{key:"fe82c42f7586ba892f14ed7b1d2f85e19c508e8c",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.promotionalMsgs)),e("div",{key:"ec35e1a363a0802ab14a92b4bc8b858b9bf79c72",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.promotionalMsgsDesc)),e("div",{key:"cc0d65144cfffc7fc795f3b1dde9ae6d75e827ec",slot:"action",class:"s-user-settings-section-action"},e("label",{key:"945d030759a2ab27b9e9379d96f879d299b0a444",class:"s-toggle"},e("input",{key:"6dd35723f4e049263193d50d1488a300e26a166e",class:"s-toggle-input",checked:this.isNotifiable,onChange:s=>this.toggleSetting("is_notifiable",s),type:"checkbox"}),e("div",{key:"1f529a32b220a0a5ba673fe41573786450e4f1b8",class:"s-toggle-switcher"}))))),e("div",{key:"9973aa99cd3944ced8e87da05a3711b9cde5faa4",class:"s-user-settings-section s-user-settings-section-deactivate-user"},e("salla-list-tile",{key:"97ea806a1c5bc6e7f08ab04cdf555173d7e2c268"},e("div",{key:"fa98419cd6e11598c6e230ad462501f3dd66b975",slot:"icon",class:"s-user-settings-section-icon"},e("span",{key:"9bb7192d2bcdd942974a2a6e405878998e090f3c",innerHTML:t})),e("div",{key:"9e79bfd50311f2ec272bc6d90224d2f81c736d8e",slot:"title",class:"s-user-settings-section-title"},this.capitalizeText(this.deactivateAccount)),e("div",{key:"805696292b1354bf57b0f0252eabd031dc4ac5db",slot:"subtitle",class:"s-user-settings-section-subtitle"},this.capitalizeText(this.deactivateDesc)),e("div",{key:"4984f94d2eef4870036d1bea837cbe16e9978d84",slot:"action",class:"s-user-settings-section-action"},e("salla-button",{key:"7be1eaf49fdb3df86b953a14879695c0c2eae838",fill:"outline",color:"danger",shape:"btn",size:"medium",width:"normal",onClick:()=>this.openDeactivateModal()},this.capitalizeText(this.deactivateAccount))))),e("salla-modal",{key:"55608c2fbfd01c328f923316aa203ebd6539ef86",width:"sm",subTitle:this.capitalizeText(this.sorryForLeavingText),ref:s=>this.confirmationModal=s},e("span",{key:"247bb5555b3aa936ab4815f16ec332f6d922ab49",slot:"icon",class:"s-user-settings-confirmation-icon",innerHTML:t}),e("div",{key:"d8499d470dd0cce984687c9f6842970467b832a9",class:"s-user-settings-confirmation"},e("div",{key:"c4d98f4dc7591c53a0f4ab71fc1c7e0d446cebfc",class:"s-user-settings-confirmation-warning"},this.capitalizeText(this.warningText)),e("div",{key:"abebad572dab06b497451fff00a405e4c9db5652",class:"s-user-settings-confirmation-actions"},e("salla-button",{key:"bfde878cc657d975154f6e8b73220786b3898dbf",width:"wide",onClick:()=>this.confirmationModal.close()},this.capitalizeText(this.keepAccount)),e("salla-button",{key:"b3334a9b6fda2aa6de6f66f610efbba8ae95910f",fill:"outline",loading:this.buttonLoading,width:"wide",onClick:()=>this.deleteAccount()},this.capitalizeText(this.deactivateAccount))))))}};i.style="";export{i as salla_user_settings}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as e,H as i,a as t}from"./p-rIbWLXjW.js";function l(s,e){localStorage.getItem("salla-delivery-promise-debug")&&(void 0!==e?console.log(s,e):console.log(s))}function r(){const s=(Boolean(salla.config.get("store.settings.bullet_delivery.settings.remember_last_session"))?salla.storage.store:salla.storage.session).get("bullet_delivery_intent");return s&&"object"==typeof s?s:null}const a={deliveryTo:"توصيل إلى",pickupFromBranch:"الاستلام من فرع",noResults:"لا توجد نتائج",selectCity:"اختر المدينة",changeCityTitle:"تغيير المدينة",changeCitySubtitle:"",cityFieldLabel:"المدينة",modalSearchPlaceholder:"ابحث عن مدينة",confirmAddress:"تأكيد العنوان",errorDeliveryPromise:"لا يتوفر وعد تسليم لهذه المدينة",errorPickupPromise:"لا يتوفر وعد تسليم لهذا الفرع"};function o(s){const e=salla.config.get("user.language_code");return e&&"ar"!==e&&s.name_en?.trim()?s.name_en.trim():s.name}const n=class{constructor(e){s(this,e),this.isDeliveryPromiseEnabled=!1,this.isLoginCycleEnabled=!1,this.canRender=!1,this.labels=a,this.selectedLabel=null,this.deliveryMessage=null,this.hasError=!1,this.errorMessage="",this.isLoadingPromises=!1,this.selectedCityLoginCycle=null,this.selectedBranchLoginCycle=null,this.cities=[],this.selectedCity=null,this.isLoadingCities=!1,this.modalSearchQuery="",this.cityPendingSelection=null,this.isCityPopoverOpen=!1,this.onBulletDeliveryConfirmed=()=>{this.applyBulletIntent()},this.handleModalSearchInput=s=>{this.modalSearchQuery=s.target.value,this.isCityPopoverOpen=!0},this.handleModalComboboxActivate=()=>{this.isCityPopoverOpen=!0},this.handleHeaderClick=s=>{s.stopPropagation(),this.isLoginCycleEnabled?this.openBulletDeliveryModal():this.openCityChangeModal()}}async componentDidLoad(){await salla.onReady(),await salla.lang.onLoaded(),this.labels={deliveryTo:salla.lang.getWithDefault("pages.products.promise_deliver_to",a.deliveryTo),pickupFromBranch:salla.lang.getWithDefault("pages.products.promise_pickup_from_branch",a.pickupFromBranch),noResults:salla.lang.getWithDefault("common.elements.no_options",a.noResults),selectCity:salla.lang.getWithDefault("common.elements.select_city",a.selectCity),changeCityTitle:salla.lang.getWithDefault("pages.products.promise_change_city_title",a.changeCityTitle),changeCitySubtitle:salla.lang.getWithDefault("pages.products.promise_change_city_subtitle","قد تتغيّر مدة التوصيل حسب المدينة."),cityFieldLabel:salla.lang.getWithDefault("pages.products.promise_city_field",a.cityFieldLabel),modalSearchPlaceholder:salla.lang.getWithDefault("pages.products.promise_search_city",a.modalSearchPlaceholder),confirmAddress:salla.lang.getWithDefault("pages.checkout.confirm_address",a.confirmAddress),errorDeliveryPromise:salla.lang.getWithDefault("pages.products.promise_delivery_not_available",a.errorDeliveryPromise),errorPickupPromise:salla.lang.getWithDefault("pages.products.promise_pickup_not_available",a.errorPickupPromise)},this.isDeliveryPromiseEnabled=salla.config.get("store.features",[]).includes("delivery-promises"),this.isLoginCycleEnabled=salla.config.get("store.features",[]).includes("bullet-delivery-v2"),this.productId=salla.config.get("page.id"),this.isDeliveryPromiseEnabled?this.isLoginCycleEnabled?(this.applyBulletIntent(),this.canRender=!0,window.addEventListener("bulletDeliveryConfirmed",this.onBulletDeliveryConfirmed)):(this.selectedLabel=`${this.labels.deliveryTo} ${this.labels.selectCity}`,await this.loadCities()):this.canRender=!1}disconnectedCallback(){window.removeEventListener("bulletDeliveryConfirmed",this.onBulletDeliveryConfirmed)}applyBulletIntent(){const s=function(){const s=r();if(!s)return null;if("address"===s.type){const e=s.address_details?.city,i=null!=e?.id?Number(e.id):null!=s.city_id?Number(s.city_id):null,t=e?.name?.trim()||"";return null!=i?{type:"address",option:{id:i,name:t}}:null}if("branch"===s.type){const e=null!=s.branch_id?Number(s.branch_id):null!=s.branch_details?.id?Number(s.branch_details.id):null,i=s.branch_details?.name?.trim()||"";return null!=e?{type:"branch",option:{id:e,name:i}}:null}return null}();if(!s)return this.selectedLabel=`${this.labels.deliveryTo} ${this.labels.selectCity}`,this.selectedCityLoginCycle=null,this.selectedBranchLoginCycle=null,void(this.deliveryMessage=null);"address"===s.type?(this.selectedCityLoginCycle=s.option,this.selectedBranchLoginCycle=null,this.selectedLabel=`${this.labels.deliveryTo} ${s.option.name||this.labels.selectCity}`,this.loadDeliveryMessage(s.option.id,"city")):(this.selectedBranchLoginCycle=s.option,this.selectedCityLoginCycle=null,this.selectedLabel=`${this.labels.pickupFromBranch} ${s.option.name}`,this.loadDeliveryMessage(s.option.id,"branch"))}openBulletDeliveryModal(){salla.event.emit("bullet-delivery::open",function(){const s=r(),e={};if("address"===s?.type&&null!=s.address_id&&(e.preselected_address_id=Number(s.address_id)),"branch"===s?.type){const i=s.branch_id??s.branch_details?.id;null!=i&&(e.preselected_branch_id=Number(i))}return e}())}async loadCities(){this.isLoadingCities=!0,this.hasError=!1;try{const{cities:s,preselected:e}=await async function(s){l("fetchCities start",{productId:s});const e=await salla.api.request(salla.url.api(`products/${s}/delivery-promises/cities`));if(!e.success||!Array.isArray(e.data)||0===e.data.length)return l("fetchCities: no data",{response:e}),{cities:[],preselected:void 0};const i=e.data.find((s=>s.is_selected));return l("fetchCities success",{count:e.data.length,preselected:i}),{cities:e.data,preselected:i}}(this.productId);if(0===s.length)return void(this.canRender=!1);this.cities=s,e&&(this.selectedCity=e,this.selectedLabel=`${this.labels.deliveryTo} ${o(e)}`,await this.loadDeliveryMessage(e.id,"city")),this.canRender=!0}catch(s){this.hasError=!0,this.errorMessage=s.message||"Failed to load cities",this.canRender=!1}finally{this.isLoadingCities=!1}}async loadDeliveryMessage(s,e){this.isLoadingPromises=!0,this.hasError=!1,this.deliveryMessage=null;try{this.deliveryMessage=await async function(s,e,i,t){l("fetchDeliveryMessage start",{productId:s,id:e,optionType:i});let r="";r="city"!==i||t?`?reference_id=${e}&reference_type=${i}`:`?reference_id=${e}`;const a=await salla.api.withoutNotifier((()=>salla.api.request(salla.url.api(`products/${s}/delivery-promises${r}`))));if(!a.success)throw l("fetchDeliveryMessage error",{response:a}),new Error(a.error?.message||"Failed to fetch delivery promise");const o=a.data?.message?.trim();return l("fetchDeliveryMessage success",{message:o}),o||null}(this.productId,s,e,this.isLoginCycleEnabled)}catch(s){this.hasError=!0,this.errorMessage="city"===e?this.labels.errorDeliveryPromise:this.labels.errorPickupPromise}finally{this.isLoadingPromises=!1}}async openCityChangeModal(){this.cityModalRef&&(this.cityPendingSelection=null,this.modalSearchQuery="",this.isCityPopoverOpen=!1,await this.cityModalRef.setTitle(this.labels.changeCityTitle),await this.cityModalRef.open())}handleModalSelectCity(s){this.cityPendingSelection=s,this.modalSearchQuery=o(s),this.isCityPopoverOpen=!1}async handleConfirmCityModal(){if(!this.cityPendingSelection)return void await(this.cityModalRef?.close());const s=this.cityPendingSelection;this.selectedCity=s,this.selectedLabel=`${this.labels.deliveryTo} ${o(s)}`,await this.loadDeliveryMessage(s.id,"city"),await(this.cityModalRef?.close())}renderLoadingSkeleton(){return e(i,{class:"s-delivery-promise-wrapper s-delivery-promise-skeleton"},e("div",{class:"s-delivery-promise-container"},e("div",{class:"s-delivery-promise-header s-delivery-promise-header-skeleton"},e("div",{class:"s-delivery-promise-location"},e("salla-skeleton",{height:"14px",width:"180px"})),e("salla-skeleton",{height:"18px",width:"18px"})),e("div",{class:"s-delivery-promise-loading"},e("salla-skeleton",{height:"20px",width:"80%"}))))}renderDeliveryMessage(){return this.isLoadingPromises?e("div",{class:"s-delivery-promise-loading"},e("salla-skeleton",{height:"20px",width:"80%"})):this.deliveryMessage?e("div",{class:"s-delivery-promise-message"},this.deliveryMessage):null}renderCityModalBody(){const s=function(s,e){const i=e.trim().toLowerCase();return i?s.filter((s=>s.name.toLowerCase().includes(i)||(s.name_en||"").toLowerCase().includes(i))):[...s]}(this.cities,this.modalSearchQuery);return e("div",{class:"s-delivery-promise-modal-body"},e("label",{class:"s-delivery-promise-modal-field-label",htmlFor:"s-delivery-promise-modal-search"},this.labels.cityFieldLabel,e("span",{class:"s-delivery-promise-required","aria-hidden":"true"}," *")),e("div",{class:"s-delivery-promise-modal-combobox"},e("div",{class:"s-delivery-promise-modal-search",onClick:this.handleModalComboboxActivate},e("i",{class:"sicon-search","aria-hidden":"true"}),e("input",{id:"s-delivery-promise-modal-search",type:"text",class:"form-input",placeholder:this.labels.modalSearchPlaceholder,value:this.modalSearchQuery,onInput:this.handleModalSearchInput,autocomplete:"off","aria-autocomplete":"list","aria-expanded":this.isCityPopoverOpen?"true":"false","aria-controls":"s-delivery-promise-modal-listbox"})),e("div",{id:"s-delivery-promise-modal-listbox",class:"s-delivery-promise-modal-popover",role:"listbox",hidden:!this.isCityPopoverOpen},e("div",{class:"s-delivery-promise-modal-list s-scrollbar"},0===s.length?e("div",{class:"s-delivery-promise-modal-empty"},this.labels.noResults):s.map((s=>e("button",{key:s.id,type:"button",role:"option",class:{"s-delivery-promise-modal-item":!0,"s-delivery-promise-modal-item--selected":this.cityPendingSelection?.id===s.id},"aria-selected":this.cityPendingSelection?.id===s.id?"true":"false",onClick:e=>{e.stopPropagation(),this.handleModalSelectCity(s)}},e("span",{class:"s-delivery-promise-modal-item-name"},s.name),this.cityPendingSelection?.id===s.id?e("i",{class:"sicon-check","aria-hidden":"true"}):null)))))))}renderCityChangeModal(){return this.isLoginCycleEnabled?null:e("salla-modal",{id:"s-delivery-promise-city-modal",ref:s=>{this.cityModalRef=s},class:"s-delivery-promise-city-modal",isClosable:!0,width:"md","modal-title":this.labels.changeCityTitle,subTitle:this.labels.changeCitySubtitle},this.renderCityModalBody(),e("salla-button",{slot:"footer",width:"wide",disabled:!this.cityPendingSelection,onClick:()=>this.handleConfirmCityModal()},!this.isLoadingPromises&&this.labels.confirmAddress))}render(){return this.isDeliveryPromiseEnabled?this.isLoadingCities?this.renderLoadingSkeleton():this.canRender?e(i,{class:"s-delivery-promise-wrapper"},e("div",{class:"s-delivery-promise-container"},e("div",{class:"s-delivery-promise-header",onClick:this.handleHeaderClick},e("div",{class:"s-delivery-promise-location"},e("span",{class:"s-delivery-promise-title"},this.selectedLabel)),e("i",{class:"sicon-keyboard_arrow_down s-delivery-promise-arrow"})),this.hasError&&e("div",{class:"s-delivery-promise-error"},this.errorMessage),!this.hasError&&this.renderDeliveryMessage()),this.renderCityChangeModal()):null:null}get host(){return t(this)}};export{n as salla_delivery_promise}
|
|
4
|
+
import{r as s,h as e,H as i,a as t}from"./p-eYsXdqjv.js";function l(s,e){localStorage.getItem("salla-delivery-promise-debug")&&(void 0!==e?console.log(s,e):console.log(s))}function r(){const s=(Boolean(salla.config.get("store.settings.bullet_delivery.settings.remember_last_session"))?salla.storage.store:salla.storage.session).get("bullet_delivery_intent");return s&&"object"==typeof s?s:null}const a={deliveryTo:"توصيل إلى",pickupFromBranch:"الاستلام من فرع",noResults:"لا توجد نتائج",selectCity:"اختر المدينة",changeCityTitle:"تغيير المدينة",changeCitySubtitle:"",cityFieldLabel:"المدينة",modalSearchPlaceholder:"ابحث عن مدينة",confirmAddress:"تأكيد العنوان",errorDeliveryPromise:"لا يتوفر وعد تسليم لهذه المدينة",errorPickupPromise:"لا يتوفر وعد تسليم لهذا الفرع"};function o(s){const e=salla.config.get("user.language_code");return e&&"ar"!==e&&s.name_en?.trim()?s.name_en.trim():s.name}const n=class{constructor(e){s(this,e),this.isDeliveryPromiseEnabled=!1,this.isLoginCycleEnabled=!1,this.canRender=!1,this.labels=a,this.selectedLabel=null,this.deliveryMessage=null,this.hasError=!1,this.errorMessage="",this.isLoadingPromises=!1,this.selectedCityLoginCycle=null,this.selectedBranchLoginCycle=null,this.cities=[],this.selectedCity=null,this.isLoadingCities=!1,this.modalSearchQuery="",this.cityPendingSelection=null,this.isCityPopoverOpen=!1,this.onBulletDeliveryConfirmed=()=>{this.applyBulletIntent()},this.handleModalSearchInput=s=>{this.modalSearchQuery=s.target.value,this.isCityPopoverOpen=!0},this.handleModalComboboxActivate=()=>{this.isCityPopoverOpen=!0},this.handleHeaderClick=s=>{s.stopPropagation(),this.isLoginCycleEnabled?this.openBulletDeliveryModal():this.openCityChangeModal()}}async componentDidLoad(){await salla.onReady(),await salla.lang.onLoaded(),this.labels={deliveryTo:salla.lang.getWithDefault("pages.products.promise_deliver_to",a.deliveryTo),pickupFromBranch:salla.lang.getWithDefault("pages.products.promise_pickup_from_branch",a.pickupFromBranch),noResults:salla.lang.getWithDefault("common.elements.no_options",a.noResults),selectCity:salla.lang.getWithDefault("common.elements.select_city",a.selectCity),changeCityTitle:salla.lang.getWithDefault("pages.products.promise_change_city_title",a.changeCityTitle),changeCitySubtitle:salla.lang.getWithDefault("pages.products.promise_change_city_subtitle","قد تتغيّر مدة التوصيل حسب المدينة."),cityFieldLabel:salla.lang.getWithDefault("pages.products.promise_city_field",a.cityFieldLabel),modalSearchPlaceholder:salla.lang.getWithDefault("pages.products.promise_search_city",a.modalSearchPlaceholder),confirmAddress:salla.lang.getWithDefault("pages.checkout.confirm_address",a.confirmAddress),errorDeliveryPromise:salla.lang.getWithDefault("pages.products.promise_delivery_not_available",a.errorDeliveryPromise),errorPickupPromise:salla.lang.getWithDefault("pages.products.promise_pickup_not_available",a.errorPickupPromise)},this.isDeliveryPromiseEnabled=salla.config.get("store.features",[]).includes("delivery-promises"),this.isLoginCycleEnabled=salla.config.get("store.features",[]).includes("bullet-delivery-v2"),this.productId=salla.config.get("page.id"),this.isDeliveryPromiseEnabled?this.isLoginCycleEnabled?(this.applyBulletIntent(),this.canRender=!0,window.addEventListener("bulletDeliveryConfirmed",this.onBulletDeliveryConfirmed)):(this.selectedLabel=`${this.labels.deliveryTo} ${this.labels.selectCity}`,await this.loadCities()):this.canRender=!1}disconnectedCallback(){window.removeEventListener("bulletDeliveryConfirmed",this.onBulletDeliveryConfirmed)}applyBulletIntent(){const s=function(){const s=r();if(!s)return null;if("address"===s.type){const e=s.address_details?.city,i=null!=e?.id?Number(e.id):null!=s.city_id?Number(s.city_id):null,t=e?.name?.trim()||"";return null!=i?{type:"address",option:{id:i,name:t}}:null}if("branch"===s.type){const e=null!=s.branch_id?Number(s.branch_id):null!=s.branch_details?.id?Number(s.branch_details.id):null,i=s.branch_details?.name?.trim()||"";return null!=e?{type:"branch",option:{id:e,name:i}}:null}return null}();if(!s)return this.selectedLabel=`${this.labels.deliveryTo} ${this.labels.selectCity}`,this.selectedCityLoginCycle=null,this.selectedBranchLoginCycle=null,void(this.deliveryMessage=null);"address"===s.type?(this.selectedCityLoginCycle=s.option,this.selectedBranchLoginCycle=null,this.selectedLabel=`${this.labels.deliveryTo} ${s.option.name||this.labels.selectCity}`,this.loadDeliveryMessage(s.option.id,"city")):(this.selectedBranchLoginCycle=s.option,this.selectedCityLoginCycle=null,this.selectedLabel=`${this.labels.pickupFromBranch} ${s.option.name}`,this.loadDeliveryMessage(s.option.id,"branch"))}openBulletDeliveryModal(){salla.event.emit("bullet-delivery::open",function(){const s=r(),e={};if("address"===s?.type&&null!=s.address_id&&(e.preselected_address_id=Number(s.address_id)),"branch"===s?.type){const i=s.branch_id??s.branch_details?.id;null!=i&&(e.preselected_branch_id=Number(i))}return e}())}async loadCities(){this.isLoadingCities=!0,this.hasError=!1;try{const{cities:s,preselected:e}=await async function(s){l("fetchCities start",{productId:s});const e=await salla.api.request(salla.url.api(`products/${s}/delivery-promises/cities`));if(!e.success||!Array.isArray(e.data)||0===e.data.length)return l("fetchCities: no data",{response:e}),{cities:[],preselected:void 0};const i=e.data.find((s=>s.is_selected));return l("fetchCities success",{count:e.data.length,preselected:i}),{cities:e.data,preselected:i}}(this.productId);if(0===s.length)return void(this.canRender=!1);this.cities=s,e&&(this.selectedCity=e,this.selectedLabel=`${this.labels.deliveryTo} ${o(e)}`,await this.loadDeliveryMessage(e.id,"city")),this.canRender=!0}catch(s){this.hasError=!0,this.errorMessage=s.message||"Failed to load cities",this.canRender=!1}finally{this.isLoadingCities=!1}}async loadDeliveryMessage(s,e){this.isLoadingPromises=!0,this.hasError=!1,this.deliveryMessage=null;try{this.deliveryMessage=await async function(s,e,i,t){l("fetchDeliveryMessage start",{productId:s,id:e,optionType:i});let r="";r="city"!==i||t?`?reference_id=${e}&reference_type=${i}`:`?reference_id=${e}`;const a=await salla.api.withoutNotifier((()=>salla.api.request(salla.url.api(`products/${s}/delivery-promises${r}`))));if(!a.success)throw l("fetchDeliveryMessage error",{response:a}),new Error(a.error?.message||"Failed to fetch delivery promise");const o=a.data?.message?.trim();return l("fetchDeliveryMessage success",{message:o}),o||null}(this.productId,s,e,this.isLoginCycleEnabled)}catch(s){this.hasError=!0,this.errorMessage="city"===e?this.labels.errorDeliveryPromise:this.labels.errorPickupPromise}finally{this.isLoadingPromises=!1}}async openCityChangeModal(){this.cityModalRef&&(this.cityPendingSelection=null,this.modalSearchQuery="",this.isCityPopoverOpen=!1,await this.cityModalRef.setTitle(this.labels.changeCityTitle),await this.cityModalRef.open())}handleModalSelectCity(s){this.cityPendingSelection=s,this.modalSearchQuery=o(s),this.isCityPopoverOpen=!1}async handleConfirmCityModal(){if(!this.cityPendingSelection)return void await(this.cityModalRef?.close());const s=this.cityPendingSelection;this.selectedCity=s,this.selectedLabel=`${this.labels.deliveryTo} ${o(s)}`,await this.loadDeliveryMessage(s.id,"city"),await(this.cityModalRef?.close())}renderLoadingSkeleton(){return e(i,{class:"s-delivery-promise-wrapper s-delivery-promise-skeleton"},e("div",{class:"s-delivery-promise-container"},e("div",{class:"s-delivery-promise-header s-delivery-promise-header-skeleton"},e("div",{class:"s-delivery-promise-location"},e("salla-skeleton",{height:"14px",width:"180px"})),e("salla-skeleton",{height:"18px",width:"18px"})),e("div",{class:"s-delivery-promise-loading"},e("salla-skeleton",{height:"20px",width:"80%"}))))}renderDeliveryMessage(){return this.isLoadingPromises?e("div",{class:"s-delivery-promise-loading"},e("salla-skeleton",{height:"20px",width:"80%"})):this.deliveryMessage?e("div",{class:"s-delivery-promise-message"},this.deliveryMessage):null}renderCityModalBody(){const s=function(s,e){const i=e.trim().toLowerCase();return i?s.filter((s=>s.name.toLowerCase().includes(i)||(s.name_en||"").toLowerCase().includes(i))):[...s]}(this.cities,this.modalSearchQuery);return e("div",{class:"s-delivery-promise-modal-body"},e("label",{class:"s-delivery-promise-modal-field-label",htmlFor:"s-delivery-promise-modal-search"},this.labels.cityFieldLabel,e("span",{class:"s-delivery-promise-required","aria-hidden":"true"}," *")),e("div",{class:"s-delivery-promise-modal-combobox"},e("div",{class:"s-delivery-promise-modal-search",onClick:this.handleModalComboboxActivate},e("i",{class:"sicon-search","aria-hidden":"true"}),e("input",{id:"s-delivery-promise-modal-search",type:"text",class:"form-input",placeholder:this.labels.modalSearchPlaceholder,value:this.modalSearchQuery,onInput:this.handleModalSearchInput,autocomplete:"off","aria-autocomplete":"list","aria-expanded":this.isCityPopoverOpen?"true":"false","aria-controls":"s-delivery-promise-modal-listbox"})),e("div",{id:"s-delivery-promise-modal-listbox",class:"s-delivery-promise-modal-popover",role:"listbox",hidden:!this.isCityPopoverOpen},e("div",{class:"s-delivery-promise-modal-list s-scrollbar"},0===s.length?e("div",{class:"s-delivery-promise-modal-empty"},this.labels.noResults):s.map((s=>e("button",{key:s.id,type:"button",role:"option",class:{"s-delivery-promise-modal-item":!0,"s-delivery-promise-modal-item--selected":this.cityPendingSelection?.id===s.id},"aria-selected":this.cityPendingSelection?.id===s.id?"true":"false",onClick:e=>{e.stopPropagation(),this.handleModalSelectCity(s)}},e("span",{class:"s-delivery-promise-modal-item-name"},s.name),this.cityPendingSelection?.id===s.id?e("i",{class:"sicon-check","aria-hidden":"true"}):null)))))))}renderCityChangeModal(){return this.isLoginCycleEnabled?null:e("salla-modal",{id:"s-delivery-promise-city-modal",ref:s=>{this.cityModalRef=s},class:"s-delivery-promise-city-modal",isClosable:!0,width:"md","modal-title":this.labels.changeCityTitle,subTitle:this.labels.changeCitySubtitle},this.renderCityModalBody(),e("salla-button",{slot:"footer",width:"wide",disabled:!this.cityPendingSelection,onClick:()=>this.handleConfirmCityModal()},!this.isLoadingPromises&&this.labels.confirmAddress))}render(){return this.isDeliveryPromiseEnabled?this.isLoadingCities?this.renderLoadingSkeleton():this.canRender?e(i,{class:"s-delivery-promise-wrapper"},e("div",{class:"s-delivery-promise-container"},e("div",{class:"s-delivery-promise-header",onClick:this.handleHeaderClick},e("div",{class:"s-delivery-promise-location"},e("span",{class:"s-delivery-promise-title"},this.selectedLabel)),e("i",{class:"sicon-keyboard_arrow_down s-delivery-promise-arrow"})),this.hasError&&e("div",{class:"s-delivery-promise-error"},this.errorMessage),!this.hasError&&this.renderDeliveryMessage()),this.renderCityChangeModal()):null:null}get host(){return t(this)}};export{n as salla_delivery_promise}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{h as a,r as l}from"./p-
|
|
4
|
+
import{h as a,r as l}from"./p-eYsXdqjv.js";import{s}from"./p-B-Rj6b9M.js";import{n as t,c as e}from"./p-Bt5MNLrr.js";import{S as i}from"./p-D4oPi1Ov.js";import{S as r}from"./p-8Tsmrwno.js";import{S as o,a as n}from"./p-Bs6JxDkg.js";import{S as p}from"./p-CZRcMGA9.js";import{S as c}from"./p-D1s2kXqL.js";import{T as d}from"./p-4rGFyB1b.js";var h=function(a,l,s,t){var e,i=arguments.length,r=i<3?l:null===t?t=Object.getOwnPropertyDescriptor(l,s):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,l,s,t);else for(var o=a.length-1;o>=0;o--)(e=a[o])&&(r=(i<3?e(r):i>3?e(l,s,r):e(l,s))||r);return i>3&&r&&Object.defineProperty(l,s,r),r};const y={all:a("span",{class:"s-loyalty-program-rewards-tab-icon",innerHTML:n}),free_shipping:a("span",{class:"s-loyalty-program-rewards-tab-icon",innerHTML:p}),coupon_discount:a("span",{class:"s-loyalty-program-rewards-tab-icon",innerHTML:o}),free_product:a("span",{class:"s-loyalty-program-rewards-tab-icon",innerHTML:c})},m=class{constructor(a){l(this,a),this.currentPrize=null,this.handleExchangeSucceeded=()=>window.location.reload(),this.handleResetSucceeded=()=>window.location.reload()}componentWillLoad(){return salla.onReady().then((()=>salla.lang.onLoaded())).then((()=>s())).then((()=>{salla.event.on("loyalty::exchange.succeeded",this.handleExchangeSucceeded),salla.event.on("loyalty::exchange-reset.succeeded",this.handleResetSucceeded),salla.config.isGuest()||this.points()})).catch((a=>salla.logger.error(a)))}disconnectedCallback(){salla.event.off("loyalty::exchange.succeeded",this.handleExchangeSucceeded),salla.event.off("loyalty::exchange-reset.succeeded",this.handleResetSucceeded)}render(){const l=this.program.data.prizes,s=this.program.data.prizes_count,t="pending"!==this.points.status||null!==this.points.data||this.customerPoints?this.points.data??this.customerPoints??0:"---";return this.prizeTitle&&this.prizePoints?a("div",{class:"s-loyalty-program-panel-exchange-wrapper"},a("salla-list-tile",{class:"s-loyalty-program-after-exchange"},a("div",{slot:"title",class:"s-loyalty-program-after-exchange-title"},this.prizeTitle," - ",this.prizePoints," ",salla.lang.get("pages.loyalty_program.point")),a("div",{slot:"action",class:"s-loyalty-program-after-exchange-action"},a("salla-button",{class:"s-loyalty-program-after-exchange-reset",shape:"icon",fill:"outline",color:"danger",size:"small",onClick:()=>salla.loyalty.reset()},a("span",{innerHTML:r}))))):a("div",{class:""},a("div",{class:"s-loyalty-program-panel-exchange-wrapper"},a("salla-list-tile",{class:"s-loyalty-program-panel-widget"},a("div",{slot:"icon",class:"s-loyalty-program-panel-widget-icon",innerHTML:i}),a("div",{slot:"subtitle"},salla.lang.get("pages.loyalty_program.cart_total_point_summary",{balance:t}),a("salla-button",{shape:"link",color:"primary",onClick:()=>{["error","idle"].includes(this.program.status)&&this.program(),this.rewardsModal.open()}},"---"!==t&&t?salla.lang.get("pages.loyalty_program.cart_point_exchange_now"):salla.lang.get("blocks.header.login"))))),a("salla-modal",{id:"loyalty-rewards-modal",isLoading:"pending"===this.program.status,ref:a=>this.rewardsModal=a,class:"s-loyalty-program-rewards-cart s-loyalty-program-modal",width:"lg",noPadding:!0},a("div",{slot:"loading"},a("salla-loading",null)),"success"===this.program.status?a("div",{class:"s-loyalty-program-rewards-container-cart"},a("div",{class:"s-loyalty-program-rewards-cart-header"},a("div",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="77" height="77" fill="none" viewBox="0 0 57 57"><rect width="56.3" height="55.9" x=".4" y=".2" fill="#FFF5E5" rx="27.9"/><g clip-path="url(#a)"><path fill="#EE9D0D" d="M16.7 27.5h17.5v12.2a1 1 0 0 1-1 1H17.7a1 1 0 0 1-1-1V27.5Z"/><path fill="#C7830B" d="M34.2 27.8v6l-6.8-6.3H34l.3.3Z"/><path fill="#C7830B" d="M34.2 32.3v1.5l-1.6-1.5h1.6Z"/><path fill="#EA2B2D" d="m29.9 15.8-.3.1a2.4 2.4 0 0 0-1.4 1.5l-.2.8-.4.2a2.4 2.4 0 0 0-1.1 1.4l4.2 3.9L33 21l.2-2.9a2.4 2.4 0 0 0-3.3-2.4ZM41.1 26.3v.2a2.4 2.4 0 0 1-1.5 1.6l-.7.3-.2.3a2.4 2.4 0 0 1-1.3 1.3l-4.2-4 2.4-2.5 2.9-.3a2.4 2.4 0 0 1 2.6 3.1Z"/><path fill="#CB2527" d="M23.7 27.5h3.5v13.1h-3.5V27.5Z"/><path fill="#EA2B2D" d="M16.7 32.3h17.5v3.5H16.7v-3.5Z"/><path fill="#CB2527" d="M34.2 32.3v1.5l-1.6-1.5h1.6Z"/><path fill="#EE9D0D" d="M25.3 18.7 38.6 31a1 1 0 0 1 0 1.4l-2.3 2.4-14.7-13.7 2.3-2.5a1 1 0 0 1 1.4 0Z"/><path fill="#CB2527" d="m30.3 23.4 3.2 3-3 3.2-3.2-3 3-3.2ZM31.8 22.8a.4.4 0 0 1-.3-.1l-.3-.4A5.9 5.9 0 0 1 30 18a.4.4 0 0 1 .9 0 5 5 0 0 0 1 3.7l.3.3a.4.4 0 0 1-.4.7Z"/><path fill="#EA2B2D" d="M30.7 23.7c-1.9.7-3.8 1-5.7.9h-1.1l1.9 1.7-.6 1.9 1.8-.6c1.7-.5 3.2-1.4 4.6-2.5l.3-.2-1.2-1.2Z"/><path fill="#CB2527" d="M37.8 26.4c-1.1 0-2.3-.3-3.2-1l-.4-.2a.4.4 0 0 1 0-.8.4.4 0 0 1 .5 0l.3.3a5 5 0 0 0 3.7.7.4.4 0 1 1 .2 1 6 6 0 0 1-1 0Z"/><path fill="#EA2B2D" d="M33.2 26c-.5 2-.7 3.9-.5 5.8l.1 1.1-1.9-1.8-1.8.7.4-1.8c.4-1.7 1.2-3.3 2.2-4.8l.2-.3 1.3 1.2Z"/><path fill="#6699CE" d="M21.5 17.4a.9.9 0 1 0 0-1.7.9.9 0 0 0 0 1.7Z"/><path fill="#FAA6B2" d="M16.7 27.5a.9.9 0 1 0 0-1.8.9.9 0 0 0 0 1.8Z"/><path fill="#A6DEFF" d="M18.4 17.9a.4.4 0 0 1-.4-.3v-.1a1.4 1.4 0 0 0-1.3-1 .4.4 0 0 1-.2-.8h.2a2.3 2.3 0 0 1 2.1 1.5.4.4 0 0 1-.4.7ZM20.6 25.6h-.2v-.1a1 1 0 0 0-1.1 0 .4.4 0 0 1-.5-.8 1.8 1.8 0 0 1 2 0 .4.4 0 0 1-.2.9Z"/><path fill="#EEB436" d="m17.6 18.6 1.3 1.2 1.8-.4-.7 1.7.9 1.6-1.8-.2-1.2 1.3-.4-1.8-1.7-.7 1.6-.9.2-1.8ZM23 26.6l-.5 1.8 1.2 1.3-1.8.2-1 1.5-.6-1.7-1.8-.4 1.4-1.1-.2-1.9 1.6 1 1.6-.7Z"/><path fill="#F72D2F" d="m33.2 26-2.5-2.3L33 21a4 4 0 0 1 2.6 2.4l-2.4 2.6Z"/></g><defs><clipPath id="a"><path fill="#fff" d="M15.8 15.7h25.4v25H15.8z"/></clipPath></defs></svg>'}),a("div",{class:"s-loyalty-program-panel-content"},a("h1",null,this.program.data.prize_promotion_title),a("p",null,this.program.data.prize_promotion_description))),a("div",{class:{"s-loyalty-program-slider-arrows":!0,"s-loyalty-program-tabs-hider":l.length<2||s<2}},a("salla-tabs",null,l.map((l=>a("salla-tab-header",{slot:"header",name:l.type},y[l.type],a("span",null,l.title)))),l.map((l=>a("salla-tab-content",{slot:"content",name:l.type},a("salla-slider",{id:l.type,type:"default","slider-config":'{"loop":false,"slidesPerView":"auto","freeMode":true,"spaceBetween":12,"breakpoints":{"768":{"slidesPerView":3,"spaceBetween":24,"freeMode":false,"speed":300}}}'},a("div",{slot:"items"},l.items.map((l=>a("salla-reward-card",{prize:l,onAreaClick:()=>{this.currentPrize=l,e((()=>this.detailsModal.open()))},onActionClick:()=>{this.currentPrize=l,e((()=>this.detailsModal.open()))}}))))))))))):""),a("salla-modal",{ref:a=>this.detailsModal=a,class:"s-loyalty-program-modal",width:"md",noPadding:!0},this.currentPrize?a("salla-reward-details",{onActionClick:()=>e((()=>this.exchangeModal.open())),prize:this.currentPrize}):""),a("salla-modal",{ref:a=>this.exchangeModal=a,class:"s-loyalty-program-modal",width:"sm"},this.currentPrize?a("salla-reward-exchange",{prize:this.currentPrize}):""))}};h([d((async()=>{const{data:a}=await salla.loyalty.getProgram();return t(a)}),{initialData:{prizes:[],prizes_count:0}})],m.prototype,"program",void 0),h([d((async()=>{const{data:a}=await salla.loyalty.getPoints();return a.points}),{initialData:null})],m.prototype,"points",void 0),m.style="";export{m as salla_loyalty_panel}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as o,a as e}from"./p-
|
|
4
|
+
import{r as t,h as o,a as e}from"./p-eYsXdqjv.js";const i=class{constructor(o){t(this,o),this.theme="default",this.show=!1,this.targetElement=null}handleMouseOver(t){this.targetElement&&this.targetElement.contains(t.target)&&(this.show=!0)}handleMouseOut(t){this.targetElement&&this.targetElement.contains(t.target)&&(this.show=!1)}componentDidLoad(){this.targetElement=document.getElementById(this.targetId)}render(){const t=["default","dark"].includes(this.theme)?this.theme:"default";return o("div",{key:"e5e8f78265e0abb1d4130fd084573c6cff1ecb2c",class:"s-tooltip-container"},o("div",{key:"4dc98906dfd28c6e2d97b51329c07046eb15179c",class:`s-tooltip-item s-tooltip-item--${t}`,style:{display:this.show?"block":"none"}},this.text?o("span",null,this.text):o("slot",null)))}get el(){return e(this)}};i.style='.s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:"";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){transform:translateX(-72%)}.s-tooltip-item--dark{background-color:#555555;color:white;padding:5px 15px;border-radius:8px;font-size:12px;font-weight:normal;max-width:330px;width:max-content}.s-tooltip-item--dark::after{border-color:#555555 transparent transparent transparent}';export{i as salla_tooltip}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as a,H as t,a as l}from"./p-
|
|
4
|
+
import{r as s,h as a,H as t,a as l}from"./p-eYsXdqjv.js";const i=class{constructor(a){s(this,a),this.apps=salla.config.get("store.apps"),this.appSlot=this.host.querySelector('[slot="app"]')?.innerHTML||'<img alt="{name}" src="{icon}" width="135" height="40" decoding="async" loading="lazy" />',salla.onReady((()=>{this.apps=salla.config.get("store.apps")})),salla.lang.onLoaded((()=>{this.appsTitle=salla.lang.get("blocks.footer.download_apps")}))}getAppsArray(){return Object.entries(this.apps).map((([s,a])=>({name:s,value:a})))}componentWillLoad(){return new Promise((s=>salla.onReady(s)))}render(){const s=this.getAppsArray();if(!Array.isArray(s)||s.length)return a(t,{class:"s-apps-icons"},!this.hideTitle&&a("h3",null,this.appsTitle),a("div",{class:{"s-apps-icons-list":!0,vertical:this.vertical}},s.map(((s,t)=>a("a",{key:t,href:s.value,rel:"noreferrer",target:"_blank",class:"s-apps-icons-item",id:"app-slot",innerHTML:this.appSlot.replace(/\{icon\}/g,salla.url.cdn(`images/${s.name}.png`)).replace(/\{name\}/g,s.name)})))))}componentDidRender(){this.host.querySelector('[slot="app"]')?.remove()}get host(){return l(this)}};i.style=":host{display:block}";export{i as salla_apps_icons}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,h as a,H as t,a as n}from"./p-
|
|
4
|
+
import{r as e,h as a,H as t,a as n}from"./p-eYsXdqjv.js";import{S as i}from"./p-8Tsmrwno.js";const r=class{constructor(a){e(this,a)}componentWillLoad(){this.title=salla.config.get("maintenance_details.title"),this.message=salla.config.get("maintenance_details.message");const e="undefined"!=typeof window&&!window.matchMedia("(min-width: 768px)").matches;this.buttonTitle=e?salla.config.get("maintenance_details.button_title"):salla.config.get("maintenance_details.button_full_title")}closeAlert(){salla.storage.set("hide_salla-maintenance-alert_at",Date.now()),this.host.style.display="none"}render(){return a(t,{key:"e76dcd0a076d1b72ead3398196f962713e975ce5",class:"s-maintenance-alert-wrapper"},a("button",{key:"2105bc891908dab5a1c9edec1c534a600bb35fe5",class:"s-maintenance-alert-close",innerHTML:i,onClick:()=>this.closeAlert()}),a("div",{key:"a01b014066fbbc08da96962ad9a0c98e24fddf1c",class:"s-maintenance-alert-content"},a("div",{key:"c8b6ac96a881fc40bdb65908bb309378035235ea",class:"s-maintenance-alert-container"},a("div",{key:"5d9fb2968315674e0d3a3172f82f9109db55da1d",class:"s-maintenance-alert-icon"},a("img",{key:"2649551a12d0958375a89cc1dcb8176b28f5e41f",src:salla.url.cdn("images/alert.png"),alt:"Alert"})),a("div",{key:"2b3f99a39857bcf87b034aa48074c1f4229bff95",class:"s-maintenance-alert-text"},a("h2",{key:"5a3c0969cd45f666a8bd043d171e00bc88031f3e"},this.title),a("p",{key:"d3df4ada2bf5f7192b22affeeb10edec481a0038"},this.message))),a("div",{key:"818d96f7680dc4b02fed14a2d8c09dab9b8e5d86"},a("a",{key:"794a0c273fc4d84b0319b38e11fb43af5681ce67",class:"s-maintenance-alert-btn",href:salla.config.get("maintenance_details.button_url")},this.buttonTitle))))}componentDidLoad(){let e=salla.storage.get("hide_salla-maintenance-alert_at");e&&(Date.now()-e)/1e3/60<60&&this.closeAlert()}get host(){return n(this)}};r.style=".s-maintenance-alert-wrapper{display:flex;min-height:40px;width:100%;flex-direction:row;align-items:center;justify-content:center;--tw-bg-opacity:1;background-color:rgba(26, 38, 61, var(--tw-bg-opacity));padding:0.25rem 0.5rem;--tw-text-opacity:1;color:rgba(255, 255, 255, var(--tw-text-opacity))}.s-maintenance-alert-wrapper a{transition:0.35s cubic-bezier(0.2, 1, 0.3, 1)}.s-maintenance-alert-wrapper *{color:inherit}@media (min-width: 640px){.s-maintenance-alert-wrapper{padding-left:2rem;padding-right:2rem}}.s-maintenance-alert-content{margin-top:1rem;margin-bottom:1rem;display:flex;width:100%;align-items:center;justify-content:space-between}@media (min-width: 640px){.s-maintenance-alert-content{padding-left:2rem;padding-right:2rem}}.s-maintenance-alert-container{display:flex;align-items:center}.s-maintenance-alert-icon{margin-right:1.25rem;display:none}@media (min-width: 640px){.s-maintenance-alert-icon{display:block}}.s-maintenance-alert-text h2{margin-bottom:0.5rem;font-size:0.875rem;font-weight:700;line-height:1.4}@media (min-width: 640px){.s-maintenance-alert-text h2{font-size:1.5rem;line-height:2rem}}.s-maintenance-alert-text p{margin:0px;text-align:right;font-size:10px;line-height:1.2}@media (min-width: 640px){.s-maintenance-alert-text p{text-align:center;font-size:0.75rem;line-height:1}}.s-maintenance-alert-btn{position:relative;margin-left:4px;margin-right:4px;display:inline-block;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;border-radius:0.125rem;border-width:1px;--tw-border-opacity:1;border-color:rgba(93, 213, 196, var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(93, 213, 196, var(--tw-bg-opacity));padding:0.5rem;text-align:center;vertical-align:middle;font-size:0.875rem;font-weight:400;line-height:1.4;--tw-text-opacity:1;color:rgba(255, 255, 255, var(--tw-text-opacity))}.s-maintenance-alert-btn:hover{--tw-bg-opacity:1;background-color:rgba(53, 203, 181, var(--tw-bg-opacity))}.s-maintenance-alert-btn *{pointer-events:none}[dir=rtl] .s-maintenance-alert-btn{margin-left:1.25rem;margin-right:0}@media (min-width: 640px){.s-maintenance-alert-btn{padding:0.5rem 1rem}}";export{r as salla_maintenance_alert}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as t}from"./p-
|
|
4
|
+
import{r as s,h as t}from"./p-eYsXdqjv.js";import{S as a}from"./p-BZp0rKEO.js";const e=class{constructor(t){s(this,t),this.codeCopied=null,this.noItemFound=!0,this.order_items=[],this.isDigitalCard=s=>"codes"===s.product.type,this.isDigitalProduct=s=>"digital"===s.product.type}async componentWillLoad(){return salla.lang.onLoaded((()=>{this.codes_text=salla.lang.get("pages.thank_you.codes"),this.copy_text=salla.lang.get("common.elements.copy"),this.files_text=salla.lang.get("pages.thank_you.files"),this.download_text=salla.lang.get("pages.thank_you.download")})),await this.getOrderItems()}copyToClipboardHandler(s){if(navigator&&"clipboard"in navigator)try{navigator.clipboard.writeText(s).then((()=>{this.codeCopied=s,this.copyCodeButtonTimeout=setTimeout((()=>{this.codeCopied=null}),3e3)}))}catch(s){salla.loggers.error("copy functionality is not supported by the browser")}}async getOrderItems(){const s=this.orderId||salla.config.get("page.id"),t="Failed to fetch order items";if(!s)throw salla.logger.error(t),new Error(t);try{const{data:{items:t=[]}}=await salla.api.request(`orders/${s}`);t.some((s=>this.isDigitalCard(s)||this.isDigitalProduct(s)))&&(this.order_items=t,this.noItemFound=!1)}catch(s){salla.logger.error(t)}}disconnectedCallback(){this.copyCodeButtonTimeout&&clearTimeout(this.copyCodeButtonTimeout)}render(){return t("ul",{key:"bb8c8e2c3a44f0922012789efc9a73d71fd213d5",class:"s-order-summary-wrapper"},this.noItemFound?t("salla-placeholder",{alignment:"center"},t("span",{slot:"title"})):this.order_items.map((s=>this.isDigitalCard(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.codes_text," (",s.name,")"),s.codes.map((s=>t("div",{key:s.code,class:"s-order-summary-code-item-wrapper"},t("p",null,t("span",{innerHTML:'\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>debit-card-back</title>\n<path d="M30 28h-28c-1.105 0-2-0.895-2-2v0-18c0-1.105 0.895-2 2-2v0h28c1.105 0 2 0.895 2 2v0 18c0 1.105-0.895 2-2 2v0zM30 26v0zM2 8v18h28v-18zM31 14h-30c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h30c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM11 22h-6c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h6c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM24 24c-2.209 0-4-1.791-4-4s1.791-4 4-4c2.209 0 4 1.791 4 4v0c0 2.209-1.791 4-4 4v0zM24 18c-1.105 0-2 0.895-2 2s0.895 2 2 2c1.105 0 2-0.895 2-2v0c0-1.105-0.895-2-2-2v0zM20 24c-2.209 0-4-1.791-4-4s1.791-4 4-4v0c0.002 0 0.005 0 0.007 0 1.032 0 1.972 0.398 2.673 1.048l-0.003-0.002c0.191 0.183 0.311 0.439 0.311 0.724 0 0.552-0.448 1-1 1-0.257 0-0.492-0.097-0.669-0.257l0.001 0.001c-0.345-0.319-0.807-0.514-1.315-0.514-0.002 0-0.003 0-0.005 0h0c-1.105 0-2 0.895-2 2s0.895 2 2 2v0c0.002 0 0.004 0 0.007 0 0.508 0 0.971-0.195 1.317-0.515l-0.001 0.001c0.179-0.171 0.422-0.276 0.689-0.276 0.552 0 1 0.448 1 1 0 0.295-0.128 0.56-0.331 0.743l-0.001 0.001c-0.699 0.648-1.638 1.046-2.671 1.046-0.003 0-0.007 0-0.010 0h0.001z"></path>\n</svg>\n'}),t("span",null,s.code)),t("salla-button",{class:"s-order-summary-item-copy-button "+(this.codeCopied===s.code?"copied":""),onClick:()=>this.copyToClipboardHandler(s.code),shape:"link"},t("span",{innerHTML:this.codeCopied===s.code?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>swap-stroke</title>\n<path d="M6.667 18.667h-2.667c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333v2.667c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-2.667c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h2.667c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333zM28 10.667h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4v-13.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.597 1.333-1.333 1.333h-13.333c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333z"></path>\n</svg>\n'}),t("span",null,this.copy_text)))))):this.isDigitalProduct(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.files_text," (",s.name,")"),t("ul",null,s.files.map((s=>t("li",{class:"s-order-summary-digital-item-wrapper"},t("div",null,t("span",{innerHTML:'\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>file-archive</title>\n<path d="M17.333 16h-5.333c-0.737 0-1.333 0.597-1.333 1.333v2.667c0 2.205 1.795 4 4 4s4-1.795 4-4v-2.667c0-0.736-0.596-1.333-1.333-1.333zM16 20c0 0.735-0.597 1.333-1.333 1.333s-1.333-0.599-1.333-1.333v-1.333h2.667zM17.333 12h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM28.943 8.391l-8-8c-0.249-0.251-0.588-0.391-0.943-0.391h-13.333c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h18.667c2.205 0 4-1.795 4-4v-18.667c0-0.353-0.14-0.693-0.391-0.943zM26.667 28c0 0.735-0.597 1.333-1.333 1.333h-18.667c-0.736 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.597-1.333 1.333-1.333h12.781l7.219 7.219zM17.333 8h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM17.333 4h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333z"></path>\n</svg>\n'}),t("span",null,s.name)),t("a",{href:s.url,target:"_blank",class:"s-order-summary-item-download"},t("span",{innerHTML:'\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>download</title>\n<path d="M15.056 20.941c0.123 0.124 0.271 0.221 0.435 0.289 0.163 0.067 0.336 0.103 0.509 0.103s0.347-0.036 0.509-0.103c0.164-0.068 0.311-0.165 0.435-0.289l5.332-5.332c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-3.057 3.057v-12.781c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v12.781l-3.057-3.057c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885zM25.333 26.667h-18.667c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h18.667c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>\n</svg>\n'}),t("span",null,this.download_text))))))):null)))}};e.style=":host{display:block}";export{e as salla_order_summary}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as t}from"./p-
|
|
4
|
+
import{r as s,h as t}from"./p-eYsXdqjv.js";const r=class{constructor(t){s(this,t),this.height="10px";try{if(this.donation){let s="string"==typeof this.donation?JSON.parse(this.donation):this.donation;s.can_donate&&s.target_amount?(s.target_end_date="0000-00-00"==s.target_end_date?null:s.target_end_date,this.value=s.collected_amount,this.target=s.target_amount,this.header=salla.lang.get("pages.products.target"),this.message=s.target_end_date?salla.lang.get("pages.products.donation_target_date")+" "+s.target_end_date:""):this.message=s.target_amount?s.target_message:""}}catch(s){salla.log("Wrong donation json")}salla.lang.onLoaded((()=>{this.header=this.header?.replace("pages.products.target",salla.lang.get("pages.products.target")),this.message=this.message?.replace("pages.products.donation_target_date",salla.lang.get("pages.products.donation_target_date"))})),salla.onReady((()=>{this.color=this.color||salla.config.get("theme.color.primary","#ffd5c4"),this.unit||(this.unit=salla.config.currency().symbol)}))}getPercentage(){return this.value/this.target*100}render(){return this.target||this.message?t("div",{class:"s-progress-bar-container"},this.header?t("div",{class:"s-progress-bar-header"},this.header):"",this.getProgressBar(),this.message?t("span",{class:"s-progress-bar-message"},this.message):""):""}getProgressBar(){return this.target?[this.hideUnits?null:t("div",{class:"s-progress-bar-target-section"},t("span",{innerHTML:`${salla.helpers.number(this.value)} ${this.unit}`}),t("span",{innerHTML:`${salla.helpers.number(this.target)} ${this.unit}`})),t("div",{class:"s-progress-bar-wrapper",style:{height:this.height}},t("div",{class:{"s-progress-bar-progress":!0,"s-progress-bar-progress-stripped":this.stripped},style:{width:`${this.getPercentage()}%`,backgroundColor:this.color}}))]:null}};r.style="";export{r as salla_progress_bar}
|