@salla.sa/twilight-components 2.14.487 → 2.14.488

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 (333) hide show
  1. package/dist/cjs/{filepond-D8YNIT7U.js → filepond-05NO31dc.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-DSZGbtH3.js → filepond-plugin-file-poster-BSzyn1DL.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-CDPCt-vD.js → filepond-plugin-file-validate-size-DJKsosMa.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-PPR9wk_f.js → filepond-plugin-file-validate-type-C0xLud1P.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-CbzNxXz5.js → filepond-plugin-image-edit-Dq1zXDYS.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-CHOCkxIA.js → filepond-plugin-image-exif-orientation-B84Q7JSN.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-DPzPSwHT.js → filepond-plugin-image-preview-BaE9P79l.js} +1 -1
  8. package/dist/cjs/{functions-BJ567SZR.js → functions-B-_Pnqnt.js} +1 -1
  9. package/dist/cjs/{index-AuVRM2C2.js → index-BsvV4QQg.js} +1 -1
  10. package/dist/cjs/{index-KEg0BIuu.js → index-f6loD1zL.js} +6 -2
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +3 -2
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
  21. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +21 -13
  22. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  45. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  47. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  51. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  52. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-cancel.cjs.entry.js +296 -0
  67. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-options-modal_3.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-reward-action_4.cjs.entry.js +3 -3
  86. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-user-menu.cjs.entry.js +5 -2
  97. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  102. package/dist/cjs/{tracked-promise-DFl5fI3j.js → tracked-promise-We1h_qB4.js} +1 -1
  103. package/dist/cjs/twilight.cjs.js +2 -2
  104. package/dist/cjs/{vanilla-picker-CUpM_-PS.js → vanilla-picker-Ck8OFt14.js} +1 -1
  105. package/dist/collection/collection-manifest.json +1 -0
  106. package/dist/collection/components/salla-breadcrumb/salla-breadcrumb.js +2 -1
  107. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +20 -12
  108. package/dist/collection/components/salla-order-cancel/interfaces.js +1 -0
  109. package/dist/collection/components/salla-order-cancel/salla-order-cancel.css +17 -0
  110. package/dist/collection/components/salla-order-cancel/salla-order-cancel.js +366 -0
  111. package/dist/collection/components/salla-user-menu/salla-user-menu.js +4 -1
  112. package/dist/components/index.js +2 -2
  113. package/dist/components/salla-breadcrumb.js +2 -1
  114. package/dist/components/salla-bullet-delivery.js +20 -12
  115. package/dist/components/salla-order-cancel.d.ts +11 -0
  116. package/dist/components/salla-order-cancel.js +347 -0
  117. package/dist/components/salla-user-menu.js +4 -1
  118. package/dist/esm/{filepond-BsLighF8.js → filepond-2lHD_yVt.js} +1 -1
  119. package/dist/esm/{filepond-plugin-file-poster-Bm-5APBo.js → filepond-plugin-file-poster-DIjVVIwh.js} +1 -1
  120. package/dist/esm/{filepond-plugin-file-validate-size-DkYobKMY.js → filepond-plugin-file-validate-size-CfcICNJA.js} +1 -1
  121. package/dist/esm/{filepond-plugin-file-validate-type-BXKbNDGH.js → filepond-plugin-file-validate-type-DsvYMiJr.js} +1 -1
  122. package/dist/esm/{filepond-plugin-image-edit-B64dqBYZ.js → filepond-plugin-image-edit-B7K5Ib7q.js} +1 -1
  123. package/dist/esm/{filepond-plugin-image-exif-orientation-BelOzBrj.js → filepond-plugin-image-exif-orientation-9iz6i-up.js} +1 -1
  124. package/dist/esm/{filepond-plugin-image-preview-X67Ek3oE.js → filepond-plugin-image-preview-C89IBH1s.js} +1 -1
  125. package/dist/esm/{functions-DobdGlrA.js → functions-CJdqLH4P.js} +1 -1
  126. package/dist/esm/{index-yDeCyY3S.js → index-D1YskPUH.js} +1 -1
  127. package/dist/esm/{index-DBMDFsFH.js → index-K0OclOPO.js} +6 -2
  128. package/dist/esm/loader.js +3 -3
  129. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  130. package/dist/esm/salla-accordion_6.entry.js +3 -2
  131. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  132. package/dist/esm/salla-advertisement.entry.js +1 -1
  133. package/dist/esm/salla-alert_2.entry.js +1 -1
  134. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  135. package/dist/esm/salla-apps-icons.entry.js +1 -1
  136. package/dist/esm/salla-badge.entry.js +1 -1
  137. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  138. package/dist/esm/salla-bullet-delivery_2.entry.js +21 -13
  139. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  140. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  141. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  142. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  143. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  144. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  145. package/dist/esm/salla-contacts.entry.js +1 -1
  146. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  147. package/dist/esm/salla-count-down.entry.js +1 -1
  148. package/dist/esm/salla-custom-fields.entry.js +1 -1
  149. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  150. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  151. package/dist/esm/salla-filters-widget.entry.js +1 -1
  152. package/dist/esm/salla-filters.entry.js +1 -1
  153. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  154. package/dist/esm/salla-gifting.entry.js +1 -1
  155. package/dist/esm/salla-hook.entry.js +1 -1
  156. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  157. package/dist/esm/salla-installment.entry.js +1 -1
  158. package/dist/esm/salla-list-tile.entry.js +1 -1
  159. package/dist/esm/salla-localization-modal.entry.js +1 -1
  160. package/dist/esm/salla-login-modal.entry.js +1 -1
  161. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  162. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  163. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  164. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  165. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  166. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  167. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  168. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  169. package/dist/esm/salla-loyalty.entry.js +1 -1
  170. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  171. package/dist/esm/salla-map_2.entry.js +1 -1
  172. package/dist/esm/salla-menu.entry.js +1 -1
  173. package/dist/esm/salla-metadata.entry.js +1 -1
  174. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  175. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  176. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  177. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  178. package/dist/esm/salla-notification-item.entry.js +1 -1
  179. package/dist/esm/salla-notifications.entry.js +1 -1
  180. package/dist/esm/salla-offer-modal.entry.js +1 -1
  181. package/dist/esm/salla-offer.entry.js +1 -1
  182. package/dist/esm/salla-order-branch.entry.js +1 -1
  183. package/dist/esm/salla-order-cancel.entry.js +294 -0
  184. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  185. package/dist/esm/salla-order-details-options.entry.js +1 -1
  186. package/dist/esm/salla-order-details.entry.js +1 -1
  187. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  188. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  189. package/dist/esm/salla-order-edit.entry.js +1 -1
  190. package/dist/esm/salla-order-options-modal_3.entry.js +1 -1
  191. package/dist/esm/salla-order-summary.entry.js +1 -1
  192. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  193. package/dist/esm/salla-orders.entry.js +1 -1
  194. package/dist/esm/salla-payments.entry.js +1 -1
  195. package/dist/esm/salla-placeholder.entry.js +1 -1
  196. package/dist/esm/salla-price-range.entry.js +1 -1
  197. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  198. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  199. package/dist/esm/salla-products-list.entry.js +1 -1
  200. package/dist/esm/salla-quick-order.entry.js +1 -1
  201. package/dist/esm/salla-rating-modal.entry.js +1 -1
  202. package/dist/esm/salla-reward-action_4.entry.js +3 -3
  203. package/dist/esm/salla-scopes.entry.js +1 -1
  204. package/dist/esm/salla-search.entry.js +1 -1
  205. package/dist/esm/salla-skeleton.entry.js +1 -1
  206. package/dist/esm/salla-slider.entry.js +1 -1
  207. package/dist/esm/salla-social-share.entry.js +1 -1
  208. package/dist/esm/salla-social.entry.js +1 -1
  209. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  210. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  211. package/dist/esm/salla-tooltip.entry.js +1 -1
  212. package/dist/esm/salla-trust-badges.entry.js +1 -1
  213. package/dist/esm/salla-user-menu.entry.js +5 -2
  214. package/dist/esm/salla-user-profile.entry.js +1 -1
  215. package/dist/esm/salla-user-settings.entry.js +1 -1
  216. package/dist/esm/salla-verify.entry.js +1 -1
  217. package/dist/esm/salla-wallet.entry.js +1 -1
  218. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  219. package/dist/esm/{tracked-promise-6uJz7V9Q.js → tracked-promise-yWzlErXb.js} +1 -1
  220. package/dist/esm/twilight.js +3 -3
  221. package/dist/esm/{vanilla-picker-Bw2Vk5YA.js → vanilla-picker-Bwq5IBwq.js} +1 -1
  222. package/dist/twilight/{p-3a7f5c6e.entry.js → p-04612ed4.entry.js} +1 -1
  223. package/dist/twilight/{p-44f67d40.entry.js → p-0be72b27.entry.js} +1 -1
  224. package/dist/twilight/{p-46294bef.entry.js → p-0f6a9e5e.entry.js} +1 -1
  225. package/dist/twilight/{p-acd8aa32.entry.js → p-12d485db.entry.js} +1 -1
  226. package/dist/twilight/{p-b3b78bf5.entry.js → p-168bfefc.entry.js} +1 -1
  227. package/dist/twilight/{p-ce0685d1.entry.js → p-1695dd23.entry.js} +1 -1
  228. package/dist/twilight/p-18c99d79.entry.js +4 -0
  229. package/dist/twilight/{p-e84f7790.entry.js → p-1abccd80.entry.js} +1 -1
  230. package/dist/twilight/{p-52cab4a6.entry.js → p-1ec309ad.entry.js} +1 -1
  231. package/dist/twilight/{p-ddd22625.entry.js → p-2368ab21.entry.js} +1 -1
  232. package/dist/twilight/{p-61332673.entry.js → p-24eb59ac.entry.js} +1 -1
  233. package/dist/twilight/{p-76672fe3.entry.js → p-283b7a09.entry.js} +1 -1
  234. package/dist/twilight/{p-c9608410.entry.js → p-28eea468.entry.js} +1 -1
  235. package/dist/twilight/{p-c253f69c.entry.js → p-2ea6c5c6.entry.js} +1 -1
  236. package/dist/twilight/{p-ef06457d.entry.js → p-30796ada.entry.js} +1 -1
  237. package/dist/twilight/{p-4836c3eb.entry.js → p-327d33c2.entry.js} +1 -1
  238. package/dist/twilight/{p-7b0f537a.entry.js → p-363417b6.entry.js} +1 -1
  239. package/dist/twilight/{p-d01178f0.entry.js → p-387e06ce.entry.js} +1 -1
  240. package/dist/twilight/{p-37ced7ab.entry.js → p-38c82b5b.entry.js} +1 -1
  241. package/dist/twilight/{p-C_vo3xPL.js → p-3Yh5uCQZ.js} +1 -1
  242. package/dist/twilight/{p-5e14fbf5.entry.js → p-3cee41e1.entry.js} +1 -1
  243. package/dist/twilight/{p-18efb27e.entry.js → p-3e9bba4f.entry.js} +1 -1
  244. package/dist/twilight/{p-c46cf468.entry.js → p-3f1913e0.entry.js} +1 -1
  245. package/dist/twilight/{p-96779a0c.entry.js → p-416e7ea9.entry.js} +1 -1
  246. package/dist/twilight/{p-1547f282.entry.js → p-44819d23.entry.js} +1 -1
  247. package/dist/twilight/{p-9ab52d09.entry.js → p-44ed9315.entry.js} +1 -1
  248. package/dist/twilight/{p-qj0-UBFk.js → p-4Xs3NevL.js} +1 -1
  249. package/dist/twilight/{p-60545378.entry.js → p-4bdd0eab.entry.js} +1 -1
  250. package/dist/twilight/{p-1bb06699.entry.js → p-4df90b34.entry.js} +1 -1
  251. package/dist/twilight/{p-130633cc.entry.js → p-4e16be16.entry.js} +1 -1
  252. package/dist/twilight/{p-b4f4e0b7.entry.js → p-507e04b3.entry.js} +1 -1
  253. package/dist/twilight/{p-f856fe4d.entry.js → p-52df99a3.entry.js} +1 -1
  254. package/dist/twilight/{p-546b31a3.entry.js → p-54047fdd.entry.js} +1 -1
  255. package/dist/twilight/p-5dbdf0e7.entry.js +4 -0
  256. package/dist/twilight/{p-4f8ec3a6.entry.js → p-5dc0f3c0.entry.js} +1 -1
  257. package/dist/twilight/{p-0c219cad.entry.js → p-5effd85b.entry.js} +2 -2
  258. package/dist/twilight/{p-7bd7baa5.entry.js → p-62e99802.entry.js} +1 -1
  259. package/dist/twilight/{p-fd99de6e.entry.js → p-680e0dca.entry.js} +1 -1
  260. package/dist/twilight/{p-d8fb7f9a.entry.js → p-6e6f4879.entry.js} +1 -1
  261. package/dist/twilight/{p-Dwu1e7SR.js → p-6iwUgroX.js} +1 -1
  262. package/dist/twilight/{p-da827143.entry.js → p-72bc40b3.entry.js} +1 -1
  263. package/dist/twilight/{p-79bff80a.entry.js → p-75345728.entry.js} +1 -1
  264. package/dist/twilight/{p-f267ac72.entry.js → p-76f06b0a.entry.js} +1 -1
  265. package/dist/twilight/{p-4a3ccff2.entry.js → p-7a738892.entry.js} +1 -1
  266. package/dist/twilight/{p-3f153e79.entry.js → p-7ab11977.entry.js} +1 -1
  267. package/dist/twilight/{p-fdb0f6cc.entry.js → p-7cfe5dbf.entry.js} +1 -1
  268. package/dist/twilight/{p-18f264f9.entry.js → p-868b6dcc.entry.js} +1 -1
  269. package/dist/twilight/{p-cc75ae11.entry.js → p-8878ec9e.entry.js} +1 -1
  270. package/dist/twilight/{p-2f48e8e1.entry.js → p-8a274920.entry.js} +1 -1
  271. package/dist/twilight/{p-08dfa3c5.entry.js → p-8b2fb172.entry.js} +1 -1
  272. package/dist/twilight/{p-967d356e.entry.js → p-8b45c13a.entry.js} +1 -1
  273. package/dist/twilight/{p-cf1b9798.entry.js → p-8ba7b32d.entry.js} +1 -1
  274. package/dist/twilight/{p-de41e9b5.entry.js → p-8f204414.entry.js} +1 -1
  275. package/dist/twilight/{p-11f843fd.entry.js → p-906dfda7.entry.js} +1 -1
  276. package/dist/twilight/{p-f5d229a7.entry.js → p-90976775.entry.js} +1 -1
  277. package/dist/twilight/{p-b7da726a.entry.js → p-917bae25.entry.js} +1 -1
  278. package/dist/twilight/{p-51fbf1bb.entry.js → p-95c6ca83.entry.js} +1 -1
  279. package/dist/twilight/{p-ad1d3cdf.entry.js → p-997a1fdf.entry.js} +1 -1
  280. package/dist/twilight/{p-ce1bc4b0.entry.js → p-9cb07624.entry.js} +1 -1
  281. package/dist/twilight/{p-000022be.entry.js → p-9d51f43d.entry.js} +1 -1
  282. package/dist/twilight/{p-00fcfe8e.entry.js → p-9dc6f28e.entry.js} +1 -1
  283. package/dist/twilight/{p-0412fe67.entry.js → p-9efc4b59.entry.js} +1 -1
  284. package/dist/twilight/{p-C_htBBK4.js → p-BF7QVpUp.js} +1 -1
  285. package/dist/twilight/{p-CMW3pjiL.js → p-BHY6Sj5y.js} +1 -1
  286. package/dist/twilight/{p-BTYXaopE.js → p-BZ24UYWJ.js} +1 -1
  287. package/dist/twilight/{p-BR9zeoCF.js → p-BgI56yKL.js} +1 -1
  288. package/dist/twilight/{p-lQbFKmnv.js → p-Bnnviqjp.js} +1 -1
  289. package/dist/twilight/{p-CDTIhPDr.js → p-CJRTPVPy.js} +1 -1
  290. package/dist/twilight/{p-uiIu01tD.js → p-DTwxTvVu.js} +1 -1
  291. package/dist/twilight/{p-CcfoPQKG.js → p-DZu6rifA.js} +1 -1
  292. package/dist/twilight/{p-DBMDFsFH.js → p-K0OclOPO.js} +1 -1
  293. package/dist/twilight/{p-7a5894fb.entry.js → p-b2a12062.entry.js} +1 -1
  294. package/dist/twilight/{p-fa900f26.entry.js → p-b69cc47d.entry.js} +1 -1
  295. package/dist/twilight/{p-49275f85.entry.js → p-bb7d240f.entry.js} +1 -1
  296. package/dist/twilight/{p-57785b92.entry.js → p-bd50d1c4.entry.js} +1 -1
  297. package/dist/twilight/{p-39a49ae9.entry.js → p-c01100d0.entry.js} +1 -1
  298. package/dist/twilight/{p-8a7f48ce.entry.js → p-c19cdf96.entry.js} +1 -1
  299. package/dist/twilight/{p-14e936b0.entry.js → p-c1b56f08.entry.js} +1 -1
  300. package/dist/twilight/{p-29620c50.entry.js → p-c1e7fe98.entry.js} +1 -1
  301. package/dist/twilight/{p-d3d2a114.entry.js → p-c497fa37.entry.js} +1 -1
  302. package/dist/twilight/{p-e21a23d2.entry.js → p-c6026f2e.entry.js} +1 -1
  303. package/dist/twilight/{p-4336dce1.entry.js → p-cb475d27.entry.js} +1 -1
  304. package/dist/twilight/{p-519551ab.entry.js → p-cb9501dc.entry.js} +1 -1
  305. package/dist/twilight/{p-6e2b2072.entry.js → p-ccbf4eea.entry.js} +1 -1
  306. package/dist/twilight/{p-67ce35b0.entry.js → p-cd11cafc.entry.js} +1 -1
  307. package/dist/twilight/{p-b3b050e7.entry.js → p-cdfe32c9.entry.js} +1 -1
  308. package/dist/twilight/{p-ffd6ad27.entry.js → p-d1b3e98b.entry.js} +1 -1
  309. package/dist/twilight/{p-a767d9fe.entry.js → p-d5bbdd47.entry.js} +1 -1
  310. package/dist/twilight/{p-1e418b8f.entry.js → p-d6ace1e8.entry.js} +1 -1
  311. package/dist/twilight/{p-b835777d.entry.js → p-db3da75c.entry.js} +1 -1
  312. package/dist/twilight/{p-24d268c7.entry.js → p-df6739de.entry.js} +1 -1
  313. package/dist/twilight/{p-1450bf80.entry.js → p-e10eed6e.entry.js} +1 -1
  314. package/dist/twilight/{p-636e6994.entry.js → p-e30f415c.entry.js} +1 -1
  315. package/dist/twilight/p-e52bbc5f.entry.js +4 -0
  316. package/dist/twilight/{p-8336df51.entry.js → p-e9439252.entry.js} +1 -1
  317. package/dist/twilight/p-eeb0e354.entry.js +4 -0
  318. package/dist/twilight/p-f4b040f0.entry.js +4 -0
  319. package/dist/twilight/{p-5dfb7601.entry.js → p-f5242092.entry.js} +1 -1
  320. package/dist/twilight/{p-ab404907.entry.js → p-f6c20f25.entry.js} +1 -1
  321. package/dist/twilight/{p-5119fe5d.entry.js → p-f97717b9.entry.js} +1 -1
  322. package/dist/twilight/{p-f12670a1.entry.js → p-fb9f7001.entry.js} +1 -1
  323. package/dist/twilight/{p-6bdcd67d.entry.js → p-fe6e676c.entry.js} +1 -1
  324. package/dist/twilight/twilight.esm.js +1 -1
  325. package/dist/types/components/salla-order-cancel/interfaces.d.ts +20 -0
  326. package/dist/types/components/salla-order-cancel/salla-order-cancel.d.ts +42 -0
  327. package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +1 -0
  328. package/dist/types/components.d.ts +31 -0
  329. package/package.json +5 -5
  330. package/dist/twilight/p-1b4fd0db.entry.js +0 -4
  331. package/dist/twilight/p-b3f26711.entry.js +0 -4
  332. package/dist/twilight/p-cf96947a.entry.js +0 -4
  333. package/dist/twilight/p-e5022e8f.entry.js +0 -4
@@ -0,0 +1,42 @@
1
+ import type { CancellationReason } from './interfaces';
2
+ /** Modal cancellation + cancelled-order header; reads order from salla-order-totals-card. */
3
+ export declare class SallaOrderCancel {
4
+ constructor();
5
+ orderId?: string | number;
6
+ cancellationReasons?: string | CancellationReason[];
7
+ reasons: CancellationReason[];
8
+ selectedReasonId: number | null;
9
+ reasonNote: string;
10
+ confirmLoading: boolean;
11
+ loading: boolean;
12
+ private modalTitleLabel;
13
+ private questionLabel;
14
+ private subtitleLabel;
15
+ private confirmLabel;
16
+ private backLabel;
17
+ private notePlaceholder;
18
+ private charLimitLabel;
19
+ private modal;
20
+ private pageOrder?;
21
+ private orderCancelledReason?;
22
+ onCancellationReasonsChange(): void;
23
+ componentWillLoad(): Promise<void>;
24
+ private refreshLabels;
25
+ private get resolvedOrderId();
26
+ private readPageOrder;
27
+ private waitForPageOrder;
28
+ private cancelledByLabel;
29
+ private mountCancelledHeader;
30
+ private purgeLegacyModal;
31
+ private applyPageOrder;
32
+ private load;
33
+ private reasonLabel;
34
+ private get hasOtherSelected();
35
+ private get canConfirm();
36
+ private selectReason;
37
+ private resetForm;
38
+ private setReasonNote;
39
+ private onKeyActivate;
40
+ private confirmCancel;
41
+ render(): any;
42
+ }
@@ -48,6 +48,7 @@ export declare class SallaUserMenu {
48
48
  private onClickOutside;
49
49
  profileUrl: string;
50
50
  OrderUpdate: number;
51
+ private accountPrefixedKeys;
51
52
  private items;
52
53
  componentWillLoad(): Promise<void>;
53
54
  private loadTranslations;
@@ -20,6 +20,7 @@ import { Point, Prize } from "./components/salla-loyalty-program/interfaces";
20
20
  import { Sources } from "./components/salla-menu/interfaces";
21
21
  import { BundleProduct, BundleSection, SelectedOption } from "./components/salla-multiple-bundle-product/interfaces";
22
22
  import { Notification } from "./components/salla-notifications/interfaces";
23
+ import { CancellationReason } from "./components/salla-order-cancel/interfaces";
23
24
  import { OrderProduct, ProductOption } from "./components/salla-order-details/interfaces";
24
25
  import { OrderEditItem, OrderEditProductOption, OrderEditSelectedOptions } from "./components/salla-order-edit/interfaces";
25
26
  import { Product } from "@salla.sa/twilight/types/common";
@@ -46,6 +47,7 @@ export { Point, Prize } from "./components/salla-loyalty-program/interfaces";
46
47
  export { Sources } from "./components/salla-menu/interfaces";
47
48
  export { BundleProduct, BundleSection, SelectedOption } from "./components/salla-multiple-bundle-product/interfaces";
48
49
  export { Notification } from "./components/salla-notifications/interfaces";
50
+ export { CancellationReason } from "./components/salla-order-cancel/interfaces";
49
51
  export { OrderProduct, ProductOption } from "./components/salla-order-details/interfaces";
50
52
  export { OrderEditItem, OrderEditProductOption, OrderEditSelectedOptions } from "./components/salla-order-edit/interfaces";
51
53
  export { Product } from "@salla.sa/twilight/types/common";
@@ -1944,6 +1946,13 @@ export namespace Components {
1944
1946
  */
1945
1947
  "stackCards": boolean;
1946
1948
  }
1949
+ /**
1950
+ * Modal cancellation + cancelled-order header; reads order from salla-order-totals-card.
1951
+ */
1952
+ interface SallaOrderCancel {
1953
+ "cancellationReasons"?: string | CancellationReason[];
1954
+ "orderId"?: string | number;
1955
+ }
1947
1956
  /**
1948
1957
  * @salla /ui-components
1949
1958
  * The `salla-order-details` component renders a collapsible summary for an order product with optional options list.
@@ -4247,6 +4256,15 @@ declare global {
4247
4256
  prototype: HTMLSallaOrderBranchElement;
4248
4257
  new (): HTMLSallaOrderBranchElement;
4249
4258
  };
4259
+ /**
4260
+ * Modal cancellation + cancelled-order header; reads order from salla-order-totals-card.
4261
+ */
4262
+ interface HTMLSallaOrderCancelElement extends Components.SallaOrderCancel, HTMLStencilElement {
4263
+ }
4264
+ var HTMLSallaOrderCancelElement: {
4265
+ prototype: HTMLSallaOrderCancelElement;
4266
+ new (): HTMLSallaOrderCancelElement;
4267
+ };
4250
4268
  /**
4251
4269
  * @salla /ui-components
4252
4270
  * The `salla-order-details` component renders a collapsible summary for an order product with optional options list.
@@ -4898,6 +4916,7 @@ declare global {
4898
4916
  "salla-offer": HTMLSallaOfferElement;
4899
4917
  "salla-offer-modal": HTMLSallaOfferModalElement;
4900
4918
  "salla-order-branch": HTMLSallaOrderBranchElement;
4919
+ "salla-order-cancel": HTMLSallaOrderCancelElement;
4901
4920
  "salla-order-details": HTMLSallaOrderDetailsElement;
4902
4921
  "salla-order-details-multiple-bundle-product": HTMLSallaOrderDetailsMultipleBundleProductElement;
4903
4922
  "salla-order-details-options": HTMLSallaOrderDetailsOptionsElement;
@@ -6763,6 +6782,13 @@ declare namespace LocalJSX {
6763
6782
  */
6764
6783
  "stackCards"?: boolean;
6765
6784
  }
6785
+ /**
6786
+ * Modal cancellation + cancelled-order header; reads order from salla-order-totals-card.
6787
+ */
6788
+ interface SallaOrderCancel {
6789
+ "cancellationReasons"?: string | CancellationReason[];
6790
+ "orderId"?: string | number;
6791
+ }
6766
6792
  /**
6767
6793
  * @salla /ui-components
6768
6794
  * The `salla-order-details` component renders a collapsible summary for an order product with optional options list.
@@ -8087,6 +8113,7 @@ declare namespace LocalJSX {
8087
8113
  "salla-offer": SallaOffer;
8088
8114
  "salla-offer-modal": SallaOfferModal;
8089
8115
  "salla-order-branch": SallaOrderBranch;
8116
+ "salla-order-cancel": SallaOrderCancel;
8090
8117
  "salla-order-details": SallaOrderDetails;
8091
8118
  "salla-order-details-multiple-bundle-product": SallaOrderDetailsMultipleBundleProduct;
8092
8119
  "salla-order-details-options": SallaOrderDetailsOptions;
@@ -8299,6 +8326,10 @@ declare module "@stencil/core" {
8299
8326
  * The `salla-order-branch` component renders pickup branch details for thank-you pages.
8300
8327
  */
8301
8328
  "salla-order-branch": LocalJSX.SallaOrderBranch & JSXBase.HTMLAttributes<HTMLSallaOrderBranchElement>;
8329
+ /**
8330
+ * Modal cancellation + cancelled-order header; reads order from salla-order-totals-card.
8331
+ */
8332
+ "salla-order-cancel": LocalJSX.SallaOrderCancel & JSXBase.HTMLAttributes<HTMLSallaOrderCancelElement>;
8302
8333
  /**
8303
8334
  * @salla /ui-components
8304
8335
  * The `salla-order-details` component renders a collapsible summary for an order product with optional options list.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight-components",
3
- "version": "2.14.487",
3
+ "version": "2.14.488",
4
4
  "license": "GPL-3.0",
5
5
  "author": "Salla Team <support@salla.dev> (https://salla.dev)",
6
6
  "bugs": {
@@ -81,9 +81,9 @@
81
81
  },
82
82
  "dependencies": {
83
83
  "@googlemaps/markerclusterer": "2.6.2",
84
- "@salla.sa/applepay": "2.14.487",
85
- "@salla.sa/twilight": "2.14.487",
86
- "@salla.sa/twilight-tailwind-theme": "2.14.487",
84
+ "@salla.sa/applepay": "2.14.488",
85
+ "@salla.sa/twilight": "2.14.488",
86
+ "@salla.sa/twilight-tailwind-theme": "2.14.488",
87
87
  "@salla.sa/ui-address-autocomplete-widget": "1.2.1",
88
88
  "@salla.sa/ui-google-map-render": "1.2.1",
89
89
  "@types/node": "^20.4.8",
@@ -104,5 +104,5 @@
104
104
  "vanilla-lazyload": "^17.8.5",
105
105
  "vanilla-picker": "^2.12.2"
106
106
  },
107
- "gitHead": "7fd559e4a1188dc3819652a25a75c1fca32941f2"
107
+ "gitHead": "8b68f85d4e2cf055dd1af016456effee931fe0b4"
108
108
  }
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as e,c as t,h as r,H as a}from"./p-DBMDFsFH.js";const c=class{constructor(r){e(this,r),this.orderEditProductSelected=t(this,"orderEditProductSelected")}get productData(){if(!this.product)return{};if("object"==typeof this.product)return this.product;try{return JSON.parse(this.product)}catch(e){return{}}}handleSelectProduct(){this.orderEditProductSelected.emit({product:this.productData})}render(){const e=this.productData,t=e?.name||salla.lang.getWithDefault("common.elements.product","منتج"),c=e?.price;return r(a,{key:"f5a665dd52e9a3280a81bcf6f6e2f286a11cd417"},r("button",{key:"9a0a846f40962ace66cc20d74cafd768ecf013fe",type:"button",class:"s-order-edit-product-card",onClick:()=>this.handleSelectProduct()},r("div",{key:"28113406f30fccdf5d49ac688e7e55fef27789e8",class:"s-order-edit-product-card-media"},e?.image?.url?r("img",{src:e.image.url,alt:e.image.alt||t,class:"s-order-edit-product-card-image"}):r("div",{class:"s-order-edit-product-card-placeholder"},r("i",{class:"sicon-shopping-bag"}))),r("div",{key:"9210d60532997f80fa165154768483eebbea01f3",class:"s-order-edit-product-card-content"},r("h3",{key:"a91e3b58e83a982ad9b2e855a88fbc7982faace9",class:"s-order-edit-product-card-title"},t),null!=c&&r("p",{key:"7abfe3edb776da102b513803913a4ac69199aa2a",class:"s-order-edit-product-card-price",innerHTML:salla.money(c)}))))}};c.style=":host{display:block;min-width:0}";export{c as salla_order_edit_product_card}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r,h as e}from"./p-DBMDFsFH.js";function s(r){var e,t,a="";if("string"==typeof r||"number"==typeof r)a+=r;else if("object"==typeof r)if(Array.isArray(r))for(e=0;e<r.length;e++)r[e]&&(t=s(r[e]))&&(a&&(a+=" "),a+=t);else for(e in r)r[e]&&(a&&(a+=" "),a+=e);return a}const t=r=>"boolean"==typeof r?"".concat(r):0===r?"0":r,a=function(){for(var r,e,t=0,a="";t<arguments.length;)(r=arguments[t++])&&(e=s(r))&&(a&&(a+=" "),a+=e);return a},l=(n="s-badge-base",i={variants:{size:{xs:"s-badge-xs",sm:"s-badge-sm",md:"s-badge-md"},bg:{transparent:"s-badge-transparent",light:"s-badge-light","primary-100":"s-badge-primary-100"},color:{black:"s-badge-black","primary-900":"s-badge-color-primary-900"}}},r=>{var e;if(null==(null==i?void 0:i.variants))return a(n,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:s,defaultVariants:l}=i,o=Object.keys(s).map((e=>{const a=null==r?void 0:r[e],n=null==l?void 0:l[e];if(null===a)return null;const i=t(a)||t(n);return s[e][i]})),d=r&&Object.entries(r).reduce(((r,e)=>{let[s,t]=e;return void 0===t||(r[s]=t),r}),{}),b=null==i||null===(e=i.compoundVariants)||void 0===e?void 0:e.reduce(((r,e)=>{let{class:s,className:t,...a}=e;return Object.entries(a).every((r=>{let[e,s]=r;return Array.isArray(s)?s.includes({...l,...d}[e]):{...l,...d}[e]===s}))?[...r,s,t]:r}),[]);return a(n,o,b,null==r?void 0:r.class,null==r?void 0:r.className)});var n,i;const o=class{constructor(e){r(this,e),this.size="sm",this.color="black",this.bg="light"}render(){return e("div",{key:"54d35eb76a59251edb581786e5e89a83b6f8fbf0",class:l({size:this.size,bg:this.bg,color:this.color})},e("slot",{key:"4641cb434a2c0a6d7c004e3384848a200cb79dff"}))}};o.style="";export{o as salla_badge}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as s,h as t,H as i,a as e,c as a}from"./p-DBMDFsFH.js";import{A as r,a as l}from"./p-Vqpj4CWE.js";import{S as o}from"./p-8Tsmrwno.js";import{C as n}from"./p-BV4kqbdL.js";import{H as d}from"./p-XnA1YTjA.js";import"./p-CgtvEd63.js";const h=class{constructor(t){s(this,t),this.collapsible=!0,this.bordered=!1,this.size="md",this.collapsed=!0,this.dir=document.dir||"rtl"}directionChangedHandler(s){this.dir=s.detail.dir}handleCollapse(s){this.collapsed=s.detail.payload.collapsed}setcollapsibleProp(){const s=this.host.querySelector("salla-accordion-head");this.collapsible&&s&&(s.setAttribute("collapsible","true"),s.setAttribute("collapsed",this.collapsed.toString()))}componentDidRender(){this.setcollapsibleProp();const s=this.host.querySelector("salla-accordion-body");this.collapsible&&(this.host.setAttribute("data-collapsed",this.collapsed.toString()),s?.setAttribute("data-collapsed",this.collapsed.toString()))}render(){return t(i,{key:"1ea35adcb3558cad1c5e675ed7330e3859c31d20",class:`s-accordion-wrapper ${this.dir} ${this.bordered?"s-accordion-wrapper-bordered":""} ${this.size?`size-${this.size}`:""}`,"data-collapsed":this.collapsed.toString()},t("slot",{key:"596f47501e2080874cd28a304bc55b88409699cf"}))}get host(){return e(this)}};h.style="";const c=class{constructor(t){s(this,t),this.sessionStorageKey="breadcrumb_snapshot",this.itemSlot=this.host.querySelector('[slot="item"]')?.outerHTML||'<li class="s-breadcrumb-item"><a href={url}>{title}</a></li>',this.iconSlot=this.host.querySelector('[slot="icon"]')?.outerHTML}componentWillLoad(){return new Promise((s=>salla.onReady((()=>salla.lang.onLoaded(s))))).then((()=>{if(salla.url.is_page("index"))throw new Error("salla-breadcrumb:: breadcrumb not supported on home page")})).then((()=>{const s=salla.config.get("page");if("wishlist"===s?.slug)return void(this.breadcrumbs=[]);if(!salla.config.get("theme.settings.is_breadcrumbs_enabled",!0))throw new Error("salla-breadcrumb:: merchant disabled the feature");if(!s||!s.slug)return salla.logger.error('salla-breadcrumbs:: page object not existed on salla.config.get("page")!'),void(this.breadcrumbs=[]);let t=this.getSessionBreadcrumbs(),i=t[t.length-1];return"product.single"===s.slug&&t&&t.length>0&&i?.url&&s.parent?.url&&i.url===s.parent.url?(t.push({title:s.title,url:s.url}),this.breadcrumbs=this.setBreadcrumbsFromArray(t),this.storeBreadcrumbSnapshot()):t&&t.length>0?this.isNewPage(s,t)?(this.breadcrumbs=this.generateBreadcrumbs(s),this.storeBreadcrumbSnapshot()):this.breadcrumbs=this.setBreadcrumbsFromArray(t):(this.breadcrumbs=this.generateBreadcrumbs(s),this.storeBreadcrumbSnapshot()),this.breadcrumbs?.length&&(this.breadcrumbs[this.breadcrumbs.length-1].is_last=!0),this.breadcrumbs})).catch((s=>{salla.logger.error("salla-breadcrumb:: unexpected error!",s),this.breadcrumbs=[]}))}getSessionBreadcrumbs(){return"search-bar"===new URLSearchParams(window.location.search).get("from")?[]:JSON.parse(sessionStorage.getItem(this.sessionStorageKey)||"[]")}isNewPage(s,t){const i=t[t.length-1];return i?.url!==s.url}setBreadcrumbsFromArray(s){return s.map(((t,i)=>({...t,is_last:i===s.length-1})))}sanitizeBreadcrumbTitle(s,t=1){if(!s.includes("|"))return s.trim();const i=s.split("|").map((s=>s.trim())).filter(Boolean);return i[t]||i[0]||s.replace(/\|/g,"").trim()}generateBreadcrumbs(s){let t=[];if("product.single"===s.slug){const t=this.getSessionBreadcrumbs(),i=t[t.length-1];if(t.length>0&&i?.url&&s.parent?.url&&i.url===s.parent.url)return this.setBreadcrumbsFromArray([...t,{title:s.title,url:s.url}])}let i=s;for(;i;)i.title&&t.unshift({title:i.title,url:i.url}),i=i.parent;return s.slug.includes("customer")&&"customer.profile"!==s.slug&&t.unshift({title:salla.lang.get("common.titles.profile"),url:salla.url.get("profile")}),s.slug.includes("blog")&&t.unshift({title:salla.lang.get("blocks.footer.blog"),url:salla.url.get("blog")}),"brands.single"===s.slug&&t.unshift({title:salla.lang.get("common.titles.brands"),url:salla.url.get("brands")}),s.title||"loyalty"!==s.slug||t.unshift({title:salla.lang.get("common.titles.loyalty_program"),url:salla.url.get("loyalty")}),t.unshift({title:salla.lang.get("common.titles.home"),url:salla.url.get("")}),t}storeBreadcrumbSnapshot(){try{const s=salla.config.get("page");if("product.single"===s?.slug||"wishlist"===s?.slug)return;const t=[...this.breadcrumbs],i=t.length-1;i>=0&&(t[i].url=window.location.href);const e=JSON.stringify(t);sessionStorage.setItem(this.sessionStorageKey,e)}catch(s){salla.logger.error("salla-breadcrumb:: Failed to store breadcrumb snapshot in sessionStorage.",s)}}render(){if(this.breadcrumbs.length<=1)return salla.log("salla-breadcrumb:: There is no breadcrumbs!"),null;if("wishlist"===salla.config.get("page.slug"))return null;const s="product.single"===salla.config.get("page.slug");return[t("ol",{class:{"s-breadcrumb-wrapper":!0,"s-breadcrumb-dark":salla.url.is_page("loyalty"),"s-breadcrumb-primary-reverse":salla.config.get("page.slug").includes("customer")}},this.breadcrumbs.map((i=>{const e=s&&i.is_last?i.title:this.sanitizeBreadcrumbTitle(i.title),a=this.itemSlot.replace(/\{url\}/g,i.url).replace(/\{title\}/g,e);return[t("div",{class:"s-breadcrumb-slot",innerHTML:a}),this.getArrowDomForItem(i)]}))),t("script",{type:"application/ld+json",innerHTML:this.getJsonLd(s)})]}getJsonLd(s){const t=this.breadcrumbs.map(((t,i)=>{const e={"@type":"ListItem",position:i+1,name:s&&t.is_last?t.title:this.sanitizeBreadcrumbTitle(t.title)};return!t.is_last&&t.url&&(e.item=this.toAbsoluteUrl(t.url)),e}));return JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:t}).replace(/</g,"\\u003c")}toAbsoluteUrl(s){try{return new URL(s,window.location.origin).href}catch{return s}}getArrowDomForItem(s){if(s.is_last)return"";let i=this.iconSlot||(salla.config.get("theme.is_rtl",!0)?r:l);return t("li",{class:"s-breadcrumb-arrow"},t("div",{class:{"s-breadcrumb-icon-slot":!0,"s-breadcrumb-default-icon":!this.iconSlot},innerHTML:i}))}componentDidRender(){this.host.querySelectorAll(".s-breadcrumb-slot").forEach((s=>s.replaceWith(s.firstChild))),this.host.querySelectorAll(".s-breadcrumb-icon-slot.s-breadcrumb-default-icon").forEach((s=>s.replaceWith(s.querySelector("svg")))),this.host.querySelector('[slot="item"]')?.remove(),this.host.querySelector('[slot="icon"]')?.remove();let s=this.host.querySelectorAll(".s-breadcrumb-item")[this.breadcrumbs.length-1]?.querySelector("a");s&&s.replaceWith(s.firstChild)}componentDidLoad(){"wishlist"===salla.config.get("page.slug")&&document.getElementById("page-main-title")?.remove()}get host(){return e(this)}};c.style=":host{display:block}";const u=class{constructor(t){s(this,t),this.shape="btn",this.color="primary",this.fill="solid",this.size="medium",this.width="normal",this.loading=!1,this.disabled=!1,this.loaderPosition="after",this.type="button"}async load(){return"center"==this.loaderPosition&&this.text.classList.add("s-button-hide"),this.host.setAttribute("loading",""),this.host}async stop(){return this.host.removeAttribute("loading"),this.host.querySelector("button").removeAttribute("loading"),"center"==this.loaderPosition&&this.text.classList.remove("s-button-hide"),this.host}async setText(s){return this.text.innerHTML=s,this.host}async disable(){return this.host.setAttribute("disabled",""),this.host}async enable(){return this.host.removeAttribute("disabled"),this.host}getBtnAttributes(){const s={};for(let t=0;t<this.host.attributes.length;t++)["color","fill","size","width","id"].includes(this.host.attributes[t].name)||(s[this.host.attributes[t].name]=this.host.attributes[t].value);s.type=s.type||this.type;const t=s.class||"";return s.class=t+" s-button-element s-button-"+this.shape+" s-button-"+("none"==this.fill?"fill-none":this.fill)+("medium"!=this.size?" s-button-"+this.size:"")+("normal"!=this.width?" s-button-"+this.width:"")+("link"==this.shape?" s-button-"+this.color+"-link":"")+("link"!=this.shape&&"outline"!=this.fill?" s-button-"+this.color:"")+("outline"==this.fill?" s-button-"+this.color+"-outline":"")+(this.disabled?" s-button-disabled ":"")+("icon"==this.shape?" s-button-loader-center":" s-button-loader-"+this.loaderPosition),s["aria-label"]||s["aria-labelledby"]||(this.host.textContent||"").trim()||(t.includes("btn--wishlist")||t.includes("wishlist")?s["aria-label"]=salla.lang.getWithDefault("pages.products.add_to_wishlist","Add or remove to wishlist"):"icon"===this.shape&&console.warn("Icon button is missing aria-label attribute")),s}button(){return t("button",{...this.getBtnAttributes(),disabled:this.disabled},t("span",{class:"s-button-text",ref:s=>this.text=s},t("slot",null)),this.loading?t("span",{class:"s-button-loader"}):"")}render(){return this.host.closest(".swiper-slide")?.classList.contains("swiper-slide-duplicate")?"":t(i,{class:"s-button-wrap"},this.href?t("a",{href:this.href},this.button()):this.button())}get host(){return e(this)}};u.style="";var m='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>alert-engine</title>\n<path d="M16 18.673c-0.736 0-1.333 0.604-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.597 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327zM2.667 16c0-3.092 1.083-6.105 3.047-8.484 0.469-0.568 0.389-1.408-0.179-1.877-0.568-0.468-1.408-0.388-1.877 0.179-2.359 2.857-3.657 6.473-3.657 10.183s1.299 7.325 3.657 10.183c0.264 0.319 0.645 0.484 1.029 0.484 0.299 0 0.6-0.1 0.848-0.305 0.568-0.469 0.648-1.309 0.179-1.877-1.964-2.379-3.047-5.392-3.047-8.484zM16 10.667c-0.736 0-1.333 0.597-1.333 1.333v4c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-4c0-0.736-0.597-1.333-1.333-1.333zM16 5.333c-5.881 0-10.667 4.785-10.667 10.667s4.785 10.667 10.667 10.667 10.667-4.785 10.667-10.667-4.785-10.667-10.667-10.667zM16 24c-4.412 0-8-3.588-8-8s3.588-8 8-8 8 3.588 8 8-3.588 8-8 8zM28.343 5.817c-0.469-0.567-1.307-0.647-1.877-0.179-0.568 0.469-0.648 1.309-0.179 1.877 1.964 2.379 3.047 5.392 3.047 8.484s-1.083 6.105-3.047 8.484c-0.469 0.568-0.389 1.408 0.179 1.877 0.249 0.205 0.549 0.305 0.848 0.305 0.384 0 0.765-0.165 1.028-0.484 2.36-2.857 3.659-6.473 3.659-10.183s-1.299-7.325-3.657-10.183z"></path>\n</svg>\n';const b=class{constructor(t){s(this,t),this.drawerVisibilityChanged=a(this,"drawerVisibilityChanged"),this.isClosable=!0,this.width="md",this.position="right",this.visible=!1,this.hasSkeleton=!1,this.isLoading=!1,this.subTitleFirst=!1,this.noPadding=!1,this.subTitle="",this.centered=!1,this.iconStyle=void 0,salla.event.on("drawer::open",(s=>s==this.host.id&&this.open())),salla.event.on("drawer::close",(s=>s==this.host.id&&this.close())),this.drawerTitle=this.host.getAttribute("drawer-title")}handleVisible(s){if(!s)return this.drawerVisibilityChanged.emit(!1),void this.toggleDrawer(!1);this.drawerVisibilityChanged.emit(!0),this.host.classList.remove("s-hidden"),setTimeout((()=>this.toggleDrawer(!0)))}handleKeyUp(s){"Escape"===s.key&&this.closeDrawer()}async open(){return this.host.setAttribute("visible",""),this.handleAutoFocus(),this.host}async close(){return this.host.removeAttribute("visible"),this.host}async setTitle(s){return this.drawerTitle=s,this.host}async loading(){return this.isLoading=!0,this.host}async stopLoading(){return this.isLoading=!1,this.host}handleAutoFocus(){const s=this.host.querySelector("input, textarea, select");s&&setTimeout((()=>{s.focus()}),100)}toggleDrawer(s){const t=this.host.querySelector(".s-drawer-body");d.toggleElementClassIf(t,"s-drawer-entering","s-drawer-leaving",(()=>s)).toggleElementClassIf(this.overlay,"s-drawer-entering","s-drawer-overlay-leaving",(()=>s)).toggleElementClassIf(document.body,"drawer-is-open","drawer-is-closed",(()=>s)),s||setTimeout((()=>this.host.classList.add("s-hidden")),350)}closeDrawer(s){this.isClosable&&(salla.event.dispatch("drawer::close",{reason:s}),this.host.removeAttribute("visible"))}iconBlockClasses(){return{"s-drawer-icon":!0,"s-drawer-bg-error":"error"==this.iconStyle,"s-drawer-bg-success":"success"==this.iconStyle,"s-drawer-bg-normal":!this.iconStyle,"s-drawer-bg-primary":"primary"==this.iconStyle}}getWidth(){return this.isLoading?this.hasSkeleton?"md":"xs":this.width}render(){return this.host.id=this.host.id||"salla-drawer",this.isLoading?t(i,{class:"salla-drawer s-drawer s-drawer-container s-hidden","aria-modal":"true",role:"dialog",onKeyUp:s=>this.handleKeyUp(s)},t("div",{class:"s-drawer-overlay s-drawer-overlay-leaving",ref:s=>this.overlay=s,onClick:()=>this.closeDrawer("backdropClick")}),t("div",{class:"s-drawer-wrapper s-drawer-wrapper-"+this.position},t("div",{class:"s-drawer-body flex justify-center s-drawer-leaving s-drawer-"+this.position+" s-drawer-"+this.getWidth()+(this.noPadding?" s-drawer-nopadding":" s-drawer-padding")},t("slot",{name:"loading"},t("salla-loading",null)),t("div",{class:"s-hidden"},t("slot",null))))):t(i,{class:"salla-drawer s-drawer s-drawer-container s-hidden","aria-modal":"true",role:"dialog"},t("div",{class:"s-drawer-overlay s-drawer-overlay-leaving",ref:s=>this.overlay=s,onClick:()=>this.closeDrawer("backdropClick")}),t("div",{class:"s-drawer-wrapper s-drawer-wrapper-"+this.position},t("div",{class:"s-drawer-body s-drawer-leaving s-drawer-"+this.position+" s-drawer-"+this.getWidth()+(this.noPadding?" s-drawer-nopadding":" s-drawer-padding")},t("div",{class:{"s-drawer-header":!0,"s-drawer-is-center":this.centered}},this.isClosable?t("button",{class:"s-drawer-close",onClick:()=>this.closeDrawer("closeButtonClick"),type:"button"},t("span",{innerHTML:o})):"",this.drawerTitle||this.subTitle?t("div",{class:"s-drawer-header-inner"},t("slot",{name:"icon"},this.iconStyle?t("div",{class:this.iconBlockClasses(),innerHTML:"error"==this.iconStyle?m:n}):""),t("div",{class:"s-drawer-header-content"},this.drawerTitle?t("div",{class:{"s-drawer-title":!0,"s-drawer-title-below":this.subTitleFirst},innerHTML:this.drawerTitle}):"",this.subTitle?t("p",{class:{"s-drawer-sub-title":!0},innerHTML:this.subTitle}):"")):""),t("slot",null),t("slot",{name:"footer"}))))}componentDidLoad(){document.body.append(this.host)}get host(){return e(this)}static get watchers(){return{visible:["handleVisible"]}}};b.style="";const p=class{constructor(t){s(this,t),this.size=32,this.width=2,this.color=void 0,this.bgColor="#e5e7eb"}render(){return t(i,{key:"a3ab1e66f7b26628e7bfb1f5560127d042203cf3",class:"s-loading-container"},t("svg",{key:"e33089cee347160eaea4ded8ab8a5543a91f5ea1","aria-hidden":"true",style:{width:`${this.size}px`,height:`${this.size}px`,fill:this.color,color:this.bgColor},class:"s-loading",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"8163f98231203552ea3f514ac3b8cd16a8d9426c",d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),t("path",{key:"959ea259b039d16be8b9dc39a2fb2e409bfffe0e",d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})))}};p.style=".s-loading{animation:spin 1s linear infinite;fill:var(--color-primary)}.s-loading-container{display:flex;justify-content:center;align-items:center}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";const g=class{constructor(t){s(this,t),this.modalVisibilityChanged=a(this,"modalVisibilityChanged"),this.isClosable=!0,this.width="md",this.position="middle",this.visible=!1,this.hasSkeleton=!1,this.isLoading=!1,this.subTitleFirst=!1,this.noPadding=!1,this.subTitle="",this.centered=!1,this.iconStyle=void 0,salla.event.on("modal::open",(s=>s==this.host.id&&this.open())),salla.event.on("modal::close",(s=>s==this.host.id&&this.close())),this.modalTitle=this.host.getAttribute("modal-title")}handleVisible(s){if(!s)return this.modalVisibilityChanged.emit(!1),void this.toggleModal(!1);this.modalVisibilityChanged.emit(!0),this.host.classList.remove("s-hidden"),setTimeout((()=>this.toggleModal(!0)))}handleKeyUp(s){"KeyUp"===s.key&&this.closeModal()}async open(){return this.host.setAttribute("visible",""),this.handleAutoFocus(),this.host}async close(){return this.host.removeAttribute("visible"),this.host}async setTitle(s){return this.modalTitle=s,this.host}async loading(){return this.isLoading=!0,this.host}async stopLoading(){return this.isLoading=!1,this.host}handleAutoFocus(){const s=this.host.querySelector("input, textarea, select");s&&setTimeout((()=>{s.focus()}),100)}toggleModal(s){const t=this.host.querySelector(".s-modal-body");d.toggleElementClassIf(t,"s-modal-entering","s-modal-leaving",(()=>s)).toggleElementClassIf(this.overlay,"s-modal-entering","s-modal-overlay-leaving",(()=>s)).toggleElementClassIf(document.body,"modal-is-open","modal-is-closed",(()=>s)),s||setTimeout((()=>this.host.classList.add("s-hidden")),350)}closeModal(s){this.isClosable&&(salla.event.dispatch("modal::close",{reason:s}),this.host.removeAttribute("visible"))}iconBlockClasses(){return{"s-modal-icon":!0,"s-modal-bg-error":"error"==this.iconStyle,"s-modal-bg-success":"success"==this.iconStyle,"s-modal-bg-normal":!this.iconStyle,"s-modal-bg-primary":"primary"==this.iconStyle}}getWidth(){return this.isLoading?this.hasSkeleton?"md":"xs":this.width}render(){return this.host.id=this.host.id||"salla-modal",this.isLoading?t(i,{class:"salla-modal s-modal s-modal-container s-hidden","aria-modal":"true",role:"dialog",onKeyUp:s=>this.handleKeyUp(s)},t("div",{class:"s-modal-overlay",ref:s=>this.overlay=s,onClick:()=>this.closeModal("backdropClick")}),t("div",{class:"s-modal-wrapper"},t("span",{class:"s-modal-spacer s-modal-align-"+this.position},"​"),t("div",{class:"s-modal-body s-modal-align-"+this.position+" s-modal-"+this.getWidth()+(this.noPadding?" s-modal-nopadding":" s-modal-padding")},t("slot",{name:"loading"},t("salla-loading",null)),t("div",{class:"s-hidden"},t("slot",null))))):t(i,{class:"salla-modal s-modal s-modal-container s-hidden","aria-modal":"true",role:"dialog"},t("div",{class:"s-modal-overlay",ref:s=>this.overlay=s,onClick:()=>this.closeModal("backdropClick")}),t("div",{class:"s-modal-wrapper"},t("span",{class:"s-modal-spacer s-modal-align-"+this.position},"​"),t("div",{class:"s-modal-body s-modal-align-"+this.position+" s-modal-"+this.getWidth()+(this.noPadding?" s-modal-nopadding":" s-modal-padding")},t("div",{class:{"s-modal-header":!0,"s-modal-is-center":this.centered}},this.isClosable?t("button",{class:"s-modal-close",onClick:()=>this.closeModal("closeButtonClick"),type:"button"},t("span",{innerHTML:o})):"",this.modalTitle||this.subTitle?t("div",{class:"s-modal-header-inner"},t("slot",{name:"icon"},this.iconStyle?t("div",{class:this.iconBlockClasses(),innerHTML:"error"==this.iconStyle?m:n}):""),t("div",{class:"s-modal-header-content"},this.modalTitle?t("div",{class:{"s-modal-title":!0,"s-modal-title-below":this.subTitleFirst},innerHTML:this.modalTitle}):"",this.subTitle?t("p",{class:{"s-modal-sub-title":!0},innerHTML:this.subTitle}):"")):""),t("slot",null),t("slot",{name:"footer"}))))}componentDidLoad(){document.body.append(this.host)}get host(){return e(this)}static get watchers(){return{visible:["handleVisible"]}}};g.style="@media screen and (max-width: 470px){.modal-is-open{position:fixed;width:100%}}";export{h as salla_accordion,c as salla_breadcrumb,u as salla_button,b as salla_drawer,p as salla_loading,g as salla_modal}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as s,h as t,H as e,a as l}from"./p-DBMDFsFH.js";import{A as i}from"./p-DCZbpt2a.js";import{B as a}from"./p-D3mWkc-3.js";import{P as o}from"./p-DY4LZmNP.js";import{W as n}from"./p-ZT7ehBBk.js";import{S as r}from"./p-8Tsmrwno.js";import{S as h}from"./p-D4oPi1Ov.js";import{S as c}from"./p-CXRKXFgT.js";var m='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>user-circle</title>\n<path d="M16 22.964c-4.525 0-8.447 1.713-9.993 4.365-0.371 0.636-0.156 1.452 0.48 1.823s1.453 0.156 1.823-0.48c0.855-1.465 3.624-3.041 7.689-3.041s6.835 1.576 7.689 3.041c0.249 0.424 0.696 0.661 1.155 0.661 0.228 0 0.459-0.059 0.669-0.181 0.637-0.371 0.852-1.187 0.48-1.823-1.545-2.652-5.467-4.365-9.992-4.365zM22.667 13.631c0-3.676-2.991-6.667-6.667-6.667s-6.667 2.991-6.667 6.667 2.991 6.667 6.667 6.667 6.667-2.992 6.667-6.667zM12 13.631c0-2.205 1.795-4 4-4s4 1.795 4 4-1.795 4-4 4-4-1.795-4-4zM16 0.297c-8.823 0-16 7.177-16 16 0 2.941 0.821 5.831 2.373 8.357 0.252 0.411 0.689 0.636 1.137 0.636 0.239 0 0.479-0.064 0.696-0.197 0.628-0.385 0.824-1.207 0.439-1.833-1.295-2.108-1.979-4.516-1.979-6.963 0-7.352 5.981-13.333 13.333-13.333s13.333 5.981 13.333 13.333c0 2.448-0.684 4.856-1.979 6.961-0.385 0.628-0.189 1.448 0.437 1.835 0.627 0.384 1.448 0.189 1.835-0.437 1.553-2.527 2.373-5.416 2.373-8.359 0-8.823-7.177-16-16-16z"></path>\n</svg>\n';const u=class{constructor(t){s(this,t),this.accountLoading=!1,this.opened=!1,this.notifications=salla.lang.get("common.titles.notifications"),this.orders=salla.lang.get("common.titles.orders"),this.pending_orders=salla.lang.get("common.titles.pending_orders"),this.wishlist=salla.lang.get("common.titles.wishlist"),this.profile=salla.lang.get("common.titles.profile"),this.rating=salla.lang.get("common.titles.rating"),this.wallet=salla.lang.get("common.titles.wallet"),this.settings=salla.lang.get("common.titles.settings"),this.loyalty_points=salla.lang.get("pages.loyalty_program.loyalty_points"),this.logout=salla.lang.get("blocks.header.logout"),this.hello=salla.lang.get("pages.checkout.hello"),this.first_name=salla.storage.get("user.first_name")||"",this.last_name=salla.storage.get("user.last_name")||"",this.avatar=salla.storage.get("user.avatar")||salla.url.cdn("images/avatar.png",40,40),this.badges={notifications:salla.helpers.number(salla.storage.get("user.notifications")||0),pending_orders:salla.helpers.number(salla.storage.get("user.pending_orders")||0)},this.sallaAccountEnabled=!1,this.hasBadges=Number(salla.storage.get("user.pending_orders"))>0||Number(salla.storage.get("user.notifications"))>0,this.inline=!1,this.avatarOnly=!1,this.showHeader=!1,this.relativeDropdown=!1,this.showTrigger=!1,this.onClickOutside=()=>{this.opened=!1},this.OrderUpdate=0,this.items={notifications:a,orders:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>box-bankers</title>\n<path d="M28 1.333h-24c-2.205 0-4 1.795-4 4v5.333c0 0.736 0.597 1.333 1.333 1.333v14.667c0 2.205 1.795 4 4 4h21.333c2.205 0 4-1.795 4-4v-14.667c0.736 0 1.333-0.597 1.333-1.333v-5.333c0-2.205-1.795-4-4-4zM28 26.667c0 0.735-0.599 1.333-1.333 1.333h-21.333c-0.735 0-1.333-0.599-1.333-1.333v-14.667h5.333v2.667c0 1.471 1.196 2.667 2.667 2.667h8c1.471 0 2.667-1.196 2.667-2.667v-2.667h5.333zM12 14.667v-2.667h8v2.667zM29.333 9.333h-26.667v-4c0-0.735 0.599-1.333 1.333-1.333h24c0.735 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n',pending_orders:o,wishlist:n,wallet:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>wallet</title>\n<path d="M28 6.667h-24c-0.736 0-1.333-0.597-1.333-1.333s0.597-1.333 1.333-1.333h24c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-24c-2.204 0-3.999 1.793-4 3.997v18.669c0 3.676 2.991 6.667 6.667 6.667h21.333c2.205 0 4-1.795 4-4v-16c0-2.205-1.795-4-4-4zM29.333 26.667c0 0.736-0.597 1.333-1.333 1.333h-21.333c-2.205 0-4-1.795-4-4v-14.895c0.416 0.147 0.865 0.228 1.333 0.228h24c0.736 0 1.333 0.597 1.333 1.333zM22.667 14.667c-2.205 0-4 1.795-4 4s1.795 4 4 4 4-1.795 4-4-1.795-4-4-4zM22.667 20c-0.736 0-1.333-0.597-1.333-1.333s0.597-1.333 1.333-1.333 1.333 0.597 1.333 1.333-0.597 1.333-1.333 1.333z"></path>\n</svg>\n',loyalty_points:c,profile:m}}async componentWillLoad(){await salla.onReady(),await salla.lang.onLoaded(),this.loadTranslations(),this.initiate(),Salla.event.on("api::token.injected",(s=>this.profileUrl=this.buildProfileUrl(s))),this.sallaAccountEnabled=Salla.config.get("store.features")?.includes("salla-account"),this.items=this.sallaAccountEnabled?{...this.items,settings:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>settings</title>\n<path d="M29.717 19.037l-1.817-1.499c0.067-0.512 0.1-1.028 0.1-1.539s-0.033-1.027-0.1-1.54l1.817-1.499c1.177-0.969 1.479-2.633 0.716-3.956l-1.159-2.009c-0.761-1.324-2.349-1.895-3.784-1.359l-2.212 0.829c-0.817-0.627-1.704-1.139-2.649-1.535l-0.388-2.332c-0.251-1.507-1.54-2.6-3.067-2.6h-2.319c-1.525 0-2.815 1.093-3.065 2.6l-0.388 2.332c-0.945 0.396-1.833 0.909-2.649 1.535l-2.212-0.829c-1.428-0.533-3.021 0.036-3.783 1.359l-1.16 2.011c-0.763 1.323-0.46 2.985 0.716 3.955l1.817 1.499c-0.067 0.513-0.1 1.029-0.1 1.54s0.033 1.027 0.1 1.539l-1.819 1.5c-1.176 0.971-1.476 2.635-0.715 3.955l1.159 2.011c0.763 1.324 2.356 1.899 3.784 1.36l2.212-0.831c0.816 0.625 1.703 1.139 2.649 1.535l0.388 2.332c0.251 1.507 1.54 2.6 3.067 2.6h2.319c1.527 0 2.816-1.093 3.065-2.6l0.389-2.332c0.947-0.396 1.833-0.909 2.649-1.535l2.212 0.831c1.432 0.539 3.023-0.035 3.783-1.36l1.16-2.011c0.76-1.32 0.459-2.984-0.717-3.956zM28.123 21.663l-1.16 2.011c-0.108 0.188-0.336 0.267-0.536 0.193l-2.931-1.1c-0.459-0.173-0.979-0.079-1.349 0.248-0.923 0.811-1.979 1.423-3.139 1.819-0.464 0.157-0.804 0.559-0.885 1.043l-0.515 3.087c-0.033 0.215-0.216 0.371-0.433 0.371h-2.319c-0.217 0-0.4-0.156-0.436-0.371l-0.513-3.087c-0.080-0.484-0.42-0.884-0.885-1.043-1.16-0.396-2.216-1.008-3.139-1.819-0.248-0.217-0.561-0.332-0.88-0.332-0.157 0-0.316 0.028-0.469 0.084l-2.931 1.1c-0.199 0.079-0.428-0.004-0.537-0.193l-1.159-2.011c-0.109-0.191-0.067-0.428 0.101-0.568l2.409-1.985c0.379-0.312 0.555-0.807 0.46-1.288-0.119-0.605-0.179-1.219-0.179-1.821 0-0.604 0.060-1.217 0.181-1.823 0.095-0.481-0.081-0.976-0.46-1.288l-2.409-1.985c-0.168-0.139-0.211-0.376-0.101-0.567l1.16-2.011c0.107-0.188 0.332-0.268 0.536-0.193l2.931 1.1c0.459 0.172 0.979 0.079 1.348-0.247 0.924-0.812 1.98-1.424 3.139-1.817 0.465-0.159 0.805-0.559 0.885-1.044l0.513-3.088c0.036-0.215 0.219-0.371 0.436-0.371h2.319c0.217 0 0.4 0.156 0.436 0.371l0.515 3.088c0.081 0.484 0.42 0.885 0.885 1.044 1.157 0.393 2.213 1.005 3.139 1.817 0.371 0.325 0.889 0.42 1.349 0.247l2.929-1.099c0.203-0.076 0.428 0.005 0.537 0.193l1.159 2.009c0.109 0.191 0.067 0.428-0.101 0.567l-2.409 1.985c-0.379 0.312-0.555 0.807-0.46 1.288 0.119 0.605 0.179 1.219 0.179 1.823 0 0.603-0.060 1.216-0.181 1.821-0.095 0.48 0.081 0.975 0.46 1.288l2.408 1.984c0.169 0.141 0.212 0.379 0.103 0.569zM16.016 10.667c-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333 5.333-2.392 5.333-5.333-2.392-5.333-5.333-5.333zM16.016 18.667c-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"></path>\n</svg>\n'}:this.items,this.host.hasAttribute("with-rating")&&(this.items.rating=h),this.items.logout='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>send-out</title>\n<path d="M16 26.667h-9.333c-0.736 0-1.333-0.597-1.333-1.333v-18.667c0-0.736 0.597-1.333 1.333-1.333h9.333c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333h-9.333c-2.205 0-4 1.795-4 4v18.667c0 2.205 1.795 4 4 4h9.333c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333zM29.231 15.491c-0.068-0.164-0.167-0.312-0.289-0.436l-5.332-5.332c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l3.057 3.059h-12.781c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h12.781l-3.057 3.057c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l5.332-5.332c0.124-0.123 0.221-0.271 0.289-0.435 0.135-0.325 0.135-0.693 0-1.019z"></path>\n</svg>\n';let s=Salla.storage.get("token");s||(s=""),this.profileUrl=this.buildProfileUrl(s);const t=this.host.querySelector('[slot="trigger"]');this.triggerSlot='<div class="s-user-menu-trigger"><div class="s-user-menu-avatar-wrap"><img class="s-user-menu-trigger-avatar" src="{avatar}" alt="{first_name}{last_name}" /></div><div class="s-user-menu-trigger-content"><span class="s-user-menu-trigger-hello">{hello}</span><p class="s-user-menu-trigger-name">{first_name} {last_name}</p></div> <i class="s-user-menu-trigger-icon">{icon}</i></div>',t&&(this.triggerSlot=t.innerHTML,t.innerHTML=this.replaceParams(t.innerHTML))}loadTranslations(){this.notifications=Salla.lang.get("common.titles.notifications"),this.orders=Salla.lang.get("common.titles.orders"),this.pending_orders=Salla.lang.get("common.titles.pending_orders"),this.wishlist=Salla.lang.get("common.titles.wishlist"),this.profile=Salla.lang.get("common.titles.profile"),this.hello=Salla.lang.get("pages.checkout.hello"),this.rating=Salla.lang.get("common.titles.rating"),this.wallet=Salla.lang.get("common.titles.wallet"),this.settings=Salla.lang.get("common.titles.settings"),this.loyalty_points=Salla.lang.get("pages.loyalty_program.loyalty_points"),this.logout=Salla.lang.get("blocks.header.logout")}initiate(){return Salla.config.isGuest()?this.autoMountLoginModal():(this.is_loggedIn=!0,!this.inline&&(salla.url.is_page("customer.notifications")||salla.url.is_page("customer.orders.index.pending")||salla.url.is_page("customer.profile")||(Date.now()-(salla.storage.get("user.fetched_at")||0))/1e3/60>30)?this.fetchFreshProfile():void salla.event.on("profile::info.fetched",(s=>{this.updateProfileState(s)})))}autoMountLoginModal(){this.showTrigger&&(document.querySelector("salla-login-modal")||Salla.hooks.mount("body:end",document.createElement("salla-login-modal")))}fetchFreshProfile(){salla.api.token?salla.profile.api.info().then((s=>{this.updateProfileState(s)})):salla.log("trying to fetchFreshProfile before injected the token!!")}updateProfileState(s){this.badges={notifications:salla.helpers.number(s.data.notifications||0),pending_orders:salla.helpers.number(s.data.pending_orders||0)},this.hasBadges=Number(s.data.pending_orders)>0||Number(s.data.notifications)>0,this.first_name=s.data.first_name,this.last_name=s.data.last_name,this.avatar=s.data.avatar||salla.url.cdn("images/avatar.png",40,40)}async open(s){this.opened=!this.opened,s.stopPropagation(),this.opened&&window.addEventListener("click",this.onClickOutside)}menuItemClicked(s,t){"logout"===t&&(s.preventDefault(),salla.auth.logout("sall-user-menu"))}replaceParams(s){return s.replace(/\{hello\}/g,this.hello).replace(/\{first_name\}/g,this.first_name).replace(/\{last_name\}/g,this.last_name).replace(/\{avatar\}/g,this.avatar).replace(/\{icon\}/g,i)}getTheHeader(){return t("div",{class:{"s-user-menu-trigger-slot":!0,"s-user-menu-red-dot":this.hasBadges,"s-user-menu-trigger-avatar-only":this.avatarOnly},id:"trigger-slot",onClick:s=>this.open(s),onKeyUp:s=>this.open(s),innerHTML:this.replaceParams(this.triggerSlot)})}getItemAnchorLinkAttrs(s){return"profile"===s&&this.profileUrl&&this.sallaAccountEnabled?{href:this.profileUrl,target:"_blank",rel:"noopener noreferrer"}:{href:Salla.url.get("loyalty_points"===s?"loyalty":s)}}getMenuItem([s,e],l){if(("wallet"!==s||window.can_access_wallet)&&("loyalty_points"!==s||Salla.config.get("store.features").includes("loyalty-system")))return t("li",{class:{"s-user-menu-dropdown-item":!0,"s-user-menu-dropdown-item-logout":l+1===Object.entries(this.items).length}},t("a",{...this.getItemAnchorLinkAttrs(s),class:"s-user-menu-dropdown-item-link",onClick:t=>this.menuItemClicked(t,s)},t("i",{class:"s-user-menu-dropdown-item-prefix",innerHTML:e}),t("span",{class:"s-user-menu-dropdown-item-title"},this[s]),["٠","0",void 0].includes(this.badges[s])?"":t("span",{class:"s-user-menu-dropdown-item-badge"},this.badges[s])))}componentShouldUpdate(){this.opened||window.removeEventListener("click",this.onClickOutside)}render(){return t(e,null,this.is_loggedIn?this.inline?t("ul",{class:"s-user-menu-inline"},Object.entries(this.items).map(((s,t)=>this.getMenuItem(s,t)))):t("div",{class:{"s-user-menu-wrapper":!0,"s-user-menu-relative-dropdown":this.relativeDropdown}},this.getTheHeader(),t("div",{class:{"s-user-menu-toggler":!0,opened:this.opened}},t("div",{class:"s-user-menu-dropdown",onClick:s=>s.stopPropagation(),onKeyUp:s=>s.stopPropagation()},this.showHeader?t("div",{class:"s-user-menu-dropdown-header"},t("img",{src:this.avatar,alt:`${this.first_name} ${this.last_name}`}),t("div",{class:"s-user-menu-dropdown-header-content"},t("span",null,this.hello),t("p",null,this.first_name," ",this.last_name)),t("button",{type:"button",class:"s-user-menu-dropdown-header-close",innerHTML:r,onClick:()=>{this.opened=!1}})):"",t("ul",{class:"s-user-menu-dropdown-list"},Object.entries(this.items).map(((s,t)=>this.getMenuItem(s,t))))))):t("slot",{name:"login-btn"},t("button",{type:"button",class:"s-user-menu-login-btn",onClick:()=>salla.event.dispatch("login::open"),innerHTML:m})))}async componentDidLoad(){await Salla.hooks.registerComponent("salla-user-menu",this),document.lazyLoadInstance?.update(this.host.querySelectorAll(".lazy"))}buildProfileUrl(s){return`${Salla.config.get("account.url","https://accounts.salla.com")}/${salla.config.get("user.language_code")}/user?store=${Salla.config.get("store.id")}&info=${encodeURIComponent(s)}`}get host(){return l(this)}};u.style="";export{u as salla_user_menu}