@salla.sa/twilight-components 2.14.520 → 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.
Files changed (359) hide show
  1. package/dist/cjs/arrow-right-Cd6JoegH.js +13 -0
  2. package/dist/cjs/{filepond-B-CXEiqm.js → filepond-RbRMljF_.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-wldzYT1k.js → filepond-plugin-file-poster-uIFauwzO.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-DEKUs2ql.js → filepond-plugin-file-validate-size-Cd_r4359.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-V0nWqzLp.js → filepond-plugin-file-validate-type-C5tN0mCB.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-C60jMfjF.js → filepond-plugin-image-edit-Bj-vUOxV.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-7rjvzakW.js → filepond-plugin-image-exif-orientation-DR6IE-Yk.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-CBjNXDm7.js → filepond-plugin-image-preview-HghuKrCb.js} +1 -1
  9. package/dist/cjs/{functions-w4n1Dw12.js → functions-C0u_gA0Z.js} +1 -1
  10. package/dist/cjs/{index-CP4_ZHev.js → index-BJw_NdHc.js} +10 -10
  11. package/dist/cjs/{index-Dtd8NT7W.js → index-DZPED3mu.js} +1 -1
  12. package/dist/cjs/loader.cjs.js +2 -2
  13. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-accordion_6.cjs.entry.js +18 -3
  15. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
  23. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-count-down_2.cjs.entry.js +12 -7
  34. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  48. package/dist/cjs/salla-loyalty-exchange-product-card_5.cjs.entry.js +3 -3
  49. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  50. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  51. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  55. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  56. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-price-range.cjs.entry.js +3 -9
  84. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-products-list.cjs.entry.js +2 -2
  88. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  104. package/dist/cjs/salla-user-settings.cjs.entry.js +471 -34
  105. package/dist/cjs/salla-verify.cjs.entry.js +9 -1
  106. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  107. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
  108. package/dist/cjs/{tracked-promise-C8HPKIHB.js → tracked-promise-84l9D1pi.js} +1 -1
  109. package/dist/cjs/twilight.cjs.js +2 -2
  110. package/dist/cjs/{vanilla-picker-CfkLDKtB.js → vanilla-picker-C9ruFpIn.js} +1 -1
  111. package/dist/collection/components/salla-modal/salla-modal.css +12 -0
  112. package/dist/collection/components/salla-modal/salla-modal.js +50 -1
  113. package/dist/collection/components/salla-order-options-modal/salla-order-options-modal.js +11 -6
  114. package/dist/collection/components/salla-products-list/salla-products-list.js +1 -1
  115. package/dist/collection/components/salla-user-settings/salla-user-settings.css +137 -0
  116. package/dist/collection/components/salla-user-settings/salla-user-settings.js +497 -32
  117. package/dist/collection/components/salla-verify/salla-verify.js +8 -0
  118. package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
  119. package/dist/components/arrow-right.js +11 -0
  120. package/dist/components/index.js +2 -2
  121. package/dist/components/salla-login-modal2.js +7 -1
  122. package/dist/components/salla-loyalty-point2.js +8 -2
  123. package/dist/components/salla-modal2.js +25 -3
  124. package/dist/components/salla-order-options-modal2.js +11 -6
  125. package/dist/components/salla-price-range2.js +1 -7
  126. package/dist/components/salla-product-size-guide.js +7 -1
  127. package/dist/components/salla-products-list2.js +1 -1
  128. package/dist/components/salla-user-menu.js +7 -1
  129. package/dist/components/salla-user-settings.js +498 -39
  130. package/dist/components/salla-verify.js +8 -0
  131. package/dist/components/salla-wishlist-actions.js +1 -1
  132. package/dist/esm/arrow-right-B9q7ymSg.js +11 -0
  133. package/dist/esm/{filepond-B5AhUd5X.js → filepond-DTXpxLd9.js} +1 -1
  134. package/dist/esm/{filepond-plugin-file-poster-CyUKDIOX.js → filepond-plugin-file-poster-QykV8B8G.js} +1 -1
  135. package/dist/esm/{filepond-plugin-file-validate-size-oDM0RkiJ.js → filepond-plugin-file-validate-size-Bj5ENC6_.js} +1 -1
  136. package/dist/esm/{filepond-plugin-file-validate-type-Bgr0PP4V.js → filepond-plugin-file-validate-type-8CnQZmpk.js} +1 -1
  137. package/dist/esm/{filepond-plugin-image-edit-CQNKQMzk.js → filepond-plugin-image-edit-JxnSBv4V.js} +1 -1
  138. package/dist/esm/{filepond-plugin-image-exif-orientation-6bqQCmnQ.js → filepond-plugin-image-exif-orientation-P7dHkas0.js} +1 -1
  139. package/dist/esm/{filepond-plugin-image-preview-BxAmNds6.js → filepond-plugin-image-preview-B6byQaCY.js} +1 -1
  140. package/dist/esm/{functions-UlRBW71R.js → functions-B-HhhobN.js} +1 -1
  141. package/dist/esm/{index-CGCbZsu6.js → index-BszjiU3B.js} +1 -1
  142. package/dist/esm/{index-DjOBdfDM.js → index-CJNSdTHZ.js} +10 -10
  143. package/dist/esm/loader.js +3 -3
  144. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  145. package/dist/esm/salla-accordion_6.entry.js +18 -3
  146. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  147. package/dist/esm/salla-advertisement.entry.js +1 -1
  148. package/dist/esm/salla-alert_2.entry.js +1 -1
  149. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  150. package/dist/esm/salla-apps-icons.entry.js +1 -1
  151. package/dist/esm/salla-badge.entry.js +1 -1
  152. package/dist/esm/salla-basket-gap.entry.js +1 -1
  153. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  154. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  155. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  156. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  157. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  158. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  159. package/dist/esm/salla-comment-factors.entry.js +1 -1
  160. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  161. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  162. package/dist/esm/salla-contacts.entry.js +1 -1
  163. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  164. package/dist/esm/salla-count-down_2.entry.js +12 -7
  165. package/dist/esm/salla-custom-fields.entry.js +1 -1
  166. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  167. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  168. package/dist/esm/salla-filters-widget.entry.js +1 -1
  169. package/dist/esm/salla-filters.entry.js +1 -1
  170. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  171. package/dist/esm/salla-gifting.entry.js +1 -1
  172. package/dist/esm/salla-hook.entry.js +1 -1
  173. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  174. package/dist/esm/salla-installment.entry.js +1 -1
  175. package/dist/esm/salla-list-tile.entry.js +1 -1
  176. package/dist/esm/salla-localization-modal.entry.js +1 -1
  177. package/dist/esm/salla-login-modal.entry.js +1 -1
  178. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  179. package/dist/esm/salla-loyalty-exchange-product-card_5.entry.js +3 -3
  180. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  181. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  182. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  183. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  184. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  185. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  186. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  187. package/dist/esm/salla-loyalty.entry.js +1 -1
  188. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  189. package/dist/esm/salla-map_2.entry.js +1 -1
  190. package/dist/esm/salla-menu.entry.js +1 -1
  191. package/dist/esm/salla-metadata.entry.js +1 -1
  192. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  193. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  194. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  195. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  196. package/dist/esm/salla-notification-item.entry.js +1 -1
  197. package/dist/esm/salla-notifications.entry.js +1 -1
  198. package/dist/esm/salla-offer-modal.entry.js +1 -1
  199. package/dist/esm/salla-offer.entry.js +1 -1
  200. package/dist/esm/salla-order-branch.entry.js +1 -1
  201. package/dist/esm/salla-order-cancel.entry.js +1 -1
  202. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  203. package/dist/esm/salla-order-details-options.entry.js +1 -1
  204. package/dist/esm/salla-order-details.entry.js +1 -1
  205. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  206. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  207. package/dist/esm/salla-order-edit.entry.js +1 -1
  208. package/dist/esm/salla-order-shipments.entry.js +1 -1
  209. package/dist/esm/salla-order-summary.entry.js +1 -1
  210. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  211. package/dist/esm/salla-orders.entry.js +1 -1
  212. package/dist/esm/salla-payments.entry.js +1 -1
  213. package/dist/esm/salla-placeholder.entry.js +1 -1
  214. package/dist/esm/salla-price-range.entry.js +2 -8
  215. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  216. package/dist/esm/salla-product-card_2.entry.js +1 -1
  217. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  218. package/dist/esm/salla-products-list.entry.js +2 -2
  219. package/dist/esm/salla-quick-order.entry.js +1 -1
  220. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  221. package/dist/esm/salla-rating-modal.entry.js +1 -1
  222. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  223. package/dist/esm/salla-scopes.entry.js +1 -1
  224. package/dist/esm/salla-search.entry.js +1 -1
  225. package/dist/esm/salla-skeleton.entry.js +1 -1
  226. package/dist/esm/salla-slider.entry.js +1 -1
  227. package/dist/esm/salla-social-share.entry.js +1 -1
  228. package/dist/esm/salla-social.entry.js +1 -1
  229. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  230. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  231. package/dist/esm/salla-tooltip.entry.js +1 -1
  232. package/dist/esm/salla-trust-badges.entry.js +1 -1
  233. package/dist/esm/salla-user-menu.entry.js +1 -1
  234. package/dist/esm/salla-user-profile.entry.js +1 -1
  235. package/dist/esm/salla-user-settings.entry.js +471 -34
  236. package/dist/esm/salla-verify.entry.js +9 -1
  237. package/dist/esm/salla-wallet.entry.js +1 -1
  238. package/dist/esm/salla-wishlist-actions.entry.js +2 -2
  239. package/dist/esm/{tracked-promise-CjzMNHuW.js → tracked-promise-BfoqsGRk.js} +1 -1
  240. package/dist/esm/twilight.js +3 -3
  241. package/dist/esm/{vanilla-picker-C0WhEpLR.js → vanilla-picker-BhDt66Uk.js} +1 -1
  242. package/dist/twilight/{p-1e80102d.entry.js → p-0645933f.entry.js} +1 -1
  243. package/dist/twilight/{p-9edb33a2.entry.js → p-0a1e4dbe.entry.js} +1 -1
  244. package/dist/twilight/{p-468d142a.entry.js → p-0c879092.entry.js} +1 -1
  245. package/dist/twilight/{p-Z5t88y_p.js → p-13LBJtjX.js} +1 -1
  246. package/dist/twilight/{p-517cdc60.entry.js → p-16cf7eaf.entry.js} +1 -1
  247. package/dist/twilight/{p-75c5d67c.entry.js → p-186221a2.entry.js} +1 -1
  248. package/dist/twilight/{p-f5fc1892.entry.js → p-1eb3897d.entry.js} +1 -1
  249. package/dist/twilight/{p-977d4b62.entry.js → p-211f9589.entry.js} +1 -1
  250. package/dist/twilight/{p-bf78b156.entry.js → p-22424405.entry.js} +1 -1
  251. package/dist/twilight/{p-1334a1aa.entry.js → p-22da1d18.entry.js} +1 -1
  252. package/dist/twilight/{p-9e950969.entry.js → p-247e6bc1.entry.js} +1 -1
  253. package/dist/twilight/{p-96908e15.entry.js → p-26d4a829.entry.js} +1 -1
  254. package/dist/twilight/{p-41e66fae.entry.js → p-2b411871.entry.js} +1 -1
  255. package/dist/twilight/{p-8fba19d5.entry.js → p-2bd6a7ad.entry.js} +1 -1
  256. package/dist/twilight/{p-a8ccb3b5.entry.js → p-2c9d2ea4.entry.js} +1 -1
  257. package/dist/twilight/{p-ba2ec852.entry.js → p-30638d38.entry.js} +1 -1
  258. package/dist/twilight/{p-af88e681.entry.js → p-33a93add.entry.js} +1 -1
  259. package/dist/twilight/{p-9a259cd4.entry.js → p-34968257.entry.js} +1 -1
  260. package/dist/twilight/{p-779e8604.entry.js → p-376ca265.entry.js} +1 -1
  261. package/dist/twilight/{p-7df3873f.entry.js → p-379956ef.entry.js} +1 -1
  262. package/dist/twilight/{p-aeef91fe.entry.js → p-3b227e0d.entry.js} +1 -1
  263. package/dist/twilight/{p-f5c7d01f.entry.js → p-3cdf1264.entry.js} +1 -1
  264. package/dist/twilight/{p-509279da.entry.js → p-3d9d15b0.entry.js} +1 -1
  265. package/dist/twilight/{p-70416928.entry.js → p-3de8587f.entry.js} +1 -1
  266. package/dist/twilight/{p-4b764afc.entry.js → p-3e88938d.entry.js} +1 -1
  267. package/dist/twilight/{p-a539d51c.entry.js → p-40cd342c.entry.js} +1 -1
  268. package/dist/twilight/{p-395dfda3.entry.js → p-42686603.entry.js} +1 -1
  269. package/dist/twilight/{p-123bd7f1.entry.js → p-43437311.entry.js} +1 -1
  270. package/dist/twilight/{p-71b24810.entry.js → p-46d4d4f1.entry.js} +1 -1
  271. package/dist/twilight/{p-26b01da9.entry.js → p-4947d2c3.entry.js} +1 -1
  272. package/dist/twilight/{p-6d114c0b.entry.js → p-4d67b437.entry.js} +1 -1
  273. package/dist/twilight/{p-7ccd3918.entry.js → p-53e8d007.entry.js} +1 -1
  274. package/dist/twilight/{p-a3e65c78.entry.js → p-56851c9a.entry.js} +1 -1
  275. package/dist/twilight/{p-97bf34f8.entry.js → p-58969bd2.entry.js} +1 -1
  276. package/dist/twilight/{p-2bcd9e4b.entry.js → p-58a2b477.entry.js} +1 -1
  277. package/dist/twilight/{p-12b95fd5.entry.js → p-59500502.entry.js} +1 -1
  278. package/dist/twilight/{p-04c4ac9d.entry.js → p-597243e9.entry.js} +1 -1
  279. package/dist/twilight/{p-93f7e2a0.entry.js → p-5c7d194c.entry.js} +1 -1
  280. package/dist/twilight/{p-15afb5f2.entry.js → p-5c923f3e.entry.js} +1 -1
  281. package/dist/twilight/{p-877de10b.entry.js → p-5ce7a5f4.entry.js} +1 -1
  282. package/dist/twilight/{p-7782ef7a.entry.js → p-610cf53f.entry.js} +1 -1
  283. package/dist/twilight/{p-5cc43d68.entry.js → p-6246f251.entry.js} +1 -1
  284. package/dist/twilight/{p-af61b17f.entry.js → p-63e4468c.entry.js} +1 -1
  285. package/dist/twilight/{p-815559c2.entry.js → p-69791429.entry.js} +1 -1
  286. package/dist/twilight/{p-79994729.entry.js → p-72302934.entry.js} +1 -1
  287. package/dist/twilight/{p-157963b1.entry.js → p-74000383.entry.js} +1 -1
  288. package/dist/twilight/{p-56554552.entry.js → p-75ca0611.entry.js} +1 -1
  289. package/dist/twilight/p-75cd81c8.entry.js +4 -0
  290. package/dist/twilight/{p-ee8d8338.entry.js → p-782376aa.entry.js} +1 -1
  291. package/dist/twilight/{p-14ab267b.entry.js → p-78b64ecf.entry.js} +1 -1
  292. package/dist/twilight/{p-ea68294d.entry.js → p-7ad821d8.entry.js} +1 -1
  293. package/dist/twilight/{p-c721e1f9.entry.js → p-7c9cee72.entry.js} +1 -1
  294. package/dist/twilight/{p-d25eaeb2.entry.js → p-8416f053.entry.js} +1 -1
  295. package/dist/twilight/{p-937f7f9b.entry.js → p-8641e913.entry.js} +1 -1
  296. package/dist/twilight/{p-c0f2f74c.entry.js → p-87b03980.entry.js} +1 -1
  297. package/dist/twilight/{p-767fc48b.entry.js → p-87b8805f.entry.js} +1 -1
  298. package/dist/twilight/{p-0103f018.entry.js → p-88b5f845.entry.js} +1 -1
  299. package/dist/twilight/{p-a9853194.entry.js → p-8d1a1d2f.entry.js} +1 -1
  300. package/dist/twilight/{p-1485dba4.entry.js → p-8d8ce19f.entry.js} +1 -1
  301. package/dist/twilight/{p-9e1fa90c.entry.js → p-8e17a662.entry.js} +1 -1
  302. package/dist/twilight/{p-4e708377.entry.js → p-926861b0.entry.js} +1 -1
  303. package/dist/twilight/{p-8d77fc58.entry.js → p-9da90445.entry.js} +1 -1
  304. package/dist/twilight/{p-9td0x-W4.js → p-B5LlhDea.js} +1 -1
  305. package/dist/twilight/p-B9q7ymSg.js +4 -0
  306. package/dist/twilight/{p--ucq83XK.js → p-BNxL6rtA.js} +1 -1
  307. package/dist/twilight/{p-utw6PQ3w.js → p-BQ7LZ-gv.js} +1 -1
  308. package/dist/twilight/{p-DjOBdfDM.js → p-CJNSdTHZ.js} +1 -1
  309. package/dist/twilight/{p-Djm0oxTL.js → p-CKo8lUax.js} +1 -1
  310. package/dist/twilight/{p-B6g8RXLV.js → p-CdiD-2Z3.js} +1 -1
  311. package/dist/twilight/{p-CYbUnAsY.js → p-ClsWSoli.js} +1 -1
  312. package/dist/twilight/{p-D136Y0xG.js → p-D4LxjuhN.js} +1 -1
  313. package/dist/twilight/{p-n3pMJbfq.js → p-DD48ApDW.js} +2 -2
  314. package/dist/twilight/{p-DyQCnC43.js → p-DNerctfJ.js} +1 -1
  315. package/dist/twilight/{p-BXjd-F0j.js → p-DsEuHqot.js} +1 -1
  316. package/dist/twilight/{p-4705b3ee.entry.js → p-a241a76f.entry.js} +1 -1
  317. package/dist/twilight/{p-9f384e06.entry.js → p-a3a666c9.entry.js} +1 -1
  318. package/dist/twilight/{p-0b77c960.entry.js → p-a59e6aa6.entry.js} +1 -1
  319. package/dist/twilight/{p-359351e3.entry.js → p-ab7940b0.entry.js} +1 -1
  320. package/dist/twilight/{p-6bc0a7cb.entry.js → p-ac63d3c2.entry.js} +1 -1
  321. package/dist/twilight/{p-1e1a77d1.entry.js → p-ad96b0eb.entry.js} +1 -1
  322. package/dist/twilight/{p-8aa94d13.entry.js → p-b1ecd1bb.entry.js} +1 -1
  323. package/dist/twilight/{p-8633dca6.entry.js → p-b30b0488.entry.js} +1 -1
  324. package/dist/twilight/{p-1d2bc592.entry.js → p-b5b0ca7c.entry.js} +1 -1
  325. package/dist/twilight/{p-c4297ff7.entry.js → p-b8815e28.entry.js} +1 -1
  326. package/dist/twilight/p-b8cfcf08.entry.js +4 -0
  327. package/dist/twilight/{p-b357f9ea.entry.js → p-b8d5d785.entry.js} +1 -1
  328. package/dist/twilight/{p-a83693c7.entry.js → p-bae0376c.entry.js} +1 -1
  329. package/dist/twilight/{p-a4c2aaf4.entry.js → p-bb7f8555.entry.js} +1 -1
  330. package/dist/twilight/{p-3a3145e4.entry.js → p-bfe4961c.entry.js} +1 -1
  331. package/dist/twilight/{p-d3e569a0.entry.js → p-c6b90867.entry.js} +1 -1
  332. package/dist/twilight/{p-53e47f9d.entry.js → p-c8632eac.entry.js} +1 -1
  333. package/dist/twilight/{p-d90a4f86.entry.js → p-cd5d24ce.entry.js} +1 -1
  334. package/dist/twilight/{p-6183d223.entry.js → p-cdf7bbdf.entry.js} +1 -1
  335. package/dist/twilight/{p-259956fe.entry.js → p-cf07ebbf.entry.js} +1 -1
  336. package/dist/twilight/{p-441fcdb4.entry.js → p-d016060c.entry.js} +1 -1
  337. package/dist/twilight/{p-7daa82fe.entry.js → p-d51142bc.entry.js} +1 -1
  338. package/dist/twilight/p-d8bf2907.entry.js +4 -0
  339. package/dist/twilight/{p-50940460.entry.js → p-d9739d37.entry.js} +1 -1
  340. package/dist/twilight/{p-d7b6f6d3.entry.js → p-dfc15c20.entry.js} +1 -1
  341. package/dist/twilight/p-e81e649c.entry.js +4 -0
  342. package/dist/twilight/{p-d0a173d2.entry.js → p-e85b1ffb.entry.js} +1 -1
  343. package/dist/twilight/{p-4d650b67.entry.js → p-e98fb647.entry.js} +1 -1
  344. package/dist/twilight/{p-07f53154.entry.js → p-eaa6a288.entry.js} +1 -1
  345. package/dist/twilight/{p-fa5c37c2.entry.js → p-f2437a5e.entry.js} +1 -1
  346. package/dist/twilight/{p-16d00717.entry.js → p-f3d815f9.entry.js} +1 -1
  347. package/dist/twilight/{p-0697f8d6.entry.js → p-f7ca9b12.entry.js} +1 -1
  348. package/dist/twilight/{p-d1f54ea9.entry.js → p-fa0363af.entry.js} +1 -1
  349. package/dist/twilight/{p-5202a5a2.entry.js → p-fa560d9b.entry.js} +1 -1
  350. package/dist/twilight/twilight.esm.js +1 -1
  351. package/dist/types/components/salla-modal/salla-modal.d.ts +10 -0
  352. package/dist/types/components/salla-order-options-modal/salla-order-options-modal.d.ts +5 -1
  353. package/dist/types/components/salla-user-settings/salla-user-settings.d.ts +84 -9
  354. package/dist/types/components.d.ts +15 -0
  355. package/package.json +5 -5
  356. package/dist/twilight/p-484522bf.entry.js +0 -4
  357. package/dist/twilight/p-80b34fa0.entry.js +0 -4
  358. package/dist/twilight/p-a53b3edf.entry.js +0 -4
  359. package/dist/twilight/p-bbf6ad7e.entry.js +0 -4
@@ -3,26 +3,92 @@
3
3
  */
4
4
  import { Host, h } from "@stencil/core";
5
5
  import Bullhorn from "../../assets/svg/bullhorn.svg";
6
- import UserOff from "../../assets/svg/user-off.svg";
7
6
  import UserCancel from "../../assets/svg/user-cancel.svg";
8
7
  export class SallaUserSettings {
9
8
  constructor() {
10
- // Texts
11
- this.deactivateAccount = salla.lang.get('pages.profile.deactivate_account');
12
- this.promotionalMsgs = salla.lang.get('pages.profile.promotional_messages');
13
- this.hideMyName = salla.lang.get('pages.profile.hide_my_name');
14
- this.hideMyNameDesc = salla.lang.get('pages.profile.hide_my_name_desc');
15
- this.deactivateDesc = salla.lang.get('pages.profile.deactivate_account_description');
16
- this.promotionalMsgsDesc = salla.lang.get('pages.profile.promotional_messages_description');
17
- this.sorryForLeavingText = salla.lang.get('pages.profile.warning_for_deactivate');
18
- this.warningText = salla.lang.get('pages.profile.sorry_for_leaving');
19
- this.keepAccount = salla.lang.get('pages.profile.keep_account');
20
- this.buttonLoading = false;
9
+ this.otpInputs = [];
10
+ this.deletePendingDays = null;
11
+ this.currentStep = 'confirm';
12
+ this.isDeletePending = false;
13
+ this.otpType = 'email';
14
+ this.otpHasError = false;
15
+ this.otpErrorMessage = '';
16
+ this.isSubmitting = false;
17
+ this.isVerifyingOtp = false;
18
+ this.isSwitchingChannel = false;
19
+ this.resendAfter = 30;
20
+ this.showResendLink = false;
21
21
  this.canHideName = salla.config.get('store.settings.rating.can_customer_hide_name');
22
+ /**
23
+ * Bilingual defaults for delete-account keys.
24
+ * Registered via `salla.lang.addBulk` only when missing, so store/central
25
+ * translations always take precedence.
26
+ */
27
+ this.translationDefaults = {
28
+ 'pages.profile.delete_account': { ar: 'حذف الحساب', en: 'Delete account' },
29
+ 'pages.profile.delete_account_description': {
30
+ ar: 'سيُحذف حسابك وبياناتك من المتجر نهائيًا، بما في ذلك سجل طلباتك.',
31
+ en: 'Your account and data will be permanently deleted from the store, including your order history.',
32
+ },
33
+ 'pages.profile.delete_account_confirm_title': {
34
+ ar: 'هل تريد حذف حسابك؟',
35
+ en: 'Do you want to delete your account?',
36
+ },
37
+ 'pages.profile.delete_account_warning': {
38
+ ar: 'بعد الحذف، ستفقد الوصول إلى بياناتك، بما في ذلك سجل الطلبات، وقائمة الأمنيات، وأي نقاط ولاء أو رصيد متاح في المحفظة.',
39
+ en: 'After deletion, you will lose access to your data, including order history, wishlist, and any loyalty points or wallet balance.',
40
+ },
41
+ 'pages.profile.cancel': { ar: 'إلغاء', en: 'Cancel' },
42
+ 'pages.profile.delete_account_otp_title': {
43
+ ar: 'تأكيد حذف الحساب',
44
+ en: 'Confirm account deletion',
45
+ },
46
+ 'pages.profile.delete_account_otp_instruction': {
47
+ ar: 'للمتابعة، أدخل رمز التحقٌّق المرسل إلى:',
48
+ en: 'To continue, enter the verification code sent to:',
49
+ },
50
+ 'pages.profile.delete_account_confirm_otp': { ar: 'تأكيد الحذف', en: 'Confirm deletion' },
51
+ 'pages.profile.delete_account_otp_required': {
52
+ ar: 'يرجى إدخال رمز التحقٌّق',
53
+ en: 'Please enter the verification code',
54
+ },
55
+ 'pages.profile.delete_account_send_via_phone': {
56
+ ar: 'إرسال عبر الهاتف',
57
+ en: 'Send via phone',
58
+ },
59
+ 'pages.profile.delete_account_send_via_email': {
60
+ ar: 'إرسال عبر البريد الإلكتروني',
61
+ en: 'Send via email',
62
+ },
63
+ 'pages.profile.delete_account_success_title': {
64
+ ar: 'أُرسل طلب حذف الحساب',
65
+ en: 'Account deletion request submitted',
66
+ },
67
+ 'pages.profile.delete_account_success_message': {
68
+ ar: 'سيُحذف حسابك خلال 30 يومًا. يمكنك إلغاء الطلب بتسجيل الدخول مرة أخرى قبل اكتمال الحذف.',
69
+ en: 'Your account will be deleted within 30 days. You can cancel the request by signing in again before deletion is complete.',
70
+ },
71
+ 'pages.profile.ok': { ar: 'موافق', en: 'OK' },
72
+ 'pages.profile.cancel_deletion_request': {
73
+ ar: 'تراجع عن الحذف',
74
+ en: 'Withdraw deletion',
75
+ },
76
+ 'pages.profile.delete_account_pending': {
77
+ ar: 'حسابك مجدول للحذف نهائيًا من المتجر خلال :days يومًا. يمكنك التراجع عن الحذف قبل انقضاء المدة.',
78
+ en: 'Your account will be deleted permanently from the store within :days days. You can withdraw the deletion before the deadline.',
79
+ },
80
+ 'pages.profile.delete_request_cancelled': {
81
+ ar: 'تم إلغاء طلب الحذف',
82
+ en: 'Deletion request cancelled',
83
+ },
84
+ };
85
+ this.registerTranslationDefaults();
86
+ this.loadTranslations();
22
87
  salla.onReady(() => {
23
88
  this.isHiddenName = salla.config.get('user.is_hidden_name');
24
89
  this.isNotifiable = salla.config.get('user.is_notifiable');
25
90
  this.canHideName = salla.config.get('store.settings.rating.can_customer_hide_name');
91
+ this.fetchDeleteRequestStatus();
26
92
  if (!this.isNotifiable || !this.isHiddenName) {
27
93
  salla.event.on('profile::info.fetched', res => {
28
94
  this.isHiddenName = res.data.is_hidden_name;
@@ -31,32 +97,409 @@ export class SallaUserSettings {
31
97
  }
32
98
  });
33
99
  salla.lang.onLoaded(() => {
34
- this.deactivateAccount = salla.lang.get('pages.profile.deactivate_account');
35
- this.promotionalMsgs = salla.lang.get('pages.profile.promotional_messages');
36
- this.hideMyName = salla.lang.get('pages.profile.hide_my_name');
37
- this.hideMyNameDesc = salla.lang.get('pages.profile.hide_my_name_desc');
38
- this.deactivateDesc = salla.lang.get('pages.profile.deactivate_account_description');
39
- this.promotionalMsgsDesc = salla.lang.get('pages.profile.promotional_messages_description');
40
- this.warningText = salla.lang.get('pages.profile.warning_for_deactivate');
41
- this.sorryForLeavingText = salla.lang.get('pages.profile.sorry_for_leaving');
42
- this.keepAccount = salla.lang.get('pages.profile.keep_account');
100
+ this.registerTranslationDefaults();
101
+ this.loadTranslations();
43
102
  });
44
103
  }
104
+ getDaysUntilExecution(executionAt) {
105
+ const executionMs = executionAt > 1e12 ? executionAt : executionAt * 1000;
106
+ return Math.max(0, Math.ceil((executionMs - Date.now()) / 86400000));
107
+ }
108
+ applyPendingMessage() {
109
+ const template = salla.lang.get('pages.profile.delete_account_pending');
110
+ this.deleteAccountPending =
111
+ this.deletePendingDays != null
112
+ ? template.replace(/:days/g, String(salla.helpers.number(this.deletePendingDays)))
113
+ : template;
114
+ }
115
+ async fetchDeleteRequestStatus() {
116
+ try {
117
+ const response = await salla.profile.getDeleteRequest();
118
+ const request = response?.data ?? null;
119
+ const dataRequest = request?.data_request || request;
120
+ const status = dataRequest?.status;
121
+ this.isDeletePending = status === 'pending';
122
+ const executionAt = dataRequest?.execution_at;
123
+ this.deletePendingDays =
124
+ executionAt != null && !Number.isNaN(Number(executionAt))
125
+ ? this.getDaysUntilExecution(Number(executionAt))
126
+ : null;
127
+ this.applyPendingMessage();
128
+ }
129
+ catch {
130
+ // Preserve current pending state. After OTP success we set isDeletePending
131
+ // optimistically; a transient GET failure must not flip the UI back to
132
+ // "Delete account" for a request that is already queued.
133
+ }
134
+ }
135
+ /**
136
+ * Register bilingual (ar/en) defaults without overriding existing translations.
137
+ */
138
+ registerTranslationDefaults() {
139
+ if (!salla?.lang?.addBulk) {
140
+ return;
141
+ }
142
+ const missing = Object.entries(this.translationDefaults).reduce((acc, [key, value]) => {
143
+ if (salla.lang.get(key) === key) {
144
+ acc[key] = value;
145
+ }
146
+ return acc;
147
+ }, {});
148
+ if (Object.keys(missing).length) {
149
+ salla.lang.addBulk(missing);
150
+ }
151
+ }
152
+ loadTranslations() {
153
+ this.deleteAccount = salla.lang.get('pages.profile.delete_account');
154
+ this.deleteAccountDesc = salla.lang.get('pages.profile.delete_account_description');
155
+ this.deleteConfirmTitle = salla.lang.get('pages.profile.delete_account_confirm_title');
156
+ this.deleteAccountWarning = salla.lang.get('pages.profile.delete_account_warning');
157
+ this.cancelLabel = salla.lang.get('pages.profile.cancel');
158
+ this.deleteOtpTitle = salla.lang.get('pages.profile.delete_account_otp_title');
159
+ this.deleteOtpInstruction = salla.lang.get('pages.profile.delete_account_otp_instruction');
160
+ this.deleteConfirmOtp = salla.lang.get('pages.profile.delete_account_confirm_otp');
161
+ this.sendViaPhone = salla.lang.get('pages.profile.delete_account_send_via_phone');
162
+ this.sendViaEmail = salla.lang.get('pages.profile.delete_account_send_via_email');
163
+ this.deleteSuccessTitle = salla.lang.get('pages.profile.delete_account_success_title');
164
+ this.deleteSuccessMessage = salla.lang.get('pages.profile.delete_account_success_message');
165
+ this.okLabel = salla.lang.get('pages.profile.ok');
166
+ this.cancelDeletionRequest = salla.lang.get('pages.profile.cancel_deletion_request');
167
+ this.applyPendingMessage();
168
+ this.resendAfterLabel = salla.lang.get('blocks.header.resend_after');
169
+ this.resendLabel = salla.lang.get('blocks.comments.submit');
170
+ this.promotionalMsgs = salla.lang.get('pages.profile.promotional_messages');
171
+ this.hideMyName = salla.lang.get('pages.profile.hide_my_name');
172
+ this.hideMyNameDesc = salla.lang.get('pages.profile.hide_my_name_desc');
173
+ this.promotionalMsgsDesc = salla.lang.get('pages.profile.promotional_messages_description');
174
+ }
45
175
  toggleSetting(setting, event) {
46
176
  salla.profile.updateSettings({ name: setting, value: event.target.checked });
47
177
  }
48
178
  capitalizeText(str) {
179
+ if (!str)
180
+ return '';
49
181
  return str.charAt(0).toUpperCase() + str.slice(1);
50
182
  }
51
- openDeactivateModal() {
52
- this.confirmationModal.setTitle(this.capitalizeText(this.deactivateAccount));
183
+ getOtpTarget() {
184
+ if (this.otpType === 'email') {
185
+ return salla.config.get('user.email') || '';
186
+ }
187
+ return salla.config.get('user.mobile') || '';
188
+ }
189
+ updateModalForStep() {
190
+ if (!this.confirmationModal)
191
+ return;
192
+ switch (this.currentStep) {
193
+ case 'confirm':
194
+ this.confirmationModal.setTitle(this.capitalizeText(this.deleteConfirmTitle));
195
+ break;
196
+ case 'otp':
197
+ this.confirmationModal.setTitle(this.capitalizeText(this.deleteOtpTitle));
198
+ break;
199
+ case 'success':
200
+ this.confirmationModal.setTitle(this.capitalizeText(this.deleteSuccessTitle));
201
+ break;
202
+ }
203
+ }
204
+ openDeleteModal() {
205
+ this.currentStep = 'confirm';
206
+ this.otpType = 'email';
207
+ this.resetOtpInputs();
208
+ this.clearResendTimer();
209
+ this.updateModalForStep();
53
210
  this.confirmationModal.open();
54
211
  }
55
- async deleteAccount() {
56
- await salla.profile.delete().finally(() => this.confirmationModal.close());
212
+ closeDeleteModal() {
213
+ this.clearResendTimer();
214
+ this.confirmationModal?.close();
215
+ }
216
+ goBackFromOtp() {
217
+ this.clearResendTimer();
218
+ this.resetOtpInputs();
219
+ this.resetOtpError();
220
+ this.currentStep = 'confirm';
221
+ this.updateModalForStep();
222
+ }
223
+ async handleModalVisibilityChanged(event) {
224
+ if (event.detail)
225
+ return;
226
+ this.clearResendTimer();
227
+ const closedAfterSuccess = this.currentStep === 'success';
228
+ if (closedAfterSuccess) {
229
+ this.isDeletePending = true;
230
+ }
231
+ this.currentStep = 'confirm';
232
+ this.resetOtpInputs();
233
+ if (closedAfterSuccess) {
234
+ await this.fetchDeleteRequestStatus();
235
+ }
236
+ }
237
+ formatResendTimer(seconds) {
238
+ const padded = seconds >= 10 ? `${seconds}` : `0${seconds}`;
239
+ return `00 : ${padded}`;
240
+ }
241
+ updateResendTimerDisplay() {
242
+ if (this.timerEl) {
243
+ this.timerEl.innerHTML = this.formatResendTimer(this.resendAfter);
244
+ }
245
+ }
246
+ isDeleteRequestInFlight() {
247
+ return this.isSubmitting || this.isSwitchingChannel || this.isVerifyingOtp;
248
+ }
249
+ async initiateDeleteRequest(source = 'confirm') {
250
+ // Ignore overlapping clicks/auto-retries so loading flags stay paired with one request.
251
+ if (this.isDeleteRequestInFlight()) {
252
+ return;
253
+ }
254
+ if (source === 'switch' || source === 'resend') {
255
+ this.isSwitchingChannel = true;
256
+ }
257
+ else {
258
+ this.isSubmitting = true;
259
+ }
260
+ try {
261
+ await salla.profile.initiateDeleteRequest(this.otpType);
262
+ this.currentStep = 'otp';
263
+ this.updateModalForStep();
264
+ this.resetOtpInputs();
265
+ this.startResendTimer();
266
+ // salla-verify ignores profile::verification while this delete modal is open
267
+ // (and when payload.request_type === 'delete_account').
268
+ setTimeout(() => this.otpInputs[0]?.focus(), 100);
269
+ }
270
+ catch (error) {
271
+ salla.notify?.error?.(error.response?.data?.error?.message || salla.lang.get('common.errors.error_occurred'));
272
+ }
273
+ finally {
274
+ if (source === 'switch' || source === 'resend') {
275
+ this.isSwitchingChannel = false;
276
+ }
277
+ else {
278
+ this.isSubmitting = false;
279
+ }
280
+ }
281
+ }
282
+ async switchOtpChannel() {
283
+ if (this.isDeleteRequestInFlight()) {
284
+ return;
285
+ }
286
+ this.otpType = this.otpType === 'email' ? 'mobile' : 'email';
287
+ await this.initiateDeleteRequest('switch');
288
+ }
289
+ async resendOtp() {
290
+ if (!this.showResendLink || this.isDeleteRequestInFlight())
291
+ return;
292
+ await this.initiateDeleteRequest('resend');
293
+ }
294
+ collectOtpCode() {
295
+ const code = salla.helpers
296
+ .number(this.otpInputs.map(input => input?.value || '').join(''), true)
297
+ .replace(/[^0-9]/g, '');
298
+ if (this.hiddenCodeInput) {
299
+ this.hiddenCodeInput.value = code;
300
+ }
301
+ return code;
302
+ }
303
+ resetOtpError() {
304
+ this.otpHasError = false;
305
+ this.otpErrorMessage = '';
306
+ }
307
+ setOtpError(message) {
308
+ this.otpHasError = true;
309
+ this.otpErrorMessage = message;
310
+ }
311
+ async verifyDeleteOtp() {
312
+ // Auto-fill and the confirm button can both fire — only one verify at a time.
313
+ if (this.isVerifyingOtp || this.isSwitchingChannel) {
314
+ return;
315
+ }
316
+ const code = this.collectOtpCode();
317
+ if (code.length < 4) {
318
+ this.setOtpError(salla.lang.get('pages.profile.delete_account_otp_required'));
319
+ this.otpInputs[code.length]?.focus();
320
+ return;
321
+ }
322
+ this.resetOtpError();
323
+ this.isVerifyingOtp = true;
324
+ try {
325
+ const response = await salla.profile.verifyDeleteRequest({ type: this.otpType, code });
326
+ this.deleteSuccessMessage =
327
+ response?.data?.message || salla.lang.get('pages.profile.delete_account_success_message');
328
+ this.clearResendTimer();
329
+ this.resetOtpInputs();
330
+ this.otpInputs = [];
331
+ this.currentStep = 'success';
332
+ this.updateModalForStep();
333
+ }
334
+ catch (error) {
335
+ this.setOtpError(error.response?.data?.error?.message || salla.lang.get('common.errors.error_occurred'));
336
+ this.resetOtpInputs();
337
+ }
338
+ finally {
339
+ this.isVerifyingOtp = false;
340
+ }
341
+ }
342
+ async confirmSuccess() {
343
+ this.isDeletePending = true;
344
+ this.closeDeleteModal();
345
+ this.currentStep = 'confirm';
346
+ await this.fetchDeleteRequestStatus();
347
+ }
348
+ async cancelDeleteRequest() {
349
+ if (this.isSubmitting) {
350
+ return;
351
+ }
352
+ this.isSubmitting = true;
353
+ try {
354
+ const response = await salla.profile.cancelDeleteRequest();
355
+ const message = response.message || salla.lang.get('pages.profile.delete_request_cancelled');
356
+ this.isDeletePending = false;
357
+ salla.notify?.success?.(message);
358
+ }
359
+ catch (error) {
360
+ salla.notify?.error?.(error.response?.data?.error?.message || salla.lang.get('common.errors.error_occurred'));
361
+ }
362
+ finally {
363
+ this.isSubmitting = false;
364
+ }
365
+ }
366
+ resetOtpInputs() {
367
+ this.otpInputs.forEach(input => {
368
+ if (input)
369
+ input.value = '';
370
+ });
371
+ if (this.hiddenCodeInput) {
372
+ this.hiddenCodeInput.value = '';
373
+ }
374
+ }
375
+ modifyNextOtpInput(el, data) {
376
+ el.value = data[0];
377
+ data = data.substring(1);
378
+ if (el.nextElementSibling && data.length) {
379
+ this.modifyNextOtpInput(el.nextElementSibling, data);
380
+ }
381
+ else if (!el.nextElementSibling && data.length === 0) {
382
+ el.focus();
383
+ }
384
+ else if (el.nextElementSibling && data.length === 0) {
385
+ el.nextElementSibling.focus();
386
+ }
387
+ }
388
+ splitOtpNumber(e) {
389
+ const data = salla.helpers.number(e.data || e.target.value || '', true).replace(/[^0-9]/g, '');
390
+ if (!data || data.length === 1)
391
+ return;
392
+ this.modifyNextOtpInput(e.target, data);
393
+ }
394
+ allOtpInputsFilled() {
395
+ return this.otpInputs.every(input => input?.value);
396
+ }
397
+ handleOtpInput(ev) {
398
+ this.resetOtpError();
399
+ ev.target.value = salla.helpers.number(ev.target.value || '', true);
400
+ salla.helpers.inputDigitsOnly(ev.target);
401
+ if (this.allOtpInputsFilled()) {
402
+ setTimeout(() => this.verifyDeleteOtp(), 100);
403
+ }
404
+ }
405
+ handleOtpKeyUp(ev) {
406
+ this.resetOtpError();
407
+ if (['Alt', 'Shift', 'Control', 'AltGraph', 'Ctrl'].includes(ev.key))
408
+ return;
409
+ const key = ev.keyCode || ev.charCode;
410
+ if (ev.target.value) {
411
+ ev.target.nextElementSibling?.focus();
412
+ ev.target.nextElementSibling?.select();
413
+ }
414
+ else if ([8, 46].includes(key)) {
415
+ ev.target.previousElementSibling?.focus();
416
+ ev.target.previousElementSibling?.select();
417
+ }
418
+ if (ev.target.value.length > 1) {
419
+ this.splitOtpNumber(ev);
420
+ }
421
+ }
422
+ handleOtpPaste(ev) {
423
+ this.resetOtpError();
424
+ const clipboardText = salla.helpers.number(ev.clipboardData.getData('text') || '', true);
425
+ const text = clipboardText.replace(/[^0-9]/g, '').substring(0, this.otpInputs.length);
426
+ this.otpInputs.forEach(input => (input.value = ''));
427
+ if (this.otpInputs[0]) {
428
+ this.modifyNextOtpInput(this.otpInputs[0], text);
429
+ }
430
+ }
431
+ handleOtpFocus(ev) {
432
+ if (ev.target === this.otpInputs[0])
433
+ return;
434
+ if (this.otpInputs[0]?.value === '') {
435
+ this.otpInputs[0].focus();
436
+ }
437
+ if (ev.target.previousElementSibling?.value === '') {
438
+ ev.target.previousElementSibling.focus();
439
+ }
440
+ }
441
+ startResendTimer() {
442
+ this.clearResendTimer();
443
+ this.resendAfter = 30;
444
+ this.showResendLink = false;
445
+ this.updateResendTimerDisplay();
446
+ this.resendTimerId = setInterval(() => {
447
+ this.resendAfter--;
448
+ if (this.resendAfter <= 0) {
449
+ this.clearResendTimer();
450
+ this.showResendLink = true;
451
+ return;
452
+ }
453
+ this.updateResendTimerDisplay();
454
+ }, 1000);
455
+ }
456
+ clearResendTimer() {
457
+ if (this.resendTimerId) {
458
+ clearInterval(this.resendTimerId);
459
+ this.resendTimerId = null;
460
+ }
461
+ this.showResendLink = false;
462
+ }
463
+ renderUserDeleteIcon() {
464
+ 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" })));
465
+ }
466
+ renderConfirmStep() {
467
+ 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)))));
468
+ }
469
+ renderOtpStep() {
470
+ 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: {
471
+ 's-user-settings-delete-otp-codes': true,
472
+ 'has-error': this.otpHasError,
473
+ }, 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: {
474
+ 's-user-settings-delete-otp-input': true,
475
+ 's-has-error': this.otpHasError,
476
+ }, 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 => {
477
+ e.preventDefault();
478
+ this.resendOtp();
479
+ } }, this.resendLabel)));
480
+ }
481
+ renderSuccessStep() {
482
+ 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)))));
483
+ }
484
+ renderDeleteStep() {
485
+ switch (this.currentStep) {
486
+ case 'otp':
487
+ return this.renderOtpStep();
488
+ case 'success':
489
+ return this.renderSuccessStep();
490
+ case 'confirm':
491
+ default:
492
+ return this.renderConfirmStep();
493
+ }
494
+ }
495
+ renderDeleteSectionAction() {
496
+ if (this.isDeletePending) {
497
+ return (h("salla-button", { fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", loading: this.isSubmitting, onClick: () => this.cancelDeleteRequest() }, this.capitalizeText(this.cancelDeletionRequest)));
498
+ }
499
+ return (h("salla-button", { fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeleteModal() }, this.capitalizeText(this.deleteAccount)));
57
500
  }
58
501
  render() {
59
- return (h(Host, { key: 'ae94c12d52ff04f41f08d4a107a35aa2bd94ee0a', class: "s-user-settings-wrapper" }, this.canHideName && h("div", { key: '5b46a680b85fc72976c5c3d4f478b64b6c1d483c', class: "s-user-settings-section" }, h("salla-list-tile", { key: 'b41bb42ea03a2ed63c7664d0b98ee045110c31d0' }, h("div", { key: '29abb43471c5160b7817f153c8968593332e7826', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '3fd763ac2437570eed2073acb6b57cbdd0f1cdac', innerHTML: UserCancel })), h("div", { key: 'cbff9be1b97a31a11d1b10d88d2408070047fd3b', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), h("div", { key: '5fd0a91c56d9b8deeed04fb52a033fe5c1ad84ee', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), h("div", { key: '81ed76bd7b69ae7b16440f131cd78905d33da607', slot: 'action', class: "s-user-settings-section-action" }, h("label", { key: 'ae98c8814636b4e6008c421b291353ba2c4b91e7', class: "s-toggle" }, h("input", { key: '0c01d7706053667e80539a0a293ea21f4304e423', class: "s-toggle-input", checked: this.isHiddenName, onChange: (e) => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), h("div", { key: '31d91e01bc2a28a6cd81af024b99bd42f1a04947', class: "s-toggle-switcher" }))))), h("div", { key: '7dd3c504babb5b79d07d08c5665cd5e080cb9a4d', class: "s-user-settings-section" }, h("salla-list-tile", { key: '9573ce56a617ac5c3e64f7cd868269f7f5f991cd' }, h("div", { key: 'deb424768ebb4b1086067816f4359e5b56da6044', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: 'db74169678f85313ef3b6c9a5ff92f8afaf012c2', innerHTML: Bullhorn })), h("div", { key: '569cc0dd9462bb606dab18116c071acb49fd8f48', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), h("div", { key: 'fbe15f41b42ee2f98585ae29ff985cbe3b6f0ef1', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), h("div", { key: 'c1a4fd8a0a340a73adb9efac7c7d75534b13ce3a', slot: 'action', class: "s-user-settings-section-action" }, h("label", { key: 'fade0f4d1a9214169bb087900561afd482674a75', class: "s-toggle" }, h("input", { key: '87cf0b041a89d79b23c2dd0d929c3b14dd18fb96', class: "s-toggle-input", checked: this.isNotifiable, onChange: (e) => this.toggleSetting('is_notifiable', e), type: "checkbox" }), h("div", { key: '7812c9a8f51a7ad64172db275ac050f8b45ec6e5', class: "s-toggle-switcher" }))))), h("div", { key: '7224d14d365a9fd767e2b900dd1e30c6bee69e7e', class: "s-user-settings-section s-user-settings-section-deactivate-user" }, h("salla-list-tile", { key: 'cb61e0a146115885a36455159d808d7edbbdff5b' }, h("div", { key: 'c073c1bbca5ae9496a4116323611d15f33d68566', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: 'ed78cb19724511219f35ed85e3d915ced708d46c', innerHTML: UserOff })), h("div", { key: 'f8a9ba483b7af0216536a130554186b722f9ad6e', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deactivateAccount)), h("div", { key: 'fd9cdf72725204e320c56b1bd6ac4cf2d77d2176', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.deactivateDesc)), h("div", { key: '739a99cfb762cd18d91c955b218ab0d06a289a9a', slot: 'action', class: "s-user-settings-section-action" }, h("salla-button", { key: 'c2fd322ae8ff4060c21c65cfdd8b1d89bb338e3f', fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeactivateModal() }, this.capitalizeText(this.deactivateAccount))))), h("salla-modal", { key: 'f8c8a2922ffd79d2dc04a35cf964882526b6b91c', width: "sm", subTitle: this.capitalizeText(this.sorryForLeavingText), ref: modal => this.confirmationModal = modal }, h("span", { key: 'b036e50b12f521c0f623ae7afded1113b0fc20ab', slot: 'icon', class: "s-user-settings-confirmation-icon", innerHTML: UserOff }), h("div", { key: '0ae61369ece6d96056e0b461ba7a3e0104e00583', class: "s-user-settings-confirmation" }, h("div", { key: 'ef2eef33396e9eaa0c43d2196e43b61917f3c5fe', class: "s-user-settings-confirmation-warning" }, this.capitalizeText(this.warningText)), h("div", { key: '1656cb466302c11990d5e0d9833b21cb47766846', class: "s-user-settings-confirmation-actions" }, h("salla-button", { key: 'ce75f721106b103e6c7f2cfc75f8be08aba54f9c', width: "wide", onClick: () => this.confirmationModal.close() }, this.capitalizeText(this.keepAccount)), h("salla-button", { key: '006ceecf237eee2febde96ff584eb8256b820049', fill: 'outline', loading: this.buttonLoading, width: "wide", onClick: () => this.deleteAccount() }, this.capitalizeText(this.deactivateAccount)))))));
502
+ 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()))));
60
503
  }
61
504
  static get is() { return "salla-user-settings"; }
62
505
  static get originalStyleUrls() {
@@ -71,16 +514,38 @@ export class SallaUserSettings {
71
514
  }
72
515
  static get states() {
73
516
  return {
74
- "deactivateAccount": {},
517
+ "deleteAccount": {},
518
+ "deleteAccountDesc": {},
519
+ "deleteConfirmTitle": {},
520
+ "deleteAccountWarning": {},
521
+ "cancelLabel": {},
522
+ "deleteOtpTitle": {},
523
+ "deleteOtpInstruction": {},
524
+ "deleteConfirmOtp": {},
525
+ "sendViaPhone": {},
526
+ "sendViaEmail": {},
527
+ "deleteSuccessTitle": {},
528
+ "deleteSuccessMessage": {},
529
+ "okLabel": {},
530
+ "cancelDeletionRequest": {},
531
+ "deleteAccountPending": {},
532
+ "deletePendingDays": {},
533
+ "resendAfterLabel": {},
534
+ "resendLabel": {},
75
535
  "promotionalMsgs": {},
76
536
  "hideMyName": {},
77
537
  "hideMyNameDesc": {},
78
- "deactivateDesc": {},
79
538
  "promotionalMsgsDesc": {},
80
- "sorryForLeavingText": {},
81
- "warningText": {},
82
- "keepAccount": {},
83
- "buttonLoading": {},
539
+ "currentStep": {},
540
+ "isDeletePending": {},
541
+ "otpType": {},
542
+ "otpHasError": {},
543
+ "otpErrorMessage": {},
544
+ "isSubmitting": {},
545
+ "isVerifyingOtp": {},
546
+ "isSwitchingChannel": {},
547
+ "resendAfter": {},
548
+ "showResendLink": {},
84
549
  "canHideName": {},
85
550
  "isHiddenName": {},
86
551
  "isNotifiable": {}
@@ -44,6 +44,14 @@ export class SallaVerify {
44
44
  //todo:: change this way, now we fire the event from the backend, we should listen to salla.profile.event.onUpdated
45
45
  salla.event.on('profile::verification', data => {
46
46
  let payload = Array.isArray(data) ? data[0] : data;
47
+ // Account-deletion OTP is owned by <salla-user-settings>; opening this modal
48
+ // (and auto-reloading) would break that flow. Prefer payload.request_type when
49
+ // present; fall back to the delete modal being open.
50
+ const isDeleteRequest = payload?.request_type === 'delete_account'
51
+ || document.getElementById('salla-user-settings-delete-modal')?.hasAttribute('visible');
52
+ if (isDeleteRequest) {
53
+ return;
54
+ }
47
55
  this.isProfileVerify = true;
48
56
  this.open(payload);
49
57
  this.title = salla.lang.get('pages.profile.verify_title') + salla.lang.get('common.elements.' + payload.type);
@@ -325,7 +325,7 @@ export class SallaWishlistActions {
325
325
  }
326
326
  }
327
327
  render() {
328
- return (h(Host, { key: '6329ecd00f2d08cd0fc485c371e98fe7984502d0' }, h("div", { key: '6e24cd1109ae290196337fe3e1e05cfd074966a9', class: "s-wishlist-actions" }, h("div", { key: '82c29d5b203368059c7883272c36576b19bdfd2d', class: "s-wishlist-actions-bar flex items-center justify-end gap-3 mb-3" }, h("div", { key: '3f85ad6a6e72308b71d506d2fc8687672b00ea7a', class: "s-wishlist-actions-dropdown relative" }, h("salla-button", { key: '56c109a338bc9fa06aebdadb041b6587440fa71a', color: "primary", fill: "outline", type: "button", disabled: !this.hasProducts, "aria-haspopup": "true", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: () => this.toggleMenu() }, h("div", { key: 'f0cf0dc66dd8ce00ac878481bbf21662d1853eba', class: "flex flex-row justify-center items-center gap-2" }, h("svg", { key: '3b97ef84df832a0bc1198319cc63b753da915b37', version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 32 32", style: { width: '16px', height: '16px' } }, h("path", { key: 'e8c626812dad32a5fc3165b58ce76a5c39586f09', d: "M26.667 21.333c-1.699 0-3.196 0.812-4.173 2.052l-11.912-5.211c0.044-0.276 0.085-0.553 0.085-0.841 0-0.472-0.081-0.923-0.197-1.359l12.361-6.952c0.971 1.009 2.328 1.644 3.836 1.644 2.941 0 5.333-2.392 5.333-5.333s-2.392-5.333-5.333-5.333-5.333 2.392-5.333 5.333c0 0.472 0.081 0.923 0.197 1.359l-12.361 6.952c-0.971-1.009-2.328-1.644-3.836-1.644-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333c1.699 0 3.196-0.812 4.173-2.052l11.912 5.211c-0.044 0.276-0.085 0.553-0.085 0.841 0 2.941 2.392 5.333 5.333 5.333s5.333-2.392 5.333-5.333-2.392-5.333-5.333-5.333zM26.667 2.667c1.471 0 2.667 1.196 2.667 2.667s-1.196 2.667-2.667 2.667-2.667-1.196-2.667-2.667 1.196-2.667 2.667-2.667zM5.333 20c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667zM26.667 29.333c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z" })), this.shareLabel, h("svg", { key: '731093a2d4393fe53d63e96ecc48fcb4c4a360d2', version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 32 32", style: { width: '16px', height: '16px' } }, h("path", { key: 'af87c9481389b4b1e544e0ab2eac43db6c164aac', d: "M26.212 10.996c-0.556-0.484-1.396-0.428-1.881 0.127l-8.331 9.519-8.331-9.52c-0.485-0.555-1.327-0.611-1.881-0.125s-0.609 1.328-0.124 1.881l9.333 10.667c0.253 0.291 0.617 0.456 1.003 0.456s0.749-0.165 1.003-0.456l9.333-10.667c0.485-0.553 0.429-1.396-0.124-1.881z" })))), this.menuOpen && (h("ul", { key: '62ce5ade389fb563d2548fd94939f697dbc03d8a', class: "s-wishlist-actions-menu absolute z-20 mt-1 bg-white rounded-lg shadow overflow-hidden" }, h("li", { key: '7cb443687290ce4c7144b71140b68c020bb52dd4' }, h("button", { key: 'd55410bb2f164d267a9c21af2648fbef3fdc1928', type: "button", class: "s-wishlist-actions-menu-item", onClick: () => this.shareAll() }, this.shareAllLabel)), h("li", { key: 'f921f5241b0e7b7ebb228049f84dfe3996081d92' }, h("button", { key: 'dbc903542086266571c21ada73d54dab62f5a3e2', type: "button", class: "s-wishlist-actions-menu-item", onClick: () => this.shareSpecific() }, this.shareSpecificLabel))))), h("salla-social-share", { key: '0e3aec575c1b4aa4cdd5bb2c61f3cc3e90687f23', class: "s-wishlist-actions-social", ref: el => (this.socialShare = el), url: this.shareUrl, mode: "modal", modalTitle: this.shareModalTitle }, h("span", { key: 'bafce0670b980b583398b3d1a997020298e35bed', slot: "widget", class: "s-wishlist-actions-social-anchor", "aria-hidden": "true" }))), this.specificMode && (h("div", { key: '216cd3409541b0f93b26e2f2bfe256a36d0ff37b', class: "s-wishlist-actions-panel flex items-center justify-between gap-4 flex-wrap p-4 mt-3 mb-3 bg-white rounded-lg" }, h("label", { key: '4bf9a1cc508bfc87c229f69a7134bdefae0f9535', class: "s-wishlist-actions-panel-select-all flex items-center gap-2 cursor-pointer" }, h("input", { key: 'fbc39c6513eec5f4b1f281046b509c642ddce3db', type: "checkbox", class: "s-products-list-select-checkbox s-wishlist-actions-select-all", checked: this.isAllSelected, ref: el => (this.selectAllCheckbox = el), "aria-label": this.selectAllLabel, onChange: () => this.toggleSelectAll() }), h("span", { key: '02ba3b818ecb802d8976734738c8042163b6cdae', class: "s-wishlist-actions-panel-title text-sm font-bold text-gray-700" }, this.shareSpecificLabel, " (", this.selectedCount, ")")), h("div", { key: '447df46aa76c1ecb165b7680465ff6c6dfcc967d', class: "s-wishlist-actions-panel-buttons flex items-center gap-2" }, h("salla-button", { key: '36a6360b83dd07d20ca7763e2f12dc93f169c645', class: "s-wishlist-actions-cancel", color: "light", fill: "outline", type: "button", onClick: () => this.cancelSpecific() }, this.cancelLabel), h("salla-button", { key: '3aa46bcd91bf605f7715fcaa5692e4ca0e8f199e', class: "s-wishlist-actions-share", color: "primary", fill: "outline", type: "button", disabled: !this.selectedCount, loading: this.isSharing, onClick: () => this.shareSelected() }, this.shareLabel)))))));
328
+ return (h(Host, { key: 'de4a2a4d63c8b5564d94b8dc0fb44a8f3680b5c4' }, h("div", { key: '6b8b55564d4309018e354aa59d78759023cd80e3', class: "s-wishlist-actions" }, h("div", { key: 'd7596fe51a790b13dadcacaaa22cbb571f66baf3', class: "s-wishlist-actions-bar flex items-center justify-end gap-3 mb-3" }, h("div", { key: 'acd83930774ca11cc9e8294f694a3a7376abbf1c', class: "s-wishlist-actions-dropdown relative" }, h("salla-button", { key: '98d82f820182210e0e7ac0e8709adfcb6081475b', color: "primary", fill: "outline", type: "button", disabled: !this.hasProducts, "aria-haspopup": "true", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: () => this.toggleMenu() }, h("div", { key: '67d68071fa2292a02f20b4fd7e4c2ac484b8a757', class: "flex flex-row justify-center items-center gap-2" }, h("svg", { key: '7b711f7fe2af9fefc4d8c0d99b5f910a776deef0', version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 32 32", style: { width: '16px', height: '16px' } }, h("path", { key: 'ea624787c3344073a5cef9b3e487232536666ffd', d: "M26.667 21.333c-1.699 0-3.196 0.812-4.173 2.052l-11.912-5.211c0.044-0.276 0.085-0.553 0.085-0.841 0-0.472-0.081-0.923-0.197-1.359l12.361-6.952c0.971 1.009 2.328 1.644 3.836 1.644 2.941 0 5.333-2.392 5.333-5.333s-2.392-5.333-5.333-5.333-5.333 2.392-5.333 5.333c0 0.472 0.081 0.923 0.197 1.359l-12.361 6.952c-0.971-1.009-2.328-1.644-3.836-1.644-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333c1.699 0 3.196-0.812 4.173-2.052l11.912 5.211c-0.044 0.276-0.085 0.553-0.085 0.841 0 2.941 2.392 5.333 5.333 5.333s5.333-2.392 5.333-5.333-2.392-5.333-5.333-5.333zM26.667 2.667c1.471 0 2.667 1.196 2.667 2.667s-1.196 2.667-2.667 2.667-2.667-1.196-2.667-2.667 1.196-2.667 2.667-2.667zM5.333 20c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667zM26.667 29.333c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z" })), this.shareLabel, h("svg", { key: 'e282eedc748300a522d39e47447c97952e8a8373', version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 32 32", style: { width: '16px', height: '16px' } }, h("path", { key: 'ac4f11ce0b1401d3da483802a5ac32fe4a02c337', d: "M26.212 10.996c-0.556-0.484-1.396-0.428-1.881 0.127l-8.331 9.519-8.331-9.52c-0.485-0.555-1.327-0.611-1.881-0.125s-0.609 1.328-0.124 1.881l9.333 10.667c0.253 0.291 0.617 0.456 1.003 0.456s0.749-0.165 1.003-0.456l9.333-10.667c0.485-0.553 0.429-1.396-0.124-1.881z" })))), this.menuOpen && (h("ul", { key: 'a066397a5700f00d3b0b66403886d41b7f21358b', class: "s-wishlist-actions-menu absolute z-20 mt-1 bg-white rounded-lg shadow overflow-hidden" }, h("li", { key: 'ee40d5a36486e8573f21671ffb53aece1443db15' }, h("button", { key: 'c686ae70fa97719ea926864de4a4bf767492f0ca', type: "button", class: "s-wishlist-actions-menu-item", onClick: () => this.shareAll() }, this.shareAllLabel)), h("li", { key: '96ccd67e69dc1a2f086f19614163779d29eb0dd3' }, h("button", { key: '0cf1e565c12148c8f4fe875a2b37a78d50e8f959', type: "button", class: "s-wishlist-actions-menu-item", onClick: () => this.shareSpecific() }, this.shareSpecificLabel))))), h("salla-social-share", { key: '728c700ea2b44d766fea3f6c2e71a81c06365466', class: "s-wishlist-actions-social", ref: el => (this.socialShare = el), url: this.shareUrl, mode: "modal", modalTitle: this.shareModalTitle }, h("span", { key: '59663da21c4433cf14461a3f9553ca69e9c4fbd6', slot: "widget", class: "s-wishlist-actions-social-anchor", "aria-hidden": "true" }))), this.specificMode && (h("div", { key: 'ab6c6a841da23bb3011a6f0ea2bfb8feb3bf8d3f', class: "s-wishlist-actions-panel flex items-center justify-between gap-4 flex-wrap p-4 mt-3 mb-3 bg-white rounded-lg" }, h("label", { key: '95594e45d0a8445e77ceb58577543630f8439e9b', class: "s-wishlist-actions-panel-select-all flex items-center gap-2 cursor-pointer" }, h("input", { key: '9652181ae51b2ac2fd5a1dfe26bb4c47e824d08b', type: "checkbox", class: "s-products-list-select-checkbox s-wishlist-actions-select-all", checked: this.isAllSelected, ref: el => (this.selectAllCheckbox = el), "aria-label": this.selectAllLabel, onChange: () => this.toggleSelectAll() }), h("span", { key: '44edd31549879720fc75ae6d6750d8f0b5e263c2', class: "s-wishlist-actions-panel-title text-sm font-bold text-gray-700" }, this.shareSpecificLabel, " (", this.selectedCount, ")")), h("div", { key: 'd3f3ab61ed24868e2cff353f821406d71aa4377b', class: "s-wishlist-actions-panel-buttons flex items-center gap-2" }, h("salla-button", { key: 'c21a5e80fa4c69f9112249c86f6e17512d937b6e', class: "s-wishlist-actions-cancel", color: "light", fill: "outline", type: "button", onClick: () => this.cancelSpecific() }, this.cancelLabel), h("salla-button", { key: '1894863700ac921d131629eb21d6f38d89e29cc6', class: "s-wishlist-actions-share", color: "primary", fill: "outline", type: "button", disabled: !this.selectedCount, loading: this.isSharing, onClick: () => this.shareSelected() }, this.shareLabel)))))));
329
329
  }
330
330
  static get is() { return "salla-wishlist-actions"; }
331
331
  static get originalStyleUrls() {