@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,366 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { h, Host } from "@stencil/core";
5
+ const MAX_NOTE = 250;
6
+ const ORDER_WAIT_MS = 2500;
7
+ const DATE_HEADER = 'td.single-order-header-item:not(.flex)';
8
+ const CANCELLED_MARKER = '[data-salla-order-cancelled-reason]';
9
+ const CANCELLED_BY_LABELS = {
10
+ customer: 'أُلغي الطلب من قِبل العميل',
11
+ merchant: 'أُلغي الطلب من قِبل المتجر',
12
+ };
13
+ const LANG_PAIRS = [
14
+ ['pages.orders.cancel_modal_title', 'إلغاء الطلب', 'Cancel order'],
15
+ ['pages.orders.cancel_reason_title', 'لماذا ترغب في إلغاء الطلب؟', 'Why do you want to cancel this order?'],
16
+ ['pages.orders.cancel_reason_subtitle', 'ساعدنا نعرف السبب لتحسين تجربتك.', 'Help us understand why to improve your experience.'],
17
+ ['pages.orders.cancel_reason_confirm', 'تأكيد إلغاء الطلب', 'Confirm order cancellation'],
18
+ ['pages.orders.cancel_reason_back', 'تراجع', 'Go back'],
19
+ ['pages.orders.cancel_reason_note_placeholder', 'اذكر السبب', 'Mention the reason'],
20
+ ['pages.orders.cancelled_by_customer', CANCELLED_BY_LABELS.customer, 'Order cancelled by the customer'],
21
+ ['pages.orders.cancelled_by_merchant', CANCELLED_BY_LABELS.merchant, 'Order cancelled by the merchant'],
22
+ ['pages.orders.cancel_reason_char_limit', 'يتجاوز النص حد الأحرف المسموح', 'Text exceeds the allowed character limit'],
23
+ ];
24
+ const parseJson = (value) => {
25
+ if (!value)
26
+ return null;
27
+ try {
28
+ const data = typeof value === 'string' ? JSON.parse(value) : value;
29
+ return data && typeof data === 'object' ? data : null;
30
+ }
31
+ catch {
32
+ return null;
33
+ }
34
+ };
35
+ const parseCancelledReason = (raw) => {
36
+ const data = parseJson(raw);
37
+ const reasons = Array.isArray(data?.reasons)
38
+ ? data.reasons.filter((r) => typeof r === 'string' && r.length > 0)
39
+ : [];
40
+ if (!reasons.length)
41
+ return null;
42
+ return { cancelled_by: data?.cancelled_by === 'merchant' ? 'merchant' : 'customer', reasons };
43
+ };
44
+ const normalizeReasons = (reasons) => reasons.filter(r => r.is_active !== false).sort((a, b) => (a.sort ?? 0) - (b.sort ?? 0));
45
+ const parseReasonsProp = (value) => {
46
+ if (value == null || value === '')
47
+ return null;
48
+ const parsed = typeof value === 'string' ? parseJson(value) : value;
49
+ return Array.isArray(parsed) && parsed.length ? parsed : null;
50
+ };
51
+ /** Modal cancellation + cancelled-order header; reads order from salla-order-totals-card. */
52
+ export class SallaOrderCancel {
53
+ constructor() {
54
+ this.reasons = [];
55
+ this.selectedReasonId = null;
56
+ this.reasonNote = '';
57
+ this.confirmLoading = false;
58
+ this.loading = true;
59
+ this.modalTitleLabel = '';
60
+ this.questionLabel = '';
61
+ this.subtitleLabel = '';
62
+ this.confirmLabel = '';
63
+ this.backLabel = '';
64
+ this.notePlaceholder = '';
65
+ this.charLimitLabel = '';
66
+ salla.lang.onLoaded(() => {
67
+ const ar = salla.lang.messages?.['ar.trans'];
68
+ const en = salla.lang.messages?.['en.trans'];
69
+ if (ar && en && salla.helpers?.setNested) {
70
+ for (const [key, arText, enText] of LANG_PAIRS) {
71
+ salla.helpers.setNested(ar, key, arText);
72
+ salla.helpers.setNested(en, key, enText);
73
+ }
74
+ }
75
+ this.refreshLabels();
76
+ });
77
+ }
78
+ onCancellationReasonsChange() {
79
+ void this.load();
80
+ }
81
+ async componentWillLoad() {
82
+ await salla.onReady();
83
+ this.refreshLabels();
84
+ await this.load();
85
+ }
86
+ refreshLabels() {
87
+ const t = (key, fb) => salla.lang.getWithDefault(key, fb);
88
+ this.modalTitleLabel = t('pages.orders.cancel_modal_title', 'إلغاء الطلب');
89
+ this.questionLabel = t('pages.orders.cancel_reason_title', 'لماذا ترغب في إلغاء الطلب؟');
90
+ this.subtitleLabel = t('pages.orders.cancel_reason_subtitle', 'ساعدنا نعرف السبب لتحسين تجربتك.');
91
+ this.confirmLabel = t('pages.orders.cancel_reason_confirm', 'تأكيد إلغاء الطلب');
92
+ this.backLabel = t('pages.orders.cancel_reason_back', 'تراجع');
93
+ this.notePlaceholder = t('pages.orders.cancel_reason_note_placeholder', 'اذكر السبب');
94
+ this.charLimitLabel = t('pages.orders.cancel_reason_char_limit', 'يتجاوز النص حد الأحرف المسموح');
95
+ }
96
+ get resolvedOrderId() {
97
+ const id = this.orderId ?? this.pageOrder?.id ?? salla.config.get('page.id');
98
+ const n = Number(id);
99
+ return Number.isFinite(n) ? n : id;
100
+ }
101
+ readPageOrder() {
102
+ const el = document.querySelector('salla-order-totals-card');
103
+ return el ? parseJson(el.order ?? el.getAttribute('order')) : null;
104
+ }
105
+ waitForPageOrder() {
106
+ const order = this.readPageOrder();
107
+ if (order)
108
+ return Promise.resolve(order);
109
+ if (typeof MutationObserver === 'undefined') {
110
+ // ponytail: jsdom has no MutationObserver; one microtask retry for spec DOM
111
+ return Promise.resolve().then(() => this.readPageOrder());
112
+ }
113
+ return new Promise(resolve => {
114
+ let settled = false;
115
+ const finish = () => {
116
+ if (settled)
117
+ return;
118
+ settled = true;
119
+ observer.disconnect();
120
+ clearTimeout(timer);
121
+ resolve(this.readPageOrder());
122
+ };
123
+ const card = document.querySelector('salla-order-totals-card');
124
+ const observer = new MutationObserver(finish);
125
+ observer.observe(card ?? document.documentElement, card
126
+ ? { attributes: true, attributeFilter: ['order'] }
127
+ : { childList: true, subtree: true, attributes: true, attributeFilter: ['order'] });
128
+ const timer = setTimeout(finish, ORDER_WAIT_MS);
129
+ });
130
+ }
131
+ cancelledByLabel(by) {
132
+ return salla.lang.getWithDefault(`pages.orders.cancelled_by_${by}`, CANCELLED_BY_LABELS[by]);
133
+ }
134
+ mountCancelledHeader(attempt = 0) {
135
+ const cancelled = this.orderCancelledReason;
136
+ const reason = cancelled?.reasons[0];
137
+ if (!reason || document.querySelector(CANCELLED_MARKER))
138
+ return;
139
+ const anchor = document.querySelector(DATE_HEADER);
140
+ if (!anchor) {
141
+ // ponytail: hook mounts before header table in single.twig; retry until anchor exists
142
+ if (attempt < 20)
143
+ requestAnimationFrame(() => this.mountCancelledHeader(attempt + 1));
144
+ return;
145
+ }
146
+ const cell = document.createElement('td');
147
+ cell.className = 's-order-cancel-cancelled-header-item';
148
+ cell.setAttribute('data-salla-order-cancelled-reason', '');
149
+ const label = document.createElement('div');
150
+ label.className = 's-order-cancel-cancelled-header-label';
151
+ label.textContent = this.cancelledByLabel(cancelled.cancelled_by);
152
+ const value = document.createElement('b');
153
+ value.className = 's-order-cancel-cancelled-header-reason';
154
+ value.textContent = reason;
155
+ value.title = reason;
156
+ cell.append(label, value);
157
+ anchor.insertAdjacentElement('afterend', cell);
158
+ }
159
+ purgeLegacyModal() {
160
+ if (!this.reasons.length)
161
+ return;
162
+ for (const el of document.querySelectorAll('salla-modal#modal-order-cancel:not([data-salla-order-cancel])')) {
163
+ el.remove();
164
+ }
165
+ }
166
+ applyPageOrder(order) {
167
+ this.pageOrder = order;
168
+ this.orderCancelledReason = parseCancelledReason(order.order_cancelled_reason) ?? undefined;
169
+ }
170
+ async load() {
171
+ this.loading = true;
172
+ try {
173
+ const fromProp = parseReasonsProp(this.cancellationReasons);
174
+ if (!this.pageOrder) {
175
+ const order = this.readPageOrder();
176
+ if (order)
177
+ this.applyPageOrder(order);
178
+ }
179
+ if (!this.pageOrder && !fromProp) {
180
+ const order = await this.waitForPageOrder();
181
+ if (order)
182
+ this.applyPageOrder(order);
183
+ }
184
+ else if (!this.pageOrder) {
185
+ void this.waitForPageOrder().then(order => {
186
+ if (order) {
187
+ this.applyPageOrder(order);
188
+ this.mountCancelledHeader();
189
+ }
190
+ });
191
+ }
192
+ const order = this.pageOrder;
193
+ this.reasons = fromProp
194
+ ? normalizeReasons(fromProp)
195
+ : order
196
+ ? normalizeReasons(Array.isArray(order.cancellation_reasons) ? order.cancellation_reasons : [])
197
+ : [];
198
+ }
199
+ finally {
200
+ this.loading = false;
201
+ this.purgeLegacyModal();
202
+ this.mountCancelledHeader();
203
+ }
204
+ }
205
+ reasonLabel(reason) {
206
+ const locale = salla.lang.getLocale?.() || 'ar';
207
+ return reason.translations?.[locale]?.name || reason.name;
208
+ }
209
+ get hasOtherSelected() {
210
+ return this.selectedReasonId !== null && this.reasons.some(r => r.id === this.selectedReasonId && r.slug === 'other');
211
+ }
212
+ get canConfirm() {
213
+ if (this.selectedReasonId === null)
214
+ return false;
215
+ if (!this.hasOtherSelected)
216
+ return true;
217
+ const len = this.reasonNote.trim().length;
218
+ return len > 0 && len <= MAX_NOTE;
219
+ }
220
+ selectReason(id) {
221
+ if (this.selectedReasonId === id) {
222
+ if (this.reasons.find(r => r.id === id)?.slug === 'other')
223
+ this.reasonNote = '';
224
+ this.selectedReasonId = null;
225
+ return;
226
+ }
227
+ if (this.reasons.find(r => r.id === this.selectedReasonId)?.slug === 'other') {
228
+ this.reasonNote = '';
229
+ }
230
+ this.selectedReasonId = id;
231
+ if (this.reasons.length && this.reasons[this.reasons.length - 1].id === id) {
232
+ const timer = setTimeout(() => {
233
+ requestAnimationFrame(() => {
234
+ document.getElementById(`s-order-cancel-reason-${id}`)?.scrollIntoView({ block: 'start', behavior: 'smooth' });
235
+ const textarea = document.querySelector('.s-order-cancel-textarea');
236
+ textarea?.focus();
237
+ clearTimeout(timer);
238
+ });
239
+ }, 200);
240
+ }
241
+ }
242
+ resetForm() {
243
+ this.selectedReasonId = null;
244
+ this.reasonNote = '';
245
+ this.confirmLoading = false;
246
+ }
247
+ setReasonNote(event) {
248
+ this.reasonNote = event.target.value;
249
+ }
250
+ onKeyActivate(event, action) {
251
+ if (event.key === 'Enter' || event.key === ' ')
252
+ action();
253
+ }
254
+ async confirmCancel() {
255
+ if (!this.canConfirm || this.confirmLoading)
256
+ return;
257
+ this.confirmLoading = true;
258
+ try {
259
+ const note = this.hasOtherSelected ? this.reasonNote.trim() : '';
260
+ const payload = {
261
+ reasons: [String(this.selectedReasonId)],
262
+ ...(note && { reason_note: note }),
263
+ };
264
+ await salla.order.api.cancel(this.resolvedOrderId, payload);
265
+ window.location.reload();
266
+ }
267
+ catch {
268
+ this.confirmLoading = false;
269
+ }
270
+ }
271
+ render() {
272
+ if (this.loading || !this.reasons.length)
273
+ return h(Host, { class: "s-order-cancel-wrapper" });
274
+ return (h(Host, { class: "s-order-cancel-wrapper" }, h("salla-modal", { id: "modal-order-cancel", class: "s-order-cancel-modal", "data-salla-order-cancel": "", ref: el => {
275
+ this.modal = el;
276
+ void el?.setTitle?.(this.modalTitleLabel);
277
+ }, width: "sm", onModalVisibilityChanged: e => !e.detail && this.resetForm() }, h("div", { class: "s-order-cancel-content" }, h("div", { class: "s-order-cancel-intro" }, h("p", { class: "s-order-cancel-heading" }, this.questionLabel), h("p", { class: "s-order-cancel-subtitle" }, this.subtitleLabel)), h("div", { class: "s-order-cancel-reasons s-scrollbar" }, this.reasons.map(reason => {
278
+ const id = `s-order-cancel-reason-${reason.id}`;
279
+ return (h("label", { key: reason.id, class: "s-order-cancel-reason", htmlFor: id }, h("input", { type: "radio", name: "cancellation_reason", id: id, class: "s-order-cancel-radio s-radio", checked: this.selectedReasonId === reason.id, onChange: () => this.selectReason(reason.id) }), h("span", { class: "s-order-cancel-reason-label" }, this.reasonLabel(reason))));
280
+ })), this.hasOtherSelected && (h("div", { class: "s-order-cancel-other-field" }, h("textarea", { class: "s-order-cancel-textarea", placeholder: this.notePlaceholder, value: this.reasonNote, onInput: e => this.setReasonNote(e) }), h("p", { class: {
281
+ 's-order-cancel-counter': true,
282
+ 's-order-cancel-counter--limit': this.reasonNote.length >= MAX_NOTE,
283
+ } }, this.reasonNote.length >= MAX_NOTE && `${this.charLimitLabel} `, MAX_NOTE, "/", this.reasonNote.length))), h("div", { class: "s-order-cancel-actions" }, h("salla-button", { color: "primary", class: "w-full", width: "wide", disabled: !this.canConfirm, loading: this.confirmLoading, onClick: () => this.confirmCancel(), onKeyDown: e => this.onKeyActivate(e, () => this.confirmCancel()) }, this.confirmLabel), h("salla-button", { class: "w-full", width: "wide", fill: "outline", color: "gray", onClick: () => this.modal?.close(), onKeyDown: e => this.onKeyActivate(e, () => this.modal?.close()) }, this.backLabel))))));
284
+ }
285
+ static get is() { return "salla-order-cancel"; }
286
+ static get originalStyleUrls() {
287
+ return {
288
+ "$": ["salla-order-cancel.scss"]
289
+ };
290
+ }
291
+ static get styleUrls() {
292
+ return {
293
+ "$": ["salla-order-cancel.css"]
294
+ };
295
+ }
296
+ static get properties() {
297
+ return {
298
+ "orderId": {
299
+ "type": "any",
300
+ "attribute": "order-id",
301
+ "mutable": false,
302
+ "complexType": {
303
+ "original": "string | number",
304
+ "resolved": "number | string",
305
+ "references": {}
306
+ },
307
+ "required": false,
308
+ "optional": true,
309
+ "docs": {
310
+ "tags": [],
311
+ "text": ""
312
+ },
313
+ "getter": false,
314
+ "setter": false,
315
+ "reflect": false
316
+ },
317
+ "cancellationReasons": {
318
+ "type": "string",
319
+ "attribute": "cancellation-reasons",
320
+ "mutable": false,
321
+ "complexType": {
322
+ "original": "string | CancellationReason[]",
323
+ "resolved": "CancellationReason[] | string",
324
+ "references": {
325
+ "CancellationReason": {
326
+ "location": "import",
327
+ "path": "./interfaces",
328
+ "id": "src/components/salla-order-cancel/interfaces.ts::CancellationReason"
329
+ }
330
+ }
331
+ },
332
+ "required": false,
333
+ "optional": true,
334
+ "docs": {
335
+ "tags": [],
336
+ "text": ""
337
+ },
338
+ "getter": false,
339
+ "setter": false,
340
+ "reflect": false
341
+ }
342
+ };
343
+ }
344
+ static get states() {
345
+ return {
346
+ "reasons": {},
347
+ "selectedReasonId": {},
348
+ "reasonNote": {},
349
+ "confirmLoading": {},
350
+ "loading": {},
351
+ "modalTitleLabel": {},
352
+ "questionLabel": {},
353
+ "subtitleLabel": {},
354
+ "confirmLabel": {},
355
+ "backLabel": {},
356
+ "notePlaceholder": {},
357
+ "charLimitLabel": {}
358
+ };
359
+ }
360
+ static get watchers() {
361
+ return [{
362
+ "propName": "cancellationReasons",
363
+ "methodName": "onCancellationReasonsChange"
364
+ }];
365
+ }
366
+ }
@@ -69,6 +69,8 @@ export class SallaUserMenu {
69
69
  this.opened = false;
70
70
  };
71
71
  this.OrderUpdate = 0;
72
+ // STD-13103: these pages moved under /account; link directly to avoid 301 redirects.
73
+ this.accountPrefixedKeys = ['orders', 'pending_orders', 'wallet', 'notifications', 'rating', 'profile', 'wishlist', 'settings'];
72
74
  this.items = {
73
75
  notifications: BellRing,
74
76
  orders: OrderIcon,
@@ -211,7 +213,8 @@ export class SallaUserMenu {
211
213
  return { href: this.profileUrl, target: '_blank', rel: 'noopener noreferrer' };
212
214
  }
213
215
  const urlKey = itemKey === 'loyalty_points' ? 'loyalty' : itemKey;
214
- return { href: Salla.url.get(urlKey) };
216
+ const path = this.accountPrefixedKeys.includes(urlKey) ? `account/${urlKey}` : urlKey;
217
+ return { href: Salla.url.get(path) };
215
218
  }
216
219
  getMenuItem([itemKey, itemValue], i) {
217
220
  //todo:: enhancement support slot here