@salla.sa/twilight-components 2.14.410 → 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-Apepuv0K.js → filepond-BO-XBD1i.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-iW6rBzvV.js → filepond-plugin-file-poster-DJIG7vOj.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-CnSaNZSz.js → filepond-plugin-file-validate-size-Bhtuy-Ar.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-Cd_N5-75.js → filepond-plugin-file-validate-type-BQhRvZvr.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-B-VgjvBB.js → filepond-plugin-image-edit-C4unOPfE.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-B7pvpLQQ.js → filepond-plugin-image-exif-orientation-QreJIoqS.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CrwqE_eH.js → filepond-plugin-image-preview-aiURUVDo.js} +1 -1
- package/dist/cjs/{functions-BeVUNcRL.js → functions-qbO9xyMC.js} +1 -1
- package/dist/cjs/{index-HaF0YPfl.js → index-BtHm_lmK.js} +1 -1
- package/dist/cjs/{index-CvTXoznS.js → index-DR2nrv6V.js} +10 -10
- 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 +2 -2
- 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 +294 -157
- 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--fbeE9eN.js → tracked-promise-Dlrrx6bS.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-BFVuX93Y.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/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +1 -1
- package/dist/collection/components/salla-delivery-promise/delivery-promise-api.js +40 -0
- package/dist/collection/components/salla-delivery-promise/delivery-promise-city-filter.js +11 -0
- package/dist/collection/components/salla-delivery-promise/delivery-promise-intent.js +55 -0
- package/dist/collection/components/salla-delivery-promise/delivery-promise-labels.js +39 -0
- package/dist/collection/components/salla-delivery-promise/salla-delivery-promise.js +175 -167
- 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/components/salla-bullet-delivery.js +1 -1
- package/dist/components/salla-delivery-promise.js +324 -165
- package/dist/esm/{filepond-DPbkat7B.js → filepond-BdAJ1Q3U.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DgPt1KP-.js → filepond-plugin-file-poster-_P46glp3.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-BV_54qp5.js → filepond-plugin-file-validate-size-Cs7iDcpm.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-C_0YZnJv.js → filepond-plugin-file-validate-type-BokfkNG5.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-BWL4OVdy.js → filepond-plugin-image-edit-DqujritR.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CteQgPe5.js → filepond-plugin-image-exif-orientation-CTqsgDyW.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-CCPL4ZAz.js → filepond-plugin-image-preview-zoBFIa44.js} +1 -1
- package/dist/esm/{functions-BPhNXHAK.js → functions-CEdm6lBq.js} +1 -1
- package/dist/esm/{index-xzl1T3nS.js → index-DXkuZzsm.js} +1 -1
- package/dist/esm/{index--aLzvRrO.js → index-eYsXdqjv.js} +10 -10
- 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 +2 -2
- 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 +294 -157
- 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-DZU9tZyv.js → tracked-promise-DC9Saija.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-B2fiZJce.js → vanilla-picker-DdyyxtyV.js} +1 -1
- package/dist/twilight/{p-ba732bc9.entry.js → p-040057c7.entry.js} +1 -1
- package/dist/twilight/{p-1e9aaede.entry.js → p-046ef0cf.entry.js} +1 -1
- package/dist/twilight/{p-7d1b25c8.entry.js → p-04a3bd3a.entry.js} +1 -1
- package/dist/twilight/{p-5ed72df9.entry.js → p-083bfceb.entry.js} +1 -1
- package/dist/twilight/{p-f302049c.entry.js → p-0b6cfdc6.entry.js} +1 -1
- package/dist/twilight/{p-a9042935.entry.js → p-0c773a98.entry.js} +1 -1
- package/dist/twilight/{p-516b313b.entry.js → p-0fee8df2.entry.js} +1 -1
- package/dist/twilight/p-12e78aef.entry.js +4 -0
- package/dist/twilight/{p-b0381a65.entry.js → p-18046a80.entry.js} +1 -1
- package/dist/twilight/{p-53a365b6.entry.js → p-18428cad.entry.js} +1 -1
- package/dist/twilight/{p-a341cc6c.entry.js → p-18e4e822.entry.js} +1 -1
- package/dist/twilight/{p-1b74cdc9.entry.js → p-1c2c212f.entry.js} +1 -1
- package/dist/twilight/{p-7cb5b79e.entry.js → p-1d9e9e5e.entry.js} +1 -1
- package/dist/twilight/{p-5b731980.entry.js → p-1f18bb8c.entry.js} +1 -1
- package/dist/twilight/{p-ce24f47a.entry.js → p-24121404.entry.js} +1 -1
- package/dist/twilight/{p-3306a0e3.entry.js → p-28a276b7.entry.js} +1 -1
- package/dist/twilight/{p-b1a991a4.entry.js → p-2beb780e.entry.js} +1 -1
- package/dist/twilight/{p-74ca5db0.entry.js → p-2d29eae4.entry.js} +1 -1
- package/dist/twilight/{p-14430749.entry.js → p-2ea91f4d.entry.js} +1 -1
- package/dist/twilight/{p-ef51ee9c.entry.js → p-371ea2ac.entry.js} +1 -1
- package/dist/twilight/{p-a1551640.entry.js → p-38df842f.entry.js} +1 -1
- package/dist/twilight/{p-dcdaa403.entry.js → p-3a0482aa.entry.js} +1 -1
- package/dist/twilight/{p-6fbdfb32.entry.js → p-3dd609ff.entry.js} +1 -1
- package/dist/twilight/{p-efb25d45.entry.js → p-473e829b.entry.js} +1 -1
- package/dist/twilight/{p-63ca4a50.entry.js → p-4c7e5ca7.entry.js} +1 -1
- package/dist/twilight/p-4rGFyB1b.js +4 -0
- package/dist/twilight/{p-595ff7ae.entry.js → p-543482d0.entry.js} +1 -1
- package/dist/twilight/{p-c709eecf.entry.js → p-569db60a.entry.js} +1 -1
- package/dist/twilight/{p-6fcf797a.entry.js → p-63b091c3.entry.js} +1 -1
- package/dist/twilight/{p-0b3ab0c0.entry.js → p-67b3a063.entry.js} +1 -1
- package/dist/twilight/{p-33ed3cf6.entry.js → p-6a50e4ab.entry.js} +1 -1
- package/dist/twilight/{p-c4ddea92.entry.js → p-6ffe96cf.entry.js} +1 -1
- package/dist/twilight/{p-2864a914.entry.js → p-70e26072.entry.js} +1 -1
- package/dist/twilight/{p-c1e50801.entry.js → p-78b27b6f.entry.js} +1 -1
- package/dist/twilight/{p-2be849c0.entry.js → p-809d8765.entry.js} +1 -1
- package/dist/twilight/{p-4705328f.entry.js → p-82d315dc.entry.js} +1 -1
- package/dist/twilight/{p-ae739a30.entry.js → p-82fc9f8a.entry.js} +1 -1
- package/dist/twilight/{p-df3e785e.entry.js → p-86494434.entry.js} +1 -1
- package/dist/twilight/{p-62f5b9d2.entry.js → p-880974c0.entry.js} +1 -1
- package/dist/twilight/{p-cdb85c38.entry.js → p-914ef875.entry.js} +1 -1
- package/dist/twilight/{p-4cf14603.entry.js → p-92c3525a.entry.js} +1 -1
- package/dist/twilight/{p-a783f44e.entry.js → p-92ee979a.entry.js} +1 -1
- package/dist/twilight/{p-b9a3cd97.entry.js → p-98dfc58c.entry.js} +1 -1
- package/dist/twilight/{p-ae5a1e83.entry.js → p-9da33e90.entry.js} +1 -1
- package/dist/twilight/p-9f51245d.entry.js +4 -0
- package/dist/twilight/{p-9114ec15.entry.js → p-9fea03ff.entry.js} +1 -1
- package/dist/twilight/{p-gfF4Tkzf.js → p-B-gehnpX.js} +1 -1
- package/dist/twilight/{p-W0o3F-X6.js → p-BrL7ZFF-.js} +1 -1
- package/dist/twilight/{p-Dqn5ubGV.js → p-Bt5MNLrr.js} +1 -1
- package/dist/twilight/{p-CKKsiY6U.js → p-C4iKSe6r.js} +1 -1
- package/dist/twilight/{p-vMhKvihG.js → p-CZP8nF-D.js} +1 -1
- package/dist/twilight/{p-eA49HkVR.js → p-CdKOsdhF.js} +1 -1
- package/dist/twilight/{p-D8id_g5X.js → p-CdQPD_4N.js} +1 -1
- package/dist/twilight/{p-vdGuE3O6.js → p-CkMgy4QX.js} +1 -1
- package/dist/twilight/{p-MFOr6dmh.js → p-DgUXy-oM.js} +1 -1
- package/dist/twilight/{p-KGKLTJUI.js → p-VP7525fx.js} +1 -1
- package/dist/twilight/{p-638ff172.entry.js → p-a0792c90.entry.js} +1 -1
- package/dist/twilight/{p-90670ab5.entry.js → p-a74e2625.entry.js} +1 -1
- package/dist/twilight/{p-35084537.entry.js → p-a97da8bc.entry.js} +1 -1
- package/dist/twilight/p-aced00e2.entry.js +4 -0
- package/dist/twilight/{p-3c9c9316.entry.js → p-b04f3b37.entry.js} +1 -1
- package/dist/twilight/{p-5ea75d8d.entry.js → p-b258ef5c.entry.js} +1 -1
- package/dist/twilight/{p-984ab6ec.entry.js → p-ba81b8d6.entry.js} +1 -1
- package/dist/twilight/{p-6585c82b.entry.js → p-bab9b1ad.entry.js} +1 -1
- package/dist/twilight/{p-3953f0a0.entry.js → p-c00c26f4.entry.js} +1 -1
- package/dist/twilight/{p-81b43cf3.entry.js → p-c0ea9ff2.entry.js} +1 -1
- package/dist/twilight/{p-cc5aba4d.entry.js → p-c11f0af9.entry.js} +1 -1
- package/dist/twilight/{p-3646f57c.entry.js → p-c38311a2.entry.js} +1 -1
- package/dist/twilight/{p-7f5af809.entry.js → p-c6a56a0c.entry.js} +1 -1
- package/dist/twilight/{p-681c8fc0.entry.js → p-c8821c21.entry.js} +1 -1
- package/dist/twilight/{p-675f6c3f.entry.js → p-c8b8ea5c.entry.js} +1 -1
- package/dist/twilight/{p-3a643e3f.entry.js → p-c8f6bc81.entry.js} +1 -1
- package/dist/twilight/{p-e1054044.entry.js → p-cb5fbe10.entry.js} +1 -1
- package/dist/twilight/{p-c6bf0f70.entry.js → p-cf4c9420.entry.js} +1 -1
- package/dist/twilight/{p-e6fbc27e.entry.js → p-d400841e.entry.js} +1 -1
- package/dist/twilight/p-d49fd79d.entry.js +4 -0
- package/dist/twilight/{p-4828c47f.entry.js → p-d6a5df0d.entry.js} +1 -1
- package/dist/twilight/{p-f4d19537.entry.js → p-d6a86efa.entry.js} +1 -1
- package/dist/twilight/{p-02cb524a.entry.js → p-dbe6cc9c.entry.js} +1 -1
- package/dist/twilight/{p-30a0554b.entry.js → p-e2cec9f6.entry.js} +1 -1
- package/dist/twilight/{p-63250e42.entry.js → p-e5e1574f.entry.js} +1 -1
- package/dist/twilight/{p-6213a6b6.entry.js → p-e89e8a20.entry.js} +1 -1
- package/dist/twilight/{p--aLzvRrO.js → p-eYsXdqjv.js} +1 -1
- package/dist/twilight/{p-2ca1a6ef.entry.js → p-eadaf058.entry.js} +1 -1
- package/dist/twilight/{p-331bc274.entry.js → p-eae4b2c9.entry.js} +1 -1
- package/dist/twilight/p-ed6e8053.entry.js +4 -0
- package/dist/twilight/{p-6632849d.entry.js → p-f267b033.entry.js} +1 -1
- package/dist/twilight/{p-97d3ed79.entry.js → p-f3105e54.entry.js} +1 -1
- package/dist/twilight/{p-6773040a.entry.js → p-f3d76113.entry.js} +1 -1
- package/dist/twilight/{p-9bd8770c.entry.js → p-f91399b4.entry.js} +1 -1
- package/dist/twilight/{p-aa4d7e56.entry.js → p-faae4443.entry.js} +1 -1
- package/dist/twilight/{p-d3202fae.entry.js → p-fea8186b.entry.js} +1 -1
- package/dist/twilight/{p-614959f2.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/salla-delivery-promise/delivery-promise-api.d.ts +8 -0
- package/dist/types/components/salla-delivery-promise/delivery-promise-city-filter.d.ts +3 -0
- package/dist/types/components/salla-delivery-promise/delivery-promise-intent.d.ts +18 -0
- package/dist/types/components/salla-delivery-promise/delivery-promise-labels.d.ts +8 -0
- package/dist/types/components/salla-delivery-promise/interfaces.d.ts +16 -7
- package/dist/types/components/salla-delivery-promise/salla-delivery-promise.d.ts +31 -33
- package/dist/types/components.d.ts +23 -0
- package/package.json +5 -5
- package/dist/twilight/p-0598e48d.entry.js +0 -4
- package/dist/twilight/p-0d9e6f1b.entry.js +0 -4
- package/dist/twilight/p-264205d3.entry.js +0 -4
- package/dist/twilight/p-2e7c0235.entry.js +0 -4
- package/dist/twilight/p-CFQnlnSJ.js +0 -4
- package/dist/twilight/p-cace9063.entry.js +0 -4
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DR2nrv6V.js');
|
|
7
7
|
|
|
8
8
|
const sallaCountDownCss = ".s-count-down-horizontal{background-color:rgba(0, 0, 0, 0.06);background-color:color-mix(in srgb, var(--color-primary) 10%, transparent)}";
|
|
9
9
|
|
|
@@ -3,111 +3,269 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DR2nrv6V.js');
|
|
7
|
+
|
|
8
|
+
const DEBUG_KEY = 'salla-delivery-promise-debug';
|
|
9
|
+
function log(message, data) {
|
|
10
|
+
if (localStorage.getItem(DEBUG_KEY)) {
|
|
11
|
+
data !== undefined ? console.log(message, data) : console.log(message);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/** Fetch available cities for a product's delivery promises. */
|
|
15
|
+
async function fetchCities(productId) {
|
|
16
|
+
log('fetchCities start', { productId });
|
|
17
|
+
const response = await salla.api.request(salla.url.api(`products/${productId}/delivery-promises/cities`));
|
|
18
|
+
if (!response.success || !Array.isArray(response.data) || response.data.length === 0) {
|
|
19
|
+
log('fetchCities: no data', { response });
|
|
20
|
+
return { cities: [], preselected: undefined };
|
|
21
|
+
}
|
|
22
|
+
const preselected = response.data.find((c) => c.is_selected);
|
|
23
|
+
log('fetchCities success', { count: response.data.length, preselected });
|
|
24
|
+
return { cities: response.data, preselected };
|
|
25
|
+
}
|
|
26
|
+
/** Fetch the delivery promise message for a given city or branch. */
|
|
27
|
+
async function fetchDeliveryMessage(productId, id, optionType, isLoginCycleEnabled) {
|
|
28
|
+
log('fetchDeliveryMessage start', { productId, id, optionType });
|
|
29
|
+
let queryString = '';
|
|
30
|
+
if (optionType === 'city' && !isLoginCycleEnabled) {
|
|
31
|
+
queryString = `?reference_id=${id}`;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
queryString = `?reference_id=${id}&reference_type=${optionType}`;
|
|
35
|
+
}
|
|
36
|
+
const response = (await salla.api.withoutNotifier(() => salla.api.request(salla.url.api(`products/${productId}/delivery-promises${queryString}`))));
|
|
37
|
+
if (!response.success) {
|
|
38
|
+
log('fetchDeliveryMessage error', { response });
|
|
39
|
+
throw new Error(response.error?.message || 'Failed to fetch delivery promise');
|
|
40
|
+
}
|
|
41
|
+
const message = response.data?.message?.trim();
|
|
42
|
+
log('fetchDeliveryMessage success', { message });
|
|
43
|
+
return message || null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Filters cities by Arabic/English name (used inside the city-change modal). */
|
|
47
|
+
function filterCitiesForModal(cities, query) {
|
|
48
|
+
const q = query.trim().toLowerCase();
|
|
49
|
+
if (!q) {
|
|
50
|
+
return [...cities];
|
|
51
|
+
}
|
|
52
|
+
return cities.filter(city => city.name.toLowerCase().includes(q) || (city.name_en || '').toLowerCase().includes(q));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const INTENT_KEY = 'bullet_delivery_intent';
|
|
56
|
+
function getIntentStorage() {
|
|
57
|
+
const rememberLastSession = Boolean(salla.config.get('store.settings.bullet_delivery.settings.remember_last_session'));
|
|
58
|
+
return rememberLastSession ? salla.storage.store : salla.storage.session;
|
|
59
|
+
}
|
|
60
|
+
function getStoredIntent() {
|
|
61
|
+
const raw = getIntentStorage().get(INTENT_KEY);
|
|
62
|
+
return raw && typeof raw === 'object' ? raw : null;
|
|
63
|
+
}
|
|
64
|
+
/** Resolve the stored intent into a city or branch selection. Returns null when no usable intent. */
|
|
65
|
+
function resolveIntent() {
|
|
66
|
+
const intent = getStoredIntent();
|
|
67
|
+
if (!intent)
|
|
68
|
+
return null;
|
|
69
|
+
if (intent.type === 'address') {
|
|
70
|
+
const city = intent.address_details?.city;
|
|
71
|
+
const cityId = city?.id != null ? Number(city.id) : intent.city_id != null ? Number(intent.city_id) : null;
|
|
72
|
+
const cityName = city?.name?.trim() || '';
|
|
73
|
+
if (cityId != null) {
|
|
74
|
+
return { type: 'address', option: { id: cityId, name: cityName } };
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
if (intent.type === 'branch') {
|
|
79
|
+
const branchId = intent.branch_id != null
|
|
80
|
+
? Number(intent.branch_id)
|
|
81
|
+
: intent.branch_details?.id != null
|
|
82
|
+
? Number(intent.branch_details.id)
|
|
83
|
+
: null;
|
|
84
|
+
const branchName = intent.branch_details?.name?.trim() || '';
|
|
85
|
+
if (branchId != null) {
|
|
86
|
+
return { type: 'branch', option: { id: branchId, name: branchName } };
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
/** Build the payload for opening the bullet delivery modal with preselection. */
|
|
93
|
+
function buildBulletOpenPayload() {
|
|
94
|
+
const intent = getStoredIntent();
|
|
95
|
+
const payload = {};
|
|
96
|
+
if (intent?.type === 'address' && intent.address_id != null) {
|
|
97
|
+
payload.preselected_address_id = Number(intent.address_id);
|
|
98
|
+
}
|
|
99
|
+
if (intent?.type === 'branch') {
|
|
100
|
+
const branchId = intent.branch_id ?? intent.branch_details?.id;
|
|
101
|
+
if (branchId != null) {
|
|
102
|
+
payload.preselected_branch_id = Number(branchId);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return payload;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const DEFAULT_LABELS = {
|
|
109
|
+
deliveryTo: 'توصيل إلى',
|
|
110
|
+
pickupFromBranch: 'الاستلام من فرع',
|
|
111
|
+
noResults: 'لا توجد نتائج',
|
|
112
|
+
selectCity: 'اختر المدينة',
|
|
113
|
+
changeCityTitle: 'تغيير المدينة',
|
|
114
|
+
changeCitySubtitle: '',
|
|
115
|
+
cityFieldLabel: 'المدينة',
|
|
116
|
+
modalSearchPlaceholder: 'ابحث عن مدينة',
|
|
117
|
+
confirmAddress: 'تأكيد العنوان',
|
|
118
|
+
errorDeliveryPromise: 'لا يتوفر وعد تسليم لهذه المدينة',
|
|
119
|
+
errorPickupPromise: 'لا يتوفر وعد تسليم لهذا الفرع',
|
|
120
|
+
};
|
|
121
|
+
function loadLabels() {
|
|
122
|
+
return {
|
|
123
|
+
deliveryTo: salla.lang.getWithDefault('pages.products.promise_deliver_to', DEFAULT_LABELS.deliveryTo),
|
|
124
|
+
pickupFromBranch: salla.lang.getWithDefault('pages.products.promise_pickup_from_branch', DEFAULT_LABELS.pickupFromBranch),
|
|
125
|
+
noResults: salla.lang.getWithDefault('common.elements.no_options', DEFAULT_LABELS.noResults),
|
|
126
|
+
selectCity: salla.lang.getWithDefault('common.elements.select_city', DEFAULT_LABELS.selectCity),
|
|
127
|
+
changeCityTitle: salla.lang.getWithDefault('pages.products.promise_change_city_title', DEFAULT_LABELS.changeCityTitle),
|
|
128
|
+
changeCitySubtitle: salla.lang.getWithDefault('pages.products.promise_change_city_subtitle', 'قد تتغيّر مدة التوصيل حسب المدينة.'),
|
|
129
|
+
cityFieldLabel: salla.lang.getWithDefault('pages.products.promise_city_field', DEFAULT_LABELS.cityFieldLabel),
|
|
130
|
+
modalSearchPlaceholder: salla.lang.getWithDefault('pages.products.promise_search_city', DEFAULT_LABELS.modalSearchPlaceholder),
|
|
131
|
+
confirmAddress: salla.lang.getWithDefault('pages.checkout.confirm_address', DEFAULT_LABELS.confirmAddress),
|
|
132
|
+
errorDeliveryPromise: salla.lang.getWithDefault('pages.products.promise_delivery_not_available', DEFAULT_LABELS.errorDeliveryPromise),
|
|
133
|
+
errorPickupPromise: salla.lang.getWithDefault('pages.products.promise_pickup_not_available', DEFAULT_LABELS.errorPickupPromise),
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
/** Localized city display name (English when available and user language is not Arabic). */
|
|
137
|
+
function getCityDisplayName(city) {
|
|
138
|
+
const lang = salla.config.get('user.language_code');
|
|
139
|
+
if (lang && lang !== 'ar' && city.name_en?.trim()) {
|
|
140
|
+
return city.name_en.trim();
|
|
141
|
+
}
|
|
142
|
+
return city.name;
|
|
143
|
+
}
|
|
7
144
|
|
|
8
145
|
const SallaDeliveryPromise = class {
|
|
9
146
|
constructor(hostRef) {
|
|
10
147
|
index.registerInstance(this, hostRef);
|
|
11
|
-
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
148
|
+
// ── Feature flags & config ────────────────────────────────────────────
|
|
149
|
+
this.isDeliveryPromiseEnabled = false;
|
|
150
|
+
this.isLoginCycleEnabled = false;
|
|
151
|
+
this.canRender = false;
|
|
152
|
+
// ── Shared display state ──────────────────────────────────────────────
|
|
153
|
+
this.labels = DEFAULT_LABELS;
|
|
154
|
+
this.selectedLabel = null;
|
|
14
155
|
this.deliveryMessage = null;
|
|
15
|
-
this.isLoadingCities = false;
|
|
16
|
-
this.isLoadingPromises = false;
|
|
17
|
-
this.isDropdownOpen = false;
|
|
18
|
-
this.searchQuery = '';
|
|
19
156
|
this.hasError = false;
|
|
20
157
|
this.errorMessage = '';
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
158
|
+
this.isLoadingPromises = false;
|
|
159
|
+
// ── Login-cycle state (bullet delivery integration) ───────────────────
|
|
160
|
+
this.selectedCityLoginCycle = null;
|
|
161
|
+
this.selectedBranchLoginCycle = null;
|
|
162
|
+
// ── Standard flow state (city list) ───────────────────────────────────
|
|
163
|
+
this.cities = [];
|
|
164
|
+
this.selectedCity = null;
|
|
165
|
+
this.isLoadingCities = false;
|
|
166
|
+
// ── City-change modal state (non–login-cycle) ─────────────────────────
|
|
167
|
+
this.modalSearchQuery = '';
|
|
168
|
+
this.cityPendingSelection = null;
|
|
169
|
+
this.isCityPopoverOpen = false;
|
|
170
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
171
|
+
// Login-cycle (bullet delivery) integration
|
|
172
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
173
|
+
this.onBulletDeliveryConfirmed = () => {
|
|
174
|
+
this.applyBulletIntent();
|
|
28
175
|
};
|
|
29
|
-
this.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
this.productId = undefined;
|
|
33
|
-
this.onClickOutside = (e) => {
|
|
34
|
-
if (this.host.contains(e.target)) {
|
|
35
|
-
return; // click inside component (e.g. search input, city list) — don't close
|
|
36
|
-
}
|
|
37
|
-
this.isDropdownOpen = false;
|
|
38
|
-
window.removeEventListener('click', this.onClickOutside);
|
|
176
|
+
this.handleModalSearchInput = (event) => {
|
|
177
|
+
this.modalSearchQuery = event.target.value;
|
|
178
|
+
this.isCityPopoverOpen = true;
|
|
39
179
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
this.labels = {
|
|
43
|
-
deliveryTo: salla.lang.getWithDefault('pages.products.promise_deliver_to', 'توصيل إلى'),
|
|
44
|
-
pickupFromBranch: salla.lang.getWithDefault('pages.products.promise_pickup_from_branch', 'الاستلام من فرع'),
|
|
45
|
-
searchPlaceholder: salla.lang.getWithDefault('blocks.header.search_placeholder', 'بحث...'),
|
|
46
|
-
noResults: salla.lang.getWithDefault('common.elements.no_options', 'لا توجد نتائج'),
|
|
47
|
-
selectCity: salla.lang.getWithDefault('common.elements.select_city', 'اختر المدينة'),
|
|
180
|
+
this.handleModalComboboxActivate = () => {
|
|
181
|
+
this.isCityPopoverOpen = true;
|
|
48
182
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
183
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
184
|
+
// Header click (dispatches to correct flow)
|
|
185
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
186
|
+
this.handleHeaderClick = (e) => {
|
|
187
|
+
e.stopPropagation();
|
|
188
|
+
if (this.isLoginCycleEnabled) {
|
|
189
|
+
this.openBulletDeliveryModal();
|
|
54
190
|
}
|
|
55
191
|
else {
|
|
56
|
-
|
|
192
|
+
void this.openCityChangeModal();
|
|
57
193
|
}
|
|
58
|
-
}
|
|
194
|
+
};
|
|
59
195
|
}
|
|
196
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
197
|
+
// Lifecycle
|
|
198
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
60
199
|
async componentDidLoad() {
|
|
61
200
|
await salla.onReady();
|
|
62
201
|
await salla.lang.onLoaded();
|
|
63
|
-
this.
|
|
64
|
-
this.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
this.
|
|
69
|
-
|
|
202
|
+
this.labels = loadLabels();
|
|
203
|
+
this.isDeliveryPromiseEnabled = salla.config.get('store.features', []).includes('delivery-promises');
|
|
204
|
+
this.isLoginCycleEnabled = salla.config.get('store.features', []).includes('bullet-delivery-v2');
|
|
205
|
+
this.productId = salla.config.get('page.id');
|
|
206
|
+
if (!this.isDeliveryPromiseEnabled) {
|
|
207
|
+
this.canRender = false;
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
if (this.isLoginCycleEnabled) {
|
|
211
|
+
this.applyBulletIntent();
|
|
212
|
+
this.canRender = true;
|
|
213
|
+
window.addEventListener('bulletDeliveryConfirmed', this.onBulletDeliveryConfirmed);
|
|
70
214
|
}
|
|
71
215
|
else {
|
|
72
|
-
this.
|
|
73
|
-
this.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
216
|
+
this.selectedLabel = `${this.labels.deliveryTo} ${this.labels.selectCity}`;
|
|
217
|
+
await this.loadCities();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
disconnectedCallback() {
|
|
221
|
+
window.removeEventListener('bulletDeliveryConfirmed', this.onBulletDeliveryConfirmed);
|
|
222
|
+
}
|
|
223
|
+
applyBulletIntent() {
|
|
224
|
+
const resolved = resolveIntent();
|
|
225
|
+
if (!resolved) {
|
|
226
|
+
this.selectedLabel = `${this.labels.deliveryTo} ${this.labels.selectCity}`;
|
|
227
|
+
this.selectedCityLoginCycle = null;
|
|
228
|
+
this.selectedBranchLoginCycle = null;
|
|
229
|
+
this.deliveryMessage = null;
|
|
77
230
|
return;
|
|
78
231
|
}
|
|
79
|
-
|
|
232
|
+
if (resolved.type === 'address') {
|
|
233
|
+
this.selectedCityLoginCycle = resolved.option;
|
|
234
|
+
this.selectedBranchLoginCycle = null;
|
|
235
|
+
this.selectedLabel = `${this.labels.deliveryTo} ${resolved.option.name || this.labels.selectCity}`;
|
|
236
|
+
void this.loadDeliveryMessage(resolved.option.id, 'city');
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
this.selectedBranchLoginCycle = resolved.option;
|
|
240
|
+
this.selectedCityLoginCycle = null;
|
|
241
|
+
this.selectedLabel = `${this.labels.pickupFromBranch} ${resolved.option.name}`;
|
|
242
|
+
void this.loadDeliveryMessage(resolved.option.id, 'branch');
|
|
243
|
+
}
|
|
80
244
|
}
|
|
81
|
-
|
|
82
|
-
|
|
245
|
+
openBulletDeliveryModal() {
|
|
246
|
+
salla.event.emit('bullet-delivery::open', buildBulletOpenPayload());
|
|
247
|
+
}
|
|
248
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
249
|
+
// Standard flow (city list, no login cycle)
|
|
250
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
251
|
+
async loadCities() {
|
|
83
252
|
this.isLoadingCities = true;
|
|
84
253
|
this.hasError = false;
|
|
85
254
|
try {
|
|
86
|
-
const
|
|
87
|
-
if (
|
|
88
|
-
this.logger('fetchCities success', { cities: response.data });
|
|
89
|
-
// Sort cities: explicit cities first (id !== -1), then "Rest of cities" (id === -1)
|
|
90
|
-
this.cities = this.sortCities(response.data);
|
|
91
|
-
this.filteredCities = [...this.cities];
|
|
92
|
-
// First, check if API returns a selected city (is_selected: true)
|
|
93
|
-
let cityToSelect = this.cities.find(c => c.is_selected);
|
|
94
|
-
if (!cityToSelect) {
|
|
95
|
-
this.logger('no selectedCity from API response');
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
this.logger('selectedCity', cityToSelect);
|
|
99
|
-
this.selectedCity = cityToSelect;
|
|
100
|
-
await this.fetchDeliveryMessage(cityToSelect.id);
|
|
101
|
-
}
|
|
102
|
-
this.canRender = true;
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
this.logger('no data returned from fetchCities', { response: response });
|
|
255
|
+
const { cities, preselected } = await fetchCities(this.productId);
|
|
256
|
+
if (cities.length === 0) {
|
|
106
257
|
this.canRender = false;
|
|
258
|
+
return;
|
|
107
259
|
}
|
|
260
|
+
this.cities = cities;
|
|
261
|
+
if (preselected) {
|
|
262
|
+
this.selectedCity = preselected;
|
|
263
|
+
this.selectedLabel = `${this.labels.deliveryTo} ${getCityDisplayName(preselected)}`;
|
|
264
|
+
await this.loadDeliveryMessage(preselected.id, 'city');
|
|
265
|
+
}
|
|
266
|
+
this.canRender = true;
|
|
108
267
|
}
|
|
109
268
|
catch (error) {
|
|
110
|
-
this.logger('fetchCities error', { error: error.message });
|
|
111
269
|
this.hasError = true;
|
|
112
270
|
this.errorMessage = error.message || 'Failed to load cities';
|
|
113
271
|
this.canRender = false;
|
|
@@ -116,113 +274,92 @@ const SallaDeliveryPromise = class {
|
|
|
116
274
|
this.isLoadingCities = false;
|
|
117
275
|
}
|
|
118
276
|
}
|
|
119
|
-
|
|
120
|
-
|
|
277
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
278
|
+
// Delivery message (shared by both flows)
|
|
279
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
280
|
+
async loadDeliveryMessage(id, optionType) {
|
|
121
281
|
this.isLoadingPromises = true;
|
|
122
282
|
this.hasError = false;
|
|
123
283
|
this.deliveryMessage = null;
|
|
124
284
|
try {
|
|
125
|
-
|
|
126
|
-
if (response.success && response.data?.message) {
|
|
127
|
-
const message = response.data.message.trim();
|
|
128
|
-
this.logger('fetchDeliveryMessage success', { message });
|
|
129
|
-
this.deliveryMessage = message || null;
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
this.logger('deliveryMessage not valid', { response });
|
|
133
|
-
}
|
|
285
|
+
this.deliveryMessage = await fetchDeliveryMessage(this.productId, id, optionType, this.isLoginCycleEnabled);
|
|
134
286
|
}
|
|
135
287
|
catch (error) {
|
|
136
|
-
this.logger('fetchDeliveryMessage error', { error: error.message });
|
|
137
288
|
this.hasError = true;
|
|
138
|
-
this.errorMessage =
|
|
289
|
+
this.errorMessage = optionType === 'city' ? this.labels.errorDeliveryPromise : this.labels.errorPickupPromise;
|
|
139
290
|
}
|
|
140
291
|
finally {
|
|
141
292
|
this.isLoadingPromises = false;
|
|
142
293
|
}
|
|
143
294
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
295
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
296
|
+
// City-change modal handlers (non–login-cycle)
|
|
297
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
298
|
+
async openCityChangeModal() {
|
|
299
|
+
if (!this.cityModalRef)
|
|
300
|
+
return;
|
|
301
|
+
this.cityPendingSelection = null;
|
|
302
|
+
this.modalSearchQuery = '';
|
|
303
|
+
this.isCityPopoverOpen = false;
|
|
304
|
+
await this.cityModalRef.setTitle(this.labels.changeCityTitle);
|
|
305
|
+
await this.cityModalRef.open();
|
|
156
306
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
* Sort cities: explicit cities first (id !== -1), then "Rest of cities" (id === -1) at the end
|
|
162
|
-
*/
|
|
163
|
-
sortCities(cities) {
|
|
164
|
-
return [...cities].sort((a, b) => {
|
|
165
|
-
// "Rest of cities" (id === -1) should always be at the end
|
|
166
|
-
if (a.id === -1)
|
|
167
|
-
return 1;
|
|
168
|
-
if (b.id === -1)
|
|
169
|
-
return -1;
|
|
170
|
-
return 0;
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
handleSearch(event) {
|
|
174
|
-
const query = event.target.value.toLowerCase();
|
|
175
|
-
this.searchQuery = query;
|
|
176
|
-
if (query.length > 0) {
|
|
177
|
-
this.filteredCities = this.cities.filter(city => city.name.toLowerCase()?.includes(query) ||
|
|
178
|
-
(city.name_en || '').toLowerCase()?.includes(query));
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
this.filteredCities = [...this.cities];
|
|
182
|
-
}
|
|
307
|
+
handleModalSelectCity(city) {
|
|
308
|
+
this.cityPendingSelection = city;
|
|
309
|
+
this.modalSearchQuery = getCityDisplayName(city);
|
|
310
|
+
this.isCityPopoverOpen = false;
|
|
183
311
|
}
|
|
184
|
-
async
|
|
185
|
-
this.
|
|
312
|
+
async handleConfirmCityModal() {
|
|
313
|
+
if (!this.cityPendingSelection) {
|
|
314
|
+
await this.cityModalRef?.close();
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
const city = this.cityPendingSelection;
|
|
186
318
|
this.selectedCity = city;
|
|
187
|
-
this.
|
|
188
|
-
|
|
189
|
-
this.
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Skeleton shown during initial city fetch to avoid blank period and layout shift.
|
|
198
|
-
* Matches the structure/size of the real content (header + message area).
|
|
199
|
-
*/
|
|
200
|
-
renderInitialLoadingSkeleton() {
|
|
319
|
+
this.selectedLabel = `${this.labels.deliveryTo} ${getCityDisplayName(city)}`;
|
|
320
|
+
await this.loadDeliveryMessage(city.id, 'city');
|
|
321
|
+
await this.cityModalRef?.close();
|
|
322
|
+
}
|
|
323
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
324
|
+
// Render helpers
|
|
325
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
326
|
+
renderLoadingSkeleton() {
|
|
201
327
|
return (index.h(index.Host, { class: "s-delivery-promise-wrapper s-delivery-promise-skeleton" }, index.h("div", { class: "s-delivery-promise-container" }, index.h("div", { class: "s-delivery-promise-header s-delivery-promise-header-skeleton" }, index.h("div", { class: "s-delivery-promise-location" }, index.h("salla-skeleton", { height: "14px", width: "180px" })), index.h("salla-skeleton", { height: "18px", width: "18px" })), index.h("div", { class: "s-delivery-promise-loading" }, index.h("salla-skeleton", { height: "20px", width: "80%" })))));
|
|
202
328
|
}
|
|
203
329
|
renderDeliveryMessage() {
|
|
204
330
|
if (this.isLoadingPromises) {
|
|
205
331
|
return (index.h("div", { class: "s-delivery-promise-loading" }, index.h("salla-skeleton", { height: "20px", width: "80%" })));
|
|
206
332
|
}
|
|
207
|
-
if (!this.deliveryMessage)
|
|
333
|
+
if (!this.deliveryMessage)
|
|
208
334
|
return null;
|
|
209
|
-
}
|
|
210
|
-
|
|
335
|
+
return index.h("div", { class: "s-delivery-promise-message" }, this.deliveryMessage);
|
|
336
|
+
}
|
|
337
|
+
renderCityModalBody() {
|
|
338
|
+
const filtered = filterCitiesForModal(this.cities, this.modalSearchQuery);
|
|
339
|
+
return (index.h("div", { class: "s-delivery-promise-modal-body" }, index.h("label", { class: "s-delivery-promise-modal-field-label", htmlFor: "s-delivery-promise-modal-search" }, this.labels.cityFieldLabel, index.h("span", { class: "s-delivery-promise-required", "aria-hidden": "true" }, " *")), index.h("div", { class: "s-delivery-promise-modal-combobox" }, index.h("div", { class: "s-delivery-promise-modal-search", onClick: this.handleModalComboboxActivate }, index.h("i", { class: "sicon-search", "aria-hidden": "true" }), index.h("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" })), index.h("div", { id: "s-delivery-promise-modal-listbox", class: "s-delivery-promise-modal-popover", role: "listbox", hidden: !this.isCityPopoverOpen }, index.h("div", { class: "s-delivery-promise-modal-list s-scrollbar" }, filtered.length === 0 ? (index.h("div", { class: "s-delivery-promise-modal-empty" }, this.labels.noResults)) : (filtered.map(city => (index.h("button", { key: city.id, type: "button", role: "option", class: {
|
|
340
|
+
's-delivery-promise-modal-item': true,
|
|
341
|
+
's-delivery-promise-modal-item--selected': this.cityPendingSelection?.id === city.id,
|
|
342
|
+
}, "aria-selected": this.cityPendingSelection?.id === city.id ? 'true' : 'false', onClick: e => {
|
|
343
|
+
e.stopPropagation();
|
|
344
|
+
this.handleModalSelectCity(city);
|
|
345
|
+
} }, index.h("span", { class: "s-delivery-promise-modal-item-name" }, city.name), this.cityPendingSelection?.id === city.id ? index.h("i", { class: "sicon-check", "aria-hidden": "true" }) : null)))))))));
|
|
346
|
+
}
|
|
347
|
+
renderCityChangeModal() {
|
|
348
|
+
if (this.isLoginCycleEnabled)
|
|
349
|
+
return null;
|
|
350
|
+
return (index.h("salla-modal", { id: "s-delivery-promise-city-modal", ref: el => { this.cityModalRef = el; }, class: "s-delivery-promise-city-modal", isClosable: true, width: "md", "modal-title": this.labels.changeCityTitle, subTitle: this.labels.changeCitySubtitle }, this.renderCityModalBody(), index.h("salla-button", { slot: "footer", width: "wide", disabled: !this.cityPendingSelection, onClick: () => this.handleConfirmCityModal() }, !this.isLoadingPromises && this.labels.confirmAddress)));
|
|
211
351
|
}
|
|
352
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
353
|
+
// Main render
|
|
354
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
212
355
|
render() {
|
|
213
|
-
|
|
214
|
-
if (!this.requiresShipping) {
|
|
356
|
+
if (!this.isDeliveryPromiseEnabled)
|
|
215
357
|
return null;
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
if (this.
|
|
219
|
-
return this.renderInitialLoadingSkeleton();
|
|
220
|
-
}
|
|
221
|
-
// Fetch done but no cities / error — hide
|
|
222
|
-
if (!this.canRender || this.cities.length === 0) {
|
|
358
|
+
if (this.isLoadingCities)
|
|
359
|
+
return this.renderLoadingSkeleton();
|
|
360
|
+
if (!this.canRender)
|
|
223
361
|
return null;
|
|
224
|
-
}
|
|
225
|
-
return (index.h(index.Host, { class: "s-delivery-promise-wrapper" }, index.h("div", { class: "s-delivery-promise-container" }, index.h("div", { class: "s-delivery-promise-header", onClick: (e) => this.toggleDropdown(e) }, index.h("div", { class: "s-delivery-promise-location" }, index.h("span", { class: "s-delivery-promise-title" }, this.labels.deliveryTo, " ", this.selectedCity?.name || this.labels.selectCity)), index.h("i", { class: `sicon-keyboard_arrow_down s-delivery-promise-arrow ${this.isDropdownOpen ? 'open' : ''}` })), this.hasError && (index.h("div", { class: "s-delivery-promise-error" }, this.errorMessage)), this.isDropdownOpen && this.renderDropdown(), !this.hasError && this.renderDeliveryMessage())));
|
|
362
|
+
return (index.h(index.Host, { class: "s-delivery-promise-wrapper" }, index.h("div", { class: "s-delivery-promise-container" }, index.h("div", { class: "s-delivery-promise-header", onClick: this.handleHeaderClick }, index.h("div", { class: "s-delivery-promise-location" }, index.h("span", { class: "s-delivery-promise-title" }, this.selectedLabel)), index.h("i", { class: `sicon-keyboard_arrow_down s-delivery-promise-arrow` })), this.hasError && index.h("div", { class: "s-delivery-promise-error" }, this.errorMessage), !this.hasError && this.renderDeliveryMessage()), this.renderCityChangeModal()));
|
|
226
363
|
}
|
|
227
364
|
get host() { return index.getElement(this); }
|
|
228
365
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DR2nrv6V.js');
|
|
7
7
|
var anime_es = require('./anime.es-BqW8JHZi.js');
|
|
8
8
|
var arrowLeft = require('./arrow-left-xSEmRpp6.js');
|
|
9
9
|
var cancel = require('./cancel-B5SbMYEk.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DR2nrv6V.js');
|
|
7
7
|
|
|
8
8
|
const sallaInstallmentCss = "salla-installment:empty{display:none}#tabbyPromoWrapper{background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px;border:unset !important;font-weight:500}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--main-text-color);font-size:var(--font-sm);line-height:1.25;padding:20px 20px 20px 115px !important;background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);border:unset !important;font-family:inherit !important;font-weight:500}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper{margin-bottom:20px}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px !important;top:35px !important;margin:0 !important;height:24px !important}.ltr .tamara-product-widget .tamara-logo{right:20px !important;left:auto !important}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}.s-installment-mispay-wrapper,.s-installment-madfu-wrapper,.s-installment-emkan-wrapper,.s-installment-rajehi-wrapper{font-size:14px;text-align:right;padding:20px;gap:42px;line-height:22px;color:rgb(0, 0, 0);min-width:100%;box-sizing:border-box;position:relative;background-color:white;border-radius:10px;margin:15px 0;display:flex;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.s-installment-mispay-wrapper:hover,.s-installment-madfu-wrapper:hover,.s-installment-emkan-wrapper:hover,.s-installment-rajehi-wrapper:hover{box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.s-installment-mispay-content,.s-installment-madfu-content,.s-installment-emkan-content,.s-installment-rajehi-content{display:flex;flex-direction:row-reverse;width:100%;justify-content:space-between;align-items:center;gap:1rem}.s-installment-mispay-content-text,.s-installment-madfu-content-text,.s-installment-emkan-content-text,.s-installment-rajehi-content-text{color:var(--main-text-color);font-size:14px;font-weight:500;margin:0 16px 0 0;width:80%;left:14px;text-align:left}.s-installment-mispay-content img,.s-installment-madfu-content img,.s-installment-emkan-content img,.s-installment-rajehi-content img{height:28px;width:70px;display:inline-block;max-height:100%;vertical-align:middle;fill:none;stroke:unset;width:auto}.rtl .s-installment-mispay-content-text,.rtl .s-installment-madfu-content-text,.rtl .s-installment-emkan-content-text,.rtl .s-installment-rajehi-content-text{right:14px;text-align:right;margin:0 0 0 16px}.rtl .s-installment-mispay-content img,.rtl .s-installment-madfu-content img,.rtl .s-installment-emkan-content img,.rtl .s-installment-rajehi-content img{left:14px !important}.ltr .s-installment-mispay-content img,.ltr .s-installment-madfu-content img,.ltr .s-installment-emkan-content img,.ltr .s-installment-rajehi-content img{right:14px !important}.s-installment-rajehi-content img{width:70px !important;height:40px !important}.s-installment-emkan-content img{height:35px !important}";
|
|
9
9
|
|