@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, Build, h } from '@stencil/core/internal/client';
|
|
5
5
|
import { f as facebook, t as twitter } from './facebook.js';
|
|
6
|
-
import {
|
|
6
|
+
import { e as email } from './mail.js';
|
|
7
7
|
import { C as Cancel } from './cancel.js';
|
|
8
8
|
import { d as defineCustomElement$1 } from './salla-button2.js';
|
|
9
9
|
|
|
@@ -76,7 +76,7 @@ const SallaSocialShare = /*@__PURE__*/ proxyCustomElement(class SallaSocialShare
|
|
|
76
76
|
name: Socials.FACEBOOK,
|
|
77
77
|
},
|
|
78
78
|
{ icon: twitter, name: Socials.TWITTER },
|
|
79
|
-
{ icon:
|
|
79
|
+
{ icon: email, name: Socials.EMAIL },
|
|
80
80
|
{
|
|
81
81
|
icon: copy_link,
|
|
82
82
|
name: Socials.COPY_LINK,
|
|
@@ -370,7 +370,7 @@ const SallaSocialShare = /*@__PURE__*/ proxyCustomElement(class SallaSocialShare
|
|
|
370
370
|
case Socials.TWITTER:
|
|
371
371
|
return { icon: twitter, color: '#000000', label: salla.lang.get('common.social.twitter') };
|
|
372
372
|
case Socials.EMAIL:
|
|
373
|
-
return { icon:
|
|
373
|
+
return { icon: email, color: '#2BA6FF', label: salla.lang.get('common.social.email') };
|
|
374
374
|
default:
|
|
375
375
|
return { icon: copy_link, color: '#6b7280', label: platform };
|
|
376
376
|
}
|
|
@@ -410,7 +410,7 @@ const SallaSocialShare = /*@__PURE__*/ proxyCustomElement(class SallaSocialShare
|
|
|
410
410
|
})));
|
|
411
411
|
}
|
|
412
412
|
render() {
|
|
413
|
-
return (h("div", { key: '
|
|
413
|
+
return (h("div", { key: '6947ccab470304eb0d483fd4b7ca9cc2554bbb71', class: "s-social-share-wrapper" }, h("slot", { key: 'b286eaf408c6b424f2a6b54b8ca7556b8af7af8c', name: "widget" }, h("salla-button", { key: '45e580eb0c93990ece828470a0d3eb8bb76303db', "aria-label": "Share", onClick: () => this.handleShareClick(), class: "s-social-share-btn", shape: "icon", fill: "outline", color: "light" }, h("span", { key: '770d272c4132f0106e70f0ef765417ba4ac0b9f8', innerHTML: this.opened ? Cancel : ShareAlt }))), this.mode === 'modal' ? this.renderModal() : this.renderPopupList()));
|
|
414
414
|
}
|
|
415
415
|
get host() { return this; }
|
|
416
416
|
static get watchers() { return {
|
|
@@ -61,7 +61,7 @@ const SallaSocial$1 = /*@__PURE__*/ proxyCustomElement(class SallaSocial extends
|
|
|
61
61
|
}
|
|
62
62
|
render() {
|
|
63
63
|
const linksArray = this.getLinksArray();
|
|
64
|
-
return (h(Host, { key: '
|
|
64
|
+
return (h(Host, { key: '29f04bfaf306c249ce6da993bad695b009e2c9e9' }, h("ul", { key: 'ed987f835308d337e3e58accccc159d97d822fe8', class: "s-social-list" }, linksArray.map((link) => (h("li", { class: "s-social-link" }, h("div", { id: "social-slot", innerHTML: this.socialSlot
|
|
65
65
|
.replace(/\{icon\}/g, this.iconsList[link.type])
|
|
66
66
|
.replace(/\{type\}/g, link.type)
|
|
67
67
|
.replace(/\{link\}/g, link.value.toString()) })))))));
|
|
@@ -38,7 +38,7 @@ const SallaTabContent = /*@__PURE__*/ proxyCustomElement(class SallaTabContent e
|
|
|
38
38
|
's-tabs-content': true,
|
|
39
39
|
's-tabs-content-selected': this.isSelected
|
|
40
40
|
};
|
|
41
|
-
return (h("div", { key: '
|
|
41
|
+
return (h("div", { key: 'e5da5a9d996bbb72e1603f88053d140138d08b38', class: classes }, h("slot", { key: '830ad13557951a06486f3d1155f7d2ec475fc243' })));
|
|
42
42
|
}
|
|
43
43
|
get host() { return this; }
|
|
44
44
|
static get style() { return sallaTabContentCss; }
|
|
@@ -58,7 +58,7 @@ const SallaTabHeader = /*@__PURE__*/ proxyCustomElement(class SallaTabHeader ext
|
|
|
58
58
|
's-tabs-active': this.isSelected,
|
|
59
59
|
};
|
|
60
60
|
return [
|
|
61
|
-
h("div", { key: '
|
|
61
|
+
h("div", { key: 'dbcd51f0c181991c1ea52ce4d2b8f364c4f77832', class: classes, onClick: this.onClick.bind(this) }, h("slot", { key: '382fc1cb4bece683fcbc67db46f51f5b0900e328' })),
|
|
62
62
|
];
|
|
63
63
|
}
|
|
64
64
|
static get style() { return sallaTabHeaderCss; }
|
|
@@ -60,7 +60,7 @@ const SallaTabs = /*@__PURE__*/ proxyCustomElement(class SallaTabs extends HTMLE
|
|
|
60
60
|
render() {
|
|
61
61
|
const headerStyle = this.backgroundColor ? { 'background-color': this.backgroundColor } : {};
|
|
62
62
|
return [
|
|
63
|
-
h("div", { key: '
|
|
63
|
+
h("div", { key: 'e9e0030c417a98d19fdcf04ab290e6c77743fa68', class: "s-tabs" }, h("div", { key: 'b79d94a3744ba6d6b5c6e2948a2be057f9d5555c', class: "s-tabs-header", style: headerStyle }, h("slot", { key: '1136f96eeb12125185685a336be660eec5591daa', name: "header" })), h("div", { key: 'ac3ea577952031a2f366172ab27bc08c19f706f4', class: "s-tabs-content-wrapper" }, h("slot", { key: '48486dad9ae07f6a0dacab3c70c9c3df4eb66dcd', name: "content" })))
|
|
64
64
|
];
|
|
65
65
|
}
|
|
66
66
|
get host() { return this; }
|
|
@@ -149,7 +149,7 @@ const SallaTelInput = /*@__PURE__*/ proxyCustomElement(class SallaTelInput exten
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
render() {
|
|
152
|
-
return (h(Host, { key: '
|
|
152
|
+
return (h(Host, { key: '1ac7260480017f583ad9a85e3184e91aed10c44f', class: "s-tel-input" }, h("input", { key: 'b67e55b6cc4154d4743dee20be5d9fb5b000e698', type: "tel", disabled: this.disabled, name: this.name, value: this.phone, onChange: (event) => this.handleCountryInput(event), ref: el => this.phoneInput = el, enterkeyhint: "next", autocomplete: "tel", class: "s-tel-input-control tel-input s-ltr" }), h("span", { key: '2533925768fe0265fbea2552540734d5cac0b9aa', class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), h("input", { key: '0bb28963824dbc6e12ececc76f9e756e1a0e150e', type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })));
|
|
153
153
|
}
|
|
154
154
|
componentDidLoad() {
|
|
155
155
|
this.initPromise = this.initTelInput();
|
|
@@ -56,7 +56,7 @@ const SallaThankYouHeader$1 = /*@__PURE__*/ proxyCustomElement(class SallaThankY
|
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
58
|
const date = this.dateLabel();
|
|
59
|
-
return h("header", { key: '
|
|
59
|
+
return h("header", { key: '059ca864ef1b2688f3919e0d1afe312a6a26304b', class: "s-thank-you-header-wrapper" }, h("div", { key: '7db61c7e59b0c648a863c8f273733a351d7ae7f6', class: "s-thank-you-header-intro" }, h("span", { key: 'fd6898fd919eb23123f0922504cd7fa27fd6d7cf', class: "s-thank-you-header-success" }, h("span", { key: 'f3e543dd2cdb8fd6ec766decf8733053f64a85b4', class: "s-thank-you-header-success-icon", "aria-hidden": "true", innerHTML: SuccessIcon }), h("span", { key: 'fe155c56cfa5b8c96f9ec0ab0212d0ecaa9b78e8', class: "s-thank-you-header-store" }, this.storeLogo ? h("img", { src: this.storeLogo, alt: this.storeName || '' }) : h("span", { "aria-hidden": "true", innerHTML: StoreIcon }))), h("div", { key: '98df6b364ae471bc6d293b2bc2ef550f93ab1ded', class: "s-thank-you-header-copy" }, h("h1", { key: 'e0150e20cf220cb60612745341e0a243f5155f6a', "data-testid": "store-thankyou-header-show-title", class: "s-thank-you-header-title" }, this.heading), h("p", { key: 'd4b592a4517434d7d21c24884bebc7a5d99128ab', class: "s-thank-you-header-subtitle" }, this.subtitle || salla.lang.get('pages.thank_you.order_received')))), h("hr", { key: '98dcc158ecd2af0c6081959299164e4a004255ca', class: "s-thank-you-header-divider" }), h("div", { key: '1b40af524a983485f718aab6f52a13da56c11f69', class: "s-thank-you-header-meta" }, this.referenceId ? h("button", { type: "button", class: "s-thank-you-header-reference", "data-testid": "store-thankyou-header-copy-reference", "aria-label": `${salla.lang.get('common.elements.copy')} ${this.referenceId}`, onClick: () => this.copyReference() }, h("span", { "aria-hidden": "true", innerHTML: OrderIcon }), h("span", { dir: "ltr" }, "#", this.referenceId), h("span", { "aria-hidden": "true", innerHTML: CopyIcon })) : null, date ? h("span", { class: "s-thank-you-header-date" }, h("span", { "aria-hidden": "true", innerHTML: TimeIcon }), h("time", { dateTime: this.createdAt }, date)) : null), h("slot", { key: '1ec96de5ef0c5c44dc80742277ad6b4ee83354da' }));
|
|
60
60
|
}
|
|
61
61
|
static get style() { return sallaThankYouHeaderCss; }
|
|
62
62
|
}, [4, "salla-thank-you-header", {
|
|
@@ -11,7 +11,7 @@ const SallaThankYouPage$1 = /*@__PURE__*/ proxyCustomElement(class SallaThankYou
|
|
|
11
11
|
this.__registerHost();
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return h(Host, { key: '
|
|
14
|
+
return h(Host, { key: '605e01d9b7299b700f24339f20995bd83e8add0c', class: "s-thank-you-page-wrapper" }, h("slot", { key: 'e1c24571fe73dda85f4f8bd8f2aa206a40bf7aa2', name: "main" }), h("slot", { key: 'd198960d04ce37f98476d9538da54d377edb84ae' }));
|
|
15
15
|
}
|
|
16
16
|
static get style() { return sallaThankYouPageCss; }
|
|
17
17
|
}, [4, "salla-thank-you-page"]);
|
|
@@ -32,7 +32,7 @@ const SallaTooltip = /*@__PURE__*/ proxyCustomElement(class SallaTooltip extends
|
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
34
|
const validTheme = ['default', 'dark'].includes(this.theme) ? this.theme : 'default';
|
|
35
|
-
return (h("div", { key: '
|
|
35
|
+
return (h("div", { key: 'e78c348a4fdc3eae7b719a8c8f1f115d521a1965', class: "s-tooltip-container" }, h("div", { key: 'dc2137a53c1f5b2075d8a96d13c16ad216ca9b37', class: `s-tooltip-item s-tooltip-item--${validTheme}`, style: { display: this.show ? 'block' : 'none' } }, this.text ? h("span", null, this.text) : h("slot", null))));
|
|
36
36
|
}
|
|
37
37
|
get el() { return this; }
|
|
38
38
|
static get style() { return sallaTooltipCss; }
|
|
@@ -586,7 +586,7 @@ const SallaUserSettings$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserSett
|
|
|
586
586
|
return (h("salla-button", { fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeleteModal() }, this.capitalizeText(this.deleteAccount)));
|
|
587
587
|
}
|
|
588
588
|
render() {
|
|
589
|
-
return (h(Host, { key: '
|
|
589
|
+
return (h(Host, { key: 'a5329b99eb9ae0d351d3732a8bd73cb5a0e3bf0e', class: "s-user-settings-wrapper" }, this.canHideName && (h("div", { key: 'fa451ecdfcc4797eb5a844a6b6ba57456887bc65', class: "s-user-settings-section" }, h("salla-list-tile", { key: 'efe0e7fbf16ce4c23f9fefd7d96e77b86c17407d' }, h("div", { key: '6749a02ca8b2fe06bf604aa7e6343c2f6a933db9', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '3fac5e8f843a6d7a82355e742801701daa839b37', innerHTML: UserCancel })), h("div", { key: '9902df824f1c959e5e78448019bb0019139181e3', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), h("div", { key: 'a2d6b461b818fb5c88831fc3515c62fbb27a3604', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), h("div", { key: '14dfc10aeb8f3ae132bd6a884f6f0909b3ee0071', slot: "action", class: "s-user-settings-section-action" }, h("label", { key: 'd224bf45f7b946f37460478e49019d38fbe5f4f9', class: "s-toggle" }, h("input", { key: 'f6b97efb600c39f0e66eaac8538a7e076cba851e', class: "s-toggle-input", checked: this.isHiddenName, onChange: e => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), h("div", { key: 'e6c00fa21b86e168a4a6c236cc20035ca3310c7e', class: "s-toggle-switcher" })))))), h("div", { key: '5452089f49aa35bdf5ee2f8cd39dbfc7bf5b83d3', class: "s-user-settings-section" }, h("salla-list-tile", { key: '95a23fe5cbb2e5481137bdad8a424430922110af' }, h("div", { key: 'ae6f7395a3beb1a46339acb225fbf8ae86086f1a', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '4f09f13877d1c9c405163bc7035196ce4e7ab574', innerHTML: Bullhorn })), h("div", { key: '77e038e9ede04ebceb33dc5732552bfb872ff07f', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), h("div", { key: 'c1332d656e6c898b09d63b8985ab2b32f92029f1', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), h("div", { key: '236c6622e61210bdcad47582e4626fbf7a4f77d3', slot: "action", class: "s-user-settings-section-action" }, h("label", { key: 'be37b0ea5465911064146779025fd5e353a6f556', class: "s-toggle" }, h("input", { key: 'fea0f0478c959bc94f91bc302618eb2e30047927', class: "s-toggle-input", checked: this.isNotifiable, onChange: e => this.toggleSetting('is_notifiable', e), type: "checkbox" }), h("div", { key: '1420206f5679e67ce1fd908ae8e9179eaae1dc77', class: "s-toggle-switcher" }))))), this.isDeleteAccountEnabled ? (h("div", { class: "s-user-settings-section s-user-settings-section-delete-user" }, h("salla-list-tile", null, h("div", { slot: "icon", class: "s-user-settings-section-icon" }, this.renderUserDeleteIcon()), h("div", { slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deleteAccount)), h("div", { slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.isDeletePending ? this.deleteAccountPending : this.deleteAccountDesc)), h("div", { slot: "action", class: "s-user-settings-section-action" }, this.renderDeleteSectionAction())))) : (h("div", { class: "s-user-settings-section s-user-settings-section-deactivate-user" }, h("salla-list-tile", null, h("div", { slot: "icon", class: "s-user-settings-section-icon" }, h("span", { innerHTML: UserOff })), h("div", { slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deactivateAccount)), h("div", { slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.deactivateDesc)), h("div", { slot: "action", class: "s-user-settings-section-action" }, h("salla-button", { fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeactivateModal() }, this.capitalizeText(this.deactivateAccount)))))), this.isDeleteAccountEnabled ? (h("salla-modal", { id: "salla-user-settings-delete-modal", width: "xs", centered: true, showBack: this.currentStep === 'otp', isClosable: this.currentStep !== 'success', iconStyle: this.currentStep === 'success' ? 'success' : undefined, onModalVisibilityChanged: e => this.handleModalVisibilityChanged(e), onModalBack: () => this.goBackFromOtp(), ref: modal => (this.confirmationModal = modal) }, this.currentStep !== 'success' ? (h("span", { slot: "icon", class: "s-user-settings-delete-icon" }, this.renderUserDeleteIcon())) : null, h("div", { key: this.currentStep, class: "s-user-settings-delete-step" }, this.renderDeleteStep()))) : (h("salla-modal", { width: "sm", subTitle: this.capitalizeText(this.sorryForLeavingText), ref: modal => (this.confirmationModal = modal) }, h("span", { slot: "icon", class: "s-user-settings-confirmation-icon", innerHTML: UserOff }), h("div", { class: "s-user-settings-confirmation" }, h("div", { class: "s-user-settings-confirmation-warning" }, this.capitalizeText(this.warningText)), h("div", { class: "s-user-settings-confirmation-actions" }, h("salla-button", { width: "wide", onClick: () => this.confirmationModal.close() }, this.capitalizeText(this.keepAccount)), h("salla-button", { fill: "outline", loading: this.buttonLoading, width: "wide", onClick: () => this.confirmDeactivateAccount() }, this.capitalizeText(this.deactivateAccount))))))));
|
|
590
590
|
}
|
|
591
591
|
static get style() { return sallaUserSettingsCss; }
|
|
592
592
|
}, [0, "salla-user-settings", {
|
|
@@ -1,327 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import { M as MailIcon } from './mail.js';
|
|
6
|
-
import { d as defineCustomElement$4 } from './salla-button2.js';
|
|
7
|
-
import { d as defineCustomElement$3 } from './salla-loading2.js';
|
|
8
|
-
import { d as defineCustomElement$2 } from './salla-modal2.js';
|
|
9
|
-
|
|
10
|
-
var AndroidPhoneIcon = `<!-- Generated by IcoMoon.io -->
|
|
11
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
12
|
-
<title>android-phone</title>
|
|
13
|
-
<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>
|
|
14
|
-
</svg>
|
|
15
|
-
`;
|
|
16
|
-
|
|
17
|
-
const sallaVerifyCss = "/*!twlt*/salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}.visible{visibility:visible}.block{display:block}.inline{display:inline}.hidden{display:none}.s-has-error{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.s-has-error:focus{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.btn{display:inline-flex;flex:1 1 0%;align-items:center;justify-content:center;white-space:nowrap;border-radius:0.375rem;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.btn:hover{opacity:0.8}.has-error .s-form-label{color:#ff443a}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-has-error{--tw-border-opacity:1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1)) !important;--tw-text-opacity:1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1)) !important}.s-verify-message{text-align:center;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-verify-label{margin-bottom:1rem;display:block;text-align:center;font-size:0.875rem;line-height:1.25rem}.s-verify-codes{margin-left:-0.25rem;margin-right:-0.25rem;margin-bottom:1.25rem;display:flex;justify-content:space-between}.s-verify-codes.has-error{margin-bottom:0px}.s-verify-input{margin-left:0.25rem;margin-right:0.25rem;height:2.5rem;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding-left:0.5rem;padding-right:0.5rem;text-align:center;font-size:1.125rem;line-height:1.75rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-verify-input:focus{border-color:var(--color-primary)}.s-verify-input:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.s-verify-footer{text-align:center}.s-verify-submit{margin-bottom:1.25rem;width:100%}.s-verify-header-icon{display:inline-flex;height:3rem;width:3rem;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}@media (min-width: 640px){.s-verify-header-icon{margin-left:auto;margin-right:auto;margin-bottom:1rem;height:5rem;width:5rem}}.s-verify-header-icon:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-right:0.5rem}@media (min-width: 640px){.s-verify-header-icon:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-right:0px}}.s-verify-header-icon:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-left:0.5rem}@media (min-width: 640px){.s-verify-header-icon:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-left:0px}}.s-verify-resend-message{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-verify-error-message{margin-bottom:1.25rem;display:block;height:1.75rem;padding-top:0.75rem;text-align:center;font-size:0.75rem;line-height:1rem;--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.s-verify-error-message:focus{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.s-verify-error-message{--tw-border-opacity:1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1)) !important;--tw-text-opacity:1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1)) !important}.s-verify-timer{margin-left:0.25rem;margin-right:0.25rem;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-verify-resend{text-align:center;font-size:0.875rem;line-height:1.25rem;color:var(--color-primary)}.s-verify-back{position:absolute;left:10px;top:10px;display:flex;height:2rem;width:2rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));font-size:1.125rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-verify-back:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-verify-back:where([dir=\"rtl\"],[dir=\"rtl\"] *){left:unset;right:10px}.s-verify-back svg{height:18px;width:18px}[dir='ltr'] .s-verify-back{transform:scale(-1)}";
|
|
18
|
-
|
|
19
|
-
const SallaVerify$1 = /*@__PURE__*/ proxyCustomElement(class SallaVerify extends HTMLElement {
|
|
20
|
-
constructor() {
|
|
21
|
-
super();
|
|
22
|
-
this.__registerHost();
|
|
23
|
-
this.verified = createEvent(this, "verified", 7);
|
|
24
|
-
this.translationLoaded = false;
|
|
25
|
-
/**
|
|
26
|
-
* Should render component without modal
|
|
27
|
-
*/
|
|
28
|
-
this.display = 'modal';
|
|
29
|
-
/**
|
|
30
|
-
* Verifying method
|
|
31
|
-
*/
|
|
32
|
-
this.type = 'mobile';
|
|
33
|
-
/**
|
|
34
|
-
* should auto reloading the page after success verification
|
|
35
|
-
*/
|
|
36
|
-
this.autoReload = true;
|
|
37
|
-
/**
|
|
38
|
-
* Once the api verify success, it will be login the customer in web pages
|
|
39
|
-
*/
|
|
40
|
-
this.supportWebAuth = true;
|
|
41
|
-
this.resendAfter = 30;
|
|
42
|
-
/**
|
|
43
|
-
* to use: `salla.api.auth.verify` or `salla.profile.verify`
|
|
44
|
-
*/
|
|
45
|
-
this.isProfileVerify = false;
|
|
46
|
-
if (this.display == 'inline') {
|
|
47
|
-
this.modal = { open: () => '', close: () => '', setTitle: () => '' };
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
//todo:: change this way, now we fire the event from the backend, we should listen to salla.profile.event.onUpdated
|
|
51
|
-
this.profileVerificationListener = data => {
|
|
52
|
-
let payload = Array.isArray(data) ? data[0] : data;
|
|
53
|
-
// Account-deletion OTP is owned by <salla-user-settings>; opening this modal
|
|
54
|
-
// (and auto-reloading) would break that flow. Prefer payload.request_type when
|
|
55
|
-
// present; fall back to the delete modal being open.
|
|
56
|
-
const isDeleteRequest = payload?.request_type === 'delete_account'
|
|
57
|
-
|| document.getElementById('salla-user-settings-delete-modal')?.hasAttribute('visible');
|
|
58
|
-
if (isDeleteRequest) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
this.isProfileVerify = true;
|
|
62
|
-
this.open(payload);
|
|
63
|
-
this.title = salla.lang.get('pages.profile.verify_title') + salla.lang.get('common.elements.' + payload.type);
|
|
64
|
-
this.modal?.setTitle(this.title);
|
|
65
|
-
};
|
|
66
|
-
this.modalClosedListener = () => {
|
|
67
|
-
this.resendAfter = 0;
|
|
68
|
-
this.timer.innerHTML = '30 : 00';
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
connectedCallback() {
|
|
72
|
-
if (this.profileVerificationListener) {
|
|
73
|
-
salla.event.on('profile::verification', this.profileVerificationListener);
|
|
74
|
-
salla.event.on('modalClosed', this.modalClosedListener);
|
|
75
|
-
}
|
|
76
|
-
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
77
|
-
this.translationLoaded = true;
|
|
78
|
-
this.title = salla.lang.get('pages.profile.verify_title') + salla.lang.get('common.elements.' + this.type);
|
|
79
|
-
this.modal?.setTitle(this.title);
|
|
80
|
-
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
81
|
-
forceUpdate(this);
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
disconnectedCallback() {
|
|
85
|
-
if (this.profileVerificationListener) {
|
|
86
|
-
salla.event.off('profile::verification', this.profileVerificationListener);
|
|
87
|
-
salla.event.off('modalClosed', this.modalClosedListener);
|
|
88
|
-
}
|
|
89
|
-
this.langUnsubscribe?.();
|
|
90
|
-
}
|
|
91
|
-
splitNumber(e) {
|
|
92
|
-
this.resetError();
|
|
93
|
-
let data = e.data || e.target.value; // Chrome doesn't get the e.data, it's always empty, fallback to value then.
|
|
94
|
-
if (!data)
|
|
95
|
-
return; // Shouldn't happen, just in case.
|
|
96
|
-
if (data.length === 1)
|
|
97
|
-
return; // Here is a normal behavior, not a paste action.
|
|
98
|
-
this.modifyNext(e.target, data);
|
|
99
|
-
}
|
|
100
|
-
modifyNext(el, data) {
|
|
101
|
-
el.value = data[0]; // Apply first item to first input
|
|
102
|
-
data = data.substring(1); // remove the first char.
|
|
103
|
-
if (el.nextElementSibling && data.length) {
|
|
104
|
-
// Do the same with the next element and next data
|
|
105
|
-
this.modifyNext(el.nextElementSibling, data);
|
|
106
|
-
}
|
|
107
|
-
else if (!el.nextElementSibling && data.length === 0) {
|
|
108
|
-
el.focus();
|
|
109
|
-
}
|
|
110
|
-
else if (el.nextElementSibling && data.length === 0) {
|
|
111
|
-
el.nextElementSibling.focus();
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
checkAllInputs() {
|
|
115
|
-
let allFilled = true;
|
|
116
|
-
for (let i = 0; i < this.otpInputs.length; i++) {
|
|
117
|
-
if (this.otpInputs[i].value === '') {
|
|
118
|
-
allFilled = false;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return allFilled;
|
|
122
|
-
}
|
|
123
|
-
handleKeyUp(ev) {
|
|
124
|
-
this.resetError();
|
|
125
|
-
if (['Alt', 'Shift', 'Control', 'AltGraph', 'Ctrl'].includes(ev.key)) {
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
let key = ev.keyCode || ev.charCode;
|
|
129
|
-
if (ev.target.value) {
|
|
130
|
-
ev.target.nextElementSibling?.focus();
|
|
131
|
-
ev.target.nextElementSibling?.select();
|
|
132
|
-
}
|
|
133
|
-
else if ([8, 46].includes(key)) {
|
|
134
|
-
ev.target.previousElementSibling?.focus();
|
|
135
|
-
ev.target.previousElementSibling?.select();
|
|
136
|
-
}
|
|
137
|
-
// If the target is populated to quickly, value length can be > 1
|
|
138
|
-
if (ev.target.value.length > 1) {
|
|
139
|
-
this.splitNumber(ev);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
handlePaste(ev) {
|
|
143
|
-
this.resetError();
|
|
144
|
-
const clipboardText = salla.helpers.number(ev.clipboardData.getData('text')) || '';
|
|
145
|
-
let text = clipboardText.replace(/[^0-9]/g, '');
|
|
146
|
-
text = text.substring(0, this.otpInputs.length);
|
|
147
|
-
this.otpInputs.forEach(input => input.value = '');
|
|
148
|
-
this.modifyNext(this.otpInputs[0], text);
|
|
149
|
-
}
|
|
150
|
-
handleInput(ev) {
|
|
151
|
-
this.resetError();
|
|
152
|
-
salla.helpers.inputDigitsOnly(ev.target);
|
|
153
|
-
// check if all otpInputs has values then send the request
|
|
154
|
-
if (this.checkAllInputs()) {
|
|
155
|
-
setTimeout(() => {
|
|
156
|
-
this.toggleOTPSubmit();
|
|
157
|
-
}, 100);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
resetError() {
|
|
161
|
-
this.hasError = false;
|
|
162
|
-
this.errorMessage = '';
|
|
163
|
-
}
|
|
164
|
-
handleFocus(ev) {
|
|
165
|
-
// If the focus element is the first one, do nothing
|
|
166
|
-
if (ev.target === this.firstOtpInput)
|
|
167
|
-
return;
|
|
168
|
-
// If value of input 1 is empty, focus it.
|
|
169
|
-
if (this.firstOtpInput?.value == '') {
|
|
170
|
-
this.firstOtpInput.focus();
|
|
171
|
-
}
|
|
172
|
-
// If value of a previous input is empty, focus it.
|
|
173
|
-
// To remove if you don't wanna force user respecting the fields order.
|
|
174
|
-
if (ev.target.previousElementSibling.value == '') {
|
|
175
|
-
ev.target.previousElementSibling.focus();
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Get current code
|
|
180
|
-
* @return {string}
|
|
181
|
-
*/
|
|
182
|
-
async getCode() {
|
|
183
|
-
return this.code.value;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Open verifying modal
|
|
187
|
-
* @param data
|
|
188
|
-
*/
|
|
189
|
-
async open(data) {
|
|
190
|
-
this.data = data;
|
|
191
|
-
this.data.type = this.data.type || this.type;
|
|
192
|
-
this.type = this.data.type;
|
|
193
|
-
this.resendTimer();
|
|
194
|
-
this.otpInputs = this.body.querySelectorAll('.s-verify-input');
|
|
195
|
-
this.firstOtpInput = this.body.querySelector('#otp-1');
|
|
196
|
-
this.reset();
|
|
197
|
-
this.resetError();
|
|
198
|
-
this.display == 'modal' && this.modal?.setTitle(this.title);
|
|
199
|
-
this.modal.open();
|
|
200
|
-
this.firstOtpInput?.addEventListener('input', e => this.splitNumber(e));
|
|
201
|
-
// focus the first input after opening the modal
|
|
202
|
-
setTimeout(() => this.otpInputs[0].focus(), 100);
|
|
203
|
-
}
|
|
204
|
-
toggleOTPSubmit() {
|
|
205
|
-
let otp = [];
|
|
206
|
-
this.otpInputs.forEach(input => input.value && otp.push(input.value));
|
|
207
|
-
this.code.value = otp.join('');
|
|
208
|
-
if (otp.length === 4) {
|
|
209
|
-
this.btn.disable();
|
|
210
|
-
this.btn.click();
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
this.btn.enable();
|
|
214
|
-
}
|
|
215
|
-
reset() {
|
|
216
|
-
this.otpInputs.forEach((input) => input.value = '');
|
|
217
|
-
this.code.value = '';
|
|
218
|
-
this.otpInputs[0].focus();
|
|
219
|
-
}
|
|
220
|
-
resendTimer() {
|
|
221
|
-
this.resendMessage.style.display = 'block';
|
|
222
|
-
this.resend.style.display = 'none';
|
|
223
|
-
this.resendAfter = 30;
|
|
224
|
-
let timerId = setInterval(() => {
|
|
225
|
-
if (this.resendAfter <= 0) {
|
|
226
|
-
clearInterval(timerId);
|
|
227
|
-
this.resend.style.display = 'block';
|
|
228
|
-
this.resendMessage.style.display = 'none';
|
|
229
|
-
}
|
|
230
|
-
else {
|
|
231
|
-
this.timer.innerHTML = `${this.resendAfter >= 10 ? this.resendAfter : '0' + this.resendAfter} : 00`;
|
|
232
|
-
this.resendAfter--;
|
|
233
|
-
}
|
|
234
|
-
}, 1000);
|
|
235
|
-
}
|
|
236
|
-
resendCode() {
|
|
237
|
-
return this.btn.stop()
|
|
238
|
-
.then(() => this.btn.disable())
|
|
239
|
-
.then(() => {
|
|
240
|
-
this.otpInputs.forEach(input => input.value = '');
|
|
241
|
-
this.otpInputs[0].focus();
|
|
242
|
-
})
|
|
243
|
-
.then(() => salla.api.auth.resend(this.data))
|
|
244
|
-
.finally(() => this.resendTimer());
|
|
245
|
-
}
|
|
246
|
-
submit() {
|
|
247
|
-
//if code not 4 digits, focus on the after filled input,
|
|
248
|
-
if (this.code.value.length < 4) {
|
|
249
|
-
this.otpInputs[this.code.value.length].focus();
|
|
250
|
-
salla.log('Trying to submit without 4 digits!');
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
let data = { code: this.code.value, ...this.data };
|
|
254
|
-
return this.btn.load()
|
|
255
|
-
.then(() => this.btn.disable())
|
|
256
|
-
.then(() => this.isProfileVerify ? salla.profile.verify(data) : salla.auth.verify(data, this.supportWebAuth))
|
|
257
|
-
.then(response => this.verified.emit(response))
|
|
258
|
-
.then(() => this.btn.stop() && this.btn.disable())
|
|
259
|
-
.then(() => this.modal.close())
|
|
260
|
-
.then(() => this.autoReload && window.location.reload())
|
|
261
|
-
.catch((error) => {
|
|
262
|
-
this.hasError = true;
|
|
263
|
-
this.errorMessage = error.response?.data?.error?.message || salla.lang.get('common.errors.error_occurred');
|
|
264
|
-
if (!error.response) {
|
|
265
|
-
console.log('Unexpected error', error);
|
|
266
|
-
}
|
|
267
|
-
else {
|
|
268
|
-
salla.logger.error(error);
|
|
269
|
-
}
|
|
270
|
-
this.btn.stop() && this.btn.enable() && this.reset();
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
render() {
|
|
274
|
-
return this.display == 'inline' ? h(Host, null, this.myBody()) :
|
|
275
|
-
h("salla-modal", { width: "xs", class: "s-verify", ref: modal => this.modal = modal, "modal-title": this.title }, h("span", { slot: 'icon', class: "s-verify-header-icon", innerHTML: this.type == "mobile" ? AndroidPhoneIcon : MailIcon }), this.myBody());
|
|
276
|
-
}
|
|
277
|
-
myBody() {
|
|
278
|
-
return (h("div", { class: "s-verify-body", ref: body => this.body = body }, h("div", { class: "s-verify-message", innerHTML: salla.lang.get('pages.profile.verify_message') }), h("slot", { name: "mobile" }), h("slot", { name: "email" }), h("input", { type: "hidden", name: "code", maxlength: "4", required: true, ref: code => this.code = code }), h("div", { class: { "s-verify-codes": true, "has-error": this.hasError }, dir: "ltr" }, [1, 2, 3, 4].map((i) => h("input", { type: "number", autocomplete: "one-time-code", pattern: "[0-9]*", inputmode: "numeric", maxlength: "1", value: "", id: `otp-${i}`, class: { "s-verify-input": true, "s-has-error": this.hasError }, onInput: e => this.handleInput(e), onPaste: e => this.handlePaste(e), onKeyUp: e => this.handleKeyUp(e), onFocus: e => this.handleFocus(e), required: true }))), this.hasError && this.errorMessage ? h("span", { class: "s-verify-error-message" }, this.errorMessage) : '', h("div", { slot: "footer", class: "s-verify-footer" }, h("salla-button", { class: "s-verify-submit", "loader-position": 'center', disabled: true, onClick: () => this.submit(), ref: b => this.btn = b }, salla.lang.get('pages.profile.verify')), h("p", { class: "s-verify-resend-message", ref: el => this.resendMessage = el }, salla.lang.get('blocks.header.resend_after'), h("b", { class: "s-verify-timer", ref: el => this.timer = el })), h("a", { href: "#", class: "s-verify-resend", onClick: () => this.resendCode(), ref: el => this.resend = el }, salla.lang.get('blocks.comments.submit'))), h("slot", { name: "after-footer" })));
|
|
279
|
-
}
|
|
280
|
-
get host() { return this; }
|
|
281
|
-
static get style() { return sallaVerifyCss; }
|
|
282
|
-
}, [4, "salla-verify", {
|
|
283
|
-
"display": [1],
|
|
284
|
-
"type": [1025],
|
|
285
|
-
"autoReload": [4, "auto-reload"],
|
|
286
|
-
"supportWebAuth": [4, "support-web-auth"],
|
|
287
|
-
"translationLoaded": [32],
|
|
288
|
-
"title": [32],
|
|
289
|
-
"resendAfter": [32],
|
|
290
|
-
"hasError": [32],
|
|
291
|
-
"errorMessage": [32],
|
|
292
|
-
"isProfileVerify": [32],
|
|
293
|
-
"getCode": [64],
|
|
294
|
-
"open": [64]
|
|
295
|
-
}]);
|
|
296
|
-
function defineCustomElement$1() {
|
|
297
|
-
if (typeof customElements === "undefined") {
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
const components = ["salla-verify", "salla-button", "salla-loading", "salla-modal"];
|
|
301
|
-
components.forEach(tagName => { switch (tagName) {
|
|
302
|
-
case "salla-verify":
|
|
303
|
-
if (!customElements.get(tagName)) {
|
|
304
|
-
customElements.define(tagName, SallaVerify$1);
|
|
305
|
-
}
|
|
306
|
-
break;
|
|
307
|
-
case "salla-button":
|
|
308
|
-
if (!customElements.get(tagName)) {
|
|
309
|
-
defineCustomElement$4();
|
|
310
|
-
}
|
|
311
|
-
break;
|
|
312
|
-
case "salla-loading":
|
|
313
|
-
if (!customElements.get(tagName)) {
|
|
314
|
-
defineCustomElement$3();
|
|
315
|
-
}
|
|
316
|
-
break;
|
|
317
|
-
case "salla-modal":
|
|
318
|
-
if (!customElements.get(tagName)) {
|
|
319
|
-
defineCustomElement$2();
|
|
320
|
-
}
|
|
321
|
-
break;
|
|
322
|
-
} });
|
|
323
|
-
}
|
|
324
|
-
defineCustomElement$1();
|
|
4
|
+
import { S as SallaVerify$1, d as defineCustomElement$1 } from './salla-verify2.js';
|
|
325
5
|
|
|
326
6
|
const SallaVerify = SallaVerify$1;
|
|
327
7
|
const defineCustomElement = defineCustomElement$1;
|