@salla.sa/twilight-components 2.14.521 → 2.14.522
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/arrow-right-Cd6JoegH.js +13 -0
- package/dist/cjs/{filepond-BxIqz4X5.js → filepond-RbRMljF_.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-CgcL8KEM.js → filepond-plugin-file-poster-uIFauwzO.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-CE5D63gi.js → filepond-plugin-file-validate-size-Cd_r4359.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-CTZlbHeg.js → filepond-plugin-file-validate-type-C5tN0mCB.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DwwaA0xD.js → filepond-plugin-image-edit-Bj-vUOxV.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-Ds2jzd-0.js → filepond-plugin-image-exif-orientation-DR6IE-Yk.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-zMIkW3BA.js → filepond-plugin-image-preview-HghuKrCb.js} +1 -1
- package/dist/cjs/{functions-kxrglIIV.js → functions-C0u_gA0Z.js} +1 -1
- package/dist/cjs/{index-D9nhi8-6.js → index-BJw_NdHc.js} +10 -10
- package/dist/cjs/{index-BqVQnSPs.js → index-DZPED3mu.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 +18 -3
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
- 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-apps-icons.cjs.entry.js +1 -1
- 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-booking-field_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
- 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_8.cjs.entry.js +1 -1
- 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_2.cjs.entry.js +12 -7
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-exchange-product-card_5.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
- 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_2.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-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +3 -9
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.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 +471 -34
- package/dist/cjs/salla-verify.cjs.entry.js +9 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
- package/dist/cjs/{tracked-promise-I3cWE57r.js → tracked-promise-84l9D1pi.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-BN2v2WSB.js → vanilla-picker-C9ruFpIn.js} +1 -1
- package/dist/collection/components/salla-modal/salla-modal.css +12 -0
- package/dist/collection/components/salla-modal/salla-modal.js +50 -1
- package/dist/collection/components/salla-order-options-modal/salla-order-options-modal.js +11 -6
- package/dist/collection/components/salla-user-settings/salla-user-settings.css +137 -0
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +497 -32
- package/dist/collection/components/salla-verify/salla-verify.js +8 -0
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
- package/dist/components/arrow-right.js +11 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-login-modal2.js +7 -1
- package/dist/components/salla-loyalty-point2.js +8 -2
- package/dist/components/salla-modal2.js +25 -3
- package/dist/components/salla-order-options-modal2.js +11 -6
- package/dist/components/salla-price-range2.js +1 -7
- package/dist/components/salla-product-size-guide.js +7 -1
- package/dist/components/salla-user-menu.js +7 -1
- package/dist/components/salla-user-settings.js +498 -39
- package/dist/components/salla-verify.js +8 -0
- package/dist/components/salla-wishlist-actions.js +1 -1
- package/dist/esm/arrow-right-B9q7ymSg.js +11 -0
- package/dist/esm/{filepond-DiqSFaKJ.js → filepond-DTXpxLd9.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CIhvZWr3.js → filepond-plugin-file-poster-QykV8B8G.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-Dh-rJsdI.js → filepond-plugin-file-validate-size-Bj5ENC6_.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-I9XENo4v.js → filepond-plugin-file-validate-type-8CnQZmpk.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-D7HhgEBr.js → filepond-plugin-image-edit-JxnSBv4V.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CJ6QNX7n.js → filepond-plugin-image-exif-orientation-P7dHkas0.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-ChlwE2Wy.js → filepond-plugin-image-preview-B6byQaCY.js} +1 -1
- package/dist/esm/{functions-DG90cyVT.js → functions-B-HhhobN.js} +1 -1
- package/dist/esm/{index-CceR4m1x.js → index-BszjiU3B.js} +1 -1
- package/dist/esm/{index-BmH_SCLp.js → index-CJNSdTHZ.js} +10 -10
- 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 +18 -3
- package/dist/esm/salla-add-product-button_5.entry.js +1 -1
- 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-apps-icons.entry.js +1 -1
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +10 -10
- package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
- 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_8.entry.js +1 -1
- 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_2.entry.js +12 -7
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner.entry.js +2 -2
- package/dist/esm/salla-loyalty-exchange-product-card_5.entry.js +3 -3
- package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
- package/dist/esm/salla-loyalty-panel.entry.js +3 -3
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +3 -3
- package/dist/esm/salla-loyalty-reward.entry.js +2 -2
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_2.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-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +2 -8
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/salla-product-card_2.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.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 +471 -34
- package/dist/esm/salla-verify.entry.js +9 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +2 -2
- package/dist/esm/{tracked-promise-Ci6ut_FU.js → tracked-promise-BfoqsGRk.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-vyxTZ0dX.js → vanilla-picker-BhDt66Uk.js} +1 -1
- package/dist/twilight/{p-b74d7a0c.entry.js → p-0645933f.entry.js} +1 -1
- package/dist/twilight/{p-050f0c6a.entry.js → p-0a1e4dbe.entry.js} +1 -1
- package/dist/twilight/{p-4afedde2.entry.js → p-0c879092.entry.js} +1 -1
- package/dist/twilight/{p-3JgvsDKa.js → p-13LBJtjX.js} +2 -2
- package/dist/twilight/{p-da16958f.entry.js → p-16cf7eaf.entry.js} +1 -1
- package/dist/twilight/{p-4dcb3f48.entry.js → p-186221a2.entry.js} +1 -1
- package/dist/twilight/{p-781d048b.entry.js → p-1eb3897d.entry.js} +1 -1
- package/dist/twilight/{p-0c59cc4f.entry.js → p-211f9589.entry.js} +1 -1
- package/dist/twilight/{p-a54f3e4d.entry.js → p-22424405.entry.js} +1 -1
- package/dist/twilight/{p-2e23d889.entry.js → p-22da1d18.entry.js} +1 -1
- package/dist/twilight/{p-0331b059.entry.js → p-247e6bc1.entry.js} +1 -1
- package/dist/twilight/{p-ae2071d6.entry.js → p-26d4a829.entry.js} +1 -1
- package/dist/twilight/{p-5659163f.entry.js → p-2b411871.entry.js} +1 -1
- package/dist/twilight/{p-772b2587.entry.js → p-2bd6a7ad.entry.js} +1 -1
- package/dist/twilight/{p-dbd42678.entry.js → p-2c9d2ea4.entry.js} +1 -1
- package/dist/twilight/{p-b41da249.entry.js → p-30638d38.entry.js} +1 -1
- package/dist/twilight/{p-2199c255.entry.js → p-33a93add.entry.js} +1 -1
- package/dist/twilight/{p-4b425007.entry.js → p-34968257.entry.js} +1 -1
- package/dist/twilight/{p-c8fa6a7e.entry.js → p-376ca265.entry.js} +1 -1
- package/dist/twilight/{p-5b98f12c.entry.js → p-379956ef.entry.js} +1 -1
- package/dist/twilight/{p-6481d82b.entry.js → p-3b227e0d.entry.js} +1 -1
- package/dist/twilight/{p-aa3de1af.entry.js → p-3cdf1264.entry.js} +1 -1
- package/dist/twilight/{p-7054391f.entry.js → p-3d9d15b0.entry.js} +1 -1
- package/dist/twilight/{p-e9fb7554.entry.js → p-3de8587f.entry.js} +1 -1
- package/dist/twilight/{p-cdd9e371.entry.js → p-3e88938d.entry.js} +1 -1
- package/dist/twilight/{p-88137e81.entry.js → p-40cd342c.entry.js} +1 -1
- package/dist/twilight/{p-25a5a6e1.entry.js → p-42686603.entry.js} +1 -1
- package/dist/twilight/{p-ff2cf3a4.entry.js → p-43437311.entry.js} +1 -1
- package/dist/twilight/{p-097f2555.entry.js → p-46d4d4f1.entry.js} +1 -1
- package/dist/twilight/{p-7dd7b06b.entry.js → p-4947d2c3.entry.js} +1 -1
- package/dist/twilight/{p-5245c9fb.entry.js → p-4d67b437.entry.js} +1 -1
- package/dist/twilight/{p-0043e129.entry.js → p-53e8d007.entry.js} +1 -1
- package/dist/twilight/{p-1fa3928c.entry.js → p-56851c9a.entry.js} +1 -1
- package/dist/twilight/{p-f8b734e1.entry.js → p-58969bd2.entry.js} +1 -1
- package/dist/twilight/{p-eb06c23f.entry.js → p-58a2b477.entry.js} +1 -1
- package/dist/twilight/p-59500502.entry.js +4 -0
- package/dist/twilight/{p-e258f515.entry.js → p-597243e9.entry.js} +1 -1
- package/dist/twilight/{p-28f8858c.entry.js → p-5c7d194c.entry.js} +1 -1
- package/dist/twilight/{p-2cb0a5c2.entry.js → p-5c923f3e.entry.js} +1 -1
- package/dist/twilight/{p-42ab7e46.entry.js → p-5ce7a5f4.entry.js} +1 -1
- package/dist/twilight/{p-314e1a7e.entry.js → p-610cf53f.entry.js} +1 -1
- package/dist/twilight/{p-fbbf8d50.entry.js → p-6246f251.entry.js} +1 -1
- package/dist/twilight/{p-919d1d2f.entry.js → p-63e4468c.entry.js} +1 -1
- package/dist/twilight/{p-9338485b.entry.js → p-69791429.entry.js} +1 -1
- package/dist/twilight/{p-a025825a.entry.js → p-72302934.entry.js} +1 -1
- package/dist/twilight/{p-1afaa214.entry.js → p-74000383.entry.js} +1 -1
- package/dist/twilight/{p-9c738246.entry.js → p-75ca0611.entry.js} +1 -1
- package/dist/twilight/p-75cd81c8.entry.js +4 -0
- package/dist/twilight/{p-54b18586.entry.js → p-782376aa.entry.js} +1 -1
- package/dist/twilight/{p-93b9c55e.entry.js → p-78b64ecf.entry.js} +1 -1
- package/dist/twilight/{p-5a17a1ea.entry.js → p-7ad821d8.entry.js} +1 -1
- package/dist/twilight/{p-3b927d75.entry.js → p-7c9cee72.entry.js} +1 -1
- package/dist/twilight/{p-ad95d915.entry.js → p-8416f053.entry.js} +1 -1
- package/dist/twilight/{p-0bc95bea.entry.js → p-8641e913.entry.js} +1 -1
- package/dist/twilight/{p-bd5baa3a.entry.js → p-87b03980.entry.js} +1 -1
- package/dist/twilight/{p-9e73018d.entry.js → p-87b8805f.entry.js} +1 -1
- package/dist/twilight/{p-22b1d1b5.entry.js → p-88b5f845.entry.js} +1 -1
- package/dist/twilight/{p-c32a7b18.entry.js → p-8d1a1d2f.entry.js} +1 -1
- package/dist/twilight/{p-d4b5c142.entry.js → p-8d8ce19f.entry.js} +1 -1
- package/dist/twilight/{p-8bc95f60.entry.js → p-8e17a662.entry.js} +1 -1
- package/dist/twilight/{p-8dd3312e.entry.js → p-926861b0.entry.js} +1 -1
- package/dist/twilight/{p-29d997c7.entry.js → p-9da90445.entry.js} +1 -1
- package/dist/twilight/{p-D5XsQ4D9.js → p-B5LlhDea.js} +1 -1
- package/dist/twilight/p-B9q7ymSg.js +4 -0
- package/dist/twilight/{p-5h7fTMtR.js → p-BNxL6rtA.js} +1 -1
- package/dist/twilight/{p-Jgd9UbQM.js → p-BQ7LZ-gv.js} +1 -1
- package/dist/twilight/{p-BmH_SCLp.js → p-CJNSdTHZ.js} +1 -1
- package/dist/twilight/{p-1HIaZAiz.js → p-CKo8lUax.js} +1 -1
- package/dist/twilight/{p-CyJQdnNc.js → p-CdiD-2Z3.js} +1 -1
- package/dist/twilight/{p-BFMG8k2g.js → p-ClsWSoli.js} +1 -1
- package/dist/twilight/{p-DcFiC1dv.js → p-D4LxjuhN.js} +1 -1
- package/dist/twilight/{p-Duga6KlO.js → p-DD48ApDW.js} +2 -2
- package/dist/twilight/{p-CVQzCtED.js → p-DNerctfJ.js} +1 -1
- package/dist/twilight/{p-DNxVGDCc.js → p-DsEuHqot.js} +1 -1
- package/dist/twilight/{p-86509218.entry.js → p-a241a76f.entry.js} +1 -1
- package/dist/twilight/{p-719d5824.entry.js → p-a3a666c9.entry.js} +1 -1
- package/dist/twilight/{p-f639f01e.entry.js → p-a59e6aa6.entry.js} +1 -1
- package/dist/twilight/{p-edc7d892.entry.js → p-ab7940b0.entry.js} +1 -1
- package/dist/twilight/{p-f6644651.entry.js → p-ac63d3c2.entry.js} +1 -1
- package/dist/twilight/{p-9eb20b1e.entry.js → p-ad96b0eb.entry.js} +1 -1
- package/dist/twilight/{p-c8e712e4.entry.js → p-b1ecd1bb.entry.js} +1 -1
- package/dist/twilight/{p-c337127b.entry.js → p-b30b0488.entry.js} +1 -1
- package/dist/twilight/{p-c9e00ab5.entry.js → p-b5b0ca7c.entry.js} +1 -1
- package/dist/twilight/{p-849c72c4.entry.js → p-b8815e28.entry.js} +1 -1
- package/dist/twilight/p-b8cfcf08.entry.js +4 -0
- package/dist/twilight/{p-9fbf4a49.entry.js → p-b8d5d785.entry.js} +1 -1
- package/dist/twilight/{p-3977e18c.entry.js → p-bae0376c.entry.js} +1 -1
- package/dist/twilight/{p-6304507a.entry.js → p-bb7f8555.entry.js} +1 -1
- package/dist/twilight/{p-f7e468c7.entry.js → p-bfe4961c.entry.js} +1 -1
- package/dist/twilight/{p-2bdf089c.entry.js → p-c6b90867.entry.js} +1 -1
- package/dist/twilight/{p-761f03b0.entry.js → p-c8632eac.entry.js} +1 -1
- package/dist/twilight/{p-00a79225.entry.js → p-cd5d24ce.entry.js} +1 -1
- package/dist/twilight/{p-22b5b7c5.entry.js → p-cdf7bbdf.entry.js} +1 -1
- package/dist/twilight/{p-8ee28c75.entry.js → p-cf07ebbf.entry.js} +1 -1
- package/dist/twilight/{p-2235f1f2.entry.js → p-d016060c.entry.js} +1 -1
- package/dist/twilight/{p-258ddfbb.entry.js → p-d51142bc.entry.js} +1 -1
- package/dist/twilight/p-d8bf2907.entry.js +4 -0
- package/dist/twilight/{p-456c03b1.entry.js → p-d9739d37.entry.js} +1 -1
- package/dist/twilight/{p-4db788b8.entry.js → p-dfc15c20.entry.js} +1 -1
- package/dist/twilight/p-e81e649c.entry.js +4 -0
- package/dist/twilight/{p-9329c9ae.entry.js → p-e85b1ffb.entry.js} +1 -1
- package/dist/twilight/{p-3aa708ac.entry.js → p-e98fb647.entry.js} +1 -1
- package/dist/twilight/{p-5327d518.entry.js → p-eaa6a288.entry.js} +1 -1
- package/dist/twilight/{p-3b4f6d09.entry.js → p-f2437a5e.entry.js} +1 -1
- package/dist/twilight/{p-a6f1ab9d.entry.js → p-f3d815f9.entry.js} +1 -1
- package/dist/twilight/{p-169ccb83.entry.js → p-f7ca9b12.entry.js} +1 -1
- package/dist/twilight/{p-5aa54ac9.entry.js → p-fa0363af.entry.js} +1 -1
- package/dist/twilight/{p-7d6d2166.entry.js → p-fa560d9b.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-modal/salla-modal.d.ts +10 -0
- package/dist/types/components/salla-order-options-modal/salla-order-options-modal.d.ts +5 -1
- package/dist/types/components/salla-user-settings/salla-user-settings.d.ts +84 -9
- package/dist/types/components.d.ts +15 -0
- package/package.json +5 -5
- package/dist/twilight/p-19173dca.entry.js +0 -4
- package/dist/twilight/p-26f2eea3.entry.js +0 -4
- package/dist/twilight/p-3d4ea448.entry.js +0 -4
- package/dist/twilight/p-6ce962f1.entry.js +0 -4
- package/dist/twilight/p-ec66b2a0.entry.js +0 -4
|
@@ -14,13 +14,6 @@ var Bullhorn = `<!-- Generated by IcoMoon.io -->
|
|
|
14
14
|
</svg>
|
|
15
15
|
`;
|
|
16
16
|
|
|
17
|
-
var UserOff = `<!-- Generated by IcoMoon.io -->
|
|
18
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
19
|
-
<title>user-off</title>
|
|
20
|
-
<path d="M10.837 19.309c-4.963 1.284-8.171 4.303-8.171 7.691v3.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-3.667c0-2.101 2.48-4.155 6.172-5.109 0.713-0.184 1.141-0.912 0.957-1.625-0.184-0.711-0.908-1.137-1.625-0.956zM12.859 3.715c0.933-0.685 2.020-1.048 3.141-1.048 2.941 0 5.333 2.392 5.333 5.333 0 1.121-0.363 2.208-1.048 3.141-0.436 0.593-0.308 1.428 0.284 1.864 0.239 0.175 0.515 0.259 0.788 0.259 0.411 0 0.815-0.188 1.076-0.544 1.025-1.393 1.567-3.025 1.567-4.72 0-4.412-3.588-8-8-8-1.695 0-3.327 0.541-4.721 1.567-0.592 0.435-0.72 1.269-0.284 1.864 0.436 0.593 1.269 0.721 1.864 0.284zM31.609 29.724l-29.333-29.333c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l29.333 29.333c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885z"></path>
|
|
21
|
-
</svg>
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
17
|
var UserCancel = `<!-- Generated by IcoMoon.io -->
|
|
25
18
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
26
19
|
<title>user-cancel</title>
|
|
@@ -28,28 +21,95 @@ var UserCancel = `<!-- Generated by IcoMoon.io -->
|
|
|
28
21
|
</svg>
|
|
29
22
|
`;
|
|
30
23
|
|
|
31
|
-
const sallaUserSettingsCss = "";
|
|
24
|
+
const sallaUserSettingsCss = ".s-modal-header-inner{display:flex;flex-direction:column !important;align-items:center !important;justify-content:center !important}.s-modal-header-content{text-align:center !important}.s-user-settings-delete-body{text-align:center}.s-user-settings-delete-icon{display:inline-flex;align-items:center;justify-content:center;width:4rem;height:4rem;border-radius:9999px;border:1px solid var(--infinte-color);color:var(--infinte-color);margin:0 auto 1rem}.s-user-settings-delete-icon svg{width:1.5rem;height:1.5rem}.s-user-settings-delete-warning{color:#6b7280;font-size:0.875rem;line-height:1.625;margin-bottom:1.25rem}.s-user-settings-delete-actions--row{display:flex;gap:0.75rem;justify-content:center}.s-user-settings-delete-actions--row salla-button{flex:1}.s-user-settings-delete-actions--stack{display:flex;flex-direction:column;gap:0.75rem;margin-top:1.25rem}.s-user-settings-delete-otp-instruction{color:#6b7280;font-size:0.875rem}.s-user-settings-delete-otp-target{color:#6b7280;direction:ltr;margin-bottom:1.25rem}.s-user-settings-delete-otp-codes{display:flex;justify-content:stretch;gap:0.75rem;direction:ltr;margin-bottom:0.75rem;width:100%}.s-user-settings-delete-otp-codes.has-error{margin-bottom:0}.s-user-settings-delete-otp-input{flex:1 1 0;min-width:0;width:100%;height:3.5rem;text-align:center;border:1px solid #d1d5db;border-radius:0.5rem;font-size:1.25rem;font-weight:600;color:#111827;outline:none}.s-user-settings-delete-otp-input:focus{border-color:#004956;box-shadow:0 0 0 1px #004956}.s-user-settings-delete-otp-input.s-has-error{border-color:#ef4444 !important}.s-user-settings-delete-otp-input.s-has-error:focus{border-color:#ef4444 !important;box-shadow:0 0 0 1px #ef4444}.s-user-settings-delete-otp-input::-webkit-outer-spin-button,.s-user-settings-delete-otp-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-user-settings-delete-otp-input[type=text]{-moz-appearance:textfield}.s-user-settings-delete-otp-error{display:block;color:#ef4444;font-size:0.75rem;text-align:center;padding-top:0.75rem;margin-bottom:1.25rem}.s-user-settings-delete-otp-resend{color:#6b7280;font-size:0.75rem;margin-top:1rem;text-align:center}.s-user-settings-delete-otp-timer{font-weight:600;direction:ltr;display:inline-block}.s-user-settings-delete-otp-resend-link{display:block;color:#004956;font-size:0.875rem;margin-top:1rem;text-align:center;text-decoration:underline;cursor:pointer}.s-user-settings-delete-success-body{color:#6b7280;font-size:0.875rem;line-height:1.625;margin-bottom:1.25rem}.s-user-settings-delete-success-btn{--s-button-color:#004956}";
|
|
32
25
|
|
|
33
26
|
const SallaUserSettings$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserSettings extends HTMLElement {
|
|
34
27
|
constructor() {
|
|
35
28
|
super();
|
|
36
29
|
this.__registerHost();
|
|
37
|
-
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
this.
|
|
43
|
-
this.
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
46
|
-
this.
|
|
47
|
-
this.
|
|
30
|
+
this.otpInputs = [];
|
|
31
|
+
this.deletePendingDays = null;
|
|
32
|
+
this.currentStep = 'confirm';
|
|
33
|
+
this.isDeletePending = false;
|
|
34
|
+
this.otpType = 'email';
|
|
35
|
+
this.otpHasError = false;
|
|
36
|
+
this.otpErrorMessage = '';
|
|
37
|
+
this.isSubmitting = false;
|
|
38
|
+
this.isVerifyingOtp = false;
|
|
39
|
+
this.isSwitchingChannel = false;
|
|
40
|
+
this.resendAfter = 30;
|
|
41
|
+
this.showResendLink = false;
|
|
48
42
|
this.canHideName = salla.config.get('store.settings.rating.can_customer_hide_name');
|
|
43
|
+
/**
|
|
44
|
+
* Bilingual defaults for delete-account keys.
|
|
45
|
+
* Registered via `salla.lang.addBulk` only when missing, so store/central
|
|
46
|
+
* translations always take precedence.
|
|
47
|
+
*/
|
|
48
|
+
this.translationDefaults = {
|
|
49
|
+
'pages.profile.delete_account': { ar: 'حذف الحساب', en: 'Delete account' },
|
|
50
|
+
'pages.profile.delete_account_description': {
|
|
51
|
+
ar: 'سيُحذف حسابك وبياناتك من المتجر نهائيًا، بما في ذلك سجل طلباتك.',
|
|
52
|
+
en: 'Your account and data will be permanently deleted from the store, including your order history.',
|
|
53
|
+
},
|
|
54
|
+
'pages.profile.delete_account_confirm_title': {
|
|
55
|
+
ar: 'هل تريد حذف حسابك؟',
|
|
56
|
+
en: 'Do you want to delete your account?',
|
|
57
|
+
},
|
|
58
|
+
'pages.profile.delete_account_warning': {
|
|
59
|
+
ar: 'بعد الحذف، ستفقد الوصول إلى بياناتك، بما في ذلك سجل الطلبات، وقائمة الأمنيات، وأي نقاط ولاء أو رصيد متاح في المحفظة.',
|
|
60
|
+
en: 'After deletion, you will lose access to your data, including order history, wishlist, and any loyalty points or wallet balance.',
|
|
61
|
+
},
|
|
62
|
+
'pages.profile.cancel': { ar: 'إلغاء', en: 'Cancel' },
|
|
63
|
+
'pages.profile.delete_account_otp_title': {
|
|
64
|
+
ar: 'تأكيد حذف الحساب',
|
|
65
|
+
en: 'Confirm account deletion',
|
|
66
|
+
},
|
|
67
|
+
'pages.profile.delete_account_otp_instruction': {
|
|
68
|
+
ar: 'للمتابعة، أدخل رمز التحقٌّق المرسل إلى:',
|
|
69
|
+
en: 'To continue, enter the verification code sent to:',
|
|
70
|
+
},
|
|
71
|
+
'pages.profile.delete_account_confirm_otp': { ar: 'تأكيد الحذف', en: 'Confirm deletion' },
|
|
72
|
+
'pages.profile.delete_account_otp_required': {
|
|
73
|
+
ar: 'يرجى إدخال رمز التحقٌّق',
|
|
74
|
+
en: 'Please enter the verification code',
|
|
75
|
+
},
|
|
76
|
+
'pages.profile.delete_account_send_via_phone': {
|
|
77
|
+
ar: 'إرسال عبر الهاتف',
|
|
78
|
+
en: 'Send via phone',
|
|
79
|
+
},
|
|
80
|
+
'pages.profile.delete_account_send_via_email': {
|
|
81
|
+
ar: 'إرسال عبر البريد الإلكتروني',
|
|
82
|
+
en: 'Send via email',
|
|
83
|
+
},
|
|
84
|
+
'pages.profile.delete_account_success_title': {
|
|
85
|
+
ar: 'أُرسل طلب حذف الحساب',
|
|
86
|
+
en: 'Account deletion request submitted',
|
|
87
|
+
},
|
|
88
|
+
'pages.profile.delete_account_success_message': {
|
|
89
|
+
ar: 'سيُحذف حسابك خلال 30 يومًا. يمكنك إلغاء الطلب بتسجيل الدخول مرة أخرى قبل اكتمال الحذف.',
|
|
90
|
+
en: 'Your account will be deleted within 30 days. You can cancel the request by signing in again before deletion is complete.',
|
|
91
|
+
},
|
|
92
|
+
'pages.profile.ok': { ar: 'موافق', en: 'OK' },
|
|
93
|
+
'pages.profile.cancel_deletion_request': {
|
|
94
|
+
ar: 'تراجع عن الحذف',
|
|
95
|
+
en: 'Withdraw deletion',
|
|
96
|
+
},
|
|
97
|
+
'pages.profile.delete_account_pending': {
|
|
98
|
+
ar: 'حسابك مجدول للحذف نهائيًا من المتجر خلال :days يومًا. يمكنك التراجع عن الحذف قبل انقضاء المدة.',
|
|
99
|
+
en: 'Your account will be deleted permanently from the store within :days days. You can withdraw the deletion before the deadline.',
|
|
100
|
+
},
|
|
101
|
+
'pages.profile.delete_request_cancelled': {
|
|
102
|
+
ar: 'تم إلغاء طلب الحذف',
|
|
103
|
+
en: 'Deletion request cancelled',
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
this.registerTranslationDefaults();
|
|
107
|
+
this.loadTranslations();
|
|
49
108
|
salla.onReady(() => {
|
|
50
109
|
this.isHiddenName = salla.config.get('user.is_hidden_name');
|
|
51
110
|
this.isNotifiable = salla.config.get('user.is_notifiable');
|
|
52
111
|
this.canHideName = salla.config.get('store.settings.rating.can_customer_hide_name');
|
|
112
|
+
this.fetchDeleteRequestStatus();
|
|
53
113
|
if (!this.isNotifiable || !this.isHiddenName) {
|
|
54
114
|
salla.event.on('profile::info.fetched', res => {
|
|
55
115
|
this.isHiddenName = res.data.is_hidden_name;
|
|
@@ -58,45 +118,444 @@ const SallaUserSettings$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserSett
|
|
|
58
118
|
}
|
|
59
119
|
});
|
|
60
120
|
salla.lang.onLoaded(() => {
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
this.hideMyName = salla.lang.get('pages.profile.hide_my_name');
|
|
64
|
-
this.hideMyNameDesc = salla.lang.get('pages.profile.hide_my_name_desc');
|
|
65
|
-
this.deactivateDesc = salla.lang.get('pages.profile.deactivate_account_description');
|
|
66
|
-
this.promotionalMsgsDesc = salla.lang.get('pages.profile.promotional_messages_description');
|
|
67
|
-
this.warningText = salla.lang.get('pages.profile.warning_for_deactivate');
|
|
68
|
-
this.sorryForLeavingText = salla.lang.get('pages.profile.sorry_for_leaving');
|
|
69
|
-
this.keepAccount = salla.lang.get('pages.profile.keep_account');
|
|
121
|
+
this.registerTranslationDefaults();
|
|
122
|
+
this.loadTranslations();
|
|
70
123
|
});
|
|
71
124
|
}
|
|
125
|
+
getDaysUntilExecution(executionAt) {
|
|
126
|
+
const executionMs = executionAt > 1e12 ? executionAt : executionAt * 1000;
|
|
127
|
+
return Math.max(0, Math.ceil((executionMs - Date.now()) / 86400000));
|
|
128
|
+
}
|
|
129
|
+
applyPendingMessage() {
|
|
130
|
+
const template = salla.lang.get('pages.profile.delete_account_pending');
|
|
131
|
+
this.deleteAccountPending =
|
|
132
|
+
this.deletePendingDays != null
|
|
133
|
+
? template.replace(/:days/g, String(salla.helpers.number(this.deletePendingDays)))
|
|
134
|
+
: template;
|
|
135
|
+
}
|
|
136
|
+
async fetchDeleteRequestStatus() {
|
|
137
|
+
try {
|
|
138
|
+
const response = await salla.profile.getDeleteRequest();
|
|
139
|
+
const request = response?.data ?? null;
|
|
140
|
+
const dataRequest = request?.data_request || request;
|
|
141
|
+
const status = dataRequest?.status;
|
|
142
|
+
this.isDeletePending = status === 'pending';
|
|
143
|
+
const executionAt = dataRequest?.execution_at;
|
|
144
|
+
this.deletePendingDays =
|
|
145
|
+
executionAt != null && !Number.isNaN(Number(executionAt))
|
|
146
|
+
? this.getDaysUntilExecution(Number(executionAt))
|
|
147
|
+
: null;
|
|
148
|
+
this.applyPendingMessage();
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
// Preserve current pending state. After OTP success we set isDeletePending
|
|
152
|
+
// optimistically; a transient GET failure must not flip the UI back to
|
|
153
|
+
// "Delete account" for a request that is already queued.
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Register bilingual (ar/en) defaults without overriding existing translations.
|
|
158
|
+
*/
|
|
159
|
+
registerTranslationDefaults() {
|
|
160
|
+
if (!salla?.lang?.addBulk) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const missing = Object.entries(this.translationDefaults).reduce((acc, [key, value]) => {
|
|
164
|
+
if (salla.lang.get(key) === key) {
|
|
165
|
+
acc[key] = value;
|
|
166
|
+
}
|
|
167
|
+
return acc;
|
|
168
|
+
}, {});
|
|
169
|
+
if (Object.keys(missing).length) {
|
|
170
|
+
salla.lang.addBulk(missing);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
loadTranslations() {
|
|
174
|
+
this.deleteAccount = salla.lang.get('pages.profile.delete_account');
|
|
175
|
+
this.deleteAccountDesc = salla.lang.get('pages.profile.delete_account_description');
|
|
176
|
+
this.deleteConfirmTitle = salla.lang.get('pages.profile.delete_account_confirm_title');
|
|
177
|
+
this.deleteAccountWarning = salla.lang.get('pages.profile.delete_account_warning');
|
|
178
|
+
this.cancelLabel = salla.lang.get('pages.profile.cancel');
|
|
179
|
+
this.deleteOtpTitle = salla.lang.get('pages.profile.delete_account_otp_title');
|
|
180
|
+
this.deleteOtpInstruction = salla.lang.get('pages.profile.delete_account_otp_instruction');
|
|
181
|
+
this.deleteConfirmOtp = salla.lang.get('pages.profile.delete_account_confirm_otp');
|
|
182
|
+
this.sendViaPhone = salla.lang.get('pages.profile.delete_account_send_via_phone');
|
|
183
|
+
this.sendViaEmail = salla.lang.get('pages.profile.delete_account_send_via_email');
|
|
184
|
+
this.deleteSuccessTitle = salla.lang.get('pages.profile.delete_account_success_title');
|
|
185
|
+
this.deleteSuccessMessage = salla.lang.get('pages.profile.delete_account_success_message');
|
|
186
|
+
this.okLabel = salla.lang.get('pages.profile.ok');
|
|
187
|
+
this.cancelDeletionRequest = salla.lang.get('pages.profile.cancel_deletion_request');
|
|
188
|
+
this.applyPendingMessage();
|
|
189
|
+
this.resendAfterLabel = salla.lang.get('blocks.header.resend_after');
|
|
190
|
+
this.resendLabel = salla.lang.get('blocks.comments.submit');
|
|
191
|
+
this.promotionalMsgs = salla.lang.get('pages.profile.promotional_messages');
|
|
192
|
+
this.hideMyName = salla.lang.get('pages.profile.hide_my_name');
|
|
193
|
+
this.hideMyNameDesc = salla.lang.get('pages.profile.hide_my_name_desc');
|
|
194
|
+
this.promotionalMsgsDesc = salla.lang.get('pages.profile.promotional_messages_description');
|
|
195
|
+
}
|
|
72
196
|
toggleSetting(setting, event) {
|
|
73
197
|
salla.profile.updateSettings({ name: setting, value: event.target.checked });
|
|
74
198
|
}
|
|
75
199
|
capitalizeText(str) {
|
|
200
|
+
if (!str)
|
|
201
|
+
return '';
|
|
76
202
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
77
203
|
}
|
|
78
|
-
|
|
79
|
-
|
|
204
|
+
getOtpTarget() {
|
|
205
|
+
if (this.otpType === 'email') {
|
|
206
|
+
return salla.config.get('user.email') || '';
|
|
207
|
+
}
|
|
208
|
+
return salla.config.get('user.mobile') || '';
|
|
209
|
+
}
|
|
210
|
+
updateModalForStep() {
|
|
211
|
+
if (!this.confirmationModal)
|
|
212
|
+
return;
|
|
213
|
+
switch (this.currentStep) {
|
|
214
|
+
case 'confirm':
|
|
215
|
+
this.confirmationModal.setTitle(this.capitalizeText(this.deleteConfirmTitle));
|
|
216
|
+
break;
|
|
217
|
+
case 'otp':
|
|
218
|
+
this.confirmationModal.setTitle(this.capitalizeText(this.deleteOtpTitle));
|
|
219
|
+
break;
|
|
220
|
+
case 'success':
|
|
221
|
+
this.confirmationModal.setTitle(this.capitalizeText(this.deleteSuccessTitle));
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
openDeleteModal() {
|
|
226
|
+
this.currentStep = 'confirm';
|
|
227
|
+
this.otpType = 'email';
|
|
228
|
+
this.resetOtpInputs();
|
|
229
|
+
this.clearResendTimer();
|
|
230
|
+
this.updateModalForStep();
|
|
80
231
|
this.confirmationModal.open();
|
|
81
232
|
}
|
|
82
|
-
|
|
83
|
-
|
|
233
|
+
closeDeleteModal() {
|
|
234
|
+
this.clearResendTimer();
|
|
235
|
+
this.confirmationModal?.close();
|
|
236
|
+
}
|
|
237
|
+
goBackFromOtp() {
|
|
238
|
+
this.clearResendTimer();
|
|
239
|
+
this.resetOtpInputs();
|
|
240
|
+
this.resetOtpError();
|
|
241
|
+
this.currentStep = 'confirm';
|
|
242
|
+
this.updateModalForStep();
|
|
243
|
+
}
|
|
244
|
+
async handleModalVisibilityChanged(event) {
|
|
245
|
+
if (event.detail)
|
|
246
|
+
return;
|
|
247
|
+
this.clearResendTimer();
|
|
248
|
+
const closedAfterSuccess = this.currentStep === 'success';
|
|
249
|
+
if (closedAfterSuccess) {
|
|
250
|
+
this.isDeletePending = true;
|
|
251
|
+
}
|
|
252
|
+
this.currentStep = 'confirm';
|
|
253
|
+
this.resetOtpInputs();
|
|
254
|
+
if (closedAfterSuccess) {
|
|
255
|
+
await this.fetchDeleteRequestStatus();
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
formatResendTimer(seconds) {
|
|
259
|
+
const padded = seconds >= 10 ? `${seconds}` : `0${seconds}`;
|
|
260
|
+
return `00 : ${padded}`;
|
|
261
|
+
}
|
|
262
|
+
updateResendTimerDisplay() {
|
|
263
|
+
if (this.timerEl) {
|
|
264
|
+
this.timerEl.innerHTML = this.formatResendTimer(this.resendAfter);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
isDeleteRequestInFlight() {
|
|
268
|
+
return this.isSubmitting || this.isSwitchingChannel || this.isVerifyingOtp;
|
|
269
|
+
}
|
|
270
|
+
async initiateDeleteRequest(source = 'confirm') {
|
|
271
|
+
// Ignore overlapping clicks/auto-retries so loading flags stay paired with one request.
|
|
272
|
+
if (this.isDeleteRequestInFlight()) {
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
if (source === 'switch' || source === 'resend') {
|
|
276
|
+
this.isSwitchingChannel = true;
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
this.isSubmitting = true;
|
|
280
|
+
}
|
|
281
|
+
try {
|
|
282
|
+
await salla.profile.initiateDeleteRequest(this.otpType);
|
|
283
|
+
this.currentStep = 'otp';
|
|
284
|
+
this.updateModalForStep();
|
|
285
|
+
this.resetOtpInputs();
|
|
286
|
+
this.startResendTimer();
|
|
287
|
+
// salla-verify ignores profile::verification while this delete modal is open
|
|
288
|
+
// (and when payload.request_type === 'delete_account').
|
|
289
|
+
setTimeout(() => this.otpInputs[0]?.focus(), 100);
|
|
290
|
+
}
|
|
291
|
+
catch (error) {
|
|
292
|
+
salla.notify?.error?.(error.response?.data?.error?.message || salla.lang.get('common.errors.error_occurred'));
|
|
293
|
+
}
|
|
294
|
+
finally {
|
|
295
|
+
if (source === 'switch' || source === 'resend') {
|
|
296
|
+
this.isSwitchingChannel = false;
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
this.isSubmitting = false;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
async switchOtpChannel() {
|
|
304
|
+
if (this.isDeleteRequestInFlight()) {
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
this.otpType = this.otpType === 'email' ? 'mobile' : 'email';
|
|
308
|
+
await this.initiateDeleteRequest('switch');
|
|
309
|
+
}
|
|
310
|
+
async resendOtp() {
|
|
311
|
+
if (!this.showResendLink || this.isDeleteRequestInFlight())
|
|
312
|
+
return;
|
|
313
|
+
await this.initiateDeleteRequest('resend');
|
|
314
|
+
}
|
|
315
|
+
collectOtpCode() {
|
|
316
|
+
const code = salla.helpers
|
|
317
|
+
.number(this.otpInputs.map(input => input?.value || '').join(''), true)
|
|
318
|
+
.replace(/[^0-9]/g, '');
|
|
319
|
+
if (this.hiddenCodeInput) {
|
|
320
|
+
this.hiddenCodeInput.value = code;
|
|
321
|
+
}
|
|
322
|
+
return code;
|
|
323
|
+
}
|
|
324
|
+
resetOtpError() {
|
|
325
|
+
this.otpHasError = false;
|
|
326
|
+
this.otpErrorMessage = '';
|
|
327
|
+
}
|
|
328
|
+
setOtpError(message) {
|
|
329
|
+
this.otpHasError = true;
|
|
330
|
+
this.otpErrorMessage = message;
|
|
331
|
+
}
|
|
332
|
+
async verifyDeleteOtp() {
|
|
333
|
+
// Auto-fill and the confirm button can both fire — only one verify at a time.
|
|
334
|
+
if (this.isVerifyingOtp || this.isSwitchingChannel) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
const code = this.collectOtpCode();
|
|
338
|
+
if (code.length < 4) {
|
|
339
|
+
this.setOtpError(salla.lang.get('pages.profile.delete_account_otp_required'));
|
|
340
|
+
this.otpInputs[code.length]?.focus();
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
this.resetOtpError();
|
|
344
|
+
this.isVerifyingOtp = true;
|
|
345
|
+
try {
|
|
346
|
+
const response = await salla.profile.verifyDeleteRequest({ type: this.otpType, code });
|
|
347
|
+
this.deleteSuccessMessage =
|
|
348
|
+
response?.data?.message || salla.lang.get('pages.profile.delete_account_success_message');
|
|
349
|
+
this.clearResendTimer();
|
|
350
|
+
this.resetOtpInputs();
|
|
351
|
+
this.otpInputs = [];
|
|
352
|
+
this.currentStep = 'success';
|
|
353
|
+
this.updateModalForStep();
|
|
354
|
+
}
|
|
355
|
+
catch (error) {
|
|
356
|
+
this.setOtpError(error.response?.data?.error?.message || salla.lang.get('common.errors.error_occurred'));
|
|
357
|
+
this.resetOtpInputs();
|
|
358
|
+
}
|
|
359
|
+
finally {
|
|
360
|
+
this.isVerifyingOtp = false;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
async confirmSuccess() {
|
|
364
|
+
this.isDeletePending = true;
|
|
365
|
+
this.closeDeleteModal();
|
|
366
|
+
this.currentStep = 'confirm';
|
|
367
|
+
await this.fetchDeleteRequestStatus();
|
|
368
|
+
}
|
|
369
|
+
async cancelDeleteRequest() {
|
|
370
|
+
if (this.isSubmitting) {
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
this.isSubmitting = true;
|
|
374
|
+
try {
|
|
375
|
+
const response = await salla.profile.cancelDeleteRequest();
|
|
376
|
+
const message = response.message || salla.lang.get('pages.profile.delete_request_cancelled');
|
|
377
|
+
this.isDeletePending = false;
|
|
378
|
+
salla.notify?.success?.(message);
|
|
379
|
+
}
|
|
380
|
+
catch (error) {
|
|
381
|
+
salla.notify?.error?.(error.response?.data?.error?.message || salla.lang.get('common.errors.error_occurred'));
|
|
382
|
+
}
|
|
383
|
+
finally {
|
|
384
|
+
this.isSubmitting = false;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
resetOtpInputs() {
|
|
388
|
+
this.otpInputs.forEach(input => {
|
|
389
|
+
if (input)
|
|
390
|
+
input.value = '';
|
|
391
|
+
});
|
|
392
|
+
if (this.hiddenCodeInput) {
|
|
393
|
+
this.hiddenCodeInput.value = '';
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
modifyNextOtpInput(el, data) {
|
|
397
|
+
el.value = data[0];
|
|
398
|
+
data = data.substring(1);
|
|
399
|
+
if (el.nextElementSibling && data.length) {
|
|
400
|
+
this.modifyNextOtpInput(el.nextElementSibling, data);
|
|
401
|
+
}
|
|
402
|
+
else if (!el.nextElementSibling && data.length === 0) {
|
|
403
|
+
el.focus();
|
|
404
|
+
}
|
|
405
|
+
else if (el.nextElementSibling && data.length === 0) {
|
|
406
|
+
el.nextElementSibling.focus();
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
splitOtpNumber(e) {
|
|
410
|
+
const data = salla.helpers.number(e.data || e.target.value || '', true).replace(/[^0-9]/g, '');
|
|
411
|
+
if (!data || data.length === 1)
|
|
412
|
+
return;
|
|
413
|
+
this.modifyNextOtpInput(e.target, data);
|
|
414
|
+
}
|
|
415
|
+
allOtpInputsFilled() {
|
|
416
|
+
return this.otpInputs.every(input => input?.value);
|
|
417
|
+
}
|
|
418
|
+
handleOtpInput(ev) {
|
|
419
|
+
this.resetOtpError();
|
|
420
|
+
ev.target.value = salla.helpers.number(ev.target.value || '', true);
|
|
421
|
+
salla.helpers.inputDigitsOnly(ev.target);
|
|
422
|
+
if (this.allOtpInputsFilled()) {
|
|
423
|
+
setTimeout(() => this.verifyDeleteOtp(), 100);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
handleOtpKeyUp(ev) {
|
|
427
|
+
this.resetOtpError();
|
|
428
|
+
if (['Alt', 'Shift', 'Control', 'AltGraph', 'Ctrl'].includes(ev.key))
|
|
429
|
+
return;
|
|
430
|
+
const key = ev.keyCode || ev.charCode;
|
|
431
|
+
if (ev.target.value) {
|
|
432
|
+
ev.target.nextElementSibling?.focus();
|
|
433
|
+
ev.target.nextElementSibling?.select();
|
|
434
|
+
}
|
|
435
|
+
else if ([8, 46].includes(key)) {
|
|
436
|
+
ev.target.previousElementSibling?.focus();
|
|
437
|
+
ev.target.previousElementSibling?.select();
|
|
438
|
+
}
|
|
439
|
+
if (ev.target.value.length > 1) {
|
|
440
|
+
this.splitOtpNumber(ev);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
handleOtpPaste(ev) {
|
|
444
|
+
this.resetOtpError();
|
|
445
|
+
const clipboardText = salla.helpers.number(ev.clipboardData.getData('text') || '', true);
|
|
446
|
+
const text = clipboardText.replace(/[^0-9]/g, '').substring(0, this.otpInputs.length);
|
|
447
|
+
this.otpInputs.forEach(input => (input.value = ''));
|
|
448
|
+
if (this.otpInputs[0]) {
|
|
449
|
+
this.modifyNextOtpInput(this.otpInputs[0], text);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
handleOtpFocus(ev) {
|
|
453
|
+
if (ev.target === this.otpInputs[0])
|
|
454
|
+
return;
|
|
455
|
+
if (this.otpInputs[0]?.value === '') {
|
|
456
|
+
this.otpInputs[0].focus();
|
|
457
|
+
}
|
|
458
|
+
if (ev.target.previousElementSibling?.value === '') {
|
|
459
|
+
ev.target.previousElementSibling.focus();
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
startResendTimer() {
|
|
463
|
+
this.clearResendTimer();
|
|
464
|
+
this.resendAfter = 30;
|
|
465
|
+
this.showResendLink = false;
|
|
466
|
+
this.updateResendTimerDisplay();
|
|
467
|
+
this.resendTimerId = setInterval(() => {
|
|
468
|
+
this.resendAfter--;
|
|
469
|
+
if (this.resendAfter <= 0) {
|
|
470
|
+
this.clearResendTimer();
|
|
471
|
+
this.showResendLink = true;
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
this.updateResendTimerDisplay();
|
|
475
|
+
}, 1000);
|
|
476
|
+
}
|
|
477
|
+
clearResendTimer() {
|
|
478
|
+
if (this.resendTimerId) {
|
|
479
|
+
clearInterval(this.resendTimerId);
|
|
480
|
+
this.resendTimerId = null;
|
|
481
|
+
}
|
|
482
|
+
this.showResendLink = false;
|
|
483
|
+
}
|
|
484
|
+
renderUserDeleteIcon() {
|
|
485
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24", color: "currentColor", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M14.5 8C14.5 5.23858 12.2614 3 9.5 3C6.73858 3 4.5 5.23858 4.5 8C4.5 10.7614 6.73858 13 9.5 13C12.2614 13 14.5 10.7614 14.5 8Z" }), h("path", { d: "M15.5 21L18.5 18M18.5 18L21.5 15M18.5 18L15.5 15M18.5 18L21.5 21" }), h("path", { d: "M2.5 20C2.5 16.134 5.63401 13 9.5 13C10.775 13 11.9704 13.3409 13 13.9365" })));
|
|
486
|
+
}
|
|
487
|
+
renderConfirmStep() {
|
|
488
|
+
return (h("div", { class: "s-user-settings-delete-body" }, h("p", { class: "s-user-settings-delete-warning" }, this.deleteAccountWarning), h("div", { class: "s-user-settings-delete-actions s-user-settings-delete-actions--row" }, h("salla-button", { width: "wide", fill: "outline", color: "danger", onClick: () => this.closeDeleteModal() }, this.capitalizeText(this.cancelLabel)), h("salla-button", { width: "wide", color: "primary", loading: this.isSubmitting, onClick: () => this.initiateDeleteRequest() }, this.capitalizeText(this.deleteAccount)))));
|
|
489
|
+
}
|
|
490
|
+
renderOtpStep() {
|
|
491
|
+
return (h("div", { class: "s-user-settings-delete-body" }, h("p", { class: "s-user-settings-delete-otp-instruction" }, this.deleteOtpInstruction), h("p", { class: "s-user-settings-delete-otp-target" }, this.getOtpTarget()), h("input", { type: "hidden", name: "code", maxlength: "4", ref: el => (this.hiddenCodeInput = el) }), h("div", { class: {
|
|
492
|
+
's-user-settings-delete-otp-codes': true,
|
|
493
|
+
'has-error': this.otpHasError,
|
|
494
|
+
}, dir: "ltr" }, [1, 2, 3, 4].map(i => (h("input", { type: "text", autocomplete: "one-time-code", pattern: "[0-9]*", inputmode: "numeric", maxlength: "1", id: `delete-otp-${i}`, class: {
|
|
495
|
+
's-user-settings-delete-otp-input': true,
|
|
496
|
+
's-has-error': this.otpHasError,
|
|
497
|
+
}, onInput: e => this.handleOtpInput(e), onPaste: e => this.handleOtpPaste(e), onKeyUp: e => this.handleOtpKeyUp(e), onFocus: e => this.handleOtpFocus(e), ref: el => (this.otpInputs[i - 1] = el), required: true })))), this.otpHasError && this.otpErrorMessage ? (h("span", { class: "s-user-settings-delete-otp-error" }, this.otpErrorMessage)) : (''), h("div", { class: "s-user-settings-delete-actions s-user-settings-delete-actions--stack" }, h("salla-button", { width: "wide", color: "primary", disabled: this.isSwitchingChannel, onClick: () => this.verifyDeleteOtp() }, this.capitalizeText(this.deleteConfirmOtp)), h("salla-button", { width: "wide", fill: "outline", color: "primary", disabled: this.isVerifyingOtp, onClick: () => this.switchOtpChannel() }, this.capitalizeText(this.otpType === 'email' ? this.sendViaPhone : this.sendViaEmail))), h("p", { class: "s-user-settings-delete-otp-resend", style: { display: this.showResendLink ? 'none' : 'block' } }, this.resendAfterLabel, h("b", { class: "s-user-settings-delete-otp-timer mx-1 font-bold", ref: el => (this.timerEl = el) })), h("a", { href: "#", class: "s-user-settings-delete-otp-resend-link", style: { display: this.showResendLink ? 'block' : 'none' }, onClick: e => {
|
|
498
|
+
e.preventDefault();
|
|
499
|
+
this.resendOtp();
|
|
500
|
+
} }, this.resendLabel)));
|
|
501
|
+
}
|
|
502
|
+
renderSuccessStep() {
|
|
503
|
+
return (h("div", { class: "s-user-settings-delete-body" }, h("p", { class: "s-user-settings-delete-success-body" }, this.deleteSuccessMessage), h("div", { class: "s-user-settings-delete-actions s-user-settings-delete-actions--stack" }, h("salla-button", { class: "s-user-settings-delete-success-btn", width: "wide", color: "primary", onClick: () => this.confirmSuccess() }, this.capitalizeText(this.okLabel)))));
|
|
504
|
+
}
|
|
505
|
+
renderDeleteStep() {
|
|
506
|
+
switch (this.currentStep) {
|
|
507
|
+
case 'otp':
|
|
508
|
+
return this.renderOtpStep();
|
|
509
|
+
case 'success':
|
|
510
|
+
return this.renderSuccessStep();
|
|
511
|
+
case 'confirm':
|
|
512
|
+
default:
|
|
513
|
+
return this.renderConfirmStep();
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
renderDeleteSectionAction() {
|
|
517
|
+
if (this.isDeletePending) {
|
|
518
|
+
return (h("salla-button", { fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", loading: this.isSubmitting, onClick: () => this.cancelDeleteRequest() }, this.capitalizeText(this.cancelDeletionRequest)));
|
|
519
|
+
}
|
|
520
|
+
return (h("salla-button", { fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeleteModal() }, this.capitalizeText(this.deleteAccount)));
|
|
84
521
|
}
|
|
85
522
|
render() {
|
|
86
|
-
return (h(Host, { key: '
|
|
523
|
+
return (h(Host, { key: '64356c5b57d826fce8c29cc319a9762464c7fe51', class: "s-user-settings-wrapper" }, this.canHideName && (h("div", { key: '4f7b3eb703f89e4a758fca54ba1b214f6724aaea', class: "s-user-settings-section" }, h("salla-list-tile", { key: '7ad109e36b278fe81a314d51e1ab68030dd96cdc' }, h("div", { key: 'c789b7e2c541e25aaaf336e052d1986f6429da71', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '5d7b377aefb80139527d8814ee2c636fa9c73e0f', innerHTML: UserCancel })), h("div", { key: 'fdb9d6130ef27cffbe4e2ef06e7b9155d0d04c2b', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), h("div", { key: 'bd8592a487c79926355eeea25a5e1429bca0fd80', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), h("div", { key: 'cf21ed12bb38dc3a613efac6d017a72aab38780b', slot: "action", class: "s-user-settings-section-action" }, h("label", { key: '160140e25cf8e6c4556e52c0b36ba5769618b419', class: "s-toggle" }, h("input", { key: '369a694fabbd42e6c239b23c26d68f858775ffe2', class: "s-toggle-input", checked: this.isHiddenName, onChange: e => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), h("div", { key: '5952ec01913ef95d888eeb3aace14123ffd3ef6f', class: "s-toggle-switcher" })))))), h("div", { key: '885355f8435759c9359a3d9eb95d5637b1c74751', class: "s-user-settings-section" }, h("salla-list-tile", { key: '93b607850b20add5384a3b28e4e58fbfcb181d53' }, h("div", { key: 'c795aabfdc6df0beb9c0bfcf73ad87625eb7f51b', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: 'a59ede027c4466a1e84e8e8b4c649c7b418dd0a3', innerHTML: Bullhorn })), h("div", { key: 'e7af96b6f919a8be8bb126237cb3977e72a7c089', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), h("div", { key: 'dab7b270443b6eddccd7df739c2bee82eb7706af', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), h("div", { key: '56a6f18c788891fe9215a57d0fcaa5cf98bd3aa5', slot: "action", class: "s-user-settings-section-action" }, h("label", { key: '1fc28780fe779099eaed7916f31cbbb681c10fe9', class: "s-toggle" }, h("input", { key: '832edd6e5b806171bb913163b7d5c19dbb0833f5', class: "s-toggle-input", checked: this.isNotifiable, onChange: e => this.toggleSetting('is_notifiable', e), type: "checkbox" }), h("div", { key: '54260d8cca19ca6914cdd3bf15093b9669fef44a', class: "s-toggle-switcher" }))))), h("div", { key: '549bae1159a55b035952a12c8dc9d2b9d660f5bf', class: "s-user-settings-section s-user-settings-section-delete-user" }, h("salla-list-tile", { key: '7969327e863cd998a120f27d61621d83ef8e57d5' }, h("div", { key: 'acf14b5e6ce76657fe0016aa63e26851e7688cd5', slot: "icon", class: "s-user-settings-section-icon" }, this.renderUserDeleteIcon()), h("div", { key: '4a38cf9d0510e784317b0eb4db2fd4589a9f71d4', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deleteAccount)), h("div", { key: '054f6a6c30f2eb9794f83a0998f20e208c7ed85a', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.isDeletePending ? this.deleteAccountPending : this.deleteAccountDesc)), h("div", { key: '00d392a300b986d5d3e6f6711e6996df9731962d', slot: "action", class: "s-user-settings-section-action" }, this.renderDeleteSectionAction()))), h("salla-modal", { key: 'd4e8006e57d9c35267177f07b60e510ea3e53400', 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()))));
|
|
87
524
|
}
|
|
88
525
|
static get style() { return sallaUserSettingsCss; }
|
|
89
526
|
}, [0, "salla-user-settings", {
|
|
90
|
-
"
|
|
527
|
+
"deleteAccount": [32],
|
|
528
|
+
"deleteAccountDesc": [32],
|
|
529
|
+
"deleteConfirmTitle": [32],
|
|
530
|
+
"deleteAccountWarning": [32],
|
|
531
|
+
"cancelLabel": [32],
|
|
532
|
+
"deleteOtpTitle": [32],
|
|
533
|
+
"deleteOtpInstruction": [32],
|
|
534
|
+
"deleteConfirmOtp": [32],
|
|
535
|
+
"sendViaPhone": [32],
|
|
536
|
+
"sendViaEmail": [32],
|
|
537
|
+
"deleteSuccessTitle": [32],
|
|
538
|
+
"deleteSuccessMessage": [32],
|
|
539
|
+
"okLabel": [32],
|
|
540
|
+
"cancelDeletionRequest": [32],
|
|
541
|
+
"deleteAccountPending": [32],
|
|
542
|
+
"deletePendingDays": [32],
|
|
543
|
+
"resendAfterLabel": [32],
|
|
544
|
+
"resendLabel": [32],
|
|
91
545
|
"promotionalMsgs": [32],
|
|
92
546
|
"hideMyName": [32],
|
|
93
547
|
"hideMyNameDesc": [32],
|
|
94
|
-
"deactivateDesc": [32],
|
|
95
548
|
"promotionalMsgsDesc": [32],
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
549
|
+
"currentStep": [32],
|
|
550
|
+
"isDeletePending": [32],
|
|
551
|
+
"otpType": [32],
|
|
552
|
+
"otpHasError": [32],
|
|
553
|
+
"otpErrorMessage": [32],
|
|
554
|
+
"isSubmitting": [32],
|
|
555
|
+
"isVerifyingOtp": [32],
|
|
556
|
+
"isSwitchingChannel": [32],
|
|
557
|
+
"resendAfter": [32],
|
|
558
|
+
"showResendLink": [32],
|
|
100
559
|
"canHideName": [32],
|
|
101
560
|
"isHiddenName": [32],
|
|
102
561
|
"isNotifiable": [32]
|
|
@@ -55,6 +55,14 @@ const SallaVerify$1 = /*@__PURE__*/ proxyCustomElement(class SallaVerify extends
|
|
|
55
55
|
//todo:: change this way, now we fire the event from the backend, we should listen to salla.profile.event.onUpdated
|
|
56
56
|
salla.event.on('profile::verification', data => {
|
|
57
57
|
let payload = Array.isArray(data) ? data[0] : data;
|
|
58
|
+
// Account-deletion OTP is owned by <salla-user-settings>; opening this modal
|
|
59
|
+
// (and auto-reloading) would break that flow. Prefer payload.request_type when
|
|
60
|
+
// present; fall back to the delete modal being open.
|
|
61
|
+
const isDeleteRequest = payload?.request_type === 'delete_account'
|
|
62
|
+
|| document.getElementById('salla-user-settings-delete-modal')?.hasAttribute('visible');
|
|
63
|
+
if (isDeleteRequest) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
58
66
|
this.isProfileVerify = true;
|
|
59
67
|
this.open(payload);
|
|
60
68
|
this.title = salla.lang.get('pages.profile.verify_title') + salla.lang.get('common.elements.' + payload.type);
|