@salla.sa/twilight-components 2.14.471 → 2.14.473
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{filepond-nQfoJi-g.js → filepond-DF-VYUP5.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-hJ9M3t0L.js → filepond-plugin-file-poster-B8FcQifC.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-CgpDoJxO.js → filepond-plugin-file-validate-size-C5ZOfv1L.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-B2KbrSbZ.js → filepond-plugin-file-validate-type-BlcUL1dr.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BkNqlXrL.js → filepond-plugin-image-edit-DIHIWf88.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-P3Zfw8MQ.js → filepond-plugin-image-exif-orientation-B8rtOoT0.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CNXFmZth.js → filepond-plugin-image-preview-Cx9Hoc_r.js} +1 -1
- package/dist/cjs/{functions-B8CHu2z4.js → functions-C0S9XWNH.js} +1 -1
- package/dist/cjs/{index-CPhoxBkB.js → index-BPV9S3bR.js} +1 -1
- package/dist/cjs/{index-GUQS0-Q-.js → index-DJgq03oj.js} +11 -15
- 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 +333 -21
- 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-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-badge.cjs.entry.js +2 -2
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +18 -18
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +5 -5
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +2 -2
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +5 -5
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +2 -2
- 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 +3 -3
- 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.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +9 -9
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +4 -4
- 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.cjs.entry.js → salla-map_2.cjs.entry.js} +70 -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.cjs.entry.js +2 -2
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- 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-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-product-card_2.cjs.entry.js → salla-order-options-modal_3.cjs.entry.js} +209 -6
- 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-size-guide.cjs.entry.js +3 -3
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-reward-action_4.cjs.entry.js +10 -10
- package/dist/cjs/salla-scopes.cjs.entry.js +2 -2
- package/dist/cjs/salla-search.cjs.entry.js +6 -6
- package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +2 -2
- package/dist/cjs/salla-social.cjs.entry.js +2 -2
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
- package/dist/cjs/{tracked-promise-B7zS9VE-.js → tracked-promise-DIJ49IFk.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-1QrQ9HZi.js → vanilla-picker-CNKa7uqT.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- 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 +10 -0
- 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-cart-coupons/salla-cart-coupons.js +1 -1
- 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-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 +3 -3
- 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 +84 -0
- package/dist/collection/components/salla-order-options-modal/order-options-gate.js +136 -0
- package/dist/collection/components/salla-order-options-modal/salla-order-options-modal.css +35 -0
- package/dist/collection/components/salla-order-options-modal/salla-order-options-modal.js +282 -0
- 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-options/salla-product-options.js +65 -2
- 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 +70 -16
- package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
- package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
- package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
- package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
- package/dist/collection/components/salla-search/salla-search.js +5 -5
- package/dist/collection/components/salla-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/index.js +3 -3
- package/dist/components/index2.js +2540 -1699
- package/dist/components/index3.js +1699 -2540
- package/dist/components/location.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 +205 -8
- 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 +3 -3
- package/dist/components/salla-cart-coupons.js +1 -1
- 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 +2 -2
- 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-hero2.js +3 -3
- package/dist/components/salla-loyalty-panel.js +66 -18
- package/dist/components/salla-loyalty-point2.js +6 -6
- 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-program.js +68 -20
- package/dist/components/salla-loyalty-reward.js +2 -2
- package/dist/components/salla-maintenance-alert.js +1 -1
- package/dist/components/salla-map2.js +4 -4
- 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 +65 -17
- 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-modal.d.ts +11 -0
- package/dist/components/salla-order-options-modal.js +9 -0
- package/dist/components/salla-order-options-modal2.js +303 -0
- 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 +65 -17
- package/dist/components/salla-product-options2.js +30 -2
- package/dist/components/salla-product-size-guide.js +2 -2
- package/dist/components/salla-products-slider2.js +62 -14
- package/dist/components/salla-quantity-input2.js +1 -1
- package/dist/components/salla-quick-buy2.js +233 -18
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-reviews-page.js +1 -1
- package/dist/components/salla-reviews.js +1 -1
- package/dist/components/salla-reward-card2.js +1 -1
- package/dist/components/salla-reward-details2.js +67 -19
- package/dist/components/salla-reward-exchange2.js +3 -3
- package/dist/components/salla-scopes.js +1 -1
- package/dist/components/salla-search.js +5 -5
- 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 +2 -2
- 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/{filepond-Doklzvb6.js → filepond-Cc2a-xwm.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-BSBF1f0z.js → filepond-plugin-file-poster-CVvn-hU7.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-CbaXmA8m.js → filepond-plugin-file-validate-size-BBkz8yb5.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-FjPelZ0O.js → filepond-plugin-file-validate-type-DF6Zozrn.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-BmG7tc8Q.js → filepond-plugin-image-edit-CEMvhtPw.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-DhRt-kLt.js → filepond-plugin-image-exif-orientation-_wEWvdti.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DZ2XM7gt.js → filepond-plugin-image-preview-BBJorulx.js} +1 -1
- package/dist/esm/{functions-_-9PUSBv.js → functions-BBBDsaIv.js} +1 -1
- package/dist/esm/{index-Cly9a4nm.js → index-BvYTcqJt.js} +11 -15
- package/dist/esm/{index-CJ2jUKh4.js → index-DBdw4BKt.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 +333 -21
- 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-apps-icons.entry.js +1 -1
- package/dist/esm/salla-badge.entry.js +2 -2
- package/dist/esm/salla-booking-field_7.entry.js +18 -18
- package/dist/esm/salla-bullet-delivery_2.entry.js +5 -5
- package/dist/esm/salla-cart-coupons.entry.js +2 -2
- package/dist/esm/salla-cart-item-offers_2.entry.js +2 -2
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +5 -5
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +2 -2
- 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 +3 -3
- 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.entry.js +2 -2
- package/dist/esm/salla-loyalty-hero_2.entry.js +9 -9
- package/dist/esm/salla-loyalty-panel.entry.js +3 -3
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +2 -2
- package/dist/esm/salla-loyalty-prize-item.entry.js +2 -2
- package/dist/esm/salla-loyalty-program.entry.js +3 -3
- package/dist/esm/salla-loyalty-reward.entry.js +4 -4
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +2 -2
- package/dist/esm/{salla-map.entry.js → salla-map_2.entry.js} +70 -5
- 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.entry.js +2 -2
- package/dist/esm/salla-notifications.entry.js +1 -1
- 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-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-product-card_2.entry.js → salla-order-options-modal_3.entry.js} +209 -7
- 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-size-guide.entry.js +3 -3
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-reward-action_4.entry.js +10 -10
- package/dist/esm/salla-scopes.entry.js +2 -2
- package/dist/esm/salla-search.entry.js +6 -6
- package/dist/esm/salla-skeleton.entry.js +2 -2
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +2 -2
- package/dist/esm/salla-social.entry.js +2 -2
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +2 -2
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +2 -2
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +2 -2
- package/dist/esm/{tracked-promise-CdJOz1H_.js → tracked-promise-C7-gtg6R.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-B7uhKtBD.js → vanilla-picker-h7cuUJLx.js} +1 -1
- package/dist/twilight/{p-6ba653dc.entry.js → p-02a6d0fb.entry.js} +1 -1
- package/dist/twilight/{p-821fd8c1.entry.js → p-02d1b1e4.entry.js} +1 -1
- package/dist/twilight/{p-f6435c3c.entry.js → p-0bafc5c6.entry.js} +1 -1
- package/dist/twilight/{p-25f7fbc1.entry.js → p-0db3276e.entry.js} +1 -1
- package/dist/twilight/{p-44abf289.entry.js → p-10112e2a.entry.js} +1 -1
- package/dist/twilight/{p-b555a4aa.entry.js → p-12ef0ea1.entry.js} +1 -1
- package/dist/twilight/{p-c992256d.entry.js → p-172507f7.entry.js} +1 -1
- package/dist/twilight/{p-d07ee0d6.entry.js → p-1a27621a.entry.js} +1 -1
- package/dist/twilight/{p-d7f528c7.entry.js → p-1ac87c89.entry.js} +1 -1
- package/dist/twilight/p-1b389414.entry.js +4 -0
- package/dist/twilight/{p-b0f0d7bc.entry.js → p-20bfcf23.entry.js} +1 -1
- package/dist/twilight/p-26913396.entry.js +4 -0
- package/dist/twilight/{p-ef345c2c.entry.js → p-2b14b3f3.entry.js} +1 -1
- package/dist/twilight/{p-aae74199.entry.js → p-2c53dc35.entry.js} +1 -1
- package/dist/twilight/p-2d6cdaca.entry.js +4 -0
- package/dist/twilight/{p-c5613717.entry.js → p-2e8e84ec.entry.js} +1 -1
- package/dist/twilight/p-347a0bc6.entry.js +4 -0
- package/dist/twilight/{p-f2d0b9d1.entry.js → p-36e0424f.entry.js} +1 -1
- package/dist/twilight/{p-14ca32a2.entry.js → p-3ca06dc9.entry.js} +1 -1
- package/dist/twilight/p-409d1c48.entry.js +4 -0
- package/dist/twilight/{p-55b21f9b.entry.js → p-43a49707.entry.js} +1 -1
- package/dist/twilight/{p-72bc753c.entry.js → p-43dcb630.entry.js} +1 -1
- package/dist/twilight/{p-92961807.entry.js → p-4a642821.entry.js} +1 -1
- package/dist/twilight/p-4b2da30b.entry.js +4 -0
- package/dist/twilight/{p-08d2e056.entry.js → p-4c3512d8.entry.js} +1 -1
- package/dist/twilight/{p-16c9b4bd.entry.js → p-505f467c.entry.js} +1 -1
- package/dist/twilight/{p-f9c1c247.entry.js → p-561b321b.entry.js} +1 -1
- package/dist/twilight/{p-130b525c.entry.js → p-565fded6.entry.js} +1 -1
- package/dist/twilight/{p-8d26f80c.entry.js → p-57de30fb.entry.js} +1 -1
- package/dist/twilight/{p-6efce4b0.entry.js → p-5d116914.entry.js} +1 -1
- package/dist/twilight/{p-b96e442c.entry.js → p-5f1b8cda.entry.js} +1 -1
- package/dist/twilight/{p-99b127fa.entry.js → p-5fdbcf21.entry.js} +1 -1
- package/dist/twilight/{p-8c404dbf.entry.js → p-626e7c74.entry.js} +1 -1
- package/dist/twilight/{p-b07f1925.entry.js → p-62af7fab.entry.js} +1 -1
- package/dist/twilight/{p-c5f3b4e2.entry.js → p-63bfe890.entry.js} +1 -1
- package/dist/twilight/{p-68fa9305.entry.js → p-63c5f850.entry.js} +1 -1
- package/dist/twilight/{p-c9b37b12.entry.js → p-64125d86.entry.js} +1 -1
- package/dist/twilight/p-6852a160.entry.js +4 -0
- package/dist/twilight/{p-63be9782.entry.js → p-690179d6.entry.js} +1 -1
- package/dist/twilight/{p-48e85ee2.entry.js → p-6d7ca81e.entry.js} +1 -1
- package/dist/twilight/{p-5ca57591.entry.js → p-713caf18.entry.js} +1 -1
- package/dist/twilight/p-75ad8a25.entry.js +4 -0
- package/dist/twilight/p-766edfdb.entry.js +4 -0
- package/dist/twilight/{p-39ff606c.entry.js → p-79404c8b.entry.js} +2 -2
- package/dist/twilight/{p-820ee5fe.entry.js → p-7fa80e17.entry.js} +1 -1
- package/dist/twilight/{p-03d28343.entry.js → p-85235650.entry.js} +1 -1
- package/dist/twilight/{p-a47dccd1.entry.js → p-872f4155.entry.js} +1 -1
- package/dist/twilight/{p-5c0d795c.entry.js → p-8a69f56f.entry.js} +1 -1
- package/dist/twilight/{p-86469c65.entry.js → p-8d6cb487.entry.js} +1 -1
- package/dist/twilight/{p-e12da840.entry.js → p-8f727396.entry.js} +1 -1
- package/dist/twilight/{p-005ac762.entry.js → p-903be582.entry.js} +1 -1
- package/dist/twilight/p-9724ace4.entry.js +4 -0
- package/dist/twilight/{p-5b8adb19.entry.js → p-973d67f0.entry.js} +1 -1
- package/dist/twilight/{p-288572d0.entry.js → p-9b1a2d78.entry.js} +1 -1
- package/dist/twilight/{p-47080690.entry.js → p-9c1c330e.entry.js} +1 -1
- package/dist/twilight/{p-BpiX36Sb.js → p-B2CF2lN-.js} +1 -1
- package/dist/twilight/{p-DhE0-1Aj.js → p-BHzGNcA4.js} +1 -1
- package/dist/twilight/{p-CkxoydBy.js → p-BS11nowL.js} +1 -1
- package/dist/twilight/p-BvYTcqJt.js +5 -0
- package/dist/twilight/p-BxXc6A1m.js +4 -0
- package/dist/twilight/{p-b9tXSwoW.js → p-CHrBNGs5.js} +1 -1
- package/dist/twilight/{p-DGWMOt94.js → p-CJS9vbeu.js} +1 -1
- package/dist/twilight/{p-BUcuXVwN.js → p-CmGMQMtZ.js} +1 -1
- package/dist/twilight/{p-D3bGV5Yn.js → p-DmME9lcL.js} +2 -2
- package/dist/twilight/{p-79c2cc3c.entry.js → p-a111fd6b.entry.js} +1 -1
- package/dist/twilight/{p-0b6d87a5.entry.js → p-a41ae15a.entry.js} +1 -1
- package/dist/twilight/{p-db2d9d1c.entry.js → p-a7f1b164.entry.js} +1 -1
- package/dist/twilight/{p-84207e00.entry.js → p-ac7d5fe8.entry.js} +1 -1
- package/dist/twilight/{p-7343e9d9.entry.js → p-aed3d1bd.entry.js} +1 -1
- package/dist/twilight/{p-5fe6ac53.entry.js → p-af2bca8a.entry.js} +1 -1
- package/dist/twilight/{p-195589ec.entry.js → p-aff80494.entry.js} +1 -1
- package/dist/twilight/{p-7874b654.entry.js → p-b1530d6c.entry.js} +1 -1
- package/dist/twilight/p-b74bbd9c.entry.js +4 -0
- package/dist/twilight/p-b88fbbfd.entry.js +4 -0
- package/dist/twilight/{p-7ee71548.entry.js → p-b8c19702.entry.js} +1 -1
- package/dist/twilight/{p-cdb0e80a.entry.js → p-ba804ca0.entry.js} +1 -1
- package/dist/twilight/{p-1938ad27.entry.js → p-cb50c59b.entry.js} +1 -1
- package/dist/twilight/{p-05fdfdc9.entry.js → p-cd4bda55.entry.js} +1 -1
- package/dist/twilight/{p-05266229.entry.js → p-cf6b998d.entry.js} +1 -1
- package/dist/twilight/{p-b8b3c0fc.entry.js → p-d114ced5.entry.js} +1 -1
- package/dist/twilight/{p-96825a64.entry.js → p-d14ebc79.entry.js} +1 -1
- package/dist/twilight/{p-20afc879.entry.js → p-d748ad00.entry.js} +1 -1
- package/dist/twilight/{p-6838ec3a.entry.js → p-d8a538bf.entry.js} +1 -1
- package/dist/twilight/{p-4ba3ebb1.entry.js → p-d9e2307e.entry.js} +1 -1
- package/dist/twilight/{p-af970c82.entry.js → p-da110487.entry.js} +1 -1
- package/dist/twilight/{p-8aca6bc0.entry.js → p-db8d96c0.entry.js} +1 -1
- package/dist/twilight/p-dda2ddb4.entry.js +4 -0
- package/dist/twilight/p-e064190f.entry.js +4 -0
- package/dist/twilight/{p-4d368d57.entry.js → p-e0fd80dd.entry.js} +1 -1
- package/dist/twilight/{p-fa0ebde1.entry.js → p-e236a0b1.entry.js} +1 -1
- package/dist/twilight/p-e7461334.entry.js +4 -0
- package/dist/twilight/{p-06a0b408.entry.js → p-ea9a3921.entry.js} +1 -1
- package/dist/twilight/{p-2d235234.entry.js → p-eca2632e.entry.js} +1 -1
- package/dist/twilight/{p-dab62284.entry.js → p-ed956a6b.entry.js} +1 -1
- package/dist/twilight/{p-eb767e28.entry.js → p-f847be9e.entry.js} +1 -1
- package/dist/twilight/{p-a74197ee.entry.js → p-fc62fb58.entry.js} +1 -1
- package/dist/twilight/p-fe673ecd.entry.js +4 -0
- package/dist/twilight/p-rsjNE_Z-.js +9 -0
- package/dist/twilight/{p-bo_zr0My.js → p-sMRr4fbT.js} +1 -1
- package/dist/twilight/{p-C-NwbNqh.js → p-xEQ--NDX.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +2 -0
- package/dist/types/components/salla-order-options-modal/apple-pay-order-options.d.ts +26 -0
- package/dist/types/components/salla-order-options-modal/order-options-gate.d.ts +23 -0
- package/dist/types/components/salla-order-options-modal/salla-order-options-modal.d.ts +66 -0
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +12 -0
- package/dist/types/components/salla-quick-buy/salla-quick-buy.d.ts +14 -0
- package/dist/types/components.d.ts +62 -0
- package/package.json +5 -5
- package/dist/cjs/salla-progress-bar.cjs.entry.js +0 -73
- package/dist/esm/salla-progress-bar.entry.js +0 -71
- package/dist/twilight/p-00f3a2ec.entry.js +0 -4
- package/dist/twilight/p-0e9ae0e0.entry.js +0 -4
- package/dist/twilight/p-39426e43.entry.js +0 -4
- package/dist/twilight/p-40e2fc5f.entry.js +0 -4
- package/dist/twilight/p-46b4c12f.entry.js +0 -4
- package/dist/twilight/p-5971669a.entry.js +0 -4
- package/dist/twilight/p-654af42c.entry.js +0 -4
- package/dist/twilight/p-7e4e3e76.entry.js +0 -4
- package/dist/twilight/p-7efa0246.entry.js +0 -4
- package/dist/twilight/p-8e121e7c.entry.js +0 -4
- package/dist/twilight/p-98f0f411.entry.js +0 -4
- package/dist/twilight/p-9b7ad2bd.entry.js +0 -4
- package/dist/twilight/p-9ddfdc65.entry.js +0 -4
- package/dist/twilight/p-CWrfZ9Qs.js +0 -9
- package/dist/twilight/p-CXgdON62.js +0 -4
- package/dist/twilight/p-Cly9a4nm.js +0 -5
- package/dist/twilight/p-a900af64.entry.js +0 -4
- package/dist/twilight/p-c184157a.entry.js +0 -4
- package/dist/twilight/p-f5969e58.entry.js +0 -4
- package/dist/twilight/p-fbf4cb19.entry.js +0 -4
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
import { a as axios } from './axios.js';
|
|
6
|
+
import { d as defineCustomElement$c } from './salla-booking-field2.js';
|
|
7
|
+
import { d as defineCustomElement$b } from './salla-button2.js';
|
|
8
|
+
import { d as defineCustomElement$a } from './salla-color-picker2.js';
|
|
9
|
+
import { d as defineCustomElement$9 } from './salla-conditional-fields2.js';
|
|
10
|
+
import { d as defineCustomElement$8 } from './salla-datetime-picker2.js';
|
|
11
|
+
import { d as defineCustomElement$7 } from './salla-file-upload2.js';
|
|
12
|
+
import { d as defineCustomElement$6 } from './salla-loading2.js';
|
|
13
|
+
import { d as defineCustomElement$5 } from './salla-map2.js';
|
|
14
|
+
import { d as defineCustomElement$4 } from './salla-modal2.js';
|
|
15
|
+
import { d as defineCustomElement$3 } from './salla-order-options-modal2.js';
|
|
16
|
+
import { d as defineCustomElement$2 } from './salla-product-options2.js';
|
|
17
|
+
import { d as defineCustomElement$1 } from './salla-progress-bar2.js';
|
|
6
18
|
|
|
7
19
|
var http = {
|
|
8
20
|
request(method, url, data, successCb = null, errorCb = null) {
|
|
@@ -515,7 +527,15 @@ window.SallaApplePay = {
|
|
|
515
527
|
SallaApplePay.session.oncouponcodechanged = SallaApplePay.onCouponCodeChanged;
|
|
516
528
|
SallaApplePay.session.onpaymentmethodselected = SallaApplePay.onPaymentMethodSelected;
|
|
517
529
|
|
|
518
|
-
|
|
530
|
+
// Hook between session creation and begin(). Return truthy to skip
|
|
531
|
+
// begin() (caller handles it later, e.g. after async work).
|
|
532
|
+
let skipBegin;
|
|
533
|
+
if (typeof SallaApplePay.detail.onStartedSession === 'function') {
|
|
534
|
+
skipBegin = SallaApplePay.detail.onStartedSession(SallaApplePay.session);
|
|
535
|
+
}
|
|
536
|
+
if (!skipBegin) {
|
|
537
|
+
SallaApplePay.session.begin();
|
|
538
|
+
}
|
|
519
539
|
},
|
|
520
540
|
onPaymentMethodSelected: async (event) => {
|
|
521
541
|
salla.logger.log('🍏 Pay: onPaymentMethodSelected', event);
|
|
@@ -933,6 +953,88 @@ if (window.ApplePaySession?.canMakePayments()) {
|
|
|
933
953
|
document.querySelectorAll('data-show-if-apple-pay-supported').forEach(element => element.style.display = 'none');
|
|
934
954
|
}
|
|
935
955
|
|
|
956
|
+
/**
|
|
957
|
+
* Order-options helpers for the Apple Pay quick-buy flow — keeps <salla-quick-buy> to thin AP wiring.
|
|
958
|
+
* Apple Pay resolves options inside the session-started hook (single gesture), so the caller owns
|
|
959
|
+
* the ApplePaySession and drives it via callbacks.
|
|
960
|
+
*/
|
|
961
|
+
/** Get-or-create the singleton order-options modal on <body>. */
|
|
962
|
+
function ensureOrderOptionsModal() {
|
|
963
|
+
let modal = document.querySelector('salla-order-options-modal');
|
|
964
|
+
if (!modal) {
|
|
965
|
+
modal = document.createElement('salla-order-options-modal');
|
|
966
|
+
document.body.appendChild(modal);
|
|
967
|
+
}
|
|
968
|
+
return modal;
|
|
969
|
+
}
|
|
970
|
+
/** Sync PDP-option validity (an `await` would consume the Apple Pay gesture). Skips hidden/disabled inputs. */
|
|
971
|
+
function reportProductOptionsValiditySync(productId) {
|
|
972
|
+
const optionsElement = document.querySelector(`salla-product-options[product-id="${productId}"]`);
|
|
973
|
+
if (!optionsElement)
|
|
974
|
+
return true;
|
|
975
|
+
const requiredInputs = optionsElement.querySelectorAll('[required]');
|
|
976
|
+
let pass = true;
|
|
977
|
+
requiredInputs.forEach((input) => {
|
|
978
|
+
if (input.disabled || input.closest('.hidden'))
|
|
979
|
+
return;
|
|
980
|
+
if ('reportValidity' in input && !input.reportValidity())
|
|
981
|
+
pass = false;
|
|
982
|
+
});
|
|
983
|
+
return pass;
|
|
984
|
+
}
|
|
985
|
+
/** Merge collected order-options into the quick-purchase payload (FormData or plain object). */
|
|
986
|
+
function appendOrderOptionsToPayload(data, orderOptions) {
|
|
987
|
+
if (!orderOptions.length)
|
|
988
|
+
return;
|
|
989
|
+
if (data && typeof data.append === 'function') {
|
|
990
|
+
orderOptions.forEach((entry, i) => {
|
|
991
|
+
data.append(`order_options[${i}][id]`, String(entry.id));
|
|
992
|
+
data.append(`order_options[${i}][value]`, String(entry.value));
|
|
993
|
+
});
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
996
|
+
if (data && typeof data === 'object') {
|
|
997
|
+
data.order_options = orderOptions;
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
/**
|
|
1001
|
+
* Fetch order options and, if any, collect them via the modal (apple-pay mode). Callbacks drive the
|
|
1002
|
+
* caller's pre-created session: `beginPendingSession` (no options), `discardPendingSession` (options
|
|
1003
|
+
* found — the modal's AP button starts a fresh one), `onSubmit` (submitted).
|
|
1004
|
+
*/
|
|
1005
|
+
async function resolveApplePayOrderOptions(opts) {
|
|
1006
|
+
let resp;
|
|
1007
|
+
try {
|
|
1008
|
+
resp = await salla.api.withoutNotifier(() => salla.product.api.getOrderOptions([{ id: opts.productId, quantity: opts.quantity }]));
|
|
1009
|
+
}
|
|
1010
|
+
catch (error) {
|
|
1011
|
+
salla?.logger?.warn?.('order-options: fetch failed', error);
|
|
1012
|
+
opts.beginPendingSession();
|
|
1013
|
+
return;
|
|
1014
|
+
}
|
|
1015
|
+
const items = resp?.data?.order_options || [];
|
|
1016
|
+
if (!items.length) {
|
|
1017
|
+
opts.beginPendingSession(); // begin() doesn't need a fresh gesture
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
opts.discardPendingSession(); // drop the unused session; the modal builds a fresh one
|
|
1021
|
+
const basePrice = Number(opts.amount) > 0
|
|
1022
|
+
? Number(opts.amount)
|
|
1023
|
+
: Number(resp?.data?.products?.[0]?.price?.amount) || 0;
|
|
1024
|
+
const modal = ensureOrderOptionsModal();
|
|
1025
|
+
try {
|
|
1026
|
+
await modal.open({
|
|
1027
|
+
orderOptions: items,
|
|
1028
|
+
basePrice,
|
|
1029
|
+
paymentMode: 'apple-pay',
|
|
1030
|
+
onSubmit: opts.onSubmit,
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
catch {
|
|
1034
|
+
// dismissed — no live session
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
|
|
936
1038
|
const sallaQuickBuyCss = ".s-quick-buy-button .s-button-text{display:flex}apple-pay-button{--apple-pay-button-width:100%;--apple-pay-button-height:40px;--apple-pay-button-border-radius:.75rem;--apple-pay-button-box-sizing:content-box}";
|
|
937
1039
|
|
|
938
1040
|
const SallaQuickBuy = /*@__PURE__*/ proxyCustomElement(class SallaQuickBuy extends HTMLElement {
|
|
@@ -961,32 +1063,82 @@ const SallaQuickBuy = /*@__PURE__*/ proxyCustomElement(class SallaQuickBuy exten
|
|
|
961
1063
|
* @default {}
|
|
962
1064
|
*/
|
|
963
1065
|
this.options = {};
|
|
1066
|
+
/** Modal selections, merged into the quick-purchase payload. */
|
|
1067
|
+
this.collectedOrderOptions = [];
|
|
1068
|
+
/** Flips true after the first onStartedSession so the second dispatch begins. */
|
|
1069
|
+
this.optionsResolved = false;
|
|
1070
|
+
/** PDP price + selected order-option prices (from the modal). */
|
|
1071
|
+
this.applePayAmount = 0;
|
|
1072
|
+
/** Session from the initial gesture; begun later when there are no order options. */
|
|
1073
|
+
this.pendingApplePaySession = null;
|
|
964
1074
|
this.quickBuy = salla.lang.get('pages.products.buy_now');
|
|
1075
|
+
/** Apple Pay onStartedSession: first call defers begin() to run the OO check; second (resolved) begins. */
|
|
1076
|
+
this.handleApplePaySessionStarted = (session) => {
|
|
1077
|
+
// Order options disabled → let Apple Pay begin normally, as if the feature didn't exist.
|
|
1078
|
+
if (!salla.config.get('store.settings.order_options.mandatory', false))
|
|
1079
|
+
return false;
|
|
1080
|
+
if (this.optionsResolved)
|
|
1081
|
+
return false;
|
|
1082
|
+
this.optionsResolved = true;
|
|
1083
|
+
this.pendingApplePaySession = session;
|
|
1084
|
+
resolveApplePayOrderOptions({
|
|
1085
|
+
productId: this.productId,
|
|
1086
|
+
amount: Number(this.amount),
|
|
1087
|
+
quantity: this.getSelectedQuantity(),
|
|
1088
|
+
beginPendingSession: () => {
|
|
1089
|
+
this.pendingApplePaySession?.begin();
|
|
1090
|
+
this.pendingApplePaySession = null;
|
|
1091
|
+
},
|
|
1092
|
+
discardPendingSession: () => { this.pendingApplePaySession = null; },
|
|
1093
|
+
onSubmit: (selections, total) => {
|
|
1094
|
+
this.collectedOrderOptions = selections;
|
|
1095
|
+
this.applePayAmount = total;
|
|
1096
|
+
this.settlePayment();
|
|
1097
|
+
},
|
|
1098
|
+
});
|
|
1099
|
+
return true;
|
|
1100
|
+
};
|
|
965
1101
|
salla.lang.onLoaded(() => {
|
|
966
1102
|
this.quickBuy = salla.lang.get('pages.products.buy_now');
|
|
967
1103
|
});
|
|
968
1104
|
}
|
|
969
|
-
|
|
970
|
-
// user guest and guest-checkout not enabled
|
|
1105
|
+
quickBuyHandler() {
|
|
971
1106
|
if (salla.config.isGuest() && !this.isGuestCheckout()) {
|
|
972
1107
|
this.requireLogin.emit({ productId: this.productId });
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
salla.event.on(afterLoginEvent, () => this.settlePayment());
|
|
976
|
-
salla.api.auth.setAfterLoginEvent(afterLoginEvent);
|
|
977
|
-
return salla.auth.event.dispatch('login::open', { withoutReload: true });
|
|
1108
|
+
salla.api.auth.requireLoginThen('salla-quick-buy::user.logged-in', () => this.quickBuyHandler());
|
|
1109
|
+
return;
|
|
978
1110
|
}
|
|
979
|
-
|
|
1111
|
+
// Sync validate — AP needs the gesture preserved for new ApplePaySession().
|
|
1112
|
+
if (!this.validatePdpOptionsSync())
|
|
1113
|
+
return;
|
|
1114
|
+
this.optionsResolved = false;
|
|
1115
|
+
this.collectedOrderOptions = [];
|
|
1116
|
+
this.applePayAmount = 0;
|
|
1117
|
+
this.settlePayment();
|
|
980
1118
|
}
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
1119
|
+
/** Sync PDP-option validity (preserves the AP gesture); emits + notifies on failure. */
|
|
1120
|
+
validatePdpOptionsSync() {
|
|
1121
|
+
if (reportProductOptionsValiditySync(this.productId))
|
|
1122
|
+
return true;
|
|
1123
|
+
this.validationFailed.emit({ productId: this.productId });
|
|
1124
|
+
salla.error(salla.lang.get('common.messages.required_fields'));
|
|
1125
|
+
return false;
|
|
1126
|
+
}
|
|
1127
|
+
/** Read the live PDP quantity from the form so order-options match the real cart line. */
|
|
1128
|
+
getSelectedQuantity() {
|
|
1129
|
+
try {
|
|
1130
|
+
const data = this.host.getElementSallaData?.();
|
|
1131
|
+
const qty = Number(data instanceof FormData ? data.get('quantity') : data?.quantity);
|
|
1132
|
+
return Number.isFinite(qty) && qty > 0 ? qty : 1;
|
|
1133
|
+
}
|
|
1134
|
+
catch {
|
|
1135
|
+
return 1;
|
|
987
1136
|
}
|
|
1137
|
+
}
|
|
1138
|
+
async settlePayment() {
|
|
988
1139
|
//use this way to get quantity too
|
|
989
1140
|
let data = this.host.getElementSallaData();
|
|
1141
|
+
appendOrderOptionsToPayload(data, this.collectedOrderOptions);
|
|
990
1142
|
// if the store doesn't have Apple Pay , just create a cart and then redirect to check out page
|
|
991
1143
|
if (!this.isApplePayActive) {
|
|
992
1144
|
// return salla.product.buyNow(this.productId, data);
|
|
@@ -1004,13 +1156,16 @@ const SallaQuickBuy = /*@__PURE__*/ proxyCustomElement(class SallaQuickBuy exten
|
|
|
1004
1156
|
}
|
|
1005
1157
|
// noinspection TypeScriptValidateJSTypes
|
|
1006
1158
|
salla.event.dispatch('payments::apple-pay.start-transaction', {
|
|
1007
|
-
|
|
1159
|
+
// Prefer the modal's collected total (PDP price + selected OO additional_prices).
|
|
1160
|
+
// Falls back to PDP live amount when no OO modal ran.
|
|
1161
|
+
amount: this.applePayAmount > 0 ? this.applePayAmount : this.amount,
|
|
1008
1162
|
currency: this.currency || 'SAR', // SAR
|
|
1009
1163
|
requiredShippingContactFields: this.getRequiredShippingContactFields(),
|
|
1010
1164
|
shippingMethods: this.isRequireShipping ? [] : undefined,
|
|
1011
1165
|
supportedNetworks: salla.config.get('store.settings.buy_now.networks'),
|
|
1012
1166
|
supportedCountries: salla.config.get('store.settings.buy_now.countries'),
|
|
1013
1167
|
countryCode: salla.config.get('store.store_country') || 'SA',
|
|
1168
|
+
onStartedSession: this.handleApplePaySessionStarted,
|
|
1014
1169
|
validateMerchant: {
|
|
1015
1170
|
url: this.validateHost ? `${this.validateHost}/checkout/applepay/validate` : salla.url.get('checkout/applepay/validate'),
|
|
1016
1171
|
onSuccess: (response) => {
|
|
@@ -1141,7 +1296,7 @@ const SallaQuickBuy = /*@__PURE__*/ proxyCustomElement(class SallaQuickBuy exten
|
|
|
1141
1296
|
});
|
|
1142
1297
|
}
|
|
1143
1298
|
render() {
|
|
1144
|
-
return h(Host, { key: '
|
|
1299
|
+
return h(Host, { key: 'fb1bdf862d9b9cea58df14862f7ec9c4be388585' }, this.quickBuyButton());
|
|
1145
1300
|
}
|
|
1146
1301
|
quickBuyButton() {
|
|
1147
1302
|
return h("apple-pay-button", { locale: salla?.config?.get?.('user.language_code') || 'ar', onClick: () => this.quickBuyHandler(), "data-quick-purchase": "applepay", class: "s-quick-buy-apple-pay", "data-is-applepay": "1", buttonstyle: "black", type: this.type });
|
|
@@ -1170,13 +1325,73 @@ function defineCustomElement() {
|
|
|
1170
1325
|
if (typeof customElements === "undefined") {
|
|
1171
1326
|
return;
|
|
1172
1327
|
}
|
|
1173
|
-
const components = ["salla-quick-buy"];
|
|
1328
|
+
const components = ["salla-quick-buy", "salla-booking-field", "salla-button", "salla-color-picker", "salla-conditional-fields", "salla-datetime-picker", "salla-file-upload", "salla-loading", "salla-map", "salla-modal", "salla-order-options-modal", "salla-product-options", "salla-progress-bar"];
|
|
1174
1329
|
components.forEach(tagName => { switch (tagName) {
|
|
1175
1330
|
case "salla-quick-buy":
|
|
1176
1331
|
if (!customElements.get(tagName)) {
|
|
1177
1332
|
customElements.define(tagName, SallaQuickBuy);
|
|
1178
1333
|
}
|
|
1179
1334
|
break;
|
|
1335
|
+
case "salla-booking-field":
|
|
1336
|
+
if (!customElements.get(tagName)) {
|
|
1337
|
+
defineCustomElement$c();
|
|
1338
|
+
}
|
|
1339
|
+
break;
|
|
1340
|
+
case "salla-button":
|
|
1341
|
+
if (!customElements.get(tagName)) {
|
|
1342
|
+
defineCustomElement$b();
|
|
1343
|
+
}
|
|
1344
|
+
break;
|
|
1345
|
+
case "salla-color-picker":
|
|
1346
|
+
if (!customElements.get(tagName)) {
|
|
1347
|
+
defineCustomElement$a();
|
|
1348
|
+
}
|
|
1349
|
+
break;
|
|
1350
|
+
case "salla-conditional-fields":
|
|
1351
|
+
if (!customElements.get(tagName)) {
|
|
1352
|
+
defineCustomElement$9();
|
|
1353
|
+
}
|
|
1354
|
+
break;
|
|
1355
|
+
case "salla-datetime-picker":
|
|
1356
|
+
if (!customElements.get(tagName)) {
|
|
1357
|
+
defineCustomElement$8();
|
|
1358
|
+
}
|
|
1359
|
+
break;
|
|
1360
|
+
case "salla-file-upload":
|
|
1361
|
+
if (!customElements.get(tagName)) {
|
|
1362
|
+
defineCustomElement$7();
|
|
1363
|
+
}
|
|
1364
|
+
break;
|
|
1365
|
+
case "salla-loading":
|
|
1366
|
+
if (!customElements.get(tagName)) {
|
|
1367
|
+
defineCustomElement$6();
|
|
1368
|
+
}
|
|
1369
|
+
break;
|
|
1370
|
+
case "salla-map":
|
|
1371
|
+
if (!customElements.get(tagName)) {
|
|
1372
|
+
defineCustomElement$5();
|
|
1373
|
+
}
|
|
1374
|
+
break;
|
|
1375
|
+
case "salla-modal":
|
|
1376
|
+
if (!customElements.get(tagName)) {
|
|
1377
|
+
defineCustomElement$4();
|
|
1378
|
+
}
|
|
1379
|
+
break;
|
|
1380
|
+
case "salla-order-options-modal":
|
|
1381
|
+
if (!customElements.get(tagName)) {
|
|
1382
|
+
defineCustomElement$3();
|
|
1383
|
+
}
|
|
1384
|
+
break;
|
|
1385
|
+
case "salla-product-options":
|
|
1386
|
+
if (!customElements.get(tagName)) {
|
|
1387
|
+
defineCustomElement$2();
|
|
1388
|
+
}
|
|
1389
|
+
break;
|
|
1390
|
+
case "salla-progress-bar":
|
|
1391
|
+
if (!customElements.get(tagName)) {
|
|
1392
|
+
defineCustomElement$1();
|
|
1393
|
+
}
|
|
1394
|
+
break;
|
|
1180
1395
|
} });
|
|
1181
1396
|
}
|
|
1182
1397
|
defineCustomElement();
|
|
@@ -172,7 +172,7 @@ const SallaReviewCard = /*@__PURE__*/ proxyCustomElement(class SallaReviewCard e
|
|
|
172
172
|
return (h("a", { href: this.review?.product?.url, class: "s-review-card-product-container" }, h("img", { alt: product.image?.alt || "Product", src: product.image?.url, class: "s-review-card-product-image", width: 60, height: 60, loading: "lazy", decoding: "async", draggable: false }), h("div", { class: "s-review-card-product-details" }, h("p", { class: "s-review-card-product-details-name" }, product.name), this.showPurchaseCount ? h("p", { class: "s-review-card-product-details-purchase-count" }, h("span", { innerHTML: IconFire2 }), this.purchasedCount) : null)));
|
|
173
173
|
}
|
|
174
174
|
render() {
|
|
175
|
-
return h("div", { key: '
|
|
175
|
+
return h("div", { key: '0772f783fe893c4d03a6d698909a09ecedb69fa6', class: "s-review-card-container" }, this.renderSlider(), this.renderSingleImage(), renderDivider(), h("div", { key: '5780bb57a79c04cef6cede906ce086f6811dad3c', class: "s-review-card-content" }, this.renderHeader(), h("p", { key: '7889fe4dfaf52d2e54adb667f21fc2fced195dd6', class: "s-review-card-review-content", innerHTML: this.review?.content }), renderDivider(), this.renderProductInfo()));
|
|
176
176
|
}
|
|
177
177
|
get el() { return this; }
|
|
178
178
|
static get style() { return sallaReviewCardCss; }
|
|
@@ -685,7 +685,7 @@ const SallaReviewsPage$1 = /*@__PURE__*/ proxyCustomElement(class SallaReviewsPa
|
|
|
685
685
|
return options.map(option => (h("option", { key: option.value, value: option.value, selected: option.value === this.sort }, option.label)));
|
|
686
686
|
}
|
|
687
687
|
render() {
|
|
688
|
-
return (h("host", { key: '
|
|
688
|
+
return (h("host", { key: 'b82b491ae189f825367881b7b4f03ad64e471aae' }, h("div", { key: 'd124f10806cfabd1c1f85044786541011edff3ff', class: "s-reviews-page-header-wrapper" }, h("h2", { key: '30c58bb14bea27da968e874a0c1454a35e8db207', class: "s-reviews-page-title" }, this.langTitlesReviews, h("span", { key: '8850771469ae20d1b07efcb45be58738de377e6d', class: "s-reviews-page-count" }, "(", this.langRatingReviews, ")")), h("div", { key: '5a0060c5bdbfe4d37003b04d4c6368460be8cd38', class: "s-reviews-page-filter-wrapper" }, h("label", { key: '637d1aeec005ae662c6019c423ef3f1c3a6ff264', class: "s-reviews-page-filter-label", htmlFor: "testimonials-filter" }, this.langSorting), h("select", { key: '5b68b9441d4647f12583c71da61958c30c0dcda6', onChange: (e) => this.handleSorting(e), disabled: !this.reviews.length, class: "s-reviews-page-filter" }, this.renderSortingOptions()))), this.reviews.length ? h("main", { class: "s-reviews-page-grid", ref: el => {
|
|
689
689
|
this.wrapper = el;
|
|
690
690
|
} }, this.reviews.map(review => (h("salla-review-card", { key: review.id, review: review }))))
|
|
691
691
|
: h("div", { class: "s-products-list-placeholder" }, h("span", { innerHTML: ShoppingBag }), h("p", null, this.placeholderText)), this.pagination?.links?.next && this.reviews.length ? (h("div", { class: "s-reviews-page-load-more-container" }, h("salla-button", { class: "s-reviews-page-load-more-btn", loading: this.isLoading, onClick: () => this.infiniteScroll?.loadNextPage(), onKeyUp: () => this.infiniteScroll?.loadNextPage() }, this.langLoadMore))) : null));
|
|
@@ -98,7 +98,7 @@ const SallaReviews$1 = /*@__PURE__*/ proxyCustomElement(class SallaReviews exten
|
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
render() {
|
|
101
|
-
return (h("div", { key: '
|
|
101
|
+
return (h("div", { key: '24e50ca2634208ad3ffcb9ca503aa7e18331b3a1', class: "s-reviews-container" }, h("div", { key: 'a1632306fc1a92051d030707aab075c825537e01', class: "s-reviews-header-wrapper" }, h("h1", { key: 'e2a4df75011da111e89c1b732e7741ddf452b9d5', class: "s-reviews-header" }, this.testimonialText), !!this.displayAllLink ? (h("a", { href: this.displayAllURL, class: "s-reviews-display-all" }, this.displayAllLinkText, h("span", { class: "s-reviews-display-all-icon", innerHTML: IconArrowLeft }))) : null), h("salla-slider", { key: '89009e55e3a5121c241295efd510405b623f45c3', centered: true, "slides-per-view": 1, type: "testimonials", class: "s-reviews-testimonials-slider", "controls-outer": true, "auto-play": true, id: `testimonials-${this.source}-slider` }, h("div", { key: '8b6b8df42043c8ecdb05dbbc30ecacde297f0dda', slot: "items" }, this.reviews.map((item, index) => (h("div", { key: index, class: "s-reviews-swiper-slide" }, h("div", { class: "s-reviews-testimonial" }, h("div", { class: "s-reviews-testimonial__inner" }, h("div", { class: "s-reviews-testimonial__avatar" }, h("img", { src: 'images/s-empty.png', "data-src": item.avatar, alt: item.name ? item.name : 'testimonial-' + index, class: "lazy" })), h("div", { class: "s-reviews-testimonial__text" }, h("p", { innerHTML: item.content }), h("div", { class: "s-reviews-testimonial__name_wrapper" }, h("div", { class: "s-reviews-testimonial__info" }, item.name && h("h2", null, `${item.name}`)), h("div", { class: "s-reviews-testimonial__rating" }, h("salla-rating-stars", { size: "small", value: item.stars })))), h("span", { class: "s-reviews-testimonial__icon", innerHTML: IconQuoteOpen }))))))))));
|
|
102
102
|
}
|
|
103
103
|
static get style() { return sallaReviewsCss; }
|
|
104
104
|
}, [0, "salla-reviews", {
|
|
@@ -15,7 +15,7 @@ const SallaRewardCard = /*@__PURE__*/ proxyCustomElement(class SallaRewardCard e
|
|
|
15
15
|
this.actionClick = createEvent(this, "actionClick", 7);
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (h(Host, { key: '
|
|
18
|
+
return (h(Host, { key: 'b27c707b6ac03d037d2f019131a654bcda65dd6e', class: "s-loyalty-program-reward-host" }, h("div", { key: '9606c3ad2ea7ead1f4ab2db8e148a90d43c69902', class: "s-loyalty-program-reward-container" }, h("div", { key: 'f7b6f60847b86dbb6f2b05209ab2db8eabbbd931', onClick: (e) => this.areaClick.emit(e), role: "button" }, h("div", { key: '6cd912d2c6b5c2b12ab5b4ba431ca0c965d0518b', class: "s-loyalty-program-reward-img" }, h("img", { key: 'b4f844fe1064b8ca6f5666765d92a7924fe2ad74', alt: "", src: this.prize.image || salla.url.cdn('images/s-empty.png'), class: "s-loyalty-program-rewards-img" })), h("div", { key: 'fd61d1ff64f2097fe2f696dacbb57f6c84db5339', class: "s-loyalty-program-reward-content" }, h("div", { key: 'fa1d404d5b02fe0027cef018f2eeb6e0bd109c2c', class: "s-loyalty-program-reward-points" }, h("salla-badge", { key: '29dad65f9b1f41a1698da49d113a0f9b0086210e', size: "xs" }, h("span", { key: '99526fabe82feef8ef777bfbcde868399c44e2db', innerHTML: loyaltyProgramIcon }), h("span", { key: '94a3ed106aad1b14438227d8914695b1a18e8f64', class: "s-loyalty-program-rewards-points", innerHTML: salla.lang.choice('pages.loyalty_program.points', this.prize.cost_points) }))), h("div", { key: '1e8e12541bfd7acd303f89008f2e48c9f183c83a', class: "s-loyalty-program-reward-title" }, h("span", { key: '746377627b01443a712a52f1016c29b41eaa1ad5' }, this.prize.group_title)), h("div", { key: '1f09736c18b0be21b67e1713a44f94722bbdb09d', class: "s-loyalty-program-reward-name" }, h("div", { key: '18c26f3fe19b4e6ff28bda4d18cdb253f795792b', class: "s-loyalty-program-rewards-name", id: `prize-${this.prize.id}` }, this.prize.name, this.prize.description ? `: ${this.prize.description}` : '')))), h("div", { key: '7a814db57ae3bfad6aaba12cdab17b0e900e9080', class: "p-4" }, h("slot", { key: '0ce627f221262d54f4cda4d1a50cb2d1a6197d06', name: "action" }, h("button", { key: '10f0e39d0ecc79d84674efb0a7389430da979160', onClick: (e) => this.actionClick.emit(e.detail), class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-on" }, salla.lang.get('pages.loyalty_program.show_reward')))))));
|
|
19
19
|
}
|
|
20
20
|
static get style() { return sallaLoyaltyProgramCss; }
|
|
21
21
|
}, [4, "salla-reward-card", {
|
|
@@ -8,14 +8,22 @@ import { T as Tag } from './tag.js';
|
|
|
8
8
|
import { I as IconVerified } from './check.js';
|
|
9
9
|
import { C as Cancel } from './cancel.js';
|
|
10
10
|
import { T as TrackedPromise } from './tracked-promise.js';
|
|
11
|
-
import { d as defineCustomElement$
|
|
12
|
-
import { d as defineCustomElement$
|
|
13
|
-
import { d as defineCustomElement$
|
|
14
|
-
import { d as defineCustomElement$
|
|
15
|
-
import { d as defineCustomElement$
|
|
16
|
-
import { d as defineCustomElement$
|
|
17
|
-
import { d as defineCustomElement$
|
|
18
|
-
import { d as defineCustomElement$
|
|
11
|
+
import { d as defineCustomElement$p } from './salla-add-product-button2.js';
|
|
12
|
+
import { d as defineCustomElement$o } from './salla-badge2.js';
|
|
13
|
+
import { d as defineCustomElement$n } from './salla-booking-field2.js';
|
|
14
|
+
import { d as defineCustomElement$m } from './salla-button2.js';
|
|
15
|
+
import { d as defineCustomElement$l } from './salla-color-picker2.js';
|
|
16
|
+
import { d as defineCustomElement$k } from './salla-conditional-fields2.js';
|
|
17
|
+
import { d as defineCustomElement$j } from './salla-count-down2.js';
|
|
18
|
+
import { d as defineCustomElement$i } from './salla-datetime-picker2.js';
|
|
19
|
+
import { d as defineCustomElement$h } from './salla-file-upload2.js';
|
|
20
|
+
import { d as defineCustomElement$g } from './salla-loading2.js';
|
|
21
|
+
import { d as defineCustomElement$f } from './salla-map2.js';
|
|
22
|
+
import { d as defineCustomElement$e } from './salla-modal2.js';
|
|
23
|
+
import { d as defineCustomElement$d } from './salla-order-options-modal2.js';
|
|
24
|
+
import { d as defineCustomElement$c } from './salla-product-availability2.js';
|
|
25
|
+
import { d as defineCustomElement$b } from './salla-product-card2.js';
|
|
26
|
+
import { d as defineCustomElement$a } from './salla-product-options2.js';
|
|
19
27
|
import { d as defineCustomElement$9 } from './salla-products-slider2.js';
|
|
20
28
|
import { d as defineCustomElement$8 } from './salla-progress-bar2.js';
|
|
21
29
|
import { d as defineCustomElement$7 } from './salla-quick-buy2.js';
|
|
@@ -136,11 +144,11 @@ const SallaRewardDetails = /*@__PURE__*/ proxyCustomElement(class SallaRewardDet
|
|
|
136
144
|
}
|
|
137
145
|
render() {
|
|
138
146
|
const termsAndConditions = this.getTermsAndConditions();
|
|
139
|
-
return (h("div", { key: '
|
|
147
|
+
return (h("div", { key: 'b448be9380e1b0226e0e1bf4f2383190769de152', class: "s-loyalty-program-reward-modal" }, h("div", { key: '16087a27ea5cef2738f07745ac2b830ea07ab4ce', class: "s-loyalty-program-points-modal-header" }, h("h1", { key: 'f03dde8a72339ce561298cf27b524f9a69a1fd3c', class: "s-loyalty-program-points-modal-info" }, !salla.url.is_page('cart') ? ''
|
|
140
148
|
: h("button", { class: "s-loyalty-program-back-btn", onClick: () => closeModals(() => salla.event.dispatch('modal::open', 'loyalty-rewards-modal')) }, h("span", { class: {
|
|
141
149
|
'sicon-arrow-right': document.documentElement.getAttribute('dir') === 'rtl',
|
|
142
150
|
'sicon-arrow-left': document.documentElement.getAttribute('dir') === 'ltr',
|
|
143
|
-
} })), this.prize.name)), h("div", { key: '
|
|
151
|
+
} })), this.prize.name)), h("div", { key: '94e4c042eda800d4127e98af05399aefd8cf162c', class: "s-loyalty-program-modal-scrollable-content" }, h("div", { key: '5e847cbfd2aefe88baaddd991ac9a3c9d5be4318', class: "s-loyalty-program-reward-details-header" }, h("div", { key: '67fa2b255a10ada08cd780f204d8bc958b2562df', class: "s-loyalty-program-aspect-container" }, h("img", { key: '06298fbe666f161ace6f8bd70ead43ff4647f912', src: this.prize.image, alt: this.prize.name })), h("salla-badge", { key: '2d5fb82811dfced1eb558baa01ddb83bf8271312', size: "sm", bg: "light" }, h("span", { key: 'bb9d7cf72ea6bc88eaed97e62465c85b3628de0d', innerHTML: loyaltyProgramIcon }), h("span", { key: '87bd5622040b555ab70de43ffb7a6fa06cb4b45a', class: "s-loyalty-program-points-badge-points" }, formattedPointsJsx(this.prize.cost_points)))), !termsAndConditions.length ? '' : h("div", { class: "s-loyalty-program-terms-and-conditions" }, h("h1", { class: "s-loyalty-program-terms-and-conditions-heading" }, salla.lang.get('pages.loyalty_program.terms_and_conditions')), h("ul", { class: "s-loyalty-program-terms-and-conditions-list" }, termsAndConditions.map(([title, points]) => (h("li", { class: "s-loyalty-program-terms-and-conditions-item" }, h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, title), h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, points)))))), h("div", { key: '8b9ae2745e2134b41c8bc1c9bce8bc449774fd48', class: "s-loyalty-program-reward-info-message" }, h("h1", { key: 'd5e6f1f591a09144d9d15bf32457ca22f8438b82', class: "s-loyalty-program-reward-info-message-heading" }, salla.lang.get('pages.loyalty_program.how_to_benefit_from_this_reward')), h("p", { key: '00c63a4b0dafecd45141b2627f3cf00df9b77e83', class: "s-loyalty-program-reward-info-message-content" }, this.getItemsMarkersText())), (this.prize.key === 'FREE_SHIPPING' || this.getItemsMarkers('both') === '000000') ? '' : h("div", { class: "s-loyalty-program-reward-details" }, h("salla-tabs", { key: this.refreshKey }, this.getItemsMarkers('included') === '000' ? '' : [
|
|
144
152
|
h("salla-tab-header", { slot: "header", name: "included", style: {
|
|
145
153
|
display: this.getItemsMarkers('excluded') === '000' ? 'none' : 'block',
|
|
146
154
|
} }, h("span", { class: "s-loyalty-program-reward-details-tab-icon", innerHTML: IconVerified }), h("span", null, salla.lang.get(`pages.loyalty_program.included`))),
|
|
@@ -150,7 +158,7 @@ const SallaRewardDetails = /*@__PURE__*/ proxyCustomElement(class SallaRewardDet
|
|
|
150
158
|
display: this.getItemsMarkers('included') === '000' ? 'none' : 'block',
|
|
151
159
|
} }, h("span", { class: "s-loyalty-program-reward-details-tab-icon", innerHTML: Cancel }), h("span", null, salla.lang.get(`pages.loyalty_program.excluded`))),
|
|
152
160
|
h("salla-tab-content", { slot: "content", name: "excluded" }, h("div", { class: "s-loyalty-program-reward-details-items-wrapper" }, this.getCategoriesJsx(this.getIncludedItems(this.prize.excludedCategories, this.prize.excluded_category_ids), salla.lang.get('pages.loyalty_program.excluded_categories')), this.getBrandsJsx(this.getIncludedItems(this.prize.excludedBrands, this.prize.excluded_brand_ids), salla.lang.get('pages.loyalty_program.excluded_brands')), this.getProductsJsx(this.getProductIds(this.prize.excluded_product_ids), salla.lang.get('pages.loyalty_program.excluded_products')))),
|
|
153
|
-
]))), h("salla-reward-action", { key: '
|
|
161
|
+
]))), h("salla-reward-action", { key: 'd4ccecb2463fd6c06957f40e7865b1d12158b4bd', onActionClick: e => this.actionClick.emit(e.detail), prize: this.prize })));
|
|
154
162
|
}
|
|
155
163
|
static get watchers() { return {
|
|
156
164
|
"prize": ["handlePrizeChange"]
|
|
@@ -176,7 +184,7 @@ function defineCustomElement() {
|
|
|
176
184
|
if (typeof customElements === "undefined") {
|
|
177
185
|
return;
|
|
178
186
|
}
|
|
179
|
-
const components = ["salla-reward-details", "salla-add-product-button", "salla-badge", "salla-button", "salla-count-down", "salla-loading", "salla-modal", "salla-product-availability", "salla-product-card", "salla-products-slider", "salla-progress-bar", "salla-quick-buy", "salla-reward-action", "salla-slider", "salla-tab-content", "salla-tab-header", "salla-tabs", "salla-tel-input"];
|
|
187
|
+
const components = ["salla-reward-details", "salla-add-product-button", "salla-badge", "salla-booking-field", "salla-button", "salla-color-picker", "salla-conditional-fields", "salla-count-down", "salla-datetime-picker", "salla-file-upload", "salla-loading", "salla-map", "salla-modal", "salla-order-options-modal", "salla-product-availability", "salla-product-card", "salla-product-options", "salla-products-slider", "salla-progress-bar", "salla-quick-buy", "salla-reward-action", "salla-slider", "salla-tab-content", "salla-tab-header", "salla-tabs", "salla-tel-input"];
|
|
180
188
|
components.forEach(tagName => { switch (tagName) {
|
|
181
189
|
case "salla-reward-details":
|
|
182
190
|
if (!customElements.get(tagName)) {
|
|
@@ -185,40 +193,80 @@ function defineCustomElement() {
|
|
|
185
193
|
break;
|
|
186
194
|
case "salla-add-product-button":
|
|
187
195
|
if (!customElements.get(tagName)) {
|
|
188
|
-
defineCustomElement$
|
|
196
|
+
defineCustomElement$p();
|
|
189
197
|
}
|
|
190
198
|
break;
|
|
191
199
|
case "salla-badge":
|
|
192
200
|
if (!customElements.get(tagName)) {
|
|
193
|
-
defineCustomElement$
|
|
201
|
+
defineCustomElement$o();
|
|
202
|
+
}
|
|
203
|
+
break;
|
|
204
|
+
case "salla-booking-field":
|
|
205
|
+
if (!customElements.get(tagName)) {
|
|
206
|
+
defineCustomElement$n();
|
|
194
207
|
}
|
|
195
208
|
break;
|
|
196
209
|
case "salla-button":
|
|
197
210
|
if (!customElements.get(tagName)) {
|
|
198
|
-
defineCustomElement$
|
|
211
|
+
defineCustomElement$m();
|
|
212
|
+
}
|
|
213
|
+
break;
|
|
214
|
+
case "salla-color-picker":
|
|
215
|
+
if (!customElements.get(tagName)) {
|
|
216
|
+
defineCustomElement$l();
|
|
217
|
+
}
|
|
218
|
+
break;
|
|
219
|
+
case "salla-conditional-fields":
|
|
220
|
+
if (!customElements.get(tagName)) {
|
|
221
|
+
defineCustomElement$k();
|
|
199
222
|
}
|
|
200
223
|
break;
|
|
201
224
|
case "salla-count-down":
|
|
202
225
|
if (!customElements.get(tagName)) {
|
|
203
|
-
defineCustomElement$
|
|
226
|
+
defineCustomElement$j();
|
|
227
|
+
}
|
|
228
|
+
break;
|
|
229
|
+
case "salla-datetime-picker":
|
|
230
|
+
if (!customElements.get(tagName)) {
|
|
231
|
+
defineCustomElement$i();
|
|
232
|
+
}
|
|
233
|
+
break;
|
|
234
|
+
case "salla-file-upload":
|
|
235
|
+
if (!customElements.get(tagName)) {
|
|
236
|
+
defineCustomElement$h();
|
|
204
237
|
}
|
|
205
238
|
break;
|
|
206
239
|
case "salla-loading":
|
|
207
240
|
if (!customElements.get(tagName)) {
|
|
208
|
-
defineCustomElement$
|
|
241
|
+
defineCustomElement$g();
|
|
242
|
+
}
|
|
243
|
+
break;
|
|
244
|
+
case "salla-map":
|
|
245
|
+
if (!customElements.get(tagName)) {
|
|
246
|
+
defineCustomElement$f();
|
|
209
247
|
}
|
|
210
248
|
break;
|
|
211
249
|
case "salla-modal":
|
|
212
250
|
if (!customElements.get(tagName)) {
|
|
213
|
-
defineCustomElement$
|
|
251
|
+
defineCustomElement$e();
|
|
252
|
+
}
|
|
253
|
+
break;
|
|
254
|
+
case "salla-order-options-modal":
|
|
255
|
+
if (!customElements.get(tagName)) {
|
|
256
|
+
defineCustomElement$d();
|
|
214
257
|
}
|
|
215
258
|
break;
|
|
216
259
|
case "salla-product-availability":
|
|
217
260
|
if (!customElements.get(tagName)) {
|
|
218
|
-
defineCustomElement$
|
|
261
|
+
defineCustomElement$c();
|
|
219
262
|
}
|
|
220
263
|
break;
|
|
221
264
|
case "salla-product-card":
|
|
265
|
+
if (!customElements.get(tagName)) {
|
|
266
|
+
defineCustomElement$b();
|
|
267
|
+
}
|
|
268
|
+
break;
|
|
269
|
+
case "salla-product-options":
|
|
222
270
|
if (!customElements.get(tagName)) {
|
|
223
271
|
defineCustomElement$a();
|
|
224
272
|
}
|
|
@@ -49,11 +49,11 @@ const SallaRewardExchange = /*@__PURE__*/ proxyCustomElement(class SallaRewardEx
|
|
|
49
49
|
this.reset(0);
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
|
-
return (h(Host, { key: '
|
|
52
|
+
return (h(Host, { key: 'b1e4fe9368655f389e403b2676191b46f71d49b7' }, h("div", { key: '19b8bbffa591f22608d56e8e932d7f013f6cd868', class: "s-loyalty-program-exchange-heading" }, h("div", { key: '290214db26895ba481de364299afd115b3a501cc', class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-xl s-loyalty-program-circle-variant-fill" }, h("span", { key: 'd59c1b1f7683db554856950b6ec919bb48c402dd', innerHTML: loyaltyProgramIcon })), h("h2", { key: '51a4abff2e593279cc5c9ce9dd47f7ed05533325' }, salla.lang.get('pages.loyalty_program.redeem_reward')), h("p", { key: '8a16577bce81552878cdcae4e60ce8e8719b3ed0' }, salla.lang.get('pages.loyalty_program.redeem_confirmation'), " ", h("span", { key: 'c05bdc04cbac8dc530c49bb49eca6119d2653b63' }, "(", this.prize.cost_points, " ", salla.lang.get('pages.loyalty_program.point'), ")"), " ", salla.lang.get('pages.loyalty_program.for'), " ", h("span", { key: 'ce3e88fde9f2434cabf75f7a3f622da539b5d310' }, "(", this.prize.name, ")"))), h("div", { key: 'ac51de5c34119eb79c1a8c2d06c201e4da3d7a0d', class: "s-loyalty-program-exchange-btns" }, h("button", { key: '9386b4a3d43a05fe9141561c7421b2b23ddb5a1e', class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-confirm", onClick: () => this.handleConfirm() }, h("span", { key: '88d7658b7715932ff8200f79de5dd8864b00db15', style: {
|
|
53
53
|
opacity: this.exchange.status !== 'pending' ? '1' : '0',
|
|
54
|
-
} }, salla.lang.get('common.elements.confirm')), h("span", { key: '
|
|
54
|
+
} }, salla.lang.get('common.elements.confirm')), h("span", { key: '80c30140959693b3d98dc2162e45d4089e81eb6b', class: "s-loyalty-program-exchange-loading", style: {
|
|
55
55
|
opacity: this.exchange.status === 'pending' ? '1' : '0',
|
|
56
|
-
} }, h("salla-loading", { key: '
|
|
56
|
+
} }, h("salla-loading", { key: '516e36b4271d8da0ad711732aa991a45633edea5', color: "primary", size: 24 }))), h("button", { key: '4642c008c656a662bd277829ef80db37cffa0b1a', class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-cancel", onClick: () => this.handleCancel() }, salla.lang.get('common.elements.cancel')))));
|
|
57
57
|
}
|
|
58
58
|
static get style() { return sallaLoyaltyProgramCss; }
|
|
59
59
|
}, [0, "salla-reward-exchange", {
|
|
@@ -165,7 +165,7 @@ const SallaScopees = /*@__PURE__*/ proxyCustomElement(class SallaScopees extends
|
|
|
165
165
|
return salla.onReady();
|
|
166
166
|
}
|
|
167
167
|
render() {
|
|
168
|
-
return (h(Host, { key: '
|
|
168
|
+
return (h(Host, { key: 'a7571c852749d4449b42e2c12d5597f6aded1f7f' }, h("salla-modal", { key: '48846fbac890e05c0deabe74138ad929a14796fb', ref: modal => this.modal = modal, isClosable: !!(this.isOpenedBefore || (this.selection == 'optional')), class: "s-scopes-modal", isLoading: this.loading, "has-skeleton": true }, this.loading ?
|
|
169
169
|
h("div", { slot: "loading" }, h("div", { class: "s-scopes-skeleton" }, h("salla-list-tile", { class: "s-scopes-header" }, h("div", { slot: "icon", class: "s-scopes-header-icon" }, h("salla-skeleton", { type: "circle" })), h("div", { slot: "title", class: "s-scopes-header-title mb-5" }, h("salla-skeleton", { height: '15px', width: '50%' })), h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, h("salla-skeleton", { height: '10px' }), h("salla-skeleton", { height: '10px', width: '75%' }))), h("div", { class: "s-scopes-skeleton-search" }, h("salla-skeleton", { height: '10px', width: '50%' }), h("salla-skeleton", { height: '30px', width: '100%' })), h("div", { class: "s-scopes-skeleton-scopes" }, h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' })), h("div", { class: "s-scopes-skeleton-btn" }, h("salla-skeleton", { height: '40px', width: '100%' }))))
|
|
170
170
|
:
|
|
171
171
|
[h("salla-list-tile", { class: this.originalScopesList?.length ? "s-scopes-header block" : "s-hidden" }, h("div", { slot: "icon", class: "s-scopes-header-icon", innerHTML: StoreAlt }), h("div", { slot: "title", class: "s-scopes-header-title" }, salla.lang.get('blocks.scope.you_are_browse_store_from')), h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, !!this.selected_scope ? this.selected_scope.name : "")), h("div", { class: "s-scopes-wrap" }, !!this.originalScopesList?.length && h("h4", { class: "s-scopes-title" }, this.getFormTitle()), this.originalScopesList?.length > this.searchDisplayLimit ?
|
|
@@ -132,10 +132,10 @@ const SallaSearch$1 = /*@__PURE__*/ proxyCustomElement(class SallaSearch extends
|
|
|
132
132
|
this.inputValue.length < 3 ? this.container.classList.remove('s-search-no-results') : '';
|
|
133
133
|
}
|
|
134
134
|
render() {
|
|
135
|
-
const searchContent = (h("div", { key: '
|
|
135
|
+
const searchContent = (h("div", { key: 'd7668846b013b4e8c9617193cd7457a585733960', class: { 's-search-container': true, 's-search-inline': this.inline }, ref: container => (this.container = container) }, h("div", { key: '7850ee638ab8dbe416be4fa7bd5601d821802776', class: "s-search-input-wrapper" }, h("span", { key: '09bfde1658f27487458076cb91954e530f91c8be', class: "s-search-icon-wrap" }, h("span", { key: '547eb4e1efba4bc1e46ce9a28816f4d39b26f638', class: "s-search-icon", innerHTML: this.loading ? '<i class="s-search-spinner-loader"/>' : Search })), h("input", { key: '2be7d24d980cbb37ee50c389ab03e8fa67eb3973', type: "search", enterkeyhint: "search", autocomplete: "off", class: "s-search-input", placeholder: salla.lang.get('blocks.header.search_placeholder'), onInput: (e) => this.limitWordsAndSearch(e), onKeyDown: e => this.handleKeyDown(e), ref: input => (this.searchInput = input), style: {
|
|
136
136
|
height: this.height + 'px',
|
|
137
137
|
borderRadius: this.oval ? this.height / 2 + 'px' : '',
|
|
138
|
-
} }), this.showAction ? (h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && h("span", { innerHTML: Search }))) : null), h("div", { key: '
|
|
138
|
+
} }), this.showAction ? (h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && h("span", { innerHTML: Search }))) : null), h("div", { key: 'fb09f6adaf9c4d9b798a6c10e45c446c306f0d37', class: "s-search-results" }, this.results?.data.map(product => (h("a", { href: product.url + '?from=search-bar', class: {
|
|
139
139
|
's-search-product': true,
|
|
140
140
|
's-search-product-not-available': !product.is_available,
|
|
141
141
|
}, innerHTML: this.productSlot
|
|
@@ -144,9 +144,9 @@ const SallaSearch$1 = /*@__PURE__*/ proxyCustomElement(class SallaSearch extends
|
|
|
144
144
|
.replace(/\{regular_price\}/g, product.is_on_sale && product.regular_price
|
|
145
145
|
? salla.money(product.regular_price)
|
|
146
146
|
: '')
|
|
147
|
-
.replace(/\{image\}/g, product.image.url) }))), h("p", { key: '
|
|
148
|
-
const modalContent = (h("salla-modal", { key: '
|
|
149
|
-
const placeholderContent = (h("div", { key: '
|
|
147
|
+
.replace(/\{image\}/g, product.image.url) }))), h("p", { key: '7f81403f86aeddca49b39ca84750a7f148416e51', ref: el => (this.noResults = el), class: "s-search-no-results-placeholder" }, salla.lang.get('common.elements.no_options')))));
|
|
148
|
+
const modalContent = (h("salla-modal", { key: '75909547a855ed368527746c0d342309b6b1b656', position: "top", class: "s-search-modal", ref: modal => (this.modal = modal) }, searchContent));
|
|
149
|
+
const placeholderContent = (h("div", { key: '480110779039e31eb43a5cfb321ca3a53d36d986', class: "s-search-placeholder-wrapper s-search-inline" }, h("div", { key: 'ef5e5f05279cb5324f9981e6a73a926f36a28317', class: "s-search-input-wrapper" }, h("span", { key: 'def894edb583c66b66abde7b54602da821fe10ee', class: "s-search-icon-wrap" }, h("span", { key: '6d38ace3c0cc4bc98d9a87b0b558187ba82f57e3', class: "s-search-icon", innerHTML: Search })), h("button", { key: 'ff4ebaeb0eb6315121cd5927784783f34ee174fc', type: "button", class: "s-search-input s-search-placeholder-trigger", onClick: () => this.open(), style: {
|
|
150
150
|
height: this.height + 'px',
|
|
151
151
|
borderRadius: this.oval ? this.height / 2 + 'px' : '',
|
|
152
152
|
} }, salla.lang.get('blocks.header.search_placeholder'))), modalContent));
|