@salla.sa/twilight-components 2.14.417 → 2.14.419
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-CLDRrF9Y.js → filepond-BiRMqsJc.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-BG080TXY.js → filepond-plugin-file-poster-LU25G59n.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-D9x7yIeS.js → filepond-plugin-file-validate-size-J3-riOvN.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-CpHYiI2P.js → filepond-plugin-file-validate-type-DMawm6j5.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-B6TFtexK.js → filepond-plugin-image-edit-QXtHYcEz.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-C4Ycs5Ji.js → filepond-plugin-image-exif-orientation-C0VBHQjd.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CWlUoPsm.js → filepond-plugin-image-preview-xG9m-vgD.js} +1 -1
- package/dist/cjs/{functions-B0oYwrYv.js → functions-CZrHAX2r.js} +1 -1
- package/dist/cjs/helpers-BJ2rnhxz.js +197 -0
- package/dist/cjs/{index-BQnJvBnq.js → index-Ce-Twd7-.js} +10 -6
- package/dist/cjs/{index-DEDv7FBx.js → index-DE1iYzD2.js} +1 -1
- package/dist/cjs/interfaces-Bh7W0bEU.js +33 -0
- 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 +37 -58
- 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 +12 -12
- 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 +4 -4
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +28 -29
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +41 -0
- package/dist/cjs/salla-order-edit.cjs.entry.js +339 -40
- package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
- 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 +3 -3
- package/dist/cjs/salla-placeholder.cjs.entry.js +2 -2
- package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
- package/dist/cjs/salla-product-card_2.cjs.entry.js +6 -6
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +3 -3
- package/dist/cjs/salla-products-list.cjs.entry.js +38 -15
- 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 +2 -2
- package/dist/cjs/salla-search.cjs.entry.js +6 -6
- package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +2 -2
- package/dist/cjs/salla-social.cjs.entry.js +2 -2
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- 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 +2 -2
- 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-BYjrk7x6.js → tracked-promise-DChUtH5B.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-DbbhCpKU.js → vanilla-picker-ivACsPLJ.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/salla-bought-together/salla-bought-together.js +1 -0
- package/dist/collection/components/salla-order-edit/helpers.js +181 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit-item.css +3 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit-item.js +42 -30
- package/dist/collection/components/salla-order-edit/salla-order-edit-product-card.css +4 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit-product-card.js +93 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit.css +3 -0
- package/dist/collection/components/salla-order-edit/salla-order-edit.js +353 -39
- package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
- package/dist/collection/components/salla-payments/salla-payments.js +2 -2
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
- package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
- package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
- package/dist/collection/components/salla-product-options/salla-product-options.js +28 -0
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
- package/dist/collection/components/salla-products-list/salla-products-list.js +54 -14
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +1 -1
- package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
- package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
- package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
- package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
- package/dist/collection/components/salla-search/salla-search.js +5 -5
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
- package/dist/collection/components/salla-social/salla-social.js +1 -1
- package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/salla-bought-together.js +1 -0
- package/dist/components/salla-order-edit-item2.js +207 -30
- package/dist/components/salla-order-edit-product-card.d.ts +11 -0
- package/dist/components/salla-order-edit-product-card.js +59 -0
- package/dist/components/salla-order-edit.js +378 -65
- package/dist/components/salla-order-summary.js +1 -1
- package/dist/components/salla-payments.js +2 -2
- package/dist/components/salla-placeholder2.js +1 -1
- package/dist/components/salla-price-range2.js +2 -2
- package/dist/components/salla-product-availability2.js +1 -1
- package/dist/components/salla-product-card2.js +5 -5
- package/dist/components/salla-product-options2.js +8 -1
- package/dist/components/salla-product-size-guide.js +2 -2
- package/dist/components/salla-products-list2.js +39 -15
- package/dist/components/salla-quantity-input2.js +1 -1
- package/dist/components/salla-quick-buy2.js +1 -1
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-reviews-page.js +1 -1
- package/dist/components/salla-reviews.js +1 -1
- package/dist/components/salla-scopes.js +1 -1
- package/dist/components/salla-search.js +5 -5
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-social-share.js +1 -1
- package/dist/components/salla-social.js +1 -1
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/esm/{filepond-B25v0bOp.js → filepond-0Pvy36B6.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-3pI-GrYi.js → filepond-plugin-file-poster-DV7OW1XJ.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-BF3zIjLe.js → filepond-plugin-file-validate-size-DEya24r_.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-BR91w5t3.js → filepond-plugin-file-validate-type-DiFvVzC6.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DPwgIvr6.js → filepond-plugin-image-edit-DGBw5KRt.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-Ba27xDEr.js → filepond-plugin-image-exif-orientation-BbpZAlI-.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-CAEqmh_E.js → filepond-plugin-image-preview-CjRkn0jY.js} +1 -1
- package/dist/esm/{functions-Bk6s9Xp6.js → functions-BcJ4xDKw.js} +1 -1
- package/dist/esm/helpers-DR_vlSvU.js +184 -0
- package/dist/esm/{index-SSgsVJTU.js → index-313k5SuU.js} +1 -1
- package/dist/esm/{index-CN6KGTlN.js → index-CfaNNoM2.js} +10 -6
- package/dist/esm/interfaces-CoQJOPRz.js +33 -0
- 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 +11 -32
- 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 +12 -12
- 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 +4 -4
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner.entry.js +2 -2
- package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
- package/dist/esm/salla-loyalty-panel.entry.js +3 -3
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +3 -3
- package/dist/esm/salla-loyalty-reward.entry.js +2 -2
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +28 -29
- package/dist/esm/salla-order-edit-product-card.entry.js +39 -0
- package/dist/esm/salla-order-edit.entry.js +339 -40
- package/dist/esm/salla-order-summary.entry.js +2 -2
- 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 +3 -3
- package/dist/esm/salla-placeholder.entry.js +2 -2
- package/dist/esm/salla-price-range.entry.js +3 -3
- package/dist/esm/salla-product-card_2.entry.js +6 -6
- package/dist/esm/salla-product-size-guide.entry.js +3 -3
- package/dist/esm/salla-products-list.entry.js +38 -15
- 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 +2 -2
- package/dist/esm/salla-search.entry.js +6 -6
- package/dist/esm/salla-skeleton.entry.js +2 -2
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +2 -2
- package/dist/esm/salla-social.entry.js +2 -2
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/{tracked-promise-BpxjPYjA.js → tracked-promise-xD-AZOwt.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-CoVpA0FA.js → vanilla-picker-Bu8PG2Le.js} +1 -1
- package/dist/twilight/{p-5fe916ee.entry.js → p-02600ee1.entry.js} +1 -1
- package/dist/twilight/{p-f6862c1d.entry.js → p-02608fcd.entry.js} +1 -1
- package/dist/twilight/{p-7d0a6459.entry.js → p-029f9bfd.entry.js} +1 -1
- package/dist/twilight/p-073536c3.entry.js +4 -0
- package/dist/twilight/{p-89e6dc27.entry.js → p-0d4afc4b.entry.js} +1 -1
- package/dist/twilight/{p-529f8c0a.entry.js → p-11da9c5a.entry.js} +1 -1
- package/dist/twilight/{p-5980a88b.entry.js → p-13b1dae0.entry.js} +1 -1
- package/dist/twilight/{p-b94fd507.entry.js → p-13f019f5.entry.js} +1 -1
- package/dist/twilight/{p-65b943d6.entry.js → p-15be9e7a.entry.js} +1 -1
- package/dist/twilight/{p-f6010b04.entry.js → p-1bce06bf.entry.js} +1 -1
- package/dist/twilight/{p-93489e49.entry.js → p-1fe827c7.entry.js} +1 -1
- package/dist/twilight/{p-a3eaba68.entry.js → p-22d12f28.entry.js} +1 -1
- package/dist/twilight/{p-53c44a72.entry.js → p-2afe64d1.entry.js} +1 -1
- package/dist/twilight/{p-269c76e2.entry.js → p-2bb796b3.entry.js} +1 -1
- package/dist/twilight/{p-bbf9d24f.entry.js → p-2f1cb6da.entry.js} +1 -1
- package/dist/twilight/{p-337dc693.entry.js → p-3252277a.entry.js} +1 -1
- package/dist/twilight/{p-fa6c9d88.entry.js → p-3539d2a1.entry.js} +1 -1
- package/dist/twilight/{p-01e5a467.entry.js → p-3bda095b.entry.js} +1 -1
- package/dist/twilight/{p-44147d14.entry.js → p-3d286589.entry.js} +1 -1
- package/dist/twilight/{p-4e02648d.entry.js → p-410f0149.entry.js} +1 -1
- package/dist/twilight/{p-21c9f888.entry.js → p-42bf8cc1.entry.js} +1 -1
- package/dist/twilight/p-43c4c857.entry.js +4 -0
- package/dist/twilight/{p-fd200890.entry.js → p-4550de2d.entry.js} +1 -1
- package/dist/twilight/{p-f6cb5670.entry.js → p-4752dc2c.entry.js} +1 -1
- package/dist/twilight/{p-943a70d5.entry.js → p-48aba4cd.entry.js} +1 -1
- package/dist/twilight/p-49e28ca2.entry.js +4 -0
- package/dist/twilight/{p-3a336511.entry.js → p-4a7cbe49.entry.js} +1 -1
- package/dist/twilight/{p-ce32049d.entry.js → p-51252013.entry.js} +1 -1
- package/dist/twilight/{p-5c2221e4.entry.js → p-53e63007.entry.js} +1 -1
- package/dist/twilight/{p-60bcb05d.entry.js → p-57a4f3d2.entry.js} +1 -1
- package/dist/twilight/{p-50562d51.entry.js → p-5dbb89d5.entry.js} +1 -1
- package/dist/twilight/p-5dd07559.entry.js +4 -0
- package/dist/twilight/{p-5a719b92.entry.js → p-5dd75357.entry.js} +1 -1
- package/dist/twilight/p-5e4e45be.entry.js +4 -0
- package/dist/twilight/{p-93fd1f4c.entry.js → p-5f174a3e.entry.js} +1 -1
- package/dist/twilight/{p-901f4d3c.entry.js → p-625218f7.entry.js} +1 -1
- package/dist/twilight/{p-12a70121.entry.js → p-654a0990.entry.js} +1 -1
- package/dist/twilight/{p-89912723.entry.js → p-654b9857.entry.js} +1 -1
- package/dist/twilight/{p-2a3c8c27.entry.js → p-65ff0bf4.entry.js} +1 -1
- package/dist/twilight/{p-41338b27.entry.js → p-665aa4d1.entry.js} +1 -1
- package/dist/twilight/{p-30847b55.entry.js → p-69bec0e3.entry.js} +1 -1
- package/dist/twilight/{p-4546305a.entry.js → p-6b02b118.entry.js} +1 -1
- package/dist/twilight/{p-a3a24c3a.entry.js → p-72d4121c.entry.js} +1 -1
- package/dist/twilight/{p-9e2f4e04.entry.js → p-74cd506d.entry.js} +1 -1
- package/dist/twilight/{p-ea67e7fb.entry.js → p-75f26291.entry.js} +1 -1
- package/dist/twilight/{p-8cd3e1ee.entry.js → p-7ce1dff1.entry.js} +1 -1
- package/dist/twilight/{p-4f898f9a.entry.js → p-7d08def1.entry.js} +1 -1
- package/dist/twilight/{p-984ad4f5.entry.js → p-7f6c6d8a.entry.js} +1 -1
- package/dist/twilight/{p-f953dac6.entry.js → p-82d776ae.entry.js} +1 -1
- package/dist/twilight/{p-7df3848c.entry.js → p-87e78adc.entry.js} +1 -1
- package/dist/twilight/{p-a0f201dc.entry.js → p-891e4b61.entry.js} +1 -1
- package/dist/twilight/{p-f8971c24.entry.js → p-8bdd9c9b.entry.js} +1 -1
- package/dist/twilight/{p-b21dff70.entry.js → p-8d0b4049.entry.js} +1 -1
- package/dist/twilight/{p-92948a3c.entry.js → p-8dbff2c8.entry.js} +1 -1
- package/dist/twilight/{p-cb7286b0.entry.js → p-944b02ec.entry.js} +1 -1
- package/dist/twilight/{p-a6b86d59.entry.js → p-9693310b.entry.js} +1 -1
- package/dist/twilight/{p-9ef5baee.entry.js → p-9dcc291b.entry.js} +1 -1
- package/dist/twilight/{p-BqUtsKuV.js → p-B6bkY5-l.js} +1 -1
- package/dist/twilight/{p-IfDGKmqz.js → p-BCWPIsso.js} +1 -1
- package/dist/twilight/p-BLehGhpL.js +4 -0
- package/dist/twilight/{p-BI8HHCBk.js → p-BN2EOPT0.js} +2 -2
- package/dist/twilight/{p-D3AXrniM.js → p-BeZ-z3uX.js} +1 -1
- package/dist/twilight/{p-Dhp50bRZ.js → p-Bu7ZSFM5.js} +1 -1
- package/dist/twilight/{p-Dnp_uMrB.js → p-C0UBM1r0.js} +1 -1
- package/dist/twilight/{p-BHMFnn7K.js → p-C1ReTfKT.js} +1 -1
- package/dist/twilight/p-C8xwacGT.js +4 -0
- package/dist/twilight/{p-OFtreEoC.js → p-CX1cQxmm.js} +1 -1
- package/dist/twilight/{p-CN6KGTlN.js → p-CfaNNoM2.js} +1 -1
- package/dist/twilight/p-CoQJOPRz.js +4 -0
- package/dist/twilight/{p-CZ0CFRkg.js → p-P9Uquv6J.js} +1 -1
- package/dist/twilight/p-a132e9dc.entry.js +4 -0
- package/dist/twilight/{p-8867d017.entry.js → p-a22ab12e.entry.js} +1 -1
- package/dist/twilight/{p-3ea047a7.entry.js → p-a5093858.entry.js} +1 -1
- package/dist/twilight/{p-3d7867a2.entry.js → p-a5483eab.entry.js} +1 -1
- package/dist/twilight/{p-50a976c7.entry.js → p-ab922196.entry.js} +1 -1
- package/dist/twilight/{p-5ccc2829.entry.js → p-adf1ff1f.entry.js} +1 -1
- package/dist/twilight/{p-acdba86b.entry.js → p-b075bdd3.entry.js} +1 -1
- package/dist/twilight/{p-d83942f4.entry.js → p-b6446ed0.entry.js} +1 -1
- package/dist/twilight/{p-cba54712.entry.js → p-bd29fa58.entry.js} +1 -1
- package/dist/twilight/{p-38661112.entry.js → p-c0a96a41.entry.js} +1 -1
- package/dist/twilight/{p-2835e988.entry.js → p-c0da03a4.entry.js} +1 -1
- package/dist/twilight/{p-8f879479.entry.js → p-ce4823e8.entry.js} +1 -1
- package/dist/twilight/{p-418574c0.entry.js → p-cef8dfa8.entry.js} +1 -1
- package/dist/twilight/{p-984298b9.entry.js → p-d737a90e.entry.js} +1 -1
- package/dist/twilight/p-d7e404d1.entry.js +4 -0
- package/dist/twilight/{p-078e99bf.entry.js → p-d95fad47.entry.js} +1 -1
- package/dist/twilight/{p-1ac92f5a.entry.js → p-dacc7681.entry.js} +1 -1
- package/dist/twilight/{p-6f620e38.entry.js → p-e15ceaae.entry.js} +1 -1
- package/dist/twilight/p-e692fd88.entry.js +4 -0
- package/dist/twilight/{p-b3ad1668.entry.js → p-ee5afe29.entry.js} +1 -1
- package/dist/twilight/{p-329af334.entry.js → p-f248ce38.entry.js} +1 -1
- package/dist/twilight/{p-7cd6a7c4.entry.js → p-f6468e0f.entry.js} +1 -1
- package/dist/twilight/{p-4bf158ef.entry.js → p-f9e89a30.entry.js} +1 -1
- package/dist/twilight/{p-8f45764d.entry.js → p-fdd2d95e.entry.js} +1 -1
- package/dist/twilight/{p-66aac45f.entry.js → p-ff0d8f2b.entry.js} +1 -1
- package/dist/twilight/{p-CSkvMMJe.js → p-nj3fF7xi.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-order-edit/helpers.d.ts +25 -0
- package/dist/types/components/salla-order-edit/interfaces.d.ts +22 -25
- package/dist/types/components/salla-order-edit/salla-order-edit-item.d.ts +7 -5
- package/dist/types/components/salla-order-edit/salla-order-edit-product-card.d.ts +11 -0
- package/dist/types/components/salla-order-edit/salla-order-edit.d.ts +56 -4
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +4 -0
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +5 -0
- package/dist/types/components.d.ts +51 -4
- package/package.json +5 -5
- package/dist/twilight/p-100664ef.entry.js +0 -4
- package/dist/twilight/p-38856897.entry.js +0 -4
- package/dist/twilight/p-43eca2f5.entry.js +0 -4
- package/dist/twilight/p-6edcfd67.entry.js +0 -4
- package/dist/twilight/p-73f6f7c7.entry.js +0 -4
- package/dist/twilight/p-DyiIcpTE.js +0 -4
- package/dist/twilight/p-a31559f1.entry.js +0 -4
- package/dist/twilight/p-c20a8155.entry.js +0 -4
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-CfaNNoM2.js';
|
|
5
|
+
|
|
6
|
+
const sallaOrderEditProductCardCss = ":host{display:block;min-width:0}";
|
|
7
|
+
|
|
8
|
+
const SallaOrderEditProductCard = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.orderEditProductSelected = createEvent(this, "orderEditProductSelected");
|
|
12
|
+
}
|
|
13
|
+
get productData() {
|
|
14
|
+
if (!this.product) {
|
|
15
|
+
return {};
|
|
16
|
+
}
|
|
17
|
+
if (typeof this.product === 'object') {
|
|
18
|
+
return this.product;
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
return JSON.parse(this.product);
|
|
22
|
+
}
|
|
23
|
+
catch (_error) {
|
|
24
|
+
return {};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
handleSelectProduct() {
|
|
28
|
+
this.orderEditProductSelected.emit({ product: this.productData });
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
const product = this.productData;
|
|
32
|
+
const productName = product?.name || salla.lang.getWithDefault('common.elements.product', 'منتج');
|
|
33
|
+
const price = product?.price;
|
|
34
|
+
return (h(Host, { key: 'e5837d7ec53f2566fe981f02a95b52c7c817821c' }, h("button", { key: '415861262349f83c3c7d1dc72d9f8f01f855317e', type: "button", class: "s-order-edit-product-card", onClick: () => this.handleSelectProduct() }, h("div", { key: '072d3af840d5044636380f5620703cc446877162', class: "s-order-edit-product-card-media" }, product?.image?.url ? (h("img", { src: product.image.url, alt: product.image.alt || productName, class: "s-order-edit-product-card-image" })) : (h("div", { class: "s-order-edit-product-card-placeholder" }, h("i", { class: "sicon-shopping-bag" })))), h("div", { key: 'ac51822bbcf1f2213b11204fa968a40e7de164a3', class: "s-order-edit-product-card-content" }, h("h3", { key: 'e817582bf88db2ed6ac47a37a5d2b4e4ac953770', class: "s-order-edit-product-card-title" }, productName), price != null && (h("p", { key: 'efbf1b16d7c6d73de76bab1e8715a474f812fde4', class: "s-order-edit-product-card-price", innerHTML: salla.money(price) }))))));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
SallaOrderEditProductCard.style = sallaOrderEditProductCardCss;
|
|
38
|
+
|
|
39
|
+
export { SallaOrderEditProductCard as salla_order_edit_product_card };
|
|
@@ -1,27 +1,84 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-CfaNNoM2.js';
|
|
5
|
+
import { g as getOrderItemSelectedOptions, a as getOrderEditProductMaxQuantity, c as clampOrderEditQuantity, u as updateOrderItems, r as removeOrderItems, m as mergePayloadItems, b as cloneOrderEditProduct, f as findMergeableItem, d as updateAddedPayloadList, e as upsertPayloadUpdateList, h as createAddedOrderItem, i as buildSavePayload } from './helpers-DR_vlSvU.js';
|
|
6
|
+
import './interfaces-CoQJOPRz.js';
|
|
5
7
|
|
|
6
|
-
const sallaOrderEditCss = "";
|
|
8
|
+
const sallaOrderEditCss = ":host{display:block}";
|
|
7
9
|
|
|
8
10
|
const SallaOrderEdit = class {
|
|
9
11
|
constructor(hostRef) {
|
|
10
12
|
registerInstance(this, hostRef);
|
|
11
13
|
this.loading = true;
|
|
12
14
|
this.saveLoading = false;
|
|
13
|
-
this.payload = { items: { update: [], remove: [] } };
|
|
15
|
+
this.payload = { items: { update: [], remove: [], add: [] } };
|
|
14
16
|
this.expired = false;
|
|
15
17
|
this.editPreview = null;
|
|
18
|
+
this.productSearchQuery = '';
|
|
19
|
+
this.productsListKey = 0;
|
|
20
|
+
this.productsListSource = 'latest';
|
|
21
|
+
this.productsListSourceValue = '';
|
|
22
|
+
this.selectedProductToAdd = null;
|
|
23
|
+
this.addProductQuantity = 1;
|
|
24
|
+
this.addProductLoading = false;
|
|
25
|
+
this.addProductConfirmLoading = false;
|
|
26
|
+
this.mobileProductsModalMounted = false;
|
|
27
|
+
this.isMobileViewport = false;
|
|
28
|
+
// Plain field (not @State): scroll-loading guard never affects rendering, so avoid re-render churn.
|
|
29
|
+
this.mobileProductsListLoading = false;
|
|
16
30
|
this.confirming = false;
|
|
31
|
+
this.handleMobileProductSelected = (event) => {
|
|
32
|
+
event.stopPropagation();
|
|
33
|
+
void this.handleProductSelected(event);
|
|
34
|
+
};
|
|
35
|
+
this.productsPanelMobileQuery = '(max-width: 768px)';
|
|
36
|
+
this.handleProductsPanelViewportChange = (event) => {
|
|
37
|
+
this.isMobileViewport = event.matches;
|
|
38
|
+
};
|
|
39
|
+
this.hasProductTypeFilter = (url) => {
|
|
40
|
+
const queryStart = url.indexOf('?');
|
|
41
|
+
const query = (queryStart >= 0 ? url.slice(queryStart + 1) : url).split('#')[0];
|
|
42
|
+
return Array.from(new URLSearchParams(query)).some(([key, value]) => (value === 'product' &&
|
|
43
|
+
/^filters\[types\](?:\[(?:\d*)\])?$/.test(key)));
|
|
44
|
+
};
|
|
45
|
+
this.normalizeProductsListArrayParams = (url) => {
|
|
46
|
+
return url.replace(/(^|[?&])(includes|source_value|filters(?:\[|%5B)[^&=\]%]+?(?:\]|%5D))(\[|%5B)\d+(\]|%5D)(?==)/gi, (_, sep, name, open, close) => `${sep}${name}${open}${close}`);
|
|
47
|
+
};
|
|
48
|
+
this.handleBeforeBuildListUrl = (ctx) => {
|
|
49
|
+
if (ctx.component?.productCardComponent !== 'salla-order-edit-product-card' ||
|
|
50
|
+
typeof ctx.url !== 'string') {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
ctx.url = this.normalizeProductsListArrayParams(ctx.url);
|
|
54
|
+
if (this.hasProductTypeFilter(ctx.url)) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
ctx.url += `${ctx.url.includes('?') ? '&' : '?'}filters[types][]=product`;
|
|
58
|
+
};
|
|
59
|
+
this.defaultProductsListSource = 'latest';
|
|
60
|
+
this.debouncedProductSearch = salla.helpers.debounce((query) => this.applyProductSearch(query), 500);
|
|
17
61
|
}
|
|
18
62
|
async componentWillLoad() {
|
|
63
|
+
this.setupProductsPanelViewportQuery();
|
|
19
64
|
await salla.onReady();
|
|
65
|
+
this.unregisterBeforeBuildListUrlHook = salla.hooks.registerHook('salla-products-list', 'beforeBuildListUrl', this.handleBeforeBuildListUrl);
|
|
20
66
|
this.loadFromProp();
|
|
21
67
|
this.startExpiryCheck();
|
|
22
68
|
}
|
|
23
69
|
disconnectedCallback() {
|
|
24
70
|
clearInterval(this.expiryInterval);
|
|
71
|
+
this.unregisterBeforeBuildListUrlHook?.();
|
|
72
|
+
this.productsPanelViewportQuery?.removeEventListener('change', this.handleProductsPanelViewportChange);
|
|
73
|
+
this.mobileProductsModal?.removeEventListener('orderEditProductSelected', this.handleMobileProductSelected);
|
|
74
|
+
}
|
|
75
|
+
setupProductsPanelViewportQuery() {
|
|
76
|
+
if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
this.productsPanelViewportQuery = window.matchMedia(this.productsPanelMobileQuery);
|
|
80
|
+
this.isMobileViewport = this.productsPanelViewportQuery.matches;
|
|
81
|
+
this.productsPanelViewportQuery.addEventListener('change', this.handleProductsPanelViewportChange);
|
|
25
82
|
}
|
|
26
83
|
startExpiryCheck() {
|
|
27
84
|
const endsAt = this.order?.customer_editing_session?.ends_at;
|
|
@@ -46,7 +103,13 @@ const SallaOrderEdit = class {
|
|
|
46
103
|
return;
|
|
47
104
|
}
|
|
48
105
|
const data = typeof this.orderData === 'string' ? JSON.parse(this.orderData) : this.orderData;
|
|
49
|
-
this.order =
|
|
106
|
+
this.order = {
|
|
107
|
+
...data,
|
|
108
|
+
items: data.items.map(item => ({
|
|
109
|
+
...item,
|
|
110
|
+
selectedOptions: getOrderItemSelectedOptions(item),
|
|
111
|
+
})),
|
|
112
|
+
};
|
|
50
113
|
}
|
|
51
114
|
catch (e) {
|
|
52
115
|
this.error = salla.lang.getWithDefault('pages.orders.order_not_found', 'الطلب غير موجود');
|
|
@@ -55,22 +118,223 @@ const SallaOrderEdit = class {
|
|
|
55
118
|
this.loading = false;
|
|
56
119
|
}
|
|
57
120
|
}
|
|
58
|
-
|
|
59
|
-
|
|
121
|
+
applyProductSearch(query) {
|
|
122
|
+
const normalizedQuery = query?.trim() || '';
|
|
123
|
+
const nextSource = normalizedQuery ? 'search' : this.defaultProductsListSource;
|
|
124
|
+
const nextSourceValue = nextSource === 'search' ? JSON.stringify(normalizedQuery) : '';
|
|
125
|
+
if (this.productsListSource === nextSource &&
|
|
126
|
+
this.productsListSourceValue === nextSourceValue) {
|
|
60
127
|
return;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
128
|
+
}
|
|
129
|
+
this.productsListSource = nextSource;
|
|
130
|
+
this.productsListSourceValue = nextSourceValue;
|
|
131
|
+
this.productsListKey += 1;
|
|
132
|
+
}
|
|
133
|
+
handleProductSearch(event) {
|
|
134
|
+
const value = event.target?.value || '';
|
|
135
|
+
this.productSearchQuery = value;
|
|
136
|
+
this.debouncedProductSearch(value);
|
|
137
|
+
}
|
|
138
|
+
getProductsListKey(scope) {
|
|
139
|
+
return `${scope}-${this.productsListSource}-${this.productsListSourceValue}-${this.productsListKey}`;
|
|
140
|
+
}
|
|
141
|
+
handleMobileProductsScroll(event) {
|
|
142
|
+
const container = event.currentTarget;
|
|
143
|
+
const distanceToBottom = container.scrollHeight - container.scrollTop - container.clientHeight;
|
|
144
|
+
if (distanceToBottom > 200 || this.mobileProductsListLoading) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const productsList = container.querySelector('salla-products-list');
|
|
148
|
+
if (!productsList) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
this.mobileProductsListLoading = true;
|
|
152
|
+
void productsList.loadMore().finally(() => {
|
|
153
|
+
this.mobileProductsListLoading = false;
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
waitForNextFrame() {
|
|
157
|
+
return new Promise(resolve => requestAnimationFrame(() => resolve(undefined)));
|
|
158
|
+
}
|
|
159
|
+
async openMobileProductsModal() {
|
|
160
|
+
if (!this.mobileProductsModalMounted) {
|
|
161
|
+
this.mobileProductsModalMounted = true;
|
|
162
|
+
await this.waitForNextFrame();
|
|
163
|
+
}
|
|
164
|
+
await this.mobileProductsModal?.open?.();
|
|
165
|
+
}
|
|
166
|
+
setMobileProductsModal(modal) {
|
|
167
|
+
if (this.mobileProductsModal === modal) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
this.mobileProductsModal?.removeEventListener('orderEditProductSelected', this.handleMobileProductSelected);
|
|
171
|
+
this.mobileProductsModal = modal;
|
|
172
|
+
this.mobileProductsModal?.addEventListener('orderEditProductSelected', this.handleMobileProductSelected);
|
|
173
|
+
}
|
|
174
|
+
resetAddProductDrawer() {
|
|
175
|
+
this.selectedProductToAdd = null;
|
|
176
|
+
this.addProductQuantity = 1;
|
|
177
|
+
this.addProductLoading = false;
|
|
178
|
+
this.addProductConfirmLoading = false;
|
|
179
|
+
this.addProductOptions = null;
|
|
180
|
+
}
|
|
181
|
+
getAddProductMaxQuantity(product = this.selectedProductToAdd) {
|
|
182
|
+
return getOrderEditProductMaxQuantity(product);
|
|
183
|
+
}
|
|
184
|
+
clampAddProductQuantity(quantity, product = this.selectedProductToAdd) {
|
|
185
|
+
return clampOrderEditQuantity(quantity, this.getAddProductMaxQuantity(product));
|
|
186
|
+
}
|
|
187
|
+
getApiErrorMessage(error) {
|
|
188
|
+
return error?.response?.data?.error?.message || error?.response?.data?.message;
|
|
189
|
+
}
|
|
190
|
+
notifyApiError(error) {
|
|
191
|
+
const message = this.getApiErrorMessage(error);
|
|
192
|
+
if (message) {
|
|
193
|
+
salla.notify.error(message);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
async validateAddProductOptions() {
|
|
197
|
+
if (!this.selectedProductToAdd?.options?.length) {
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
200
|
+
if (!this.addProductOptions) {
|
|
201
|
+
return false;
|
|
202
|
+
}
|
|
203
|
+
return ((await this.addProductOptions.validateAndScroll?.()) ??
|
|
204
|
+
(await this.addProductOptions.reportValidity?.()) ??
|
|
205
|
+
false);
|
|
206
|
+
}
|
|
207
|
+
updateLocalOrderItem(itemId, quantity, optionDefinitions, selectedOptions) {
|
|
208
|
+
this.order = {
|
|
209
|
+
...this.order,
|
|
210
|
+
items: updateOrderItems(this.order.items, itemId, quantity, optionDefinitions, selectedOptions),
|
|
68
211
|
};
|
|
212
|
+
}
|
|
213
|
+
removeLocalOrderItem(itemId) {
|
|
69
214
|
this.order = {
|
|
70
215
|
...this.order,
|
|
71
|
-
items: this.order.items
|
|
216
|
+
items: removeOrderItems(this.order.items, itemId),
|
|
72
217
|
};
|
|
73
218
|
}
|
|
219
|
+
setPayloadItems(patch) {
|
|
220
|
+
this.payload = {
|
|
221
|
+
...this.payload,
|
|
222
|
+
items: mergePayloadItems(this.payload.items, patch),
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
handleAddProductQuantityChange(event) {
|
|
226
|
+
const detail = event.detail;
|
|
227
|
+
const newQuantity = detail?.quantity ?? parseInt(event.target?.value, 10);
|
|
228
|
+
if (isNaN(newQuantity) || newQuantity < 1) {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
this.addProductQuantity = this.clampAddProductQuantity(newQuantity);
|
|
232
|
+
}
|
|
233
|
+
async handleProductSelected(event) {
|
|
234
|
+
const product = event.detail?.product;
|
|
235
|
+
if (!product?.id || this.addProductLoading) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
this.addProductLoading = true;
|
|
239
|
+
try {
|
|
240
|
+
this.selectedProductToAdd = cloneOrderEditProduct(product);
|
|
241
|
+
this.addProductQuantity = 1;
|
|
242
|
+
await this.mobileProductsModal?.close?.();
|
|
243
|
+
await this.waitForNextFrame();
|
|
244
|
+
await this.addProductDrawer?.open?.();
|
|
245
|
+
}
|
|
246
|
+
catch (error) {
|
|
247
|
+
this.notifyApiError(error);
|
|
248
|
+
}
|
|
249
|
+
finally {
|
|
250
|
+
this.addProductLoading = false;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
async confirmAddProduct() {
|
|
254
|
+
if (!this.selectedProductToAdd?.id) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
if (this.addProductConfirmLoading) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
this.addProductConfirmLoading = true;
|
|
261
|
+
try {
|
|
262
|
+
const maxQuantity = this.getAddProductMaxQuantity();
|
|
263
|
+
const normalizedQuantity = this.clampAddProductQuantity(this.addProductQuantity);
|
|
264
|
+
if (normalizedQuantity !== this.addProductQuantity) {
|
|
265
|
+
this.addProductQuantity = normalizedQuantity;
|
|
266
|
+
}
|
|
267
|
+
const productOptions = this.addProductOptions;
|
|
268
|
+
const optionsAreValid = await this.validateAddProductOptions();
|
|
269
|
+
if (!optionsAreValid) {
|
|
270
|
+
salla.notify.error(salla.lang.getWithDefault('common.messages.required_fields', 'يرجى تعبئة الحقول المطلوبة'));
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
const selectedOptionsPayload = (await productOptions?.getSelectedOptionsData?.()) || {};
|
|
274
|
+
const optionDefinitions = (await productOptions?.getOptionsData?.()) ||
|
|
275
|
+
this.selectedProductToAdd.options ||
|
|
276
|
+
[];
|
|
277
|
+
const existingItem = findMergeableItem(this.order?.items, this.selectedProductToAdd.id, selectedOptionsPayload);
|
|
278
|
+
if (existingItem) {
|
|
279
|
+
const mergedQuantity = clampOrderEditQuantity(existingItem.quantity + normalizedQuantity, maxQuantity);
|
|
280
|
+
this.updateLocalOrderItem(existingItem.id, mergedQuantity, optionDefinitions, selectedOptionsPayload);
|
|
281
|
+
if (existingItem.isNew) {
|
|
282
|
+
this.setPayloadItems({
|
|
283
|
+
add: updateAddedPayloadList(this.payload.items.add, existingItem.id, mergedQuantity, selectedOptionsPayload),
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
this.setPayloadItems({
|
|
288
|
+
update: upsertPayloadUpdateList(this.payload.items.update, existingItem.id, mergedQuantity, selectedOptionsPayload),
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
await this.addProductDrawer?.close?.();
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
const newItem = createAddedOrderItem(this.selectedProductToAdd, normalizedQuantity, optionDefinitions, selectedOptionsPayload);
|
|
295
|
+
const addEntry = {
|
|
296
|
+
itemId: newItem.id,
|
|
297
|
+
product_id: this.selectedProductToAdd.id,
|
|
298
|
+
quantity: normalizedQuantity,
|
|
299
|
+
options: selectedOptionsPayload,
|
|
300
|
+
};
|
|
301
|
+
this.order = {
|
|
302
|
+
...this.order,
|
|
303
|
+
items: [...this.order.items, newItem],
|
|
304
|
+
};
|
|
305
|
+
this.setPayloadItems({
|
|
306
|
+
add: [...this.payload.items.add, addEntry],
|
|
307
|
+
});
|
|
308
|
+
await this.addProductDrawer?.close?.();
|
|
309
|
+
}
|
|
310
|
+
catch (error) {
|
|
311
|
+
this.notifyApiError(error);
|
|
312
|
+
}
|
|
313
|
+
finally {
|
|
314
|
+
this.addProductConfirmLoading = false;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
handleItemUpdated(event) {
|
|
318
|
+
if (!this.order)
|
|
319
|
+
return;
|
|
320
|
+
const { itemId, quantity, options, optionDefinitions } = event.detail;
|
|
321
|
+
const currentItem = this.order.items.find(item => item.id === itemId);
|
|
322
|
+
if (!currentItem) {
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
const safeQuantity = clampOrderEditQuantity(quantity, getOrderEditProductMaxQuantity(currentItem.product));
|
|
326
|
+
if (currentItem.isNew) {
|
|
327
|
+
this.setPayloadItems({
|
|
328
|
+
add: updateAddedPayloadList(this.payload.items.add, itemId, safeQuantity, options),
|
|
329
|
+
});
|
|
330
|
+
this.updateLocalOrderItem(itemId, safeQuantity, optionDefinitions, options);
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
this.setPayloadItems({
|
|
334
|
+
update: upsertPayloadUpdateList(this.payload.items.update, itemId, safeQuantity, options ?? {}),
|
|
335
|
+
});
|
|
336
|
+
this.updateLocalOrderItem(itemId, safeQuantity, optionDefinitions, options);
|
|
337
|
+
}
|
|
74
338
|
handleItemRemoved(event) {
|
|
75
339
|
if (!this.order)
|
|
76
340
|
return;
|
|
@@ -79,35 +343,39 @@ const SallaOrderEdit = class {
|
|
|
79
343
|
return;
|
|
80
344
|
}
|
|
81
345
|
const { itemId } = event.detail;
|
|
82
|
-
this.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
346
|
+
const currentItem = this.order.items.find(item => item.id === itemId);
|
|
347
|
+
if (!currentItem) {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
if (currentItem.isNew) {
|
|
351
|
+
this.setPayloadItems({
|
|
352
|
+
add: this.payload.items.add.filter(item => item.itemId !== itemId),
|
|
353
|
+
});
|
|
354
|
+
this.removeLocalOrderItem(itemId);
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
this.setPayloadItems({
|
|
358
|
+
update: this.payload.items.update.filter(u => u.id !== itemId),
|
|
359
|
+
remove: [...this.payload.items.remove, itemId],
|
|
360
|
+
});
|
|
361
|
+
this.removeLocalOrderItem(itemId);
|
|
93
362
|
}
|
|
94
363
|
get hasChanges() {
|
|
95
|
-
return this.payload.items.update.length > 0 ||
|
|
364
|
+
return (this.payload.items.update.length > 0 ||
|
|
365
|
+
this.payload.items.remove.length > 0 ||
|
|
366
|
+
this.payload.items.add.length > 0);
|
|
96
367
|
}
|
|
97
368
|
async saveOrder() {
|
|
98
369
|
if (!this.hasChanges)
|
|
99
370
|
return;
|
|
100
371
|
this.saveLoading = true;
|
|
101
372
|
try {
|
|
102
|
-
const response = await salla.order.api.editOrder(this.orderId, this.payload);
|
|
373
|
+
const response = await salla.order.api.editOrder(this.orderId, buildSavePayload(this.payload));
|
|
103
374
|
this.editPreview = response?.data?.data || response?.data;
|
|
104
|
-
await this.saveModal?.open();
|
|
375
|
+
await this.saveModal?.open?.();
|
|
105
376
|
}
|
|
106
377
|
catch (error) {
|
|
107
|
-
|
|
108
|
-
if (message) {
|
|
109
|
-
salla.notify.error(message);
|
|
110
|
-
}
|
|
378
|
+
this.notifyApiError(error);
|
|
111
379
|
}
|
|
112
380
|
finally {
|
|
113
381
|
this.saveLoading = false;
|
|
@@ -134,12 +402,44 @@ const SallaOrderEdit = class {
|
|
|
134
402
|
this.navigateToOrder();
|
|
135
403
|
}
|
|
136
404
|
catch (error) {
|
|
137
|
-
|
|
138
|
-
if (message) {
|
|
139
|
-
salla.notify.error(message);
|
|
140
|
-
}
|
|
405
|
+
this.notifyApiError(error);
|
|
141
406
|
}
|
|
142
407
|
}
|
|
408
|
+
renderProductsPanel() {
|
|
409
|
+
const addProductTitle = salla.lang.getWithDefault('pages.orders.add_product_to_order', 'أضف منتج للطلب');
|
|
410
|
+
return (h("section", { class: "s-order-edit-products-panel" }, h("div", { class: "s-order-edit-products-header" }, h("h2", { class: "s-order-edit-products-title" }, addProductTitle)), this.renderProductsPickerContent('panel')));
|
|
411
|
+
}
|
|
412
|
+
renderProductsPickerContent(scope) {
|
|
413
|
+
return (h("div", { class: {
|
|
414
|
+
's-order-edit-products-picker': true,
|
|
415
|
+
's-order-edit-products-modal-content': scope === 'modal',
|
|
416
|
+
} }, h("label", { class: "s-order-edit-products-search" }, h("i", { class: "sicon-search" }), h("input", { type: "search", class: "s-order-edit-products-search-input", placeholder: salla.lang.getWithDefault('pages.products.search_for_product', 'ابحث عن منتج'), value: this.productSearchQuery, onInput: event => this.handleProductSearch(event) })), h("div", { class: "s-order-edit-products-list", onScroll: scope === 'modal' ? event => this.handleMobileProductsScroll(event) : undefined }, h("salla-products-list", { key: this.getProductsListKey(scope), includes: ['options'], source: this.productsListSource, "source-value": this.productsListSourceValue, autoload: true, "product-card-component": "salla-order-edit-product-card" }))));
|
|
417
|
+
}
|
|
418
|
+
renderMobileProductsModal() {
|
|
419
|
+
return (h("salla-modal", { ref: modal => this.setMobileProductsModal(modal), width: "md", class: "s-order-edit-mobile-products-modal", "modal-title": salla.lang.getWithDefault('pages.orders.add_product_to_order', 'أضف منتج للطلب'), onModalVisibilityChanged: (e) => {
|
|
420
|
+
if (!e.detail) {
|
|
421
|
+
this.mobileProductsModalMounted = false;
|
|
422
|
+
}
|
|
423
|
+
} }, this.mobileProductsModalMounted ? this.renderProductsPickerContent('modal') : null));
|
|
424
|
+
}
|
|
425
|
+
renderAddProductDrawer() {
|
|
426
|
+
const product = this.selectedProductToAdd;
|
|
427
|
+
const productName = product?.name || salla.lang.getWithDefault('common.elements.product', 'منتج');
|
|
428
|
+
const price = product?.price;
|
|
429
|
+
const maxQuantity = this.getAddProductMaxQuantity(product);
|
|
430
|
+
const optionsInstanceKey = product ? `order-edit-add-${product.id}` : 'order-edit-add';
|
|
431
|
+
const quantityAttrs = {
|
|
432
|
+
value: this.clampAddProductQuantity(this.addProductQuantity, product),
|
|
433
|
+
};
|
|
434
|
+
if (maxQuantity) {
|
|
435
|
+
quantityAttrs.max = maxQuantity;
|
|
436
|
+
}
|
|
437
|
+
return (h("salla-modal", { ref: drawer => (this.addProductDrawer = drawer), width: "md", "modal-title": salla.lang.getWithDefault('pages.orders.add_product_to_order', 'أضف منتج للطلب'), onModalVisibilityChanged: (e) => {
|
|
438
|
+
if (!e.detail) {
|
|
439
|
+
this.resetAddProductDrawer();
|
|
440
|
+
}
|
|
441
|
+
} }, h("div", { class: "s-order-edit-add-modal" }, this.addProductLoading ? (h("div", { class: "s-order-edit-add-modal-loading" }, h("salla-loading", null))) : product ? (h("div", { class: "s-order-edit-add-modal-content" }, h("div", { class: "s-order-edit-add-modal-header" }, h("div", { class: "s-order-edit-add-modal-media" }, product.image?.url && (h("img", { src: product.image.url, alt: product.image.alt || productName, class: "s-order-edit-add-modal-image" })), h("div", { class: "s-order-edit-add-modal-details" }, h("h3", { class: "s-order-edit-add-modal-name" }, productName), price != null && (h("span", { class: "s-order-edit-add-modal-price", innerHTML: salla.money(price) }))))), h("div", { class: "s-order-edit-add-modal-quantity" }, h("h3", { class: "s-order-edit-add-modal-section-title" }, salla.lang.getWithDefault('common.elements.quantity', 'الكمية')), h("div", { class: "s-order-edit-add-modal-quantity-input" }, h("salla-quantity-input", { ...quantityAttrs, onChange: event => this.handleAddProductQuantityChange(event) }))), product.options?.length > 0 && (h("form", { onSubmit: e => e.preventDefault() }, h("salla-product-options", { ref: el => (this.addProductOptions = el), "product-id": product.id, "unique-key": optionsInstanceKey, options: JSON.stringify(product.options), key: `${optionsInstanceKey}-options` }))), h("div", { class: "s-order-edit-add-modal-actions" }, h("salla-button", { onClick: () => this.confirmAddProduct(), loading: this.addProductConfirmLoading }, salla.lang.getWithDefault('common.elements.confirm', 'تأكيد')), h("salla-button", { color: "gray", fill: "outline", onClick: () => this.addProductDrawer?.close?.() }, salla.lang.getWithDefault('common.elements.cancel', 'الغاء'))))) : null)));
|
|
442
|
+
}
|
|
143
443
|
renderSaveModal() {
|
|
144
444
|
const preview = this.editPreview;
|
|
145
445
|
const hasRemainingAmount = preview?.totals?.remaining_amount?.amount > 0;
|
|
@@ -172,16 +472,15 @@ const SallaOrderEdit = class {
|
|
|
172
472
|
return (h(Host, null, h("div", { class: "s-order-edit-expired" }, h("p", null, salla.lang.getWithDefault('pages.orders.edit_session_expired', 'انتهت مدة التعديل المتاحة')), h("salla-button", { onClick: () => this.navigateToOrder() }, salla.lang.getWithDefault('pages.orders.back_to_order', 'العودة إلى تفاصيل الطلب')))));
|
|
173
473
|
}
|
|
174
474
|
if (this.error || !this.order) {
|
|
175
|
-
return (h(Host, null, h("div", { class: "no-content-placeholder" }, h("i", { class: "sicon-shopping-bag icon" }), h("p", null, this.error))));
|
|
475
|
+
return (h(Host, null, h("div", { class: "s-order-edit-no-content-placeholder" }, h("i", { class: "sicon-shopping-bag icon" }), h("p", null, this.error))));
|
|
176
476
|
}
|
|
177
477
|
const hasItems = this.order.items && this.order.items.length > 0;
|
|
178
478
|
const endsAt = this.order.customer_editing_session?.ends_at;
|
|
179
|
-
return (h(Host, null, endsAt && (h("div", { class: "s-order-edit-timer-wrapper" }, h("salla-count-down", { prefixText: salla.lang.getWithDefault('pages.orders.edit_within', 'يمكنك التعديل خلال'), date: endsAt, horizontal: true, withButton: true, autoSegments: true, labeled: false, size: "sm", color: "primary" }))), h("div", { class: "s-order-edit-items-wrapper" }, h("h2", { class: "s-order-edit-items-title" }, salla.lang.getWithDefault('pages.orders.order_products', 'منتجات الطلب')), hasItems ? (this.order.items.map((item, index) => [
|
|
479
|
+
return (h(Host, null, endsAt && (h("div", { class: "s-order-edit-timer-wrapper" }, h("salla-count-down", { prefixText: salla.lang.getWithDefault('pages.orders.edit_within', 'يمكنك التعديل خلال'), date: endsAt, horizontal: true, withButton: true, autoSegments: true, labeled: false, size: "sm", color: "primary" }))), h("div", { class: "s-order-edit-layout" }, !this.isMobileViewport ? this.renderProductsPanel() : null, h("section", { class: "s-order-edit-order-panel" }, h("div", { class: "s-order-edit-items-wrapper" }, h("h2", { class: "s-order-edit-items-title" }, salla.lang.getWithDefault('pages.orders.order_products', 'منتجات الطلب')), hasItems ? (this.order.items.map((item, index) => [
|
|
180
480
|
h("salla-order-edit-item", { key: item.id, item: item, orderId: this.orderId }),
|
|
181
481
|
index < this.order.items.length - 1 ? (h("div", { class: "s-order-edit-items-divider" })) : null,
|
|
182
|
-
])) : (h("div", { class: "no-content-placeholder" }, h("i", { class: "sicon-shopping-bag icon" }), h("p", null, salla.lang.getWithDefault('common.elements.no_items', 'لا توجد عناصر'))))), h("div", { class: "s-order-edit-actions" }, h("salla-button", { onClick: () => this.saveOrder(), loading: this.saveLoading, disabled: !this.hasChanges }, salla.lang.getWithDefault('pages.orders.save_changes', 'حفظ التعديلات')), h("salla-button", { color: "gray", fill: "outline", onClick: () => this.cancelEditSession() }, salla.lang.getWithDefault('common.elements.cancel', 'الغاء'))), this.renderSaveModal()));
|
|
482
|
+
])) : (h("div", { class: "s-order-edit-no-content-placeholder" }, h("i", { class: "sicon-shopping-bag icon" }), h("p", null, salla.lang.getWithDefault('common.elements.no_items', 'لا توجد عناصر'))))), h("div", { class: "s-order-edit-actions" }, h("salla-button", { class: "s-order-edit-mobile-products-trigger", color: "gray", size: "small", fill: "outline", onClick: () => this.openMobileProductsModal() }, h("i", { class: "sicon-add s-order-edit-mobile-products-trigger-icon" }), salla.lang.getWithDefault('pages.orders.add_product', 'إضافة منتج')), h("salla-button", { onClick: () => this.saveOrder(), loading: this.saveLoading, size: "small", disabled: !this.hasChanges }, salla.lang.getWithDefault('pages.orders.save_changes', 'حفظ التعديلات')), h("salla-button", { size: "small", color: "gray", fill: "outline", onClick: () => this.cancelEditSession() }, salla.lang.getWithDefault('common.elements.cancel', 'الغاء'))))), this.renderMobileProductsModal(), this.renderAddProductDrawer(), this.renderSaveModal()));
|
|
183
483
|
}
|
|
184
|
-
get host() { return getElement(this); }
|
|
185
484
|
};
|
|
186
485
|
SallaOrderEdit.style = sallaOrderEditCss;
|
|
187
486
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h } from './index-
|
|
4
|
+
import { r as registerInstance, h } from './index-CfaNNoM2.js';
|
|
5
5
|
import { S as SICheck } from './check-BZp0rKEO.js';
|
|
6
6
|
|
|
7
7
|
var iconFileArchive = `<!-- Generated by IcoMoon.io -->
|
|
@@ -90,7 +90,7 @@ const SallaOrderSummary = class {
|
|
|
90
90
|
this.copyCodeButtonTimeout && clearTimeout(this.copyCodeButtonTimeout);
|
|
91
91
|
}
|
|
92
92
|
render() {
|
|
93
|
-
return (h("ul", { key: '
|
|
93
|
+
return (h("ul", { key: '20b8d793a83306a203cd0f7eadededf3ce224181', class: "s-order-summary-wrapper" }, this.noItemFound ? h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" })) :
|
|
94
94
|
this.order_items.map((item) => (this.isDigitalCard(item) ? (h("li", { key: item.product.id, class: "s-order-summary-item" }, h("h2", { class: "s-order-summary-item-title" }, this.codes_text, " (", item.name, ")"), item.codes.map((code) => (h("div", { key: code.code, class: "s-order-summary-code-item-wrapper" }, h("p", null, h("span", { innerHTML: iconCreditCard }), h("span", null, code.code)), h("salla-button", { class: `s-order-summary-item-copy-button ${this.codeCopied === code.code ? 'copied' : ''}`, onClick: () => this.copyToClipboardHandler(code.code), shape: "link" }, h("span", { innerHTML: this.codeCopied === code.code ? SICheck : iconCopy }), h("span", null, this.copy_text))))))) :
|
|
95
95
|
this.isDigitalProduct(item) ? (h("li", { key: item.product.id, class: "s-order-summary-item" }, h("h2", { class: "s-order-summary-item-title" }, this.files_text, " (", item.name, ")"), h("ul", null, item.files.map((file) => (h("li", { class: "s-order-summary-digital-item-wrapper" }, h("div", null, h("span", { innerHTML: iconFileArchive }), h("span", null, file.name)), h("a", { href: file.url, target: "_blank", class: "s-order-summary-item-download" }, h("span", { innerHTML: iconDownload }), h("span", null, this.download_text)))))))) : null))));
|
|
96
96
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, a as getElement } from './index-CfaNNoM2.js';
|
|
5
5
|
import { H as Helper } from './Helper-DFMXF2_h.js';
|
|
6
6
|
import './anime.es-CgtvEd63.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-CfaNNoM2.js';
|
|
5
5
|
|
|
6
6
|
const sallaPaymentsCss = ":host{display:block}";
|
|
7
7
|
|
|
@@ -34,12 +34,12 @@ const SallaPayments = class {
|
|
|
34
34
|
render() {
|
|
35
35
|
const madeInKSA = !this.exclude.includes('made-in-ksa') && salla.config.get('store.settings.made_in_ksa');
|
|
36
36
|
const sbcId = this.exclude.includes('sbc') ? null : salla.config.get('store.settings.certificate.id');
|
|
37
|
-
return (h(Host, { key: '
|
|
37
|
+
return (h(Host, { key: '94af8ddf97dca63ba7c1a19f65a1d872b8d565c6', class: "s-payments-list-wrap" }, h("ul", { key: '8e1425d89a60290b92042f82edbd2c0505da2904', class: "s-payments-list" }, madeInKSA && h("li", { key: '4ca6642fc2ef1cf1505b37127cf93cf48805e454', class: "s-payments-list-item" }, h("img", { key: 'f704728b2fade2d27f2109d47bc7e7381f3efe8b', width: "100%", height: "100%", decoding: "async", loading: "lazy", src: salla.url.cdn(`images/made-in-ksa.svg`, 58, 58), alt: "made in KSA certified" })), this.payments.map((payment) => (payment == "cod" ?
|
|
38
38
|
h("div", { id: "cod-slot", innerHTML: this.codSlot
|
|
39
39
|
.replace(/\{image\}/g, salla.url.cdn(`images/payment/cod_mini.png`, 58, 58)) }) :
|
|
40
40
|
h("div", { id: "payment-slot", innerHTML: this.paymentSlot
|
|
41
41
|
.replace(/\{image\}/g, salla.url.cdn(`images/payment/${payment}_mini.png`, 58, 58))
|
|
42
|
-
.replace(/\{payment\}/g, payment) }))), sbcId && h("div", { key: '
|
|
42
|
+
.replace(/\{payment\}/g, payment) }))), sbcId && h("div", { key: '5071bb1e003ff36b445fd15948b7612f6a1ecde4', id: "sbc-slot", innerHTML: this.sbcSlot
|
|
43
43
|
.replace(/\{image\}/g, salla.url.cdn(`images/sbc.png`, 58, 58))
|
|
44
44
|
.replace(/\{link\}/g, `https://eauthenticate.saudibusiness.gov.sa/certificate-details/${sbcId}`) }))));
|
|
45
45
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-CfaNNoM2.js';
|
|
5
5
|
|
|
6
6
|
var Inbox = `<!-- Generated by IcoMoon.io -->
|
|
7
7
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
@@ -41,7 +41,7 @@ const SallaPlaceholder = class {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (h(Host, { key: '
|
|
44
|
+
return (h(Host, { key: 'c036c6655683dd28dc1fe108a0c9f18c41d4dab2', class: this.alignmentClass() }, h("div", { key: '8a344197473899bfce235707a0a4b586b09f7586', class: `s-placeholder-icon s-placeholder-icon-${this.iconSize}`, innerHTML: this.icon }), h("div", { key: '84c667eedacea750f761c0c650615c63812875ca', class: "s-placeholder-title" }, h("slot", { key: '4b59c67b550d5b4fb818007f0061b7648984c13c', name: 'title' }, h("span", { key: 'aec395c1624cc78932d4bddc2aaf936d6c300143' }, salla.lang.get('common.elements.no_options')))), h("div", { key: 'de0e5e440393992977e73d457df7c537cb2c1c8a', class: "s-placeholder-description" }, h("slot", { key: '4e85b215cd7255ee2ec7bd18913ea9f4709adaef', name: 'description' }, h("span", { key: '2c6746373095d09ef5cd19c2015cb240545d4ef9' }, salla.lang.get('common.errors.empty_results'))))));
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
SallaPlaceholder.style = sallaPlaceholderCss;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-CfaNNoM2.js';
|
|
5
5
|
import { a as arrowLeft } from './arrow-left-BedNk7k1.js';
|
|
6
6
|
|
|
7
7
|
var arrowRight = `<!-- Generated by IcoMoon.io -->
|
|
@@ -157,9 +157,9 @@ const SallaPriceRange = class {
|
|
|
157
157
|
this.maxPrice = value === undefined ? '' : value;
|
|
158
158
|
}
|
|
159
159
|
render() {
|
|
160
|
-
return (h(Host, { key: '
|
|
160
|
+
return (h(Host, { key: '343fd7a54f3a7d32c6709019fb168c7a8a1ca5f1' }, this.filterValues.map((filterValue, index) => {
|
|
161
161
|
return h("label", { class: "s-filters-label", htmlFor: `${this.option.key}-${index}`, key: index }, h("input", { id: `${this.option.key}-${index}`, name: "price", type: "radio", checked: this.isChecked(filterValue), class: "s-filters-radio", onChange: e => this.handleMinMaxPrice(e, filterValue) }), h("span", { innerHTML: this.getPriceLabel(filterValue) }));
|
|
162
|
-
}), h("div", { key: '
|
|
162
|
+
}), h("div", { key: '99b72a90eb7c99fd0a061f3ae6fdb7a16f4a6cb5', class: "flex justify-center items-center" }, h("div", { key: '90234fcadbfd931e1ccbd8006f47219196b7d958', class: "relative max-w-xl w-full" }, h("div", { key: 'eb284df7b56929fa0b6b31f029024a48ba0528b5', class: "s-price-range-inputs" }, h("div", { key: '43adbda7a9dd480690a678e0efc7aeed889fb81f', class: "s-price-range-relative" }, h("div", { key: '16277456eb7fc08357ff91daef4af1944e79b762', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: '9af2548117afe8389b786621d9e26e8f441c9fa6', type: "number", maxlength: "5", ref: el => this.minInput = el, onBlur: (e) => this.handleMinPrice(e), value: this.minPrice, placeholder: this.fromLabel, class: "s-price-range-number-input" })), h("div", { key: '5f5a45e86632b6183e0b85a5c1489d311b72c9b1', class: "s-price-range-gray-text" }, " -"), h("div", { key: '80198c67b69613cd09f0aa03faaf7f162a432478', class: "s-price-range-relative" }, h("div", { key: '5b84faee68142be3f18215b6f916eb1cd245c74c', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: 'a813df6ce1645b5e3d414a13879f9c4172bb6f4f', type: "number", maxlength: "5", ref: el => this.maxInput = el, onBlur: (e) => this.handleMaxPrice(e), value: this.maxPrice, placeholder: this.toLabel, class: "s-price-range-number-input", "aria-describedby": "price-currency" })), h("salla-button", { key: '34644f25fbd11238f27f3de0343ef5b65d192c16', color: 'gray', shape: 'icon', size: 'small', fill: 'outline', onClick: (event) => this.changedEventHandler(event) }, h("span", { key: '07f5f1d7faad2ad05ea8538076b73b14a8f3137c', innerHTML: this.isRTL ? arrowLeft : arrowRight })))))));
|
|
163
163
|
}
|
|
164
164
|
componentDidLoad() {
|
|
165
165
|
this.isReady = true;
|