@salla.sa/twilight-components 2.14.409 → 2.14.411
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-_YUCqjZz.js → filepond-DmIUNeKc.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DETXDGSa.js → filepond-plugin-file-poster-C8AOgqzV.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-DI4aQsrT.js → filepond-plugin-file-validate-size-C1uEA-N4.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-wP_qhQ5Z.js → filepond-plugin-file-validate-type-CAYEi5xZ.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-pumLkq4m.js → filepond-plugin-image-edit-DeGtwB2d.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-Df4RWDaf.js → filepond-plugin-image-exif-orientation-BL0bCUVQ.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CiISL9NZ.js → filepond-plugin-image-preview-Dih1Wn_X.js} +1 -1
- package/dist/cjs/{functions-C8UUG2MA.js → functions-CcFdqlpK.js} +1 -1
- package/dist/cjs/{index-Db0Qrz4u.js → index-BBXwu2T_.js} +1 -1
- package/dist/cjs/{index-DJN7HwcX.js → index-PZNCZxVn.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 +1 -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 +12 -3
- 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-NByRrgen.js → tracked-promise-DDi0ylD7.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-2VN_UkJg.js → vanilla-picker-OPSqChB9.js} +1 -1
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +1 -1
- package/dist/collection/components/salla-conditional-offer/salla-conditional-offer.js +11 -2
- 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-bullet-delivery.js +1 -1
- package/dist/components/salla-conditional-offer.js +11 -2
- package/dist/components/salla-delivery-promise.js +324 -165
- package/dist/esm/{filepond-C_gsIK2H.js → filepond-905U04xY.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-BBBLzUWp.js → filepond-plugin-file-poster-BWkARu_j.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-hafSzBsP.js → filepond-plugin-file-validate-size-C0PJYzhi.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DEKO_1D3.js → filepond-plugin-file-validate-type-Bglz2iC6.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DfPaLALg.js → filepond-plugin-image-edit-3aH_4pIL.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CjK9SG2x.js → filepond-plugin-image-exif-orientation-B1h3s1nQ.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-BEbkyXKY.js → filepond-plugin-image-preview-CAiiia6W.js} +1 -1
- package/dist/esm/{functions-DUlq3N7K.js → functions-GzuwX5HS.js} +1 -1
- package/dist/esm/{index-CNVLmZO5.js → index-rIbWLXjW.js} +6 -6
- package/dist/esm/{index-DgbtFfph.js → index-xT-Vt0D7.js} +1 -1
- 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 +1 -1
- 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 +12 -3
- 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-XIu_8oOZ.js → tracked-promise-BQ3oDpFo.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-BQQSG79j.js → vanilla-picker-Cv_dc6oT.js} +1 -1
- package/dist/twilight/{p-f27157cd.entry.js → p-03327bdb.entry.js} +1 -1
- package/dist/twilight/{p-8dcdc70a.entry.js → p-0362115c.entry.js} +1 -1
- package/dist/twilight/{p-7c8dcb34.entry.js → p-05618953.entry.js} +1 -1
- package/dist/twilight/{p-41e6423e.entry.js → p-09de8e38.entry.js} +1 -1
- package/dist/twilight/{p-f878fb20.entry.js → p-0a39c576.entry.js} +1 -1
- package/dist/twilight/{p-c705cacb.entry.js → p-0ad7c855.entry.js} +1 -1
- package/dist/twilight/{p-fa9ef9b1.entry.js → p-0c751ad3.entry.js} +1 -1
- package/dist/twilight/{p-8c2279bc.entry.js → p-0d04fb8c.entry.js} +1 -1
- package/dist/twilight/{p-9904bede.entry.js → p-15a53fe6.entry.js} +1 -1
- package/dist/twilight/{p-ef601fe4.entry.js → p-1716e7bf.entry.js} +1 -1
- package/dist/twilight/{p-5a19f60e.entry.js → p-17bc3083.entry.js} +1 -1
- package/dist/twilight/{p-11702812.entry.js → p-18b593a9.entry.js} +1 -1
- package/dist/twilight/{p-a22dc765.entry.js → p-1da1f13f.entry.js} +1 -1
- package/dist/twilight/{p-1f73b5f3.entry.js → p-24216a35.entry.js} +1 -1
- package/dist/twilight/{p-0f233258.entry.js → p-2a45676f.entry.js} +1 -1
- package/dist/twilight/{p-d8a26e22.entry.js → p-3134ec55.entry.js} +1 -1
- package/dist/twilight/{p-20e35224.entry.js → p-31a5bd84.entry.js} +1 -1
- package/dist/twilight/{p-cc83a6ac.entry.js → p-38b0d747.entry.js} +1 -1
- package/dist/twilight/{p-34e6f981.entry.js → p-4597e9a0.entry.js} +1 -1
- package/dist/twilight/{p-b9e80f97.entry.js → p-464ebb66.entry.js} +1 -1
- package/dist/twilight/{p-7bdce00d.entry.js → p-49457497.entry.js} +1 -1
- package/dist/twilight/{p-7d16d5b8.entry.js → p-4a549dd4.entry.js} +1 -1
- package/dist/twilight/{p-3c4026ad.entry.js → p-4aacfcb8.entry.js} +1 -1
- package/dist/twilight/{p-57eea6b7.entry.js → p-4c527044.entry.js} +1 -1
- package/dist/twilight/{p-ceeb2973.entry.js → p-56f8e93f.entry.js} +1 -1
- package/dist/twilight/{p-34ea3d80.entry.js → p-57a1bd5e.entry.js} +1 -1
- package/dist/twilight/{p-cb6cb968.entry.js → p-5c3711fb.entry.js} +1 -1
- package/dist/twilight/{p-92cfb983.entry.js → p-5f08ca5c.entry.js} +1 -1
- package/dist/twilight/{p-bcff0988.entry.js → p-62a8bf31.entry.js} +1 -1
- package/dist/twilight/{p-c7c54f82.entry.js → p-6477aa16.entry.js} +1 -1
- package/dist/twilight/{p-9b745575.entry.js → p-67ec0369.entry.js} +1 -1
- package/dist/twilight/{p-d114b843.entry.js → p-6c84e2a0.entry.js} +1 -1
- package/dist/twilight/{p-c4ab3a40.entry.js → p-70b821e0.entry.js} +1 -1
- package/dist/twilight/{p-263a896f.entry.js → p-70e21348.entry.js} +1 -1
- package/dist/twilight/{p-a413523f.entry.js → p-7179b561.entry.js} +1 -1
- package/dist/twilight/{p-18725939.entry.js → p-746b703c.entry.js} +1 -1
- package/dist/twilight/{p-19a87a29.entry.js → p-78647833.entry.js} +1 -1
- package/dist/twilight/{p-7ddaeea0.entry.js → p-78bcabea.entry.js} +1 -1
- package/dist/twilight/{p-96cab303.entry.js → p-7ac1d258.entry.js} +1 -1
- package/dist/twilight/{p-1ed43874.entry.js → p-7dd1b438.entry.js} +1 -1
- package/dist/twilight/{p-3a1b2bef.entry.js → p-7ea9101c.entry.js} +1 -1
- package/dist/twilight/{p-aa4ba8d7.entry.js → p-80adbd86.entry.js} +1 -1
- package/dist/twilight/{p-20ac2718.entry.js → p-8afeb013.entry.js} +1 -1
- package/dist/twilight/{p-f8f6c6dc.entry.js → p-8b5ab33f.entry.js} +1 -1
- package/dist/twilight/{p-DPY7gSSB.js → p-8oz_tYCT.js} +1 -1
- package/dist/twilight/{p-14e6815f.entry.js → p-9020d179.entry.js} +1 -1
- package/dist/twilight/{p-8374dc0e.entry.js → p-92863280.entry.js} +1 -1
- package/dist/twilight/{p-bd70bbb8.entry.js → p-941e5a4a.entry.js} +1 -1
- package/dist/twilight/{p-f15653a8.entry.js → p-98862c7d.entry.js} +1 -1
- package/dist/twilight/{p-abaea280.entry.js → p-9adacf19.entry.js} +1 -1
- package/dist/twilight/{p-a38d4343.entry.js → p-9b289072.entry.js} +1 -1
- package/dist/twilight/{p-306e7b36.entry.js → p-9f597738.entry.js} +1 -1
- package/dist/twilight/{p-d12388a3.entry.js → p-9faa8a9e.entry.js} +1 -1
- package/dist/twilight/{p-BtX1c92T.js → p-B5aVfdOq.js} +1 -1
- package/dist/twilight/{p-vyrufVPp.js → p-B6nHsUmY.js} +1 -1
- package/dist/twilight/{p-ZcLtdl4h.js → p-BEG98TtY.js} +1 -1
- package/dist/twilight/{p-B2zrudLY.js → p-CTLj8xU3.js} +1 -1
- package/dist/twilight/{p-cvi2AidY.js → p-D-wDhUx5.js} +1 -1
- package/dist/twilight/{p-ZtftOSrB.js → p-D0khSRlI.js} +1 -1
- package/dist/twilight/{p-BwITjP3T.js → p-_9i6OtFf.js} +1 -1
- package/dist/twilight/{p-yGPVu3Cw.js → p-_uYeO1XY.js} +1 -1
- package/dist/twilight/{p-6032aa21.entry.js → p-a0c775b0.entry.js} +1 -1
- package/dist/twilight/{p-0039bfa0.entry.js → p-a492282a.entry.js} +1 -1
- package/dist/twilight/{p-53a239b8.entry.js → p-a5a4a9c4.entry.js} +1 -1
- package/dist/twilight/{p-2706d0ec.entry.js → p-a9f516c8.entry.js} +1 -1
- package/dist/twilight/p-aad3c860.entry.js +4 -0
- package/dist/twilight/{p-0dd8797a.entry.js → p-b003a630.entry.js} +1 -1
- package/dist/twilight/{p-D0Ft2F4m.js → p-ba7hQHgb.js} +1 -1
- package/dist/twilight/{p-d0f3a488.entry.js → p-c2c428e7.entry.js} +1 -1
- package/dist/twilight/{p-92bac59b.entry.js → p-c3087e4b.entry.js} +1 -1
- package/dist/twilight/{p-25332ded.entry.js → p-c39c381b.entry.js} +1 -1
- package/dist/twilight/{p-31794b61.entry.js → p-c8dedc2d.entry.js} +1 -1
- package/dist/twilight/{p-f0e920fb.entry.js → p-c9e78561.entry.js} +1 -1
- package/dist/twilight/{p-4bb7bbbe.entry.js → p-ca62e17c.entry.js} +1 -1
- package/dist/twilight/{p-d2b898e8.entry.js → p-cb77c16b.entry.js} +1 -1
- package/dist/twilight/{p-85604eb3.entry.js → p-cc551a73.entry.js} +1 -1
- package/dist/twilight/{p-110474f8.entry.js → p-d218c2ff.entry.js} +1 -1
- package/dist/twilight/{p-ad5791fe.entry.js → p-d29c6154.entry.js} +1 -1
- package/dist/twilight/{p-6d305158.entry.js → p-d680ef32.entry.js} +1 -1
- package/dist/twilight/{p-c04b664d.entry.js → p-d6b4621a.entry.js} +1 -1
- package/dist/twilight/{p-88e3d40c.entry.js → p-d950df54.entry.js} +1 -1
- package/dist/twilight/{p-dbd3f746.entry.js → p-dcbd52a9.entry.js} +1 -1
- package/dist/twilight/{p-d872a471.entry.js → p-dde28f2e.entry.js} +1 -1
- package/dist/twilight/{p-b6deb4a4.entry.js → p-df55b402.entry.js} +1 -1
- package/dist/twilight/{p-410569ac.entry.js → p-dfa1ddc1.entry.js} +1 -1
- package/dist/twilight/{p-3477d272.entry.js → p-dfeeb15e.entry.js} +1 -1
- package/dist/twilight/{p-cdb79b26.entry.js → p-e37fe440.entry.js} +1 -1
- package/dist/twilight/{p-008d5700.entry.js → p-f2203ac6.entry.js} +1 -1
- package/dist/twilight/{p-aae40c4f.entry.js → p-fb9806d9.entry.js} +1 -1
- package/dist/twilight/{p-107fb612.entry.js → p-fda57a16.entry.js} +1 -1
- package/dist/twilight/{p-b8320f71.entry.js → p-ffeb8d66.entry.js} +1 -1
- package/dist/twilight/{p-DzkWqggv.js → p-l3RnLhEs.js} +1 -1
- package/dist/twilight/{p-CNVLmZO5.js → p-rIbWLXjW.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- 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/package.json +5 -5
- package/dist/twilight/p-bfbae3a8.entry.js +0 -4
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
4
|
import { h, Host } from "@stencil/core";
|
|
5
|
+
import { fetchCities, fetchDeliveryMessage } from "./delivery-promise-api";
|
|
6
|
+
import { filterCitiesForModal } from "./delivery-promise-city-filter";
|
|
7
|
+
import { buildBulletOpenPayload, resolveIntent } from "./delivery-promise-intent";
|
|
8
|
+
import { DEFAULT_LABELS, getCityDisplayName, loadLabels } from "./delivery-promise-labels";
|
|
5
9
|
/**
|
|
6
10
|
* @name SallaDeliveryPromise
|
|
7
11
|
* @description Displays delivery promise message (from BE) with city selection
|
|
@@ -9,106 +13,127 @@ import { h, Host } from "@stencil/core";
|
|
|
9
13
|
*/
|
|
10
14
|
export class SallaDeliveryPromise {
|
|
11
15
|
constructor() {
|
|
12
|
-
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
16
|
+
// ── Feature flags & config ────────────────────────────────────────────
|
|
17
|
+
this.isDeliveryPromiseEnabled = false;
|
|
18
|
+
this.isLoginCycleEnabled = false;
|
|
19
|
+
this.canRender = false;
|
|
20
|
+
// ── Shared display state ──────────────────────────────────────────────
|
|
21
|
+
this.labels = DEFAULT_LABELS;
|
|
22
|
+
this.selectedLabel = null;
|
|
15
23
|
this.deliveryMessage = null;
|
|
16
|
-
this.isLoadingCities = false;
|
|
17
|
-
this.isLoadingPromises = false;
|
|
18
|
-
this.isDropdownOpen = false;
|
|
19
|
-
this.searchQuery = '';
|
|
20
24
|
this.hasError = false;
|
|
21
25
|
this.errorMessage = '';
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
this.isLoadingPromises = false;
|
|
27
|
+
// ── Login-cycle state (bullet delivery integration) ───────────────────
|
|
28
|
+
this.selectedCityLoginCycle = null;
|
|
29
|
+
this.selectedBranchLoginCycle = null;
|
|
30
|
+
// ── Standard flow state (city list) ───────────────────────────────────
|
|
31
|
+
this.cities = [];
|
|
32
|
+
this.selectedCity = null;
|
|
33
|
+
this.isLoadingCities = false;
|
|
34
|
+
// ── City-change modal state (non–login-cycle) ─────────────────────────
|
|
35
|
+
this.modalSearchQuery = '';
|
|
36
|
+
this.cityPendingSelection = null;
|
|
37
|
+
this.isCityPopoverOpen = false;
|
|
38
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
39
|
+
// Login-cycle (bullet delivery) integration
|
|
40
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
41
|
+
this.onBulletDeliveryConfirmed = () => {
|
|
42
|
+
this.applyBulletIntent();
|
|
29
43
|
};
|
|
30
|
-
this.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
this.productId = undefined;
|
|
34
|
-
this.onClickOutside = (e) => {
|
|
35
|
-
if (this.host.contains(e.target)) {
|
|
36
|
-
return; // click inside component (e.g. search input, city list) — don't close
|
|
37
|
-
}
|
|
38
|
-
this.isDropdownOpen = false;
|
|
39
|
-
window.removeEventListener('click', this.onClickOutside);
|
|
44
|
+
this.handleModalSearchInput = (event) => {
|
|
45
|
+
this.modalSearchQuery = event.target.value;
|
|
46
|
+
this.isCityPopoverOpen = true;
|
|
40
47
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
this.labels = {
|
|
44
|
-
deliveryTo: salla.lang.getWithDefault('pages.products.promise_deliver_to', 'توصيل إلى'),
|
|
45
|
-
pickupFromBranch: salla.lang.getWithDefault('pages.products.promise_pickup_from_branch', 'الاستلام من فرع'),
|
|
46
|
-
searchPlaceholder: salla.lang.getWithDefault('blocks.header.search_placeholder', 'بحث...'),
|
|
47
|
-
noResults: salla.lang.getWithDefault('common.elements.no_options', 'لا توجد نتائج'),
|
|
48
|
-
selectCity: salla.lang.getWithDefault('common.elements.select_city', 'اختر المدينة'),
|
|
48
|
+
this.handleModalComboboxActivate = () => {
|
|
49
|
+
this.isCityPopoverOpen = true;
|
|
49
50
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
52
|
+
// Header click (dispatches to correct flow)
|
|
53
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
54
|
+
this.handleHeaderClick = (e) => {
|
|
55
|
+
e.stopPropagation();
|
|
56
|
+
if (this.isLoginCycleEnabled) {
|
|
57
|
+
this.openBulletDeliveryModal();
|
|
55
58
|
}
|
|
56
59
|
else {
|
|
57
|
-
|
|
60
|
+
void this.openCityChangeModal();
|
|
58
61
|
}
|
|
59
|
-
}
|
|
62
|
+
};
|
|
60
63
|
}
|
|
64
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
65
|
+
// Lifecycle
|
|
66
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
61
67
|
async componentDidLoad() {
|
|
62
68
|
await salla.onReady();
|
|
63
69
|
await salla.lang.onLoaded();
|
|
64
|
-
this.
|
|
65
|
-
this.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
this.
|
|
70
|
-
|
|
70
|
+
this.labels = loadLabels();
|
|
71
|
+
this.isDeliveryPromiseEnabled = salla.config.get('store.features', []).includes('delivery-promises');
|
|
72
|
+
this.isLoginCycleEnabled = salla.config.get('store.features', []).includes('bullet-delivery-v2');
|
|
73
|
+
this.productId = salla.config.get('page.id');
|
|
74
|
+
if (!this.isDeliveryPromiseEnabled) {
|
|
75
|
+
this.canRender = false;
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (this.isLoginCycleEnabled) {
|
|
79
|
+
this.applyBulletIntent();
|
|
80
|
+
this.canRender = true;
|
|
81
|
+
window.addEventListener('bulletDeliveryConfirmed', this.onBulletDeliveryConfirmed);
|
|
71
82
|
}
|
|
72
83
|
else {
|
|
73
|
-
this.
|
|
74
|
-
this.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
84
|
+
this.selectedLabel = `${this.labels.deliveryTo} ${this.labels.selectCity}`;
|
|
85
|
+
await this.loadCities();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
disconnectedCallback() {
|
|
89
|
+
window.removeEventListener('bulletDeliveryConfirmed', this.onBulletDeliveryConfirmed);
|
|
90
|
+
}
|
|
91
|
+
applyBulletIntent() {
|
|
92
|
+
const resolved = resolveIntent();
|
|
93
|
+
if (!resolved) {
|
|
94
|
+
this.selectedLabel = `${this.labels.deliveryTo} ${this.labels.selectCity}`;
|
|
95
|
+
this.selectedCityLoginCycle = null;
|
|
96
|
+
this.selectedBranchLoginCycle = null;
|
|
97
|
+
this.deliveryMessage = null;
|
|
78
98
|
return;
|
|
79
99
|
}
|
|
80
|
-
|
|
100
|
+
if (resolved.type === 'address') {
|
|
101
|
+
this.selectedCityLoginCycle = resolved.option;
|
|
102
|
+
this.selectedBranchLoginCycle = null;
|
|
103
|
+
this.selectedLabel = `${this.labels.deliveryTo} ${resolved.option.name || this.labels.selectCity}`;
|
|
104
|
+
void this.loadDeliveryMessage(resolved.option.id, 'city');
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
this.selectedBranchLoginCycle = resolved.option;
|
|
108
|
+
this.selectedCityLoginCycle = null;
|
|
109
|
+
this.selectedLabel = `${this.labels.pickupFromBranch} ${resolved.option.name}`;
|
|
110
|
+
void this.loadDeliveryMessage(resolved.option.id, 'branch');
|
|
111
|
+
}
|
|
81
112
|
}
|
|
82
|
-
|
|
83
|
-
|
|
113
|
+
openBulletDeliveryModal() {
|
|
114
|
+
salla.event.emit('bullet-delivery::open', buildBulletOpenPayload());
|
|
115
|
+
}
|
|
116
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
117
|
+
// Standard flow (city list, no login cycle)
|
|
118
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
119
|
+
async loadCities() {
|
|
84
120
|
this.isLoadingCities = true;
|
|
85
121
|
this.hasError = false;
|
|
86
122
|
try {
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
this.logger('fetchCities success', { cities: response.data });
|
|
90
|
-
// Sort cities: explicit cities first (id !== -1), then "Rest of cities" (id === -1)
|
|
91
|
-
this.cities = this.sortCities(response.data);
|
|
92
|
-
this.filteredCities = [...this.cities];
|
|
93
|
-
// First, check if API returns a selected city (is_selected: true)
|
|
94
|
-
let cityToSelect = this.cities.find(c => c.is_selected);
|
|
95
|
-
if (!cityToSelect) {
|
|
96
|
-
this.logger('no selectedCity from API response');
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
this.logger('selectedCity', cityToSelect);
|
|
100
|
-
this.selectedCity = cityToSelect;
|
|
101
|
-
await this.fetchDeliveryMessage(cityToSelect.id);
|
|
102
|
-
}
|
|
103
|
-
this.canRender = true;
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
this.logger('no data returned from fetchCities', { response: response });
|
|
123
|
+
const { cities, preselected } = await fetchCities(this.productId);
|
|
124
|
+
if (cities.length === 0) {
|
|
107
125
|
this.canRender = false;
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
this.cities = cities;
|
|
129
|
+
if (preselected) {
|
|
130
|
+
this.selectedCity = preselected;
|
|
131
|
+
this.selectedLabel = `${this.labels.deliveryTo} ${getCityDisplayName(preselected)}`;
|
|
132
|
+
await this.loadDeliveryMessage(preselected.id, 'city');
|
|
108
133
|
}
|
|
134
|
+
this.canRender = true;
|
|
109
135
|
}
|
|
110
136
|
catch (error) {
|
|
111
|
-
this.logger('fetchCities error', { error: error.message });
|
|
112
137
|
this.hasError = true;
|
|
113
138
|
this.errorMessage = error.message || 'Failed to load cities';
|
|
114
139
|
this.canRender = false;
|
|
@@ -117,130 +142,113 @@ export class SallaDeliveryPromise {
|
|
|
117
142
|
this.isLoadingCities = false;
|
|
118
143
|
}
|
|
119
144
|
}
|
|
120
|
-
|
|
121
|
-
|
|
145
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
146
|
+
// Delivery message (shared by both flows)
|
|
147
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
148
|
+
async loadDeliveryMessage(id, optionType) {
|
|
122
149
|
this.isLoadingPromises = true;
|
|
123
150
|
this.hasError = false;
|
|
124
151
|
this.deliveryMessage = null;
|
|
125
152
|
try {
|
|
126
|
-
|
|
127
|
-
if (response.success && response.data?.message) {
|
|
128
|
-
const message = response.data.message.trim();
|
|
129
|
-
this.logger('fetchDeliveryMessage success', { message });
|
|
130
|
-
this.deliveryMessage = message || null;
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
this.logger('deliveryMessage not valid', { response });
|
|
134
|
-
}
|
|
153
|
+
this.deliveryMessage = await fetchDeliveryMessage(this.productId, id, optionType, this.isLoginCycleEnabled);
|
|
135
154
|
}
|
|
136
155
|
catch (error) {
|
|
137
|
-
this.logger('fetchDeliveryMessage error', { error: error.message });
|
|
138
156
|
this.hasError = true;
|
|
139
|
-
this.errorMessage =
|
|
157
|
+
this.errorMessage = optionType === 'city' ? this.labels.errorDeliveryPromise : this.labels.errorPickupPromise;
|
|
140
158
|
}
|
|
141
159
|
finally {
|
|
142
160
|
this.isLoadingPromises = false;
|
|
143
161
|
}
|
|
144
162
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
// "Rest of cities" (id === -1) should always be at the end
|
|
167
|
-
if (a.id === -1)
|
|
168
|
-
return 1;
|
|
169
|
-
if (b.id === -1)
|
|
170
|
-
return -1;
|
|
171
|
-
return 0;
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
handleSearch(event) {
|
|
175
|
-
const query = event.target.value.toLowerCase();
|
|
176
|
-
this.searchQuery = query;
|
|
177
|
-
if (query.length > 0) {
|
|
178
|
-
this.filteredCities = this.cities.filter(city => city.name.toLowerCase()?.includes(query) ||
|
|
179
|
-
(city.name_en || '').toLowerCase()?.includes(query));
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
this.filteredCities = [...this.cities];
|
|
163
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
164
|
+
// City-change modal handlers (non–login-cycle)
|
|
165
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
166
|
+
async openCityChangeModal() {
|
|
167
|
+
if (!this.cityModalRef)
|
|
168
|
+
return;
|
|
169
|
+
this.cityPendingSelection = null;
|
|
170
|
+
this.modalSearchQuery = '';
|
|
171
|
+
this.isCityPopoverOpen = false;
|
|
172
|
+
await this.cityModalRef.setTitle(this.labels.changeCityTitle);
|
|
173
|
+
await this.cityModalRef.open();
|
|
174
|
+
}
|
|
175
|
+
handleModalSelectCity(city) {
|
|
176
|
+
this.cityPendingSelection = city;
|
|
177
|
+
this.modalSearchQuery = getCityDisplayName(city);
|
|
178
|
+
this.isCityPopoverOpen = false;
|
|
179
|
+
}
|
|
180
|
+
async handleConfirmCityModal() {
|
|
181
|
+
if (!this.cityPendingSelection) {
|
|
182
|
+
await this.cityModalRef?.close();
|
|
183
|
+
return;
|
|
183
184
|
}
|
|
184
|
-
|
|
185
|
-
async selectCity(city) {
|
|
186
|
-
this.logger('selectCity', { city: city });
|
|
185
|
+
const city = this.cityPendingSelection;
|
|
187
186
|
this.selectedCity = city;
|
|
188
|
-
this.
|
|
189
|
-
|
|
190
|
-
this.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Skeleton shown during initial city fetch to avoid blank period and layout shift.
|
|
199
|
-
* Matches the structure/size of the real content (header + message area).
|
|
200
|
-
*/
|
|
201
|
-
renderInitialLoadingSkeleton() {
|
|
187
|
+
this.selectedLabel = `${this.labels.deliveryTo} ${getCityDisplayName(city)}`;
|
|
188
|
+
await this.loadDeliveryMessage(city.id, 'city');
|
|
189
|
+
await this.cityModalRef?.close();
|
|
190
|
+
}
|
|
191
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
192
|
+
// Render helpers
|
|
193
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
194
|
+
renderLoadingSkeleton() {
|
|
202
195
|
return (h(Host, { class: "s-delivery-promise-wrapper s-delivery-promise-skeleton" }, h("div", { class: "s-delivery-promise-container" }, h("div", { class: "s-delivery-promise-header s-delivery-promise-header-skeleton" }, h("div", { class: "s-delivery-promise-location" }, h("salla-skeleton", { height: "14px", width: "180px" })), h("salla-skeleton", { height: "18px", width: "18px" })), h("div", { class: "s-delivery-promise-loading" }, h("salla-skeleton", { height: "20px", width: "80%" })))));
|
|
203
196
|
}
|
|
204
197
|
renderDeliveryMessage() {
|
|
205
198
|
if (this.isLoadingPromises) {
|
|
206
199
|
return (h("div", { class: "s-delivery-promise-loading" }, h("salla-skeleton", { height: "20px", width: "80%" })));
|
|
207
200
|
}
|
|
208
|
-
if (!this.deliveryMessage)
|
|
201
|
+
if (!this.deliveryMessage)
|
|
209
202
|
return null;
|
|
210
|
-
}
|
|
211
|
-
|
|
203
|
+
return h("div", { class: "s-delivery-promise-message" }, this.deliveryMessage);
|
|
204
|
+
}
|
|
205
|
+
renderCityModalBody() {
|
|
206
|
+
const filtered = filterCitiesForModal(this.cities, this.modalSearchQuery);
|
|
207
|
+
return (h("div", { class: "s-delivery-promise-modal-body" }, h("label", { class: "s-delivery-promise-modal-field-label", htmlFor: "s-delivery-promise-modal-search" }, this.labels.cityFieldLabel, h("span", { class: "s-delivery-promise-required", "aria-hidden": "true" }, " *")), h("div", { class: "s-delivery-promise-modal-combobox" }, h("div", { class: "s-delivery-promise-modal-search", onClick: this.handleModalComboboxActivate }, h("i", { class: "sicon-search", "aria-hidden": "true" }), 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" })), h("div", { id: "s-delivery-promise-modal-listbox", class: "s-delivery-promise-modal-popover", role: "listbox", hidden: !this.isCityPopoverOpen }, h("div", { class: "s-delivery-promise-modal-list s-scrollbar" }, filtered.length === 0 ? (h("div", { class: "s-delivery-promise-modal-empty" }, this.labels.noResults)) : (filtered.map(city => (h("button", { key: city.id, type: "button", role: "option", class: {
|
|
208
|
+
's-delivery-promise-modal-item': true,
|
|
209
|
+
's-delivery-promise-modal-item--selected': this.cityPendingSelection?.id === city.id,
|
|
210
|
+
}, "aria-selected": this.cityPendingSelection?.id === city.id ? 'true' : 'false', onClick: e => {
|
|
211
|
+
e.stopPropagation();
|
|
212
|
+
this.handleModalSelectCity(city);
|
|
213
|
+
} }, h("span", { class: "s-delivery-promise-modal-item-name" }, city.name), this.cityPendingSelection?.id === city.id ? h("i", { class: "sicon-check", "aria-hidden": "true" }) : null)))))))));
|
|
214
|
+
}
|
|
215
|
+
renderCityChangeModal() {
|
|
216
|
+
if (this.isLoginCycleEnabled)
|
|
217
|
+
return null;
|
|
218
|
+
return (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(), h("salla-button", { slot: "footer", width: "wide", disabled: !this.cityPendingSelection, onClick: () => this.handleConfirmCityModal() }, !this.isLoadingPromises && this.labels.confirmAddress)));
|
|
212
219
|
}
|
|
220
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
221
|
+
// Main render
|
|
222
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
213
223
|
render() {
|
|
214
|
-
|
|
215
|
-
if (!this.requiresShipping) {
|
|
224
|
+
if (!this.isDeliveryPromiseEnabled)
|
|
216
225
|
return null;
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
if (this.
|
|
220
|
-
return this.renderInitialLoadingSkeleton();
|
|
221
|
-
}
|
|
222
|
-
// Fetch done but no cities / error — hide
|
|
223
|
-
if (!this.canRender || this.cities.length === 0) {
|
|
226
|
+
if (this.isLoadingCities)
|
|
227
|
+
return this.renderLoadingSkeleton();
|
|
228
|
+
if (!this.canRender)
|
|
224
229
|
return null;
|
|
225
|
-
}
|
|
226
|
-
return (h(Host, { class: "s-delivery-promise-wrapper" }, h("div", { class: "s-delivery-promise-container" }, h("div", { class: "s-delivery-promise-header", onClick: (e) => this.toggleDropdown(e) }, h("div", { class: "s-delivery-promise-location" }, h("span", { class: "s-delivery-promise-title" }, this.labels.deliveryTo, " ", this.selectedCity?.name || this.labels.selectCity)), h("i", { class: `sicon-keyboard_arrow_down s-delivery-promise-arrow ${this.isDropdownOpen ? 'open' : ''}` })), this.hasError && (h("div", { class: "s-delivery-promise-error" }, this.errorMessage)), this.isDropdownOpen && this.renderDropdown(), !this.hasError && this.renderDeliveryMessage())));
|
|
230
|
+
return (h(Host, { class: "s-delivery-promise-wrapper" }, h("div", { class: "s-delivery-promise-container" }, h("div", { class: "s-delivery-promise-header", onClick: this.handleHeaderClick }, h("div", { class: "s-delivery-promise-location" }, h("span", { class: "s-delivery-promise-title" }, this.selectedLabel)), h("i", { class: `sicon-keyboard_arrow_down s-delivery-promise-arrow` })), this.hasError && h("div", { class: "s-delivery-promise-error" }, this.errorMessage), !this.hasError && this.renderDeliveryMessage()), this.renderCityChangeModal()));
|
|
227
231
|
}
|
|
228
232
|
static get is() { return "salla-delivery-promise"; }
|
|
229
233
|
static get states() {
|
|
230
234
|
return {
|
|
231
|
-
"
|
|
232
|
-
"
|
|
233
|
-
"
|
|
235
|
+
"isDeliveryPromiseEnabled": {},
|
|
236
|
+
"isLoginCycleEnabled": {},
|
|
237
|
+
"canRender": {},
|
|
238
|
+
"labels": {},
|
|
239
|
+
"selectedLabel": {},
|
|
234
240
|
"deliveryMessage": {},
|
|
235
|
-
"isLoadingCities": {},
|
|
236
|
-
"isLoadingPromises": {},
|
|
237
|
-
"isDropdownOpen": {},
|
|
238
|
-
"searchQuery": {},
|
|
239
241
|
"hasError": {},
|
|
240
242
|
"errorMessage": {},
|
|
241
|
-
"
|
|
242
|
-
"
|
|
243
|
-
"
|
|
243
|
+
"isLoadingPromises": {},
|
|
244
|
+
"selectedCityLoginCycle": {},
|
|
245
|
+
"selectedBranchLoginCycle": {},
|
|
246
|
+
"cities": {},
|
|
247
|
+
"selectedCity": {},
|
|
248
|
+
"isLoadingCities": {},
|
|
249
|
+
"modalSearchQuery": {},
|
|
250
|
+
"cityPendingSelection": {},
|
|
251
|
+
"isCityPopoverOpen": {}
|
|
244
252
|
};
|
|
245
253
|
}
|
|
246
254
|
static get elementRef() { return "host"; }
|