@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement, e as axios } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement, e as axios } from './index-BvYTcqJt.js';
|
|
5
5
|
import { P as PendingOrdersIcon } from './cart-DY4LZmNP.js';
|
|
6
6
|
import { H as Helper } from './Helper-BXj4f_Qj.js';
|
|
7
7
|
import { B as BellRing } from './bell-ring-D3mWkc-3.js';
|
|
@@ -17,6 +17,140 @@ var WalletIcon = `<!-- Generated by IcoMoon.io -->
|
|
|
17
17
|
</svg>
|
|
18
18
|
`;
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Order-options gate for the fast-checkout widget — keeps <salla-add-product-button> thin.
|
|
22
|
+
* Intercepts the widget click → runs the order-options modal → injects the result → re-fires the click.
|
|
23
|
+
*/
|
|
24
|
+
const PRODUCT_FORM_SELECTOR = 'form.product-form';
|
|
25
|
+
class OrderOptionsGate {
|
|
26
|
+
constructor(host, productId) {
|
|
27
|
+
this.host = host;
|
|
28
|
+
this.productId = productId;
|
|
29
|
+
/** True on the re-fired click so it passes through instead of re-gating. */
|
|
30
|
+
this.collected = false;
|
|
31
|
+
/** Live PDP price (one onPriceUpdated subscription per widget). */
|
|
32
|
+
this.livePrice = 0;
|
|
33
|
+
}
|
|
34
|
+
/** Attach once to the widget. Returns false when there's no widget (e.g. product cards) so the caller retries. */
|
|
35
|
+
static attach(host, productId) {
|
|
36
|
+
const widget = host.querySelector('salla-mini-checkout-widget');
|
|
37
|
+
if (!widget)
|
|
38
|
+
return false;
|
|
39
|
+
const gate = new OrderOptionsGate(host, String(productId));
|
|
40
|
+
// One subscription per widget (PDP only) — no per-card leak.
|
|
41
|
+
salla.product?.event?.onPriceUpdated?.((response) => {
|
|
42
|
+
gate.livePrice = Number(response?.data?.price) || gate.livePrice;
|
|
43
|
+
});
|
|
44
|
+
widget.addEventListener('click', (event) => gate.handleWidgetClick(event, widget), true);
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
/** Quantity from the same form the widget submits (PRODUCT_FORM_SELECTOR), not the button's nearest form. */
|
|
48
|
+
getSelectedQuantity() {
|
|
49
|
+
try {
|
|
50
|
+
const form = document.querySelector(PRODUCT_FORM_SELECTOR);
|
|
51
|
+
const data = form?.getElementSallaData?.();
|
|
52
|
+
const qty = Number(data instanceof FormData ? data.get('quantity') : data?.quantity);
|
|
53
|
+
if (Number.isFinite(qty) && qty > 0)
|
|
54
|
+
return qty;
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
// fall through to the attribute
|
|
58
|
+
}
|
|
59
|
+
return Number(this.host.getAttribute('quantity')) || 1;
|
|
60
|
+
}
|
|
61
|
+
async handleWidgetClick(event, widget) {
|
|
62
|
+
if (this.collected) {
|
|
63
|
+
this.collected = false;
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
event.stopImmediatePropagation();
|
|
68
|
+
if (!await this.validatePdpOptions())
|
|
69
|
+
return;
|
|
70
|
+
if (salla.config.isGuest()) {
|
|
71
|
+
salla.api.auth.requireLoginThen('salla-add-product-button::oo.after-login', () => this.handleWidgetClick(event, widget));
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
widget.classList.add('s-add-product-button-busy');
|
|
75
|
+
let resp;
|
|
76
|
+
try {
|
|
77
|
+
resp = await salla.api.withoutNotifier(() => salla.product.api.getOrderOptions([{ id: this.productId, quantity: this.getSelectedQuantity() }]));
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
salla?.logger?.warn?.('order-options: fetch failed', error);
|
|
81
|
+
widget.classList.remove('s-add-product-button-busy');
|
|
82
|
+
this.resumeWidget(widget);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
widget.classList.remove('s-add-product-button-busy');
|
|
86
|
+
const items = resp?.data?.order_options || [];
|
|
87
|
+
if (!items.length) {
|
|
88
|
+
this.resumeWidget(widget);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const basePrice = this.livePrice > 0
|
|
92
|
+
? this.livePrice
|
|
93
|
+
: Number(resp?.data?.products?.[0]?.price?.amount) || 0;
|
|
94
|
+
const modal = this.ensureModal();
|
|
95
|
+
try {
|
|
96
|
+
const result = await modal.open({ orderOptions: items, basePrice });
|
|
97
|
+
this.injectIntoMini(result?.orderOptions || []);
|
|
98
|
+
this.resumeWidget(widget);
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
// user dismissed — widget stays blocked, they re-click to retry.
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async validatePdpOptions() {
|
|
105
|
+
const optionsEl = document.querySelector(`salla-product-options[product-id="${this.productId}"]`);
|
|
106
|
+
if (!optionsEl)
|
|
107
|
+
return true;
|
|
108
|
+
if (typeof optionsEl.validateAndScroll === 'function') {
|
|
109
|
+
return await optionsEl.validateAndScroll();
|
|
110
|
+
}
|
|
111
|
+
if (typeof optionsEl.reportValidity === 'function') {
|
|
112
|
+
return await optionsEl.reportValidity();
|
|
113
|
+
}
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
/** Inject order_options into the next cart-add payload via `cart::before.add.item` (one-shot, scoped to productId). */
|
|
117
|
+
injectIntoMini(orderOptions) {
|
|
118
|
+
if (!orderOptions.length)
|
|
119
|
+
return;
|
|
120
|
+
const productId = this.productId;
|
|
121
|
+
const onceHandler = (eventData) => {
|
|
122
|
+
if (String(eventData?.id) !== String(productId))
|
|
123
|
+
return;
|
|
124
|
+
try {
|
|
125
|
+
eventData?.payload?.set?.('order_options', orderOptions);
|
|
126
|
+
}
|
|
127
|
+
finally {
|
|
128
|
+
salla.event.off('cart::before.add.item', onceHandler);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
salla.event.on('cart::before.add.item', onceHandler);
|
|
132
|
+
}
|
|
133
|
+
ensureModal() {
|
|
134
|
+
let modal = document.querySelector('salla-order-options-modal');
|
|
135
|
+
if (!modal) {
|
|
136
|
+
modal = document.createElement('salla-order-options-modal');
|
|
137
|
+
document.body.appendChild(modal);
|
|
138
|
+
}
|
|
139
|
+
return modal;
|
|
140
|
+
}
|
|
141
|
+
resumeWidget(widget) {
|
|
142
|
+
this.collected = true;
|
|
143
|
+
// Real click target lives in the widget's shadow DOM.
|
|
144
|
+
const innerBtn = widget.shadowRoot?.querySelector?.('.s-fast-checkout-button');
|
|
145
|
+
if (innerBtn) {
|
|
146
|
+
innerBtn.click();
|
|
147
|
+
}
|
|
148
|
+
else if (typeof widget.click === 'function') {
|
|
149
|
+
widget.click();
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
20
154
|
const sallaAddProductButtonCss = ":host{display:block}salla-add-product-button[width=wide]{width:100%}";
|
|
21
155
|
|
|
22
156
|
const SallaAddProductButton = class {
|
|
@@ -42,6 +176,8 @@ const SallaAddProductButton = class {
|
|
|
42
176
|
/** Use matchMedia instead of window.innerWidth to avoid forced reflow (Lighthouse/PageSpeed) */
|
|
43
177
|
this.isDesktopViewport = typeof window !== 'undefined' ? window.matchMedia('(min-width: 768px)').matches : true;
|
|
44
178
|
this.viewportMediaQuery = null;
|
|
179
|
+
/** Guards one-time attachment of the order-options gate to the mini-checkout widget. */
|
|
180
|
+
this.orderOptionsGateAttached = false;
|
|
45
181
|
this.onViewportChange = (e) => {
|
|
46
182
|
this.isDesktopViewport = e.matches;
|
|
47
183
|
this.btn?.setText((e.matches && !!this.passedLabel) ? this.passedLabel : this.getLabel());
|
|
@@ -229,6 +365,13 @@ const SallaAddProductButton = class {
|
|
|
229
365
|
});
|
|
230
366
|
}
|
|
231
367
|
componentDidRender() {
|
|
368
|
+
// Wire the order-options gate to the fast-checkout widget once it renders (logic lives in OrderOptionsGate).
|
|
369
|
+
// Only when the merchant enabled order options; otherwise the widget runs the normal fast-checkout flow.
|
|
370
|
+
if (!this.orderOptionsGateAttached && this.productId
|
|
371
|
+
&& salla.config.get('store.settings.order_options.mandatory', false)
|
|
372
|
+
&& OrderOptionsGate.attach(this.host, this.productId)) {
|
|
373
|
+
this.orderOptionsGateAttached = true;
|
|
374
|
+
}
|
|
232
375
|
//if label not passed, get label
|
|
233
376
|
if (!!this.passedLabel && (!this.supportStickyBar || this.isDesktopViewport)) {
|
|
234
377
|
// if passed label, set it
|
|
@@ -574,7 +717,7 @@ const SallaProductAvailability = class {
|
|
|
574
717
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
575
718
|
}
|
|
576
719
|
render() {
|
|
577
|
-
return (h(Host, { key: '
|
|
720
|
+
return (h(Host, { key: '0779c3aef2637bfcd30ecf110d0cd31d819a82a5', class: "s-product-availability-wrap" }, this.isSubscribedToProduct
|
|
578
721
|
? h("div", { class: "s-product-availability-subscribed" }, h("span", { innerHTML: BellRing, class: "s-product-availability-subs-icon" }), salla.lang.get('pages.products.notify_availability_success'))
|
|
579
722
|
:
|
|
580
723
|
h("salla-button", { width: "wide", onClick: () => this.isUser ? this.submit() : this.openModel() }, salla.lang.get('pages.products.notify_availability')), this.isUser || this.isSubscribedToProduct ? '' : this.renderModal()));
|
|
@@ -691,6 +834,11 @@ const SallaProductOptions = class {
|
|
|
691
834
|
* The id of the product to which the options are going to be fetched for.
|
|
692
835
|
*/
|
|
693
836
|
this.productId = salla.config.get('page.id');
|
|
837
|
+
/**
|
|
838
|
+
* Strip the wrapper's padding (keeps the background, rounded corners, margin).
|
|
839
|
+
* Used by callers that need the options to sit flush inside their own surface.
|
|
840
|
+
*/
|
|
841
|
+
this.noPadding = false;
|
|
694
842
|
this.handleDonationOptions = (event, detail, type, _option) => {
|
|
695
843
|
// Donating-amount input only: onInput updates price and dispatches native change for form price watcher.
|
|
696
844
|
if (detail === 'custom' && type === 'input') {
|
|
@@ -1170,7 +1318,7 @@ const SallaProductOptions = class {
|
|
|
1170
1318
|
if (this.optionsData?.length === 0) {
|
|
1171
1319
|
return;
|
|
1172
1320
|
}
|
|
1173
|
-
return (h(Host, { class:
|
|
1321
|
+
return (h(Host, { class: { 's-product-options-wrapper': true, 's-product-options-no-padding': this.noPadding } }, h("salla-conditional-fields", null, this.optionsData.map((option) => h("div", { key: option.id, class: `s-product-options-option-container${option.visibility_condition || this.hideDigitalCardsOptions(option) ? ' hidden' : ''}`, "data-option-id": option.id, ...this.getOptionShownWhen(option) }, option.name === 'splitter' ?
|
|
1174
1322
|
this.splitterOption()
|
|
1175
1323
|
: h("div", { class: { "s-product-options-option": true, "s-product-options-option-booking": option.type === DisplayType.BOOKING && salla.url.is_page("cart") }, "data-option-type": option.type, "data-option-required": `${option.required}` }, h("label", { htmlFor: this.generateInputId(option.id), class: `s-product-options-option-label ${this.hideLabel(option) ? 's-product-options-option-label-hidden' : ''}` }, h("b", null, option.name, option.required && h("span", null, " * "), " "), h("small", null, option.placeholder)), h("div", { class: `s-product-options-option-content ${this.hideLabel(option) || (option.type === DisplayType.BOOKING && salla.url.is_page("cart")) ? 's-product-options-option-content-full-width' : ''}` }, this.getDisplayForType(option))))))));
|
|
1176
1324
|
}
|
|
@@ -1225,7 +1373,9 @@ const SallaProductOptions = class {
|
|
|
1225
1373
|
}
|
|
1226
1374
|
fillSelectedOptions() {
|
|
1227
1375
|
this.selectedOptions = this.optionsData.reduce((acc, opt) => {
|
|
1228
|
-
|
|
1376
|
+
// `details` is optional on the Option interface — input-type options
|
|
1377
|
+
// (text/number/date/file) carry no choice list, so guard before filtering.
|
|
1378
|
+
const selectedDetails = (opt.details ?? []).filter(detail => detail.is_selected);
|
|
1229
1379
|
const mappedDetails = selectedDetails.map(detail => ({
|
|
1230
1380
|
...detail,
|
|
1231
1381
|
option_id: opt.id
|
|
@@ -1233,6 +1383,25 @@ const SallaProductOptions = class {
|
|
|
1233
1383
|
return acc.concat(mappedDetails);
|
|
1234
1384
|
}, []);
|
|
1235
1385
|
}
|
|
1386
|
+
/**
|
|
1387
|
+
* Seed `selectedOptions` from API defaults (`is_selected: true`).
|
|
1388
|
+
* componentWillLoad does this only on the cart page; non-cart callers
|
|
1389
|
+
* (e.g. order-options modal) call this after mount to avoid the first
|
|
1390
|
+
* multi-select toggle wiping the pre-selected defaults.
|
|
1391
|
+
* */
|
|
1392
|
+
async seedSelectedOptions() {
|
|
1393
|
+
this.fillSelectedOptions();
|
|
1394
|
+
// A required multi-select renders every checkbox `required`; handleRequiredMultipleOptions
|
|
1395
|
+
// clears that once one is checked, but it only fires on user `change`. After seeding a
|
|
1396
|
+
// pre-selected default we run it for the initial DOM so a defaulted-but-untouched required
|
|
1397
|
+
// multi-select doesn't fail validation and block checkout. Defer to rAF so the seeded
|
|
1398
|
+
// `checked` state is painted before we count it (matches the change-handler pattern above).
|
|
1399
|
+
requestAnimationFrame(() => {
|
|
1400
|
+
this.optionsData
|
|
1401
|
+
?.filter(o => o.type === DisplayType.MULTIPLE_OPTIONS && o.required)
|
|
1402
|
+
.forEach(o => this.handleRequiredMultipleOptions(o));
|
|
1403
|
+
});
|
|
1404
|
+
}
|
|
1236
1405
|
async componentDidLoad() {
|
|
1237
1406
|
if (!this.optionsData?.length) {
|
|
1238
1407
|
return;
|
|
@@ -2059,7 +2228,15 @@ window.SallaApplePay = {
|
|
|
2059
2228
|
SallaApplePay.session.oncouponcodechanged = SallaApplePay.onCouponCodeChanged;
|
|
2060
2229
|
SallaApplePay.session.onpaymentmethodselected = SallaApplePay.onPaymentMethodSelected;
|
|
2061
2230
|
|
|
2062
|
-
|
|
2231
|
+
// Hook between session creation and begin(). Return truthy to skip
|
|
2232
|
+
// begin() (caller handles it later, e.g. after async work).
|
|
2233
|
+
let skipBegin;
|
|
2234
|
+
if (typeof SallaApplePay.detail.onStartedSession === 'function') {
|
|
2235
|
+
skipBegin = SallaApplePay.detail.onStartedSession(SallaApplePay.session);
|
|
2236
|
+
}
|
|
2237
|
+
if (!skipBegin) {
|
|
2238
|
+
SallaApplePay.session.begin();
|
|
2239
|
+
}
|
|
2063
2240
|
},
|
|
2064
2241
|
onPaymentMethodSelected: async (event) => {
|
|
2065
2242
|
salla.logger.log('🍏 Pay: onPaymentMethodSelected', event);
|
|
@@ -2477,6 +2654,88 @@ if (window.ApplePaySession?.canMakePayments()) {
|
|
|
2477
2654
|
document.querySelectorAll('data-show-if-apple-pay-supported').forEach(element => element.style.display = 'none');
|
|
2478
2655
|
}
|
|
2479
2656
|
|
|
2657
|
+
/**
|
|
2658
|
+
* Order-options helpers for the Apple Pay quick-buy flow — keeps <salla-quick-buy> to thin AP wiring.
|
|
2659
|
+
* Apple Pay resolves options inside the session-started hook (single gesture), so the caller owns
|
|
2660
|
+
* the ApplePaySession and drives it via callbacks.
|
|
2661
|
+
*/
|
|
2662
|
+
/** Get-or-create the singleton order-options modal on <body>. */
|
|
2663
|
+
function ensureOrderOptionsModal() {
|
|
2664
|
+
let modal = document.querySelector('salla-order-options-modal');
|
|
2665
|
+
if (!modal) {
|
|
2666
|
+
modal = document.createElement('salla-order-options-modal');
|
|
2667
|
+
document.body.appendChild(modal);
|
|
2668
|
+
}
|
|
2669
|
+
return modal;
|
|
2670
|
+
}
|
|
2671
|
+
/** Sync PDP-option validity (an `await` would consume the Apple Pay gesture). Skips hidden/disabled inputs. */
|
|
2672
|
+
function reportProductOptionsValiditySync(productId) {
|
|
2673
|
+
const optionsElement = document.querySelector(`salla-product-options[product-id="${productId}"]`);
|
|
2674
|
+
if (!optionsElement)
|
|
2675
|
+
return true;
|
|
2676
|
+
const requiredInputs = optionsElement.querySelectorAll('[required]');
|
|
2677
|
+
let pass = true;
|
|
2678
|
+
requiredInputs.forEach((input) => {
|
|
2679
|
+
if (input.disabled || input.closest('.hidden'))
|
|
2680
|
+
return;
|
|
2681
|
+
if ('reportValidity' in input && !input.reportValidity())
|
|
2682
|
+
pass = false;
|
|
2683
|
+
});
|
|
2684
|
+
return pass;
|
|
2685
|
+
}
|
|
2686
|
+
/** Merge collected order-options into the quick-purchase payload (FormData or plain object). */
|
|
2687
|
+
function appendOrderOptionsToPayload(data, orderOptions) {
|
|
2688
|
+
if (!orderOptions.length)
|
|
2689
|
+
return;
|
|
2690
|
+
if (data && typeof data.append === 'function') {
|
|
2691
|
+
orderOptions.forEach((entry, i) => {
|
|
2692
|
+
data.append(`order_options[${i}][id]`, String(entry.id));
|
|
2693
|
+
data.append(`order_options[${i}][value]`, String(entry.value));
|
|
2694
|
+
});
|
|
2695
|
+
return;
|
|
2696
|
+
}
|
|
2697
|
+
if (data && typeof data === 'object') {
|
|
2698
|
+
data.order_options = orderOptions;
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
/**
|
|
2702
|
+
* Fetch order options and, if any, collect them via the modal (apple-pay mode). Callbacks drive the
|
|
2703
|
+
* caller's pre-created session: `beginPendingSession` (no options), `discardPendingSession` (options
|
|
2704
|
+
* found — the modal's AP button starts a fresh one), `onSubmit` (submitted).
|
|
2705
|
+
*/
|
|
2706
|
+
async function resolveApplePayOrderOptions(opts) {
|
|
2707
|
+
let resp;
|
|
2708
|
+
try {
|
|
2709
|
+
resp = await salla.api.withoutNotifier(() => salla.product.api.getOrderOptions([{ id: opts.productId, quantity: opts.quantity }]));
|
|
2710
|
+
}
|
|
2711
|
+
catch (error) {
|
|
2712
|
+
salla?.logger?.warn?.('order-options: fetch failed', error);
|
|
2713
|
+
opts.beginPendingSession();
|
|
2714
|
+
return;
|
|
2715
|
+
}
|
|
2716
|
+
const items = resp?.data?.order_options || [];
|
|
2717
|
+
if (!items.length) {
|
|
2718
|
+
opts.beginPendingSession(); // begin() doesn't need a fresh gesture
|
|
2719
|
+
return;
|
|
2720
|
+
}
|
|
2721
|
+
opts.discardPendingSession(); // drop the unused session; the modal builds a fresh one
|
|
2722
|
+
const basePrice = Number(opts.amount) > 0
|
|
2723
|
+
? Number(opts.amount)
|
|
2724
|
+
: Number(resp?.data?.products?.[0]?.price?.amount) || 0;
|
|
2725
|
+
const modal = ensureOrderOptionsModal();
|
|
2726
|
+
try {
|
|
2727
|
+
await modal.open({
|
|
2728
|
+
orderOptions: items,
|
|
2729
|
+
basePrice,
|
|
2730
|
+
paymentMode: 'apple-pay',
|
|
2731
|
+
onSubmit: opts.onSubmit,
|
|
2732
|
+
});
|
|
2733
|
+
}
|
|
2734
|
+
catch {
|
|
2735
|
+
// dismissed — no live session
|
|
2736
|
+
}
|
|
2737
|
+
}
|
|
2738
|
+
|
|
2480
2739
|
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}";
|
|
2481
2740
|
|
|
2482
2741
|
const SallaQuickBuy = class {
|
|
@@ -2504,32 +2763,82 @@ const SallaQuickBuy = class {
|
|
|
2504
2763
|
* @default {}
|
|
2505
2764
|
*/
|
|
2506
2765
|
this.options = {};
|
|
2766
|
+
/** Modal selections, merged into the quick-purchase payload. */
|
|
2767
|
+
this.collectedOrderOptions = [];
|
|
2768
|
+
/** Flips true after the first onStartedSession so the second dispatch begins. */
|
|
2769
|
+
this.optionsResolved = false;
|
|
2770
|
+
/** PDP price + selected order-option prices (from the modal). */
|
|
2771
|
+
this.applePayAmount = 0;
|
|
2772
|
+
/** Session from the initial gesture; begun later when there are no order options. */
|
|
2773
|
+
this.pendingApplePaySession = null;
|
|
2507
2774
|
this.quickBuy = salla.lang.get('pages.products.buy_now');
|
|
2775
|
+
/** Apple Pay onStartedSession: first call defers begin() to run the OO check; second (resolved) begins. */
|
|
2776
|
+
this.handleApplePaySessionStarted = (session) => {
|
|
2777
|
+
// Order options disabled → let Apple Pay begin normally, as if the feature didn't exist.
|
|
2778
|
+
if (!salla.config.get('store.settings.order_options.mandatory', false))
|
|
2779
|
+
return false;
|
|
2780
|
+
if (this.optionsResolved)
|
|
2781
|
+
return false;
|
|
2782
|
+
this.optionsResolved = true;
|
|
2783
|
+
this.pendingApplePaySession = session;
|
|
2784
|
+
resolveApplePayOrderOptions({
|
|
2785
|
+
productId: this.productId,
|
|
2786
|
+
amount: Number(this.amount),
|
|
2787
|
+
quantity: this.getSelectedQuantity(),
|
|
2788
|
+
beginPendingSession: () => {
|
|
2789
|
+
this.pendingApplePaySession?.begin();
|
|
2790
|
+
this.pendingApplePaySession = null;
|
|
2791
|
+
},
|
|
2792
|
+
discardPendingSession: () => { this.pendingApplePaySession = null; },
|
|
2793
|
+
onSubmit: (selections, total) => {
|
|
2794
|
+
this.collectedOrderOptions = selections;
|
|
2795
|
+
this.applePayAmount = total;
|
|
2796
|
+
this.settlePayment();
|
|
2797
|
+
},
|
|
2798
|
+
});
|
|
2799
|
+
return true;
|
|
2800
|
+
};
|
|
2508
2801
|
salla.lang.onLoaded(() => {
|
|
2509
2802
|
this.quickBuy = salla.lang.get('pages.products.buy_now');
|
|
2510
2803
|
});
|
|
2511
2804
|
}
|
|
2512
|
-
|
|
2513
|
-
// user guest and guest-checkout not enabled
|
|
2805
|
+
quickBuyHandler() {
|
|
2514
2806
|
if (salla.config.isGuest() && !this.isGuestCheckout()) {
|
|
2515
2807
|
this.requireLogin.emit({ productId: this.productId });
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2808
|
+
salla.api.auth.requireLoginThen('salla-quick-buy::user.logged-in', () => this.quickBuyHandler());
|
|
2809
|
+
return;
|
|
2810
|
+
}
|
|
2811
|
+
// Sync validate — AP needs the gesture preserved for new ApplePaySession().
|
|
2812
|
+
if (!this.validatePdpOptionsSync())
|
|
2813
|
+
return;
|
|
2814
|
+
this.optionsResolved = false;
|
|
2815
|
+
this.collectedOrderOptions = [];
|
|
2816
|
+
this.applePayAmount = 0;
|
|
2817
|
+
this.settlePayment();
|
|
2818
|
+
}
|
|
2819
|
+
/** Sync PDP-option validity (preserves the AP gesture); emits + notifies on failure. */
|
|
2820
|
+
validatePdpOptionsSync() {
|
|
2821
|
+
if (reportProductOptionsValiditySync(this.productId))
|
|
2822
|
+
return true;
|
|
2823
|
+
this.validationFailed.emit({ productId: this.productId });
|
|
2824
|
+
salla.error(salla.lang.get('common.messages.required_fields'));
|
|
2825
|
+
return false;
|
|
2826
|
+
}
|
|
2827
|
+
/** Read the live PDP quantity from the form so order-options match the real cart line. */
|
|
2828
|
+
getSelectedQuantity() {
|
|
2829
|
+
try {
|
|
2830
|
+
const data = this.host.getElementSallaData?.();
|
|
2831
|
+
const qty = Number(data instanceof FormData ? data.get('quantity') : data?.quantity);
|
|
2832
|
+
return Number.isFinite(qty) && qty > 0 ? qty : 1;
|
|
2833
|
+
}
|
|
2834
|
+
catch {
|
|
2835
|
+
return 1;
|
|
2521
2836
|
}
|
|
2522
|
-
await this.settlePayment();
|
|
2523
2837
|
}
|
|
2524
2838
|
async settlePayment() {
|
|
2525
|
-
let optionsElement = document.querySelector(`salla-product-options[product-id="${this.productId}"]`);
|
|
2526
|
-
//make sure all the required options are selected
|
|
2527
|
-
if (optionsElement && !await optionsElement.reportValidity()) {
|
|
2528
|
-
this.validationFailed.emit({ productId: this.productId });
|
|
2529
|
-
return salla.error(salla.lang.get('common.messages.required_fields'));
|
|
2530
|
-
}
|
|
2531
2839
|
//use this way to get quantity too
|
|
2532
2840
|
let data = this.host.getElementSallaData();
|
|
2841
|
+
appendOrderOptionsToPayload(data, this.collectedOrderOptions);
|
|
2533
2842
|
// if the store doesn't have Apple Pay , just create a cart and then redirect to check out page
|
|
2534
2843
|
if (!this.isApplePayActive) {
|
|
2535
2844
|
// return salla.product.buyNow(this.productId, data);
|
|
@@ -2547,13 +2856,16 @@ const SallaQuickBuy = class {
|
|
|
2547
2856
|
}
|
|
2548
2857
|
// noinspection TypeScriptValidateJSTypes
|
|
2549
2858
|
salla.event.dispatch('payments::apple-pay.start-transaction', {
|
|
2550
|
-
|
|
2859
|
+
// Prefer the modal's collected total (PDP price + selected OO additional_prices).
|
|
2860
|
+
// Falls back to PDP live amount when no OO modal ran.
|
|
2861
|
+
amount: this.applePayAmount > 0 ? this.applePayAmount : this.amount,
|
|
2551
2862
|
currency: this.currency || 'SAR', // SAR
|
|
2552
2863
|
requiredShippingContactFields: this.getRequiredShippingContactFields(),
|
|
2553
2864
|
shippingMethods: this.isRequireShipping ? [] : undefined,
|
|
2554
2865
|
supportedNetworks: salla.config.get('store.settings.buy_now.networks'),
|
|
2555
2866
|
supportedCountries: salla.config.get('store.settings.buy_now.countries'),
|
|
2556
2867
|
countryCode: salla.config.get('store.store_country') || 'SA',
|
|
2868
|
+
onStartedSession: this.handleApplePaySessionStarted,
|
|
2557
2869
|
validateMerchant: {
|
|
2558
2870
|
url: this.validateHost ? `${this.validateHost}/checkout/applepay/validate` : salla.url.get('checkout/applepay/validate'),
|
|
2559
2871
|
onSuccess: (response) => {
|
|
@@ -2684,7 +2996,7 @@ const SallaQuickBuy = class {
|
|
|
2684
2996
|
});
|
|
2685
2997
|
}
|
|
2686
2998
|
render() {
|
|
2687
|
-
return h(Host, { key: '
|
|
2999
|
+
return h(Host, { key: 'fb1bdf862d9b9cea58df14862f7ec9c4be388585' }, this.quickBuyButton());
|
|
2688
3000
|
}
|
|
2689
3001
|
quickBuyButton() {
|
|
2690
3002
|
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 });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, a as getElement } from './index-BvYTcqJt.js';
|
|
5
5
|
import { a as anime } from './anime.es-CgtvEd63.js';
|
|
6
6
|
|
|
7
7
|
const sallaAdvertisementCss = ":host{display:block}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-BvYTcqJt.js';
|
|
5
5
|
import { P as PendingOrdersIcon } from './cart-DY4LZmNP.js';
|
|
6
6
|
import { I as ImageIcon } from './image-C-tzSDxw.js';
|
|
7
7
|
|
|
@@ -34,7 +34,7 @@ const SallaAlert = class {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return (h(Host, { key: '
|
|
37
|
+
return (h(Host, { key: 'e26a52cc275ac4c2e4090c113cb7e7d4d578fc11', class: `s-alert-wrapper s-alert-${this.variant}` }, h("span", { key: 'bdb1c6693b226a4e136e89640fcc19fbefc6e29e', class: "s-alert-icon" }, this.renderIcon()), h("span", { key: 'de8997f9617e74fc082ae9603bf16eac4c0a4b17', class: "s-alert-text" }, this.message, h("slot", { key: '37fb1adba1fa7f0226143250632cf20b514ee06b' }))));
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
SallaAlert.style = sallaAlertCss;
|
|
@@ -184,9 +184,9 @@ const SallaBottomAlert = class {
|
|
|
184
184
|
}
|
|
185
185
|
render() {
|
|
186
186
|
const hasTemplate = this.template && typeof this.template === 'object' && Object.keys(this.template).length > 0;
|
|
187
|
-
return (h(Host, { key: '
|
|
187
|
+
return (h(Host, { key: '1e598df3c91be1e357fc5d771061ec386573f968', class: `s-bottom-alert-wrapper ${hasTemplate ? 's-bottom-alert-wrapper-with-template' : ''}` }, hasTemplate && (h("div", { key: '20a0173dfa6a01b793f8e1e9416d295ee4e61783', class: "s-bottom-alert-logo-section" }, h("img", { key: '2c9042f0ce022aeb9b2879496ec2837ed14dfe9f', src: "https://cdn.salla.network/images/logo/logo-light.svg", alt: "Salla", class: "s-bottom-alert-logo" }), h("span", { key: '69c2bc09acca8a535d2f982131ccc09d65ea44e6', class: "s-bottom-alert-logo-text" }, this.readyStores))), h("div", { key: '553122bac6f1f11c2bcc41a92ac798b3701ebfb9', class: "s-bottom-alert-content" }, h("div", { key: 'e0df96405998b70c15a8320c8400fa75db77d041', class: "flex items-center gap-2" }, h("div", { key: '26f241c725c763dfc25f58cdcd0f2979571a2061', class: "s-bottom-alert-icon" }, this.icon ? h("i", { class: this.icon }) : h("i", { innerHTML: infoIcon })), h("div", { key: '5e6ba42a2924aec3b99050e8f53634716023a535', class: "s-bottom-alert-message" }, this.message ? (this.message) : hasTemplate ? (h("span", { class: "flex flex-wrap items-center gap-1" }, this.defaultMessage, h("span", { class: {
|
|
188
188
|
's-bottom-alert-message-highlight': true,
|
|
189
|
-
}, "aria-label": "Developer" }, this.salla), h("span", { innerHTML: salla.money(this.template.price) }))) : (this.defaultMessage))), this.type !== 'banner' && (h("div", { key: '
|
|
189
|
+
}, "aria-label": "Developer" }, this.salla), h("span", { innerHTML: salla.money(this.template.price) }))) : (this.defaultMessage))), this.type !== 'banner' && (h("div", { key: '44c4d9499736d84da97b640b8ab063a6b9dd6d3c', class: hasTemplate ? 's-bottom-alert-actions-group' : 's-bottom-alert-action' }, hasTemplate ? (this.loading ? (h("salla-loading", { size: "20" })) : (h("div", { class: "s-bottom-alert-actions-group-container" }, h("a", { class: "s-bottom-alert-action-link", onClick: () => this.handleAction() }, this.actionLabel || this.moreDetailsLabel), this.templateData?.link ? (h("button", { type: "button", class: "s-bottom-alert-action-purchase-button", onClick: () => window.open(this.templateData?.link, '_blank') }, this.buyTheTemplate)) : null))) : (h("salla-button", { href: this.actionUrl, size: "medium", onClick: () => this.handleAction(), width: "normal" }, this.actionLabel || this.defaultActionLabel)))), this.type === 'popup' && this.popup())));
|
|
190
190
|
}
|
|
191
191
|
get host() { return getElement(this); }
|
|
192
192
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-BvYTcqJt.js';
|
|
5
5
|
|
|
6
6
|
const sallaAppInstallAlertCss = ":host{display:block}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-BvYTcqJt.js';
|
|
5
5
|
|
|
6
6
|
const sallaAppsIconsCss = ":host{display:block}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h } from './index-
|
|
4
|
+
import { r as registerInstance, h } from './index-BvYTcqJt.js';
|
|
5
5
|
|
|
6
6
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
7
7
|
|
|
@@ -85,7 +85,7 @@ const SallaBadge = class {
|
|
|
85
85
|
this.bg = 'light';
|
|
86
86
|
}
|
|
87
87
|
render() {
|
|
88
|
-
return (h("div", { key: '
|
|
88
|
+
return (h("div", { key: '54d35eb76a59251edb581786e5e89a83b6f8fbf0', class: badge({ size: this.size, bg: this.bg, color: this.color }) }, h("slot", { key: '4641cb434a2c0a6d7c004e3384848a200cb79dff' })));
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
91
|
SallaBadge.style = sallaBadgeCss;
|