@salla.sa/twilight-components 2.14.443 → 2.14.445
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-DUuldyqf.js → filepond-DHzf3TcL.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DCILZbgm.js → filepond-plugin-file-poster-BXm87rQo.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-DGRAQ0sm.js → filepond-plugin-file-validate-size-C5UIq4A2.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DYFEU9Tu.js → filepond-plugin-file-validate-type-DuhBUbfK.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BfFPad0T.js → filepond-plugin-image-edit-B9-VYsWc.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-OL_9sX5A.js → filepond-plugin-image-exif-orientation-DMpSTznq.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CJE7WqjM.js → filepond-plugin-image-preview-CMGkdkZi.js} +1 -1
- package/dist/cjs/{functions-CPtrW5R0.js → functions-9Nj0nrLx.js} +1 -1
- package/dist/cjs/{index-DTMl6O1v.js → index-DQZXng_4.js} +2 -2
- package/dist/cjs/{index-C39fe6Fg.js → index-rElwQMYM.js} +1 -1
- 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_5.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_2.cjs.entry.js +58 -42
- 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-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +144 -38
- 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-points-banner.cjs.entry.js +1 -1
- 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-next-order-coupon.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-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +15 -4
- 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-embed.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-Bxh4OHr8.js → tracked-promise-YvbHmmFp.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-BT7MIz0v.js → vanilla-picker-C02drqC1.js} +1 -1
- package/dist/collection/components/salla-gifting/salla-gifting.css +15 -0
- package/dist/collection/components/salla-gifting/salla-gifting.js +149 -36
- package/dist/collection/components/salla-order-edit/salla-order-edit.js +16 -4
- package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.js +97 -41
- package/dist/components/index.js +2 -2
- package/dist/components/salla-gifting.js +170 -51
- package/dist/components/salla-order-edit.js +16 -4
- package/dist/components/salla-searchable-dropdown2.js +59 -41
- package/dist/esm/{filepond-CzVc7z2L.js → filepond-D3RXwxDJ.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DCAos-M-.js → filepond-plugin-file-poster-Bn0h-4qC.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-QIZfch1N.js → filepond-plugin-file-validate-size-CN-3nZup.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DkQ2Tjmm.js → filepond-plugin-file-validate-type-BbLjL14b.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-BYTzgZli.js → filepond-plugin-image-edit-Dr_0Kpj1.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BShml-fP.js → filepond-plugin-image-exif-orientation-Bo8gf--w.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-BZSvWS5P.js → filepond-plugin-image-preview-CkgdmQBn.js} +1 -1
- package/dist/esm/{functions-BRYRoVDu.js → functions-CsLl2GF-.js} +1 -1
- package/dist/esm/{index-8AfwlDks.js → index-BZR5x5kv.js} +1 -1
- package/dist/esm/{index-C1Q9TkIB.js → index-DNtvpIPH.js} +2 -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_5.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_2.entry.js +58 -42
- 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-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +144 -38
- 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-points-banner.entry.js +1 -1
- 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-next-order-coupon.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-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +15 -4
- 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-embed.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-D1Ypxmkl.js → tracked-promise-BnC5Z9K7.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-Cydv9qqB.js → vanilla-picker-CF_W6ne1.js} +1 -1
- package/dist/twilight/{p-210fbf19.entry.js → p-007bf4b3.entry.js} +1 -1
- package/dist/twilight/{p-de41db95.entry.js → p-0418d2eb.entry.js} +1 -1
- package/dist/twilight/{p-ad400441.entry.js → p-058d72ba.entry.js} +1 -1
- package/dist/twilight/{p-fb7e9c2d.entry.js → p-062e5544.entry.js} +1 -1
- package/dist/twilight/p-06496953.entry.js +4 -0
- package/dist/twilight/{p-5f46564c.entry.js → p-08344e0e.entry.js} +1 -1
- package/dist/twilight/{p-a4ef1f08.entry.js → p-09aa60ca.entry.js} +1 -1
- package/dist/twilight/{p-7cc2c0cd.entry.js → p-0aea9987.entry.js} +1 -1
- package/dist/twilight/{p-13a48390.entry.js → p-108fff84.entry.js} +1 -1
- package/dist/twilight/{p-af72751b.entry.js → p-13cbd6eb.entry.js} +1 -1
- package/dist/twilight/{p-11c60244.entry.js → p-14b4b77f.entry.js} +1 -1
- package/dist/twilight/{p-0ea66318.entry.js → p-16e2e0a8.entry.js} +1 -1
- package/dist/twilight/p-185b629e.entry.js +4 -0
- package/dist/twilight/{p-615f0b05.entry.js → p-186df566.entry.js} +1 -1
- package/dist/twilight/{p-9f06e865.entry.js → p-2134195f.entry.js} +1 -1
- package/dist/twilight/{p-62721a71.entry.js → p-2282abc4.entry.js} +1 -1
- package/dist/twilight/{p-04ba55fb.entry.js → p-28e39ff0.entry.js} +1 -1
- package/dist/twilight/{p-50d27e92.entry.js → p-2b9deb4c.entry.js} +1 -1
- package/dist/twilight/{p-7b75d598.entry.js → p-2fb3d665.entry.js} +1 -1
- package/dist/twilight/{p-7af51165.entry.js → p-318e0847.entry.js} +1 -1
- package/dist/twilight/{p-30500443.entry.js → p-34c2e75f.entry.js} +1 -1
- package/dist/twilight/{p-5345526d.entry.js → p-38c677fb.entry.js} +1 -1
- package/dist/twilight/{p-75999cff.entry.js → p-3953d2cc.entry.js} +1 -1
- package/dist/twilight/{p-21f59e1c.entry.js → p-3af39ede.entry.js} +1 -1
- package/dist/twilight/{p-34d5d254.entry.js → p-3da82405.entry.js} +1 -1
- package/dist/twilight/{p-e9da3cc7.entry.js → p-4168d56d.entry.js} +1 -1
- package/dist/twilight/{p-d0927e70.entry.js → p-42e59b60.entry.js} +1 -1
- package/dist/twilight/{p-62c763dc.entry.js → p-43e90789.entry.js} +1 -1
- package/dist/twilight/{p-122be9b9.entry.js → p-455c6c0b.entry.js} +1 -1
- package/dist/twilight/{p-359c71aa.entry.js → p-45f78030.entry.js} +1 -1
- package/dist/twilight/{p-a5938402.entry.js → p-46bd695f.entry.js} +1 -1
- package/dist/twilight/{p-a01d05bb.entry.js → p-46f82b50.entry.js} +1 -1
- package/dist/twilight/{p-25ca9226.entry.js → p-52686e7d.entry.js} +1 -1
- package/dist/twilight/{p-025d82e1.entry.js → p-52d2d246.entry.js} +1 -1
- package/dist/twilight/{p-3a4490d0.entry.js → p-53c2b30e.entry.js} +1 -1
- package/dist/twilight/{p-d35b5154.entry.js → p-554e905e.entry.js} +1 -1
- package/dist/twilight/{p-a145f277.entry.js → p-561b7f43.entry.js} +1 -1
- package/dist/twilight/{p-53ac52d4.entry.js → p-564007ad.entry.js} +1 -1
- package/dist/twilight/{p-e15350fe.entry.js → p-56bdf925.entry.js} +1 -1
- package/dist/twilight/{p-b3e2e0f9.entry.js → p-589b4b5e.entry.js} +1 -1
- package/dist/twilight/{p-2474d970.entry.js → p-5da3194a.entry.js} +1 -1
- package/dist/twilight/{p-5c13a891.entry.js → p-67a36054.entry.js} +1 -1
- package/dist/twilight/{p-de845af5.entry.js → p-68fa49cc.entry.js} +1 -1
- package/dist/twilight/{p-28116325.entry.js → p-69498df8.entry.js} +1 -1
- package/dist/twilight/{p-Cxg0Hl1d.js → p-6Cm0Ixpa.js} +2 -2
- package/dist/twilight/{p-570c0f6a.entry.js → p-6c45e8fa.entry.js} +1 -1
- package/dist/twilight/{p-35f34856.entry.js → p-717782f4.entry.js} +1 -1
- package/dist/twilight/{p-bf76e5f6.entry.js → p-73409575.entry.js} +1 -1
- package/dist/twilight/{p-34cfcc10.entry.js → p-788c870c.entry.js} +1 -1
- package/dist/twilight/{p-f07ac09e.entry.js → p-7f805c47.entry.js} +1 -1
- package/dist/twilight/{p-74c7cb5c.entry.js → p-7ffd3938.entry.js} +1 -1
- package/dist/twilight/{p-2161e61b.entry.js → p-819992c7.entry.js} +1 -1
- package/dist/twilight/{p-eac567f1.entry.js → p-83a08f07.entry.js} +1 -1
- package/dist/twilight/{p-ac016389.entry.js → p-86be6cee.entry.js} +1 -1
- package/dist/twilight/{p-6d82f2f9.entry.js → p-87978156.entry.js} +1 -1
- package/dist/twilight/{p-afc9bc1b.entry.js → p-89bdd5e6.entry.js} +1 -1
- package/dist/twilight/{p-27cb91ff.entry.js → p-8d942086.entry.js} +1 -1
- package/dist/twilight/{p-37eeaeb6.entry.js → p-8f0d2c32.entry.js} +1 -1
- package/dist/twilight/{p-4af1f3ce.entry.js → p-9b4d472b.entry.js} +1 -1
- package/dist/twilight/{p-58542677.entry.js → p-9e1f454d.entry.js} +1 -1
- package/dist/twilight/{p-IxTdugtx.js → p-BGCZ19oG.js} +2 -2
- package/dist/twilight/{p-BJfi8_pj.js → p-Bc7fLLSC.js} +1 -1
- package/dist/twilight/{p-enKcXa72.js → p-BxtnkpUH.js} +1 -1
- package/dist/twilight/{p-CZJ4UGhE.js → p-C5-SqAXv.js} +1 -1
- package/dist/twilight/{p-CYG9gX2n.js → p-CCzp4vsg.js} +1 -1
- package/dist/twilight/p-D9eZofcJ.js +4 -0
- package/dist/twilight/{p-BFfL9VhE.js → p-DEbQVTrF.js} +1 -1
- package/dist/twilight/{p-C1Q9TkIB.js → p-DNtvpIPH.js} +1 -1
- package/dist/twilight/{p-Cu-SiRkr.js → p-D_Gt_HbS.js} +1 -1
- package/dist/twilight/{p-puRoZ09D.js → p-J5XAqGwq.js} +1 -1
- package/dist/twilight/{p-C0FpaBLL.js → p-NWWejksc.js} +1 -1
- package/dist/twilight/{p-5f1500d1.entry.js → p-a8aea13b.entry.js} +1 -1
- package/dist/twilight/{p-7aaafd56.entry.js → p-ab4d2172.entry.js} +1 -1
- package/dist/twilight/{p-afd7c751.entry.js → p-ab565608.entry.js} +1 -1
- package/dist/twilight/{p-3b0acf67.entry.js → p-ada82ecc.entry.js} +1 -1
- package/dist/twilight/{p-746f7ce5.entry.js → p-b25fd2a3.entry.js} +1 -1
- package/dist/twilight/{p-f28c99c0.entry.js → p-bb2ecab7.entry.js} +1 -1
- package/dist/twilight/{p-da208949.entry.js → p-be76e4e7.entry.js} +1 -1
- package/dist/twilight/{p-77aa75ab.entry.js → p-beb60b7e.entry.js} +1 -1
- package/dist/twilight/{p-451c925f.entry.js → p-c583a907.entry.js} +1 -1
- package/dist/twilight/{p-35d5a652.entry.js → p-c81203f3.entry.js} +1 -1
- package/dist/twilight/{p-b3d0e539.entry.js → p-c86c3e12.entry.js} +1 -1
- package/dist/twilight/{p-ef49690b.entry.js → p-ccf623d3.entry.js} +1 -1
- package/dist/twilight/{p-6c31c5c9.entry.js → p-d34e48ce.entry.js} +1 -1
- package/dist/twilight/{p-29485f8d.entry.js → p-d618c0ee.entry.js} +1 -1
- package/dist/twilight/{p-df483458.entry.js → p-d6dba947.entry.js} +1 -1
- package/dist/twilight/{p-46410329.entry.js → p-d8c3e606.entry.js} +1 -1
- package/dist/twilight/{p-1f532744.entry.js → p-db06baf6.entry.js} +1 -1
- package/dist/twilight/{p-9fa76038.entry.js → p-dd706055.entry.js} +1 -1
- package/dist/twilight/{p-346415be.entry.js → p-df7d2c53.entry.js} +1 -1
- package/dist/twilight/{p-49f4ac59.entry.js → p-dfc9dac3.entry.js} +1 -1
- package/dist/twilight/{p-1a1430f4.entry.js → p-e902b0b4.entry.js} +1 -1
- package/dist/twilight/{p-90a0eff7.entry.js → p-eb8a0d2f.entry.js} +1 -1
- package/dist/twilight/{p-44c8c901.entry.js → p-ecb8c538.entry.js} +1 -1
- package/dist/twilight/{p-eaa97e2d.entry.js → p-ed107904.entry.js} +1 -1
- package/dist/twilight/{p-a7fd1a3a.entry.js → p-ee83c195.entry.js} +1 -1
- package/dist/twilight/{p-51dd8f52.entry.js → p-f48a00a8.entry.js} +1 -1
- package/dist/twilight/{p-bc668ee7.entry.js → p-fa350b8c.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +23 -4
- package/dist/types/components/salla-order-edit/salla-order-edit.d.ts +4 -0
- package/dist/types/components/salla-searchable-dropdown/salla-searchable-dropdown.d.ts +8 -0
- package/dist/types/components.d.ts +18 -0
- package/package.json +5 -5
- package/dist/twilight/p-91076ee7.entry.js +0 -4
- package/dist/twilight/p-PQgQPBDL.js +0 -4
- package/dist/twilight/p-dec0d8c2.entry.js +0 -4
|
@@ -6,13 +6,14 @@ import { a as anime } from './anime.es.js';
|
|
|
6
6
|
import { I as IconArrowLeft } from './arrow-left.js';
|
|
7
7
|
import { C as Cancel } from './cancel.js';
|
|
8
8
|
import { S as SIGiftSharing } from './gift-sharing.js';
|
|
9
|
-
import { d as defineCustomElement$
|
|
10
|
-
import { d as defineCustomElement$
|
|
11
|
-
import { d as defineCustomElement$
|
|
12
|
-
import { d as defineCustomElement$
|
|
13
|
-
import { d as defineCustomElement$
|
|
14
|
-
import { d as defineCustomElement$
|
|
15
|
-
import { d as defineCustomElement$
|
|
9
|
+
import { d as defineCustomElement$c } from './salla-button2.js';
|
|
10
|
+
import { d as defineCustomElement$b } from './salla-datetime-picker2.js';
|
|
11
|
+
import { d as defineCustomElement$a } from './salla-file-upload2.js';
|
|
12
|
+
import { d as defineCustomElement$9 } from './salla-list-tile2.js';
|
|
13
|
+
import { d as defineCustomElement$8 } from './salla-loading2.js';
|
|
14
|
+
import { d as defineCustomElement$7 } from './salla-modal2.js';
|
|
15
|
+
import { d as defineCustomElement$6 } from './salla-placeholder2.js';
|
|
16
|
+
import { d as defineCustomElement$5 } from './salla-searchable-dropdown2.js';
|
|
16
17
|
import { d as defineCustomElement$4 } from './salla-skeleton2.js';
|
|
17
18
|
import { d as defineCustomElement$3 } from './salla-slider2.js';
|
|
18
19
|
import { d as defineCustomElement$2 } from './salla-tel-input2.js';
|
|
@@ -30,7 +31,7 @@ var Alert = `<!-- Generated by IcoMoon.io -->
|
|
|
30
31
|
</svg>
|
|
31
32
|
`;
|
|
32
33
|
|
|
33
|
-
const sallaGiftingCss = ".s-gifting-steps-wrapper{transition:0.2s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}.s-gifting-widget-vertical .s-list-tile-item [slot=title]{display:flex;align-items:center;gap:1.5rem}.s-gifting-widget-vertical .s-list-tile-item-content{width:100%}";
|
|
34
|
+
const sallaGiftingCss = ".s-gifting-steps-wrapper{transition:0.2s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}.s-gifting-widget-vertical .s-list-tile-item [slot=title]{display:flex;align-items:center;gap:1.5rem}.s-gifting-widget-vertical .s-list-tile-item-content{width:100%}.s-gifting-modal .s-searchable-dropdown-trigger{border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger:hover:not(.s-searchable-dropdown-trigger--disabled){border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger--open,.s-gifting-modal .s-searchable-dropdown-trigger:focus{border-color:var(--color-primary, #00897b);box-shadow:0 0 0 1px var(--color-primary, #00897b)}.s-gifting-modal .s-searchable-dropdown-trigger-placeholder{color:#000}";
|
|
34
35
|
|
|
35
36
|
const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting extends HTMLElement {
|
|
36
37
|
constructor() {
|
|
@@ -53,7 +54,17 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
53
54
|
this.regions = [];
|
|
54
55
|
this.selectedRegionId = undefined;
|
|
55
56
|
this.isKSA = false;
|
|
57
|
+
this.selectedCountry = null;
|
|
58
|
+
this.selectedRegion = null;
|
|
59
|
+
this.displayedCities = [];
|
|
60
|
+
this.selectedCity = null;
|
|
61
|
+
this.searchingCities = false;
|
|
62
|
+
this.enableCityAjaxSearch = false;
|
|
63
|
+
this.citySearchQuery = '';
|
|
56
64
|
this.step2Animated = false;
|
|
65
|
+
this.citySearchTimer = null;
|
|
66
|
+
this.citySearchCounter = 0;
|
|
67
|
+
this.locationRequestCounter = 0;
|
|
57
68
|
this.showTextArea = false;
|
|
58
69
|
/// Gift Form Data
|
|
59
70
|
this.selectedImage = undefined;
|
|
@@ -67,6 +78,50 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
67
78
|
* The form selector to be used to get the form data
|
|
68
79
|
*/
|
|
69
80
|
this.formSelector = 'form.product-form, form.form--product-options';
|
|
81
|
+
this.handleCitySearch = (query) => {
|
|
82
|
+
this.citySearchQuery = query;
|
|
83
|
+
if (!this.enableCityAjaxSearch)
|
|
84
|
+
return;
|
|
85
|
+
if (this.citySearchTimer)
|
|
86
|
+
clearTimeout(this.citySearchTimer);
|
|
87
|
+
const requestId = ++this.citySearchCounter;
|
|
88
|
+
this.citySearchTimer = setTimeout(async () => {
|
|
89
|
+
this.searchingCities = true;
|
|
90
|
+
try {
|
|
91
|
+
const cities = await this.fetchCities(query);
|
|
92
|
+
if (requestId === this.citySearchCounter) {
|
|
93
|
+
this.displayedCities = cities;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
catch (e) {
|
|
97
|
+
if (requestId === this.citySearchCounter) {
|
|
98
|
+
this.displayedCities = [];
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
finally {
|
|
102
|
+
if (requestId === this.citySearchCounter) {
|
|
103
|
+
this.searchingCities = false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}, SallaGifting.CITY_SEARCH_DEBOUNCE_MS);
|
|
107
|
+
};
|
|
108
|
+
this.handleCitySelected = (city) => {
|
|
109
|
+
this.selectedCity = city;
|
|
110
|
+
this.receiverCity = String(city.id);
|
|
111
|
+
this.clearError('receiver.city_id');
|
|
112
|
+
};
|
|
113
|
+
this.handleCityDropdownClosed = () => {
|
|
114
|
+
this.citySearchQuery = '';
|
|
115
|
+
if (this.citySearchTimer) {
|
|
116
|
+
clearTimeout(this.citySearchTimer);
|
|
117
|
+
this.citySearchTimer = null;
|
|
118
|
+
}
|
|
119
|
+
++this.citySearchCounter;
|
|
120
|
+
this.displayedCities = this.gift?.cities ?? [];
|
|
121
|
+
this.searchingCities = false;
|
|
122
|
+
};
|
|
123
|
+
this.handleCountryDropdownClosed = () => { };
|
|
124
|
+
this.handleRegionDropdownClosed = () => { };
|
|
70
125
|
salla.lang.onLoaded(() => {
|
|
71
126
|
this.selectImageOrUpload = salla.lang.get('blocks.buy_as_gift.select_image_or_upload');
|
|
72
127
|
this.selectImageForYourGift = salla.lang.get('blocks.buy_as_gift.select_image_for_your_gift');
|
|
@@ -340,24 +395,58 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
340
395
|
this.receiverName = event.target.value;
|
|
341
396
|
this.clearError('receiver.name');
|
|
342
397
|
}
|
|
343
|
-
|
|
344
|
-
this.
|
|
345
|
-
|
|
398
|
+
resetCityState() {
|
|
399
|
+
if (this.citySearchTimer) {
|
|
400
|
+
clearTimeout(this.citySearchTimer);
|
|
401
|
+
this.citySearchTimer = null;
|
|
402
|
+
}
|
|
403
|
+
++this.citySearchCounter;
|
|
404
|
+
this.gift = { ...this.gift, cities: [] };
|
|
405
|
+
this.displayedCities = [];
|
|
406
|
+
this.receiverCity = undefined;
|
|
407
|
+
this.selectedCity = null;
|
|
408
|
+
this.citySearchQuery = '';
|
|
409
|
+
this.searchingCities = false;
|
|
410
|
+
this.enableCityAjaxSearch = false;
|
|
411
|
+
}
|
|
412
|
+
setInitialCities(cities) {
|
|
413
|
+
this.gift = { ...this.gift, cities };
|
|
414
|
+
this.displayedCities = cities;
|
|
415
|
+
this.enableCityAjaxSearch = cities.length >= SallaGifting.CITY_AJAX_THRESHOLD;
|
|
416
|
+
}
|
|
417
|
+
async fetchCities(query = '') {
|
|
418
|
+
if (!this.selectedCountryId)
|
|
419
|
+
return [];
|
|
420
|
+
if (this.isKSA && !this.selectedRegionId)
|
|
421
|
+
return [];
|
|
422
|
+
const params = [
|
|
423
|
+
'for_branch=0',
|
|
424
|
+
`country_id=${this.selectedCountryId}`,
|
|
425
|
+
];
|
|
426
|
+
if (this.isKSA && this.selectedRegionId) {
|
|
427
|
+
params.push(`region_id=${this.selectedRegionId}`);
|
|
428
|
+
}
|
|
429
|
+
if (query?.trim()) {
|
|
430
|
+
params.push(`query=${encodeURIComponent(query.trim())}`);
|
|
431
|
+
}
|
|
432
|
+
const response = await salla.api.request(`shipping/cities?${params.join('&')}`);
|
|
433
|
+
return response?.data ?? [];
|
|
346
434
|
}
|
|
347
|
-
async
|
|
348
|
-
const countryId =
|
|
435
|
+
async handleCountrySelected(country) {
|
|
436
|
+
const countryId = country?.id;
|
|
437
|
+
this.selectedCountry = country ?? null;
|
|
349
438
|
this.selectedCountryId = countryId;
|
|
439
|
+
this.selectedCountryCode = country?.country_code;
|
|
440
|
+
this.isKSA = country?.country_code === 'SA';
|
|
350
441
|
this.clearError('receiver.country');
|
|
351
|
-
//
|
|
352
|
-
|
|
353
|
-
this.selectedCountryCode = selectedCountry?.country_code;
|
|
354
|
-
this.isKSA = selectedCountry?.country_code === 'SA';
|
|
355
|
-
// Reset region and city
|
|
442
|
+
// Reset region and city; bump request counter so in-flight loads from a
|
|
443
|
+
// previous country/region selection get discarded when they resolve.
|
|
356
444
|
this.regions = [];
|
|
357
445
|
this.selectedRegionId = undefined;
|
|
358
|
-
this.
|
|
359
|
-
this.
|
|
360
|
-
|
|
446
|
+
this.selectedRegion = null;
|
|
447
|
+
this.resetCityState();
|
|
448
|
+
const requestId = ++this.locationRequestCounter;
|
|
449
|
+
if (!countryId) {
|
|
361
450
|
this.selectedCountryCode = undefined;
|
|
362
451
|
this.isKSA = false;
|
|
363
452
|
this.setWrapperHeight(2, 0, 0);
|
|
@@ -369,16 +458,22 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
369
458
|
this.setWrapperHeight(2, 0, 0);
|
|
370
459
|
try {
|
|
371
460
|
const response = await salla.api.request(`shipping/countries/${countryId}/regions`);
|
|
461
|
+
if (requestId !== this.locationRequestCounter)
|
|
462
|
+
return;
|
|
372
463
|
if (response && response.data) {
|
|
373
464
|
this.regions = response.data;
|
|
374
465
|
}
|
|
375
466
|
}
|
|
376
467
|
catch (error) {
|
|
468
|
+
if (requestId !== this.locationRequestCounter)
|
|
469
|
+
return;
|
|
377
470
|
console.error('Error fetching regions:', error);
|
|
378
471
|
}
|
|
379
472
|
finally {
|
|
380
|
-
this.
|
|
381
|
-
|
|
473
|
+
if (requestId === this.locationRequestCounter) {
|
|
474
|
+
this.loadingRegions = false;
|
|
475
|
+
this.setWrapperHeight(2, 0, 0);
|
|
476
|
+
}
|
|
382
477
|
}
|
|
383
478
|
}
|
|
384
479
|
else {
|
|
@@ -386,41 +481,51 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
386
481
|
this.loadingCities = true;
|
|
387
482
|
this.setWrapperHeight(2, 0, 0);
|
|
388
483
|
try {
|
|
389
|
-
const
|
|
390
|
-
if (
|
|
391
|
-
|
|
392
|
-
|
|
484
|
+
const cities = await this.fetchCities();
|
|
485
|
+
if (requestId !== this.locationRequestCounter)
|
|
486
|
+
return;
|
|
487
|
+
this.setInitialCities(cities);
|
|
393
488
|
}
|
|
394
489
|
catch (error) {
|
|
490
|
+
if (requestId !== this.locationRequestCounter)
|
|
491
|
+
return;
|
|
395
492
|
console.error('Error fetching cities:', error);
|
|
396
493
|
}
|
|
397
494
|
finally {
|
|
398
|
-
this.
|
|
495
|
+
if (requestId === this.locationRequestCounter) {
|
|
496
|
+
this.loadingCities = false;
|
|
497
|
+
}
|
|
399
498
|
}
|
|
400
499
|
}
|
|
401
500
|
}
|
|
402
|
-
async
|
|
403
|
-
const regionId =
|
|
501
|
+
async handleRegionSelected(region) {
|
|
502
|
+
const regionId = region?.id;
|
|
503
|
+
this.selectedRegion = region ?? null;
|
|
404
504
|
this.selectedRegionId = regionId;
|
|
405
505
|
this.clearError('receiver.region');
|
|
406
|
-
// Reset city when region changes
|
|
407
|
-
|
|
408
|
-
this.
|
|
506
|
+
// Reset city when region changes; bump request counter so any earlier
|
|
507
|
+
// in-flight city fetch (for a previous region) is discarded on resolve.
|
|
508
|
+
this.resetCityState();
|
|
509
|
+
const requestId = ++this.locationRequestCounter;
|
|
409
510
|
if (!regionId)
|
|
410
511
|
return;
|
|
411
512
|
this.loadingCities = true;
|
|
412
513
|
try {
|
|
413
|
-
const
|
|
414
|
-
if (
|
|
415
|
-
|
|
416
|
-
|
|
514
|
+
const cities = await this.fetchCities();
|
|
515
|
+
if (requestId !== this.locationRequestCounter)
|
|
516
|
+
return;
|
|
517
|
+
this.setInitialCities(cities);
|
|
417
518
|
}
|
|
418
519
|
catch (error) {
|
|
520
|
+
if (requestId !== this.locationRequestCounter)
|
|
521
|
+
return;
|
|
419
522
|
console.error('Error fetching cities:', error);
|
|
420
523
|
}
|
|
421
524
|
finally {
|
|
422
|
-
this.
|
|
423
|
-
|
|
525
|
+
if (requestId === this.locationRequestCounter) {
|
|
526
|
+
this.loadingCities = false;
|
|
527
|
+
this.setWrapperHeight(2, 0, 0);
|
|
528
|
+
}
|
|
424
529
|
}
|
|
425
530
|
}
|
|
426
531
|
handleUploadImage(img) {
|
|
@@ -565,7 +670,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
565
670
|
}
|
|
566
671
|
render() {
|
|
567
672
|
return [
|
|
568
|
-
h("div", { key: '
|
|
673
|
+
h("div", { key: 'db700f9ec96a6974f3b815bb017ebe97ae8fe5c0' }, h("salla-list-tile", { key: '1e2fd1c0b375c85fcd4af1ea071c36879e6913c5', class: this.generateClass() }, h("div", { key: 'a9d02c933bc13bf8765e7e91ce08b2c9495954e5', slot: "title" }, this.vertical ? h("span", { innerHTML: SIGiftSharing }) : '', h("h3", { key: '56bd850368806c6ed5770ea5f6b0339749a77dfa' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: 'fbb4940fd3e3578f2f5a479d9d44be8dfbda7e43', slot: "subtitle" }, h("div", { key: 'fb7e8532984fbfc6fd61c55a6d44d7cdbb4bc9a2' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: '04f27f1ddbfa0b06be111b6c3176fbda5ea6d43a', slot: "action" }, h("salla-button", { key: 'fe71a1a773e5275ede7d1b3ea535c330688028b7', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: 'd62127d30254df2d8add55e0e1dbcfefb686e359', name: "widget-btn-content" }, h("div", { key: '5ddbb695af142baf3bb6986627f97a7a7607eb31', class: "s-gifting-widget-action-content" }, h("span", { key: '7820fb6abd9d7a9c1035c0f80191a3ff2a4c5fe8', innerHTML: SIGiftSharing }), " \u00A0", h("span", { key: '2cfc69862d3d087375efaed3bcec0ff0c1587989' }, this.sectionBtnText)))))), h("salla-modal", { key: '32c19391248ba6186f43fea59493171079e7bf07', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: 'e4b5829416314f25793158dae0c530b8057b4085', slot: "loading" }, h("div", { key: '6ee873add5868f105b7ec7291c2a8c8fc033c588', class: "s-gifting-skeleton" }, h("div", { key: '40aae38f8b2d62b434394811a3ef6d8bc00f6f32', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: 'a652cd74a16d0db662ea4a518ebfab366a3c3899', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: 'edb4a1477893246e98207aeba7bfb5af686f20b9', class: "s-gifting-modal-title" }, h("div", { key: '83ef942b15450cc59ad32d8c5b3ba43a32bcb29c', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: 'd9041c777a2fa0aa7ffc752958c7441916a02f85', height: '15px', width: '150px' })))), h("div", { key: 'fe3bb9dad01becba87486c4886037fd67b059919', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '08bd8304b66264b70f6df68e64da3560a1f75461', height: '10px', width: '150px' }), h("salla-skeleton", { key: 'bbea0d7ff0c846897af2ef5d3696b252a2f4e662', height: '230px' }), h("salla-skeleton", { key: '8cb1fde02e31a1accabd2e26409983e7ba56eeb1', height: '10px', width: '150px' }), h("salla-skeleton", { key: 'f80a986b953278bac41505506adf8d611566a167', height: '30px' }), h("salla-skeleton", { key: 'f7eccce69b619de385872642e1fb62b2cf6c3082', height: '40px' })))), h("slot", { key: 'd299e46040193b441f8171d05e0048849e3df8d5', name: "header" }), !!this.hasError ?
|
|
569
674
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
|
|
570
675
|
:
|
|
571
676
|
[
|
|
@@ -578,14 +683,14 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
578
683
|
h("span", { class: "s-gifting-error" }, this.errors['sender_name']) : ''), h("div", { class: this.step2ItemClass(this.errors?.['receiver.name'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { htmlFor: "receiver_name", class: "s-form-label" }, this.receiverNameFieldLabel), h("input", { type: "text", class: "s-form-control", name: "receiver_name", id: "receiver_name", value: "", onInput: (event) => this.handleReceiverName(event), placeholder: "" }), this.errors && this.errors['receiver.name'] ?
|
|
579
684
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.name']) : ''), h("div", { class: this.step2ItemClass(this.errors?.['receiver.mobile'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverMobileFieldLabel), h("salla-tel-input", { class: "s-gifting-tel-input", phone: this.receiverMobile, countryCode: this.receiverCountryCode, onPhoneEntered: (e) => this.handlePhoneInputChange(e) }), this.errors && this.errors['receiver.mobile'] ?
|
|
580
685
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.mobile']) : ''), this.isPhysical() &&
|
|
581
|
-
h("div", { class: this.step2ItemClass(this.errors?.['receiver.country'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverCountryFieldLabel), h("
|
|
686
|
+
h("div", { class: this.step2ItemClass(this.errors?.['receiver.country'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label", htmlFor: `${this.hostId}-country` }, this.receiverCountryFieldLabel), h("salla-searchable-dropdown", { placeholder: this.selectCountry, items: this.gift?.countries ?? [], selectedItem: this.selectedCountry, disabled: !this.gift?.countries?.length, required: true, inputId: `${this.hostId}-country`, searchable: false, keepParentScroll: true, onItemSelected: (e) => this.handleCountrySelected(e.detail), onDropdownClosed: () => this.handleCountryDropdownClosed() }), this.errors && this.errors['receiver.country'] ?
|
|
582
687
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.country']) : ''), this.isPhysical() && this.isKSA &&
|
|
583
|
-
h("div", { class: this.step2ItemClass(this.errors?.['receiver.region'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverRegionFieldLabel), h("
|
|
688
|
+
h("div", { class: this.step2ItemClass(this.errors?.['receiver.region'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label", htmlFor: `${this.hostId}-region` }, this.receiverRegionFieldLabel), h("salla-searchable-dropdown", { placeholder: this.selectRegion, items: this.regions ?? [], selectedItem: this.selectedRegion, loading: this.loadingRegions, disabled: this.loadingRegions || !this.regions?.length, required: true, inputId: `${this.hostId}-region`, searchable: false, keepParentScroll: true, onItemSelected: (e) => this.handleRegionSelected(e.detail), onDropdownClosed: () => this.handleRegionDropdownClosed() }), this.errors && this.errors['receiver.region'] ?
|
|
584
689
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.region']) : ''), this.isPhysical() &&
|
|
585
|
-
h("div", { class: this.step2ItemClass(this.errors?.['receiver.city_id'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverCityFieldLabel), h("
|
|
690
|
+
h("div", { class: this.step2ItemClass(this.errors?.['receiver.city_id'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label", htmlFor: `${this.hostId}-city` }, this.receiverCityFieldLabel), h("salla-searchable-dropdown", { placeholder: this.selectCity, items: this.displayedCities, selectedItem: this.selectedCity, loading: this.loadingCities, searching: this.searchingCities, disabled: this.loadingCities || (this.isKSA && !this.selectedRegionId), required: true, inputId: `${this.hostId}-city`, searchQuery: this.citySearchQuery, clientSearch: !this.enableCityAjaxSearch, dropUp: true, keepParentScroll: true, onItemSelected: (e) => this.handleCitySelected(e.detail), onSearchInput: (e) => this.handleCitySearch(e.detail), onDropdownClosed: () => this.handleCityDropdownClosed() }), this.errors && this.errors['receiver.city_id'] ?
|
|
586
691
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), this.isPhysical() &&
|
|
587
692
|
h("div", { class: this.step2ItemClass('s-gifting-info') }, h("span", { innerHTML: Alert }), h("span", null, this.selectCityInfo)), !this.isPhysical() && h("div", { class: this.step2ItemClass() }, h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, h("label", { class: "s-form-label" }, this.selectSendDateAndTime), h("salla-datetime-picker", { value: this.deliveryDate, placeholder: this.selectSendDateAndTime, "enable-time": true, "date-format": "Y-m-d h:i K", onPicked: (event) => this.handleDateTimePicker(event) }), h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), h("div", { class: this.step2ItemClass('s-gifting-step-two-footer') }, h("a", { href: "#!", innerHTML: IconArrowLeft, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
|
|
588
|
-
], h("slot", { key: '
|
|
693
|
+
], h("slot", { key: 'bd8cd1628ed4282b177f0ddcd5fb93289c47b4d6', name: "footer" })))
|
|
589
694
|
];
|
|
590
695
|
}
|
|
591
696
|
static get style() { return sallaGiftingCss; }
|
|
@@ -641,6 +746,13 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
641
746
|
"regions": [32],
|
|
642
747
|
"selectedRegionId": [32],
|
|
643
748
|
"isKSA": [32],
|
|
749
|
+
"selectedCountry": [32],
|
|
750
|
+
"selectedRegion": [32],
|
|
751
|
+
"displayedCities": [32],
|
|
752
|
+
"selectedCity": [32],
|
|
753
|
+
"searchingCities": [32],
|
|
754
|
+
"enableCityAjaxSearch": [32],
|
|
755
|
+
"citySearchQuery": [32],
|
|
644
756
|
"parsedFormData": [32],
|
|
645
757
|
"showTextArea": [32],
|
|
646
758
|
"selectedImage": [32],
|
|
@@ -662,11 +774,13 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
662
774
|
"close": [64],
|
|
663
775
|
"goToStep2": [64]
|
|
664
776
|
}]);
|
|
777
|
+
SallaGifting$1.CITY_AJAX_THRESHOLD = 400;
|
|
778
|
+
SallaGifting$1.CITY_SEARCH_DEBOUNCE_MS = 100;
|
|
665
779
|
function defineCustomElement$1() {
|
|
666
780
|
if (typeof customElements === "undefined") {
|
|
667
781
|
return;
|
|
668
782
|
}
|
|
669
|
-
const components = ["salla-gifting", "salla-button", "salla-datetime-picker", "salla-file-upload", "salla-list-tile", "salla-loading", "salla-modal", "salla-placeholder", "salla-skeleton", "salla-slider", "salla-tel-input"];
|
|
783
|
+
const components = ["salla-gifting", "salla-button", "salla-datetime-picker", "salla-file-upload", "salla-list-tile", "salla-loading", "salla-modal", "salla-placeholder", "salla-searchable-dropdown", "salla-skeleton", "salla-slider", "salla-tel-input"];
|
|
670
784
|
components.forEach(tagName => { switch (tagName) {
|
|
671
785
|
case "salla-gifting":
|
|
672
786
|
if (!customElements.get(tagName)) {
|
|
@@ -675,35 +789,40 @@ function defineCustomElement$1() {
|
|
|
675
789
|
break;
|
|
676
790
|
case "salla-button":
|
|
677
791
|
if (!customElements.get(tagName)) {
|
|
678
|
-
defineCustomElement$
|
|
792
|
+
defineCustomElement$c();
|
|
679
793
|
}
|
|
680
794
|
break;
|
|
681
795
|
case "salla-datetime-picker":
|
|
682
796
|
if (!customElements.get(tagName)) {
|
|
683
|
-
defineCustomElement$
|
|
797
|
+
defineCustomElement$b();
|
|
684
798
|
}
|
|
685
799
|
break;
|
|
686
800
|
case "salla-file-upload":
|
|
687
801
|
if (!customElements.get(tagName)) {
|
|
688
|
-
defineCustomElement$
|
|
802
|
+
defineCustomElement$a();
|
|
689
803
|
}
|
|
690
804
|
break;
|
|
691
805
|
case "salla-list-tile":
|
|
692
806
|
if (!customElements.get(tagName)) {
|
|
693
|
-
defineCustomElement$
|
|
807
|
+
defineCustomElement$9();
|
|
694
808
|
}
|
|
695
809
|
break;
|
|
696
810
|
case "salla-loading":
|
|
697
811
|
if (!customElements.get(tagName)) {
|
|
698
|
-
defineCustomElement$
|
|
812
|
+
defineCustomElement$8();
|
|
699
813
|
}
|
|
700
814
|
break;
|
|
701
815
|
case "salla-modal":
|
|
702
816
|
if (!customElements.get(tagName)) {
|
|
703
|
-
defineCustomElement$
|
|
817
|
+
defineCustomElement$7();
|
|
704
818
|
}
|
|
705
819
|
break;
|
|
706
820
|
case "salla-placeholder":
|
|
821
|
+
if (!customElements.get(tagName)) {
|
|
822
|
+
defineCustomElement$6();
|
|
823
|
+
}
|
|
824
|
+
break;
|
|
825
|
+
case "salla-searchable-dropdown":
|
|
707
826
|
if (!customElements.get(tagName)) {
|
|
708
827
|
defineCustomElement$5();
|
|
709
828
|
}
|
|
@@ -39,6 +39,7 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
|
|
|
39
39
|
this.addProductConfirmLoading = false;
|
|
40
40
|
this.mobileProductsModalMounted = false;
|
|
41
41
|
this.isMobileViewport = false;
|
|
42
|
+
this.isRTL = true;
|
|
42
43
|
// Plain field (not @State): scroll-loading guard never affects rendering, so avoid re-render churn.
|
|
43
44
|
this.mobileProductsListLoading = false;
|
|
44
45
|
this.confirming = false;
|
|
@@ -81,6 +82,9 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
|
|
|
81
82
|
};
|
|
82
83
|
this.defaultProductsListSource = 'latest';
|
|
83
84
|
this.debouncedProductSearch = salla.helpers.debounce((query) => this.applyProductSearch(query), 500);
|
|
85
|
+
salla.onReady(() => {
|
|
86
|
+
this.isRTL = salla.config.get('theme.is_rtl', true);
|
|
87
|
+
});
|
|
84
88
|
}
|
|
85
89
|
getParsedExcludedCategories() {
|
|
86
90
|
if (!this.excludedCategories) {
|
|
@@ -434,6 +438,13 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
|
|
|
434
438
|
this.navigateToOrder();
|
|
435
439
|
}
|
|
436
440
|
}
|
|
441
|
+
returnToOrderDetails() {
|
|
442
|
+
this.confirming = true;
|
|
443
|
+
this.navigateToOrder();
|
|
444
|
+
}
|
|
445
|
+
getConfirmButtonIconClass() {
|
|
446
|
+
return this.isRTL ? 'sicon-keyboard_arrow_left' : 'sicon-keyboard_arrow_right';
|
|
447
|
+
}
|
|
437
448
|
async cancelEditSession() {
|
|
438
449
|
try {
|
|
439
450
|
await salla.order.api.cancelEditSession(this.orderId);
|
|
@@ -483,7 +494,7 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
|
|
|
483
494
|
const hasRemainingAmount = preview?.totals?.remaining_amount?.amount > 0;
|
|
484
495
|
const hasRefundAmount = preview?.totals?.refund_amount?.amount > 0;
|
|
485
496
|
const taxAmount = preview?.totals?.tax?.amount?.amount;
|
|
486
|
-
return (h("salla-modal", { ref: modal => (this.saveModal = modal), width: "md", onModalVisibilityChanged: async (e) => {
|
|
497
|
+
return (h("salla-modal", { ref: modal => (this.saveModal = modal), width: "md", isClosable: false, onModalVisibilityChanged: async (e) => {
|
|
487
498
|
if (!e.detail) {
|
|
488
499
|
this.editPreview = null;
|
|
489
500
|
if (!this.confirming) {
|
|
@@ -491,7 +502,7 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
|
|
|
491
502
|
}
|
|
492
503
|
this.confirming = false;
|
|
493
504
|
}
|
|
494
|
-
} }, h("div", { class: "s-order-edit-modal" }, h("h2", { class: "s-order-edit-modal-title" }, salla.lang.getWithDefault('pages.orders.edit_summary_title', 'ملخص الطلب بعد التعديل')), preview?.items?.length > 0 && (h("div", { class: "s-order-edit-modal-items" }, preview.items.map(item => {
|
|
505
|
+
} }, h("div", { class: "s-order-edit-modal" }, h("h2", { class: "s-order-edit-modal-title" }, salla.lang.getWithDefault('pages.orders.edit_summary_title', 'ملخص الطلب بعد التعديل')), h("p", { class: "s-order-edit-modal-subtitle" }, salla.lang.getWithDefault('pages.orders.cart_edits_saved', 'Your cart edits have been saved')), preview?.items?.length > 0 && (h("div", { class: "s-order-edit-modal-items" }, preview.items.map(item => {
|
|
495
506
|
const orderItem = this.order?.items?.find(oi => oi.id == item.id);
|
|
496
507
|
const imageUrl = orderItem?.product?.image?.url;
|
|
497
508
|
const optionsLabel = item.options?.join('/ ');
|
|
@@ -500,7 +511,7 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
|
|
|
500
511
|
? salla.lang.getWithDefault('pages.orders.pay_difference', 'دفع فارق المبلغ')
|
|
501
512
|
: hasRefundAmount
|
|
502
513
|
? salla.lang.getWithDefault('pages.orders.confirm_and_receive_difference', 'تأكيد واستلام فارق المبلغ')
|
|
503
|
-
: salla.lang.getWithDefault('pages.orders.confirm_changes', 'تأكيد التعديلات'), h("i", { class:
|
|
514
|
+
: salla.lang.getWithDefault('pages.orders.confirm_changes', 'تأكيد التعديلات'), h("i", { class: `${this.getConfirmButtonIconClass()} s-order-edit-modal-btn-icon` })), h("salla-button", { color: 'gray', fill: "outline", onClick: () => this.returnToOrderDetails() }, salla.lang.getWithDefault('pages.orders.back_to_order_details', 'العودة إلى تفاصيل الطلب'))))));
|
|
504
515
|
}
|
|
505
516
|
render() {
|
|
506
517
|
if (this.loading) {
|
|
@@ -540,7 +551,8 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
|
|
|
540
551
|
"addProductLoading": [32],
|
|
541
552
|
"addProductConfirmLoading": [32],
|
|
542
553
|
"mobileProductsModalMounted": [32],
|
|
543
|
-
"isMobileViewport": [32]
|
|
554
|
+
"isMobileViewport": [32],
|
|
555
|
+
"isRTL": [32]
|
|
544
556
|
}, [[0, "orderEditProductSelected", "handleProductSelected"], [0, "orderItemUpdated", "handleItemUpdated"], [0, "orderItemRemoved", "handleItemRemoved"]]]);
|
|
545
557
|
function defineCustomElement$1() {
|
|
546
558
|
if (typeof customElements === "undefined") {
|
|
@@ -23,6 +23,13 @@ const SallaSearchableDropdown = /*@__PURE__*/ proxyCustomElement(class SallaSear
|
|
|
23
23
|
this.searchQuery = '';
|
|
24
24
|
this.clientSearch = false;
|
|
25
25
|
this.dropUp = false;
|
|
26
|
+
this.searchable = true;
|
|
27
|
+
/**
|
|
28
|
+
* When true, the dropdown will NOT override the nearest scrollable ancestor's
|
|
29
|
+
* `overflow` to `visible` while open. Use this when the host (e.g. a modal
|
|
30
|
+
* body) needs to keep its own scrolling intact while the dropdown is open.
|
|
31
|
+
*/
|
|
32
|
+
this.keepParentScroll = false;
|
|
26
33
|
this.isOpen = false;
|
|
27
34
|
this.focusedIndex = -1;
|
|
28
35
|
this.clientSearchQuery = '';
|
|
@@ -36,14 +43,18 @@ const SallaSearchableDropdown = /*@__PURE__*/ proxyCustomElement(class SallaSear
|
|
|
36
43
|
}
|
|
37
44
|
};
|
|
38
45
|
this.handleTriggerKeyDown = (e) => {
|
|
39
|
-
if (
|
|
40
|
-
e.
|
|
41
|
-
|
|
46
|
+
if (!this.isOpen) {
|
|
47
|
+
if (e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowDown') {
|
|
48
|
+
e.preventDefault();
|
|
42
49
|
this.open();
|
|
50
|
+
}
|
|
51
|
+
else if (e.key === 'Escape') {
|
|
52
|
+
this.close();
|
|
53
|
+
}
|
|
54
|
+
return;
|
|
43
55
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
56
|
+
// When open without a search input, the trigger keeps focus and drives item navigation.
|
|
57
|
+
this.navigateItems(e);
|
|
47
58
|
};
|
|
48
59
|
this.handleSearchInputChange = (e) => {
|
|
49
60
|
const value = e.target.value;
|
|
@@ -54,34 +65,7 @@ const SallaSearchableDropdown = /*@__PURE__*/ proxyCustomElement(class SallaSear
|
|
|
54
65
|
this.focusedIndex = -1;
|
|
55
66
|
};
|
|
56
67
|
this.handleSearchKeyDown = (e) => {
|
|
57
|
-
|
|
58
|
-
const itemCount = visibleItems.length;
|
|
59
|
-
switch (e.key) {
|
|
60
|
-
case 'ArrowDown':
|
|
61
|
-
e.preventDefault();
|
|
62
|
-
this.focusedIndex = itemCount > 0
|
|
63
|
-
? (this.focusedIndex + 1) % itemCount
|
|
64
|
-
: -1;
|
|
65
|
-
this.scrollFocusedIntoView();
|
|
66
|
-
break;
|
|
67
|
-
case 'ArrowUp':
|
|
68
|
-
e.preventDefault();
|
|
69
|
-
this.focusedIndex = itemCount > 0
|
|
70
|
-
? (this.focusedIndex - 1 + itemCount) % itemCount
|
|
71
|
-
: -1;
|
|
72
|
-
this.scrollFocusedIntoView();
|
|
73
|
-
break;
|
|
74
|
-
case 'Enter':
|
|
75
|
-
e.preventDefault();
|
|
76
|
-
if (this.focusedIndex >= 0 && this.focusedIndex < itemCount) {
|
|
77
|
-
this.selectItem(visibleItems[this.focusedIndex]);
|
|
78
|
-
}
|
|
79
|
-
break;
|
|
80
|
-
case 'Escape':
|
|
81
|
-
e.preventDefault();
|
|
82
|
-
this.close();
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
68
|
+
this.navigateItems(e);
|
|
85
69
|
};
|
|
86
70
|
}
|
|
87
71
|
connectedCallback() {
|
|
@@ -144,9 +128,11 @@ const SallaSearchableDropdown = /*@__PURE__*/ proxyCustomElement(class SallaSear
|
|
|
144
128
|
return;
|
|
145
129
|
this.isOpen = true;
|
|
146
130
|
this.focusedIndex = -1;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
this.scrollableAncestor
|
|
131
|
+
if (!this.keepParentScroll) {
|
|
132
|
+
this.scrollableAncestor = this.findScrollableAncestor();
|
|
133
|
+
if (this.scrollableAncestor) {
|
|
134
|
+
this.scrollableAncestor.style.overflow = 'visible';
|
|
135
|
+
}
|
|
150
136
|
}
|
|
151
137
|
this.dropdownOpened.emit();
|
|
152
138
|
requestAnimationFrame(() => this.searchInputRef?.focus());
|
|
@@ -163,6 +149,36 @@ const SallaSearchableDropdown = /*@__PURE__*/ proxyCustomElement(class SallaSear
|
|
|
163
149
|
}
|
|
164
150
|
this.dropdownClosed.emit();
|
|
165
151
|
}
|
|
152
|
+
navigateItems(e) {
|
|
153
|
+
const visibleItems = this.filteredItems;
|
|
154
|
+
const itemCount = visibleItems.length;
|
|
155
|
+
switch (e.key) {
|
|
156
|
+
case 'ArrowDown':
|
|
157
|
+
e.preventDefault();
|
|
158
|
+
this.focusedIndex = itemCount > 0
|
|
159
|
+
? (this.focusedIndex + 1) % itemCount
|
|
160
|
+
: -1;
|
|
161
|
+
this.scrollFocusedIntoView();
|
|
162
|
+
break;
|
|
163
|
+
case 'ArrowUp':
|
|
164
|
+
e.preventDefault();
|
|
165
|
+
this.focusedIndex = itemCount > 0
|
|
166
|
+
? (this.focusedIndex - 1 + itemCount) % itemCount
|
|
167
|
+
: -1;
|
|
168
|
+
this.scrollFocusedIntoView();
|
|
169
|
+
break;
|
|
170
|
+
case 'Enter':
|
|
171
|
+
e.preventDefault();
|
|
172
|
+
if (this.focusedIndex >= 0 && this.focusedIndex < itemCount) {
|
|
173
|
+
this.selectItem(visibleItems[this.focusedIndex]);
|
|
174
|
+
}
|
|
175
|
+
break;
|
|
176
|
+
case 'Escape':
|
|
177
|
+
e.preventDefault();
|
|
178
|
+
this.close();
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
166
182
|
scrollFocusedIntoView() {
|
|
167
183
|
if (this.focusedIndex < 0)
|
|
168
184
|
return;
|
|
@@ -179,18 +195,18 @@ const SallaSearchableDropdown = /*@__PURE__*/ proxyCustomElement(class SallaSear
|
|
|
179
195
|
render() {
|
|
180
196
|
const hasSelection = this.selectedItem != null;
|
|
181
197
|
const listboxId = `${this.inputId}-listbox`;
|
|
182
|
-
return (h(Host, { key: '
|
|
198
|
+
return (h(Host, { key: 'c529f2b61adbc38aa1e5403da6fdb985fe256baa', class: "s-searchable-dropdown" }, h("div", { key: '88ab96afd36421fdf965b79298fa14f435adbcef', class: { 's-searchable-dropdown': true, 's-searchable-dropdown--open': this.isOpen } }, this.label && (h("label", { key: '6ee8a2d0428e1347e36eabec32a3129897481abc', class: "s-searchable-dropdown-label", htmlFor: this.inputId }, this.label, this.required && h("span", { key: '8473884ec18e73c72c79e7749264bd9c24c56ae9', class: "s-searchable-dropdown-required" }, " *"))), h("div", { key: 'bffbea7ff0cb9466c8a852a841a21ed8351ef92d', class: {
|
|
183
199
|
's-searchable-dropdown-trigger': true,
|
|
184
200
|
's-searchable-dropdown-trigger--disabled': this.disabled || this.loading,
|
|
185
201
|
's-searchable-dropdown-trigger--open': this.isOpen,
|
|
186
|
-
}, role: "combobox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-controls": listboxId, "aria-disabled": this.disabled || this.loading ? 'true' : 'false', tabIndex: this.disabled || this.loading ? -1 : 0, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, hasSelection ? (h("span", { class: "s-searchable-dropdown-trigger-text" }, this.getDisplayName(this.selectedItem))) : (h("span", { class: "s-searchable-dropdown-trigger-placeholder" }, this.placeholder)), h("i", { key: '
|
|
202
|
+
}, role: "combobox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-controls": listboxId, "aria-disabled": this.disabled || this.loading ? 'true' : 'false', tabIndex: this.disabled || this.loading ? -1 : 0, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, hasSelection ? (h("span", { class: "s-searchable-dropdown-trigger-text" }, this.getDisplayName(this.selectedItem))) : (h("span", { class: "s-searchable-dropdown-trigger-placeholder" }, this.placeholder)), h("i", { key: 'e3aee1ffe1b80a9ef21f4c9cca02de0a590b0825', class: {
|
|
187
203
|
'sicon-keyboard_arrow_down': true,
|
|
188
204
|
's-searchable-dropdown-trigger-icon': true,
|
|
189
205
|
's-searchable-dropdown-trigger-icon--open': this.isOpen,
|
|
190
|
-
}, "aria-hidden": "true" })), this.isOpen && (h("div", { key: '
|
|
206
|
+
}, "aria-hidden": "true" })), this.isOpen && (h("div", { key: '7a19f2d6847b3e0dda5e0ea509df91a2f48fa098', class: {
|
|
191
207
|
's-searchable-dropdown-panel': true,
|
|
192
208
|
's-searchable-dropdown-panel--up': this.dropUp,
|
|
193
|
-
}, ref: (el) => (this.panelRef = el) }, h("div", { key: '
|
|
209
|
+
}, ref: (el) => (this.panelRef = el) }, this.searchable && (h("div", { key: '601529f76a09762a57fe7b7663ecfa1505462367', class: "s-searchable-dropdown-search-wrap" }, h("i", { key: 'f91e464e7efed3759837880b5a7593daa4f84ecb', class: "sicon-search s-searchable-dropdown-search-icon", "aria-hidden": "true" }), h("input", { key: 'f72a7e12d0a6e90bab3983258c9b08aa286bc897', ref: (el) => (this.searchInputRef = el), id: this.inputId, type: "text", class: "s-searchable-dropdown-search-input", placeholder: this.placeholder, value: this.clientSearch ? this.clientSearchQuery : this.searchQuery, onInput: this.handleSearchInputChange, onKeyDown: this.handleSearchKeyDown, autocomplete: "off", "aria-autocomplete": "list", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-controls": listboxId }))), h("div", { key: '495aa88fc76d3d17956db7277cc98aff08b4c1af', id: listboxId, class: "s-searchable-dropdown-list s-scrollbar", role: "listbox" }, this.renderListContent()))))));
|
|
194
210
|
}
|
|
195
211
|
renderListContent() {
|
|
196
212
|
if (this.searching || this.loading) {
|
|
@@ -231,6 +247,8 @@ const SallaSearchableDropdown = /*@__PURE__*/ proxyCustomElement(class SallaSear
|
|
|
231
247
|
"searchQuery": [1, "search-query"],
|
|
232
248
|
"clientSearch": [4, "client-search"],
|
|
233
249
|
"dropUp": [4, "drop-up"],
|
|
250
|
+
"searchable": [4],
|
|
251
|
+
"keepParentScroll": [4, "keep-parent-scroll"],
|
|
234
252
|
"isOpen": [32],
|
|
235
253
|
"focusedIndex": [32],
|
|
236
254
|
"clientSearchQuery": [32]
|