@salla.sa/twilight-components 3.0.19 → 3.0.21
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/{Helper-DqKJCL8G.js → Helper-8GCn2Wfh.js} +1 -1
- package/dist/cjs/delivery-promise-intent-5WTKLkFZ.js +71 -0
- package/dist/cjs/{filepond-Byu0lc8z.js → filepond-DyDRgSW7.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-qwx7lYZ-.js → filepond-plugin-file-poster-BbEyrQ24.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-C-n0P4TT.js → filepond-plugin-file-validate-size-dIjgIAJz.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-C8VOOXdT.js → filepond-plugin-file-validate-type-MITfI2m0.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-B9KG763Y.js → filepond-plugin-image-edit-B0vevlWn.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-Czt4pYzU.js → filepond-plugin-image-exif-orientation-C8fbY4tU.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-BFm1Zl0o.js → filepond-plugin-image-preview-pu-ILH6g.js} +1 -1
- package/dist/cjs/{helpers-NV7wgP50.js → helpers-wRMwEkLy.js} +25 -0
- package/dist/cjs/{index-CFW798jX.js → index-DjzCGoSW.js} +14 -10
- package/dist/cjs/{intlTelInput-CLa2B89b.js → intlTelInput-mRDdvd3r.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +120 -6
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-applied-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +13 -13
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +12 -17
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_9.cjs.entry.js +4 -4
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +5 -65
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-free-shipping-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-free-shipping-tag.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gift-card-redeem_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-mobile-update-modal.cjs.entry.js +188 -0
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +4 -4
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +6 -6
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +2 -2
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +3 -3
- package/dist/cjs/salla-offer-modal.cjs.entry.js +2 -2
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-items.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-payment.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-rewards.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +2 -2
- 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 +1 -1
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +2 -2
- package/dist/cjs/salla-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +3 -3
- package/dist/cjs/salla-products-list.cjs.entry.js +2 -2
- package/dist/cjs/salla-products-slider.cjs.entry.js +2 -2
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +33 -7
- package/dist/cjs/salla-rating-modal.cjs.entry.js +2 -2
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +2 -2
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search-product-card.cjs.entry.js +3 -3
- package/dist/cjs/salla-search.cjs.entry.js +2 -2
- package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/salla-social-share.cjs.entry.js +2 -2
- package/dist/cjs/salla-social.cjs.entry.js +2 -2
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-thank-you-header.cjs.entry.js +2 -2
- package/dist/cjs/salla-thank-you-page.cjs.entry.js +2 -2
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- 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 +3 -3
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
- package/dist/cjs/salla-wishlist-summary.cjs.entry.js +2 -2
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-Vx_7G7bs.js → vanilla-picker-DTt0qsPz.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/salla-bullet-delivery/helpers.js +23 -0
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +7 -12
- package/dist/collection/components/salla-mobile-update-modal/salla-mobile-update-modal.css +43 -0
- package/dist/collection/components/salla-mobile-update-modal/salla-mobile-update-modal.js +235 -0
- 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-items/salla-order-items.js +1 -1
- package/dist/collection/components/salla-order-payment/salla-order-payment.js +1 -1
- package/dist/collection/components/salla-order-rewards/salla-order-rewards.js +1 -1
- 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-product-availability/salla-product-availability.js +1 -1
- package/dist/collection/components/salla-product-card-embed/salla-product-card-embed.js +1 -1
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +47 -1
- package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +31 -5
- package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
- package/dist/collection/components/salla-review-factors-tags/salla-review-factors-tags.js +1 -1
- package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
- package/dist/collection/components/salla-search-product-card/salla-search-product-card.js +2 -2
- 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-thank-you-header/salla-thank-you-header.js +1 -1
- package/dist/collection/components/salla-thank-you-page/salla-thank-you-page.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-verify/salla-verify.js +48 -2
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
- package/dist/components/delivery-promise-intent.js +67 -0
- package/dist/components/helpers.js +24 -1
- package/dist/components/index.js +2 -2
- package/dist/components/mail.js +2 -2
- package/dist/components/salla-bullet-delivery.js +7 -12
- package/dist/components/salla-contacts.js +2 -2
- package/dist/components/salla-delivery-promise.js +1 -62
- package/dist/components/salla-loyalty-point2.js +2 -2
- package/dist/components/salla-mobile-update-modal.d.ts +11 -0
- package/dist/components/salla-mobile-update-modal.js +241 -0
- package/dist/components/salla-multiple-bundle-product-cart2.js +1 -1
- package/dist/components/salla-multiple-bundle-product-details2.js +2 -2
- package/dist/components/salla-multiple-bundle-product-options-modal2.js +4 -4
- package/dist/components/salla-multiple-bundle-product-slider2.js +1 -1
- package/dist/components/salla-multiple-bundle-product.js +1 -1
- package/dist/components/salla-notification-item2.js +1 -1
- package/dist/components/salla-offer-modal.js +1 -1
- package/dist/components/salla-order-details.js +1 -1
- package/dist/components/salla-order-edit-product-card.js +1 -1
- package/dist/components/salla-order-items2.js +1 -1
- package/dist/components/salla-order-payment.js +1 -1
- package/dist/components/salla-order-rewards.js +1 -1
- 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-product-availability2.js +1 -1
- package/dist/components/salla-product-card-embed.js +1 -1
- package/dist/components/salla-product-size-guide.js +2 -2
- package/dist/components/salla-quantity-input2.js +1 -1
- package/dist/components/salla-quick-buy2.js +117 -3
- package/dist/components/salla-quick-order.js +2 -2
- package/dist/components/salla-rating-modal-v22.js +33 -7
- package/dist/components/salla-rating-modal2.js +2 -2
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-review-factors-tags2.js +1 -1
- package/dist/components/salla-reviews-page.js +1 -1
- package/dist/components/salla-search-product-card2.js +2 -2
- package/dist/components/salla-searchable-dropdown2.js +4 -4
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-social-share2.js +4 -4
- package/dist/components/salla-social.js +1 -1
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-thank-you-header.js +1 -1
- package/dist/components/salla-thank-you-page.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/components/salla-verify.js +1 -321
- package/dist/components/salla-verify2.js +328 -0
- package/dist/components/salla-wishlist-actions.js +1 -1
- package/dist/docs.json +158 -2
- package/dist/esm/{Helper-I0CAizv1.js → Helper-DZKYnNWb.js} +1 -1
- package/dist/esm/delivery-promise-intent-C6pZjRut.js +67 -0
- package/dist/esm/{filepond-DTUYXV0J.js → filepond-Th5h_x_y.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DydZjneT.js → filepond-plugin-file-poster-CH6jw-Ue.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-nbsCU2t9.js → filepond-plugin-file-validate-size-Q-NzkoIy.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Cl5B_DIy.js → filepond-plugin-file-validate-type-CbY5K7RZ.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-bzskFyFR.js → filepond-plugin-image-edit-JietW24Z.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-MBDuxLaX.js → filepond-plugin-image-exif-orientation-FoYRnhuB.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-N6wzEryW.js → filepond-plugin-image-preview-DVAxXbSQ.js} +1 -1
- package/dist/esm/{helpers-Cnh7Qptl.js → helpers-BVaKfTMx.js} +24 -1
- package/dist/esm/{index-C9zdeQFI.js → index-C9GauqTa.js} +14 -10
- package/dist/esm/{intlTelInput-B5L9nYtO.js → intlTelInput-BVoDutQ9.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +2 -2
- package/dist/esm/salla-add-product-button_5.entry.js +120 -6
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-applied-filters.entry.js +2 -2
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +13 -13
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_3.entry.js +12 -17
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_9.entry.js +4 -4
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +3 -63
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +2 -2
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-free-shipping-banner.entry.js +1 -1
- package/dist/esm/salla-free-shipping-tag.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gift-card-redeem_2.entry.js +2 -2
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +2 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_3.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-mobile-update-modal.entry.js +186 -0
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +4 -4
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +6 -6
- package/dist/esm/salla-multiple-bundle-product.entry.js +2 -2
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.entry.js +3 -3
- package/dist/esm/salla-offer-modal.entry.js +2 -2
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +2 -2
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +2 -2
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-items.entry.js +2 -2
- package/dist/esm/salla-order-options-modal.entry.js +1 -1
- package/dist/esm/salla-order-payment.entry.js +2 -2
- package/dist/esm/salla-order-rewards.entry.js +2 -2
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +2 -2
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +2 -2
- 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 +1 -1
- package/dist/esm/salla-product-card-embed.entry.js +2 -2
- package/dist/esm/salla-product-card.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +3 -3
- package/dist/esm/salla-products-list.entry.js +2 -2
- package/dist/esm/salla-products-slider.entry.js +2 -2
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +33 -7
- package/dist/esm/salla-rating-modal.entry.js +2 -2
- package/dist/esm/salla-review-factors-tags.entry.js +2 -2
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search-product-card.entry.js +3 -3
- package/dist/esm/salla-search.entry.js +2 -2
- package/dist/esm/salla-skeleton.entry.js +2 -2
- package/dist/esm/salla-social-share.entry.js +2 -2
- package/dist/esm/salla-social.entry.js +2 -2
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-thank-you-header.entry.js +2 -2
- package/dist/esm/salla-thank-you-page.entry.js +2 -2
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- 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 +3 -3
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +2 -2
- package/dist/esm/salla-wishlist-summary.entry.js +2 -2
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-CAeu4f87.js → vanilla-picker-DF1Nq4hd.js} +1 -1
- package/dist/twilight/{p-4070f808.entry.js → p-0166f79c.entry.js} +1 -1
- package/dist/twilight/{p-0213fde4.entry.js → p-018826eb.entry.js} +1 -1
- package/dist/twilight/{p-74285af9.entry.js → p-043d73d9.entry.js} +1 -1
- package/dist/twilight/{p-825c5b73.entry.js → p-04aa3b60.entry.js} +1 -1
- package/dist/twilight/{p-90a59027.entry.js → p-0532a824.entry.js} +1 -1
- package/dist/twilight/{p-a55b5c44.entry.js → p-05918c61.entry.js} +1 -1
- package/dist/twilight/{p-c5e2c781.entry.js → p-062fc545.entry.js} +1 -1
- package/dist/twilight/{p-3b7a45ec.entry.js → p-08369cba.entry.js} +1 -1
- package/dist/twilight/{p-6d572fe0.entry.js → p-0d0f83be.entry.js} +1 -1
- package/dist/twilight/{p-982e9124.entry.js → p-0e68d32e.entry.js} +1 -1
- package/dist/twilight/{p-32d9da31.entry.js → p-115e4d6f.entry.js} +1 -1
- package/dist/twilight/{p-c2df20f8.entry.js → p-116ba74d.entry.js} +1 -1
- package/dist/twilight/{p-0add41ce.entry.js → p-12486655.entry.js} +1 -1
- package/dist/twilight/{p-30d64bd1.entry.js → p-1344006a.entry.js} +1 -1
- package/dist/twilight/{p-ade9a68c.entry.js → p-149eb28d.entry.js} +1 -1
- package/dist/twilight/{p-ce1e45a3.entry.js → p-172f2a77.entry.js} +1 -1
- package/dist/twilight/{p-386b3dcd.entry.js → p-173677bd.entry.js} +1 -1
- package/dist/twilight/{p-e20d5e75.entry.js → p-175aa116.entry.js} +1 -1
- package/dist/twilight/{p-e455709f.entry.js → p-1ad63304.entry.js} +1 -1
- package/dist/twilight/{p-db3efb27.entry.js → p-1c820b97.entry.js} +1 -1
- package/dist/twilight/{p-7fa4d0b6.entry.js → p-1c878907.entry.js} +1 -1
- package/dist/twilight/{p-a0bfedad.entry.js → p-1e675e56.entry.js} +1 -1
- package/dist/twilight/{p-8262e669.entry.js → p-283d55a9.entry.js} +1 -1
- package/dist/twilight/{p-9a0218a6.entry.js → p-28a3838d.entry.js} +1 -1
- package/dist/twilight/{p-b5e0065a.entry.js → p-2ac25f71.entry.js} +1 -1
- package/dist/twilight/{p-cb54adac.entry.js → p-2bf7cbe6.entry.js} +1 -1
- package/dist/twilight/{p-17bcbf9b.entry.js → p-2e5c4855.entry.js} +1 -1
- package/dist/twilight/{p-c64b2b22.entry.js → p-2e805b61.entry.js} +1 -1
- package/dist/twilight/{p-e921b2d1.entry.js → p-33c586a7.entry.js} +1 -1
- package/dist/twilight/{p-8948b58c.entry.js → p-35ec8259.entry.js} +1 -1
- package/dist/twilight/{p-8eb3fd92.entry.js → p-39cf245a.entry.js} +1 -1
- package/dist/twilight/{p-7db8d545.entry.js → p-39e19e3e.entry.js} +1 -1
- package/dist/twilight/{p-8b8cf457.entry.js → p-405a0719.entry.js} +1 -1
- package/dist/twilight/{p-6f84c662.entry.js → p-4514bfbc.entry.js} +1 -1
- package/dist/twilight/{p-d57b49ff.entry.js → p-45b91895.entry.js} +1 -1
- package/dist/twilight/p-45d6ae74.entry.js +4 -0
- package/dist/twilight/{p-e223beca.entry.js → p-466b7d90.entry.js} +1 -1
- package/dist/twilight/p-46848a79.entry.js +4 -0
- package/dist/twilight/{p-ad00021e.entry.js → p-4a1d812a.entry.js} +1 -1
- package/dist/twilight/{p-e3991836.entry.js → p-4f323370.entry.js} +1 -1
- package/dist/twilight/{p-aabcd09f.entry.js → p-54a0fabd.entry.js} +1 -1
- package/dist/twilight/{p-5aee5e44.entry.js → p-5ed309ee.entry.js} +1 -1
- package/dist/twilight/{p-0b0d4942.entry.js → p-624c2b99.entry.js} +1 -1
- package/dist/twilight/{p-8c2992e7.entry.js → p-628ae902.entry.js} +1 -1
- package/dist/twilight/{p-a22d9931.entry.js → p-62bf84fd.entry.js} +1 -1
- package/dist/twilight/{p-99cb3dba.entry.js → p-63247bfb.entry.js} +1 -1
- package/dist/twilight/{p-ec356e5a.entry.js → p-638e0139.entry.js} +1 -1
- package/dist/twilight/p-6c4555b2.entry.js +4 -0
- package/dist/twilight/{p-a5fc8358.entry.js → p-709b4ab5.entry.js} +1 -1
- package/dist/twilight/{p-01d5cd61.entry.js → p-70ce472b.entry.js} +1 -1
- package/dist/twilight/{p-036fbfc0.entry.js → p-7117fe09.entry.js} +1 -1
- package/dist/twilight/{p-eeefc285.entry.js → p-76141be4.entry.js} +1 -1
- package/dist/twilight/{p-9e429047.entry.js → p-7618a6df.entry.js} +1 -1
- package/dist/twilight/{p-252748d9.entry.js → p-77c477bd.entry.js} +1 -1
- package/dist/twilight/{p-20f9c62f.entry.js → p-7a1cdcc7.entry.js} +1 -1
- package/dist/twilight/{p-412fb721.entry.js → p-7d97513e.entry.js} +1 -1
- package/dist/twilight/{p-3b766a79.entry.js → p-7f30e00b.entry.js} +1 -1
- package/dist/twilight/{p-d0f903ac.entry.js → p-8722a50c.entry.js} +1 -1
- package/dist/twilight/{p-3bb0e184.entry.js → p-882d7c08.entry.js} +1 -1
- package/dist/twilight/{p-faf00404.entry.js → p-89c62a00.entry.js} +1 -1
- package/dist/twilight/{p-a3959219.entry.js → p-8ef15ba6.entry.js} +1 -1
- package/dist/twilight/{p-550ad1a6.entry.js → p-91473544.entry.js} +1 -1
- package/dist/twilight/{p-7db6ccfe.entry.js → p-931cc451.entry.js} +1 -1
- package/dist/twilight/{p-d0acd7ff.entry.js → p-93a088e7.entry.js} +1 -1
- package/dist/twilight/{p-32495dd2.entry.js → p-95758bdd.entry.js} +1 -1
- package/dist/twilight/{p-995b898f.entry.js → p-95f7c99b.entry.js} +1 -1
- package/dist/twilight/{p-45e0a5d0.entry.js → p-970e99cd.entry.js} +1 -1
- package/dist/twilight/{p-f83efc62.entry.js → p-979d0918.entry.js} +1 -1
- package/dist/twilight/{p-703b9253.entry.js → p-99765200.entry.js} +1 -1
- package/dist/twilight/{p-9683535f.entry.js → p-99b6d180.entry.js} +1 -1
- package/dist/twilight/{p-9e542951.entry.js → p-9b6f559e.entry.js} +1 -1
- package/dist/twilight/{p-777d28f6.entry.js → p-9e73b459.entry.js} +1 -1
- package/dist/twilight/{p-JGEddAgs.js → p-BTPANJIN.js} +1 -1
- package/dist/twilight/{p-Cnh7Qptl.js → p-BVaKfTMx.js} +1 -1
- package/dist/twilight/{p-Bgu5gtOF.js → p-C0zPqHmm.js} +1 -1
- package/dist/twilight/{p-C9zdeQFI.js → p-C9GauqTa.js} +2 -2
- package/dist/twilight/{p-Cfz9xit3.js → p-CFzrPKbi.js} +1 -1
- package/dist/twilight/{p-Dav_R_d2.js → p-CSsOnp68.js} +1 -1
- package/dist/twilight/{p-CmYSalnM.js → p-Cc1dNnp_.js} +1 -1
- package/dist/twilight/{p-Xgbueas7.js → p-DRtbu0JQ.js} +1 -1
- package/dist/twilight/{p-CSGj1pY-.js → p-DibVuHKp.js} +1 -1
- package/dist/twilight/{p-RflSBQNB.js → p-DuCmj2_U.js} +1 -1
- package/dist/twilight/{p-CWWgpQ8Q.js → p-Y0yMZUbe.js} +2 -2
- package/dist/twilight/{p-619c709c.entry.js → p-a91ddfb4.entry.js} +1 -1
- package/dist/twilight/{p-2b930157.entry.js → p-aa5d0b21.entry.js} +1 -1
- package/dist/twilight/{p-4d615f9f.entry.js → p-aff0942e.entry.js} +1 -1
- package/dist/twilight/{p-427c13b6.entry.js → p-b8238390.entry.js} +1 -1
- package/dist/twilight/{p-f3b12754.entry.js → p-bb05be17.entry.js} +1 -1
- package/dist/twilight/{p-5009f654.entry.js → p-bddfcbc8.entry.js} +1 -1
- package/dist/twilight/{p-9d1a5007.entry.js → p-ca329334.entry.js} +1 -1
- package/dist/twilight/{p-50853b76.entry.js → p-cf211a8c.entry.js} +1 -1
- package/dist/twilight/{p-194ff38c.entry.js → p-d0691020.entry.js} +1 -1
- package/dist/twilight/{p-c92cc92f.entry.js → p-d6d86cb3.entry.js} +1 -1
- package/dist/twilight/p-d9b6090b.entry.js +4 -0
- package/dist/twilight/{p-e37da59f.entry.js → p-da4b0896.entry.js} +1 -1
- package/dist/twilight/{p-db73d0bf.entry.js → p-da548ddf.entry.js} +1 -1
- package/dist/twilight/{p-fa622715.entry.js → p-de273a21.entry.js} +1 -1
- package/dist/twilight/{p-290ce0bc.entry.js → p-df317844.entry.js} +1 -1
- package/dist/twilight/{p-3cc6ca6c.entry.js → p-dff32c76.entry.js} +1 -1
- package/dist/twilight/{p-4d7fc363.entry.js → p-e233642f.entry.js} +1 -1
- package/dist/twilight/{p-73dea22d.entry.js → p-e353ad86.entry.js} +1 -1
- package/dist/twilight/{p-32f100f8.entry.js → p-e54ad603.entry.js} +1 -1
- package/dist/twilight/{p-bbb09d92.entry.js → p-e5741ee6.entry.js} +1 -1
- package/dist/twilight/{p-2e4e15c5.entry.js → p-e6d4feeb.entry.js} +1 -1
- package/dist/twilight/p-ea175728.entry.js +4 -0
- package/dist/twilight/p-ea31904b.entry.js +4 -0
- package/dist/twilight/{p-a070cce0.entry.js → p-ea7218bf.entry.js} +1 -1
- package/dist/twilight/{p-575014c4.entry.js → p-eae77b32.entry.js} +1 -1
- package/dist/twilight/{p-8712f7c7.entry.js → p-eb60fbbe.entry.js} +1 -1
- package/dist/twilight/{p-c4274188.entry.js → p-ed1ab1ad.entry.js} +1 -1
- package/dist/twilight/p-ee344577.entry.js +4 -0
- package/dist/twilight/{p-f6279a13.entry.js → p-f72cbb2e.entry.js} +1 -1
- package/dist/twilight/{p-1867f7d4.entry.js → p-fa881be4.entry.js} +1 -1
- package/dist/twilight/p-fad39687.entry.js +4 -0
- package/dist/twilight/p-q5NJ0uS-.js +4 -0
- package/dist/twilight/{p-BcT9tEVW.js → p-tNwFaykp.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/helpers.d.ts +7 -0
- package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +4 -0
- package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +0 -2
- package/dist/types/components/salla-mobile-update-modal/salla-mobile-update-modal.d.ts +44 -0
- package/dist/types/components/salla-quick-buy/salla-quick-buy.d.ts +12 -0
- package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +4 -0
- package/dist/types/components/salla-verify/salla-verify.d.ts +8 -0
- package/dist/types/components.d.ts +50 -0
- package/package.json +5 -5
- package/dist/twilight/p-2e6537a3.entry.js +0 -4
- package/dist/twilight/p-3a4e86d1.entry.js +0 -4
- package/dist/twilight/p-86d55a6b.entry.js +0 -4
- package/dist/twilight/p-8c548259.entry.js +0 -4
- package/dist/twilight/p-908716fb.entry.js +0 -4
- package/dist/twilight/p-9cf31ff4.entry.js +0 -4
- package/dist/twilight/p-a3ca61af.entry.js +0 -4
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { Fragment, h } from "@stencil/core";
|
|
5
|
+
// Fallbacks only: the texts live in `pages.mobile_update.*` of the Languages module
|
|
6
|
+
const TEXTS = {
|
|
7
|
+
title: { ar: 'تحديث رقم الجوال', en: 'Update your mobile number' },
|
|
8
|
+
clarification: {
|
|
9
|
+
ar: 'رقم الجوال مكرر مع حساب آخر يبدو أنك تملك حساباً مسبقاً بهذا الرقم! يرجى تسجيل الدخول عبر البريد الإلكتروني، أو المتابعة باستخدام رقم جوال جديد.',
|
|
10
|
+
en: 'This mobile number is duplicated with another account. It looks like you already have an account with this number! Please log in with your email, or continue with a new mobile number.',
|
|
11
|
+
},
|
|
12
|
+
choice: {
|
|
13
|
+
ar: 'هل هذا الرقم رقم جوالك؟ أكّد رقمك الحالي أو أدخل رقماً جديداً لإتمام الطلب.',
|
|
14
|
+
en: 'Is this your mobile number? Confirm your current number or enter a new one to complete the order.',
|
|
15
|
+
},
|
|
16
|
+
same_number: { ar: 'تأكيد رقمي الحالي', en: 'Confirm my current number' },
|
|
17
|
+
new_number: { ar: 'استخدام رقم جديد', en: 'Use a new number' },
|
|
18
|
+
send_code: { ar: 'إرسال رمز التحقق', en: 'Send verification code' },
|
|
19
|
+
exists: { ar: 'رقم الجوال موجود مسبقاً', en: 'Mobile number exists' },
|
|
20
|
+
blocked: { ar: 'يرجى إدخال رقم جوال جديد لإتمام الطلب', en: 'Please provide a new mobile number to complete the order' },
|
|
21
|
+
too_many: {
|
|
22
|
+
ar: 'تجاوزت عدد المحاولات المسموح بها، حاول مرة أخرى بعد 10 دقائق',
|
|
23
|
+
en: 'Too many attempts, please try again after 10 minutes',
|
|
24
|
+
},
|
|
25
|
+
back: { ar: 'رجوع', en: 'Back' },
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Makes a customer flagged as a duplicate confirm the current mobile number or replace it, verified by a code.
|
|
29
|
+
* Opened by `salla.mobileUpdate`, which mounts it on any theme when the order submit is blocked.
|
|
30
|
+
*/
|
|
31
|
+
export class SallaMobileUpdateModal {
|
|
32
|
+
constructor() {
|
|
33
|
+
this.options = ['new_number'];
|
|
34
|
+
this.step = 'mobile';
|
|
35
|
+
this.mode = 'new_number';
|
|
36
|
+
this.errorMessage = '';
|
|
37
|
+
this.fieldError = '';
|
|
38
|
+
this.phone = {};
|
|
39
|
+
this.completed = false;
|
|
40
|
+
this.sending = false;
|
|
41
|
+
this.flow = 0;
|
|
42
|
+
this.dialCode = '';
|
|
43
|
+
this.verifyCode = (data) => {
|
|
44
|
+
const request = this.mode === 'same_number'
|
|
45
|
+
? salla.api.profile.requiredMobile('requiredMobileSameVerify', { code: data.code })
|
|
46
|
+
: salla.api.profile.requiredMobile('requiredMobileUpdate', { ...this.phone, code: data.code });
|
|
47
|
+
return request.then(response => {
|
|
48
|
+
this.completed = true;
|
|
49
|
+
salla.event.emit('mobile-update::updated', response);
|
|
50
|
+
this.modal.close();
|
|
51
|
+
return response;
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
this.resendCode = () => this.requestCode().catch(error => {
|
|
55
|
+
this.fail(error, salla.lang.get('common.errors.error_occurred'));
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
t(key) {
|
|
59
|
+
const text = TEXTS[key];
|
|
60
|
+
const fallback = salla.lang.locale === 'ar' ? text.ar : text.en;
|
|
61
|
+
// these two labels already exist in the Languages module, so the popup reuses them
|
|
62
|
+
const shared = { back: 'common.elements.back', send_code: 'pages.checkout.send_code' }[key];
|
|
63
|
+
return salla.lang.getWithDefault(shared || `pages.mobile_update.${key}`, fallback);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Open the popup
|
|
67
|
+
* @param data `options` is the list the backend returned: `new_number`, and `same_number` for an unresolved duplicate
|
|
68
|
+
*/
|
|
69
|
+
async open(data = {}) {
|
|
70
|
+
this.options = (data.options?.length ? data.options : ['new_number']);
|
|
71
|
+
this.completed = false;
|
|
72
|
+
this.sending = false;
|
|
73
|
+
this.flow++;
|
|
74
|
+
this.errorMessage = '';
|
|
75
|
+
this.fieldError = '';
|
|
76
|
+
this.step = this.options.includes('same_number') ? 'choice' : 'mobile';
|
|
77
|
+
this.mode = 'new_number';
|
|
78
|
+
await this.modal.open();
|
|
79
|
+
}
|
|
80
|
+
onVisibilityChanged(visible) {
|
|
81
|
+
if (!visible && !this.completed) {
|
|
82
|
+
salla.event.emit('mobile-update::dismissed');
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
fail(error, fallback = '') {
|
|
86
|
+
const status = error?.response?.status;
|
|
87
|
+
const fields = error?.response?.data?.error?.fields || {};
|
|
88
|
+
const fieldMessage = [].concat(fields.phone || [])[0];
|
|
89
|
+
this.errorMessage = '';
|
|
90
|
+
this.fieldError = '';
|
|
91
|
+
if (status !== 429 && fieldMessage) {
|
|
92
|
+
this.fieldError = this.t('exists');
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
this.errorMessage = status === 429 ? this.t('too_many') : (error?.response?.data?.error?.message || fallback);
|
|
96
|
+
}
|
|
97
|
+
async sendCode() {
|
|
98
|
+
if (this.sending)
|
|
99
|
+
return;
|
|
100
|
+
this.errorMessage = '';
|
|
101
|
+
this.fieldError = '';
|
|
102
|
+
// a response that lands after the popup was closed and reopened belongs to a flow that no longer exists
|
|
103
|
+
const flow = this.flow;
|
|
104
|
+
this.sending = true;
|
|
105
|
+
try {
|
|
106
|
+
if (this.mode === 'new_number') {
|
|
107
|
+
if (!(await this.telInput.isValid()))
|
|
108
|
+
return;
|
|
109
|
+
const values = await this.telInput.getValues();
|
|
110
|
+
this.phone = { phone: values.phone, country_code: values.countryCode };
|
|
111
|
+
this.dialCode = String(values.countryKey || '');
|
|
112
|
+
}
|
|
113
|
+
await this.requestCode();
|
|
114
|
+
if (flow === this.flow)
|
|
115
|
+
this.step = 'verify';
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
if (flow === this.flow)
|
|
119
|
+
this.fail(error, salla.lang.get('common.errors.error_occurred'));
|
|
120
|
+
}
|
|
121
|
+
finally {
|
|
122
|
+
if (flow === this.flow)
|
|
123
|
+
this.sending = false;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
requestCode() {
|
|
127
|
+
return this.mode === 'same_number'
|
|
128
|
+
? salla.api.profile.requiredMobile('requiredMobileSameSend')
|
|
129
|
+
: salla.api.profile.requiredMobile('requiredMobileSend', this.phone);
|
|
130
|
+
}
|
|
131
|
+
componentDidRender() {
|
|
132
|
+
if (this.step === 'verify' && this.verify && !this.verify.dataset.opened) {
|
|
133
|
+
this.verify.dataset.opened = 'true';
|
|
134
|
+
this.verify.open({ type: 'mobile' });
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
chooseMode(mode) {
|
|
138
|
+
if (this.sending)
|
|
139
|
+
return;
|
|
140
|
+
this.mode = mode;
|
|
141
|
+
this.errorMessage = '';
|
|
142
|
+
this.fieldError = '';
|
|
143
|
+
if (mode === 'same_number') {
|
|
144
|
+
return this.sendCode();
|
|
145
|
+
}
|
|
146
|
+
this.step = 'mobile';
|
|
147
|
+
}
|
|
148
|
+
// back from the verify step to the step that chose the number, so a mistaken number can be corrected
|
|
149
|
+
changeNumber() {
|
|
150
|
+
this.step = this.mode === 'same_number' ? 'choice' : 'mobile';
|
|
151
|
+
this.errorMessage = '';
|
|
152
|
+
this.fieldError = '';
|
|
153
|
+
}
|
|
154
|
+
sentTo() {
|
|
155
|
+
if (this.mode === 'same_number') {
|
|
156
|
+
return String(salla.config.get('user.mobile', '') || '');
|
|
157
|
+
}
|
|
158
|
+
return `${this.dialCode}${this.phone.phone || ''}`;
|
|
159
|
+
}
|
|
160
|
+
clarification() {
|
|
161
|
+
return this.options.includes('same_number') ? this.t('choice') : this.t('clarification');
|
|
162
|
+
}
|
|
163
|
+
body() {
|
|
164
|
+
if (this.step === 'choice') {
|
|
165
|
+
return h(Fragment, null, h("p", { class: "s-mobile-update-message" }, this.clarification()), h("salla-button", { class: "s-mobile-update-same", width: "wide", onClick: () => this.chooseMode('same_number') }, this.t('same_number')), h("salla-button", { class: "s-mobile-update-new", width: "wide", color: "light", onClick: () => this.chooseMode('new_number') }, this.t('new_number')));
|
|
166
|
+
}
|
|
167
|
+
if (this.step === 'mobile') {
|
|
168
|
+
return h(Fragment, null, h("p", { class: "s-mobile-update-message" }, this.clarification()), !this.options.includes('same_number') && h("p", { class: "s-mobile-update-blocked" }, this.t('blocked')), h("div", { class: "s-mobile-update-field" }, h("salla-tel-input", { ref: el => this.telInput = el }), this.fieldError && h("span", { class: "s-tel-input-error-msg s-mobile-update-field-error" }, this.fieldError)), h("salla-button", { class: "s-mobile-update-send", width: "wide", onClick: () => this.sendCode() }, this.t('send_code')), this.options.includes('same_number') &&
|
|
169
|
+
h("salla-button", { class: "s-mobile-update-back", width: "wide", color: "light", fill: "outline", onClick: () => {
|
|
170
|
+
if (!this.sending) {
|
|
171
|
+
this.step = 'choice';
|
|
172
|
+
this.errorMessage = '';
|
|
173
|
+
this.fieldError = '';
|
|
174
|
+
}
|
|
175
|
+
} }, this.t('back')));
|
|
176
|
+
}
|
|
177
|
+
return h(Fragment, null, h("salla-verify", { display: "inline", type: "mobile", autoReload: false, verifyHandler: this.verifyCode, resendHandler: this.resendCode, ref: el => { this.verify = el; } }, h("b", { slot: "mobile", class: "s-mobile-update-number", dir: "ltr" }, this.sentTo())), h("salla-button", { class: "s-mobile-update-change", width: "wide", color: "light", fill: "outline", onClick: () => this.changeNumber() }, this.t('back')));
|
|
178
|
+
}
|
|
179
|
+
render() {
|
|
180
|
+
return (h("salla-modal", { key: '9b414affef0063fc82fb99b0a065062aacf840be', class: "s-mobile-update-modal", width: "xs", "is-closable": true, "modal-title": this.t('title'), ref: modal => this.modal = modal, onModalVisibilityChanged: e => this.onVisibilityChanged(!!e.detail) }, h("div", { key: '2de95104b0b048b47baa4a7472cea566e4e961e4', class: "s-mobile-update-content" }, this.body(), this.errorMessage && h("span", { key: 'f8ccbd204e9dcaa31a48b2beb974a4b5d8691d53', class: "s-mobile-update-error" }, this.errorMessage))));
|
|
181
|
+
}
|
|
182
|
+
static get is() { return "salla-mobile-update-modal"; }
|
|
183
|
+
static get originalStyleUrls() {
|
|
184
|
+
return {
|
|
185
|
+
"$": ["salla-mobile-update-modal.scss"]
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
static get styleUrls() {
|
|
189
|
+
return {
|
|
190
|
+
"$": ["salla-mobile-update-modal.css"]
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
static get states() {
|
|
194
|
+
return {
|
|
195
|
+
"options": {},
|
|
196
|
+
"step": {},
|
|
197
|
+
"mode": {},
|
|
198
|
+
"errorMessage": {},
|
|
199
|
+
"fieldError": {}
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
static get methods() {
|
|
203
|
+
return {
|
|
204
|
+
"open": {
|
|
205
|
+
"complexType": {
|
|
206
|
+
"signature": "(data?: { options?: string[]; }) => Promise<void>",
|
|
207
|
+
"parameters": [{
|
|
208
|
+
"name": "data",
|
|
209
|
+
"type": "{ options?: string[]; }",
|
|
210
|
+
"docs": "`options` is the list the backend returned: `new_number`, and `same_number` for an unresolved duplicate"
|
|
211
|
+
}],
|
|
212
|
+
"references": {
|
|
213
|
+
"Promise": {
|
|
214
|
+
"location": "global",
|
|
215
|
+
"id": "global::Promise"
|
|
216
|
+
},
|
|
217
|
+
"Mode": {
|
|
218
|
+
"location": "global",
|
|
219
|
+
"id": "global::Mode"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"return": "Promise<void>"
|
|
223
|
+
},
|
|
224
|
+
"docs": {
|
|
225
|
+
"text": "Open the popup",
|
|
226
|
+
"tags": [{
|
|
227
|
+
"name": "param",
|
|
228
|
+
"text": "data `options` is the list the backend returned: `new_number`, and `same_number` for an unresolved duplicate"
|
|
229
|
+
}]
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
static get elementRef() { return "host"; }
|
|
235
|
+
}
|
|
@@ -30,7 +30,7 @@ export class SallaMultipleBundleProductCart {
|
|
|
30
30
|
return (h("div", { slot: "html", class: "s-multiple-bundle-product-cart-header-wrapper" }, h("div", { class: `s-multiple-bundle-product-cart-header ${hasOptions ? '' : 's-multiple-bundle-product-cart-header-no-options'}` }, h("div", { class: "s-multiple-bundle-product-cart-header-content" }, h("a", { href: product?.url, class: "s-multiple-bundle-product-cart-header-image-wrapper" }, h("img", { src: product?.image?.url, alt: product?.image?.alt || product?.name, class: "s-multiple-bundle-product-cart-header-image" })), h("div", { class: "s-multiple-bundle-product-cart-header-content-details" }, h("h2", { class: "s-multiple-bundle-product-cart-header-content-details-title" }, h("a", { href: product?.url, class: "s-multiple-bundle-product-cart-header-content-details-title-link" }, product?.name)), h("div", { class: "s-multiple-bundle-product-cart-header-content-details-price" }, h("span", { class: "s-multiple-bundle-product-cart-header-content-details-price-regular" }, h("span", { innerHTML: product?.price ? salla.money(product?.price) : '' })), product?.sale_price > 0 && (h("span", { class: "s-multiple-bundle-product-cart-header-content-details-price-sale" }, h("span", { innerHTML: salla.money(product?.sale_price) })))), product?.quantity_in_group > 0 && product?.quantity !== 0 && (h("p", { class: "s-multiple-bundle-product-cart-header-content-details-quantity" }, h("span", null, salla.lang.get('pages.products.number_of_pieces')), h("span", null, product?.quantity_in_group))))), !hasOptions && (h("div", { class: "s-multiple-bundle-product-cart-header-remove-button" }, this.renderRemoveButton(sectionId, product, false))))));
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
return (h(Host, { key: '
|
|
33
|
+
return (h(Host, { key: 'db441f645dc207f5864d3f4b89e67bb09ae2e622', class: "s-multiple-bundle-product-wrapper" }, h("div", { key: '68bdd0512162e73bce90d1077d0d6d7f9f8da29b', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, sectionIndex) => {
|
|
34
34
|
return section.products.map(product => {
|
|
35
35
|
const bundleContext = {
|
|
36
36
|
sectionId: section.id,
|
|
@@ -375,9 +375,9 @@ export class SallaMultipleBundleProductDetails {
|
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
render() {
|
|
378
|
-
return (h(Host, { key: '
|
|
378
|
+
return (h(Host, { key: '91b215bcdaa53e6888a07a6d3e4c3ac7c745f91e', class: "s-multiple-bundle-product-wrapper" }, h("div", { key: '152614a163c9c788e2b5bc32f9a037cba9779046', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, index) => {
|
|
379
379
|
return (h("salla-accordion", { key: section.id, collapsed: index === 0 ? false : true }, h("salla-accordion-head", null, this.renderAccordionHeader(section)), h("salla-accordion-body", null, h("salla-multiple-bundle-product-slider", { section: section, sectionIndex: index, selectedProducts: this.selectedProducts, selectionLimit: this.getEffectiveMax(section), isSelectionLocked: this.isProductSelectionLocked(section), onProductSelected: this.handleBundleSliderProductSelected, onProductOptionsSelected: this.handleBundleSliderProductOptionsSelected }))));
|
|
380
|
-
})), h("salla-multiple-bundle-product-options-modal", { key: '
|
|
380
|
+
})), h("salla-multiple-bundle-product-options-modal", { key: '2642221bd44ce9659dc90af568292587f071267c' })));
|
|
381
381
|
}
|
|
382
382
|
static get is() { return "salla-multiple-bundle-product-details"; }
|
|
383
383
|
static get originalStyleUrls() {
|
|
@@ -472,7 +472,7 @@ export class SallaMultipleBundleProductOptionsModal {
|
|
|
472
472
|
const cacheKey = this.generateCacheKey(this.sectionId, this.productIndex, productId);
|
|
473
473
|
const resetToken = this.optionsResetTokens[cacheKey] || 0;
|
|
474
474
|
const isDisabled = this.isLoading || optionsWithSelectedState.some(opt => opt.details.some(d => d.is_selected && d.is_out === true));
|
|
475
|
-
return (h(Host, { key: '
|
|
475
|
+
return (h(Host, { key: '74f5fc9c02a5ea10a9d92d2427df05210740f3e4' }, h("salla-modal", { key: 'a00db7e88d2687ef106c3c384cd94b7d7b2ed443', isLoading: this.isLoading, ref: el => (this.modal = el), width: "md", centered: false, id: `s-multiple-bundle-product-options-modal-options-${productId}`, class: "s-multiple-bundle-product-options-modal-wrapper" }, h("div", { key: '5ee1738c87ad75f7e812aefb3ea04b71f153673a', slot: "loading" }, h("salla-skeleton", { key: 'ebb0bf70a092958bd4241e4b7bc42922efed87dc', height: "100%", width: "100%" })), this.product?.images && this.product?.images.length > 0 && (h("salla-slider", { key: '871db23f2811753e3f469a8e12483f4fd3166a40', id: `details-slider-${this.product?.id}`, type: "thumbs", loop: false, "auto-height": true, "listen-to-thumbnails-option": true, showThumbsControls: false, controlsOuter: false, showControls: false, class: "s-multiple-bundle-product-options-modal-slider", verticalThumbs: true, thumbsConfig: {
|
|
476
476
|
centeredSlides: true,
|
|
477
477
|
centeredSlidesBounds: true,
|
|
478
478
|
slidesPerView: Math.min(5, Math.max(1, this.product?.images.length)),
|
|
@@ -480,13 +480,13 @@ export class SallaMultipleBundleProductOptionsModal {
|
|
|
480
480
|
watchSlidesProgress: true,
|
|
481
481
|
direction: 'vertical',
|
|
482
482
|
spaceBetween: 10,
|
|
483
|
-
} }, h("div", { key: '
|
|
483
|
+
} }, h("div", { key: 'a80a29966c883094655558cdd861938f8c2c505f', slot: "items" }, this.product?.images &&
|
|
484
484
|
this.product?.images.map((image, index) => (h("div", { key: index, class: "swiper-slide" }, h("img", { src: image.url, alt: image.alt || `${this.product?.name} - Image ${index + 1}`, loading: "lazy", onError: e => {
|
|
485
485
|
e.target.style.display = 'none';
|
|
486
|
-
} }))))), this.product?.images && this.product?.images.length > 1 && (h("div", { key: '
|
|
486
|
+
} }))))), this.product?.images && this.product?.images.length > 1 && (h("div", { key: 'bb38eec9d89c6fc1afbea740d23f21ea3b83892f', slot: "thumbs" }, this.product?.images &&
|
|
487
487
|
this.product?.images.map((image, index) => (h("div", { key: index, "data-caption": `${this.product?.name} - Image ${index + 1}` }, h("img", { src: image.url, loading: "eager", class: "s-multiple-bundle-product-options-modal-slider-thumb", title: `${this.product?.name} - ${index + 1}`, alt: image.alt || `${this.product?.name} - ${index + 1}`, onError: e => {
|
|
488
488
|
e.target.style.display = 'none';
|
|
489
|
-
} })))))))), h("salla-product-options", { options: JSON.stringify(optionsWithSelectedState), key: `${cacheKey}-reset-${resetToken}`, "product-id": productId, "unique-key": `${cacheKey}-reset-${resetToken}` }), h("div", { key: '
|
|
489
|
+
} })))))))), h("salla-product-options", { options: JSON.stringify(optionsWithSelectedState), key: `${cacheKey}-reset-${resetToken}`, "product-id": productId, "unique-key": `${cacheKey}-reset-${resetToken}` }), h("div", { key: 'b18dbbdcbb37ff8fb61ec4be551c5d07cc04286e', slot: "footer" }, h("div", { key: '1b71874c06aa379b515a1239fb9059da11e92609', class: "s-multiple-bundle-product-options-modal-footer" }, h("salla-button", { key: '83db878dffdef845db6f904c9486d5c4cd003f31', onClick: e => this.onSave(e), loading: this.isLoading, disabled: isDisabled }, this.isLoading
|
|
490
490
|
? salla.lang.get('common.elements.saving')
|
|
491
491
|
: salla.lang.get('common.elements.save')))))));
|
|
492
492
|
}
|
|
@@ -134,7 +134,7 @@ export class SallaMultipleBundleProductSlider {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
render() {
|
|
137
|
-
return (h(Host, { key: '
|
|
137
|
+
return (h(Host, { key: '17d96d9983fdb033c32d77228f52030ee408d856', class: "s-multiple-bundle-product-slider" }, h("salla-slider", { key: 'fe99a686cec9fe71728e651d1228564af1236483', type: "carousel", controlsOuter: false, showControls: false, id: `accordion-multiple-bundle-product-${this.section.id}`, pagination: true, class: "s-multiple-bundle-product-wrapper-slider", sliderConfig: { spaceBetween: 0 } }, h("div", { key: '2517a2b14ed787c32e1782fa7af04339660a0344', slot: "items" }, this?.section?.products?.map((product, productIndex) => {
|
|
138
138
|
const isChecked = this.selectedProducts[this.section.id]?.has(product.id) || false;
|
|
139
139
|
const isLocked = isChecked && this.isSelectionLocked;
|
|
140
140
|
const isDisabled = this.isProductSelectionDisabled(product, isChecked);
|
package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js
CHANGED
|
@@ -82,7 +82,7 @@ export class SallaMultipleBundleProduct {
|
|
|
82
82
|
this.parseProducts(this.bundleSections);
|
|
83
83
|
}
|
|
84
84
|
render() {
|
|
85
|
-
return (h(Host, { key: '
|
|
85
|
+
return (h(Host, { key: '6dc3144512e29cf462642af7db3d5e6c576b1a95', class: "s-multiple-bundle-product-wrapper" }, this.isCartPage() ? this.renderCartPage() : this.renderDetailsPage()));
|
|
86
86
|
}
|
|
87
87
|
static get is() { return "salla-multiple-bundle-product"; }
|
|
88
88
|
static get originalStyleUrls() {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { h } from "@stencil/core";
|
|
5
5
|
export class SallaNotificationItem {
|
|
6
6
|
render() {
|
|
7
|
-
return h("a", { key: '
|
|
7
|
+
return h("a", { key: '649f2cd499ea2a0bbfa66ed1d7f2c13b6f7b95c9', href: this.notification.url, class: { "s-notifications-item": true, "s-notifications-item-shadow": true, "s-notifications-item-read": !this.notification.is_new } }, h("span", { key: '8b1a19da2fa545d2f03f4eed655538e328567f90', class: "s-notifications-item-icon" }, h("i", { key: 'a199263421bb9f57a2665e127f46e81b49e58f22', class: { 's-notifications-item-icon sicon-bell-ring': true, 's-notifications-item-icon-new': this.notification.is_new } })), h("div", { key: 'e85d01bcd6c004f1ce7c689b11692ec4dc140da6', class: "s-notifications-item-content" }, h("div", { key: 'bc6622a17bda28c4d53f195ceaa9268da4b42a89', class: "s-notifications-item-content-leading" }, h("h4", { key: 'e5d528edd7304b61f98a4acaa92a988e86829286' }, this.notification.title), h("p", { key: 'f2497ba4b4a825811897ee688271f3324112d02b' }, this.notification.sub_title)), h("span", { key: '73d838f84b2ee69760cba02d0d0eabde24e519b5', class: "s-notifications-item-content-trailing" }, h("i", { key: 'c848ee4156630739b2e7ba2a7e3537900f5ee723', class: "sicon-time s-notifications-item-content-trailing-icon" }), h("span", { key: 'be6bd821024bb94ab0d7d5fde0b3b9d05772bd70' }, this.notification.date))));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "salla-notification-item"; }
|
|
10
10
|
static get originalStyleUrls() {
|
|
@@ -250,7 +250,7 @@ export class SallaOfferModal {
|
|
|
250
250
|
// '</div>';
|
|
251
251
|
// }
|
|
252
252
|
render() {
|
|
253
|
-
return h("salla-modal", { key: '
|
|
253
|
+
return h("salla-modal", { key: '13fb1ed1ed84c3ef9faad5fc0835fed357fc4ec3', "has-skeleton": true, "sub-title": this.offer_message, ref: modal => this.modal = modal, isLoading: true, class: `s-offer-modal-type-${this.offer_type ? this.offer_type : ''}` }, h("div", { key: '37d364587488539197cec349d189f3fd269b3cde', slot: 'loading' }, h("div", { key: 'fc4b422b907f43ba53c3a6cd96a0ca27eeac7124', class: "s-offer-modal-skeleton" }, h("div", { key: '15cba0491543e04dca01121d5c8ce530fdb0b4e7', class: "s-offer-modal-skeleton-header" }, h("salla-skeleton", { key: '56e0d722c299c64ea246e4b98c103e53f7525327', type: 'circle', height: '80px', width: '80px' }), h("salla-skeleton", { key: '8457bda654d11e9eea6ac99e5e11d81f3a58ef7f', height: '15px', width: '50%' }), h("salla-skeleton", { key: 'be8e93976308fce340a9551b0c2accbf5acf7b53', height: '10px', width: '30%' })), h("div", { key: 'c72416643dc794111a6730309303036f28abf6a8', class: "s-offer-modal-skeleton-items" }, [...Array(3)].map(() => h("div", { class: "s-offer-modal-skeleton-item" }, h("salla-skeleton", { height: '9rem' }), h("div", { class: "s-offer-modal-skeleton-item-title" }, h("salla-skeleton", { height: '15px', width: '100%' })), h("div", { class: "s-offer-modal-skeleton-item-subtitle" }, h("salla-skeleton", { height: '9px', width: '50%' }), h("div", { innerHTML: Cart2 }))))), h("div", { key: 'b852d619415d80af27082fddbb08c4705650a9b8', class: "s-offer-modal-skeleton-footer" }, h("salla-skeleton", { key: '6931be27ea963a526ab5ed518eaa3367c7664891', height: '15px', width: '50%' }), h("salla-skeleton", { key: '1c76adb679a040d52cc693ea7d3f44f43735a96f', height: '15px', width: '30%' })))), !this.hasError && this.offer !== null
|
|
254
254
|
? [h("span", { slot: 'icon', class: "s-offer-modal-header-icon", innerHTML: SpecialDiscountIcon }), this.getOfferContent(),
|
|
255
255
|
this.getOfferConditions(), h("div", { class: "s-offer-modal-footer", slot: "footer" }, this.offer.formatted_date ?
|
|
256
256
|
h("p", { class: "s-offer-modal-expiry" }, salla.lang.get('pages.products.offer_expires_in'), " ", this.offer.formatted_date)
|
|
@@ -36,7 +36,7 @@ export class SallaOrderDetails {
|
|
|
36
36
|
];
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return h(Host, { key: '
|
|
39
|
+
return h(Host, { key: 'dee58b4aee9e961e401f19024b35524874c85f6f', class: "s-order-details-wrapper" }, this.renderOrderDetailsContent());
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "salla-order-details"; }
|
|
42
42
|
static get originalStyleUrls() {
|
|
@@ -24,7 +24,7 @@ export class SallaOrderEditProductCard {
|
|
|
24
24
|
const product = this.productData;
|
|
25
25
|
const productName = product?.name || salla.lang.getWithDefault('common.elements.product', 'منتج');
|
|
26
26
|
const price = product?.price;
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: '03355186aac01cfe50e99c09e15e4a923d83e4f0' }, h("button", { key: 'a0d38460a26df69d4b358ded42b08deaf925eec3', type: "button", class: "s-order-edit-product-card", onClick: () => this.handleSelectProduct() }, h("div", { key: '05f43967adfb4ec591c15702d98f3b906983df3e', class: "s-order-edit-product-card-media" }, product?.image?.url ? (h("img", { src: product.image.url, alt: product.image.alt || productName, class: "s-order-edit-product-card-image" })) : (h("div", { class: "s-order-edit-product-card-placeholder" }, h("i", { class: "sicon-shopping-bag" })))), h("div", { key: '939f2f7912f1f9dc5cd386a4d23f2b3df80f2fc3', class: "s-order-edit-product-card-content" }, h("h3", { key: 'c8b575a83e070515f77fc3c62a4de6cfc70f6587', class: "s-order-edit-product-card-title" }, productName), price != null && (h("p", { key: 'b5691eaeccd99612866e800739ee50ea830d5529', class: "s-order-edit-product-card-price", innerHTML: salla.money(price) }))))));
|
|
28
28
|
}
|
|
29
29
|
static get is() { return "salla-order-edit-product-card"; }
|
|
30
30
|
static get originalStyleUrls() {
|
|
@@ -76,7 +76,7 @@ export class SallaOrderItems {
|
|
|
76
76
|
return (h("div", { class: "s-order-items-item" }, h("span", { class: "s-order-items-image" }, item.image ? h("img", { src: item.image, alt: item.name }) : null), h("div", { class: "s-order-items-text" }, url ? (h("a", { href: url, class: "s-order-items-name", title: item.name }, item.name)) : (h("span", { class: "s-order-items-name", title: item.name }, item.name)), price.html ? h("span", { class: "s-order-items-price", innerHTML: price.html }) : null, price.text ? h("span", { class: "s-order-items-price", innerHTML: moneyTextHtml(price.text) }) : null), item.quantity != null ? (h("span", { class: "s-order-items-qty" }, salla.helpers.number(item.quantity))) : null));
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
|
-
return (h(Host, { key: '
|
|
79
|
+
return (h(Host, { key: '0caddaf962003684a67ff5d2439dff7fa14b029b', class: "s-order-items-wrapper" }, h("div", { key: 'c4bf86751dd8f20b83d99e2f95d0a25ac5acceee', class: "s-order-items-card" }, h("button", { key: 'c10ab197715c6a5b022ace0b5c4ba06d278ebe6b', type: "button", class: "s-order-items-header", "aria-expanded": String(!this.collapsed), onClick: () => (this.collapsed = !this.collapsed) }, h("span", { key: 'f5823e5f5c9f4f5c256ff096532e179247d8478b', class: "s-order-items-summary" }, this.collapsed ? this.renderThumbs() : null, h("span", { key: 'b6c13d062907133880923c5051d33bb255a0110f', class: "s-order-items-title" }, this.collapsed ? this.collapsedText : this.cardTitle || this.collapsedText), this.collapsed && this.logo ? (h("img", { class: "s-order-items-logo", src: this.logo, alt: "" })) : null), h("span", { key: '80c62df6872eda47081b2b012ed1adfcf0fd69b4', class: "s-order-items-toggle", "aria-hidden": "true" }, h("i", { key: 'd733ae71fef343d66ebccbc8a83f332d795aed81', class: `hgi-stroke ${this.collapsed ? 'hgi-unfold-more' : 'hgi-unfold-less'}` }))), h("div", { key: 'b0fbfef920006e7908db84966eba7994a83b85ca', class: "s-order-items-list", hidden: this.collapsed }, this.list.map(item => this.renderItem(item))), h("div", { key: '48e9bf8d2317a3d36456d11ab5503bf6f0322e2a', class: "s-order-items-footer", hidden: this.collapsed }, h("slot", { key: '4d7783a95ba0e0cda4759f5e3c965257e66ef1ab', name: "footer" })))));
|
|
80
80
|
}
|
|
81
81
|
static get is() { return "salla-order-items"; }
|
|
82
82
|
static get originalStyleUrls() {
|
|
@@ -53,7 +53,7 @@ export class SallaOrderPayment {
|
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
55
|
const invoiceUrl = safeHttpUrl(this.invoiceUrl);
|
|
56
|
-
return h("section", { key: '
|
|
56
|
+
return h("section", { key: 'a11d82b09c38a1f2b8085bcd62e3ba988aff1d30', class: "s-order-payment-wrapper" }, h("dl", { key: 'fdd189e43387e43cc9a2f78416ff6c0463a0fd5c', class: "s-order-payment-list" }, h("div", { key: '27362be4b928815f2b6d2320bb9aada1344c7654', class: "s-order-payment-row" }, h("dt", { key: 'dec8b18118b8629a083720b9242d8b897f92722c' }, salla.lang.get('pages.cart.payment_way')), h("dd", { key: '85d6532a1abe13b7204e16b9e90a88d0958a7e89' }, this.paymentLogo && !this.logoFailed
|
|
57
57
|
// Whole logo, never cropped: _mini images vary (180×120 padded, 538×135, 258×258 …). The box
|
|
58
58
|
// overlaps the row gaps (-my-1.5) so the row keeps its height.
|
|
59
59
|
? h("span", { class: "s-order-payment-logo" }, h("img", { src: this.paymentLogo, alt: this.paymentMethod || '', loading: "lazy", onError: () => { this.logoFailed = true; } }))
|
|
@@ -19,7 +19,7 @@ export class SallaOrderRewards {
|
|
|
19
19
|
render() {
|
|
20
20
|
const points = Number.isFinite(this.loyaltyPoints) && this.loyaltyPoints > 0;
|
|
21
21
|
const cashback = Number.isFinite(this.cashbackAmount) && this.cashbackAmount > 0;
|
|
22
|
-
return h(Host, { key: '
|
|
22
|
+
return h(Host, { key: '9ff386306001bb290db45c48a6f944c88f707447', class: { 's-order-rewards-hidden': !points && !cashback } }, points || cashback ? h("div", { class: "s-order-rewards-wrapper" }, h("div", { class: "s-order-rewards-list" }, points ? this.card(this.loyaltyUrl, StarsIcon, `+${salla.helpers.number(this.loyaltyPoints)}`, 'pages.loyalty_program.loyalty_points') : null, cashback ? this.card(this.cashbackUrl, GiftIcon, moneyHtml(this.cashbackAmount, this.currency), 'pages.checkout.cashback', true) : null), h("hr", { class: "s-order-rewards-divider" })) : null);
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "salla-order-rewards"; }
|
|
25
25
|
static get originalStyleUrls() {
|
|
@@ -65,7 +65,7 @@ export class SallaOrderSummary {
|
|
|
65
65
|
this.copyCodeButtonTimeout && clearTimeout(this.copyCodeButtonTimeout);
|
|
66
66
|
}
|
|
67
67
|
render() {
|
|
68
|
-
return (h("ul", { key: '
|
|
68
|
+
return (h("ul", { key: 'b446c1c9c972f9e419b5d378bff85cf742e3772f', class: "s-order-summary-wrapper" }, this.noItemFound ? h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" })) :
|
|
69
69
|
this.order_items.map((item) => (this.isDigitalCard(item) ? (h("li", { key: item.product.id, class: "s-order-summary-item" }, h("h2", { class: "s-order-summary-item-title" }, this.codes_text, " (", item.name, ")"), item.codes.map((code) => (h("div", { key: code.code, class: "s-order-summary-code-item-wrapper" }, h("p", null, h("span", { innerHTML: iconCreditCard }), h("span", null, code.code)), h("salla-button", { class: `s-order-summary-item-copy-button ${this.codeCopied === code.code ? 'copied' : ''}`, onClick: () => this.copyToClipboardHandler(code.code), shape: "link" }, h("span", { innerHTML: this.codeCopied === code.code ? iconCheck : iconCopy }), h("span", null, this.copy_text))))))) :
|
|
70
70
|
this.isDigitalProduct(item) ? (h("li", { key: item.product.id, class: "s-order-summary-item" }, h("h2", { class: "s-order-summary-item-title" }, this.files_text, " (", item.name, ")"), h("ul", null, item.files.map((file) => (h("li", { class: "s-order-summary-digital-item-wrapper" }, h("div", null, h("span", { innerHTML: iconFileArchive }), h("span", null, file.name)), h("a", { href: file.url, target: "_blank", class: "s-order-summary-item-download" }, h("span", { innerHTML: iconDownload }), h("span", null, this.download_text)))))))) : null))));
|
|
71
71
|
}
|
|
@@ -42,12 +42,12 @@ export class SallaPayments {
|
|
|
42
42
|
render() {
|
|
43
43
|
const madeInKSA = !this.exclude.includes('made-in-ksa') && salla.config.get('store.settings.made_in_ksa');
|
|
44
44
|
const sbcId = this.exclude.includes('sbc') ? null : salla.config.get('store.settings.certificate.id');
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: 'eb0b16a8d95d7e82b023c852054ca16501102aba', class: "s-payments-list-wrap" }, h("ul", { key: '498d19f83e1a7e1f27f6e03b2f93d58b8889a07a', class: "s-payments-list" }, madeInKSA && h("li", { key: 'ec226e4668a634a1886caba6a0dbe62ba87a36c3', class: "s-payments-list-item" }, h("img", { key: 'a5d5716201bb62dd7de8295923a79d3a596b0a90', width: 58, height: 58, decoding: "async", loading: "lazy", src: salla.url.cdn(`images/made-in-ksa.svg`, 58, 58), alt: "made in KSA certified" })), this.payments.filter(payment => !this.exclude.includes(payment)).map((payment) => (payment == "cod" ?
|
|
46
46
|
h("div", { id: "cod-slot", innerHTML: this.codSlot
|
|
47
47
|
.replace(/\{image\}/g, this.paymentLogo(`cod`)) }) :
|
|
48
48
|
h("div", { id: "payment-slot", innerHTML: this.paymentSlot
|
|
49
49
|
.replace(/\{image\}/g, this.paymentLogo(payment))
|
|
50
|
-
.replace(/\{payment\}/g, payment) }))), sbcId && h("div", { key: '
|
|
50
|
+
.replace(/\{payment\}/g, payment) }))), sbcId && h("div", { key: 'dac8e679a47767b558a92a1832d9a849e2618ab1', id: "sbc-slot", innerHTML: this.sbcSlot
|
|
51
51
|
.replace(/\{image\}/g, salla.url.cdn(`images/sbc.png`, 58, 58))
|
|
52
52
|
.replace(/\{link\}/g, `https://eauthenticate.saudibusiness.gov.sa/certificate-details/${sbcId}`) }))));
|
|
53
53
|
}
|
|
@@ -45,7 +45,7 @@ export class SallaPlaceholder {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (h(Host, { key: '
|
|
48
|
+
return (h(Host, { key: '27a55988a5b87420723c19fd5f8831cfdae68095', class: this.alignmentClass() }, h("div", { key: '05b2b7cf16fefe961cf3db6228c943df8b3cfa33', class: `s-placeholder-icon s-placeholder-icon-${this.iconSize}`, innerHTML: this.icon }), h("div", { key: '725cb45503b0f57464d91a1f82c28d65d04dfc68', class: "s-placeholder-title" }, h("slot", { key: 'b4ffaf517b05b048aa8e0c629f2792ffa3421370', name: 'title' }, h("span", { key: 'fd8d78ea3af79c0ddbbae7c05e783f34d54952fc' }, getSdkValueOrFallback(undefined, () => salla.lang.get('common.elements.no_options'), 'No options available')))), h("div", { key: 'cfe26fdad2c6372241ef1928a0241bd74c7bec8e', class: "s-placeholder-description" }, h("slot", { key: '4cbd09630ef027012043123e27cfbb4fe9b485ef', name: 'description' }, h("span", { key: 'b4bb80713e68477af56f5ee4908a10c36151b3d5' }, getSdkValueOrFallback(undefined, () => salla.lang.get('common.errors.empty_results'), 'No results found'))))));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "salla-placeholder"; }
|
|
51
51
|
static get originalStyleUrls() {
|
|
@@ -146,7 +146,7 @@ export class SallaProductAvailability {
|
|
|
146
146
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
147
147
|
}
|
|
148
148
|
render() {
|
|
149
|
-
return (h(Host, { key: '
|
|
149
|
+
return (h(Host, { key: '8d535fe3ebb0446c6a40d6ec1edececb5b783434', class: "s-product-availability-wrap" }, this.isSubscribedToProduct
|
|
150
150
|
? h("div", { class: "s-product-availability-subscribed" }, h("span", { innerHTML: BellRingIcon, class: "s-product-availability-subs-icon" }), salla.lang.get('pages.products.notify_availability_success'))
|
|
151
151
|
:
|
|
152
152
|
h("salla-button", { width: "wide", onClick: () => this.isUser ? this.submit() : this.openModel() }, salla.lang.get('pages.products.notify_availability')), this.isUser || this.isSubscribedToProduct ? '' : this.renderModal()));
|
|
@@ -94,7 +94,7 @@ export class SallaProductCardEmbed {
|
|
|
94
94
|
's-product-card-embed-card-align-right': this.align === 'right',
|
|
95
95
|
's-product-card-embed-card-align-center': this.align === 'center',
|
|
96
96
|
};
|
|
97
|
-
return (h(Host, { key: '
|
|
97
|
+
return (h(Host, { key: 'd101dffe8024843e9a30560769da562d64099a81' }, this.hasError && h("span", { key: '26becaac97d2f2a5b27d6c2c3d7dda609d1d7013', class: "s-product-card-embed-fallback" }), h("div", { key: '339d54dba04807ff0b7aa2ad514ec6ba68200b41', class: cardClasses, ref: (el) => {
|
|
98
98
|
this.cardContainer = el;
|
|
99
99
|
} })));
|
|
100
100
|
}
|
|
@@ -52,11 +52,11 @@ export class SallaProductSizeGuide {
|
|
|
52
52
|
return h("salla-placeholder", { alignment: "center", iconSize: "xl" }, h("div", { slot: "title" }, this.placeholder_title), h("div", { slot: "description" }, this.placeholder_description));
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
-
return (h("salla-modal", { key: '
|
|
55
|
+
return (h("salla-modal", { key: '949a60f0becc6594358c20215c86564c9f96a5b2', class: "s-product-size-guide-wrapper", id: 'salla-product-size-guide-modal', isLoading: true, "has-skeleton": true, width: "md", ref: modal => this.modal = modal }, h("span", { key: 'a250df4a45be84188ce9875c969d544baee4aba8', slot: 'icon', class: "s-product-size-guide-header-icon", innerHTML: PencilRuler }), h("div", { key: '5a3e827e8223a846f7b33372c4550144802bfd5d', slot: "loading" }, h("div", { key: '77c24101a09e4ef97deed4a74e07e704300bffeb', class: "s-product-size-guide-skeleton" }, h("salla-skeleton", { key: 'a4803f830e8c682a299df76a4a16b2ad38a031d5', height: '15px', width: '25%' }), h("div", { key: 'fa7bb72254eaa88670b0625244a19e8718cdc19c', class: "s-product-size-guide-skeleton-header" }, h("salla-skeleton", { key: '90e41d1cba2dc9adc9730e9c84a0703dd222ec2c', height: '40px' }), h("salla-skeleton", { key: '09042f1818dd7bc5e03bb21adcbd7ea0a247287b', height: '40px' }), h("salla-skeleton", { key: '36e3a8804cebc939cf3e7d595f42b0ab145a8906', height: '40px' }), h("salla-skeleton", { key: 'c0517ad2fad0e2a120af65a67524e8e368bcbbbe', height: '40px' })), h("div", { key: '72277a6e5717cb6f46b7d4ca00315e3fc6323840', class: "s-product-size-guide-skeleton-content" }, h("salla-skeleton", { key: 'a8fc7c88dfba933765c59e94efd6f57975d384d3', height: '15px', width: '25%' }), h("salla-skeleton", { key: '7f551c7e5851080aad5147ad026700ade3d4f729', height: '10px', width: '75%' }), h("salla-skeleton", { key: '4690828dd0204b6682658093ddcd782b7d7808cf', height: '10px', width: '50%' }), h("salla-skeleton", { key: 'cfbc0911430d4f0f86fbd23f7a2cb795997f9ead', height: '10px', width: '75%' }), h("salla-skeleton", { key: '5dc89933c85eda48afb6d71755e5e810644b25dd', height: '10px', width: '100%' }), h("salla-skeleton", { key: 'a87d5c8c088241516fb5a1e3f09a3c2f31231fe3', height: '10px', width: '25%' }), h("salla-skeleton", { key: 'e103932b5300849c43b141d0551cb69291e7ebdd', height: '10px', width: '60%' }), h("salla-skeleton", { key: '7ebf1a7aa02eae1bca9aafd06b0b85bc8c188ef1', height: '10px', width: '45%' }), h("salla-skeleton", { key: '25e82e97bf169c5757bd02139160cf6b75efb993', height: '10px', width: '30%' })))), h("slot", { key: '36fe07ad56643fb92b517c4bf92424a893c7ba9b', name: "header" }), !this.hasError && !!this.guides ?
|
|
56
56
|
[
|
|
57
57
|
h("salla-tabs", { activeTab: this.guides[0]?.name }, this.guides.map((guide) => h("salla-tab-header", { slot: "header", name: guide.name }, h("span", null, guide.name))), this.guides.map((guide) => h("salla-tab-content", { slot: "content", name: guide.name }, h("div", { innerHTML: guide.description }))))
|
|
58
58
|
]
|
|
59
|
-
: this.showPlaceholder(), h("slot", { key: '
|
|
59
|
+
: this.showPlaceholder(), h("slot", { key: '4b6c6a747d398416f814e316fcb97db5281237a5', name: "footer" })));
|
|
60
60
|
}
|
|
61
61
|
static get is() { return "salla-product-size-guide"; }
|
|
62
62
|
static get originalStyleUrls() {
|
|
@@ -101,7 +101,7 @@ export class SallaQuantityInput {
|
|
|
101
101
|
if (!inputAttributes['aria-label'] && !inputAttributes['aria-labelledby']) {
|
|
102
102
|
inputAttributes['aria-label'] = getSdkValueOrFallback(undefined, () => salla.lang.getWithDefault('common.elements.quantity', 'Quantity'), 'Quantity');
|
|
103
103
|
}
|
|
104
|
-
return (h(Host, { key: '
|
|
104
|
+
return (h(Host, { key: '6740abf0724452cb0931889f40eb03318c04c4f2', class: "s-quantity-input" }, h("div", { key: 'fd49dd951d1ed0eed508665ef23718fef775cfa8', class: "s-quantity-input-container" }, h("button", { key: 'e8216ee643766ec8ddd7938fc5143dc76db479df', onClick: () => this.increase(), class: "s-quantity-input-increase-button s-quantity-input-button", type: "button", "aria-label": getSdkValueOrFallback(undefined, () => salla.lang.getWithDefault('common.elements.increase_quantity', 'Increase quantity'), 'Increase quantity') }, !this.hasIncrementSlot ? h("span", { innerHTML: Add }) : '', h("slot", { key: '6795b630592a04fa8edada9ff31108915cb5c6b9', name: "increment-button" })), h("input", { key: 'd43559ee2c1930664d9c813570412aec8035f4ca', class: "s-quantity-input-input", ...inputAttributes, ref: (el) => this.textInput = el, onInput: (event) => this.setValue(event.target.value), inputMode: "numeric", pattern: "[0-9]*", min: "1", readOnly: this.disableInput, value: this.quantity }), h("button", { key: 'dd9346b8c71513571a4388700d640f37266ebbd5', class: "s-quantity-input-decrease-button s-quantity-input-button", onClick: () => this.decrease(), type: "button", "aria-label": getSdkValueOrFallback(undefined, () => salla.lang.getWithDefault('common.elements.decrease_quantity', 'Decrease quantity'), 'Decrease quantity') }, !this.hasDecrementSlot ? h("span", { innerHTML: Minus }) : '', h("slot", { key: '7b905f3a8708a75b81a8478fd63c1f20744d9c87', name: "decrement-button" })))));
|
|
105
105
|
}
|
|
106
106
|
static get is() { return "salla-quantity-input"; }
|
|
107
107
|
static get originalStyleUrls() {
|