@salla.sa/twilight-components 2.14.417 → 2.14.419

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 (375) hide show
  1. package/dist/cjs/{filepond-CLDRrF9Y.js → filepond-BiRMqsJc.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-BG080TXY.js → filepond-plugin-file-poster-LU25G59n.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-D9x7yIeS.js → filepond-plugin-file-validate-size-J3-riOvN.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-CpHYiI2P.js → filepond-plugin-file-validate-type-DMawm6j5.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-B6TFtexK.js → filepond-plugin-image-edit-QXtHYcEz.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-C4Ycs5Ji.js → filepond-plugin-image-exif-orientation-C0VBHQjd.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-CWlUoPsm.js → filepond-plugin-image-preview-xG9m-vgD.js} +1 -1
  8. package/dist/cjs/{functions-B0oYwrYv.js → functions-CZrHAX2r.js} +1 -1
  9. package/dist/cjs/helpers-BJ2rnhxz.js +197 -0
  10. package/dist/cjs/{index-BQnJvBnq.js → index-Ce-Twd7-.js} +10 -6
  11. package/dist/cjs/{index-DEDv7FBx.js → index-DE1iYzD2.js} +1 -1
  12. package/dist/cjs/interfaces-Bh7W0bEU.js +33 -0
  13. package/dist/cjs/loader.cjs.js +2 -2
  14. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +37 -58
  17. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-booking-field_7.cjs.entry.js +12 -12
  23. package/dist/cjs/salla-bullet-delivery.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-comment-form_8.cjs.entry.js +4 -4
  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-prize-item.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  49. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  50. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-map.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-edit-item.cjs.entry.js +28 -29
  66. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +41 -0
  67. package/dist/cjs/salla-order-edit.cjs.entry.js +339 -40
  68. package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
  69. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-payments.cjs.entry.js +3 -3
  72. package/dist/cjs/salla-placeholder.cjs.entry.js +2 -2
  73. package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
  74. package/dist/cjs/salla-product-card_2.cjs.entry.js +6 -6
  75. package/dist/cjs/salla-product-size-guide.cjs.entry.js +3 -3
  76. package/dist/cjs/salla-products-list.cjs.entry.js +38 -15
  77. package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-reward-action_4.cjs.entry.js +3 -3
  81. package/dist/cjs/salla-scopes.cjs.entry.js +2 -2
  82. package/dist/cjs/salla-search.cjs.entry.js +6 -6
  83. package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
  84. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-social-share.cjs.entry.js +2 -2
  86. package/dist/cjs/salla-social.cjs.entry.js +2 -2
  87. package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
  88. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
  90. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
  94. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  96. package/dist/cjs/{tracked-promise-BYjrk7x6.js → tracked-promise-DChUtH5B.js} +1 -1
  97. package/dist/cjs/twilight.cjs.js +2 -2
  98. package/dist/cjs/{vanilla-picker-DbbhCpKU.js → vanilla-picker-ivACsPLJ.js} +1 -1
  99. package/dist/collection/collection-manifest.json +1 -0
  100. package/dist/collection/components/salla-bought-together/salla-bought-together.js +1 -0
  101. package/dist/collection/components/salla-order-edit/helpers.js +181 -0
  102. package/dist/collection/components/salla-order-edit/salla-order-edit-item.css +3 -0
  103. package/dist/collection/components/salla-order-edit/salla-order-edit-item.js +42 -30
  104. package/dist/collection/components/salla-order-edit/salla-order-edit-product-card.css +4 -0
  105. package/dist/collection/components/salla-order-edit/salla-order-edit-product-card.js +93 -0
  106. package/dist/collection/components/salla-order-edit/salla-order-edit.css +3 -0
  107. package/dist/collection/components/salla-order-edit/salla-order-edit.js +353 -39
  108. package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
  109. package/dist/collection/components/salla-payments/salla-payments.js +2 -2
  110. package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
  111. package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
  112. package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
  113. package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
  114. package/dist/collection/components/salla-product-options/salla-product-options.js +28 -0
  115. package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
  116. package/dist/collection/components/salla-products-list/salla-products-list.js +54 -14
  117. package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
  118. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +1 -1
  119. package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
  120. package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
  121. package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
  122. package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
  123. package/dist/collection/components/salla-search/salla-search.js +5 -5
  124. package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
  125. package/dist/collection/components/salla-social/salla-social.js +1 -1
  126. package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
  127. package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
  128. package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
  129. package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
  130. package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
  131. package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
  132. package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
  133. package/dist/components/index.js +2 -2
  134. package/dist/components/salla-bought-together.js +1 -0
  135. package/dist/components/salla-order-edit-item2.js +207 -30
  136. package/dist/components/salla-order-edit-product-card.d.ts +11 -0
  137. package/dist/components/salla-order-edit-product-card.js +59 -0
  138. package/dist/components/salla-order-edit.js +378 -65
  139. package/dist/components/salla-order-summary.js +1 -1
  140. package/dist/components/salla-payments.js +2 -2
  141. package/dist/components/salla-placeholder2.js +1 -1
  142. package/dist/components/salla-price-range2.js +2 -2
  143. package/dist/components/salla-product-availability2.js +1 -1
  144. package/dist/components/salla-product-card2.js +5 -5
  145. package/dist/components/salla-product-options2.js +8 -1
  146. package/dist/components/salla-product-size-guide.js +2 -2
  147. package/dist/components/salla-products-list2.js +39 -15
  148. package/dist/components/salla-quantity-input2.js +1 -1
  149. package/dist/components/salla-quick-buy2.js +1 -1
  150. package/dist/components/salla-review-card2.js +1 -1
  151. package/dist/components/salla-reviews-page.js +1 -1
  152. package/dist/components/salla-reviews.js +1 -1
  153. package/dist/components/salla-scopes.js +1 -1
  154. package/dist/components/salla-search.js +5 -5
  155. package/dist/components/salla-skeleton2.js +1 -1
  156. package/dist/components/salla-social-share.js +1 -1
  157. package/dist/components/salla-social.js +1 -1
  158. package/dist/components/salla-tab-content2.js +1 -1
  159. package/dist/components/salla-tab-header2.js +1 -1
  160. package/dist/components/salla-tabs2.js +1 -1
  161. package/dist/components/salla-tel-input2.js +1 -1
  162. package/dist/components/salla-tooltip2.js +1 -1
  163. package/dist/components/salla-user-settings.js +1 -1
  164. package/dist/esm/{filepond-B25v0bOp.js → filepond-0Pvy36B6.js} +1 -1
  165. package/dist/esm/{filepond-plugin-file-poster-3pI-GrYi.js → filepond-plugin-file-poster-DV7OW1XJ.js} +1 -1
  166. package/dist/esm/{filepond-plugin-file-validate-size-BF3zIjLe.js → filepond-plugin-file-validate-size-DEya24r_.js} +1 -1
  167. package/dist/esm/{filepond-plugin-file-validate-type-BR91w5t3.js → filepond-plugin-file-validate-type-DiFvVzC6.js} +1 -1
  168. package/dist/esm/{filepond-plugin-image-edit-DPwgIvr6.js → filepond-plugin-image-edit-DGBw5KRt.js} +1 -1
  169. package/dist/esm/{filepond-plugin-image-exif-orientation-Ba27xDEr.js → filepond-plugin-image-exif-orientation-BbpZAlI-.js} +1 -1
  170. package/dist/esm/{filepond-plugin-image-preview-CAEqmh_E.js → filepond-plugin-image-preview-CjRkn0jY.js} +1 -1
  171. package/dist/esm/{functions-Bk6s9Xp6.js → functions-BcJ4xDKw.js} +1 -1
  172. package/dist/esm/helpers-DR_vlSvU.js +184 -0
  173. package/dist/esm/{index-SSgsVJTU.js → index-313k5SuU.js} +1 -1
  174. package/dist/esm/{index-CN6KGTlN.js → index-CfaNNoM2.js} +10 -6
  175. package/dist/esm/interfaces-CoQJOPRz.js +33 -0
  176. package/dist/esm/loader.js +3 -3
  177. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  178. package/dist/esm/salla-accordion_6.entry.js +1 -1
  179. package/dist/esm/salla-add-product-button_5.entry.js +11 -32
  180. package/dist/esm/salla-advertisement.entry.js +1 -1
  181. package/dist/esm/salla-alert_2.entry.js +1 -1
  182. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  183. package/dist/esm/salla-apps-icons.entry.js +1 -1
  184. package/dist/esm/salla-badge.entry.js +1 -1
  185. package/dist/esm/salla-booking-field_7.entry.js +12 -12
  186. package/dist/esm/salla-bullet-delivery.entry.js +1 -1
  187. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  188. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  189. package/dist/esm/salla-comment-form_8.entry.js +4 -4
  190. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  191. package/dist/esm/salla-contacts.entry.js +1 -1
  192. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  193. package/dist/esm/salla-count-down.entry.js +1 -1
  194. package/dist/esm/salla-custom-fields.entry.js +1 -1
  195. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  196. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  197. package/dist/esm/salla-filters-widget.entry.js +1 -1
  198. package/dist/esm/salla-filters.entry.js +1 -1
  199. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  200. package/dist/esm/salla-gifting.entry.js +1 -1
  201. package/dist/esm/salla-hook.entry.js +1 -1
  202. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  203. package/dist/esm/salla-installment.entry.js +1 -1
  204. package/dist/esm/salla-list-tile.entry.js +1 -1
  205. package/dist/esm/salla-localization-modal.entry.js +1 -1
  206. package/dist/esm/salla-login-modal.entry.js +1 -1
  207. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  208. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  209. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  210. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  211. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  212. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  213. package/dist/esm/salla-loyalty.entry.js +1 -1
  214. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  215. package/dist/esm/salla-map.entry.js +1 -1
  216. package/dist/esm/salla-menu.entry.js +1 -1
  217. package/dist/esm/salla-metadata.entry.js +1 -1
  218. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  219. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  220. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  221. package/dist/esm/salla-notification-item.entry.js +1 -1
  222. package/dist/esm/salla-notifications.entry.js +1 -1
  223. package/dist/esm/salla-offer-modal.entry.js +1 -1
  224. package/dist/esm/salla-offer.entry.js +1 -1
  225. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  226. package/dist/esm/salla-order-details-options.entry.js +1 -1
  227. package/dist/esm/salla-order-details.entry.js +1 -1
  228. package/dist/esm/salla-order-edit-item.entry.js +28 -29
  229. package/dist/esm/salla-order-edit-product-card.entry.js +39 -0
  230. package/dist/esm/salla-order-edit.entry.js +339 -40
  231. package/dist/esm/salla-order-summary.entry.js +2 -2
  232. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  233. package/dist/esm/salla-orders.entry.js +1 -1
  234. package/dist/esm/salla-payments.entry.js +3 -3
  235. package/dist/esm/salla-placeholder.entry.js +2 -2
  236. package/dist/esm/salla-price-range.entry.js +3 -3
  237. package/dist/esm/salla-product-card_2.entry.js +6 -6
  238. package/dist/esm/salla-product-size-guide.entry.js +3 -3
  239. package/dist/esm/salla-products-list.entry.js +38 -15
  240. package/dist/esm/salla-progress-bar.entry.js +1 -1
  241. package/dist/esm/salla-quick-order.entry.js +1 -1
  242. package/dist/esm/salla-rating-modal.entry.js +1 -1
  243. package/dist/esm/salla-reward-action_4.entry.js +3 -3
  244. package/dist/esm/salla-scopes.entry.js +2 -2
  245. package/dist/esm/salla-search.entry.js +6 -6
  246. package/dist/esm/salla-skeleton.entry.js +2 -2
  247. package/dist/esm/salla-slider.entry.js +1 -1
  248. package/dist/esm/salla-social-share.entry.js +2 -2
  249. package/dist/esm/salla-social.entry.js +2 -2
  250. package/dist/esm/salla-tab-content_3.entry.js +4 -4
  251. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  252. package/dist/esm/salla-tooltip.entry.js +2 -2
  253. package/dist/esm/salla-trust-badges.entry.js +1 -1
  254. package/dist/esm/salla-user-menu.entry.js +1 -1
  255. package/dist/esm/salla-user-profile.entry.js +1 -1
  256. package/dist/esm/salla-user-settings.entry.js +2 -2
  257. package/dist/esm/salla-verify.entry.js +1 -1
  258. package/dist/esm/salla-wallet.entry.js +1 -1
  259. package/dist/esm/{tracked-promise-BpxjPYjA.js → tracked-promise-xD-AZOwt.js} +1 -1
  260. package/dist/esm/twilight.js +3 -3
  261. package/dist/esm/{vanilla-picker-CoVpA0FA.js → vanilla-picker-Bu8PG2Le.js} +1 -1
  262. package/dist/twilight/{p-5fe916ee.entry.js → p-02600ee1.entry.js} +1 -1
  263. package/dist/twilight/{p-f6862c1d.entry.js → p-02608fcd.entry.js} +1 -1
  264. package/dist/twilight/{p-7d0a6459.entry.js → p-029f9bfd.entry.js} +1 -1
  265. package/dist/twilight/p-073536c3.entry.js +4 -0
  266. package/dist/twilight/{p-89e6dc27.entry.js → p-0d4afc4b.entry.js} +1 -1
  267. package/dist/twilight/{p-529f8c0a.entry.js → p-11da9c5a.entry.js} +1 -1
  268. package/dist/twilight/{p-5980a88b.entry.js → p-13b1dae0.entry.js} +1 -1
  269. package/dist/twilight/{p-b94fd507.entry.js → p-13f019f5.entry.js} +1 -1
  270. package/dist/twilight/{p-65b943d6.entry.js → p-15be9e7a.entry.js} +1 -1
  271. package/dist/twilight/{p-f6010b04.entry.js → p-1bce06bf.entry.js} +1 -1
  272. package/dist/twilight/{p-93489e49.entry.js → p-1fe827c7.entry.js} +1 -1
  273. package/dist/twilight/{p-a3eaba68.entry.js → p-22d12f28.entry.js} +1 -1
  274. package/dist/twilight/{p-53c44a72.entry.js → p-2afe64d1.entry.js} +1 -1
  275. package/dist/twilight/{p-269c76e2.entry.js → p-2bb796b3.entry.js} +1 -1
  276. package/dist/twilight/{p-bbf9d24f.entry.js → p-2f1cb6da.entry.js} +1 -1
  277. package/dist/twilight/{p-337dc693.entry.js → p-3252277a.entry.js} +1 -1
  278. package/dist/twilight/{p-fa6c9d88.entry.js → p-3539d2a1.entry.js} +1 -1
  279. package/dist/twilight/{p-01e5a467.entry.js → p-3bda095b.entry.js} +1 -1
  280. package/dist/twilight/{p-44147d14.entry.js → p-3d286589.entry.js} +1 -1
  281. package/dist/twilight/{p-4e02648d.entry.js → p-410f0149.entry.js} +1 -1
  282. package/dist/twilight/{p-21c9f888.entry.js → p-42bf8cc1.entry.js} +1 -1
  283. package/dist/twilight/p-43c4c857.entry.js +4 -0
  284. package/dist/twilight/{p-fd200890.entry.js → p-4550de2d.entry.js} +1 -1
  285. package/dist/twilight/{p-f6cb5670.entry.js → p-4752dc2c.entry.js} +1 -1
  286. package/dist/twilight/{p-943a70d5.entry.js → p-48aba4cd.entry.js} +1 -1
  287. package/dist/twilight/p-49e28ca2.entry.js +4 -0
  288. package/dist/twilight/{p-3a336511.entry.js → p-4a7cbe49.entry.js} +1 -1
  289. package/dist/twilight/{p-ce32049d.entry.js → p-51252013.entry.js} +1 -1
  290. package/dist/twilight/{p-5c2221e4.entry.js → p-53e63007.entry.js} +1 -1
  291. package/dist/twilight/{p-60bcb05d.entry.js → p-57a4f3d2.entry.js} +1 -1
  292. package/dist/twilight/{p-50562d51.entry.js → p-5dbb89d5.entry.js} +1 -1
  293. package/dist/twilight/p-5dd07559.entry.js +4 -0
  294. package/dist/twilight/{p-5a719b92.entry.js → p-5dd75357.entry.js} +1 -1
  295. package/dist/twilight/p-5e4e45be.entry.js +4 -0
  296. package/dist/twilight/{p-93fd1f4c.entry.js → p-5f174a3e.entry.js} +1 -1
  297. package/dist/twilight/{p-901f4d3c.entry.js → p-625218f7.entry.js} +1 -1
  298. package/dist/twilight/{p-12a70121.entry.js → p-654a0990.entry.js} +1 -1
  299. package/dist/twilight/{p-89912723.entry.js → p-654b9857.entry.js} +1 -1
  300. package/dist/twilight/{p-2a3c8c27.entry.js → p-65ff0bf4.entry.js} +1 -1
  301. package/dist/twilight/{p-41338b27.entry.js → p-665aa4d1.entry.js} +1 -1
  302. package/dist/twilight/{p-30847b55.entry.js → p-69bec0e3.entry.js} +1 -1
  303. package/dist/twilight/{p-4546305a.entry.js → p-6b02b118.entry.js} +1 -1
  304. package/dist/twilight/{p-a3a24c3a.entry.js → p-72d4121c.entry.js} +1 -1
  305. package/dist/twilight/{p-9e2f4e04.entry.js → p-74cd506d.entry.js} +1 -1
  306. package/dist/twilight/{p-ea67e7fb.entry.js → p-75f26291.entry.js} +1 -1
  307. package/dist/twilight/{p-8cd3e1ee.entry.js → p-7ce1dff1.entry.js} +1 -1
  308. package/dist/twilight/{p-4f898f9a.entry.js → p-7d08def1.entry.js} +1 -1
  309. package/dist/twilight/{p-984ad4f5.entry.js → p-7f6c6d8a.entry.js} +1 -1
  310. package/dist/twilight/{p-f953dac6.entry.js → p-82d776ae.entry.js} +1 -1
  311. package/dist/twilight/{p-7df3848c.entry.js → p-87e78adc.entry.js} +1 -1
  312. package/dist/twilight/{p-a0f201dc.entry.js → p-891e4b61.entry.js} +1 -1
  313. package/dist/twilight/{p-f8971c24.entry.js → p-8bdd9c9b.entry.js} +1 -1
  314. package/dist/twilight/{p-b21dff70.entry.js → p-8d0b4049.entry.js} +1 -1
  315. package/dist/twilight/{p-92948a3c.entry.js → p-8dbff2c8.entry.js} +1 -1
  316. package/dist/twilight/{p-cb7286b0.entry.js → p-944b02ec.entry.js} +1 -1
  317. package/dist/twilight/{p-a6b86d59.entry.js → p-9693310b.entry.js} +1 -1
  318. package/dist/twilight/{p-9ef5baee.entry.js → p-9dcc291b.entry.js} +1 -1
  319. package/dist/twilight/{p-BqUtsKuV.js → p-B6bkY5-l.js} +1 -1
  320. package/dist/twilight/{p-IfDGKmqz.js → p-BCWPIsso.js} +1 -1
  321. package/dist/twilight/p-BLehGhpL.js +4 -0
  322. package/dist/twilight/{p-BI8HHCBk.js → p-BN2EOPT0.js} +2 -2
  323. package/dist/twilight/{p-D3AXrniM.js → p-BeZ-z3uX.js} +1 -1
  324. package/dist/twilight/{p-Dhp50bRZ.js → p-Bu7ZSFM5.js} +1 -1
  325. package/dist/twilight/{p-Dnp_uMrB.js → p-C0UBM1r0.js} +1 -1
  326. package/dist/twilight/{p-BHMFnn7K.js → p-C1ReTfKT.js} +1 -1
  327. package/dist/twilight/p-C8xwacGT.js +4 -0
  328. package/dist/twilight/{p-OFtreEoC.js → p-CX1cQxmm.js} +1 -1
  329. package/dist/twilight/{p-CN6KGTlN.js → p-CfaNNoM2.js} +1 -1
  330. package/dist/twilight/p-CoQJOPRz.js +4 -0
  331. package/dist/twilight/{p-CZ0CFRkg.js → p-P9Uquv6J.js} +1 -1
  332. package/dist/twilight/p-a132e9dc.entry.js +4 -0
  333. package/dist/twilight/{p-8867d017.entry.js → p-a22ab12e.entry.js} +1 -1
  334. package/dist/twilight/{p-3ea047a7.entry.js → p-a5093858.entry.js} +1 -1
  335. package/dist/twilight/{p-3d7867a2.entry.js → p-a5483eab.entry.js} +1 -1
  336. package/dist/twilight/{p-50a976c7.entry.js → p-ab922196.entry.js} +1 -1
  337. package/dist/twilight/{p-5ccc2829.entry.js → p-adf1ff1f.entry.js} +1 -1
  338. package/dist/twilight/{p-acdba86b.entry.js → p-b075bdd3.entry.js} +1 -1
  339. package/dist/twilight/{p-d83942f4.entry.js → p-b6446ed0.entry.js} +1 -1
  340. package/dist/twilight/{p-cba54712.entry.js → p-bd29fa58.entry.js} +1 -1
  341. package/dist/twilight/{p-38661112.entry.js → p-c0a96a41.entry.js} +1 -1
  342. package/dist/twilight/{p-2835e988.entry.js → p-c0da03a4.entry.js} +1 -1
  343. package/dist/twilight/{p-8f879479.entry.js → p-ce4823e8.entry.js} +1 -1
  344. package/dist/twilight/{p-418574c0.entry.js → p-cef8dfa8.entry.js} +1 -1
  345. package/dist/twilight/{p-984298b9.entry.js → p-d737a90e.entry.js} +1 -1
  346. package/dist/twilight/p-d7e404d1.entry.js +4 -0
  347. package/dist/twilight/{p-078e99bf.entry.js → p-d95fad47.entry.js} +1 -1
  348. package/dist/twilight/{p-1ac92f5a.entry.js → p-dacc7681.entry.js} +1 -1
  349. package/dist/twilight/{p-6f620e38.entry.js → p-e15ceaae.entry.js} +1 -1
  350. package/dist/twilight/p-e692fd88.entry.js +4 -0
  351. package/dist/twilight/{p-b3ad1668.entry.js → p-ee5afe29.entry.js} +1 -1
  352. package/dist/twilight/{p-329af334.entry.js → p-f248ce38.entry.js} +1 -1
  353. package/dist/twilight/{p-7cd6a7c4.entry.js → p-f6468e0f.entry.js} +1 -1
  354. package/dist/twilight/{p-4bf158ef.entry.js → p-f9e89a30.entry.js} +1 -1
  355. package/dist/twilight/{p-8f45764d.entry.js → p-fdd2d95e.entry.js} +1 -1
  356. package/dist/twilight/{p-66aac45f.entry.js → p-ff0d8f2b.entry.js} +1 -1
  357. package/dist/twilight/{p-CSkvMMJe.js → p-nj3fF7xi.js} +1 -1
  358. package/dist/twilight/twilight.esm.js +1 -1
  359. package/dist/types/components/salla-order-edit/helpers.d.ts +25 -0
  360. package/dist/types/components/salla-order-edit/interfaces.d.ts +22 -25
  361. package/dist/types/components/salla-order-edit/salla-order-edit-item.d.ts +7 -5
  362. package/dist/types/components/salla-order-edit/salla-order-edit-product-card.d.ts +11 -0
  363. package/dist/types/components/salla-order-edit/salla-order-edit.d.ts +56 -4
  364. package/dist/types/components/salla-product-options/salla-product-options.d.ts +4 -0
  365. package/dist/types/components/salla-products-list/salla-products-list.d.ts +5 -0
  366. package/dist/types/components.d.ts +51 -4
  367. package/package.json +5 -5
  368. package/dist/twilight/p-100664ef.entry.js +0 -4
  369. package/dist/twilight/p-38856897.entry.js +0 -4
  370. package/dist/twilight/p-43eca2f5.entry.js +0 -4
  371. package/dist/twilight/p-6edcfd67.entry.js +0 -4
  372. package/dist/twilight/p-73f6f7c7.entry.js +0 -4
  373. package/dist/twilight/p-DyiIcpTE.js +0 -4
  374. package/dist/twilight/p-a31559f1.entry.js +0 -4
  375. package/dist/twilight/p-c20a8155.entry.js +0 -4
@@ -1,4 +1,14 @@
1
+ import { Product } from '@salla.sa/twilight/types/common';
1
2
  import { ProductOption } from '../salla-order-details/interfaces';
3
+ import { Option as ProductOptionDefinition } from '../salla-product-options/interfaces';
4
+ export type OrderEditSelectedOptions = Record<string, FormDataEntryValue>;
5
+ export type OrderEditProductOption = ProductOptionDefinition;
6
+ export type OrderEditProductOptionsElement = HTMLSallaProductOptionsElement & {
7
+ getOptionsData?: () => Promise<OrderEditProductOption[]>;
8
+ getSelectedOptionsData?: () => Promise<OrderEditSelectedOptions>;
9
+ reportValidity?: () => Promise<boolean>;
10
+ validateAndScroll?: () => Promise<boolean>;
11
+ };
2
12
  export interface MoneyObject {
3
13
  amount: number;
4
14
  currency: string;
@@ -39,31 +49,10 @@ export interface OrderEditData {
39
49
  ends_at?: string;
40
50
  };
41
51
  }
42
- export interface OrderEditItemProduct {
43
- id: number | string;
44
- name?: string;
45
- sku?: string;
46
- url?: string;
47
- price?: number;
48
- regular_price?: number;
49
- sale_price?: number;
50
- is_on_sale?: boolean;
51
- quantity?: number;
52
- max_quantity?: number;
53
- weight?: number | string;
52
+ export interface OrderEditItemProduct extends Partial<Product> {
54
53
  weight_label?: string;
55
- image?: {
56
- url: string;
57
- alt?: string;
58
- id?: string;
59
- };
60
- images?: {
61
- url: string;
62
- alt?: string;
63
- }[];
64
- options?: ProductOption[];
65
- type?: string;
66
- status?: string;
54
+ options?: OrderEditProductOption[];
55
+ max_quantity_per_order?: number;
67
56
  }
68
57
  export interface OrderEditItem {
69
58
  id: number | string;
@@ -72,16 +61,24 @@ export interface OrderEditItem {
72
61
  quantity: number;
73
62
  product?: OrderEditItemProduct;
74
63
  options?: ProductOption[];
64
+ selectedOptions?: OrderEditSelectedOptions;
65
+ isNew?: boolean;
75
66
  }
76
67
  export interface OrderEditPayloadItem {
77
68
  id: number | string;
78
69
  quantity: number;
79
- options: any[];
70
+ options: OrderEditSelectedOptions;
71
+ }
72
+ export interface OrderEditPayloadAddItem {
73
+ product_id: number | string;
74
+ quantity: number;
75
+ options: OrderEditSelectedOptions;
80
76
  }
81
77
  export interface OrderEditPayload {
82
78
  items: {
83
79
  update: OrderEditPayloadItem[];
84
80
  remove: (number | string)[];
81
+ add: OrderEditPayloadAddItem[];
85
82
  };
86
83
  }
87
84
  export interface EditOrderResponseItem {
@@ -1,12 +1,11 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { OrderEditItem } from './interfaces';
2
+ import { OrderEditItem, OrderEditProductOption, OrderEditSelectedOptions } from './interfaces';
3
3
  /**
4
4
  * @salla/ui-components
5
5
  * The `salla-order-edit-item` component renders a single editable order item card
6
6
  * with quantity controls, editable product options, and a remove button.
7
7
  */
8
8
  export declare class SallaOrderEditItem {
9
- host: HTMLElement;
10
9
  /** Item data object */
11
10
  item: OrderEditItem;
12
11
  /** Parent order ID (for API calls) */
@@ -16,18 +15,21 @@ export declare class SallaOrderEditItem {
16
15
  orderItemUpdated: EventEmitter<{
17
16
  itemId: string | number;
18
17
  quantity: number;
19
- options?: any[];
18
+ options?: OrderEditSelectedOptions;
19
+ optionDefinitions?: OrderEditProductOption[];
20
20
  }>;
21
21
  /** Emitted when an item is successfully removed */
22
22
  orderItemRemoved: EventEmitter<{
23
23
  itemId: string | number;
24
24
  }>;
25
+ private quantityInput;
26
+ private productOptions;
25
27
  componentWillLoad(): void;
26
- componentDidLoad(): void;
27
- disconnectedCallback(): void;
28
+ handleItemChange(newItem: OrderEditItem): void;
28
29
  private handleQuantityChange;
29
30
  private get hasOptions();
30
31
  private getSelectedOptions;
32
+ private getOptionsData;
31
33
  private emitUpdate;
32
34
  private handleOptionsChange;
33
35
  private removeItem;
@@ -0,0 +1,11 @@
1
+ import { Product } from '@salla.sa/twilight/types/common';
2
+ import { EventEmitter } from '../../stencil-public-runtime';
3
+ export declare class SallaOrderEditProductCard {
4
+ product: Product | string;
5
+ orderEditProductSelected: EventEmitter<{
6
+ product: Product;
7
+ }>;
8
+ private get productData();
9
+ private handleSelectProduct;
10
+ render(): any;
11
+ }
@@ -1,11 +1,12 @@
1
- import { EditOrderResponse, OrderEditData, OrderEditPayload } from './interfaces';
1
+ import { Product } from '@salla.sa/twilight/types/common';
2
+ import { EditOrderResponse, OrderEditData, OrderEditProductOption, OrderEditSelectedOptions } from './interfaces';
3
+ import { OrderEditPayloadState } from './helpers';
2
4
  /**
3
5
  * @salla/ui-components
4
6
  * The `salla-order-edit` component
5
7
  * as an editable card with quantity controls, editable options, and an order summary.
6
8
  */
7
9
  export declare class SallaOrderEdit {
8
- host: HTMLElement;
9
10
  /** The order ID to edit */
10
11
  orderId: string | number;
11
12
  /** Pre-loaded order data (JSON string). */
@@ -14,20 +15,67 @@ export declare class SallaOrderEdit {
14
15
  loading: boolean;
15
16
  error: string;
16
17
  saveLoading: boolean;
17
- payload: OrderEditPayload;
18
+ payload: OrderEditPayloadState;
18
19
  expired: boolean;
19
20
  editPreview: EditOrderResponse | null;
21
+ productSearchQuery: string;
22
+ productsListKey: number;
23
+ productsListSource: 'latest' | 'search';
24
+ productsListSourceValue: string;
25
+ selectedProductToAdd: Product | null;
26
+ addProductQuantity: number;
27
+ addProductLoading: boolean;
28
+ addProductConfirmLoading: boolean;
29
+ mobileProductsModalMounted: boolean;
30
+ isMobileViewport: boolean;
31
+ private mobileProductsModal;
32
+ private mobileProductsListLoading;
33
+ private addProductDrawer;
34
+ private addProductOptions;
20
35
  private saveModal;
21
36
  private expiryInterval;
37
+ private productsPanelViewportQuery?;
38
+ private unregisterBeforeBuildListUrlHook?;
22
39
  private confirming;
40
+ private readonly handleMobileProductSelected;
41
+ private readonly productsPanelMobileQuery;
42
+ private readonly handleProductsPanelViewportChange;
43
+ private readonly hasProductTypeFilter;
44
+ private readonly normalizeProductsListArrayParams;
45
+ private readonly handleBeforeBuildListUrl;
46
+ private readonly defaultProductsListSource;
47
+ private readonly debouncedProductSearch;
23
48
  componentWillLoad(): Promise<void>;
24
49
  disconnectedCallback(): void;
50
+ private setupProductsPanelViewportQuery;
25
51
  private startExpiryCheck;
26
52
  private loadFromProp;
53
+ private applyProductSearch;
54
+ private handleProductSearch;
55
+ private getProductsListKey;
56
+ private handleMobileProductsScroll;
57
+ private waitForNextFrame;
58
+ private openMobileProductsModal;
59
+ private setMobileProductsModal;
60
+ private resetAddProductDrawer;
61
+ private getAddProductMaxQuantity;
62
+ private clampAddProductQuantity;
63
+ private getApiErrorMessage;
64
+ private notifyApiError;
65
+ private validateAddProductOptions;
66
+ private updateLocalOrderItem;
67
+ private removeLocalOrderItem;
68
+ private setPayloadItems;
69
+ private handleAddProductQuantityChange;
70
+ handleProductSelected(event: CustomEvent<{
71
+ product: Product;
72
+ }>): Promise<void>;
73
+ private confirmAddProduct;
27
74
  handleItemUpdated(event: CustomEvent<{
28
75
  itemId: string | number;
29
76
  quantity: number;
30
- options?: any[];
77
+ options?: OrderEditSelectedOptions;
78
+ optionDefinitions?: OrderEditProductOption[];
31
79
  }>): void;
32
80
  handleItemRemoved(event: CustomEvent<{
33
81
  itemId: string | number;
@@ -37,6 +85,10 @@ export declare class SallaOrderEdit {
37
85
  private navigateToOrder;
38
86
  private handleConfirm;
39
87
  private cancelEditSession;
88
+ private renderProductsPanel;
89
+ private renderProductsPickerContent;
90
+ private renderMobileProductsModal;
91
+ private renderAddProductDrawer;
40
92
  private renderSaveModal;
41
93
  render(): any;
42
94
  }
@@ -7,6 +7,10 @@ export declare class SallaProductOptions {
7
7
  * @param optionsData - Array of product options
8
8
  */
9
9
  setOptionsData(optionsData: Option[]): Promise<void>;
10
+ /**
11
+ * Get the current options state, including selected values/details.
12
+ */
13
+ getOptionsData(): Promise<Option[]>;
10
14
  host: HTMLElement;
11
15
  private fileTypes;
12
16
  optionsData: Option[];
@@ -155,8 +155,13 @@ export declare class SallaProductsList {
155
155
  private initiateInfiniteScroll;
156
156
  private handleScroll;
157
157
  private manualLoadNextPage;
158
+ private applyBeforeBuildListUrl;
159
+ private resolveNextPageFromCursor;
158
160
  private injectAndProcessData;
159
161
  private getInitialData;
162
+ /**
163
+ * Load the next products page.
164
+ */
160
165
  loadMore(): Promise<void>;
161
166
  componentWillLoad(): any;
162
167
  componentDidLoad(): Promise<void>;
@@ -21,7 +21,8 @@ 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
23
  import { OrderProduct, ProductOption } from "./components/salla-order-details/interfaces";
24
- import { OrderEditItem } from "./components/salla-order-edit/interfaces";
24
+ import { OrderEditItem, OrderEditProductOption, OrderEditSelectedOptions } from "./components/salla-order-edit/interfaces";
25
+ import { Product } from "@salla.sa/twilight/types/common";
25
26
  import { Order, OrderQueryParameters } from "./components/salla-orders/interface";
26
27
  import { Donation, Option as Option1 } from "./components/salla-product-options/interfaces";
27
28
  import { SallaSliderProps } from "./components/salla-slider/salla-slider";
@@ -44,7 +45,8 @@ export { Sources } from "./components/salla-menu/interfaces";
44
45
  export { BundleProduct, BundleSection, SelectedOption } from "./components/salla-multiple-bundle-product/interfaces";
45
46
  export { Notification } from "./components/salla-notifications/interfaces";
46
47
  export { OrderProduct, ProductOption } from "./components/salla-order-details/interfaces";
47
- export { OrderEditItem } from "./components/salla-order-edit/interfaces";
48
+ export { OrderEditItem, OrderEditProductOption, OrderEditSelectedOptions } from "./components/salla-order-edit/interfaces";
49
+ export { Product } from "@salla.sa/twilight/types/common";
48
50
  export { Order, OrderQueryParameters } from "./components/salla-orders/interface";
49
51
  export { Donation, Option as Option1 } from "./components/salla-product-options/interfaces";
50
52
  export { SallaSliderProps } from "./components/salla-slider/salla-slider";
@@ -1972,6 +1974,9 @@ export namespace Components {
1972
1974
  */
1973
1975
  "orderId": string | number;
1974
1976
  }
1977
+ interface SallaOrderEditProductCard {
1978
+ "product": Product | string;
1979
+ }
1975
1980
  interface SallaOrderSummary {
1976
1981
  /**
1977
1982
  * The order ID to fetch items from
@@ -2119,6 +2124,10 @@ export namespace Components {
2119
2124
  * Get a specific option by its id.
2120
2125
  */
2121
2126
  "getOption": (option_id: any) => Promise<Option1>;
2127
+ /**
2128
+ * Get the current options state, including selected values/details.
2129
+ */
2130
+ "getOptionsData": () => Promise<Option1[]>;
2122
2131
  /**
2123
2132
  * Get selected options.
2124
2133
  */
@@ -2198,6 +2207,10 @@ export namespace Components {
2198
2207
  * Limit for number of products in the list.
2199
2208
  */
2200
2209
  "limit": number;
2210
+ /**
2211
+ * Load the next products page.
2212
+ */
2213
+ "loadMore": () => Promise<void>;
2201
2214
  /**
2202
2215
  * Load more text
2203
2216
  */
@@ -3187,6 +3200,10 @@ export interface SallaOrderEditItemCustomEvent<T> extends CustomEvent<T> {
3187
3200
  detail: T;
3188
3201
  target: HTMLSallaOrderEditItemElement;
3189
3202
  }
3203
+ export interface SallaOrderEditProductCardCustomEvent<T> extends CustomEvent<T> {
3204
+ detail: T;
3205
+ target: HTMLSallaOrderEditProductCardElement;
3206
+ }
3190
3207
  export interface SallaPriceRangeCustomEvent<T> extends CustomEvent<T> {
3191
3208
  detail: T;
3192
3209
  target: HTMLSallaPriceRangeElement;
@@ -3998,7 +4015,8 @@ declare global {
3998
4015
  "orderItemUpdated": {
3999
4016
  itemId: string | number;
4000
4017
  quantity: number;
4001
- options?: any[];
4018
+ options?: OrderEditSelectedOptions;
4019
+ optionDefinitions?: OrderEditProductOption[];
4002
4020
  };
4003
4021
  "orderItemRemoved": {
4004
4022
  itemId: string | number;
@@ -4023,6 +4041,25 @@ declare global {
4023
4041
  prototype: HTMLSallaOrderEditItemElement;
4024
4042
  new (): HTMLSallaOrderEditItemElement;
4025
4043
  };
4044
+ interface HTMLSallaOrderEditProductCardElementEventMap {
4045
+ "orderEditProductSelected": {
4046
+ product: Product;
4047
+ };
4048
+ }
4049
+ interface HTMLSallaOrderEditProductCardElement extends Components.SallaOrderEditProductCard, HTMLStencilElement {
4050
+ addEventListener<K extends keyof HTMLSallaOrderEditProductCardElementEventMap>(type: K, listener: (this: HTMLSallaOrderEditProductCardElement, ev: SallaOrderEditProductCardCustomEvent<HTMLSallaOrderEditProductCardElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
4051
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
4052
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
4053
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
4054
+ removeEventListener<K extends keyof HTMLSallaOrderEditProductCardElementEventMap>(type: K, listener: (this: HTMLSallaOrderEditProductCardElement, ev: SallaOrderEditProductCardCustomEvent<HTMLSallaOrderEditProductCardElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
4055
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
4056
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
4057
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
4058
+ }
4059
+ var HTMLSallaOrderEditProductCardElement: {
4060
+ prototype: HTMLSallaOrderEditProductCardElement;
4061
+ new (): HTMLSallaOrderEditProductCardElement;
4062
+ };
4026
4063
  interface HTMLSallaOrderSummaryElement extends Components.SallaOrderSummary, HTMLStencilElement {
4027
4064
  }
4028
4065
  var HTMLSallaOrderSummaryElement: {
@@ -4524,6 +4561,7 @@ declare global {
4524
4561
  "salla-order-details-options": HTMLSallaOrderDetailsOptionsElement;
4525
4562
  "salla-order-edit": HTMLSallaOrderEditElement;
4526
4563
  "salla-order-edit-item": HTMLSallaOrderEditItemElement;
4564
+ "salla-order-edit-product-card": HTMLSallaOrderEditProductCardElement;
4527
4565
  "salla-order-summary": HTMLSallaOrderSummaryElement;
4528
4566
  "salla-order-totals-card": HTMLSallaOrderTotalsCardElement;
4529
4567
  "salla-orders": HTMLSallaOrdersElement;
@@ -6425,13 +6463,20 @@ declare namespace LocalJSX {
6425
6463
  "onOrderItemUpdated"?: (event: SallaOrderEditItemCustomEvent<{
6426
6464
  itemId: string | number;
6427
6465
  quantity: number;
6428
- options?: any[];
6466
+ options?: OrderEditSelectedOptions;
6467
+ optionDefinitions?: OrderEditProductOption[];
6429
6468
  }>) => void;
6430
6469
  /**
6431
6470
  * Parent order ID (for API calls)
6432
6471
  */
6433
6472
  "orderId"?: string | number;
6434
6473
  }
6474
+ interface SallaOrderEditProductCard {
6475
+ "onOrderEditProductSelected"?: (event: SallaOrderEditProductCardCustomEvent<{
6476
+ product: Product;
6477
+ }>) => void;
6478
+ "product"?: Product | string;
6479
+ }
6435
6480
  interface SallaOrderSummary {
6436
6481
  /**
6437
6482
  * The order ID to fetch items from
@@ -7501,6 +7546,7 @@ declare namespace LocalJSX {
7501
7546
  "salla-order-details-options": SallaOrderDetailsOptions;
7502
7547
  "salla-order-edit": SallaOrderEdit;
7503
7548
  "salla-order-edit-item": SallaOrderEditItem;
7549
+ "salla-order-edit-product-card": SallaOrderEditProductCard;
7504
7550
  "salla-order-summary": SallaOrderSummary;
7505
7551
  "salla-order-totals-card": SallaOrderTotalsCard;
7506
7552
  "salla-orders": SallaOrders;
@@ -7719,6 +7765,7 @@ declare module "@stencil/core" {
7719
7765
  * with quantity controls, editable product options, and a remove button.
7720
7766
  */
7721
7767
  "salla-order-edit-item": LocalJSX.SallaOrderEditItem & JSXBase.HTMLAttributes<HTMLSallaOrderEditItemElement>;
7768
+ "salla-order-edit-product-card": LocalJSX.SallaOrderEditProductCard & JSXBase.HTMLAttributes<HTMLSallaOrderEditProductCardElement>;
7722
7769
  "salla-order-summary": LocalJSX.SallaOrderSummary & JSXBase.HTMLAttributes<HTMLSallaOrderSummaryElement>;
7723
7770
  "salla-order-totals-card": LocalJSX.SallaOrderTotalsCard & JSXBase.HTMLAttributes<HTMLSallaOrderTotalsCardElement>;
7724
7771
  "salla-orders": LocalJSX.SallaOrders & JSXBase.HTMLAttributes<HTMLSallaOrdersElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight-components",
3
- "version": "2.14.417",
3
+ "version": "2.14.419",
4
4
  "license": "GPL-3.0",
5
5
  "author": "Salla Team <support@salla.dev> (https://salla.dev)",
6
6
  "bugs": {
@@ -79,9 +79,9 @@
79
79
  "typescript": "^5.4.5"
80
80
  },
81
81
  "dependencies": {
82
- "@salla.sa/applepay": "2.14.417",
83
- "@salla.sa/twilight": "2.14.417",
84
- "@salla.sa/twilight-tailwind-theme": "2.14.417",
82
+ "@salla.sa/applepay": "2.14.419",
83
+ "@salla.sa/twilight": "2.14.419",
84
+ "@salla.sa/twilight-tailwind-theme": "2.14.419",
85
85
  "@types/node": "^20.4.8",
86
86
  "animejs": "^3.2.2",
87
87
  "class-variance-authority": "0.7.0",
@@ -100,5 +100,5 @@
100
100
  "vanilla-lazyload": "^17.8.5",
101
101
  "vanilla-picker": "^2.12.2"
102
102
  },
103
- "gitHead": "39dadb6d300a48e0d31f0fa46729d6be05721bee"
103
+ "gitHead": "f969edbd9bfd95c296af01b3a0b13a30422f8cc2"
104
104
  }
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r,h as e}from"./p-CN6KGTlN.js";function t(r){var e,s,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]&&(s=t(r[e]))&&(a&&(a+=" "),a+=s);else for(e in r)r[e]&&(a&&(a+=" "),a+=e);return a}const s=r=>"boolean"==typeof r?"".concat(r):0===r?"0":r,a=function(){for(var r,e,s=0,a="";s<arguments.length;)(r=arguments[s++])&&(e=t(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:t,defaultVariants:l}=i,o=Object.keys(t).map((e=>{const a=null==r?void 0:r[e],n=null==l?void 0:l[e];if(null===a)return null;const i=s(a)||s(n);return t[e][i]})),d=r&&Object.entries(r).reduce(((r,e)=>{let[t,s]=e;return void 0===s||(r[t]=s),r}),{}),c=null==i||null===(e=i.compoundVariants)||void 0===e?void 0:e.reduce(((r,e)=>{let{class:t,className:s,...a}=e;return Object.entries(a).every((r=>{let[e,t]=r;return Array.isArray(t)?t.includes({...l,...d}[e]):{...l,...d}[e]===t}))?[...r,t,s]:r}),[]);return a(n,o,c,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:"9d81a7c592a57a533e2b8a48f015e2f9e796be51",class:l({size:this.size,bg:this.bg,color:this.color})},e("slot",{key:"999e75ec14a8346d84dbfc5122c448999d4fc481"}))}};o.style="";export{o as salla_badge}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as t,c as s,h as i,H as e,a}from"./p-CN6KGTlN.js";const o=class{constructor(i){t(this,i),this.orderItemUpdated=s(this,"orderItemUpdated"),this.orderItemRemoved=s(this,"orderItemRemoved"),this.handleQuantityChange=t=>{const s=t.detail,i=s?.quantity??parseInt(t.target.value,10);isNaN(i)||i<1||i!==this.quantity&&(this.quantity=i,this.emitUpdate(i))},this.handleOptionsChange=()=>{this.emitUpdate(this.quantity)}}componentWillLoad(){this.quantity=this.item?.quantity||1}componentDidLoad(){const t=this.host.querySelector("salla-quantity-input");t&&t.addEventListener("change",this.handleQuantityChange);const s=this.host.querySelector("salla-product-options");s&&s.addEventListener("change",this.handleOptionsChange)}disconnectedCallback(){const t=this.host.querySelector("salla-quantity-input");t&&t.removeEventListener("change",this.handleQuantityChange);const s=this.host.querySelector("salla-product-options");s&&s.removeEventListener("change",this.handleOptionsChange)}get hasOptions(){const t=this.item.product?.options;return t&&t.length>0}async getSelectedOptions(){const t=this.host.querySelector(`salla-product-options[product-id="${this.item.product?.id}"]`);return await(t?.getSelectedOptionsData())||{}}async emitUpdate(t){const s={itemId:this.item?.id,quantity:t};this.hasOptions&&(s.options=await this.getSelectedOptions()),this.orderItemUpdated.emit(s)}removeItem(){const t=this.item?.id;null!=t&&this.orderItemRemoved.emit({itemId:t})}render(){if(!this.item)return null;const t=this.item.product,s=this.item.name||t?.name||"",a=t?.image?.url||"",o=t?.image?.alt||s,n=t?.url||"#",l=t?.price,r=t?.max_quantity,d=t?.weight_label,c=this.item.product?.options,h={value:this.quantity};return r&&(h.max=r),i(e,null,i("div",null,i("div",{class:"s-order-edit-item-header"},i("div",{class:"s-order-edit-item-media"},a&&i("a",{href:n},i("img",{src:a,alt:o,class:"s-order-edit-item-image"})),i("div",{class:"s-order-edit-item-details"},i("h2",{class:"s-order-edit-item-name"},i("a",{href:n,class:"s-order-edit-item-link"},s)),null!=l&&i("span",{class:"s-order-edit-item-price",innerHTML:salla.money(l)}),d&&i("p",{class:"s-order-edit-item-weight"},salla.lang.getWithDefault("pages.products.weight","الوزن")," ",d))),i("salla-button",{type:"button",shape:"icon",size:"small",color:"danger","aria-label":salla.lang.getWithDefault("common.elements.delete","حذف"),onClick:()=>this.removeItem()},i("i",{class:"sicon-cancel"}))),i("div",{class:"s-order-edit-item-quantity"},i("h3",{class:"s-order-edit-item-quantity-label"},salla.lang.getWithDefault("common.elements.quantity","الكمية")),i("div",{class:"s-order-edit-item-quantity-input"},i("salla-quantity-input",{...h}))),this.hasOptions&&i("form",{onSubmit:t=>t.preventDefault()},i("salla-product-options",{"product-id":t.id,options:JSON.stringify(c),key:`${t.id}-order-edit-item-options`}))))}get host(){return a(this)}};o.style="";export{o as salla_order_edit_item}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as e,c as t,h as s,H as i}from"./p-CN6KGTlN.js";import{a}from"./p-BedNk7k1.js";const l=class{constructor(s){e(this,s),this.changed=t(this,"changed"),this.min=0,this.max=1e4,this.moreThanLabel="أكثر من",this.lessThanLabel="أقل من",this.toLabel="الى",this.fromLabel="من",this.typing=!1,this.isMin=!1,this.isRTL=salla.config.get("theme.is_rtl",!0),this.filterValues=[]}connectedCallback(){if(this.filtersData&&this.filtersData?.price&&(this.minPrice=this.filtersData.price.min,this.maxPrice=this.filtersData.price.max),salla.lang.onLoaded((()=>{this.moreThanLabel=salla.lang.getWithDefault("common.elements.more_than",this.moreThanLabel),this.lessThanLabel=salla.lang.getWithDefault("common.elements.less_than",this.lessThanLabel),this.toLabel=salla.lang.getWithDefault("common.elements.to",this.toLabel),this.fromLabel=salla.lang.getWithDefault("common.elements.from",this.fromLabel)})),1==this.option.values.length)return;if(this.option.values.length<=5)return void(this.filterValues=this.option.values);const e=Math.ceil(this.option.values.length/5);for(let t=0;t<this.option.values.length;t+=e)this.filterValues.push(this.option.values.slice(t,t+e).reduce(((e,t)=>(e.to=t.to,e.count+=t.count,e))))}async reset(){this.minInput.value=null,this.maxInput.value=null,this.minPrice=null,this.maxPrice=null}getPriceLabel(e){return isNaN(e.from)||e.from<1?`${this.lessThanLabel} ${salla.money(e.to)}`:isNaN(e.to)||e.to<1?`${this.moreThanLabel} ${salla.money(e.from)}`:`${salla.money(e.from)} ${this.toLabel} ${salla.money(e.to)}`}minInputValidation(e){e&&(e>this.max||this.maxPrice&&e>this.maxPrice)||(e<this.min?this.minPrice=this.min:e&&(this.minPrice=e))}maxInputValidation(e){e&&(e<this.min||this.minPrice&&e<this.minPrice)||e>this.max&&(this.maxPrice=this.max)}async changedEventHandler(e){salla.helpers.inputDigitsOnly(this.minInput),salla.helpers.inputDigitsOnly(this.maxInput);const t=this.minPrice?1*+this.minPrice:null,s=this.maxPrice?1*+this.maxPrice:null;this.maxPrice||(this.maxPrice=""),this.isMin?this.minInputValidation(t):(this.minPrice||(this.minPrice=0),this.maxInputValidation(s)),this.isReady&&this.changed.emit({event:e,option:this.option,value:{max:this.maxPrice,min:this.minPrice}})}handleMinMaxPrice(e,t){this.minPrice=t.from,this.maxPrice="*"!==t.to?t.to:"",this.changedEventHandler(e)}isChecked(e){return!(!this.minPrice&&!this.maxPrice)&&(((e.from<1||"*"==e.from)&&0==this.minPrice||e.from==this.minPrice)&&("*"==e.to||!e.to||e.to==this.maxPrice))}handleMinPrice(e){this.isMin=!0;const t=e.target.value;this.minPrice=""===t?0:t}handleMaxPrice(e){this.isMin=!1;const t=e.target.value;this.maxPrice=void 0===t?"":t}render(){return s(i,{key:"996f527f5a36ea273b0d8c195e35dc3efbdf62f2"},this.filterValues.map(((e,t)=>s("label",{class:"s-filters-label",htmlFor:`${this.option.key}-${t}`,key:t},s("input",{id:`${this.option.key}-${t}`,name:"price",type:"radio",checked:this.isChecked(e),class:"s-filters-radio",onChange:t=>this.handleMinMaxPrice(t,e)}),s("span",{innerHTML:this.getPriceLabel(e)})))),s("div",{key:"bfa8f970eb1e9c5d2b9678e5271aa04208b39289",class:"flex justify-center items-center"},s("div",{key:"59cd51f388f36a38e2bd036d27b7abe001fed9d0",class:"relative max-w-xl w-full"},s("div",{key:"226bd18705572502c7da11022a8ce02dc08d4d21",class:"s-price-range-inputs"},s("div",{key:"0ebfdced114308e82075cd153bef0020daa15bf6",class:"s-price-range-relative"},s("div",{key:"c3dacef6133e2b05eca8d643d1c8ce3f5b991548",class:"s-price-range-currency"}," ",salla.config.currency().symbol),s("input",{key:"b2451e091d93f85f268fc80e30e24f5f71c2628c",type:"number",maxlength:"5",ref:e=>this.minInput=e,onBlur:e=>this.handleMinPrice(e),value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),s("div",{key:"00c07380972b65eac5fac5688b99d21277f65d39",class:"s-price-range-gray-text"}," -"),s("div",{key:"403e98ad682f08946ccd191715ff37401a376722",class:"s-price-range-relative"},s("div",{key:"a1b0729fc40c17b9be68dd2c76a3afa1e99d8a62",class:"s-price-range-currency"}," ",salla.config.currency().symbol),s("input",{key:"5f5e5a202f4b11cde88ae954fa352b71886fe30e",type:"number",maxlength:"5",ref:e=>this.maxInput=e,onBlur:e=>this.handleMaxPrice(e),value:this.maxPrice,placeholder:this.toLabel,class:"s-price-range-number-input","aria-describedby":"price-currency"})),s("salla-button",{key:"dd4899512e03f10c18e74f4d2434406dc6922a50",color:"gray",shape:"icon",size:"small",fill:"outline",onClick:e=>this.changedEventHandler(e)},s("span",{key:"98d023ccfe7e26278259bf690a1d7a4323a704fc",innerHTML:this.isRTL?a:'\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>arrow-right</title>\n<path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>\n</svg>\n'}))))))}componentDidLoad(){this.isReady=!0}};l.style=":host{display:block}.rtl .rtl-range-slider,[dir=rtl] .rtl-range-slider{transform:rotateY(180deg)}.rtl .rtl-range-numbers,[dir=rtl] .rtl-range-numbers{flex-direction:row-reverse}.rtl .form-select,.rtl select,[dir=rtl] .form-select,[dir=rtl] select{background-position:left 0.5rem center;padding-right:12px}.rtl .menu-divide li:not(:last-child):after,[dir=rtl] .menu-divide li:not(:last-child):after{left:0;right:auto}input[type=range]::-webkit-slider-thumb{pointer-events:all;width:24px;height:24px;-webkit-appearance:none}[type=checkbox]:checked{background-size:80%}";export{l as salla_price_range}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as s,h as t,H as e,a}from"./p-CN6KGTlN.js";const i=class{constructor(t){s(this,t),this.loading=!0,this.saveLoading=!1,this.payload={items:{update:[],remove:[]}},this.expired=!1,this.editPreview=null,this.confirming=!1}async componentWillLoad(){await salla.onReady(),this.loadFromProp(),this.startExpiryCheck()}disconnectedCallback(){clearInterval(this.expiryInterval)}startExpiryCheck(){const s=this.order?.customer_editing_session?.ends_at;if(!s)return;const t=()=>new Date(`${s.replace(" ","T")}+03:00`).getTime()<=Date.now();t()?this.expired=!0:this.expiryInterval=setInterval((()=>{t()&&(this.expired=!0,clearInterval(this.expiryInterval))}),1e3)}loadFromProp(){try{if(!this.orderData)return void(this.error=salla.lang.getWithDefault("pages.orders.order_not_found","الطلب غير موجود"));const s="string"==typeof this.orderData?JSON.parse(this.orderData):this.orderData;this.order=s}catch(s){this.error=salla.lang.getWithDefault("pages.orders.order_not_found","الطلب غير موجود")}finally{this.loading=!1}}handleItemUpdated(s){if(!this.order)return;const{itemId:t,quantity:e,options:a}=s.detail,i=this.payload.items.update.filter((s=>s.id!==t));i.push({id:t,quantity:e,options:a??[]}),this.payload={...this.payload,items:{...this.payload.items,update:i}},this.order={...this.order,items:this.order.items.map((s=>s.id===t?{...s,quantity:e}:s))}}handleItemRemoved(s){if(!this.order)return;if(this.order.items.length<=1)return void salla.notify.error(salla.lang.getWithDefault("pages.orders.order_cannot_be_empty","لا يمكن إزالة جميع المنتجات من الطلب"));const{itemId:t}=s.detail;this.payload={...this.payload,items:{update:this.payload.items.update.filter((s=>s.id!==t)),remove:[...this.payload.items.remove,t]}},this.order={...this.order,items:this.order.items.filter((s=>s.id!==t))}}get hasChanges(){return this.payload.items.update.length>0||this.payload.items.remove.length>0}async saveOrder(){if(this.hasChanges){this.saveLoading=!0;try{const s=await salla.order.api.editOrder(this.orderId,this.payload);this.editPreview=s?.data?.data||s?.data,await(this.saveModal?.open())}catch(s){const t=s?.response?.data?.error?.message||s?.response?.data?.message;t&&salla.notify.error(t)}finally{this.saveLoading=!1}}}navigateToOrder(){const s=new URL(window.location.href);s.pathname=s.pathname.replace(/\/edit\/?$/,""),s.search="",window.location.href=s.href}handleConfirm(){this.confirming=!0,this.editPreview?.payment?.required&&this.editPreview.payment.payment_url?window.location.href=this.editPreview.payment.payment_url:this.navigateToOrder()}async cancelEditSession(){try{await salla.order.api.cancelEditSession(this.orderId),this.navigateToOrder()}catch(s){const t=s?.response?.data?.error?.message||s?.response?.data?.message;t&&salla.notify.error(t)}}renderSaveModal(){const s=this.editPreview,e=s?.totals?.remaining_amount?.amount>0,a=s?.totals?.refund_amount?.amount>0,i=s?.totals?.tax?.amount?.amount;return t("salla-modal",{ref:s=>this.saveModal=s,width:"md",onModalVisibilityChanged:async s=>{s.detail||(this.editPreview=null,this.confirming||await this.cancelEditSession(),this.confirming=!1)}},t("div",{class:"s-order-edit-modal"},t("h2",{class:"s-order-edit-modal-title"},salla.lang.getWithDefault("pages.orders.edit_summary_title","ملخص الطلب بعد التعديل")),s?.items?.length>0&&t("div",{class:"s-order-edit-modal-items"},s.items.map((s=>{const e=this.order?.items?.find((t=>t.id==s.id)),a=e?.product?.image?.url,i=s.options?.join("/ ");return t("div",{class:"s-order-edit-modal-item"},t("div",{class:"s-order-edit-modal-item-start"},a&&t("img",{src:a,alt:s.name,class:"s-order-edit-modal-item-image"}),t("div",null,t("p",{class:"s-order-edit-modal-item-name"},s.name),i&&t("span",{class:"s-order-edit-modal-item-options"},i))),t("div",{class:"s-order-edit-modal-item-end"},t("span",{class:"s-order-edit-modal-item-price",innerHTML:salla.money(s.price.amount)})))}))),s?.totals?.updated_products_total&&t("div",{class:"s-order-edit-modal-row"},t("span",{class:"s-order-edit-modal-row-label"},salla.lang.getWithDefault("pages.orders.modified_products_total","مجموع المنتجات المعدلة")),t("span",{class:"s-order-edit-modal-row-value",innerHTML:salla.money(s.totals.updated_products_total.amount)})),i>0&&t("div",{class:"s-order-edit-modal-row"},t("span",{class:"s-order-edit-modal-tax-label"},t("i",{class:"sicon-info-circle s-order-edit-modal-tax-icon"}),salla.lang.getWithDefault("pages.orders.vat","ضريبة القيمة المضافة")),t("span",{class:"s-order-edit-modal-row-value",innerHTML:salla.money(i)})),s?.totals?.total&&t("div",{class:"s-order-edit-modal-total"},t("span",{class:"s-order-edit-modal-total-label"},salla.lang.getWithDefault("pages.orders.order_total","اجمالي الطلب")),t("span",{class:"s-order-edit-modal-total-value",innerHTML:salla.money(s.totals.total.amount)})),a&&t("div",{class:"s-order-edit-modal-refund"},t("i",{class:"sicon-info-circle s-order-edit-modal-refund-icon"}),t("p",{class:"s-order-edit-modal-refund-text"},salla.lang.getWithDefault("pages.orders.refund_message","سيتم تحويل فارق المبلغ على نفس وسيلة الدفع"))),t("div",{class:"s-order-edit-modal-btn-wrapper"},t("salla-button",{onClick:()=>this.handleConfirm()},e?salla.lang.getWithDefault("pages.orders.pay_difference","دفع فارق المبلغ"):a?salla.lang.getWithDefault("pages.orders.confirm_and_receive_difference","تأكيد واستلام فارق المبلغ"):salla.lang.getWithDefault("pages.orders.confirm_changes","تأكيد التعديلات"),t("i",{class:"sicon-keyboard_arrow_left s-order-edit-modal-btn-icon"})))))}render(){if(this.loading)return t(e,null,t("salla-loading",null));if(this.expired)return t(e,null,t("div",{class:"s-order-edit-expired"},t("p",null,salla.lang.getWithDefault("pages.orders.edit_session_expired","انتهت مدة التعديل المتاحة")),t("salla-button",{onClick:()=>this.navigateToOrder()},salla.lang.getWithDefault("pages.orders.back_to_order","العودة إلى تفاصيل الطلب"))));if(this.error||!this.order)return t(e,null,t("div",{class:"no-content-placeholder"},t("i",{class:"sicon-shopping-bag icon"}),t("p",null,this.error)));const s=this.order.items&&this.order.items.length>0,a=this.order.customer_editing_session?.ends_at;return t(e,null,a&&t("div",{class:"s-order-edit-timer-wrapper"},t("salla-count-down",{prefixText:salla.lang.getWithDefault("pages.orders.edit_within","يمكنك التعديل خلال"),date:a,horizontal:!0,withButton:!0,autoSegments:!0,labeled:!1,size:"sm",color:"primary"})),t("div",{class:"s-order-edit-items-wrapper"},t("h2",{class:"s-order-edit-items-title"},salla.lang.getWithDefault("pages.orders.order_products","منتجات الطلب")),s?this.order.items.map(((s,e)=>[t("salla-order-edit-item",{key:s.id,item:s,orderId:this.orderId}),e<this.order.items.length-1?t("div",{class:"s-order-edit-items-divider"}):null])):t("div",{class:"no-content-placeholder"},t("i",{class:"sicon-shopping-bag icon"}),t("p",null,salla.lang.getWithDefault("common.elements.no_items","لا توجد عناصر")))),t("div",{class:"s-order-edit-actions"},t("salla-button",{onClick:()=>this.saveOrder(),loading:this.saveLoading,disabled:!this.hasChanges},salla.lang.getWithDefault("pages.orders.save_changes","حفظ التعديلات")),t("salla-button",{color:"gray",fill:"outline",onClick:()=>this.cancelEditSession()},salla.lang.getWithDefault("common.elements.cancel","الغاء"))),this.renderSaveModal())}get host(){return a(this)}};i.style="";export{i as salla_order_edit}