@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
|
@@ -83,6 +83,8 @@ export declare class SallaQuickBuy {
|
|
|
83
83
|
isApplePayActive: boolean;
|
|
84
84
|
/** Modal selections, merged into the quick-purchase payload. */
|
|
85
85
|
private collectedOrderOptions;
|
|
86
|
+
/** Free offer products the shopper configured in the wizard, for the products[] payload. */
|
|
87
|
+
private collectedFreeProducts;
|
|
86
88
|
/** Flips true after the first onStartedSession so the second dispatch begins. */
|
|
87
89
|
private optionsResolved;
|
|
88
90
|
/** PDP price + selected order-option prices (from the modal). */
|
|
@@ -26,7 +26,7 @@ import { CancellationReason } from "./components/salla-order-cancel/interfaces";
|
|
|
26
26
|
import { OrderProduct, ProductOption } from "./components/salla-order-details/interfaces";
|
|
27
27
|
import { OrderEditItem, OrderEditProductOption, OrderEditSelectedOptions } from "./components/salla-order-edit/interfaces";
|
|
28
28
|
import { Product } from "@salla.sa/twilight/types/common";
|
|
29
|
-
import { OrderOptionEntry } from "./components/salla-order-options-modal/salla-order-options-modal";
|
|
29
|
+
import { FreeProductSelection, OrderOptionEntry } from "./components/salla-order-options-modal/salla-order-options-modal";
|
|
30
30
|
import { Order, OrderQueryParameters } from "./components/salla-orders/interface";
|
|
31
31
|
import { Donation, Option as Option1 } from "./components/salla-product-options/interfaces";
|
|
32
32
|
import { SallaSliderProps } from "./components/salla-slider/salla-slider";
|
|
@@ -56,7 +56,7 @@ export { CancellationReason } from "./components/salla-order-cancel/interfaces";
|
|
|
56
56
|
export { OrderProduct, ProductOption } from "./components/salla-order-details/interfaces";
|
|
57
57
|
export { OrderEditItem, OrderEditProductOption, OrderEditSelectedOptions } from "./components/salla-order-edit/interfaces";
|
|
58
58
|
export { Product } from "@salla.sa/twilight/types/common";
|
|
59
|
-
export { OrderOptionEntry } from "./components/salla-order-options-modal/salla-order-options-modal";
|
|
59
|
+
export { FreeProductSelection, OrderOptionEntry } from "./components/salla-order-options-modal/salla-order-options-modal";
|
|
60
60
|
export { Order, OrderQueryParameters } from "./components/salla-orders/interface";
|
|
61
61
|
export { Donation, Option as Option1 } from "./components/salla-product-options/interfaces";
|
|
62
62
|
export { SallaSliderProps } from "./components/salla-slider/salla-slider";
|
|
@@ -2213,18 +2213,25 @@ export namespace Components {
|
|
|
2213
2213
|
"product": Product | string;
|
|
2214
2214
|
}
|
|
2215
2215
|
/**
|
|
2216
|
-
* Modal that collects
|
|
2216
|
+
* Modal that collects order options and/or free product options before checkout.
|
|
2217
|
+
* Wizard mode (CP-2836): when free products are provided alongside orderOptions, the modal
|
|
2218
|
+
* runs one step per free product Y, then a final step for the store-level order options:
|
|
2219
|
+
* Steps 1..N — free product Y card + its product options (inFreeStep drives this)
|
|
2220
|
+
* Step N+1 — store-level order options (inFreeStep cleared, orderOptions swapped)
|
|
2221
|
+
* `advance_free_product` is a LIST — one entry per qualifying offer, ordered by the offer's
|
|
2222
|
+
* effective priority and capped by the store's offers limit — so N is not always 1.
|
|
2223
|
+
* Single-step mode (CHOD-11650 compat): no free products → original behavior.
|
|
2217
2224
|
* Usage:
|
|
2218
|
-
* const
|
|
2219
|
-
*
|
|
2220
|
-
* //
|
|
2225
|
+
* const { orderOptions, freeProducts } = await modal.open({
|
|
2226
|
+
* orderOptions, // store-level order options (final step)
|
|
2227
|
+
* freeProducts, // [{ product, options, offer_name, quantity }, ...] (optional)
|
|
2228
|
+
* basePrice,
|
|
2229
|
+
* });
|
|
2230
|
+
* // freeProducts = [{ productId, quantity, options: { [optionId]: value } }, ...]
|
|
2221
2231
|
*/
|
|
2222
2232
|
interface SallaOrderOptionsModal {
|
|
2223
2233
|
"close": () => Promise<void>;
|
|
2224
|
-
|
|
2225
|
-
* Open the modal. Resolves with selections on submit; rejects on dismiss. `onSubmit` fires sync in the submit click (for Apple Pay user-gesture). `paymentMode: 'apple-pay'` swaps the footer button for <apple-pay-button>.
|
|
2226
|
-
*/
|
|
2227
|
-
"open": (payload: { orderOptions: any[]; basePrice?: number; paymentMode?: "default" | "apple-pay"; onSubmit?: (orderOptions: OrderOptionEntry[], total: number) => void; }) => Promise<{ orderOptions: OrderOptionEntry[]; }>;
|
|
2234
|
+
"open": (payload: { orderOptions: any[]; freeProducts?: any[]; freeProductOptions?: any[]; freeProduct?: any; basePrice?: number; paymentMode?: "default" | "apple-pay"; onSubmit?: (orderOptions: OrderOptionEntry[], total: number, freeProducts: FreeProductSelection[]) => void; }) => Promise<{ orderOptions: OrderOptionEntry[]; freeProductOptions: OrderOptionEntry[]; freeProducts: FreeProductSelection[]; }>;
|
|
2228
2235
|
}
|
|
2229
2236
|
/**
|
|
2230
2237
|
* @salla /ui-components
|
|
@@ -4733,11 +4740,21 @@ declare global {
|
|
|
4733
4740
|
new (): HTMLSallaOrderEditProductCardElement;
|
|
4734
4741
|
};
|
|
4735
4742
|
/**
|
|
4736
|
-
* Modal that collects
|
|
4743
|
+
* Modal that collects order options and/or free product options before checkout.
|
|
4744
|
+
* Wizard mode (CP-2836): when free products are provided alongside orderOptions, the modal
|
|
4745
|
+
* runs one step per free product Y, then a final step for the store-level order options:
|
|
4746
|
+
* Steps 1..N — free product Y card + its product options (inFreeStep drives this)
|
|
4747
|
+
* Step N+1 — store-level order options (inFreeStep cleared, orderOptions swapped)
|
|
4748
|
+
* `advance_free_product` is a LIST — one entry per qualifying offer, ordered by the offer's
|
|
4749
|
+
* effective priority and capped by the store's offers limit — so N is not always 1.
|
|
4750
|
+
* Single-step mode (CHOD-11650 compat): no free products → original behavior.
|
|
4737
4751
|
* Usage:
|
|
4738
|
-
* const
|
|
4739
|
-
*
|
|
4740
|
-
* //
|
|
4752
|
+
* const { orderOptions, freeProducts } = await modal.open({
|
|
4753
|
+
* orderOptions, // store-level order options (final step)
|
|
4754
|
+
* freeProducts, // [{ product, options, offer_name, quantity }, ...] (optional)
|
|
4755
|
+
* basePrice,
|
|
4756
|
+
* });
|
|
4757
|
+
* // freeProducts = [{ productId, quantity, options: { [optionId]: value } }, ...]
|
|
4741
4758
|
*/
|
|
4742
4759
|
interface HTMLSallaOrderOptionsModalElement extends Components.SallaOrderOptionsModal, HTMLStencilElement {
|
|
4743
4760
|
}
|
|
@@ -7481,11 +7498,21 @@ declare namespace LocalJSX {
|
|
|
7481
7498
|
"product"?: Product | string;
|
|
7482
7499
|
}
|
|
7483
7500
|
/**
|
|
7484
|
-
* Modal that collects
|
|
7501
|
+
* Modal that collects order options and/or free product options before checkout.
|
|
7502
|
+
* Wizard mode (CP-2836): when free products are provided alongside orderOptions, the modal
|
|
7503
|
+
* runs one step per free product Y, then a final step for the store-level order options:
|
|
7504
|
+
* Steps 1..N — free product Y card + its product options (inFreeStep drives this)
|
|
7505
|
+
* Step N+1 — store-level order options (inFreeStep cleared, orderOptions swapped)
|
|
7506
|
+
* `advance_free_product` is a LIST — one entry per qualifying offer, ordered by the offer's
|
|
7507
|
+
* effective priority and capped by the store's offers limit — so N is not always 1.
|
|
7508
|
+
* Single-step mode (CHOD-11650 compat): no free products → original behavior.
|
|
7485
7509
|
* Usage:
|
|
7486
|
-
* const
|
|
7487
|
-
*
|
|
7488
|
-
* //
|
|
7510
|
+
* const { orderOptions, freeProducts } = await modal.open({
|
|
7511
|
+
* orderOptions, // store-level order options (final step)
|
|
7512
|
+
* freeProducts, // [{ product, options, offer_name, quantity }, ...] (optional)
|
|
7513
|
+
* basePrice,
|
|
7514
|
+
* });
|
|
7515
|
+
* // freeProducts = [{ productId, quantity, options: { [optionId]: value } }, ...]
|
|
7489
7516
|
*/
|
|
7490
7517
|
interface SallaOrderOptionsModal {
|
|
7491
7518
|
}
|
|
@@ -9091,11 +9118,21 @@ declare module "@stencil/core" {
|
|
|
9091
9118
|
"salla-order-edit-item": LocalJSX.SallaOrderEditItem & JSXBase.HTMLAttributes<HTMLSallaOrderEditItemElement>;
|
|
9092
9119
|
"salla-order-edit-product-card": LocalJSX.SallaOrderEditProductCard & JSXBase.HTMLAttributes<HTMLSallaOrderEditProductCardElement>;
|
|
9093
9120
|
/**
|
|
9094
|
-
* Modal that collects
|
|
9121
|
+
* Modal that collects order options and/or free product options before checkout.
|
|
9122
|
+
* Wizard mode (CP-2836): when free products are provided alongside orderOptions, the modal
|
|
9123
|
+
* runs one step per free product Y, then a final step for the store-level order options:
|
|
9124
|
+
* Steps 1..N — free product Y card + its product options (inFreeStep drives this)
|
|
9125
|
+
* Step N+1 — store-level order options (inFreeStep cleared, orderOptions swapped)
|
|
9126
|
+
* `advance_free_product` is a LIST — one entry per qualifying offer, ordered by the offer's
|
|
9127
|
+
* effective priority and capped by the store's offers limit — so N is not always 1.
|
|
9128
|
+
* Single-step mode (CHOD-11650 compat): no free products → original behavior.
|
|
9095
9129
|
* Usage:
|
|
9096
|
-
* const
|
|
9097
|
-
*
|
|
9098
|
-
* //
|
|
9130
|
+
* const { orderOptions, freeProducts } = await modal.open({
|
|
9131
|
+
* orderOptions, // store-level order options (final step)
|
|
9132
|
+
* freeProducts, // [{ product, options, offer_name, quantity }, ...] (optional)
|
|
9133
|
+
* basePrice,
|
|
9134
|
+
* });
|
|
9135
|
+
* // freeProducts = [{ productId, quantity, options: { [optionId]: value } }, ...]
|
|
9099
9136
|
*/
|
|
9100
9137
|
"salla-order-options-modal": LocalJSX.SallaOrderOptionsModal & JSXBase.HTMLAttributes<HTMLSallaOrderOptionsModalElement>;
|
|
9101
9138
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salla.sa/twilight-components",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.565",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"author": "Salla Team <support@salla.dev> (https://salla.dev)",
|
|
6
6
|
"bugs": {
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@googlemaps/markerclusterer": "2.6.2",
|
|
85
|
-
"@salla.sa/applepay": "2.14.
|
|
86
|
-
"@salla.sa/twilight": "2.14.
|
|
87
|
-
"@salla.sa/twilight-tailwind-theme": "2.14.
|
|
85
|
+
"@salla.sa/applepay": "2.14.565",
|
|
86
|
+
"@salla.sa/twilight": "2.14.565",
|
|
87
|
+
"@salla.sa/twilight-tailwind-theme": "2.14.565",
|
|
88
88
|
"@salla.sa/ui-address-autocomplete-widget": "1.2.1",
|
|
89
89
|
"@salla.sa/ui-google-map-render": "1.2.1",
|
|
90
90
|
"@types/node": "^20.4.8",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"vanilla-lazyload": "^17.8.5",
|
|
106
106
|
"vanilla-picker": "^2.12.2"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "008bf46debffb480c696562071b1ee8ce4dea5f9"
|
|
109
109
|
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import{r as a,h as e,H as s,c,a as d}from"./p-GfnuORRm.js";import{p as t,m as o}from"./p-DfeagqF1.js";const i=class{constructor(e){a(this,e)}render(){return e(s,{key:"6407cbdb46897f683d1339287bcd0dc0df3dd409",class:"s-accordion-body-wrapper"},e("slot",{key:"ca050dff0df1dbee3d42a35582386829390dbdd3"}))}};i.style="";const r=class{constructor(e){a(this,e),this.accordionToggle=c(this,"accordionToggle"),this.collapsible=!1,this.collapsed=!0}emitCollapsePanel(){this.accordionToggle.emit({payload:{collapsed:this.collapsed}})}toggleCollapse(){this.collapsible&&(this.collapsed=!this.collapsed,this.host.parentElement?.setAttribute("data-collapsed",this.collapsed.toString()),this.host.parentElement?.querySelector("salla-accordion-body")?.setAttribute("data-collapsed",this.collapsed.toString()),this.emitCollapsePanel())}render(){return e(s,{key:"8fea8adefb7bd0b6aa4d88be25cb4e3f62bd4b0c","data-collapsed":this.collapsed.toString(),onClick:()=>this.toggleCollapse(),class:"s-accordion-head-wrapper"},e("div",{key:"d64952e2ec87c3f4de27f85800a0659b8cfbe08b",class:"s-accordion-head-wrapper-start"},e("slot",{key:"876bb377bef979afdb3b88e35d66ebe95e90ada8",name:"title"}),e("slot",{key:"b2a81aa92c0032098dd271931933679815660e6d",name:"progress"}),e("slot",{key:"9df2e816a0308cdd632bf13a7f16b553b5e877c2",name:"html"})),(this.collapsible||this.host.querySelector('[slot="note"]'))&&e("div",{key:"06f75d18708331176cdb1c80fd67dae352bd0550",class:"s-accordion-head-wrapper-end"},e("slot",{key:"04c7b9f174b6fff7aed4b1a045f160c4b11bbf55",name:"note"}),this.collapsible&&e("button",{key:"311aa1946afea02eb64b1c8e15c7e2fe97c76ecf",class:{"s-accordion-head-wrapper-toggle":!0,active:!this.collapsed},onClick:a=>{a.stopPropagation(),this.toggleCollapse()}},e("span",{key:"9758c580c6ca64c88079a76c0775ec727e0c488f",class:"s-accordion-head-wrapper-toggle-icon",innerHTML:this.collapsed?t:o}))))}get host(){return d(this)}};r.style="";export{i as salla_accordion_body,r as salla_accordion_head}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,h as o,H as e,a as n}from"./p-GfnuORRm.js";const i=class{constructor(o){t(this,o),this.size="md",this.color="dark",this.digits="auto",this.autoSegments=!1,this.daysLabel=salla.lang.getWithDefault("pages.checkout.day","يوم"),this.hoursLabel=salla.lang.getWithDefault("pages.checkout.hour","ساعة"),this.minutesLabel=salla.lang.getWithDefault("pages.checkout.minute","دقيقة"),this.secondsLabel=salla.lang.getWithDefault("pages.checkout.second","ثانية"),this.endLabel=salla.lang.getWithDefault("pages.checkout.offer_ended","انتهت مدة العرض"),this.invalidDate=salla.lang.getWithDefault("blocks.buy_as_gift.incorrect_date","الرجاء إدخال الموعد بشكل صحيح"),this.offerEnded=!1,this.parseFailed=!1,this.showDays=!0,this.showHours=!0,this.days=this.number(0),this.hours=this.number(0),this.minutes=this.number(0),this.seconds=this.number(0),salla.lang.onLoaded((()=>{this.daysLabel=salla.lang.getWithDefault("pages.checkout.day","يوم"),this.hoursLabel=salla.lang.getWithDefault("pages.checkout.hour","ساعة"),this.minutesLabel=salla.lang.getWithDefault("pages.checkout.minute","دقيقة"),this.invalidDate=salla.lang.getWithDefault("blocks.buy_as_gift.incorrect_date","الرجاء إدخال الموعد بشكل صحيح"),this.secondsLabel=salla.lang.getWithDefault("pages.checkout.second","ثانية"),this.endLabel=salla.lang.getWithDefault("pages.checkout.offer_ended","انتهت مدة العرض")})),this.date&&this.isValidDate(this.date)&&this.startCountDown()}async endCountDown(){clearInterval(this.countInterval),this.offerEnded=!0,this.days=this.number(0),this.hours=this.number(0),this.minutes=this.number(0),this.seconds=this.number(0)}componentWillLoad(){if("string"==typeof this.preOrder)try{this.normalizedPreOrder=JSON.parse(this.preOrder)}catch{this.normalizedPreOrder=void 0}else this.normalizedPreOrder=this.preOrder;this.normalizedPreOrder?.end_date&&(this.date=this.normalizedPreOrder.end_date),this.date&&this.isValidDate(this.date)&&this.startCountDown()}normalizeDate(t){const o=t.match(/^(\d{1,2})-(\d{1,2})-(\d{4}),(\d{1,2}):(\d{2}):(\d{2})\s*(am|pm)$/i);if(o){const[,t,e,n,i,s,r,a]=o;let l=parseInt(i,10);"pm"===a.toLowerCase()&&l<12&&(l+=12),"am"===a.toLowerCase()&&12===l&&(l=0);const d=String(l).padStart(2,"0");return`${n}-${String(t).padStart(2,"0")}-${String(e).padStart(2,"0")} ${d}:${s}:${r}`}const e=t.match(/^(\d{1,2})-(\d{1,2})-(\d{4})$/);if(e){const[,t,o,n]=e;return`${n}-${String(t).padStart(2,"0")}-${String(o).padStart(2,"0")}`}const n=t.match(/^(\d{4})-(\d{1,2})-(\d{1,2})(?:[ T](\d{1,2}:\d{2}:\d{2}))?$/);if(n){const[,t,o,e,i]=n,s=String(o).padStart(2,"0"),r=String(e).padStart(2,"0");return i?`${t}-${s}-${r} ${i}`:`${t}-${s}-${r}`}return t}isValidDate(t){const o=this.normalizeDate(t);let e,n=o.includes("-"),i=o.split(" ");return e=n?i[0].replace(/-/g,"/"):i[0],!isNaN(Date.parse(e))}number(t){const o=String(Math.max(0,Math.floor(t))).padStart(2,"0");return salla.helpers.number(o,"en"===this.digits)}startCountDown(){const t=this.normalizeDate(this.date),o=t.includes("-"),e=this.endOfDay||1===t.split(" ").length;let n;if(o){const o=e?`${t.split(" ")[0]}T23:59:59+03:00`:`${t.replace(" ","T")}+03:00`;n=new Date(o).getTime()}else{const o=new Date(t);e&&o.setHours(23,59,59,999),n=o.getTime()}if(Number.isNaN(n))return salla.logger.warn(`[salla-count-down] unable to parse date: "${this.date}"`),void(this.parseFailed=!0);const i=()=>{const t=n-Date.now(),o=Math.floor(t/864e5),e=Math.floor(t%864e5/36e5);this.days=this.number(o),this.hours=this.number(e),this.minutes=this.number(Math.floor(t%36e5/6e4)),this.seconds=this.number(Math.floor(t%6e4/1e3)),this.autoSegments&&(this.showDays=o>0,this.showHours=o>0||e>0),t<0&&this.endCountDown()};this.countInterval=setInterval(i,1e3),i()}renderCountDown(){const t=this.boxTheme?`var(--color-${this.boxTheme})`:this.boxColor,e=this.boxed&&t?{backgroundColor:t}:void 0;return o("ul",{class:`s-count-down-list ${this.boxed?"s-count-down-boxed":""} ${this.offerEnded?"s-count-down-ended":""} s-count-down-${this.size} s-count-down-${this.color}`,style:this.listPadding?{paddingLeft:this.listPadding,paddingRight:this.listPadding}:void 0},o("li",{class:"s-count-down-item",style:e},o("div",{class:"s-count-down-item-value"},this.seconds),this.labeled&&o("div",{class:"s-count-down-item-label"},this.secondsLabel)),o("li",{class:"s-count-down-item",style:e},o("div",{class:"s-count-down-item-value"},this.minutes),this.labeled&&o("div",{class:"s-count-down-item-label"},this.minutesLabel)),(!this.autoSegments||this.showHours)&&o("li",{class:"s-count-down-item",style:e},o("div",{class:"s-count-down-item-value"},this.hours),this.labeled&&o("div",{class:"s-count-down-item-label"},this.hoursLabel)),(!this.autoSegments||this.showDays)&&o("li",{class:"s-count-down-item",style:e},o("div",{class:"s-count-down-item-value"},this.days),this.labeled&&o("div",{class:"s-count-down-item-label"},this.daysLabel)))}renderInvalidDate(){return o("div",{class:"s-count-down-text-center"},this.invalidDate)}renderOfferEnded(){return o("div",{class:"s-count-down-end-text"},this.endText?this.endText:this.endLabel)}renderPreOrderToBeAvailableOn(){return this.normalizedPreOrder?.availability_date&&this.isValidDate(this.normalizedPreOrder?.availability_date)?o("div",{class:"s-count-down-info-message"},o("i",{class:"sicon-info"}),o("span",null,salla.lang.getWithDefault("pages.products.expected_to_be","متوقَّع توفُّره بتاريخ:")),o("span",null,new Date(this.normalizedPreOrder?.availability_date).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric"}))):null}renderPreOrderCountDown(){return this.normalizedPreOrder?.activate_countdown?o("div",{class:"s-count-down-pre-order-container"},o("p",{class:"text-sm "},salla.lang.getWithDefault("pages.products.pre_order_ends_in","ينتهي الطلب المسبق خلال:")),this.renderCountDown()):null}renderPreOrder(){return o("div",null,"object"==typeof this.normalizedPreOrder&&this.normalizedPreOrder?.availability_date&&this.renderPreOrderToBeAvailableOn(),this.renderPreOrderCountDown())}renderPrefixText(){return this.prefixText?o("span",{class:"s-count-down-prefix-text"},this.prefixText):null}renderButton(){return this.withButton&&this.buttonText?o("salla-button",{color:"primary",size:"medium",href:this.buttonHref},this.buttonIcon?o("i",{class:this.buttonIcon}):null,o("span",null,this.buttonText)):null}renderContent(){return this.date?!this.isValidDate(this.date)||this.parseFailed?this.renderInvalidDate():this.preOrder?this.renderPreOrder():this.renderCountDown():null}render(){return o(e,{key:"e2805e528a52b71ad71f4f1f16a473947dafb5bc",class:`s-count-down-wrapper ${this.preOrder&&this.isValidDate(this.date)?"s-count-down-pre-order":""} ${this.horizontal?"s-count-down-horizontal":""} ${this.withButton?"s-count-down-with-button":""} ${this.offerEnded?"s-count-down-ended":""}`},this.renderPrefixText(),this.renderContent(),this.offerEnded&&this.renderOfferEnded(),this.renderButton())}};i.style='/*!twlt*/.s-count-down-horizontal{background-color:rgba(0, 0, 0, 0.06);background-color:color-mix(in srgb, var(--color-primary) 10%, transparent)}.text-sm{font-size:0.875rem;line-height:1.25rem}.s-basket-gap-card-offer .s-count-down-list{margin-left:-0px !important;margin-right:-0px !important;margin-bottom:0px !important;margin-top:0px !important;display:inline-flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start !important;column-gap:0px;--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.s-basket-gap-card-offer .s-count-down-list:where([dir="ltr"],[dir="ltr"] *){flex-direction:row-reverse !important}.s-basket-gap-card-offer .s-count-down-list:where([dir="rtl"],[dir="rtl"] *){flex-direction:row !important}.s-basket-gap-card-offer .s-count-down-item{position:relative !important;margin-left:0px !important;margin-right:0px !important;display:inline-flex !important;width:auto !important;flex:none !important;flex-grow:0 !important;flex-direction:row !important;align-items:center !important;justify-content:center !important;padding-top:0px !important;padding-bottom:0px !important;padding-left:0px !important;padding-right:0px !important;font-size:12px !important;font-weight:700 !important;line-height:1 !important;--tw-text-opacity:1 !important;color:rgb(21 128 61 / var(--tw-text-opacity, 1)) !important}.s-basket-gap-card-offer .s-count-down-item-value{display:inline-block !important;width:2ch !important;min-width:2ch !important;text-align:center;--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);line-height:1}.s-basket-gap-card-offer .s-count-down-item-label{display:none}.s-basket-gap-entry .s-basket-gap-card-offer.s-basket-gap-card-offer .s-count-down-item::before{content:none !important}.s-basket-gap-entry .s-basket-gap-card-offer.s-basket-gap-card-offer .s-count-down-item::after{content:none !important;position:static;left:auto;right:auto;transform:none}[dir=\'rtl\'] .s-basket-gap-entry .s-basket-gap-card-offer.s-basket-gap-card-offer .s-count-down-item:not(:last-child)::after{content:\':\' !important;position:static;left:auto;right:auto;transform:none;margin-left:0.15rem;margin-right:0.15rem;color:#15803d;font-size:12px;font-weight:700;line-height:1}[dir=\'ltr\'] .s-basket-gap-entry .s-basket-gap-card-offer.s-basket-gap-card-offer .s-count-down-item:not(:first-child)::after{content:\':\' !important;position:static;left:auto;right:auto;transform:none;margin-left:0.15rem;margin-right:0.15rem;color:#15803d;font-size:12px;font-weight:700;line-height:1}.s-count-down-wrapper{position:relative}.s-count-down-list{margin-left:-0.25rem;margin-right:-0.25rem;margin-bottom:1.25rem;margin-top:0.625rem;display:flex;align-items:center;justify-content:space-between}.s-count-down-list:where([dir="ltr"],[dir="ltr"] *){flex-direction:row-reverse}.s-count-down-list:where([dir="rtl"],[dir="rtl"] *){flex-direction:row}.s-count-down-item{position:relative;margin-left:0.25rem;margin-right:0.25rem;display:flex;flex:1 1 0%;flex-direction:column;align-items:center;justify-content:center;padding-top:0.5rem;padding-bottom:0.5rem;font-family:var(--font-main);font-weight:700}.s-count-down-item::after{position:absolute;left:-2px;font-family:inherit;--tw-content:\':\';content:var(--tw-content)}.s-count-down-item:last-child::after{--tw-content:\'\';content:var(--tw-content)}.s-count-down-item-label{margin-top:0.25rem;display:block;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1));opacity:0.4}.s-count-down-boxed .s-count-down-item{border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-count-down-boxed .s-count-down-item::after{--tw-content:\'\';content:var(--tw-content)}.s-count-down-sm .s-count-down-item{font-size:1rem;line-height:1.5rem;font-weight:400}.s-count-down-sm .s-count-down-item::after{content:var(--tw-content);font-size:1rem;line-height:1.5rem}.s-count-down-sm+.s-count-down-end-text{font-size:1rem;line-height:1.5rem;font-weight:400}.s-count-down-md .s-count-down-item{font-size:1.125rem;line-height:1.75rem;font-weight:500}.s-count-down-md .s-count-down-item::after{content:var(--tw-content);font-size:1.125rem;line-height:1.75rem}.s-count-down-md+.s-count-down-end-text{font-size:1.125rem;line-height:1.75rem;font-weight:500}.s-count-down-lg .s-count-down-item{font-size:1.875rem;line-height:2.25rem;font-weight:700}.s-count-down-lg .s-count-down-item::after{content:var(--tw-content);font-size:1.875rem;line-height:2.25rem}.s-count-down-lg+.s-count-down-end-text{font-size:1.5rem;line-height:2rem;font-weight:700}.s-count-down-light .s-count-down-item{--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.s-count-down-light .s-count-down-item::after{content:var(--tw-content);--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.s-count-down-dark .s-count-down-item{--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-count-down-dark .s-count-down-item::after{content:var(--tw-content);--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-count-down-primary .s-count-down-item{color:var(--color-primary)}.s-count-down-primary .s-count-down-item::after{content:var(--tw-content);color:var(--color-primary)}.s-count-down-ended .s-count-down-item{--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));opacity:0.1}.s-count-down-ended .s-count-down-item::after{content:var(--tw-content);--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-count-down-end-text{position:absolute;top:50%;left:50%;--tw-translate-x:-50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));font-family:var(--font-main);--tw-text-opacity:1;color:rgb(234 84 85 / var(--tw-text-opacity, 1))}.s-count-down-text-center{text-align:center}.s-count-down-info-message{display:flex;gap:0.5rem;padding-top:0.625rem;padding-bottom:0.625rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.s-count-down-pre-order{display:flex;flex:1 1 0%;flex-direction:column;align-items:center;gap:0.5rem}@media (min-width: 1024px){.s-count-down-pre-order{flex-direction:row}}.s-count-down-pre-order .s-count-down-item{position:relative;display:flex;height:2.7rem;width:2.25rem;flex-direction:column;align-items:center;justify-content:center;border-radius:2px}.s-count-down-pre-order .s-count-down-item::after{left:-7px;--tw-content:\':\';content:var(--tw-content)}.s-count-down-pre-order .s-count-down-item:last-child::after{--tw-content:\'\';content:var(--tw-content)}.s-count-down-pre-order-container{margin-bottom:1.25rem;margin-top:0.625rem;display:flex;flex-direction:column;align-items:center;gap:0.5rem}@media (min-width: 1024px){.s-count-down-pre-order-container{flex-direction:row}}.s-count-down-pre-order-container .s-count-down-list{margin:0px;padding:0px}.s-count-down-pre-order .s-count-down-item-value{font-size:1rem;line-height:1.5rem;font-weight:700;line-height:1}.s-count-down-pre-order .s-count-down-item-label{margin-top:0px;font-size:0.6rem;opacity:1}.s-count-down-horizontal{display:inline-flex;flex-direction:row;align-items:center;gap:0.75rem;border-radius:0.75rem;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem;--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);line-height:1}.s-count-down-horizontal.s-count-down-ended{opacity:0.5}.s-count-down-horizontal .s-count-down-list{margin:0px;width:auto;justify-content:flex-start;padding-left:0px;padding-right:0px}.s-count-down-horizontal .s-count-down-list .s-count-down-item{margin-left:0.25rem;margin-right:0.25rem;height:1.75rem;min-width:2rem;flex:none;border-radius:0.375rem;background-color:var(--color-primary);padding-top:0px;padding-bottom:0px;padding-left:0.5rem;padding-right:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:600;line-height:1.5;color:var(--color-primary-reverse)}.s-count-down-horizontal .s-count-down-list .s-count-down-item::after{font-weight:600;content:var(--tw-content);color:var(--color-primary)}.s-count-down-horizontal .s-count-down-item-label{margin-top:0.125rem;font-size:0.625rem;line-height:1;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1));opacity:0.7}.s-count-down-with-button{display:inline-flex;align-items:center;column-gap:0.75rem}.s-count-down-with-button button .s-button-text{display:flex;align-items:center;column-gap:0.5rem}.s-count-down-with-button button .s-button-text:where([dir="ltr"],[dir="ltr"] *){flex-direction:row-reverse}.s-count-down-with-button button .s-button-text:where([dir="rtl"],[dir="rtl"] *){flex-direction:row}.s-count-down-prefix-text{font-size:0.875rem;line-height:1.25rem;font-weight:700;color:var(--color-primary)}';const s=class{constructor(o){t(this,o),this.resolveFn=null,this.rejectFn=null,this.optionsRefs=new Map,this.changeHandler=null,this.submitCallback=null,this.orderOptions=[],this.basePrice=0,this.liveTotal=0,this.isSubmitting=!1,this.sessionId=0,this.paymentMode="default",this.title="",this.subtitle="",this.submitLabel="",this.totalLabel="",this.requiredMessage="",this.handleClose=()=>{this.isSubmitting||(this.rejectFn?.({reason:"dismissed"}),this.resolveFn=null,this.rejectFn=null,this.detachChangeListener(),this.reset())},salla.lang.onLoaded((()=>this.loadTranslations()))}componentWillLoad(){this.loadTranslations()}loadTranslations(){this.title=salla.lang.get("blocks.order_options.title"),this.subtitle=salla.lang.get("blocks.order_options.subtitle"),this.submitLabel=salla.lang.get("blocks.order_options.continue"),this.totalLabel=salla.lang.get("blocks.order_options.total"),this.requiredMessage=salla.lang.get("blocks.order_options.required_message")}async open(t){return this.orderOptions=(Array.isArray(t.orderOptions)?t.orderOptions:[]).map((t=>({...t,details:t.details??[]}))),this.basePrice=Number(t.basePrice)||0,this.liveTotal=this.basePrice+this.seedOptionsPrice(this.orderOptions),this.isSubmitting=!1,this.sessionId++,this.optionsRefs.clear(),this.submitCallback=t.onSubmit??null,this.paymentMode=t.paymentMode??"default",await(this.modal?.open()),this.attachChangeListener(),new Promise(((t,o)=>{this.resolveFn=t,this.rejectFn=o}))}async close(){await(this.modal?.close())}collectOrderOptionsSync(){const t=[];for(const[,o]of this.optionsRefs)o&&o.querySelectorAll('[name^="options["],[name*="[options]["]').forEach((o=>{if(o instanceof HTMLInputElement&&("radio"===o.type||"checkbox"===o.type)&&!o.checked)return;const e=o.name.match(/(?:^|\[)options\]?\[(\d+)\]/);if(!e)return;const n=o.value;if(""===n||null==n)return;const i=Number(n);t.push({id:Number(e[1]),value:Number.isFinite(i)&&n===String(i)?i:n})}));return t}validateSync(){let t=!0;for(const[,o]of this.optionsRefs)o&&o.querySelectorAll("[required]").forEach((o=>{o.disabled||o.closest(".hidden")||"reportValidity"in o&&!o.reportValidity()&&(t=!1)}));return t}seedOptionsPrice(t){let o=0;return t.forEach((t=>{(t.details||[]).forEach((t=>{t.is_selected&&(o+=Number(t.total_price??t.additional_price)||0)}))})),o}attachChangeListener(){this.detachChangeListener(),this.changeHandler=()=>this.recomputeTotal(),salla.event.on("product-options::change",this.changeHandler)}detachChangeListener(){this.changeHandler&&(salla.event.off("product-options::change",this.changeHandler),this.changeHandler=null)}async recomputeTotal(){let t=0;for(const[,o]of this.optionsRefs)o&&(("function"==typeof o.getSelectedOptions?await o.getSelectedOptions():[])||[]).forEach((o=>{t+=Number(o.total_price??o.additional_price)||0}));this.liveTotal=this.basePrice+t}handleSubmit(){if(this.isSubmitting)return;if(!this.validateSync())return void salla.notify?.error?.(this.requiredMessage);this.isSubmitting=!0;const t=this.collectOrderOptionsSync(),o=Math.round(100*this.liveTotal)/100;try{this.submitCallback?.(t,o)}catch(t){salla?.logger?.warn?.("order-options modal onSubmit threw",t)}this.resolveFn?.({orderOptions:t}),this.resolveFn=null,this.rejectFn=null,this.submitCallback=null,this.detachChangeListener(),this.modal?.close().then((()=>this.reset())),this.isSubmitting=!1}reset(){this.orderOptions=[],this.optionsRefs.clear(),this.liveTotal=0}render(){const t=salla.money(Math.round(100*this.liveTotal)/100);return o("salla-modal",{key:"e84a40e1a27447d58ca5651a7ed76cbcf886495c",ref:t=>this.modal=t,class:"s-order-options-modal-host",width:"md","modal-title":this.title,onModalVisibilityChanged:t=>{t.detail||this.handleClose()}},o("div",{key:"fafa3cdeb22787d4a02f3fc8afb70770e1c3b4b5",class:"s-order-options-modal-body"},o("p",{key:"c563c24e1b8744f3248328ec16a18c5a668e7949",class:"s-order-options-modal-subtitle"},this.subtitle),o("div",{key:"475599cc47435b077d2321573328321888e60aa6",class:"s-order-options-modal-fields"},this.orderOptions.length>0&&o("salla-product-options",{key:this.sessionId,ref:t=>{t&&(this.optionsRefs.set("order-options",t),t.seedSelectedOptions?.())},"product-id":`order-options-${this.orderOptions[0]?.id}`,"unique-key":"order-options",options:JSON.stringify(this.orderOptions),"hide-out-label":"1","no-padding":!0}))),o("div",{key:"e00641853937f745c8cc798c7f9e15b389faf540",slot:"footer",class:"s-order-options-modal-footer"},"apple-pay"===this.paymentMode?o("div",{class:"s-order-options-modal-apple-pay-wrap"},o("div",{class:"s-order-options-modal-apple-pay-total"},o("span",{class:"s-order-options-modal-apple-pay-label"},this.totalLabel),o("span",{class:"s-order-options-modal-apple-pay-amount",innerHTML:t})),o("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()})):o("salla-button",{type:"button",color:"primary",fill:"solid",width:"wide",loading:this.isSubmitting,onClick:()=>this.handleSubmit()},o("span",{class:"s-order-options-modal-cta-content"},o("span",{class:"s-order-options-modal-cta-text"},this.submitLabel),o("span",{class:"s-order-options-modal-cta-total",innerHTML:t})))))}get host(){return n(this)}};s.style="/*!twlt*/.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-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}.static{position:static}.block{display:block}.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)}.s-order-options-modal-body{display:block}.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}";export{i as salla_count_down,s as salla_order_options_modal}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import{r as a,h as s,H as n,a as o}from"./p-GfnuORRm.js";const t=class{constructor(s){a(this,s)}async mount(a){this.host.before(a)}render(){return s(n,{key:"1acc6e7c4e3e9695576a820cbc68c539e81fa36e"})}async componentDidLoad(){await Salla.hooks.registerComponent("salla-hook",this)}get host(){return o(this)}};t.style=":host {\n all: unset;\n display: none; /* marker only */\n }";export{t as salla_hook}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
function t(t){const o=document.querySelector(`salla-product-options[product-id="${t}"]`);if(!o)return!0;const n=o.querySelectorAll("[required]");let r=!0;return n.forEach((t=>{t.disabled||t.closest(".hidden")||"reportValidity"in t&&!t.reportValidity()&&(r=!1)})),r}function o(t,o){o.length&&(t&&"function"==typeof t.append?o.forEach(((o,n)=>{t.append(`order_options[${n}][id]`,String(o.id)),t.append(`order_options[${n}][value]`,String(o.value))})):t&&"object"==typeof t&&(t.order_options=o))}async function n(t){let o;try{o=await salla.api.withoutNotifier((()=>salla.product.api.getOrderOptions([{id:t.productId,quantity:t.quantity}])))}catch(o){return salla?.logger?.warn?.("order-options: fetch failed",o),void t.beginPendingSession()}const n=o?.data?.order_options||[];if(!n.length)return void t.beginPendingSession();t.discardPendingSession();const r=Number(t.amount)>0?Number(t.amount):Number(o?.data?.products?.[0]?.price?.amount)||0,e=function(){let t=document.querySelector("salla-order-options-modal");return t||(t=document.createElement("salla-order-options-modal"),document.body.appendChild(t)),t}();try{await e.open({orderOptions:n,basePrice:r,paymentMode:"apple-pay",onSubmit:t.onSubmit})}catch{}}export{o as a,t as b,n as r}
|