@salla.sa/twilight-components 2.14.563 → 2.14.565
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/{apple-pay-order-options-DVyeUqBh.js → apple-pay-order-options-B036Wu4O.js} +15 -6
- package/dist/cjs/{filepond-DDjPDNMW.js → filepond-BOtBFq7k.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-BVNh-Hu4.js → filepond-plugin-file-poster-DWqXLSRO.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-Oob5x06X.js → filepond-plugin-file-validate-size-TkDVc9ih.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-WxO8IEZf.js → filepond-plugin-file-validate-type-B1TuLFJS.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-Btg3AmB2.js → filepond-plugin-image-edit-BtLH803a.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-B1eJhME_.js → filepond-plugin-image-exif-orientation-BJvccc13.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Cu5NsVcD.js → filepond-plugin-image-preview-DPgKIIC8.js} +1 -1
- package/dist/cjs/{index-Dm01liwE.js → index-BZ_aKmCD.js} +6 -6
- package/dist/cjs/{intlTelInput-mcmUzBhl.js → intlTelInput-CKLiJAA1.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +4 -4
- package/dist/cjs/salla-accordion_6.cjs.entry.js +3 -3
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +98 -18
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +4 -4
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +18 -18
- package/dist/cjs/salla-badge.cjs.entry.js +2 -2
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +46 -18
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +3 -3
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_9.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_2.cjs.entry.js +231 -42
- 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 +3 -3
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +4 -4
- package/dist/cjs/salla-hook.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/salla-localization-modal.cjs.entry.js +2 -2
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +15 -15
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +2 -2
- package/dist/cjs/salla-map_3.cjs.entry.js +4 -4
- 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 +4 -4
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +6 -6
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +2 -2
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-offer-modal.cjs.entry.js +2 -2
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-cancel.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 +2 -2
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- 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-embed.cjs.entry.js +2 -2
- package/dist/cjs/salla-product-card.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 +1 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +2 -2
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
- 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/salla-wishlist-actions.cjs.entry.js +2 -2
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-D0r86yPu.js → vanilla-picker-C7y_2HXu.js} +1 -1
- package/dist/collection/components/salla-accordion/salla-accordion-body.js +1 -1
- package/dist/collection/components/salla-accordion/salla-accordion-head.js +2 -2
- package/dist/collection/components/salla-accordion/salla-accordion.js +1 -1
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +2 -2
- package/dist/collection/components/salla-alert/salla-alert.js +1 -1
- package/dist/collection/components/salla-badge/salla-badge.js +1 -1
- package/dist/collection/components/salla-booking-field/salla-booking-field.js +1 -1
- package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +2 -2
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +7 -0
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +40 -12
- package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +2 -2
- package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +1 -1
- package/dist/collection/components/salla-color-picker/salla-color-picker.js +1 -1
- package/dist/collection/components/salla-comment-form/salla-comment-form.js +1 -1
- package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +1 -1
- package/dist/collection/components/salla-count-down/salla-count-down.js +1 -1
- package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +2 -2
- package/dist/collection/components/salla-filters/salla-filters.js +1 -1
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +2 -2
- package/dist/collection/components/salla-gifting/salla-gifting.js +2 -2
- package/dist/collection/components/salla-hook/salla-hook.js +1 -1
- package/dist/collection/components/salla-list-tile/salla-list-tile.js +1 -1
- package/dist/collection/components/salla-loading/salla-loading.js +1 -1
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +1 -1
- package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +1 -1
- package/dist/collection/components/salla-loyalty-points-history/salla-loyalty-points-history.js +1 -1
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-exchange-product-card.js +2 -2
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-hero.js +3 -3
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-point.js +4 -4
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-reward.js +2 -2
- package/dist/collection/components/salla-loyalty-program/salla-reward-card.js +1 -1
- package/dist/collection/components/salla-loyalty-program/salla-reward-details.js +3 -3
- package/dist/collection/components/salla-loyalty-program/salla-reward-exchange.js +1 -1
- package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.js +1 -1
- package/dist/collection/components/salla-map/salla-map.js +3 -3
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +1 -1
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +2 -2
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +4 -4
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +1 -1
- package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +1 -1
- package/dist/collection/components/salla-notifications/salla-notification-item.js +1 -1
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -1
- package/dist/collection/components/salla-order-details/salla-order-details.js +1 -1
- package/dist/collection/components/salla-order-edit/salla-order-edit-product-card.js +1 -1
- package/dist/collection/components/salla-order-options-modal/apple-pay-order-options.js +15 -6
- package/dist/collection/components/salla-order-options-modal/free-product-payload.js +49 -0
- package/dist/collection/components/salla-order-options-modal/order-options-gate.js +33 -8
- package/dist/collection/components/salla-order-options-modal/salla-order-options-modal.css +192 -15
- package/dist/collection/components/salla-order-options-modal/salla-order-options-modal.js +260 -48
- 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-card-embed/salla-product-card-embed.js +1 -1
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +15 -5
- package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
- package/dist/collection/components/salla-review-factors-tags/salla-review-factors-tags.js +1 -1
- package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
- package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.js +4 -4
- 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/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
- package/dist/components/apple-pay-order-options.js +15 -6
- package/dist/components/index.js +2 -2
- package/dist/components/salla-accordion-body2.js +1 -1
- package/dist/components/salla-accordion-head2.js +2 -2
- package/dist/components/salla-accordion2.js +1 -1
- package/dist/components/salla-add-product-button2.js +35 -11
- package/dist/components/salla-alert.js +1 -1
- package/dist/components/salla-badge2.js +1 -1
- package/dist/components/salla-booking-field2.js +1 -1
- package/dist/components/salla-bottom-alert.js +2 -2
- package/dist/components/salla-bullet-delivery.js +41 -13
- package/dist/components/salla-cart-coupons.js +2 -2
- package/dist/components/salla-cart-summary.js +1 -1
- package/dist/components/salla-color-picker2.js +1 -1
- package/dist/components/salla-comment-form2.js +1 -1
- package/dist/components/salla-conditional-fields2.js +1 -1
- package/dist/components/salla-count-down2.js +1 -1
- package/dist/components/salla-datetime-picker2.js +1 -1
- package/dist/components/salla-file-upload2.js +2 -2
- package/dist/components/salla-filters-widget2.js +2 -2
- package/dist/components/salla-filters.js +1 -1
- package/dist/components/salla-gifting.js +2 -2
- package/dist/components/salla-hook.js +1 -1
- package/dist/components/salla-list-tile2.js +1 -1
- package/dist/components/salla-loading2.js +1 -1
- package/dist/components/salla-localization-modal.js +1 -1
- package/dist/components/salla-loyalty-exchange-product-card2.js +2 -2
- package/dist/components/salla-loyalty-hero2.js +3 -3
- package/dist/components/salla-loyalty-point2.js +4 -4
- package/dist/components/salla-loyalty-points-history.js +1 -1
- package/dist/components/salla-loyalty-prize-item.js +1 -1
- package/dist/components/salla-loyalty-reward.js +2 -2
- package/dist/components/salla-maintenance-alert.js +1 -1
- package/dist/components/salla-map2.js +3 -3
- package/dist/components/salla-multiple-bundle-product-cart2.js +1 -1
- package/dist/components/salla-multiple-bundle-product-details2.js +2 -2
- package/dist/components/salla-multiple-bundle-product-options-modal2.js +4 -4
- package/dist/components/salla-multiple-bundle-product-slider2.js +1 -1
- package/dist/components/salla-multiple-bundle-product.js +1 -1
- package/dist/components/salla-notification-item2.js +1 -1
- package/dist/components/salla-offer-modal.js +1 -1
- package/dist/components/salla-order-details.js +1 -1
- package/dist/components/salla-order-edit-product-card.js +1 -1
- package/dist/components/salla-order-options-modal2.js +234 -40
- 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-card-embed.js +1 -1
- package/dist/components/salla-product-card2.js +5 -5
- package/dist/components/salla-product-size-guide.js +2 -2
- package/dist/components/salla-quantity-input2.js +1 -1
- package/dist/components/salla-quick-buy2.js +62 -6
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-review-factors-tags2.js +1 -1
- package/dist/components/salla-reviews-page.js +1 -1
- package/dist/components/salla-reward-card2.js +1 -1
- package/dist/components/salla-reward-details2.js +3 -3
- package/dist/components/salla-reward-exchange2.js +1 -1
- package/dist/components/salla-searchable-dropdown2.js +4 -4
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-social-share2.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/components/salla-wishlist-actions.js +1 -1
- package/dist/esm/{apple-pay-order-options-Bg2HuLRr.js → apple-pay-order-options-s0kn7yr8.js} +15 -6
- package/dist/esm/{filepond-CY6pyFip.js → filepond-UQa5G279.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CB4IOEW6.js → filepond-plugin-file-poster-DuTq7hGp.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-CGmjBUqY.js → filepond-plugin-file-validate-size-CmrW5aIv.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-44ynhS6w.js → filepond-plugin-file-validate-type-C4wrsR8y.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-BaOXEOuD.js → filepond-plugin-image-edit-CFUxRm-l.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CswLPc6C.js → filepond-plugin-image-exif-orientation-eHT2qXpP.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DzvMpIJw.js → filepond-plugin-image-preview-CX0Er_bj.js} +1 -1
- package/dist/esm/{index-GfnuORRm.js → index-BC0OSCdw.js} +6 -6
- package/dist/esm/{intlTelInput-Cb2bEpkc.js → intlTelInput-DnPEdiN8.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +4 -4
- package/dist/esm/salla-accordion_6.entry.js +3 -3
- package/dist/esm/salla-add-product-button_5.entry.js +98 -18
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +4 -4
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-applied-filters.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +18 -18
- package/dist/esm/salla-badge.entry.js +2 -2
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_3.entry.js +46 -18
- package/dist/esm/salla-cart-coupons.entry.js +3 -3
- package/dist/esm/salla-cart-item-offers_2.entry.js +2 -2
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_9.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_2.entry.js +231 -42
- 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 +3 -3
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +4 -4
- package/dist/esm/salla-hook.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/salla-localization-modal.entry.js +2 -2
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner_10.entry.js +15 -15
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +3 -3
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +2 -2
- package/dist/esm/salla-loyalty-prize-item.entry.js +2 -2
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +2 -2
- package/dist/esm/salla-map_3.entry.js +4 -4
- 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 +4 -4
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +6 -6
- package/dist/esm/salla-multiple-bundle-product.entry.js +2 -2
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.entry.js +2 -2
- package/dist/esm/salla-offer-modal.entry.js +2 -2
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-cancel.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 +2 -2
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +2 -2
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- 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-embed.entry.js +2 -2
- package/dist/esm/salla-product-card.entry.js +6 -6
- package/dist/esm/salla-product-size-guide.entry.js +3 -3
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-review-factors-tags.entry.js +2 -2
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +2 -2
- 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/salla-wishlist-actions.entry.js +2 -2
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-Dn1KYUfg.js → vanilla-picker-BCMDEwEz.js} +1 -1
- package/dist/twilight/{p-ddc4c979.entry.js → p-00ade9ab.entry.js} +1 -1
- package/dist/twilight/{p-b108585a.entry.js → p-02b4c53f.entry.js} +1 -1
- package/dist/twilight/{p-a0ebb943.entry.js → p-040a60fa.entry.js} +1 -1
- package/dist/twilight/{p-eaf6405f.entry.js → p-077bba56.entry.js} +1 -1
- package/dist/twilight/p-08283d58.entry.js +4 -0
- package/dist/twilight/{p-c51e2840.entry.js → p-092e3574.entry.js} +1 -1
- package/dist/twilight/{p-9fe06cfd.entry.js → p-0ce7ec43.entry.js} +1 -1
- package/dist/twilight/{p-9420d204.entry.js → p-0cff28ab.entry.js} +1 -1
- package/dist/twilight/{p-a37c0015.entry.js → p-128c99f8.entry.js} +1 -1
- package/dist/twilight/{p-24a13f9a.entry.js → p-12d5856d.entry.js} +1 -1
- package/dist/twilight/{p-3bbcf3b5.entry.js → p-1678e509.entry.js} +1 -1
- package/dist/twilight/{p-0ccb9482.entry.js → p-1b61fdb7.entry.js} +1 -1
- package/dist/twilight/{p-79eca83e.entry.js → p-1c5df94c.entry.js} +1 -1
- package/dist/twilight/{p-4701b1db.entry.js → p-1e3f96f6.entry.js} +1 -1
- package/dist/twilight/{p-836528db.entry.js → p-217e8d6b.entry.js} +1 -1
- package/dist/twilight/{p-722afe08.entry.js → p-22454aab.entry.js} +1 -1
- package/dist/twilight/{p-15c3013e.entry.js → p-28cadf49.entry.js} +1 -1
- package/dist/twilight/p-29683d1e.entry.js +4 -0
- package/dist/twilight/{p-BwCPM9Ea.js → p-2LY0VWl8.js} +1 -1
- package/dist/twilight/{p-1494774e.entry.js → p-2ade195d.entry.js} +1 -1
- package/dist/twilight/{p-2b11beb9.entry.js → p-2c3bd065.entry.js} +1 -1
- package/dist/twilight/{p-b0c7b762.entry.js → p-2ddf12c9.entry.js} +1 -1
- package/dist/twilight/{p-9070affa.entry.js → p-2e68382e.entry.js} +1 -1
- package/dist/twilight/{p-0478a9d7.entry.js → p-39df1337.entry.js} +1 -1
- package/dist/twilight/{p-9b4ac3ed.entry.js → p-3cae6c0b.entry.js} +1 -1
- package/dist/twilight/{p-46a6e2f3.entry.js → p-3ccaf56b.entry.js} +1 -1
- package/dist/twilight/{p-d7bd8af5.entry.js → p-477fbe60.entry.js} +1 -1
- package/dist/twilight/{p-97ad1b5a.entry.js → p-4e53c800.entry.js} +1 -1
- package/dist/twilight/{p-ff54150b.entry.js → p-4ec4c29d.entry.js} +1 -1
- package/dist/twilight/p-4f9e25a2.entry.js +4 -0
- package/dist/twilight/{p-2c721e1a.entry.js → p-4fe6b957.entry.js} +1 -1
- package/dist/twilight/{p-f4b1dd6e.entry.js → p-512dffba.entry.js} +1 -1
- package/dist/twilight/{p-0c5747b1.entry.js → p-5258eb5b.entry.js} +1 -1
- package/dist/twilight/{p-2c00673b.entry.js → p-52abc216.entry.js} +1 -1
- package/dist/twilight/{p-46992827.entry.js → p-55c0c4d5.entry.js} +1 -1
- package/dist/twilight/{p-81dcaf69.entry.js → p-55ecefaf.entry.js} +1 -1
- package/dist/twilight/{p-d142c7d2.entry.js → p-5912c685.entry.js} +1 -1
- package/dist/twilight/{p-65d1043b.entry.js → p-596695cb.entry.js} +1 -1
- package/dist/twilight/{p-e9fe2027.entry.js → p-59a7515b.entry.js} +1 -1
- package/dist/twilight/{p-28ce2f83.entry.js → p-5aff8807.entry.js} +1 -1
- package/dist/twilight/p-5de36f11.entry.js +4 -0
- package/dist/twilight/{p-e23cd8b4.entry.js → p-60f4c8b0.entry.js} +1 -1
- package/dist/twilight/{p-ef20497a.entry.js → p-66460e90.entry.js} +1 -1
- package/dist/twilight/{p-deec864c.entry.js → p-6ef17286.entry.js} +1 -1
- package/dist/twilight/{p-6c27051d.entry.js → p-6fe42bfe.entry.js} +1 -1
- package/dist/twilight/{p-35c011ed.entry.js → p-717258c4.entry.js} +1 -1
- package/dist/twilight/{p-bd56d44c.entry.js → p-73795f51.entry.js} +1 -1
- package/dist/twilight/{p-c1baa245.entry.js → p-77540bba.entry.js} +1 -1
- package/dist/twilight/{p-c84cc730.entry.js → p-7785635d.entry.js} +1 -1
- package/dist/twilight/{p-24e0386e.entry.js → p-77a708f4.entry.js} +1 -1
- package/dist/twilight/{p-1b10f9dc.entry.js → p-7a7b9917.entry.js} +1 -1
- package/dist/twilight/{p-2ad08012.entry.js → p-810fca9f.entry.js} +1 -1
- package/dist/twilight/{p-33513478.entry.js → p-84aa1f0f.entry.js} +1 -1
- package/dist/twilight/{p-8b781b69.entry.js → p-85df7952.entry.js} +1 -1
- package/dist/twilight/{p-a916380a.entry.js → p-8628e5d7.entry.js} +1 -1
- package/dist/twilight/{p-d53cf9bd.entry.js → p-87638789.entry.js} +1 -1
- package/dist/twilight/{p-6afefa1b.entry.js → p-8872ae84.entry.js} +1 -1
- package/dist/twilight/p-8b6d7dbc.entry.js +4 -0
- package/dist/twilight/{p-87ab3986.entry.js → p-8bd738dd.entry.js} +1 -1
- package/dist/twilight/{p-9d304f36.entry.js → p-8e3ceb05.entry.js} +1 -1
- package/dist/twilight/{p-1fb98623.entry.js → p-8ea86806.entry.js} +1 -1
- package/dist/twilight/{p-1f46c7f4.entry.js → p-913f0e67.entry.js} +1 -1
- package/dist/twilight/{p-60307b84.entry.js → p-928bdd13.entry.js} +1 -1
- package/dist/twilight/{p-83ddc4e1.entry.js → p-94bab301.entry.js} +1 -1
- package/dist/twilight/{p-0ae5c8c4.entry.js → p-9549fe7d.entry.js} +1 -1
- package/dist/twilight/{p-DKRQn16d.js → p-B4qhqpMO.js} +1 -1
- package/dist/twilight/p-BC0OSCdw.js +5 -0
- package/dist/twilight/{p-CaG1mvtI.js → p-BQ2uPuvt.js} +1 -1
- package/dist/twilight/p-BqsrYTv0.js +9 -0
- package/dist/twilight/{p-DWBrx3up.js → p-CJ9itb04.js} +1 -1
- package/dist/twilight/{p-Y8Y3Lce-.js → p-CbE9Aa2n.js} +1 -1
- package/dist/twilight/{p-BOL1voLy.js → p-Cfn7Ybxi.js} +1 -1
- package/dist/twilight/{p-CktZCPMt.js → p-DdkjVgyM.js} +1 -1
- package/dist/twilight/{p-BJIMNMji.js → p-Dz1PaIS6.js} +1 -1
- package/dist/twilight/{p-eb43d534.entry.js → p-a4bea3d2.entry.js} +1 -1
- package/dist/twilight/{p-5f96b566.entry.js → p-a72038c1.entry.js} +1 -1
- package/dist/twilight/{p-e32cef83.entry.js → p-a7340ba8.entry.js} +1 -1
- package/dist/twilight/{p-3d3ae480.entry.js → p-a94e4fc8.entry.js} +1 -1
- package/dist/twilight/{p-bc2766e2.entry.js → p-ad92b347.entry.js} +1 -1
- package/dist/twilight/{p-fc4b2479.entry.js → p-b65a15cb.entry.js} +1 -1
- package/dist/twilight/p-b92eb535.entry.js +4 -0
- package/dist/twilight/{p-caa21010.entry.js → p-bb8f6167.entry.js} +1 -1
- package/dist/twilight/{p-8eafdb6b.entry.js → p-bbfd1991.entry.js} +1 -1
- package/dist/twilight/{p-76bbf673.entry.js → p-beb9023e.entry.js} +1 -1
- package/dist/twilight/{p-e7d359d0.entry.js → p-ca540632.entry.js} +1 -1
- package/dist/twilight/{p-43ddc1a9.entry.js → p-d32ba4d6.entry.js} +1 -1
- package/dist/twilight/{p-9755cd5c.entry.js → p-dbe87ffe.entry.js} +1 -1
- package/dist/twilight/{p-4f5734c8.entry.js → p-dd4e8765.entry.js} +1 -1
- package/dist/twilight/{p-435538fc.entry.js → p-de3cd06e.entry.js} +1 -1
- package/dist/twilight/{p-fe28663a.entry.js → p-e0600f10.entry.js} +1 -1
- package/dist/twilight/{p-2a56105f.entry.js → p-e0a3937a.entry.js} +1 -1
- package/dist/twilight/{p-a69fada2.entry.js → p-e5ae8c3b.entry.js} +1 -1
- package/dist/twilight/{p-eb3b0f9a.entry.js → p-e67ba69c.entry.js} +1 -1
- package/dist/twilight/p-e77d4dbc.entry.js +4 -0
- package/dist/twilight/{p-d465b5f4.entry.js → p-eb5d5edc.entry.js} +1 -1
- package/dist/twilight/{p-119c92ea.entry.js → p-ed39f8fd.entry.js} +1 -1
- package/dist/twilight/{p-a8bd25ca.entry.js → p-f1b8972a.entry.js} +1 -1
- package/dist/twilight/{p-09adb410.entry.js → p-f66a6f43.entry.js} +1 -1
- package/dist/twilight/{p-08b78fdb.entry.js → p-f9aa9b5b.entry.js} +1 -1
- package/dist/twilight/{p-1a3b5964.entry.js → p-f9d778ec.entry.js} +1 -1
- package/dist/twilight/{p-5f6e61c1.entry.js → p-fcf32a4c.entry.js} +25 -25
- package/dist/twilight/{p-fc04f809.entry.js → p-fd38337e.entry.js} +1 -1
- package/dist/twilight/p-s0kn7yr8.js +4 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-order-options-modal/apple-pay-order-options.d.ts +9 -4
- package/dist/types/components/salla-order-options-modal/free-product-payload.d.ts +19 -0
- package/dist/types/components/salla-order-options-modal/order-options-gate.d.ts +11 -1
- package/dist/types/components/salla-order-options-modal/salla-order-options-modal.d.ts +76 -21
- package/dist/types/components/salla-quick-buy/salla-quick-buy.d.ts +2 -0
- package/dist/types/components.d.ts +59 -22
- package/package.json +5 -5
- package/dist/twilight/p-1e1ba8b7.entry.js +0 -4
- package/dist/twilight/p-2f76a067.entry.js +0 -4
- package/dist/twilight/p-9c50b57e.entry.js +0 -4
- package/dist/twilight/p-Bg2HuLRr.js +0 -4
- package/dist/twilight/p-GfnuORRm.js +0 -5
- package/dist/twilight/p-a1a4a1a8.entry.js +0 -4
- package/dist/twilight/p-bf4174b7.entry.js +0 -4
- package/dist/twilight/p-e2e741f7.entry.js +0 -4
- package/dist/twilight/p-fba00709.entry.js +0 -4
- package/dist/twilight/p-m9gfUJP2.js +0 -9
|
@@ -16,7 +16,7 @@ import { d as defineCustomElement$3 } from './salla-product-options2.js';
|
|
|
16
16
|
import { d as defineCustomElement$2 } from './salla-progress-bar2.js';
|
|
17
17
|
import { d as defineCustomElement$1 } from './salla-slider2.js';
|
|
18
18
|
|
|
19
|
-
const sallaOrderOptionsModalCss = "/*!twlt
|
|
19
|
+
const sallaOrderOptionsModalCss = "/*!twlt*/@charset \"UTF-8\";.s-order-options-modal-host .s-modal-header-inner,.s-order-options-modal-host .s-modal-header-content,.s-order-options-modal-host .s-modal-title{text-align:start !important}.s-order-options-modal-host.s-oom-wizard-modal .s-modal-title{display:none}.s-order-options-modal-host.s-oom-wizard-modal .s-modal-header-inner{flex:1;min-width:0}.s-order-options-modal-host.s-oom-wizard-modal .s-modal-header-content{display:none}.s-oom-steps{display:flex;align-items:center;justify-content:flex-start;gap:0.5rem;width:100%;padding:0}.s-oom-step{display:inline-flex;align-items:center;gap:0.375rem;padding:0.375rem 0.75rem 0.375rem 0.625rem;border-radius:9999px;font-size:0.8125rem;font-weight:600;line-height:1;white-space:nowrap;color:#9ca3af;background:transparent;border:1.5px solid #e5e7eb;transition:background 0.2s, color 0.2s, border-color 0.2s}.s-oom-step.active{background:#1a2533;color:#ffffff;border-color:#1a2533}.s-oom-step.active .s-oom-step-num{background:rgba(255, 255, 255, 0.2);color:#ffffff}.s-oom-step.done{color:#6b7280;border-color:#d1d5db}.s-oom-step-num{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;border-radius:50%;font-size:0.6875rem;font-weight:700;background:#e5e7eb;color:#6b7280;flex-shrink:0}.s-oom-step-label{font-size:0.8125rem}.s-oom-connector{flex:1;max-width:3rem;height:0;border-top:1.5px dashed #d1d5db}.s-oom-free-product-card{display:flex;align-items:center;gap:0.75rem;padding:0.75rem 1rem;margin-bottom:1rem;border:1px solid #e5e7eb;border-radius:0.75rem;background:#f9fafb;}.s-oom-free-product-info{display:flex;flex-direction:column;gap:0.25rem;min-width:0;flex:1}.s-oom-free-product-tags{display:flex;flex-wrap:wrap;align-items:center;gap:0.375rem}.s-oom-free-product-name{font-size:0.9375rem;font-weight:700;color:#111827;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.s-oom-free-badge{display:inline-block;padding:0.125rem 0.5rem;border-radius:9999px;font-size:0.6875rem;font-weight:600;color:#059669;background:#d1fae5;align-self:flex-start}.s-oom-free-offer-name{display:inline-block;padding:0.125rem 0.5rem;border-radius:9999px;font-size:0.6875rem;font-weight:500;color:#6b7280;background:#f3f4f6;align-self:flex-start}.s-oom-free-product-thumb{width:3.5rem;height:3.5rem;object-fit:cover;border-radius:0.5rem;flex-shrink:0;border:1px solid #e5e7eb}.s-order-options-modal-body{padding-top:0.25rem;max-height:60vh;overflow-y:auto;overscroll-behavior:contain}.s-order-options-modal-subtitle{font-size:0.875rem;color:#6b7280;margin-bottom:1rem;text-align:start}.s-order-options-modal-cta-content{display:flex;align-items:center;justify-content:center;gap:0.5rem;width:100%}.s-order-options-modal-cta-text{flex:1;text-align:center}.s-order-options-modal-apple-pay{display:block;width:100%;--apple-pay-button-width:100%;--apple-pay-button-height:44px;--apple-pay-button-border-radius:0.75rem}.s-order-options-modal-apple-pay-wrap{display:flex;flex-direction:column;gap:0.75rem;width:100%}.s-order-options-modal-apple-pay-total{display:flex;align-items:center;justify-content:space-between;gap:0.5rem}.s-order-options-modal-apple-pay-label,.s-order-options-modal-apple-pay-amount{font-size:1.125rem;line-height:1.5rem;font-weight:700;color:#111827}.s-oom-cta-arrow{font-size:0.875rem;flex-shrink:0}.static{position:static}.hidden{display:none}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-order-options-modal-body{display:block;max-height:60vh;overflow-y:auto;overscroll-behavior:contain}.s-order-options-modal-subtitle{margin-bottom:1rem;font-size:0.875rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-order-options-modal-fields{display:flex;flex-direction:column;gap:1rem}.s-order-options-modal-item{display:block}.s-order-options-modal-footer{display:flex;width:100%;align-items:center}.s-order-options-modal-cta-content{display:flex;align-items:center;gap:0.25rem}.s-order-options-modal-cta-text{font-weight:700}.s-order-options-modal-cta-total{font-weight:700}";
|
|
20
20
|
|
|
21
21
|
const SallaOrderOptionsModal = /*@__PURE__*/ proxyCustomElement(class SallaOrderOptionsModal extends HTMLElement {
|
|
22
22
|
constructor() {
|
|
@@ -26,20 +26,48 @@ const SallaOrderOptionsModal = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
26
26
|
this.rejectFn = null;
|
|
27
27
|
this.optionsRefs = new Map();
|
|
28
28
|
this.changeHandler = null;
|
|
29
|
-
/** Sync hook for callers that need to act under the submit user gesture (Apple Pay). */
|
|
30
29
|
this.submitCallback = null;
|
|
30
|
+
/** Wizard bookkeeping — not @State, only used for logic */
|
|
31
|
+
this._realOrderOptions = [];
|
|
32
|
+
this._collectedFreeOptions = [];
|
|
33
|
+
this._isWizard = false;
|
|
34
|
+
/** Pending free-product steps and where we are in them. */
|
|
35
|
+
this._freeQueue = [];
|
|
36
|
+
this._freeIndex = 0;
|
|
37
|
+
this._collectedFreeProducts = [];
|
|
38
|
+
/**
|
|
39
|
+
* The product's own price, held across the wizard. Gift steps show a 0 base (the gift is
|
|
40
|
+
* free), so without this the final total — which Apple Pay charges — would omit the product.
|
|
41
|
+
*/
|
|
42
|
+
this._orderBasePrice = 0;
|
|
43
|
+
/** Surcharges picked on gift steps already left behind, folded into the final total. */
|
|
44
|
+
this._accumulatedExtra = 0;
|
|
45
|
+
/** @State — all rendering decisions are driven by these */
|
|
31
46
|
this.orderOptions = [];
|
|
32
47
|
this.basePrice = 0;
|
|
33
48
|
this.liveTotal = 0;
|
|
34
49
|
this.isSubmitting = false;
|
|
35
|
-
/** Bumped each open() so the inner <salla-product-options> remounts. */
|
|
36
50
|
this.sessionId = 0;
|
|
37
51
|
this.paymentMode = 'default';
|
|
52
|
+
/** Card data for the free product being configured right now (null on the final step). */
|
|
53
|
+
this.freeProduct = null;
|
|
54
|
+
/**
|
|
55
|
+
* True while a free-product step is active. Tracked separately from `freeProduct` so an
|
|
56
|
+
* entry that arrives without card data still runs as its own step instead of silently
|
|
57
|
+
* rendering as the order-options step.
|
|
58
|
+
*/
|
|
59
|
+
this.inFreeStep = false;
|
|
38
60
|
this.title = '';
|
|
39
61
|
this.subtitle = '';
|
|
40
62
|
this.submitLabel = '';
|
|
41
63
|
this.totalLabel = '';
|
|
42
64
|
this.requiredMessage = '';
|
|
65
|
+
// Hardcode Arabic defaults — salla.lang.get() returns the key string itself when a key is
|
|
66
|
+
// missing, so `|| fallback` never fires. Defaults here guarantee correct text even before
|
|
67
|
+
// translations load or when the keys don't exist in the store's language file yet.
|
|
68
|
+
this.freeProductTitle = 'خيارات المنتج المجاني';
|
|
69
|
+
this.freeProductSubtitle = 'اختر ما يناسبك من خيارات المنتج';
|
|
70
|
+
this.freeProductContinueLabel = 'تابع واحصل على هديتك الان';
|
|
43
71
|
this.handleClose = () => {
|
|
44
72
|
if (this.isSubmitting)
|
|
45
73
|
return;
|
|
@@ -54,41 +82,109 @@ const SallaOrderOptionsModal = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
54
82
|
componentWillLoad() {
|
|
55
83
|
this.loadTranslations();
|
|
56
84
|
}
|
|
85
|
+
/** True when the page reads right-to-left, so directional icons can mirror. */
|
|
86
|
+
isRtl() {
|
|
87
|
+
return document?.documentElement?.getAttribute('dir') === 'rtl';
|
|
88
|
+
}
|
|
89
|
+
/** Returns the translated value only when the key actually resolves (not the key string itself). */
|
|
90
|
+
t(key, fallback) {
|
|
91
|
+
const val = salla.lang.get(key);
|
|
92
|
+
return val && val !== key ? val : fallback;
|
|
93
|
+
}
|
|
57
94
|
loadTranslations() {
|
|
58
95
|
this.title = salla.lang.get('blocks.order_options.title');
|
|
59
96
|
this.subtitle = salla.lang.get('blocks.order_options.subtitle');
|
|
60
97
|
this.submitLabel = salla.lang.get('blocks.order_options.continue');
|
|
61
98
|
this.totalLabel = salla.lang.get('blocks.order_options.total');
|
|
62
99
|
this.requiredMessage = salla.lang.get('blocks.order_options.required_message');
|
|
100
|
+
this.freeProductTitle = this.t('pages.products.free_product_options_title', 'خيارات المنتج المجاني');
|
|
101
|
+
this.freeProductSubtitle = this.t('pages.products.free_product_options_subtitle', 'اختر ما يناسبك من خيارات المنتج');
|
|
102
|
+
this.freeProductContinueLabel = this.t('pages.products.free_product_cta', 'تابع واحصل على هديتك الان');
|
|
63
103
|
}
|
|
64
|
-
/**
|
|
65
|
-
* Open the modal. Resolves with selections on submit; rejects on dismiss.
|
|
66
|
-
* `onSubmit` fires sync in the submit click (for Apple Pay user-gesture).
|
|
67
|
-
* `paymentMode: 'apple-pay'` swaps the footer button for <apple-pay-button>.
|
|
68
|
-
*/
|
|
69
104
|
async open(payload) {
|
|
70
|
-
|
|
71
|
-
// `details`, which product-options dereferences unguarded.
|
|
72
|
-
this.orderOptions = (Array.isArray(payload.orderOptions) ? payload.orderOptions : [])
|
|
105
|
+
const normalize = (arr) => (Array.isArray(arr) ? arr : [])
|
|
73
106
|
.map((o) => ({ ...o, details: o.details ?? [] }));
|
|
74
|
-
|
|
75
|
-
|
|
107
|
+
const realOrderOptions = normalize(payload.orderOptions);
|
|
108
|
+
const freeQueue = this.buildFreeQueue(payload, normalize);
|
|
109
|
+
this._realOrderOptions = realOrderOptions;
|
|
110
|
+
this._collectedFreeOptions = [];
|
|
111
|
+
this._collectedFreeProducts = [];
|
|
112
|
+
this._freeQueue = freeQueue;
|
|
113
|
+
this._freeIndex = 0;
|
|
114
|
+
this._orderBasePrice = Number(payload.basePrice) || 0;
|
|
115
|
+
this._accumulatedExtra = 0;
|
|
116
|
+
// The step bar appears whenever there is more than one step to walk — N gifts alone
|
|
117
|
+
// still needs it, not just the gift + order-options pairing.
|
|
118
|
+
this._isWizard = (freeQueue.length + (realOrderOptions.length > 0 ? 1 : 0)) > 1;
|
|
76
119
|
this.isSubmitting = false;
|
|
77
|
-
this.sessionId++;
|
|
78
120
|
this.optionsRefs.clear();
|
|
79
121
|
this.submitCallback = payload.onSubmit ?? null;
|
|
80
122
|
this.paymentMode = payload.paymentMode ?? 'default';
|
|
123
|
+
if (freeQueue.length > 0) {
|
|
124
|
+
this.loadFreeStep(0);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
// Single step: store order options
|
|
128
|
+
this.sessionId++;
|
|
129
|
+
this.inFreeStep = false;
|
|
130
|
+
this.orderOptions = realOrderOptions;
|
|
131
|
+
this.freeProduct = null;
|
|
132
|
+
this.basePrice = Number(payload.basePrice) || 0;
|
|
133
|
+
this.liveTotal = this.basePrice + this.seedOptionsPrice(this.orderOptions);
|
|
134
|
+
}
|
|
81
135
|
await this.modal?.open();
|
|
136
|
+
// salla-modal reads modal-title once in its constructor (@State, not @Prop) so it
|
|
137
|
+
// won't react to attribute changes. Push the correct title imperatively after open().
|
|
138
|
+
this.modal?.setTitle(this.inFreeStep ? this.freeProductTitle : this.title);
|
|
82
139
|
this.attachChangeListener();
|
|
83
140
|
return new Promise((resolve, reject) => {
|
|
84
141
|
this.resolveFn = resolve;
|
|
85
142
|
this.rejectFn = reject;
|
|
86
143
|
});
|
|
87
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Normalize `freeProducts` (and the legacy single-gift pair) into the step queue.
|
|
147
|
+
* Entries without options are dropped — there is nothing to ask, and the offer still
|
|
148
|
+
* auto-adds that product with its defaults.
|
|
149
|
+
*/
|
|
150
|
+
buildFreeQueue(payload, normalize) {
|
|
151
|
+
const queue = [];
|
|
152
|
+
(Array.isArray(payload.freeProducts) ? payload.freeProducts : []).forEach((entry) => {
|
|
153
|
+
const options = normalize(entry?.options);
|
|
154
|
+
if (!options.length)
|
|
155
|
+
return;
|
|
156
|
+
queue.push({
|
|
157
|
+
product: entry?.product
|
|
158
|
+
? { ...entry.product, offer_name: entry.offer_name ?? entry.product.offer_name ?? null }
|
|
159
|
+
: null,
|
|
160
|
+
options,
|
|
161
|
+
// The offer decides how many of Y are granted.
|
|
162
|
+
quantity: Number(entry?.quantity) > 0 ? Number(entry.quantity) : 1,
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
if (queue.length)
|
|
166
|
+
return queue;
|
|
167
|
+
const legacyOptions = normalize(payload.freeProductOptions);
|
|
168
|
+
if (legacyOptions.length) {
|
|
169
|
+
queue.push({ product: payload.freeProduct ?? null, options: legacyOptions, quantity: 1 });
|
|
170
|
+
}
|
|
171
|
+
return queue;
|
|
172
|
+
}
|
|
173
|
+
/** Swap the modal onto free-product step `index`. */
|
|
174
|
+
loadFreeStep(index) {
|
|
175
|
+
const step = this._freeQueue[index];
|
|
176
|
+
this._freeIndex = index;
|
|
177
|
+
this.optionsRefs.clear();
|
|
178
|
+
this.inFreeStep = true;
|
|
179
|
+
this.orderOptions = step.options;
|
|
180
|
+
this.freeProduct = step.product;
|
|
181
|
+
this.basePrice = 0;
|
|
182
|
+
this.liveTotal = this.seedOptionsPrice(step.options);
|
|
183
|
+
this.sessionId++;
|
|
184
|
+
}
|
|
88
185
|
async close() {
|
|
89
186
|
await this.modal?.close();
|
|
90
187
|
}
|
|
91
|
-
/** Sync walk of inputs — avoids `await` through the @Method that would consume the AP user gesture. */
|
|
92
188
|
collectOrderOptionsSync() {
|
|
93
189
|
const result = [];
|
|
94
190
|
for (const [, el] of this.optionsRefs) {
|
|
@@ -96,9 +192,8 @@ const SallaOrderOptionsModal = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
96
192
|
continue;
|
|
97
193
|
const inputs = el.querySelectorAll('[name^="options["],[name*="[options]["]');
|
|
98
194
|
inputs.forEach((input) => {
|
|
99
|
-
if (input instanceof HTMLInputElement && (input.type === 'radio' || input.type === 'checkbox') && !input.checked)
|
|
195
|
+
if (input instanceof HTMLInputElement && (input.type === 'radio' || input.type === 'checkbox') && !input.checked)
|
|
100
196
|
return;
|
|
101
|
-
}
|
|
102
197
|
const match = input.name.match(/(?:^|\[)options\]?\[(\d+)\]/);
|
|
103
198
|
if (!match)
|
|
104
199
|
return;
|
|
@@ -114,7 +209,6 @@ const SallaOrderOptionsModal = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
114
209
|
}
|
|
115
210
|
return result;
|
|
116
211
|
}
|
|
117
|
-
/** Sync native validity — keeps the AP user gesture intact. */
|
|
118
212
|
validateSync() {
|
|
119
213
|
let pass = true;
|
|
120
214
|
for (const [, el] of this.optionsRefs) {
|
|
@@ -122,8 +216,6 @@ const SallaOrderOptionsModal = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
122
216
|
continue;
|
|
123
217
|
const requiredInputs = el.querySelectorAll('[required]');
|
|
124
218
|
requiredInputs.forEach((input) => {
|
|
125
|
-
// Mirror salla-product-options.reportValidity(): skip hidden/disabled inputs so a
|
|
126
|
-
// required field in a `.hidden` conditional container can't silently block submit.
|
|
127
219
|
if (input.disabled || input.closest('.hidden'))
|
|
128
220
|
return;
|
|
129
221
|
if ('reportValidity' in input && !input.reportValidity())
|
|
@@ -132,11 +224,6 @@ const SallaOrderOptionsModal = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
132
224
|
}
|
|
133
225
|
return pass;
|
|
134
226
|
}
|
|
135
|
-
/**
|
|
136
|
-
* Sum the per-quantity fee (total_price = additional_price × qty) of any pre-selected details.
|
|
137
|
-
* Uses total_price so the total scales with product quantity; falls back to the per-unit
|
|
138
|
-
* additional_price only when total_price is absent. (CHOD-13172)
|
|
139
|
-
*/
|
|
140
227
|
seedOptionsPrice(orderOptions) {
|
|
141
228
|
let sum = 0;
|
|
142
229
|
orderOptions.forEach((opt) => {
|
|
@@ -147,7 +234,6 @@ const SallaOrderOptionsModal = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
147
234
|
});
|
|
148
235
|
return sum;
|
|
149
236
|
}
|
|
150
|
-
/** salla.event.on is global — attach per open, detach on close to avoid stacking. */
|
|
151
237
|
attachChangeListener() {
|
|
152
238
|
this.detachChangeListener();
|
|
153
239
|
this.changeHandler = () => this.recomputeTotal();
|
|
@@ -168,7 +254,6 @@ const SallaOrderOptionsModal = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
168
254
|
? await el.getSelectedOptions()
|
|
169
255
|
: [];
|
|
170
256
|
(selected || []).forEach((s) => {
|
|
171
|
-
// total_price already includes the product-quantity multiplier (CHOD-13172).
|
|
172
257
|
selectedPrice += Number(s.total_price ?? s.additional_price) || 0;
|
|
173
258
|
});
|
|
174
259
|
}
|
|
@@ -181,44 +266,148 @@ const SallaOrderOptionsModal = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
181
266
|
salla.notify?.error?.(this.requiredMessage);
|
|
182
267
|
return;
|
|
183
268
|
}
|
|
269
|
+
if (this.inFreeStep) {
|
|
270
|
+
const step = this._freeQueue[this._freeIndex];
|
|
271
|
+
const selected = this.collectOrderOptionsSync();
|
|
272
|
+
// Legacy single-gift callers still read the flat list off the first gift.
|
|
273
|
+
if (this._freeIndex === 0)
|
|
274
|
+
this._collectedFreeOptions = selected;
|
|
275
|
+
// A step left entirely empty is not forced into products[] — the offer still
|
|
276
|
+
// auto-adds that gift with its defaults.
|
|
277
|
+
if (selected.length && step?.product?.id) {
|
|
278
|
+
const options = {};
|
|
279
|
+
selected.forEach(({ id, value }) => { options[id] = value; });
|
|
280
|
+
this._collectedFreeProducts.push({
|
|
281
|
+
productId: step.product.id,
|
|
282
|
+
quantity: step.quantity,
|
|
283
|
+
options,
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
// Bank this step's surcharges — the gift's own base is 0, so liveTotal is pure surcharge.
|
|
287
|
+
this._accumulatedExtra += Math.max(0, this.liveTotal - this.basePrice);
|
|
288
|
+
// More gifts to configure — advance to the next one.
|
|
289
|
+
const next = this._freeIndex + 1;
|
|
290
|
+
if (next < this._freeQueue.length) {
|
|
291
|
+
this.loadFreeStep(next);
|
|
292
|
+
this.modal?.setTitle(this.freeProductTitle);
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
if (this._realOrderOptions.length) {
|
|
296
|
+
// Gifts done — advance to the store order-options step.
|
|
297
|
+
this.optionsRefs.clear();
|
|
298
|
+
this.inFreeStep = false;
|
|
299
|
+
this.freeProduct = null; // @State → re-render to the final step
|
|
300
|
+
this.orderOptions = this._realOrderOptions; // @State → swaps to store order options
|
|
301
|
+
// Restore the product's price: this step's total is what the shopper pays, and in
|
|
302
|
+
// apple-pay mode it becomes the sheet amount.
|
|
303
|
+
this.basePrice = this._orderBasePrice;
|
|
304
|
+
this.liveTotal = this._orderBasePrice + this.seedOptionsPrice(this._realOrderOptions);
|
|
305
|
+
this.sessionId++; // forces salla-product-options remount
|
|
306
|
+
this.modal?.setTitle(this.title); // update header: "خيارات الطلب"
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
// Gifts only, no store order options — this was the last step, so fire the submit hook
|
|
310
|
+
// (Apple Pay starts its session in there) before resolving.
|
|
311
|
+
this.isSubmitting = true;
|
|
312
|
+
// This step's surcharge is already banked above, so swap liveTotal for the product price
|
|
313
|
+
// rather than adding it — otherwise the surcharge is counted twice.
|
|
314
|
+
this.liveTotal = this._orderBasePrice;
|
|
315
|
+
this.fireSubmitCallback([]);
|
|
316
|
+
this.resolveAndClose([]);
|
|
317
|
+
this.isSubmitting = false;
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
// Step 2 (or single step) — resolve
|
|
184
321
|
this.isSubmitting = true;
|
|
185
322
|
const orderOptions = this.collectOrderOptionsSync();
|
|
186
|
-
|
|
187
|
-
|
|
323
|
+
this.fireSubmitCallback(orderOptions);
|
|
324
|
+
this.resolveAndClose(orderOptions);
|
|
325
|
+
this.isSubmitting = false;
|
|
326
|
+
}
|
|
327
|
+
/** Product price + every surcharge picked across the wizard. This is what Apple Pay charges. */
|
|
328
|
+
finalTotal() {
|
|
329
|
+
return Math.round((this.liveTotal + this._accumulatedExtra) * 100) / 100;
|
|
330
|
+
}
|
|
331
|
+
/** Fire the sync submit hook — Apple Pay opens its session inside this call, so never await. */
|
|
332
|
+
fireSubmitCallback(orderOptions) {
|
|
188
333
|
try {
|
|
189
|
-
this.submitCallback?.(orderOptions,
|
|
334
|
+
this.submitCallback?.(orderOptions, this.finalTotal(), this._collectedFreeProducts);
|
|
190
335
|
}
|
|
191
336
|
catch (err) {
|
|
192
337
|
salla?.logger?.warn?.('order-options modal onSubmit threw', err);
|
|
193
338
|
}
|
|
194
|
-
|
|
339
|
+
}
|
|
340
|
+
/** Hand the collected selections back to the caller and tear the modal down. */
|
|
341
|
+
resolveAndClose(orderOptions) {
|
|
342
|
+
this.resolveFn?.({
|
|
343
|
+
orderOptions,
|
|
344
|
+
freeProductOptions: this._collectedFreeOptions,
|
|
345
|
+
freeProducts: this._collectedFreeProducts,
|
|
346
|
+
});
|
|
195
347
|
this.resolveFn = null;
|
|
196
348
|
this.rejectFn = null;
|
|
197
349
|
this.submitCallback = null;
|
|
198
350
|
this.detachChangeListener();
|
|
199
351
|
this.modal?.close().then(() => this.reset());
|
|
200
|
-
this.isSubmitting = false;
|
|
201
352
|
}
|
|
202
|
-
/** Clear options on close so the inner <salla-product-options> unmounts. */
|
|
203
353
|
reset() {
|
|
204
354
|
this.orderOptions = [];
|
|
355
|
+
this.freeProduct = null;
|
|
356
|
+
this.inFreeStep = false;
|
|
205
357
|
this.optionsRefs.clear();
|
|
206
358
|
this.liveTotal = 0;
|
|
359
|
+
this._realOrderOptions = [];
|
|
360
|
+
this._collectedFreeOptions = [];
|
|
361
|
+
this._collectedFreeProducts = [];
|
|
362
|
+
this._freeQueue = [];
|
|
363
|
+
this._freeIndex = 0;
|
|
364
|
+
this._isWizard = false;
|
|
207
365
|
}
|
|
208
366
|
render() {
|
|
209
|
-
// salla.money returns HTML (sicon-sar icon) → render via innerHTML. Round
|
|
210
|
-
// first so floating-point sum doesn't show as 1174.3799999999999.
|
|
211
367
|
const totalHtml = salla.money(Math.round(this.liveTotal * 100) / 100);
|
|
212
|
-
|
|
368
|
+
const isStep1 = this.inFreeStep;
|
|
369
|
+
const productIdAttr = isStep1
|
|
370
|
+
? String(this.freeProduct?.id || `free-prod-${this.orderOptions[0]?.id}`)
|
|
371
|
+
: `order-options-${this.orderOptions[0]?.id}`;
|
|
372
|
+
// Distinct per gift so consecutive steps can't share a stale options ref.
|
|
373
|
+
const uniqueKey = isStep1 ? `free-product-options-${this._freeIndex}` : 'order-options';
|
|
374
|
+
// One chip per gift, then one for the store order options. `current` is the index of
|
|
375
|
+
// the step on screen; anything before it is done.
|
|
376
|
+
const stepLabels = [
|
|
377
|
+
...this._freeQueue.map(() => this.freeProductTitle),
|
|
378
|
+
...(this._realOrderOptions.length ? [this.title] : []),
|
|
379
|
+
];
|
|
380
|
+
const current = isStep1 ? this._freeIndex : this._freeQueue.length;
|
|
381
|
+
// Apple Pay must be offered on whichever step is genuinely last. With gifts but no store
|
|
382
|
+
// order options the last step IS a gift step, and gating on `!isStep1` would leave the
|
|
383
|
+
// shopper on a plain Continue button that never opens the payment sheet.
|
|
384
|
+
const isLastStep = current === Math.max(0, stepLabels.length - 1);
|
|
385
|
+
const showApplePay = this.paymentMode === 'apple-pay' && isLastStep;
|
|
386
|
+
// In wizard mode the step chips live in the modal header (slot="icon") so they appear
|
|
387
|
+
// next to the close button. A non-breaking space triggers salla-modal to render the
|
|
388
|
+
// header-inner container; the empty title div is hidden via .s-oom-wizard-modal CSS.
|
|
389
|
+
// In single-step mode the header shows the relevant title text directly.
|
|
390
|
+
const modalTitle = this._isWizard ? ' ' : (isStep1 ? this.freeProductTitle : this.title);
|
|
391
|
+
return (h("salla-modal", { key: '60e626bb49f8592c952182c182e6d73ddcaadeed', ref: el => (this.modal = el), class: `s-order-options-modal-host${this._isWizard ? ' s-oom-wizard-modal' : ''}`, width: "md", "modal-title": modalTitle, onModalVisibilityChanged: (e) => {
|
|
213
392
|
if (!e.detail)
|
|
214
393
|
this.handleClose();
|
|
215
|
-
} },
|
|
394
|
+
} }, this._isWizard && (h("div", { key: 'a842b5d1566c8bb0bd68d5986fb092c14f8a01d6', slot: "icon", class: "s-oom-steps" }, stepLabels.map((label, index) => [
|
|
395
|
+
index > 0 && h("div", { class: "s-oom-connector" }),
|
|
396
|
+
h("div", { class: `s-oom-step ${index === current ? 'active' : (index < current ? 'done' : '')}` }, h("span", { class: "s-oom-step-num" }, index + 1), h("span", { class: "s-oom-step-label" }, label)),
|
|
397
|
+
]))), h("div", { key: '1f61a756dcf824bf4d8be71ccbd9a0c2742851d2', class: "s-order-options-modal-body" }, isStep1 && this.freeProduct && (h("div", { key: '667841475dff0deda06d8d04e0a2841f33ec54b6', class: "s-oom-free-product-card" }, this.freeProduct.thumbnail && (h("img", { key: '129b99226216f0c1ca59fccbc0ba35d5af8cdee7', class: "s-oom-free-product-thumb", src: this.freeProduct.thumbnail, alt: this.freeProduct.name })), h("div", { key: 'ae385e2d4fb967144743d67eadd50f31c23332ec', class: "s-oom-free-product-info" }, h("span", { key: '4f48a3fd0af91435060a0d303a6d0f77f5afd1bc', class: "s-oom-free-product-name" }, this.freeProduct.name), h("div", { key: 'de62961aba2246c1d52d411461d6a45aed620eab', class: "s-oom-free-product-tags" }, h("span", { key: 'db1af48cc1a7583a7f2d026159ff01f03ad216bf', class: "s-oom-free-badge" }, this.t('common.elements.free', 'مجاني')), this.freeProduct.offer_name && (h("span", { key: 'ce595bccd755e908deb1c566758ca3629171962b', class: "s-oom-free-offer-name" }, this.freeProduct.offer_name)))))), h("p", { key: '161740bddbf25369392f362f9613f2e9c6a94fc1', class: "s-order-options-modal-subtitle" }, isStep1 ? this.freeProductSubtitle : this.subtitle), h("div", { key: '20d3f92f0f3782d599ec5ce923c2dad93f7c7608', class: "s-order-options-modal-fields" }, this.orderOptions.length > 0 && (h("salla-product-options", { key: this.sessionId, ref: el => {
|
|
216
398
|
if (!el)
|
|
217
399
|
return;
|
|
218
|
-
this.optionsRefs.set(
|
|
219
|
-
// Without seeding, first multi-select toggle wipes pre-selected defaults.
|
|
400
|
+
this.optionsRefs.set(uniqueKey, el);
|
|
220
401
|
el.seedSelectedOptions?.();
|
|
221
|
-
}, "product-id":
|
|
402
|
+
}, "product-id": productIdAttr, "unique-key": uniqueKey, options: JSON.stringify(this.orderOptions), "hide-out-label": "1", "no-padding": true })))), h("div", { key: 'c80a0c1f1b32e5396483171196879bc43713c2f4', slot: "footer", class: "s-order-options-modal-footer" }, showApplePay ? (h("div", { class: "s-order-options-modal-apple-pay-wrap" }, h("div", { class: "s-order-options-modal-apple-pay-total" }, h("span", { class: "s-order-options-modal-apple-pay-label" }, this.totalLabel), h("span", { class: "s-order-options-modal-apple-pay-amount", innerHTML: totalHtml })), h("apple-pay-button", { locale: salla?.config?.get?.('user.language_code') || 'ar', buttonstyle: "black", type: "buy", class: "s-order-options-modal-apple-pay", onClick: () => this.handleSubmit() }))) : (h("salla-button", { type: "button", color: "primary", fill: "solid", width: "wide", loading: this.isSubmitting, onClick: () => this.handleSubmit() }, h("span", { class: "s-order-options-modal-cta-content" }, h("span", { class: "s-order-options-modal-cta-text" }, isStep1 ? this.freeProductContinueLabel : this.submitLabel), isStep1
|
|
403
|
+
? h("i", { class: {
|
|
404
|
+
's-oom-cta-arrow': true,
|
|
405
|
+
// "Forward" is left in RTL and right in LTR; hardcoding arrow-left made
|
|
406
|
+
// English stores show a back-pointing arrow (CP-3813).
|
|
407
|
+
'sicon-arrow-left': this.isRtl(),
|
|
408
|
+
'sicon-arrow-right': !this.isRtl(),
|
|
409
|
+
} })
|
|
410
|
+
: h("span", { class: "s-order-options-modal-cta-total", innerHTML: totalHtml })))))));
|
|
222
411
|
}
|
|
223
412
|
get host() { return this; }
|
|
224
413
|
static get style() { return sallaOrderOptionsModalCss; }
|
|
@@ -229,11 +418,16 @@ const SallaOrderOptionsModal = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
229
418
|
"isSubmitting": [32],
|
|
230
419
|
"sessionId": [32],
|
|
231
420
|
"paymentMode": [32],
|
|
421
|
+
"freeProduct": [32],
|
|
422
|
+
"inFreeStep": [32],
|
|
232
423
|
"title": [32],
|
|
233
424
|
"subtitle": [32],
|
|
234
425
|
"submitLabel": [32],
|
|
235
426
|
"totalLabel": [32],
|
|
236
427
|
"requiredMessage": [32],
|
|
428
|
+
"freeProductTitle": [32],
|
|
429
|
+
"freeProductSubtitle": [32],
|
|
430
|
+
"freeProductContinueLabel": [32],
|
|
237
431
|
"open": [64],
|
|
238
432
|
"close": [64]
|
|
239
433
|
}]);
|
|
@@ -87,7 +87,7 @@ const SallaOrderSummary$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderSum
|
|
|
87
87
|
this.copyCodeButtonTimeout && clearTimeout(this.copyCodeButtonTimeout);
|
|
88
88
|
}
|
|
89
89
|
render() {
|
|
90
|
-
return (h("ul", { key: '
|
|
90
|
+
return (h("ul", { key: '96ce5c2d31f1908bd1522ad2f87094ab7d37cbd5', class: "s-order-summary-wrapper" }, this.noItemFound ? h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" })) :
|
|
91
91
|
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 ? IconVerified : iconCopy }), h("span", null, this.copy_text))))))) :
|
|
92
92
|
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))));
|
|
93
93
|
}
|
|
@@ -42,12 +42,12 @@ const SallaPayments$1 = /*@__PURE__*/ proxyCustomElement(class SallaPayments ext
|
|
|
42
42
|
render() {
|
|
43
43
|
const madeInKSA = !this.exclude.includes('made-in-ksa') && salla.config.get('store.settings.made_in_ksa');
|
|
44
44
|
const sbcId = this.exclude.includes('sbc') ? null : salla.config.get('store.settings.certificate.id');
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: '7b48366eb122743315532e53cfcf05ac31c5ad60', class: "s-payments-list-wrap" }, h("ul", { key: 'e278c90249fa655ede607689afd366e5dc538532', class: "s-payments-list" }, madeInKSA && h("li", { key: '6a2494479aaef3dbe8557feaf07b290b9a7fc3a9', class: "s-payments-list-item" }, h("img", { key: '386ee723fce881bf4206a3113ff8e611bf48c0c8', width: 58, height: 58, decoding: "async", loading: "lazy", src: salla.url.cdn(`images/made-in-ksa.svg`, 58, 58), alt: "made in KSA certified" })), this.payments.filter(payment => !this.exclude.includes(payment)).map((payment) => (payment == "cod" ?
|
|
46
46
|
h("div", { id: "cod-slot", innerHTML: this.codSlot
|
|
47
47
|
.replace(/\{image\}/g, this.paymentLogo(`cod`)) }) :
|
|
48
48
|
h("div", { id: "payment-slot", innerHTML: this.paymentSlot
|
|
49
49
|
.replace(/\{image\}/g, this.paymentLogo(payment))
|
|
50
|
-
.replace(/\{payment\}/g, payment) }))), sbcId && h("div", { key: '
|
|
50
|
+
.replace(/\{payment\}/g, payment) }))), sbcId && h("div", { key: '7a355da7a8f0ee873264807504d2d353739331bf', id: "sbc-slot", innerHTML: this.sbcSlot
|
|
51
51
|
.replace(/\{image\}/g, salla.url.cdn(`images/sbc.png`, 58, 58))
|
|
52
52
|
.replace(/\{link\}/g, `https://eauthenticate.saudibusiness.gov.sa/certificate-details/${sbcId}`) }))));
|
|
53
53
|
}
|
|
@@ -42,7 +42,7 @@ const SallaPlaceholder = /*@__PURE__*/ proxyCustomElement(class SallaPlaceholder
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: 'bb1e87ff964770b00667e5ba934e025a184056fe', class: this.alignmentClass() }, h("div", { key: '6a75cef023d5f1a719ebb8d91a8b2181e1635161', class: `s-placeholder-icon s-placeholder-icon-${this.iconSize}`, innerHTML: this.icon }), h("div", { key: 'cb68c4045df8dac84cd7c0626d9d8c322202e73d', class: "s-placeholder-title" }, h("slot", { key: '09f95446b63392eee020fa7d970e5387f83c4769', name: 'title' }, h("span", { key: 'b72e61aeabcc48fd5b3e14d76f4dcfab7c37703b' }, salla.lang.get('common.elements.no_options')))), h("div", { key: 'c9ba74e9a6dbe65c3e3d7994364182919bbbf3b0', class: "s-placeholder-description" }, h("slot", { key: '5441dc166551ead2f1386a58417d991fb62065f9', name: 'description' }, h("span", { key: 'd823d7f9bb6afa98df3307265b734ac06b3361ff' }, salla.lang.get('common.errors.empty_results'))))));
|
|
46
46
|
}
|
|
47
47
|
static get style() { return sallaPlaceholderCss; }
|
|
48
48
|
}, [4, "salla-placeholder", {
|
|
@@ -153,9 +153,9 @@ const SallaPriceRange = /*@__PURE__*/ proxyCustomElement(class SallaPriceRange e
|
|
|
153
153
|
this.maxPrice = value === undefined ? '' : value;
|
|
154
154
|
}
|
|
155
155
|
render() {
|
|
156
|
-
return (h(Host, { key: '
|
|
156
|
+
return (h(Host, { key: 'b03ebb94bc24463935ff1ef49872ebc85343276f' }, this.filterValues.map((filterValue, index) => {
|
|
157
157
|
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) }));
|
|
158
|
-
}), h("div", { key: '
|
|
158
|
+
}), h("div", { key: '701869c55602ed0ef68d2a1495b76f2159cf8d9d', class: "flex justify-center items-center" }, h("div", { key: '956a0ca9ab38e364baa9c1e7427c428143de2d64', class: "relative max-w-xl w-full" }, h("div", { key: '454523dfd41c249bc3ee984d9ebc908e257da655', class: "s-price-range-inputs" }, h("div", { key: 'f0047855d712ce0c637da08e0b5087253a4fa2d4', class: "s-price-range-relative" }, h("div", { key: '79d5ca39cb0da6b31523ae69f2ea62a1d49f4eed', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: '5caa99eb839a0bfb651b7080fc51f8a99102380d', 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: '8df49030aa912e646a82a16b75416f5b86a54735', class: "s-price-range-gray-text" }, " -"), h("div", { key: '9c7eaa41986246f5d1e0f42c8f917c83643abf83', class: "s-price-range-relative" }, h("div", { key: '79de4f4520d63e038a51153372b1aabf729aeaff', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: '497d516b45de96f205021cace76604a04887aeb4', 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: '3179fd8523d7aabe0a61f496752294416a02edd5', color: 'gray', shape: 'icon', size: 'small', fill: 'outline', onClick: (event) => this.changedEventHandler(event) }, h("span", { key: 'd3a4660e76c1baef73e24ff23d79622535d80cfc', innerHTML: this.isRTL ? IconArrowLeft : arrowRight })))))));
|
|
159
159
|
}
|
|
160
160
|
componentDidLoad() {
|
|
161
161
|
this.isReady = true;
|
|
@@ -146,7 +146,7 @@ const SallaProductAvailability = /*@__PURE__*/ proxyCustomElement(class SallaPro
|
|
|
146
146
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
147
147
|
}
|
|
148
148
|
render() {
|
|
149
|
-
return (h(Host, { key: '
|
|
149
|
+
return (h(Host, { key: '646195e9982d709d58b12eae7ee0649f85a76d93', class: "s-product-availability-wrap" }, this.isSubscribedToProduct
|
|
150
150
|
? h("div", { class: "s-product-availability-subscribed" }, h("span", { innerHTML: BellRing, class: "s-product-availability-subs-icon" }), salla.lang.get('pages.products.notify_availability_success'))
|
|
151
151
|
:
|
|
152
152
|
h("salla-button", { width: "wide", onClick: () => this.isUser ? this.submit() : this.openModel() }, salla.lang.get('pages.products.notify_availability')), this.isUser || this.isSubscribedToProduct ? '' : this.renderModal()));
|
|
@@ -99,7 +99,7 @@ const SallaProductCardEmbed$1 = /*@__PURE__*/ proxyCustomElement(class SallaProd
|
|
|
99
99
|
's-product-card-embed-card-align-right': this.align === 'right',
|
|
100
100
|
's-product-card-embed-card-align-center': this.align === 'center',
|
|
101
101
|
};
|
|
102
|
-
return (h(Host, { key: '
|
|
102
|
+
return (h(Host, { key: 'd001e10a89c192004bfdfdcbeeb83d2d9c695d95' }, this.hasError && h("span", { key: '2c35003750483da3d17d6df0ee5add7a3aaf530b', class: "s-product-card-embed-fallback" }), h("div", { key: 'ff5743f1a26421488677a28503f448d410b49abb', class: cardClasses, ref: (el) => {
|
|
103
103
|
this.cardContainer = el;
|
|
104
104
|
} })));
|
|
105
105
|
}
|
|
@@ -163,14 +163,14 @@ const SallaProductCard = /*@__PURE__*/ proxyCustomElement(class SallaProductCard
|
|
|
163
163
|
's-product-card-out-of-stock': this.productData?.is_out_of_stock,
|
|
164
164
|
};
|
|
165
165
|
const hrefProp = this.productData?.url ? { href: this.productData.url, title: `Learn more about ${this.productData?.name}` } : {};
|
|
166
|
-
return (h(Host, { key: '
|
|
166
|
+
return (h(Host, { key: 'd1564818d562c0fb87d85b91b8b555834d89dc97', id: `product-${this.productData?.id}`, class: classes }, h("div", { key: '207349279fc7c23f085aa6ac3b3d7ef35af1bf30', class: !this.fullImage ? 's-product-card-image' : 's-product-card-image-full' }, h("a", { key: '175253af991d2bc48ea0e325adf2e16bc6f9bb9d', ...hrefProp }, h("img", { key: 'f5d5effc090a5b47287e8c9fbb1b929335c73037', class: `s-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)
|
|
167
167
|
? 'contain'
|
|
168
168
|
: this.fitImageHeight
|
|
169
169
|
? this.fitImageHeight
|
|
170
|
-
: 'cover'} lazy`, src: this.placeholder, alt: this.productData?.image?.alt || this.productData?.name, "data-src": this.productData?.image?.url || this.productData?.thumbnail }), !this.fullImage && !this.minimal ? this.getProductBadge() : ''), this.fullImage && h("a", { key: '
|
|
171
|
-
h("salla-button", { shape: "icon", fill: "none", color: "light", loading: false, "aria-label": "Add or remove to wishlist", ref: el => this.wishlistBtn = el, class: "s-product-card-wishlist-btn animated", onClick: () => this.handleWishlistClick() }, h("span", { innerHTML: Heart })) : ''), h("div", { key: '
|
|
170
|
+
: 'cover'} lazy`, src: this.placeholder, alt: this.productData?.image?.alt || this.productData?.name, "data-src": this.productData?.image?.url || this.productData?.thumbnail }), !this.fullImage && !this.minimal ? this.getProductBadge() : ''), this.fullImage && h("a", { key: 'b8157ea9f720c219d4217b2a1f5c7d11c2093cae', ...hrefProp, class: "s-product-card-overlay" }), !this.horizontal && !this.fullImage ?
|
|
171
|
+
h("salla-button", { shape: "icon", fill: "none", color: "light", loading: false, "aria-label": "Add or remove to wishlist", ref: el => this.wishlistBtn = el, class: "s-product-card-wishlist-btn animated", onClick: () => this.handleWishlistClick() }, h("span", { innerHTML: Heart })) : ''), h("div", { key: 'fb21d4c6290a05721f10a30c1321d9f5558d7b41', class: "s-product-card-content" }, this.isSpecial && this.productData?.quantity ?
|
|
172
172
|
h("div", { class: "s-product-card-content-pie", ref: pie => this.pie = pie }, h("span", null, h("b", null, salla.helpers.number(this.productData?.quantity)), this.remained), h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -1 36 34", class: "s-product-card-content-pie-svg" }, h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-base" }), h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-bar" })))
|
|
173
|
-
: '', h("div", { key: '
|
|
173
|
+
: '', h("div", { key: 'fca467f3f2407870d9c203f1ba8533f15b01d180', class: { 's-product-card-content-main': true, 's-product-card-content-extra-padding': this.isSpecial } }, h("h3", { key: '34d89df8c8a1f8372ea53f1811b7246d27f36639', class: "s-product-card-content-title" }, h("a", { key: '24ff6f134a33ca108c3ff15649d7bee101fa3d2f', ...hrefProp }, this.getDisplayTitle())), this.productData?.subtitle && !this.minimal ?
|
|
174
174
|
h("p", { class: "s-product-card-content-subtitle" }, this.productData?.subtitle)
|
|
175
175
|
: ''), this.productData?.donation && !this.minimal && !this.fullImage ?
|
|
176
176
|
[h("salla-progress-bar", { donation: this.productData?.donation }), h("div", { class: "s-product-card-donation-input" }, this.productData?.donation?.can_donate ?
|
|
@@ -179,7 +179,7 @@ const SallaProductCard = /*@__PURE__*/ proxyCustomElement(class SallaProductCard
|
|
|
179
179
|
this.addBtn.donatingAmount = e.target.value;
|
|
180
180
|
}, id: "donation-amount", name: "donating_amount", class: "s-form-control", placeholder: this.donationAmount })]
|
|
181
181
|
: '')]
|
|
182
|
-
: '', h("div", { key: '
|
|
182
|
+
: '', h("div", { key: '10ee13faf57862712b3ce80d5ef6cb7b542090d9', class: { 's-product-card-content-sub': true, 's-product-card-content-extra-padding': this.isSpecial } }, this.getProductPrice(), this.showOutOfStockBesidePrice && this.productData?.is_out_of_stock ?
|
|
183
183
|
h("span", { class: "s-product-card-out-of-stock-label" }, this.outOfStock)
|
|
184
184
|
: '', this.productData?.rating?.stars && !this.minimal ?
|
|
185
185
|
h("div", { class: "s-product-card-rating" }, h("span", { innerHTML: Rate }), h("span", null, this.productData.rating.stars))
|
|
@@ -60,11 +60,11 @@ const SallaProductSizeGuide$1 = /*@__PURE__*/ proxyCustomElement(class SallaProd
|
|
|
60
60
|
return h("salla-placeholder", { alignment: "center", iconSize: "xl" }, h("div", { slot: "title" }, this.placeholder_title), h("div", { slot: "description" }, this.placeholder_description));
|
|
61
61
|
}
|
|
62
62
|
render() {
|
|
63
|
-
return (h("salla-modal", { key: '
|
|
63
|
+
return (h("salla-modal", { key: '821a0f8c890f62c278f2c6fbb0081c58074134fa', class: "s-product-size-guide-wrapper", id: 'salla-product-size-guide-modal', isLoading: true, "has-skeleton": true, width: "md", ref: modal => this.modal = modal }, h("span", { key: '54972cbc6899d788b3543f882d3f3cf0c6a50071', slot: 'icon', class: "s-product-size-guide-header-icon", innerHTML: PencilRuler }), h("div", { key: '251eca54b49ccd504cec94371103d52db3dceae5', slot: "loading" }, h("div", { key: '65563fe5e6114cdc1958b6acfc23338f87629ee9', class: "s-product-size-guide-skeleton" }, h("salla-skeleton", { key: '66c8da1a0ca4ff7bb48b7274135de2a79c08cf69', height: '15px', width: '25%' }), h("div", { key: '33f7ec9dc4d1749bebdd8d1765b63b04f13473f3', class: "s-product-size-guide-skeleton-header" }, h("salla-skeleton", { key: '1f1e52c77826df60eae9c814d0db6dfa22976495', height: '40px' }), h("salla-skeleton", { key: '608fc344f8b06e23776fac615b49730f5934baec', height: '40px' }), h("salla-skeleton", { key: '876f24fb4e06b8bd094ca9bc18c55e196b388201', height: '40px' }), h("salla-skeleton", { key: 'd3f0c5baad4e0d940b3a30598353629dd199cd38', height: '40px' })), h("div", { key: 'f492afd9c329add253c60c8692173288437213d8', class: "s-product-size-guide-skeleton-content" }, h("salla-skeleton", { key: '7246853ccd94c5de70dac399593cf3dd64ae85de', height: '15px', width: '25%' }), h("salla-skeleton", { key: '5b314c2a99a4437891a7fcaf4d01a29597a03422', height: '10px', width: '75%' }), h("salla-skeleton", { key: '4cde9368235a5f355d3ce4c28642cb3f29716880', height: '10px', width: '50%' }), h("salla-skeleton", { key: 'fb7be5927efc29a993049632dde462e5e329d74b', height: '10px', width: '75%' }), h("salla-skeleton", { key: '945f9901fdd6b681c28b80f3a7b9c253c5063424', height: '10px', width: '100%' }), h("salla-skeleton", { key: '991f7e304524d0acc6c8eab5dfef4be75eee7655', height: '10px', width: '25%' }), h("salla-skeleton", { key: '9d2c66c90b20abd0984ea2ef3ced2f9dbe3479c2', height: '10px', width: '60%' }), h("salla-skeleton", { key: '0943d7f53030e26034e01c89c8edf1cfd76a87ab', height: '10px', width: '45%' }), h("salla-skeleton", { key: '683502d6f44eb68fe7ba7f9b54df456b725bd126', height: '10px', width: '30%' })))), h("slot", { key: 'bf50073356c49df10842635491e2606321faaa50', name: "header" }), !this.hasError && !!this.guides ?
|
|
64
64
|
[
|
|
65
65
|
h("salla-tabs", null, this.guides.map((guide) => h("salla-tab-header", { slot: "header", name: guide.name }, h("span", null, guide.name))), this.guides.map((guide) => h("salla-tab-content", { slot: "content", name: guide.name }, h("div", { innerHTML: guide.description }))))
|
|
66
66
|
]
|
|
67
|
-
: this.showPlaceholder(), h("slot", { key: '
|
|
67
|
+
: this.showPlaceholder(), h("slot", { key: '2f357ddc66624cb7c05324ed9fb8c1164b39eda1', name: "footer" })));
|
|
68
68
|
}
|
|
69
69
|
get host() { return this; }
|
|
70
70
|
static get style() { return sallaProductSizeGuideCss; }
|
|
@@ -95,7 +95,7 @@ const SallaQuantityInput = /*@__PURE__*/ proxyCustomElement(class SallaQuantityI
|
|
|
95
95
|
if (!inputAttributes['aria-label'] && !inputAttributes['aria-labelledby']) {
|
|
96
96
|
inputAttributes['aria-label'] = salla.lang.getWithDefault('common.elements.quantity', 'Quantity');
|
|
97
97
|
}
|
|
98
|
-
return (h(Host, { key: '
|
|
98
|
+
return (h(Host, { key: 'bf0882609ec0e164d8280789ee6deeaadeb3e484', class: "s-quantity-input" }, h("div", { key: 'c69afe51313f69250454cf6cf72dba89fb1f92e2', class: "s-quantity-input-container" }, h("button", { key: '8a02d3452f9727278acae90f1017eed65033c0a3', onClick: () => this.increase(), class: "s-quantity-input-increase-button s-quantity-input-button", type: "button", "aria-label": salla.lang.getWithDefault('common.elements.increase_quantity', 'Increase quantity') }, !this.hasIncrementSlot ? h("span", { innerHTML: Add }) : '', h("slot", { key: 'f4f1dbb40e2d90205075a8d3bf31a7e4a08ee6b5', name: "increment-button" })), h("input", { key: '67b7cdc6ef5311799d200660f26a7520e122b411', class: "s-quantity-input-input", ...inputAttributes, ref: (el) => this.textInput = el, onInput: (event) => this.setValue(event.target.value), inputMode: "numeric", pattern: "[0-9]*", min: "1", readOnly: this.disableInput, value: this.quantity }), h("button", { key: 'f0139bd8e74744e9396cbae706151ec3c092766b', class: "s-quantity-input-decrease-button s-quantity-input-button", onClick: () => this.decrease(), type: "button", "aria-label": salla.lang.getWithDefault('common.elements.decrease_quantity', 'Decrease quantity') }, !this.hasDecrementSlot ? h("span", { innerHTML: Minus }) : '', h("slot", { key: 'd051c3ca89310e67f834a970788abc606e5d2bbc', name: "decrement-button" })))));
|
|
99
99
|
}
|
|
100
100
|
get host() { return this; }
|
|
101
101
|
static get watchers() { return {
|