@salla.sa/twilight-components 2.14.390 → 2.14.392
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-DFct_qpx.js → filepond-D-ur1GA-.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-B_Lr4Ulx.js → filepond-plugin-file-poster-DigEeKId.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BqkoO_hr.js → filepond-plugin-file-validate-size-R9el3Yro.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DyTH8eH0.js → filepond-plugin-file-validate-type-Dfy66STE.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-Cxg-WjCl.js → filepond-plugin-image-edit-bhI8kqN_.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BSVkpMNu.js → filepond-plugin-image-exif-orientation-COXZUVRV.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-DNcmQwuK.js → filepond-plugin-image-preview-COP8QJBf.js} +1 -1
- package/dist/cjs/{index-DnQaQgSB.js → index-BILBEE9f.js} +1 -1
- package/dist/cjs/{index-B8vh41va.js → index-CGnPURjZ.js} +10 -2
- 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-booking-field_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-bullet-delivery.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +230 -0
- 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 +45 -0
- 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 +2 -3
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
- package/dist/cjs/salla-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.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-products-slider.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-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/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-BZ48aiBi.js → vanilla-picker-DI3TImGd.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/salla-delivery-promise/interfaces.js +1 -0
- package/dist/collection/components/salla-delivery-promise/salla-delivery-promise.js +247 -0
- package/dist/collection/components/salla-fulfillment-methods/salla-fulfillment-methods.js +51 -0
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +1 -2
- package/dist/components/index.js +2 -2
- package/dist/components/salla-delivery-promise.d.ts +11 -0
- package/dist/components/salla-delivery-promise.js +266 -0
- package/dist/components/salla-fulfillment-methods.d.ts +11 -0
- package/dist/components/salla-fulfillment-methods.js +64 -0
- package/dist/components/salla-login-modal2.js +1 -2
- package/dist/esm/{filepond-C9FlNeRD.js → filepond-kTbl0kuh.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-BfX4exY0.js → filepond-plugin-file-poster-CyywnjKv.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-B5-cSfmI.js → filepond-plugin-file-validate-size-DgteZhje.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DKvNhI35.js → filepond-plugin-file-validate-type-BYs_scJr.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DV1-ZICm.js → filepond-plugin-image-edit-pZ_mETE7.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-idrSYwAk.js → filepond-plugin-image-exif-orientation-CjKYl7HL.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-os8BCUOs.js → filepond-plugin-image-preview-BzJTl_2A.js} +1 -1
- package/dist/esm/{index-DQCZHaDc.js → index-3Kis_Ivk.js} +1 -1
- package/dist/esm/{index-BcMtCVX0.js → index-C23tPnnH.js} +10 -2
- 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-booking-field_7.entry.js +10 -10
- package/dist/esm/salla-bullet-delivery.entry.js +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +228 -0
- 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 +43 -0
- 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 +2 -3
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +1 -1
- package/dist/esm/salla-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.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-products-slider.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-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/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-BBEKwYz7.js → vanilla-picker-CEy5x8Cf.js} +1 -1
- package/dist/twilight/{p-689701b4.entry.js → p-05663bb1.entry.js} +1 -1
- package/dist/twilight/{p-129d6c0c.entry.js → p-0652987b.entry.js} +1 -1
- package/dist/twilight/{p-5174aa32.entry.js → p-11767786.entry.js} +1 -1
- package/dist/twilight/{p-5a629abd.entry.js → p-14529fd6.entry.js} +1 -1
- package/dist/twilight/{p-c45f2128.entry.js → p-1899f283.entry.js} +1 -1
- package/dist/twilight/{p-8fbd92a2.entry.js → p-194d87c6.entry.js} +1 -1
- package/dist/twilight/{p-48353d62.entry.js → p-1b1f9f71.entry.js} +1 -1
- package/dist/twilight/p-1c215c8c.entry.js +4 -0
- package/dist/twilight/{p-35a2ea22.entry.js → p-1c8394db.entry.js} +1 -1
- package/dist/twilight/{p-374c63c7.entry.js → p-1ca75c99.entry.js} +1 -1
- package/dist/twilight/{p-74472650.entry.js → p-1dbaefb8.entry.js} +1 -1
- package/dist/twilight/{p-374057f7.entry.js → p-27f34c85.entry.js} +1 -1
- package/dist/twilight/{p-207950ad.entry.js → p-2a1871c2.entry.js} +1 -1
- package/dist/twilight/{p-fd22cd01.entry.js → p-2aa48902.entry.js} +1 -1
- package/dist/twilight/{p-67cf0723.entry.js → p-344c1910.entry.js} +1 -1
- package/dist/twilight/{p-7855ae93.entry.js → p-346b55d6.entry.js} +1 -1
- package/dist/twilight/{p-67bc002a.entry.js → p-3745a7d0.entry.js} +1 -1
- package/dist/twilight/{p-c5522363.entry.js → p-3962c34c.entry.js} +1 -1
- package/dist/twilight/{p-dc6f4d54.entry.js → p-3a5aaa20.entry.js} +1 -1
- package/dist/twilight/{p-26cb1fdf.entry.js → p-407828e4.entry.js} +1 -1
- package/dist/twilight/{p-d607bfd3.entry.js → p-4e00f827.entry.js} +1 -1
- package/dist/twilight/{p-687a597a.entry.js → p-4e9e3ab1.entry.js} +1 -1
- package/dist/twilight/{p-70e478a6.entry.js → p-50621375.entry.js} +1 -1
- package/dist/twilight/{p-a6cbb4f5.entry.js → p-549f59ed.entry.js} +1 -1
- package/dist/twilight/{p-a8fd427d.entry.js → p-54f65187.entry.js} +1 -1
- package/dist/twilight/{p-983f9f1e.entry.js → p-5d37cc33.entry.js} +1 -1
- package/dist/twilight/{p-d862646f.entry.js → p-5ef1b170.entry.js} +1 -1
- package/dist/twilight/{p-b697172b.entry.js → p-651fe6e4.entry.js} +1 -1
- package/dist/twilight/{p-e7932d3d.entry.js → p-67fe5680.entry.js} +1 -1
- package/dist/twilight/{p-412643eb.entry.js → p-713590e2.entry.js} +1 -1
- package/dist/twilight/{p-65df6042.entry.js → p-726513f8.entry.js} +1 -1
- package/dist/twilight/{p-9bf0a7df.entry.js → p-744d6394.entry.js} +1 -1
- package/dist/twilight/{p-2548fa30.entry.js → p-753464fd.entry.js} +1 -1
- package/dist/twilight/{p-47cd7ceb.entry.js → p-775b42ec.entry.js} +1 -1
- package/dist/twilight/{p-8d4d4a0e.entry.js → p-7b717899.entry.js} +1 -1
- package/dist/twilight/{p-0b27ca19.entry.js → p-81f648a2.entry.js} +1 -1
- package/dist/twilight/{p-0d0ca330.entry.js → p-81f6638f.entry.js} +1 -1
- package/dist/twilight/{p-e879fb84.entry.js → p-81f76d49.entry.js} +1 -1
- package/dist/twilight/{p-deb74e2e.entry.js → p-827edf95.entry.js} +1 -1
- package/dist/twilight/{p-5d2ebf97.entry.js → p-82e3c734.entry.js} +1 -1
- package/dist/twilight/{p-9ff1a4dc.entry.js → p-85ceef78.entry.js} +1 -1
- package/dist/twilight/p-866b297b.entry.js +4 -0
- package/dist/twilight/{p-f63999f8.entry.js → p-8c6db6d7.entry.js} +1 -1
- package/dist/twilight/{p-c2d74b3d.entry.js → p-97df32eb.entry.js} +1 -1
- package/dist/twilight/{p-596525f9.entry.js → p-98eb495e.entry.js} +1 -1
- package/dist/twilight/{p-15a052c7.entry.js → p-9deae4f4.entry.js} +1 -1
- package/dist/twilight/{p-58fa3856.entry.js → p-9f23dd30.entry.js} +1 -1
- package/dist/twilight/{p-DbdyybJU.js → p-AfW2b46_.js} +1 -1
- package/dist/twilight/{p-fbLtV-T9.js → p-BHjlzmYy.js} +1 -1
- package/dist/twilight/{p-DIeaJrGb.js → p-BgG5eq1x.js} +1 -1
- package/dist/twilight/{p-ukob-enB.js → p-BqCmPfAo.js} +1 -1
- package/dist/twilight/{p-BcMtCVX0.js → p-C23tPnnH.js} +2 -2
- package/dist/twilight/{p-Bc2ExcVy.js → p-CU-HtXWh.js} +1 -1
- package/dist/twilight/p-CrYUKEsF.js +9 -0
- package/dist/twilight/p-HWjjIZ9_.js +9 -0
- package/dist/twilight/{p-UFbwqsEd.js → p-Ig1Tafsp.js} +1 -1
- package/dist/twilight/{p-C3Z9uRGX.js → p-IoI86ovS.js} +1 -1
- package/dist/twilight/{p-a54364a3.entry.js → p-a00e249b.entry.js} +1 -1
- package/dist/twilight/{p-e7671432.entry.js → p-a50f7f70.entry.js} +1 -1
- package/dist/twilight/{p-a909028d.entry.js → p-a76b3dba.entry.js} +1 -1
- package/dist/twilight/{p-bb98a631.entry.js → p-b4f07395.entry.js} +1 -1
- package/dist/twilight/{p-359b2de3.entry.js → p-b55da21d.entry.js} +1 -1
- package/dist/twilight/{p-a6bb162e.entry.js → p-b6ded196.entry.js} +1 -1
- package/dist/twilight/{p-3653ad70.entry.js → p-ba4b672c.entry.js} +1 -1
- package/dist/twilight/{p-acd70c2f.entry.js → p-bdcf3926.entry.js} +1 -1
- package/dist/twilight/{p-f100cc25.entry.js → p-c3d0c062.entry.js} +1 -1
- package/dist/twilight/{p-c18179ed.entry.js → p-c68f3054.entry.js} +1 -1
- package/dist/twilight/{p-4866439f.entry.js → p-c8aa5377.entry.js} +1 -1
- package/dist/twilight/{p-a39a0eb8.entry.js → p-c9001d7f.entry.js} +1 -1
- package/dist/twilight/{p-dbcc0a7f.entry.js → p-ce9fee6d.entry.js} +1 -1
- package/dist/twilight/{p-e9c7f99a.entry.js → p-cf9573fd.entry.js} +1 -1
- package/dist/twilight/{p-2b74eb03.entry.js → p-d022b6ec.entry.js} +1 -1
- package/dist/twilight/{p-dfa729d4.entry.js → p-d1dd1db6.entry.js} +1 -1
- package/dist/twilight/{p-4f3964d8.entry.js → p-d81ad2c3.entry.js} +1 -1
- package/dist/twilight/{p-58c66b0d.entry.js → p-e6124fab.entry.js} +1 -1
- package/dist/twilight/{p-47d1003b.entry.js → p-e89812d8.entry.js} +1 -1
- package/dist/twilight/{p-1054b66c.entry.js → p-eb5a8329.entry.js} +1 -1
- package/dist/twilight/{p-00a2d261.entry.js → p-f1f74b41.entry.js} +1 -1
- package/dist/twilight/{p-cc6c624c.entry.js → p-f201122a.entry.js} +1 -1
- package/dist/twilight/{p-c6e7b06f.entry.js → p-f251e744.entry.js} +1 -1
- package/dist/twilight/{p-4fefd2df.entry.js → p-f2ee9ceb.entry.js} +1 -1
- package/dist/twilight/{p-ae1e338f.entry.js → p-f8b6967f.entry.js} +1 -1
- package/dist/twilight/{p-b19ace8d.entry.js → p-face0448.entry.js} +1 -1
- package/dist/twilight/{p-998a3b5f.entry.js → p-ff6f769c.entry.js} +1 -1
- package/dist/twilight/{p-8c86ba24.entry.js → p-ff9b33bb.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-delivery-promise/interfaces.d.ts +27 -0
- package/dist/types/components/salla-delivery-promise/salla-delivery-promise.d.ts +48 -0
- package/dist/types/components/salla-fulfillment-methods/salla-fulfillment-methods.d.ts +18 -0
- package/dist/types/components.d.ts +66 -0
- package/package.json +5 -5
- package/dist/twilight/p-B21QGKK8.js +0 -9
- package/dist/twilight/p-ctIqN5Fo.js +0 -9
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SallaDeliveryPromise extends Components.SallaDeliveryPromise, HTMLElement {}
|
|
4
|
+
export const SallaDeliveryPromise: {
|
|
5
|
+
prototype: SallaDeliveryPromise;
|
|
6
|
+
new (): SallaDeliveryPromise;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
|
+
import { d as defineCustomElement$2 } from './salla-skeleton2.js';
|
|
6
|
+
|
|
7
|
+
const SallaDeliveryPromise$1 = /*@__PURE__*/ proxyCustomElement(class SallaDeliveryPromise extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.cities = [];
|
|
12
|
+
this.filteredCities = [];
|
|
13
|
+
this.selectedCity = null;
|
|
14
|
+
this.deliveryMessage = null;
|
|
15
|
+
this.isLoadingCities = false;
|
|
16
|
+
this.isLoadingPromises = false;
|
|
17
|
+
this.isDropdownOpen = false;
|
|
18
|
+
this.searchQuery = '';
|
|
19
|
+
this.hasError = false;
|
|
20
|
+
this.errorMessage = '';
|
|
21
|
+
/** i18n labels for city selector only; message comes from BE */
|
|
22
|
+
this.labels = {
|
|
23
|
+
deliveryTo: 'توصيل إلى',
|
|
24
|
+
pickupFromBranch: 'الاستلام من فرع',
|
|
25
|
+
searchPlaceholder: 'بحث...',
|
|
26
|
+
noResults: 'لا توجد نتائج',
|
|
27
|
+
selectCity: 'اختر المدينة',
|
|
28
|
+
};
|
|
29
|
+
this.canRender = false;
|
|
30
|
+
this.requiresShipping = false;
|
|
31
|
+
/** Used only for API calls, not rendered — no need for @State */
|
|
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);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
setLabels() {
|
|
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', 'اختر المدينة'),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
logger(message, data) {
|
|
51
|
+
if (localStorage.getItem('salla-delivery-promise-debug')) {
|
|
52
|
+
if (data) {
|
|
53
|
+
console.log(message, data);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
console.log(message);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async componentDidLoad() {
|
|
61
|
+
await salla.onReady();
|
|
62
|
+
await salla.lang.onLoaded();
|
|
63
|
+
this.setLabels();
|
|
64
|
+
this.requiresShipping = salla.url.is_page('product.single') &&
|
|
65
|
+
salla.config.get('store.features', []).includes('delivery-promises');
|
|
66
|
+
if (this.requiresShipping) {
|
|
67
|
+
this.logger('requiresShipping', this.requiresShipping);
|
|
68
|
+
this.productId = salla.config.get('page.id');
|
|
69
|
+
this.logger('productId', this.productId);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
this.canRender = false;
|
|
73
|
+
this.logger('not requiresShipping', {
|
|
74
|
+
is_product_single: salla.url.is_page('product.single'),
|
|
75
|
+
includesDeliveryPromises: salla.config.get('store.features', []).includes('delivery-promises')
|
|
76
|
+
});
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
await this.fetchCities();
|
|
80
|
+
}
|
|
81
|
+
async fetchCities() {
|
|
82
|
+
this.logger('start startfetchCities');
|
|
83
|
+
this.isLoadingCities = true;
|
|
84
|
+
this.hasError = false;
|
|
85
|
+
try {
|
|
86
|
+
const response = await salla.api.request(salla.url.api(`products/${this.productId}/delivery-promises/cities`));
|
|
87
|
+
if (response.success && Array.isArray(response.data) && response.data.length > 0) {
|
|
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 });
|
|
106
|
+
this.canRender = false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
this.logger('fetchCities error', { error: error.message });
|
|
111
|
+
this.hasError = true;
|
|
112
|
+
this.errorMessage = error.message || 'Failed to load cities';
|
|
113
|
+
this.canRender = false;
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
this.isLoadingCities = false;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
async fetchDeliveryMessage(cityId) {
|
|
120
|
+
this.logger('start fetchDeliveryMessage', { cityId });
|
|
121
|
+
this.isLoadingPromises = true;
|
|
122
|
+
this.hasError = false;
|
|
123
|
+
this.deliveryMessage = null;
|
|
124
|
+
try {
|
|
125
|
+
const response = await salla.api.withoutNotifier(() => salla.api.request(salla.url.api(`products/${this.productId}/delivery-promises?city_id=${cityId}`)));
|
|
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
|
+
}
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
this.logger('fetchDeliveryMessage error', { error: error.message });
|
|
137
|
+
this.hasError = true;
|
|
138
|
+
this.errorMessage = error.message || 'Failed to load delivery message';
|
|
139
|
+
}
|
|
140
|
+
finally {
|
|
141
|
+
this.isLoadingPromises = false;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
toggleDropdown(e) {
|
|
145
|
+
e?.stopPropagation();
|
|
146
|
+
this.isDropdownOpen = !this.isDropdownOpen;
|
|
147
|
+
if (this.isDropdownOpen) {
|
|
148
|
+
window.addEventListener('click', this.onClickOutside);
|
|
149
|
+
if (this.searchInputRef) {
|
|
150
|
+
setTimeout(() => this.searchInputRef.focus(), 100);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
window.removeEventListener('click', this.onClickOutside);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
disconnectedCallback() {
|
|
158
|
+
window.removeEventListener('click', this.onClickOutside);
|
|
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
|
+
}
|
|
183
|
+
}
|
|
184
|
+
async selectCity(city) {
|
|
185
|
+
this.logger('selectCity', { city: city });
|
|
186
|
+
this.selectedCity = city;
|
|
187
|
+
this.isDropdownOpen = false;
|
|
188
|
+
window.removeEventListener('click', this.onClickOutside);
|
|
189
|
+
this.searchQuery = '';
|
|
190
|
+
this.filteredCities = [...this.cities];
|
|
191
|
+
await this.fetchDeliveryMessage(city.id);
|
|
192
|
+
}
|
|
193
|
+
renderDropdown() {
|
|
194
|
+
return (h("div", { class: "s-delivery-promise-dropdown" }, h("div", { class: "s-delivery-promise-dropdown-search" }, h("i", { class: "sicon-search" }), h("input", { type: "text", placeholder: this.labels.searchPlaceholder, value: this.searchQuery, onInput: (e) => this.handleSearch(e), ref: el => this.searchInputRef = el })), h("div", { class: "s-delivery-promise-dropdown-list" }, this.filteredCities.length === 0 ? (h("div", { class: "s-delivery-promise-dropdown-empty" }, this.labels.noResults)) : (this.filteredCities.map(city => (h("div", { key: city.id, class: `s-delivery-promise-dropdown-item ${this.selectedCity?.id === city.id ? 'selected' : ''}`, onClick: () => this.selectCity(city) }, h("span", { class: "s-delivery-promise-city-name" }, city.name), this.selectedCity?.id === city.id && (h("i", { class: "sicon-check" })))))))));
|
|
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() {
|
|
201
|
+
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%" })))));
|
|
202
|
+
}
|
|
203
|
+
renderDeliveryMessage() {
|
|
204
|
+
if (this.isLoadingPromises) {
|
|
205
|
+
return (h("div", { class: "s-delivery-promise-loading" }, h("salla-skeleton", { height: "20px", width: "80%" })));
|
|
206
|
+
}
|
|
207
|
+
if (!this.deliveryMessage) {
|
|
208
|
+
return null;
|
|
209
|
+
}
|
|
210
|
+
return (h("div", { class: "s-delivery-promise-message" }, this.deliveryMessage));
|
|
211
|
+
}
|
|
212
|
+
render() {
|
|
213
|
+
// Not on product page or delivery-promises disabled — hide entirely
|
|
214
|
+
if (!this.requiresShipping) {
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
// Initial city fetch: show skeleton to avoid blank period and layout shift
|
|
218
|
+
if (this.isLoadingCities) {
|
|
219
|
+
return this.renderInitialLoadingSkeleton();
|
|
220
|
+
}
|
|
221
|
+
// Fetch done but no cities / error — hide
|
|
222
|
+
if (!this.canRender || this.cities.length === 0) {
|
|
223
|
+
return null;
|
|
224
|
+
}
|
|
225
|
+
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())));
|
|
226
|
+
}
|
|
227
|
+
get host() { return this; }
|
|
228
|
+
}, [0, "salla-delivery-promise", {
|
|
229
|
+
"cities": [32],
|
|
230
|
+
"filteredCities": [32],
|
|
231
|
+
"selectedCity": [32],
|
|
232
|
+
"deliveryMessage": [32],
|
|
233
|
+
"isLoadingCities": [32],
|
|
234
|
+
"isLoadingPromises": [32],
|
|
235
|
+
"isDropdownOpen": [32],
|
|
236
|
+
"searchQuery": [32],
|
|
237
|
+
"hasError": [32],
|
|
238
|
+
"errorMessage": [32],
|
|
239
|
+
"labels": [32],
|
|
240
|
+
"canRender": [32],
|
|
241
|
+
"requiresShipping": [32]
|
|
242
|
+
}]);
|
|
243
|
+
function defineCustomElement$1() {
|
|
244
|
+
if (typeof customElements === "undefined") {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
const components = ["salla-delivery-promise", "salla-skeleton"];
|
|
248
|
+
components.forEach(tagName => { switch (tagName) {
|
|
249
|
+
case "salla-delivery-promise":
|
|
250
|
+
if (!customElements.get(tagName)) {
|
|
251
|
+
customElements.define(tagName, SallaDeliveryPromise$1);
|
|
252
|
+
}
|
|
253
|
+
break;
|
|
254
|
+
case "salla-skeleton":
|
|
255
|
+
if (!customElements.get(tagName)) {
|
|
256
|
+
defineCustomElement$2();
|
|
257
|
+
}
|
|
258
|
+
break;
|
|
259
|
+
} });
|
|
260
|
+
}
|
|
261
|
+
defineCustomElement$1();
|
|
262
|
+
|
|
263
|
+
const SallaDeliveryPromise = SallaDeliveryPromise$1;
|
|
264
|
+
const defineCustomElement = defineCustomElement$1;
|
|
265
|
+
|
|
266
|
+
export { SallaDeliveryPromise, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SallaFulfillmentMethods extends Components.SallaFulfillmentMethods, HTMLElement {}
|
|
4
|
+
export const SallaFulfillmentMethods: {
|
|
5
|
+
prototype: SallaFulfillmentMethods;
|
|
6
|
+
new (): SallaFulfillmentMethods;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
|
+
|
|
6
|
+
const SallaFulfillmentMethods$1 = /*@__PURE__*/ proxyCustomElement(class SallaFulfillmentMethods extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.methods = [];
|
|
11
|
+
this.shouldRender = false;
|
|
12
|
+
}
|
|
13
|
+
async componentDidLoad() {
|
|
14
|
+
await Salla.onReady();
|
|
15
|
+
await Salla.lang.onLoaded();
|
|
16
|
+
if (!Salla.config.get('store.support_pickup'))
|
|
17
|
+
return;
|
|
18
|
+
this.shouldRender = true;
|
|
19
|
+
this.setLabels();
|
|
20
|
+
}
|
|
21
|
+
setLabels() {
|
|
22
|
+
this.methods = [
|
|
23
|
+
{
|
|
24
|
+
id: 'delivery',
|
|
25
|
+
title: Salla.lang.getWithDefault('pages.products.promise_delivery_title', 'متاح للتوصيل'),
|
|
26
|
+
subtitle: Salla.lang.getWithDefault('pages.products.promise_delivery_subtitle', 'طلبك يوصلك لباب البيت بسهولة.'),
|
|
27
|
+
iconClass: 'sicon-location',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 'pickup',
|
|
31
|
+
title: Salla.lang.getWithDefault('pages.products.promise_pickup_title', 'متاح للاستلام'),
|
|
32
|
+
subtitle: Salla.lang.getWithDefault('pages.products.promise_pickup_subtitle', 'استلام فوري من أقرب فرع.'),
|
|
33
|
+
iconClass: 'sicon-store',
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
if (!this.shouldRender)
|
|
39
|
+
return null;
|
|
40
|
+
return (h(Host, { class: "s-fulfillment-methods" }, h("div", { class: "s-fulfillment-methods-list" }, this.methods.map((method) => (h("div", { key: method.id, class: "s-fulfillment-methods-card" }, h("div", { class: "s-fulfillment-methods-content" }, h("div", { class: "s-fulfillment-methods-icon-wrap" }, h("i", { class: `${method.iconClass} s-fulfillment-methods-icon` })), h("div", { class: "s-fulfillment-methods-text" }, h("span", { class: "s-fulfillment-methods-title" }, method.title), h("span", { class: "s-fulfillment-methods-subtitle" }, method.subtitle)))))))));
|
|
41
|
+
}
|
|
42
|
+
}, [0, "salla-fulfillment-methods", {
|
|
43
|
+
"methods": [32],
|
|
44
|
+
"shouldRender": [32]
|
|
45
|
+
}]);
|
|
46
|
+
function defineCustomElement$1() {
|
|
47
|
+
if (typeof customElements === "undefined") {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const components = ["salla-fulfillment-methods"];
|
|
51
|
+
components.forEach(tagName => { switch (tagName) {
|
|
52
|
+
case "salla-fulfillment-methods":
|
|
53
|
+
if (!customElements.get(tagName)) {
|
|
54
|
+
customElements.define(tagName, SallaFulfillmentMethods$1);
|
|
55
|
+
}
|
|
56
|
+
break;
|
|
57
|
+
} });
|
|
58
|
+
}
|
|
59
|
+
defineCustomElement$1();
|
|
60
|
+
|
|
61
|
+
const SallaFulfillmentMethods = SallaFulfillmentMethods$1;
|
|
62
|
+
const defineCustomElement = defineCustomElement$1;
|
|
63
|
+
|
|
64
|
+
export { SallaFulfillmentMethods, defineCustomElement };
|
|
@@ -292,8 +292,7 @@ const SallaLoginModal = /*@__PURE__*/ proxyCustomElement(class SallaLoginModal e
|
|
|
292
292
|
async handleGuestCheckout() {
|
|
293
293
|
this.modal.close();
|
|
294
294
|
if (salla.config.isGuest()) {
|
|
295
|
-
|
|
296
|
-
return salla.cart.submit(true);
|
|
295
|
+
return salla.cart.submit(false, true);
|
|
297
296
|
}
|
|
298
297
|
}
|
|
299
298
|
openModal() {
|