@salla.sa/twilight-components 3.0.18 → 3.0.20
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-D2VNt6eb.js → Helper-C3MBaLHQ.js} +1 -1
- package/dist/cjs/delivery-promise-intent-5WTKLkFZ.js +71 -0
- package/dist/cjs/{filepond-DkCudLhG.js → filepond-DGt10gCq.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-C-uxFWfW.js → filepond-plugin-file-poster-NSV7ClY6.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BikXTQW2.js → filepond-plugin-file-validate-size-C08-fDj7.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-Drs7PouU.js → filepond-plugin-file-validate-type-CbbTh4qd.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-hxr0h9kt.js → filepond-plugin-image-edit-CqqtsmjD.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-CVZmWU_4.js → filepond-plugin-image-exif-orientation-D60HJIiL.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CBjPKx-d.js → filepond-plugin-image-preview-B7bWOXFm.js} +1 -1
- package/dist/cjs/helpers-wRMwEkLy.js +627 -0
- package/dist/cjs/{index-CTYg2zC6.js → index-U-OadFju.js} +14 -10
- package/dist/cjs/{intlTelInput-C9X0hKXV.js → intlTelInput-Cp6WJvPO.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 +164 -7
- 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 +435 -134
- 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 +7 -2
- 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 +9 -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-BsLm8rHT.js → vanilla-picker-C-rN_NiT.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/salla-bullet-delivery/api-service.js +156 -25
- package/dist/collection/components/salla-bullet-delivery/helpers.js +166 -15
- package/dist/collection/components/salla-bullet-delivery/icons.js +17 -0
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +490 -52
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +423 -101
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +6 -1
- 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-products-list/salla-products-list.js +7 -0
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +91 -2
- 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 +322 -40
- package/dist/components/index.js +2 -2
- package/dist/components/mail.js +2 -2
- package/dist/components/salla-bullet-delivery.js +436 -129
- package/dist/components/salla-contacts.js +2 -2
- package/dist/components/salla-delivery-promise.js +1 -62
- package/dist/components/salla-login-modal2.js +6 -1
- 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-products-list2.js +7 -0
- package/dist/components/salla-quantity-input2.js +1 -1
- package/dist/components/salla-quick-buy2.js +161 -4
- 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-C1T-oD4J.js → Helper-BKruFMBN.js} +1 -1
- package/dist/esm/delivery-promise-intent-C6pZjRut.js +67 -0
- package/dist/esm/{filepond-BoWJzHeN.js → filepond-Vl6a--vT.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-B6MkMtuC.js → filepond-plugin-file-poster-CrQqmzd5.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-Dds_462B.js → filepond-plugin-file-validate-size-BrHjddJa.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DrfGXNay.js → filepond-plugin-file-validate-type-BeMZq9Fl.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-CN7eGg-7.js → filepond-plugin-image-edit-DW6JzY39.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CyhxK_6R.js → filepond-plugin-image-exif-orientation-gzIIB75B.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DdKqAzT9.js → filepond-plugin-image-preview-BwbtnJIU.js} +1 -1
- package/dist/esm/helpers-BVaKfTMx.js +591 -0
- package/dist/esm/{index-DgUQRYr2.js → index-CrXKQnBu.js} +14 -10
- package/dist/esm/{intlTelInput-SwlavcFB.js → intlTelInput-BkjSbnO6.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 +164 -7
- 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 +435 -134
- 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 +7 -2
- 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 +9 -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-Buy50D7t.js → vanilla-picker-eSagUASw.js} +1 -1
- package/dist/twilight/p-0050dd2a.entry.js +4 -0
- package/dist/twilight/{p-3d8b77f7.entry.js → p-012ff05c.entry.js} +1 -1
- package/dist/twilight/{p-08a15c81.entry.js → p-02ce2139.entry.js} +1 -1
- package/dist/twilight/{p-b0d2e31f.entry.js → p-059aa8a9.entry.js} +1 -1
- package/dist/twilight/{p-0d795b58.entry.js → p-09798a10.entry.js} +1 -1
- package/dist/twilight/p-0af7555c.entry.js +4 -0
- package/dist/twilight/{p-bed68e52.entry.js → p-11075f15.entry.js} +1 -1
- package/dist/twilight/{p-6e52b649.entry.js → p-12b2b553.entry.js} +1 -1
- package/dist/twilight/{p-8c1d14f0.entry.js → p-14fb124b.entry.js} +1 -1
- package/dist/twilight/{p-9e0a9a5a.entry.js → p-1ca3525d.entry.js} +1 -1
- package/dist/twilight/{p-7f97335a.entry.js → p-1f54638c.entry.js} +1 -1
- package/dist/twilight/{p-5694edf1.entry.js → p-201c816d.entry.js} +1 -1
- package/dist/twilight/{p-92fd20a0.entry.js → p-203b2723.entry.js} +1 -1
- package/dist/twilight/{p-1af9db24.entry.js → p-224c35e6.entry.js} +1 -1
- package/dist/twilight/{p-6dccd40f.entry.js → p-22bd8281.entry.js} +1 -1
- package/dist/twilight/{p-d4fb9921.entry.js → p-25ac8744.entry.js} +1 -1
- package/dist/twilight/{p-0ba159db.entry.js → p-25b964c0.entry.js} +1 -1
- package/dist/twilight/{p-da0df10b.entry.js → p-2a469c80.entry.js} +1 -1
- package/dist/twilight/{p-26d2b28a.entry.js → p-2a6f93a8.entry.js} +1 -1
- package/dist/twilight/{p-7fd9dc36.entry.js → p-2b0f98fc.entry.js} +1 -1
- package/dist/twilight/{p-259c995a.entry.js → p-2e66576c.entry.js} +1 -1
- package/dist/twilight/{p-be6f8551.entry.js → p-2e8e7cf2.entry.js} +1 -1
- package/dist/twilight/{p-ee479819.entry.js → p-2f05393f.entry.js} +1 -1
- package/dist/twilight/{p-1960020c.entry.js → p-3054e1c1.entry.js} +1 -1
- package/dist/twilight/{p-70dfb2b4.entry.js → p-3295390b.entry.js} +1 -1
- package/dist/twilight/{p-a95b0dc1.entry.js → p-33678067.entry.js} +1 -1
- package/dist/twilight/{p-c4cf0b4d.entry.js → p-33c05de2.entry.js} +1 -1
- package/dist/twilight/{p-d0ff9a3e.entry.js → p-381a9e70.entry.js} +1 -1
- package/dist/twilight/{p-f9e5ed10.entry.js → p-38270121.entry.js} +1 -1
- package/dist/twilight/{p-027cbda6.entry.js → p-385bf37d.entry.js} +1 -1
- package/dist/twilight/{p-d0aeeb7f.entry.js → p-40ee2ca3.entry.js} +1 -1
- package/dist/twilight/{p-cb48a5ef.entry.js → p-43a3401b.entry.js} +1 -1
- package/dist/twilight/{p-9d15f22d.entry.js → p-4616033a.entry.js} +1 -1
- package/dist/twilight/p-484af8cc.entry.js +4 -0
- package/dist/twilight/{p-516e4edc.entry.js → p-4b6627f5.entry.js} +1 -1
- package/dist/twilight/p-4ed8ae08.entry.js +4 -0
- package/dist/twilight/{p-6af8a7b6.entry.js → p-4fb442c2.entry.js} +1 -1
- package/dist/twilight/{p-4b70e6c4.entry.js → p-516f9b83.entry.js} +1 -1
- package/dist/twilight/{p-d1204965.entry.js → p-56aebb36.entry.js} +1 -1
- package/dist/twilight/{p-6b5de500.entry.js → p-56fbe5ff.entry.js} +1 -1
- package/dist/twilight/{p-66ad7a30.entry.js → p-58af47e4.entry.js} +1 -1
- package/dist/twilight/{p-3f842f32.entry.js → p-616e6781.entry.js} +1 -1
- package/dist/twilight/{p-254cff9a.entry.js → p-62077080.entry.js} +1 -1
- package/dist/twilight/p-6427664a.entry.js +4 -0
- package/dist/twilight/{p-bb8b2c85.entry.js → p-65253725.entry.js} +1 -1
- package/dist/twilight/{p-fcb1009f.entry.js → p-6a05f69c.entry.js} +1 -1
- package/dist/twilight/{p-ac736b30.entry.js → p-6afa5aa8.entry.js} +1 -1
- package/dist/twilight/{p-f7a58656.entry.js → p-6ff116eb.entry.js} +1 -1
- package/dist/twilight/{p-f9587127.entry.js → p-710b19d2.entry.js} +1 -1
- package/dist/twilight/{p-84b0e7a9.entry.js → p-71297800.entry.js} +1 -1
- package/dist/twilight/{p-53735934.entry.js → p-7234a066.entry.js} +1 -1
- package/dist/twilight/{p-b1f808f5.entry.js → p-73af6a02.entry.js} +1 -1
- package/dist/twilight/{p-4ab5ee99.entry.js → p-7428deca.entry.js} +1 -1
- package/dist/twilight/{p-b5a45f87.entry.js → p-75b509cd.entry.js} +1 -1
- package/dist/twilight/{p-071aa0e7.entry.js → p-79e446b2.entry.js} +1 -1
- package/dist/twilight/{p-eaf0c514.entry.js → p-7a8c9411.entry.js} +1 -1
- package/dist/twilight/{p-5f6fee0e.entry.js → p-86533832.entry.js} +1 -1
- package/dist/twilight/p-8a4af12c.entry.js +4 -0
- package/dist/twilight/{p-9cf1cfd4.entry.js → p-8ddf6933.entry.js} +1 -1
- package/dist/twilight/{p-7b5f97e7.entry.js → p-93fe31b9.entry.js} +1 -1
- package/dist/twilight/{p-4891c565.entry.js → p-9c96a9e7.entry.js} +1 -1
- package/dist/twilight/{p-CBLWEyM9.js → p-BNr49RmW.js} +1 -1
- package/dist/twilight/{p-DMvhNbgN.js → p-BUzdlb7Q.js} +1 -1
- package/dist/twilight/p-BVaKfTMx.js +4 -0
- package/dist/twilight/{p-BK9YeXWp.js → p-BYWjrTuB.js} +1 -1
- package/dist/twilight/{p-CCwsxMbZ.js → p-Bo_J3Do4.js} +1 -1
- package/dist/twilight/{p-CgNJWeaK.js → p-ChxhrML8.js} +1 -1
- package/dist/twilight/p-CrXKQnBu.js +5 -0
- package/dist/twilight/{p-Y2ZIN9Ok.js → p-D1oKTNWQ.js} +1 -1
- package/dist/twilight/{p-De1tLqQF.js → p-DUNRPrqt.js} +1 -1
- package/dist/twilight/{p-BxQMWsr9.js → p-DUuRpwsl.js} +1 -1
- package/dist/twilight/{p-NqQdbGu6.js → p-DZR3BP63.js} +1 -1
- package/dist/twilight/{p-12a25415.entry.js → p-a52a3664.entry.js} +1 -1
- package/dist/twilight/{p-d346dabd.entry.js → p-a7114995.entry.js} +1 -1
- package/dist/twilight/{p-8c40278d.entry.js → p-aa7494cd.entry.js} +1 -1
- package/dist/twilight/{p-34148827.entry.js → p-ae5d26da.entry.js} +1 -1
- package/dist/twilight/{p-d1121b3f.entry.js → p-b5434bcc.entry.js} +1 -1
- package/dist/twilight/p-b9fabd92.entry.js +4 -0
- package/dist/twilight/{p-bed54154.entry.js → p-bac38ed2.entry.js} +1 -1
- package/dist/twilight/{p-cdeb9bcc.entry.js → p-bbcfcdb0.entry.js} +1 -1
- package/dist/twilight/{p-f7ab5825.entry.js → p-c097cfa1.entry.js} +1 -1
- package/dist/twilight/p-c13e7efb.entry.js +4 -0
- package/dist/twilight/{p-bfd5e263.entry.js → p-d0ea4c3a.entry.js} +1 -1
- package/dist/twilight/{p-a44670a9.entry.js → p-d0ec7ca7.entry.js} +1 -1
- package/dist/twilight/{p-fddf1997.entry.js → p-d31fbdea.entry.js} +1 -1
- package/dist/twilight/{p-37192614.entry.js → p-d482d43e.entry.js} +1 -1
- package/dist/twilight/{p-b3ada3d0.entry.js → p-d5368882.entry.js} +1 -1
- package/dist/twilight/{p-4a3fa153.entry.js → p-d5a2a231.entry.js} +1 -1
- package/dist/twilight/{p-e457e68f.entry.js → p-d6705759.entry.js} +1 -1
- package/dist/twilight/p-d7f2a028.entry.js +4 -0
- package/dist/twilight/{p-0418c2df.entry.js → p-d84dedaf.entry.js} +1 -1
- package/dist/twilight/{p-419d6d71.entry.js → p-d8d9ff09.entry.js} +1 -1
- package/dist/twilight/{p-361f6033.entry.js → p-d902ad13.entry.js} +1 -1
- package/dist/twilight/{p-481f52b1.entry.js → p-d941dc58.entry.js} +1 -1
- package/dist/twilight/{p-8766e236.entry.js → p-dd046bbd.entry.js} +1 -1
- package/dist/twilight/{p-23772523.entry.js → p-dd21db09.entry.js} +1 -1
- package/dist/twilight/{p-3a632c69.entry.js → p-dd83b424.entry.js} +1 -1
- package/dist/twilight/{p-aa35cf98.entry.js → p-e04fb844.entry.js} +1 -1
- package/dist/twilight/{p-6c3084c9.entry.js → p-e60d784c.entry.js} +1 -1
- package/dist/twilight/{p-d8955835.entry.js → p-e6cc7742.entry.js} +1 -1
- package/dist/twilight/{p-5e8d019e.entry.js → p-e853ac07.entry.js} +1 -1
- package/dist/twilight/{p-0f25fedd.entry.js → p-e9ecae21.entry.js} +1 -1
- package/dist/twilight/{p-6ba3808a.entry.js → p-ebe3d316.entry.js} +1 -1
- package/dist/twilight/{p-5bbf17dd.entry.js → p-ec2a45fb.entry.js} +1 -1
- package/dist/twilight/{p-a5b732b3.entry.js → p-ef216c0a.entry.js} +1 -1
- package/dist/twilight/{p-78a56dc6.entry.js → p-f3306980.entry.js} +1 -1
- package/dist/twilight/{p-d9a1bf08.entry.js → p-f65205d5.entry.js} +1 -1
- package/dist/twilight/{p-e9b03e9c.entry.js → p-f6e5cd28.entry.js} +1 -1
- package/dist/twilight/{p-af49191f.entry.js → p-f8cfc9f7.entry.js} +1 -1
- package/dist/twilight/{p-9e65451e.entry.js → p-faa0b9aa.entry.js} +1 -1
- package/dist/twilight/{p-9e042cce.entry.js → p-fb10df18.entry.js} +1 -1
- package/dist/twilight/{p-e38a6793.entry.js → p-fcb1cff7.entry.js} +1 -1
- package/dist/twilight/{p-487b4411.entry.js → p-ff3cb99b.entry.js} +1 -1
- package/dist/twilight/{p-ee65c489.entry.js → p-ff4680ea.entry.js} +1 -1
- package/dist/twilight/p-oL7bxwey.js +9 -0
- package/dist/twilight/p-q5NJ0uS-.js +4 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/api-service.d.ts +23 -7
- package/dist/types/components/salla-bullet-delivery/helpers.d.ts +68 -6
- package/dist/types/components/salla-bullet-delivery/icons.d.ts +14 -0
- package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +40 -1
- package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +73 -4
- 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 +18 -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/cjs/helpers-8bMfm_mm.js +0 -329
- package/dist/esm/helpers-DqzaeXrL.js +0 -309
- package/dist/twilight/p-76584a5b.entry.js +0 -4
- package/dist/twilight/p-79822d99.entry.js +0 -4
- package/dist/twilight/p-Ca_SZn0u.js +0 -9
- package/dist/twilight/p-DgUQRYr2.js +0 -5
- package/dist/twilight/p-DqzaeXrL.js +0 -4
- package/dist/twilight/p-b9d67694.entry.js +0 -4
- package/dist/twilight/p-ba6dd59c.entry.js +0 -4
- package/dist/twilight/p-bac25e34.entry.js +0 -4
- package/dist/twilight/p-d1093a59.entry.js +0 -4
- package/dist/twilight/p-e24fbbb4.entry.js +0 -4
- package/dist/twilight/p-eefced26.entry.js +0 -4
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
import { i as isSallaSdkAvailable } from './ssr-helpers.js';
|
|
6
6
|
import { W as WhatsappIcon } from './whatsapp2.js';
|
|
7
|
-
import {
|
|
7
|
+
import { e as email } from './mail.js';
|
|
8
8
|
|
|
9
9
|
var mobile = `<!-- Generated by IcoMoon.io -->
|
|
10
10
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
@@ -50,7 +50,7 @@ const SallaContacts$1 = /*@__PURE__*/ proxyCustomElement(class SallaContacts ext
|
|
|
50
50
|
*/
|
|
51
51
|
this.iconsOnly = false;
|
|
52
52
|
this.sdkContacts = null;
|
|
53
|
-
this.iconsList = { mobile, whatsapp: WhatsappIcon, phone, telegram, email
|
|
53
|
+
this.iconsList = { mobile, whatsapp: WhatsappIcon, phone, telegram, email };
|
|
54
54
|
}
|
|
55
55
|
// capture the theme's slot="contact" markup once, before componentDidRender removes the slot element.
|
|
56
56
|
// componentWillLoad doesn't run again on reconnect, so the markup survives a reattach.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
|
-
import {
|
|
5
|
+
import { r as resolveIntent, b as buildBulletOpenPayload } from './delivery-promise-intent.js';
|
|
6
6
|
import { d as defineCustomElement$6 } from './salla-button2.js';
|
|
7
7
|
import { d as defineCustomElement$5 } from './salla-loading2.js';
|
|
8
8
|
import { d as defineCustomElement$4 } from './salla-modal2.js';
|
|
@@ -47,67 +47,6 @@ async function fetchDeliveryMessage(productId, id, optionType, isLoginCycleEnabl
|
|
|
47
47
|
return message || null;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/**
|
|
51
|
-
* Bullet delivery intent helpers.
|
|
52
|
-
* Reads/writes the same storage key as salla-bullet-delivery so both components stay in sync.
|
|
53
|
-
*/
|
|
54
|
-
const INTENT_KEY = 'bullet_delivery_intent';
|
|
55
|
-
function getIntentStorage() {
|
|
56
|
-
const rememberLastSession = Boolean(salla.config.get('store.settings.bullet_delivery.settings.remember_last_session'));
|
|
57
|
-
return rememberLastSession ? salla.storage.store : salla.storage.session;
|
|
58
|
-
}
|
|
59
|
-
function getStoredIntent() {
|
|
60
|
-
const raw = getIntentStorage().get(INTENT_KEY);
|
|
61
|
-
return raw && typeof raw === 'object' ? raw : null;
|
|
62
|
-
}
|
|
63
|
-
/** Resolve the stored intent into a city or branch selection. Returns null when no usable intent. */
|
|
64
|
-
function resolveIntent() {
|
|
65
|
-
const intent = getStoredIntent();
|
|
66
|
-
if (!intent)
|
|
67
|
-
return null;
|
|
68
|
-
if (intent.type === 'address') {
|
|
69
|
-
const city = intent.address_details?.city;
|
|
70
|
-
const cityId = city?.id != null ? Number(city.id) : intent.city_id != null ? Number(intent.city_id) : null;
|
|
71
|
-
const cityName = city?.name?.trim() || '';
|
|
72
|
-
if (cityId != null) {
|
|
73
|
-
return { type: 'address', option: { id: cityId, name: cityName } };
|
|
74
|
-
}
|
|
75
|
-
// Map-origin pick: no city id to query a delivery estimate by, but still show the address.
|
|
76
|
-
if (isMapOriginIntent(intent) && intent.address_details?.formatted_address) {
|
|
77
|
-
return { type: 'address', option: { name: intent.address_details.formatted_address } };
|
|
78
|
-
}
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
if (intent.type === 'branch') {
|
|
82
|
-
const branchId = intent.branch_id != null
|
|
83
|
-
? Number(intent.branch_id)
|
|
84
|
-
: intent.branch_details?.id != null
|
|
85
|
-
? Number(intent.branch_details.id)
|
|
86
|
-
: null;
|
|
87
|
-
const branchName = intent.branch_details?.name?.trim() || '';
|
|
88
|
-
if (branchId != null) {
|
|
89
|
-
return { type: 'branch', option: { id: branchId, name: branchName } };
|
|
90
|
-
}
|
|
91
|
-
return null;
|
|
92
|
-
}
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
/** Build the payload for opening the bullet delivery modal with preselection. */
|
|
96
|
-
function buildBulletOpenPayload() {
|
|
97
|
-
const intent = getStoredIntent();
|
|
98
|
-
const payload = {};
|
|
99
|
-
if (intent?.type === 'address' && intent.address_id != null) {
|
|
100
|
-
payload.preselected_address_id = Number(intent.address_id);
|
|
101
|
-
}
|
|
102
|
-
if (intent?.type === 'branch') {
|
|
103
|
-
const branchId = intent.branch_id ?? intent.branch_details?.id;
|
|
104
|
-
if (branchId != null) {
|
|
105
|
-
payload.preselected_branch_id = Number(branchId);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return payload;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
50
|
const DEFAULT_LABELS = {
|
|
112
51
|
deliveryTo: 'توصيل إلى',
|
|
113
52
|
pickupFromBranch: 'الاستلام من فرع',
|
|
@@ -351,9 +351,14 @@ const SallaLoginModal = /*@__PURE__*/ proxyCustomElement(class SallaLoginModal e
|
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
353
|
async handleGuestCheckout() {
|
|
354
|
+
// buy now resumes its own flow; emitted before closing so the dismissal doesn't race it
|
|
355
|
+
if (this.source === 'buy-now') {
|
|
356
|
+
Salla.event.emit('salla-login::guest-chosen', { source: this.source });
|
|
357
|
+
return this.modal.close();
|
|
358
|
+
}
|
|
354
359
|
this.modal.close();
|
|
355
360
|
if (salla.config.isGuest()) {
|
|
356
|
-
return salla.cart.submit(false, true);
|
|
361
|
+
return salla.cart.submit(false, true, true);
|
|
357
362
|
}
|
|
358
363
|
}
|
|
359
364
|
openModal() {
|
|
@@ -7,7 +7,7 @@ import { l as loyaltyProgramIcon } from './gift.js';
|
|
|
7
7
|
import { C as Cart2 } from './cart2.js';
|
|
8
8
|
import { S as StoreIcon } from './store.js';
|
|
9
9
|
import { T as Tag } from './tag.js';
|
|
10
|
-
import {
|
|
10
|
+
import { e as email } from './mail.js';
|
|
11
11
|
import { S as SICalendar } from './calendar.js';
|
|
12
12
|
import { I as IphoneXIcon } from './iphone-x.js';
|
|
13
13
|
import { S as SILocation } from './location.js';
|
|
@@ -80,7 +80,7 @@ const sicons = {
|
|
|
80
80
|
'CONDITION_RATING_PRODUCT': h("span", { innerHTML: SIChatConversationAlt }),
|
|
81
81
|
'CONDITION_RATING_SHIPPING_COMPANY': h("span", { innerHTML: ShippingIcon }),
|
|
82
82
|
'CONDITION_COMPLETE_PERSONAL_INFORMATION_BIRTHDAY': h("span", { innerHTML: SICalendar }),
|
|
83
|
-
'CONDITION_COMPLETE_PERSONAL_INFORMATION_EMAIL': h("span", { innerHTML:
|
|
83
|
+
'CONDITION_COMPLETE_PERSONAL_INFORMATION_EMAIL': h("span", { innerHTML: email }),
|
|
84
84
|
'CONDITION_COMPLETE_PERSONAL_INFORMATION_MOBILE': h("span", { innerHTML: IphoneXIcon }),
|
|
85
85
|
'CONDITION_COMPLETE_PERSONAL_INFORMATION_GENDER': h("span", { innerHTML: SIUser }),
|
|
86
86
|
'CONDITION_BUY_FROM_STORE_FOR_UNIT': h("span", { innerHTML: Cart2 }),
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SallaMobileUpdateModal extends Components.SallaMobileUpdateModal, HTMLElement {}
|
|
4
|
+
export const SallaMobileUpdateModal: {
|
|
5
|
+
prototype: SallaMobileUpdateModal;
|
|
6
|
+
new (): SallaMobileUpdateModal;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { proxyCustomElement, HTMLElement, h, Fragment } from '@stencil/core/internal/client';
|
|
5
|
+
import { d as defineCustomElement$6 } from './salla-button2.js';
|
|
6
|
+
import { d as defineCustomElement$5 } from './salla-loading2.js';
|
|
7
|
+
import { d as defineCustomElement$4 } from './salla-modal2.js';
|
|
8
|
+
import { d as defineCustomElement$3 } from './salla-tel-input2.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './salla-verify2.js';
|
|
10
|
+
|
|
11
|
+
const sallaMobileUpdateModalCss = "/*!twlt*/.s-mobile-update-content,.s-mobile-update-content salla-verify .s-verify-body{display:flex;flex-direction:column;gap:1rem}.s-mobile-update-message,.s-mobile-update-blocked{margin:0}.s-mobile-update-field{display:flex;flex-direction:column;gap:0.25rem}.s-mobile-update-field-error{display:block;color:#ef4444;font-size:0.875rem}.s-mobile-update-number{display:block;text-align:center}.s-mobile-update-content .s-verify-footer{display:flex;flex-direction:column;gap:1rem}.\\!visible{visibility:visible !important}.visible{visibility:visible}.inline{display:inline}.outline{outline-style:solid}";
|
|
12
|
+
|
|
13
|
+
// Fallbacks only: the texts live in `pages.mobile_update.*` of the Languages module
|
|
14
|
+
const TEXTS = {
|
|
15
|
+
title: { ar: 'تحديث رقم الجوال', en: 'Update your mobile number' },
|
|
16
|
+
clarification: {
|
|
17
|
+
ar: 'رقم الجوال مكرر مع حساب آخر يبدو أنك تملك حساباً مسبقاً بهذا الرقم! يرجى تسجيل الدخول عبر البريد الإلكتروني، أو المتابعة باستخدام رقم جوال جديد.',
|
|
18
|
+
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.',
|
|
19
|
+
},
|
|
20
|
+
choice: {
|
|
21
|
+
ar: 'هل هذا الرقم رقم جوالك؟ أكّد رقمك الحالي أو أدخل رقماً جديداً لإتمام الطلب.',
|
|
22
|
+
en: 'Is this your mobile number? Confirm your current number or enter a new one to complete the order.',
|
|
23
|
+
},
|
|
24
|
+
same_number: { ar: 'تأكيد رقمي الحالي', en: 'Confirm my current number' },
|
|
25
|
+
new_number: { ar: 'استخدام رقم جديد', en: 'Use a new number' },
|
|
26
|
+
send_code: { ar: 'إرسال رمز التحقق', en: 'Send verification code' },
|
|
27
|
+
exists: { ar: 'رقم الجوال موجود مسبقاً', en: 'Mobile number exists' },
|
|
28
|
+
blocked: { ar: 'يرجى إدخال رقم جوال جديد لإتمام الطلب', en: 'Please provide a new mobile number to complete the order' },
|
|
29
|
+
too_many: {
|
|
30
|
+
ar: 'تجاوزت عدد المحاولات المسموح بها، حاول مرة أخرى بعد 10 دقائق',
|
|
31
|
+
en: 'Too many attempts, please try again after 10 minutes',
|
|
32
|
+
},
|
|
33
|
+
back: { ar: 'رجوع', en: 'Back' },
|
|
34
|
+
};
|
|
35
|
+
const SallaMobileUpdateModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaMobileUpdateModal extends HTMLElement {
|
|
36
|
+
constructor() {
|
|
37
|
+
super();
|
|
38
|
+
this.__registerHost();
|
|
39
|
+
this.options = ['new_number'];
|
|
40
|
+
this.step = 'mobile';
|
|
41
|
+
this.mode = 'new_number';
|
|
42
|
+
this.errorMessage = '';
|
|
43
|
+
this.fieldError = '';
|
|
44
|
+
this.phone = {};
|
|
45
|
+
this.completed = false;
|
|
46
|
+
this.sending = false;
|
|
47
|
+
this.flow = 0;
|
|
48
|
+
this.dialCode = '';
|
|
49
|
+
this.verifyCode = (data) => {
|
|
50
|
+
const request = this.mode === 'same_number'
|
|
51
|
+
? salla.api.profile.requiredMobile('requiredMobileSameVerify', { code: data.code })
|
|
52
|
+
: salla.api.profile.requiredMobile('requiredMobileUpdate', { ...this.phone, code: data.code });
|
|
53
|
+
return request.then(response => {
|
|
54
|
+
this.completed = true;
|
|
55
|
+
salla.event.emit('mobile-update::updated', response);
|
|
56
|
+
this.modal.close();
|
|
57
|
+
return response;
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
this.resendCode = () => this.requestCode().catch(error => {
|
|
61
|
+
this.fail(error, salla.lang.get('common.errors.error_occurred'));
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
t(key) {
|
|
65
|
+
const text = TEXTS[key];
|
|
66
|
+
const fallback = salla.lang.locale === 'ar' ? text.ar : text.en;
|
|
67
|
+
// these two labels already exist in the Languages module, so the popup reuses them
|
|
68
|
+
const shared = { back: 'common.elements.back', send_code: 'pages.checkout.send_code' }[key];
|
|
69
|
+
return salla.lang.getWithDefault(shared || `pages.mobile_update.${key}`, fallback);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Open the popup
|
|
73
|
+
* @param data `options` is the list the backend returned: `new_number`, and `same_number` for an unresolved duplicate
|
|
74
|
+
*/
|
|
75
|
+
async open(data = {}) {
|
|
76
|
+
this.options = (data.options?.length ? data.options : ['new_number']);
|
|
77
|
+
this.completed = false;
|
|
78
|
+
this.sending = false;
|
|
79
|
+
this.flow++;
|
|
80
|
+
this.errorMessage = '';
|
|
81
|
+
this.fieldError = '';
|
|
82
|
+
this.step = this.options.includes('same_number') ? 'choice' : 'mobile';
|
|
83
|
+
this.mode = 'new_number';
|
|
84
|
+
await this.modal.open();
|
|
85
|
+
}
|
|
86
|
+
onVisibilityChanged(visible) {
|
|
87
|
+
if (!visible && !this.completed) {
|
|
88
|
+
salla.event.emit('mobile-update::dismissed');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
fail(error, fallback = '') {
|
|
92
|
+
const status = error?.response?.status;
|
|
93
|
+
const fields = error?.response?.data?.error?.fields || {};
|
|
94
|
+
const fieldMessage = [].concat(fields.phone || [])[0];
|
|
95
|
+
this.errorMessage = '';
|
|
96
|
+
this.fieldError = '';
|
|
97
|
+
if (status !== 429 && fieldMessage) {
|
|
98
|
+
this.fieldError = this.t('exists');
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
this.errorMessage = status === 429 ? this.t('too_many') : (error?.response?.data?.error?.message || fallback);
|
|
102
|
+
}
|
|
103
|
+
async sendCode() {
|
|
104
|
+
if (this.sending)
|
|
105
|
+
return;
|
|
106
|
+
this.errorMessage = '';
|
|
107
|
+
this.fieldError = '';
|
|
108
|
+
// a response that lands after the popup was closed and reopened belongs to a flow that no longer exists
|
|
109
|
+
const flow = this.flow;
|
|
110
|
+
this.sending = true;
|
|
111
|
+
try {
|
|
112
|
+
if (this.mode === 'new_number') {
|
|
113
|
+
if (!(await this.telInput.isValid()))
|
|
114
|
+
return;
|
|
115
|
+
const values = await this.telInput.getValues();
|
|
116
|
+
this.phone = { phone: values.phone, country_code: values.countryCode };
|
|
117
|
+
this.dialCode = String(values.countryKey || '');
|
|
118
|
+
}
|
|
119
|
+
await this.requestCode();
|
|
120
|
+
if (flow === this.flow)
|
|
121
|
+
this.step = 'verify';
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
if (flow === this.flow)
|
|
125
|
+
this.fail(error, salla.lang.get('common.errors.error_occurred'));
|
|
126
|
+
}
|
|
127
|
+
finally {
|
|
128
|
+
if (flow === this.flow)
|
|
129
|
+
this.sending = false;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
requestCode() {
|
|
133
|
+
return this.mode === 'same_number'
|
|
134
|
+
? salla.api.profile.requiredMobile('requiredMobileSameSend')
|
|
135
|
+
: salla.api.profile.requiredMobile('requiredMobileSend', this.phone);
|
|
136
|
+
}
|
|
137
|
+
componentDidRender() {
|
|
138
|
+
if (this.step === 'verify' && this.verify && !this.verify.dataset.opened) {
|
|
139
|
+
this.verify.dataset.opened = 'true';
|
|
140
|
+
this.verify.open({ type: 'mobile' });
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
chooseMode(mode) {
|
|
144
|
+
if (this.sending)
|
|
145
|
+
return;
|
|
146
|
+
this.mode = mode;
|
|
147
|
+
this.errorMessage = '';
|
|
148
|
+
this.fieldError = '';
|
|
149
|
+
if (mode === 'same_number') {
|
|
150
|
+
return this.sendCode();
|
|
151
|
+
}
|
|
152
|
+
this.step = 'mobile';
|
|
153
|
+
}
|
|
154
|
+
// back from the verify step to the step that chose the number, so a mistaken number can be corrected
|
|
155
|
+
changeNumber() {
|
|
156
|
+
this.step = this.mode === 'same_number' ? 'choice' : 'mobile';
|
|
157
|
+
this.errorMessage = '';
|
|
158
|
+
this.fieldError = '';
|
|
159
|
+
}
|
|
160
|
+
sentTo() {
|
|
161
|
+
if (this.mode === 'same_number') {
|
|
162
|
+
return String(salla.config.get('user.mobile', '') || '');
|
|
163
|
+
}
|
|
164
|
+
return `${this.dialCode}${this.phone.phone || ''}`;
|
|
165
|
+
}
|
|
166
|
+
clarification() {
|
|
167
|
+
return this.options.includes('same_number') ? this.t('choice') : this.t('clarification');
|
|
168
|
+
}
|
|
169
|
+
body() {
|
|
170
|
+
if (this.step === 'choice') {
|
|
171
|
+
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')));
|
|
172
|
+
}
|
|
173
|
+
if (this.step === 'mobile') {
|
|
174
|
+
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') &&
|
|
175
|
+
h("salla-button", { class: "s-mobile-update-back", width: "wide", color: "light", fill: "outline", onClick: () => {
|
|
176
|
+
if (!this.sending) {
|
|
177
|
+
this.step = 'choice';
|
|
178
|
+
this.errorMessage = '';
|
|
179
|
+
this.fieldError = '';
|
|
180
|
+
}
|
|
181
|
+
} }, this.t('back')));
|
|
182
|
+
}
|
|
183
|
+
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')));
|
|
184
|
+
}
|
|
185
|
+
render() {
|
|
186
|
+
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))));
|
|
187
|
+
}
|
|
188
|
+
get host() { return this; }
|
|
189
|
+
static get style() { return sallaMobileUpdateModalCss; }
|
|
190
|
+
}, [0, "salla-mobile-update-modal", {
|
|
191
|
+
"options": [32],
|
|
192
|
+
"step": [32],
|
|
193
|
+
"mode": [32],
|
|
194
|
+
"errorMessage": [32],
|
|
195
|
+
"fieldError": [32],
|
|
196
|
+
"open": [64]
|
|
197
|
+
}]);
|
|
198
|
+
function defineCustomElement$1() {
|
|
199
|
+
if (typeof customElements === "undefined") {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const components = ["salla-mobile-update-modal", "salla-button", "salla-loading", "salla-modal", "salla-tel-input", "salla-verify"];
|
|
203
|
+
components.forEach(tagName => { switch (tagName) {
|
|
204
|
+
case "salla-mobile-update-modal":
|
|
205
|
+
if (!customElements.get(tagName)) {
|
|
206
|
+
customElements.define(tagName, SallaMobileUpdateModal$1);
|
|
207
|
+
}
|
|
208
|
+
break;
|
|
209
|
+
case "salla-button":
|
|
210
|
+
if (!customElements.get(tagName)) {
|
|
211
|
+
defineCustomElement$6();
|
|
212
|
+
}
|
|
213
|
+
break;
|
|
214
|
+
case "salla-loading":
|
|
215
|
+
if (!customElements.get(tagName)) {
|
|
216
|
+
defineCustomElement$5();
|
|
217
|
+
}
|
|
218
|
+
break;
|
|
219
|
+
case "salla-modal":
|
|
220
|
+
if (!customElements.get(tagName)) {
|
|
221
|
+
defineCustomElement$4();
|
|
222
|
+
}
|
|
223
|
+
break;
|
|
224
|
+
case "salla-tel-input":
|
|
225
|
+
if (!customElements.get(tagName)) {
|
|
226
|
+
defineCustomElement$3();
|
|
227
|
+
}
|
|
228
|
+
break;
|
|
229
|
+
case "salla-verify":
|
|
230
|
+
if (!customElements.get(tagName)) {
|
|
231
|
+
defineCustomElement$2();
|
|
232
|
+
}
|
|
233
|
+
break;
|
|
234
|
+
} });
|
|
235
|
+
}
|
|
236
|
+
defineCustomElement$1();
|
|
237
|
+
|
|
238
|
+
const SallaMobileUpdateModal = SallaMobileUpdateModal$1;
|
|
239
|
+
const defineCustomElement = defineCustomElement$1;
|
|
240
|
+
|
|
241
|
+
export { SallaMobileUpdateModal, defineCustomElement };
|
|
@@ -51,7 +51,7 @@ const SallaMultipleBundleProductCart = /*@__PURE__*/ proxyCustomElement(class Sa
|
|
|
51
51
|
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))))));
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
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) => {
|
|
55
55
|
return section.products.map(product => {
|
|
56
56
|
const bundleContext = {
|
|
57
57
|
sectionId: section.id,
|
|
@@ -399,9 +399,9 @@ const SallaMultipleBundleProductDetails = /*@__PURE__*/ proxyCustomElement(class
|
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
render() {
|
|
402
|
-
return (h(Host, { key: '
|
|
402
|
+
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) => {
|
|
403
403
|
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 }))));
|
|
404
|
-
})), h("salla-multiple-bundle-product-options-modal", { key: '
|
|
404
|
+
})), h("salla-multiple-bundle-product-options-modal", { key: '2642221bd44ce9659dc90af568292587f071267c' })));
|
|
405
405
|
}
|
|
406
406
|
get host() { return this; }
|
|
407
407
|
static get watchers() { return {
|
|
@@ -494,7 +494,7 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
|
|
|
494
494
|
const cacheKey = this.generateCacheKey(this.sectionId, this.productIndex, productId);
|
|
495
495
|
const resetToken = this.optionsResetTokens[cacheKey] || 0;
|
|
496
496
|
const isDisabled = this.isLoading || optionsWithSelectedState.some(opt => opt.details.some(d => d.is_selected && d.is_out === true));
|
|
497
|
-
return (h(Host, { key: '
|
|
497
|
+
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: {
|
|
498
498
|
centeredSlides: true,
|
|
499
499
|
centeredSlidesBounds: true,
|
|
500
500
|
slidesPerView: Math.min(5, Math.max(1, this.product?.images.length)),
|
|
@@ -502,13 +502,13 @@ const SallaMultipleBundleProductOptionsModal = /*@__PURE__*/ proxyCustomElement(
|
|
|
502
502
|
watchSlidesProgress: true,
|
|
503
503
|
direction: 'vertical',
|
|
504
504
|
spaceBetween: 10,
|
|
505
|
-
} }, h("div", { key: '
|
|
505
|
+
} }, h("div", { key: 'a80a29966c883094655558cdd861938f8c2c505f', slot: "items" }, this.product?.images &&
|
|
506
506
|
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 => {
|
|
507
507
|
e.target.style.display = 'none';
|
|
508
|
-
} }))))), this.product?.images && this.product?.images.length > 1 && (h("div", { key: '
|
|
508
|
+
} }))))), this.product?.images && this.product?.images.length > 1 && (h("div", { key: 'bb38eec9d89c6fc1afbea740d23f21ea3b83892f', slot: "thumbs" }, this.product?.images &&
|
|
509
509
|
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 => {
|
|
510
510
|
e.target.style.display = 'none';
|
|
511
|
-
} })))))))), h("salla-product-options", { options: JSON.stringify(optionsWithSelectedState), key: `${cacheKey}-reset-${resetToken}`, "product-id": productId, "unique-key": `${cacheKey}-reset-${resetToken}` }), h("div", { key: '
|
|
511
|
+
} })))))))), 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
|
|
512
512
|
? salla.lang.get('common.elements.saving')
|
|
513
513
|
: salla.lang.get('common.elements.save')))))));
|
|
514
514
|
}
|
|
@@ -142,7 +142,7 @@ const SallaMultipleBundleProductSlider = /*@__PURE__*/ proxyCustomElement(class
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
render() {
|
|
145
|
-
return (h(Host, { key: '
|
|
145
|
+
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) => {
|
|
146
146
|
const isChecked = this.selectedProducts[this.section.id]?.has(product.id) || false;
|
|
147
147
|
const isLocked = isChecked && this.isSelectionLocked;
|
|
148
148
|
const isDisabled = this.isProductSelectionDisabled(product, isChecked);
|
|
@@ -78,7 +78,7 @@ const SallaMultipleBundleProduct$1 = /*@__PURE__*/ proxyCustomElement(class Sall
|
|
|
78
78
|
this.parseProducts(this.bundleSections);
|
|
79
79
|
}
|
|
80
80
|
render() {
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '6dc3144512e29cf462642af7db3d5e6c576b1a95', class: "s-multiple-bundle-product-wrapper" }, this.isCartPage() ? this.renderCartPage() : this.renderDetailsPage()));
|
|
82
82
|
}
|
|
83
83
|
static get watchers() { return {
|
|
84
84
|
"bundleSections": ["parseProducts"]
|
|
@@ -11,7 +11,7 @@ const SallaNotificationItem = /*@__PURE__*/ proxyCustomElement(class SallaNotifi
|
|
|
11
11
|
this.__registerHost();
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return h("a", { key: '
|
|
14
|
+
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))));
|
|
15
15
|
}
|
|
16
16
|
static get style() { return sallaNotificationsCss; }
|
|
17
17
|
}, [0, "salla-notification-item", {
|
|
@@ -273,7 +273,7 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaOfferModal
|
|
|
273
273
|
// '</div>';
|
|
274
274
|
// }
|
|
275
275
|
render() {
|
|
276
|
-
return h("salla-modal", { key: '
|
|
276
|
+
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
|
|
277
277
|
? [h("span", { slot: 'icon', class: "s-offer-modal-header-icon", innerHTML: SpecialDiscountIcon }), this.getOfferContent(),
|
|
278
278
|
this.getOfferConditions(), h("div", { class: "s-offer-modal-footer", slot: "footer" }, this.offer.formatted_date ?
|
|
279
279
|
h("p", { class: "s-offer-modal-expiry" }, salla.lang.get('pages.products.offer_expires_in'), " ", this.offer.formatted_date)
|
|
@@ -48,7 +48,7 @@ const SallaOrderDetails$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderDet
|
|
|
48
48
|
];
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
return h(Host, { key: '
|
|
51
|
+
return h(Host, { key: 'dee58b4aee9e961e401f19024b35524874c85f6f', class: "s-order-details-wrapper" }, this.renderOrderDetailsContent());
|
|
52
52
|
}
|
|
53
53
|
static get watchers() { return {
|
|
54
54
|
"orderDetails": ["parseOrderDetailsData"]
|
|
@@ -32,7 +32,7 @@ const SallaOrderEditProductCard$1 = /*@__PURE__*/ proxyCustomElement(class Salla
|
|
|
32
32
|
const product = this.productData;
|
|
33
33
|
const productName = product?.name || salla.lang.getWithDefault('common.elements.product', 'منتج');
|
|
34
34
|
const price = product?.price;
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
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) }))))));
|
|
36
36
|
}
|
|
37
37
|
static get style() { return sallaOrderEditProductCardCss; }
|
|
38
38
|
}, [0, "salla-order-edit-product-card", {
|
|
@@ -75,7 +75,7 @@ const SallaOrderItems = /*@__PURE__*/ proxyCustomElement(class SallaOrderItems e
|
|
|
75
75
|
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));
|
|
76
76
|
}
|
|
77
77
|
render() {
|
|
78
|
-
return (h(Host, { key: '
|
|
78
|
+
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" })))));
|
|
79
79
|
}
|
|
80
80
|
static get watchers() { return {
|
|
81
81
|
"items": ["parseItems"]
|
|
@@ -63,7 +63,7 @@ const SallaOrderPayment$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderPay
|
|
|
63
63
|
}
|
|
64
64
|
render() {
|
|
65
65
|
const invoiceUrl = safeHttpUrl(this.invoiceUrl);
|
|
66
|
-
return h("section", { key: '
|
|
66
|
+
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
|
|
67
67
|
// Whole logo, never cropped: _mini images vary (180×120 padded, 538×135, 258×258 …). The box
|
|
68
68
|
// overlaps the row gaps (-my-1.5) so the row keeps its height.
|
|
69
69
|
? h("span", { class: "s-order-payment-logo" }, h("img", { src: this.paymentLogo, alt: this.paymentMethod || '', loading: "lazy", onError: () => { this.logoFailed = true; } }))
|
|
@@ -25,7 +25,7 @@ const SallaOrderRewards$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderRew
|
|
|
25
25
|
render() {
|
|
26
26
|
const points = Number.isFinite(this.loyaltyPoints) && this.loyaltyPoints > 0;
|
|
27
27
|
const cashback = Number.isFinite(this.cashbackAmount) && this.cashbackAmount > 0;
|
|
28
|
-
return h(Host, { key: '
|
|
28
|
+
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, loyaltyProgramIcon, moneyHtml(this.cashbackAmount, this.currency), 'pages.checkout.cashback', true) : null), h("hr", { class: "s-order-rewards-divider" })) : null);
|
|
29
29
|
}
|
|
30
30
|
static get style() { return sallaOrderRewardsCss; }
|
|
31
31
|
}, [0, "salla-order-rewards", {
|
|
@@ -96,7 +96,7 @@ const SallaOrderSummary$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderSum
|
|
|
96
96
|
this.copyCodeButtonTimeout && clearTimeout(this.copyCodeButtonTimeout);
|
|
97
97
|
}
|
|
98
98
|
render() {
|
|
99
|
-
return (h("ul", { key: '
|
|
99
|
+
return (h("ul", { key: 'b446c1c9c972f9e419b5d378bff85cf742e3772f', class: "s-order-summary-wrapper" }, this.noItemFound ? h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" })) :
|
|
100
100
|
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 ? SuccessIcon : iconCopy }), h("span", null, this.copy_text))))))) :
|
|
101
101
|
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))));
|
|
102
102
|
}
|
|
@@ -42,12 +42,12 @@ const SallaPayments$1 = /*@__PURE__*/ proxyCustomElement(class SallaPayments ext
|
|
|
42
42
|
render() {
|
|
43
43
|
const madeInKSA = !this.exclude.includes('made-in-ksa') && salla.config.get('store.settings.made_in_ksa');
|
|
44
44
|
const sbcId = this.exclude.includes('sbc') ? null : salla.config.get('store.settings.certificate.id');
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: '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
|
}
|