@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
@@ -0,0 +1,39 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-CfaNNoM2.js';
5
+
6
+ const sallaOrderEditProductCardCss = ":host{display:block;min-width:0}";
7
+
8
+ const SallaOrderEditProductCard = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.orderEditProductSelected = createEvent(this, "orderEditProductSelected");
12
+ }
13
+ get productData() {
14
+ if (!this.product) {
15
+ return {};
16
+ }
17
+ if (typeof this.product === 'object') {
18
+ return this.product;
19
+ }
20
+ try {
21
+ return JSON.parse(this.product);
22
+ }
23
+ catch (_error) {
24
+ return {};
25
+ }
26
+ }
27
+ handleSelectProduct() {
28
+ this.orderEditProductSelected.emit({ product: this.productData });
29
+ }
30
+ render() {
31
+ const product = this.productData;
32
+ const productName = product?.name || salla.lang.getWithDefault('common.elements.product', 'منتج');
33
+ const price = product?.price;
34
+ return (h(Host, { key: 'e5837d7ec53f2566fe981f02a95b52c7c817821c' }, h("button", { key: '415861262349f83c3c7d1dc72d9f8f01f855317e', type: "button", class: "s-order-edit-product-card", onClick: () => this.handleSelectProduct() }, h("div", { key: '072d3af840d5044636380f5620703cc446877162', class: "s-order-edit-product-card-media" }, product?.image?.url ? (h("img", { src: product.image.url, alt: product.image.alt || productName, class: "s-order-edit-product-card-image" })) : (h("div", { class: "s-order-edit-product-card-placeholder" }, h("i", { class: "sicon-shopping-bag" })))), h("div", { key: 'ac51822bbcf1f2213b11204fa968a40e7de164a3', class: "s-order-edit-product-card-content" }, h("h3", { key: 'e817582bf88db2ed6ac47a37a5d2b4e4ac953770', class: "s-order-edit-product-card-title" }, productName), price != null && (h("p", { key: 'efbf1b16d7c6d73de76bab1e8715a474f812fde4', class: "s-order-edit-product-card-price", innerHTML: salla.money(price) }))))));
35
+ }
36
+ };
37
+ SallaOrderEditProductCard.style = sallaOrderEditProductCardCss;
38
+
39
+ export { SallaOrderEditProductCard as salla_order_edit_product_card };
@@ -1,27 +1,84 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-CN6KGTlN.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CfaNNoM2.js';
5
+ import { g as getOrderItemSelectedOptions, a as getOrderEditProductMaxQuantity, c as clampOrderEditQuantity, u as updateOrderItems, r as removeOrderItems, m as mergePayloadItems, b as cloneOrderEditProduct, f as findMergeableItem, d as updateAddedPayloadList, e as upsertPayloadUpdateList, h as createAddedOrderItem, i as buildSavePayload } from './helpers-DR_vlSvU.js';
6
+ import './interfaces-CoQJOPRz.js';
5
7
 
6
- const sallaOrderEditCss = "";
8
+ const sallaOrderEditCss = ":host{display:block}";
7
9
 
8
10
  const SallaOrderEdit = class {
9
11
  constructor(hostRef) {
10
12
  registerInstance(this, hostRef);
11
13
  this.loading = true;
12
14
  this.saveLoading = false;
13
- this.payload = { items: { update: [], remove: [] } };
15
+ this.payload = { items: { update: [], remove: [], add: [] } };
14
16
  this.expired = false;
15
17
  this.editPreview = null;
18
+ this.productSearchQuery = '';
19
+ this.productsListKey = 0;
20
+ this.productsListSource = 'latest';
21
+ this.productsListSourceValue = '';
22
+ this.selectedProductToAdd = null;
23
+ this.addProductQuantity = 1;
24
+ this.addProductLoading = false;
25
+ this.addProductConfirmLoading = false;
26
+ this.mobileProductsModalMounted = false;
27
+ this.isMobileViewport = false;
28
+ // Plain field (not @State): scroll-loading guard never affects rendering, so avoid re-render churn.
29
+ this.mobileProductsListLoading = false;
16
30
  this.confirming = false;
31
+ this.handleMobileProductSelected = (event) => {
32
+ event.stopPropagation();
33
+ void this.handleProductSelected(event);
34
+ };
35
+ this.productsPanelMobileQuery = '(max-width: 768px)';
36
+ this.handleProductsPanelViewportChange = (event) => {
37
+ this.isMobileViewport = event.matches;
38
+ };
39
+ this.hasProductTypeFilter = (url) => {
40
+ const queryStart = url.indexOf('?');
41
+ const query = (queryStart >= 0 ? url.slice(queryStart + 1) : url).split('#')[0];
42
+ return Array.from(new URLSearchParams(query)).some(([key, value]) => (value === 'product' &&
43
+ /^filters\[types\](?:\[(?:\d*)\])?$/.test(key)));
44
+ };
45
+ this.normalizeProductsListArrayParams = (url) => {
46
+ return url.replace(/(^|[?&])(includes|source_value|filters(?:\[|%5B)[^&=\]%]+?(?:\]|%5D))(\[|%5B)\d+(\]|%5D)(?==)/gi, (_, sep, name, open, close) => `${sep}${name}${open}${close}`);
47
+ };
48
+ this.handleBeforeBuildListUrl = (ctx) => {
49
+ if (ctx.component?.productCardComponent !== 'salla-order-edit-product-card' ||
50
+ typeof ctx.url !== 'string') {
51
+ return;
52
+ }
53
+ ctx.url = this.normalizeProductsListArrayParams(ctx.url);
54
+ if (this.hasProductTypeFilter(ctx.url)) {
55
+ return;
56
+ }
57
+ ctx.url += `${ctx.url.includes('?') ? '&' : '?'}filters[types][]=product`;
58
+ };
59
+ this.defaultProductsListSource = 'latest';
60
+ this.debouncedProductSearch = salla.helpers.debounce((query) => this.applyProductSearch(query), 500);
17
61
  }
18
62
  async componentWillLoad() {
63
+ this.setupProductsPanelViewportQuery();
19
64
  await salla.onReady();
65
+ this.unregisterBeforeBuildListUrlHook = salla.hooks.registerHook('salla-products-list', 'beforeBuildListUrl', this.handleBeforeBuildListUrl);
20
66
  this.loadFromProp();
21
67
  this.startExpiryCheck();
22
68
  }
23
69
  disconnectedCallback() {
24
70
  clearInterval(this.expiryInterval);
71
+ this.unregisterBeforeBuildListUrlHook?.();
72
+ this.productsPanelViewportQuery?.removeEventListener('change', this.handleProductsPanelViewportChange);
73
+ this.mobileProductsModal?.removeEventListener('orderEditProductSelected', this.handleMobileProductSelected);
74
+ }
75
+ setupProductsPanelViewportQuery() {
76
+ if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {
77
+ return;
78
+ }
79
+ this.productsPanelViewportQuery = window.matchMedia(this.productsPanelMobileQuery);
80
+ this.isMobileViewport = this.productsPanelViewportQuery.matches;
81
+ this.productsPanelViewportQuery.addEventListener('change', this.handleProductsPanelViewportChange);
25
82
  }
26
83
  startExpiryCheck() {
27
84
  const endsAt = this.order?.customer_editing_session?.ends_at;
@@ -46,7 +103,13 @@ const SallaOrderEdit = class {
46
103
  return;
47
104
  }
48
105
  const data = typeof this.orderData === 'string' ? JSON.parse(this.orderData) : this.orderData;
49
- this.order = data;
106
+ this.order = {
107
+ ...data,
108
+ items: data.items.map(item => ({
109
+ ...item,
110
+ selectedOptions: getOrderItemSelectedOptions(item),
111
+ })),
112
+ };
50
113
  }
51
114
  catch (e) {
52
115
  this.error = salla.lang.getWithDefault('pages.orders.order_not_found', 'الطلب غير موجود');
@@ -55,22 +118,223 @@ const SallaOrderEdit = class {
55
118
  this.loading = false;
56
119
  }
57
120
  }
58
- handleItemUpdated(event) {
59
- if (!this.order)
121
+ applyProductSearch(query) {
122
+ const normalizedQuery = query?.trim() || '';
123
+ const nextSource = normalizedQuery ? 'search' : this.defaultProductsListSource;
124
+ const nextSourceValue = nextSource === 'search' ? JSON.stringify(normalizedQuery) : '';
125
+ if (this.productsListSource === nextSource &&
126
+ this.productsListSourceValue === nextSourceValue) {
60
127
  return;
61
- const { itemId, quantity, options } = event.detail;
62
- const updateList = this.payload.items.update.filter(u => u.id !== itemId);
63
- const updateEntry = { id: itemId, quantity, options: options ?? [] };
64
- updateList.push(updateEntry);
65
- this.payload = {
66
- ...this.payload,
67
- items: { ...this.payload.items, update: updateList },
128
+ }
129
+ this.productsListSource = nextSource;
130
+ this.productsListSourceValue = nextSourceValue;
131
+ this.productsListKey += 1;
132
+ }
133
+ handleProductSearch(event) {
134
+ const value = event.target?.value || '';
135
+ this.productSearchQuery = value;
136
+ this.debouncedProductSearch(value);
137
+ }
138
+ getProductsListKey(scope) {
139
+ return `${scope}-${this.productsListSource}-${this.productsListSourceValue}-${this.productsListKey}`;
140
+ }
141
+ handleMobileProductsScroll(event) {
142
+ const container = event.currentTarget;
143
+ const distanceToBottom = container.scrollHeight - container.scrollTop - container.clientHeight;
144
+ if (distanceToBottom > 200 || this.mobileProductsListLoading) {
145
+ return;
146
+ }
147
+ const productsList = container.querySelector('salla-products-list');
148
+ if (!productsList) {
149
+ return;
150
+ }
151
+ this.mobileProductsListLoading = true;
152
+ void productsList.loadMore().finally(() => {
153
+ this.mobileProductsListLoading = false;
154
+ });
155
+ }
156
+ waitForNextFrame() {
157
+ return new Promise(resolve => requestAnimationFrame(() => resolve(undefined)));
158
+ }
159
+ async openMobileProductsModal() {
160
+ if (!this.mobileProductsModalMounted) {
161
+ this.mobileProductsModalMounted = true;
162
+ await this.waitForNextFrame();
163
+ }
164
+ await this.mobileProductsModal?.open?.();
165
+ }
166
+ setMobileProductsModal(modal) {
167
+ if (this.mobileProductsModal === modal) {
168
+ return;
169
+ }
170
+ this.mobileProductsModal?.removeEventListener('orderEditProductSelected', this.handleMobileProductSelected);
171
+ this.mobileProductsModal = modal;
172
+ this.mobileProductsModal?.addEventListener('orderEditProductSelected', this.handleMobileProductSelected);
173
+ }
174
+ resetAddProductDrawer() {
175
+ this.selectedProductToAdd = null;
176
+ this.addProductQuantity = 1;
177
+ this.addProductLoading = false;
178
+ this.addProductConfirmLoading = false;
179
+ this.addProductOptions = null;
180
+ }
181
+ getAddProductMaxQuantity(product = this.selectedProductToAdd) {
182
+ return getOrderEditProductMaxQuantity(product);
183
+ }
184
+ clampAddProductQuantity(quantity, product = this.selectedProductToAdd) {
185
+ return clampOrderEditQuantity(quantity, this.getAddProductMaxQuantity(product));
186
+ }
187
+ getApiErrorMessage(error) {
188
+ return error?.response?.data?.error?.message || error?.response?.data?.message;
189
+ }
190
+ notifyApiError(error) {
191
+ const message = this.getApiErrorMessage(error);
192
+ if (message) {
193
+ salla.notify.error(message);
194
+ }
195
+ }
196
+ async validateAddProductOptions() {
197
+ if (!this.selectedProductToAdd?.options?.length) {
198
+ return true;
199
+ }
200
+ if (!this.addProductOptions) {
201
+ return false;
202
+ }
203
+ return ((await this.addProductOptions.validateAndScroll?.()) ??
204
+ (await this.addProductOptions.reportValidity?.()) ??
205
+ false);
206
+ }
207
+ updateLocalOrderItem(itemId, quantity, optionDefinitions, selectedOptions) {
208
+ this.order = {
209
+ ...this.order,
210
+ items: updateOrderItems(this.order.items, itemId, quantity, optionDefinitions, selectedOptions),
68
211
  };
212
+ }
213
+ removeLocalOrderItem(itemId) {
69
214
  this.order = {
70
215
  ...this.order,
71
- items: this.order.items.map(item => item.id === itemId ? { ...item, quantity } : item),
216
+ items: removeOrderItems(this.order.items, itemId),
72
217
  };
73
218
  }
219
+ setPayloadItems(patch) {
220
+ this.payload = {
221
+ ...this.payload,
222
+ items: mergePayloadItems(this.payload.items, patch),
223
+ };
224
+ }
225
+ handleAddProductQuantityChange(event) {
226
+ const detail = event.detail;
227
+ const newQuantity = detail?.quantity ?? parseInt(event.target?.value, 10);
228
+ if (isNaN(newQuantity) || newQuantity < 1) {
229
+ return;
230
+ }
231
+ this.addProductQuantity = this.clampAddProductQuantity(newQuantity);
232
+ }
233
+ async handleProductSelected(event) {
234
+ const product = event.detail?.product;
235
+ if (!product?.id || this.addProductLoading) {
236
+ return;
237
+ }
238
+ this.addProductLoading = true;
239
+ try {
240
+ this.selectedProductToAdd = cloneOrderEditProduct(product);
241
+ this.addProductQuantity = 1;
242
+ await this.mobileProductsModal?.close?.();
243
+ await this.waitForNextFrame();
244
+ await this.addProductDrawer?.open?.();
245
+ }
246
+ catch (error) {
247
+ this.notifyApiError(error);
248
+ }
249
+ finally {
250
+ this.addProductLoading = false;
251
+ }
252
+ }
253
+ async confirmAddProduct() {
254
+ if (!this.selectedProductToAdd?.id) {
255
+ return;
256
+ }
257
+ if (this.addProductConfirmLoading) {
258
+ return;
259
+ }
260
+ this.addProductConfirmLoading = true;
261
+ try {
262
+ const maxQuantity = this.getAddProductMaxQuantity();
263
+ const normalizedQuantity = this.clampAddProductQuantity(this.addProductQuantity);
264
+ if (normalizedQuantity !== this.addProductQuantity) {
265
+ this.addProductQuantity = normalizedQuantity;
266
+ }
267
+ const productOptions = this.addProductOptions;
268
+ const optionsAreValid = await this.validateAddProductOptions();
269
+ if (!optionsAreValid) {
270
+ salla.notify.error(salla.lang.getWithDefault('common.messages.required_fields', 'يرجى تعبئة الحقول المطلوبة'));
271
+ return;
272
+ }
273
+ const selectedOptionsPayload = (await productOptions?.getSelectedOptionsData?.()) || {};
274
+ const optionDefinitions = (await productOptions?.getOptionsData?.()) ||
275
+ this.selectedProductToAdd.options ||
276
+ [];
277
+ const existingItem = findMergeableItem(this.order?.items, this.selectedProductToAdd.id, selectedOptionsPayload);
278
+ if (existingItem) {
279
+ const mergedQuantity = clampOrderEditQuantity(existingItem.quantity + normalizedQuantity, maxQuantity);
280
+ this.updateLocalOrderItem(existingItem.id, mergedQuantity, optionDefinitions, selectedOptionsPayload);
281
+ if (existingItem.isNew) {
282
+ this.setPayloadItems({
283
+ add: updateAddedPayloadList(this.payload.items.add, existingItem.id, mergedQuantity, selectedOptionsPayload),
284
+ });
285
+ }
286
+ else {
287
+ this.setPayloadItems({
288
+ update: upsertPayloadUpdateList(this.payload.items.update, existingItem.id, mergedQuantity, selectedOptionsPayload),
289
+ });
290
+ }
291
+ await this.addProductDrawer?.close?.();
292
+ return;
293
+ }
294
+ const newItem = createAddedOrderItem(this.selectedProductToAdd, normalizedQuantity, optionDefinitions, selectedOptionsPayload);
295
+ const addEntry = {
296
+ itemId: newItem.id,
297
+ product_id: this.selectedProductToAdd.id,
298
+ quantity: normalizedQuantity,
299
+ options: selectedOptionsPayload,
300
+ };
301
+ this.order = {
302
+ ...this.order,
303
+ items: [...this.order.items, newItem],
304
+ };
305
+ this.setPayloadItems({
306
+ add: [...this.payload.items.add, addEntry],
307
+ });
308
+ await this.addProductDrawer?.close?.();
309
+ }
310
+ catch (error) {
311
+ this.notifyApiError(error);
312
+ }
313
+ finally {
314
+ this.addProductConfirmLoading = false;
315
+ }
316
+ }
317
+ handleItemUpdated(event) {
318
+ if (!this.order)
319
+ return;
320
+ const { itemId, quantity, options, optionDefinitions } = event.detail;
321
+ const currentItem = this.order.items.find(item => item.id === itemId);
322
+ if (!currentItem) {
323
+ return;
324
+ }
325
+ const safeQuantity = clampOrderEditQuantity(quantity, getOrderEditProductMaxQuantity(currentItem.product));
326
+ if (currentItem.isNew) {
327
+ this.setPayloadItems({
328
+ add: updateAddedPayloadList(this.payload.items.add, itemId, safeQuantity, options),
329
+ });
330
+ this.updateLocalOrderItem(itemId, safeQuantity, optionDefinitions, options);
331
+ return;
332
+ }
333
+ this.setPayloadItems({
334
+ update: upsertPayloadUpdateList(this.payload.items.update, itemId, safeQuantity, options ?? {}),
335
+ });
336
+ this.updateLocalOrderItem(itemId, safeQuantity, optionDefinitions, options);
337
+ }
74
338
  handleItemRemoved(event) {
75
339
  if (!this.order)
76
340
  return;
@@ -79,35 +343,39 @@ const SallaOrderEdit = class {
79
343
  return;
80
344
  }
81
345
  const { itemId } = event.detail;
82
- this.payload = {
83
- ...this.payload,
84
- items: {
85
- update: this.payload.items.update.filter(u => u.id !== itemId),
86
- remove: [...this.payload.items.remove, itemId],
87
- },
88
- };
89
- this.order = {
90
- ...this.order,
91
- items: this.order.items.filter(item => item.id !== itemId),
92
- };
346
+ const currentItem = this.order.items.find(item => item.id === itemId);
347
+ if (!currentItem) {
348
+ return;
349
+ }
350
+ if (currentItem.isNew) {
351
+ this.setPayloadItems({
352
+ add: this.payload.items.add.filter(item => item.itemId !== itemId),
353
+ });
354
+ this.removeLocalOrderItem(itemId);
355
+ return;
356
+ }
357
+ this.setPayloadItems({
358
+ update: this.payload.items.update.filter(u => u.id !== itemId),
359
+ remove: [...this.payload.items.remove, itemId],
360
+ });
361
+ this.removeLocalOrderItem(itemId);
93
362
  }
94
363
  get hasChanges() {
95
- return this.payload.items.update.length > 0 || this.payload.items.remove.length > 0;
364
+ return (this.payload.items.update.length > 0 ||
365
+ this.payload.items.remove.length > 0 ||
366
+ this.payload.items.add.length > 0);
96
367
  }
97
368
  async saveOrder() {
98
369
  if (!this.hasChanges)
99
370
  return;
100
371
  this.saveLoading = true;
101
372
  try {
102
- const response = await salla.order.api.editOrder(this.orderId, this.payload);
373
+ const response = await salla.order.api.editOrder(this.orderId, buildSavePayload(this.payload));
103
374
  this.editPreview = response?.data?.data || response?.data;
104
- await this.saveModal?.open();
375
+ await this.saveModal?.open?.();
105
376
  }
106
377
  catch (error) {
107
- const message = error?.response?.data?.error?.message || error?.response?.data?.message;
108
- if (message) {
109
- salla.notify.error(message);
110
- }
378
+ this.notifyApiError(error);
111
379
  }
112
380
  finally {
113
381
  this.saveLoading = false;
@@ -134,12 +402,44 @@ const SallaOrderEdit = class {
134
402
  this.navigateToOrder();
135
403
  }
136
404
  catch (error) {
137
- const message = error?.response?.data?.error?.message || error?.response?.data?.message;
138
- if (message) {
139
- salla.notify.error(message);
140
- }
405
+ this.notifyApiError(error);
141
406
  }
142
407
  }
408
+ renderProductsPanel() {
409
+ const addProductTitle = salla.lang.getWithDefault('pages.orders.add_product_to_order', 'أضف منتج للطلب');
410
+ return (h("section", { class: "s-order-edit-products-panel" }, h("div", { class: "s-order-edit-products-header" }, h("h2", { class: "s-order-edit-products-title" }, addProductTitle)), this.renderProductsPickerContent('panel')));
411
+ }
412
+ renderProductsPickerContent(scope) {
413
+ return (h("div", { class: {
414
+ 's-order-edit-products-picker': true,
415
+ 's-order-edit-products-modal-content': scope === 'modal',
416
+ } }, h("label", { class: "s-order-edit-products-search" }, h("i", { class: "sicon-search" }), h("input", { type: "search", class: "s-order-edit-products-search-input", placeholder: salla.lang.getWithDefault('pages.products.search_for_product', 'ابحث عن منتج'), value: this.productSearchQuery, onInput: event => this.handleProductSearch(event) })), h("div", { class: "s-order-edit-products-list", onScroll: scope === 'modal' ? event => this.handleMobileProductsScroll(event) : undefined }, h("salla-products-list", { key: this.getProductsListKey(scope), includes: ['options'], source: this.productsListSource, "source-value": this.productsListSourceValue, autoload: true, "product-card-component": "salla-order-edit-product-card" }))));
417
+ }
418
+ renderMobileProductsModal() {
419
+ return (h("salla-modal", { ref: modal => this.setMobileProductsModal(modal), width: "md", class: "s-order-edit-mobile-products-modal", "modal-title": salla.lang.getWithDefault('pages.orders.add_product_to_order', 'أضف منتج للطلب'), onModalVisibilityChanged: (e) => {
420
+ if (!e.detail) {
421
+ this.mobileProductsModalMounted = false;
422
+ }
423
+ } }, this.mobileProductsModalMounted ? this.renderProductsPickerContent('modal') : null));
424
+ }
425
+ renderAddProductDrawer() {
426
+ const product = this.selectedProductToAdd;
427
+ const productName = product?.name || salla.lang.getWithDefault('common.elements.product', 'منتج');
428
+ const price = product?.price;
429
+ const maxQuantity = this.getAddProductMaxQuantity(product);
430
+ const optionsInstanceKey = product ? `order-edit-add-${product.id}` : 'order-edit-add';
431
+ const quantityAttrs = {
432
+ value: this.clampAddProductQuantity(this.addProductQuantity, product),
433
+ };
434
+ if (maxQuantity) {
435
+ quantityAttrs.max = maxQuantity;
436
+ }
437
+ return (h("salla-modal", { ref: drawer => (this.addProductDrawer = drawer), width: "md", "modal-title": salla.lang.getWithDefault('pages.orders.add_product_to_order', 'أضف منتج للطلب'), onModalVisibilityChanged: (e) => {
438
+ if (!e.detail) {
439
+ this.resetAddProductDrawer();
440
+ }
441
+ } }, h("div", { class: "s-order-edit-add-modal" }, this.addProductLoading ? (h("div", { class: "s-order-edit-add-modal-loading" }, h("salla-loading", null))) : product ? (h("div", { class: "s-order-edit-add-modal-content" }, h("div", { class: "s-order-edit-add-modal-header" }, h("div", { class: "s-order-edit-add-modal-media" }, product.image?.url && (h("img", { src: product.image.url, alt: product.image.alt || productName, class: "s-order-edit-add-modal-image" })), h("div", { class: "s-order-edit-add-modal-details" }, h("h3", { class: "s-order-edit-add-modal-name" }, productName), price != null && (h("span", { class: "s-order-edit-add-modal-price", innerHTML: salla.money(price) }))))), h("div", { class: "s-order-edit-add-modal-quantity" }, h("h3", { class: "s-order-edit-add-modal-section-title" }, salla.lang.getWithDefault('common.elements.quantity', 'الكمية')), h("div", { class: "s-order-edit-add-modal-quantity-input" }, h("salla-quantity-input", { ...quantityAttrs, onChange: event => this.handleAddProductQuantityChange(event) }))), product.options?.length > 0 && (h("form", { onSubmit: e => e.preventDefault() }, h("salla-product-options", { ref: el => (this.addProductOptions = el), "product-id": product.id, "unique-key": optionsInstanceKey, options: JSON.stringify(product.options), key: `${optionsInstanceKey}-options` }))), h("div", { class: "s-order-edit-add-modal-actions" }, h("salla-button", { onClick: () => this.confirmAddProduct(), loading: this.addProductConfirmLoading }, salla.lang.getWithDefault('common.elements.confirm', 'تأكيد')), h("salla-button", { color: "gray", fill: "outline", onClick: () => this.addProductDrawer?.close?.() }, salla.lang.getWithDefault('common.elements.cancel', 'الغاء'))))) : null)));
442
+ }
143
443
  renderSaveModal() {
144
444
  const preview = this.editPreview;
145
445
  const hasRemainingAmount = preview?.totals?.remaining_amount?.amount > 0;
@@ -172,16 +472,15 @@ const SallaOrderEdit = class {
172
472
  return (h(Host, null, h("div", { class: "s-order-edit-expired" }, h("p", null, salla.lang.getWithDefault('pages.orders.edit_session_expired', 'انتهت مدة التعديل المتاحة')), h("salla-button", { onClick: () => this.navigateToOrder() }, salla.lang.getWithDefault('pages.orders.back_to_order', 'العودة إلى تفاصيل الطلب')))));
173
473
  }
174
474
  if (this.error || !this.order) {
175
- return (h(Host, null, h("div", { class: "no-content-placeholder" }, h("i", { class: "sicon-shopping-bag icon" }), h("p", null, this.error))));
475
+ return (h(Host, null, h("div", { class: "s-order-edit-no-content-placeholder" }, h("i", { class: "sicon-shopping-bag icon" }), h("p", null, this.error))));
176
476
  }
177
477
  const hasItems = this.order.items && this.order.items.length > 0;
178
478
  const endsAt = this.order.customer_editing_session?.ends_at;
179
- return (h(Host, null, endsAt && (h("div", { class: "s-order-edit-timer-wrapper" }, h("salla-count-down", { prefixText: salla.lang.getWithDefault('pages.orders.edit_within', 'يمكنك التعديل خلال'), date: endsAt, horizontal: true, withButton: true, autoSegments: true, labeled: false, size: "sm", color: "primary" }))), h("div", { class: "s-order-edit-items-wrapper" }, h("h2", { class: "s-order-edit-items-title" }, salla.lang.getWithDefault('pages.orders.order_products', 'منتجات الطلب')), hasItems ? (this.order.items.map((item, index) => [
479
+ return (h(Host, null, endsAt && (h("div", { class: "s-order-edit-timer-wrapper" }, h("salla-count-down", { prefixText: salla.lang.getWithDefault('pages.orders.edit_within', 'يمكنك التعديل خلال'), date: endsAt, horizontal: true, withButton: true, autoSegments: true, labeled: false, size: "sm", color: "primary" }))), h("div", { class: "s-order-edit-layout" }, !this.isMobileViewport ? this.renderProductsPanel() : null, h("section", { class: "s-order-edit-order-panel" }, h("div", { class: "s-order-edit-items-wrapper" }, h("h2", { class: "s-order-edit-items-title" }, salla.lang.getWithDefault('pages.orders.order_products', 'منتجات الطلب')), hasItems ? (this.order.items.map((item, index) => [
180
480
  h("salla-order-edit-item", { key: item.id, item: item, orderId: this.orderId }),
181
481
  index < this.order.items.length - 1 ? (h("div", { class: "s-order-edit-items-divider" })) : null,
182
- ])) : (h("div", { class: "no-content-placeholder" }, h("i", { class: "sicon-shopping-bag icon" }), h("p", null, salla.lang.getWithDefault('common.elements.no_items', 'لا توجد عناصر'))))), h("div", { class: "s-order-edit-actions" }, h("salla-button", { onClick: () => this.saveOrder(), loading: this.saveLoading, disabled: !this.hasChanges }, salla.lang.getWithDefault('pages.orders.save_changes', 'حفظ التعديلات')), h("salla-button", { color: "gray", fill: "outline", onClick: () => this.cancelEditSession() }, salla.lang.getWithDefault('common.elements.cancel', 'الغاء'))), this.renderSaveModal()));
482
+ ])) : (h("div", { class: "s-order-edit-no-content-placeholder" }, h("i", { class: "sicon-shopping-bag icon" }), h("p", null, salla.lang.getWithDefault('common.elements.no_items', 'لا توجد عناصر'))))), h("div", { class: "s-order-edit-actions" }, h("salla-button", { class: "s-order-edit-mobile-products-trigger", color: "gray", size: "small", fill: "outline", onClick: () => this.openMobileProductsModal() }, h("i", { class: "sicon-add s-order-edit-mobile-products-trigger-icon" }), salla.lang.getWithDefault('pages.orders.add_product', 'إضافة منتج')), h("salla-button", { onClick: () => this.saveOrder(), loading: this.saveLoading, size: "small", disabled: !this.hasChanges }, salla.lang.getWithDefault('pages.orders.save_changes', 'حفظ التعديلات')), h("salla-button", { size: "small", color: "gray", fill: "outline", onClick: () => this.cancelEditSession() }, salla.lang.getWithDefault('common.elements.cancel', 'الغاء'))))), this.renderMobileProductsModal(), this.renderAddProductDrawer(), this.renderSaveModal()));
183
483
  }
184
- get host() { return getElement(this); }
185
484
  };
186
485
  SallaOrderEdit.style = sallaOrderEditCss;
187
486
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h } from './index-CN6KGTlN.js';
4
+ import { r as registerInstance, h } from './index-CfaNNoM2.js';
5
5
  import { S as SICheck } from './check-BZp0rKEO.js';
6
6
 
7
7
  var iconFileArchive = `<!-- Generated by IcoMoon.io -->
@@ -90,7 +90,7 @@ const SallaOrderSummary = class {
90
90
  this.copyCodeButtonTimeout && clearTimeout(this.copyCodeButtonTimeout);
91
91
  }
92
92
  render() {
93
- return (h("ul", { key: 'bb8c8e2c3a44f0922012789efc9a73d71fd213d5', class: "s-order-summary-wrapper" }, this.noItemFound ? h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" })) :
93
+ return (h("ul", { key: '20b8d793a83306a203cd0f7eadededf3ce224181', class: "s-order-summary-wrapper" }, this.noItemFound ? h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" })) :
94
94
  this.order_items.map((item) => (this.isDigitalCard(item) ? (h("li", { key: item.product.id, class: "s-order-summary-item" }, h("h2", { class: "s-order-summary-item-title" }, this.codes_text, " (", item.name, ")"), item.codes.map((code) => (h("div", { key: code.code, class: "s-order-summary-code-item-wrapper" }, h("p", null, h("span", { innerHTML: iconCreditCard }), h("span", null, code.code)), h("salla-button", { class: `s-order-summary-item-copy-button ${this.codeCopied === code.code ? 'copied' : ''}`, onClick: () => this.copyToClipboardHandler(code.code), shape: "link" }, h("span", { innerHTML: this.codeCopied === code.code ? SICheck : iconCopy }), h("span", null, this.copy_text))))))) :
95
95
  this.isDigitalProduct(item) ? (h("li", { key: item.product.id, class: "s-order-summary-item" }, h("h2", { class: "s-order-summary-item-title" }, this.files_text, " (", item.name, ")"), h("ul", null, item.files.map((file) => (h("li", { class: "s-order-summary-digital-item-wrapper" }, h("div", null, h("span", { innerHTML: iconFileArchive }), h("span", null, file.name)), h("a", { href: file.url, target: "_blank", class: "s-order-summary-item-download" }, h("span", { innerHTML: iconDownload }), h("span", null, this.download_text)))))))) : null))));
96
96
  }
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-CN6KGTlN.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CfaNNoM2.js';
5
5
 
6
6
  const sallaOrderTotalsCardCss = ":host{display:block}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, a as getElement } from './index-CN6KGTlN.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-CfaNNoM2.js';
5
5
  import { H as Helper } from './Helper-DFMXF2_h.js';
6
6
  import './anime.es-CgtvEd63.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-CN6KGTlN.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CfaNNoM2.js';
5
5
 
6
6
  const sallaPaymentsCss = ":host{display:block}";
7
7
 
@@ -34,12 +34,12 @@ const SallaPayments = class {
34
34
  render() {
35
35
  const madeInKSA = !this.exclude.includes('made-in-ksa') && salla.config.get('store.settings.made_in_ksa');
36
36
  const sbcId = this.exclude.includes('sbc') ? null : salla.config.get('store.settings.certificate.id');
37
- return (h(Host, { key: '3e44396c845375f9147a4dd036fe63f299787a6f', class: "s-payments-list-wrap" }, h("ul", { key: '476cc234749bb57898769d1089d718995da9ae12', class: "s-payments-list" }, madeInKSA && h("li", { key: '2bbe346520331ca8bff96a5fb8f4628093422e61', class: "s-payments-list-item" }, h("img", { key: 'a281cc6e6bf4cdfc8fa4948c86a9b1b024bca8b8', width: "100%", height: "100%", decoding: "async", loading: "lazy", src: salla.url.cdn(`images/made-in-ksa.svg`, 58, 58), alt: "made in KSA certified" })), this.payments.map((payment) => (payment == "cod" ?
37
+ return (h(Host, { key: '94af8ddf97dca63ba7c1a19f65a1d872b8d565c6', class: "s-payments-list-wrap" }, h("ul", { key: '8e1425d89a60290b92042f82edbd2c0505da2904', class: "s-payments-list" }, madeInKSA && h("li", { key: '4ca6642fc2ef1cf1505b37127cf93cf48805e454', class: "s-payments-list-item" }, h("img", { key: 'f704728b2fade2d27f2109d47bc7e7381f3efe8b', width: "100%", height: "100%", decoding: "async", loading: "lazy", src: salla.url.cdn(`images/made-in-ksa.svg`, 58, 58), alt: "made in KSA certified" })), this.payments.map((payment) => (payment == "cod" ?
38
38
  h("div", { id: "cod-slot", innerHTML: this.codSlot
39
39
  .replace(/\{image\}/g, salla.url.cdn(`images/payment/cod_mini.png`, 58, 58)) }) :
40
40
  h("div", { id: "payment-slot", innerHTML: this.paymentSlot
41
41
  .replace(/\{image\}/g, salla.url.cdn(`images/payment/${payment}_mini.png`, 58, 58))
42
- .replace(/\{payment\}/g, payment) }))), sbcId && h("div", { key: 'ef5bbf9934a50015e2eb588f41ec9b5f86341dea', id: "sbc-slot", innerHTML: this.sbcSlot
42
+ .replace(/\{payment\}/g, payment) }))), sbcId && h("div", { key: '5071bb1e003ff36b445fd15948b7612f6a1ecde4', id: "sbc-slot", innerHTML: this.sbcSlot
43
43
  .replace(/\{image\}/g, salla.url.cdn(`images/sbc.png`, 58, 58))
44
44
  .replace(/\{link\}/g, `https://eauthenticate.saudibusiness.gov.sa/certificate-details/${sbcId}`) }))));
45
45
  }
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-CN6KGTlN.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CfaNNoM2.js';
5
5
 
6
6
  var Inbox = `<!-- Generated by IcoMoon.io -->
7
7
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
@@ -41,7 +41,7 @@ const SallaPlaceholder = class {
41
41
  };
42
42
  }
43
43
  render() {
44
- return (h(Host, { key: '85a52f39cc2012ca1a3c6d143d06b81981d761aa', class: this.alignmentClass() }, h("div", { key: '35be844bc3883f3451344bbeedb4b24f9c218f7a', class: `s-placeholder-icon s-placeholder-icon-${this.iconSize}`, innerHTML: this.icon }), h("div", { key: '58152da7774e79fdb09465087b741212a3982cf2', class: "s-placeholder-title" }, h("slot", { key: 'f9953085b498043920fd03ae44a082e0fb1a02d2', name: 'title' }, h("span", { key: '989633e3165d187c6d3b36e0cdfa2cb10466c6da' }, salla.lang.get('common.elements.no_options')))), h("div", { key: 'bfbcbb5a2f9561292e5a6850eb43f5bfea8bd040', class: "s-placeholder-description" }, h("slot", { key: '4592587daaaa41c67cd7670eea7d5e7e3d8635d7', name: 'description' }, h("span", { key: '4b1e3c4a453b8dbc5139b40ebddb94d8c2d1c465' }, salla.lang.get('common.errors.empty_results'))))));
44
+ return (h(Host, { key: 'c036c6655683dd28dc1fe108a0c9f18c41d4dab2', class: this.alignmentClass() }, h("div", { key: '8a344197473899bfce235707a0a4b586b09f7586', class: `s-placeholder-icon s-placeholder-icon-${this.iconSize}`, innerHTML: this.icon }), h("div", { key: '84c667eedacea750f761c0c650615c63812875ca', class: "s-placeholder-title" }, h("slot", { key: '4b59c67b550d5b4fb818007f0061b7648984c13c', name: 'title' }, h("span", { key: 'aec395c1624cc78932d4bddc2aaf936d6c300143' }, salla.lang.get('common.elements.no_options')))), h("div", { key: 'de0e5e440393992977e73d457df7c537cb2c1c8a', class: "s-placeholder-description" }, h("slot", { key: '4e85b215cd7255ee2ec7bd18913ea9f4709adaef', name: 'description' }, h("span", { key: '2c6746373095d09ef5cd19c2015cb240545d4ef9' }, salla.lang.get('common.errors.empty_results'))))));
45
45
  }
46
46
  };
47
47
  SallaPlaceholder.style = sallaPlaceholderCss;
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-CN6KGTlN.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-CfaNNoM2.js';
5
5
  import { a as arrowLeft } from './arrow-left-BedNk7k1.js';
6
6
 
7
7
  var arrowRight = `<!-- Generated by IcoMoon.io -->
@@ -157,9 +157,9 @@ const SallaPriceRange = class {
157
157
  this.maxPrice = value === undefined ? '' : value;
158
158
  }
159
159
  render() {
160
- return (h(Host, { key: '996f527f5a36ea273b0d8c195e35dc3efbdf62f2' }, this.filterValues.map((filterValue, index) => {
160
+ return (h(Host, { key: '343fd7a54f3a7d32c6709019fb168c7a8a1ca5f1' }, this.filterValues.map((filterValue, index) => {
161
161
  return h("label", { class: "s-filters-label", htmlFor: `${this.option.key}-${index}`, key: index }, h("input", { id: `${this.option.key}-${index}`, name: "price", type: "radio", checked: this.isChecked(filterValue), class: "s-filters-radio", onChange: e => this.handleMinMaxPrice(e, filterValue) }), h("span", { innerHTML: this.getPriceLabel(filterValue) }));
162
- }), h("div", { key: 'bfa8f970eb1e9c5d2b9678e5271aa04208b39289', class: "flex justify-center items-center" }, h("div", { key: '59cd51f388f36a38e2bd036d27b7abe001fed9d0', class: "relative max-w-xl w-full" }, h("div", { key: '226bd18705572502c7da11022a8ce02dc08d4d21', class: "s-price-range-inputs" }, h("div", { key: '0ebfdced114308e82075cd153bef0020daa15bf6', class: "s-price-range-relative" }, h("div", { key: 'c3dacef6133e2b05eca8d643d1c8ce3f5b991548', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: 'b2451e091d93f85f268fc80e30e24f5f71c2628c', type: "number", maxlength: "5", ref: el => this.minInput = el, onBlur: (e) => this.handleMinPrice(e), value: this.minPrice, placeholder: this.fromLabel, class: "s-price-range-number-input" })), h("div", { key: '00c07380972b65eac5fac5688b99d21277f65d39', class: "s-price-range-gray-text" }, " -"), h("div", { key: '403e98ad682f08946ccd191715ff37401a376722', class: "s-price-range-relative" }, h("div", { key: 'a1b0729fc40c17b9be68dd2c76a3afa1e99d8a62', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: '5f5e5a202f4b11cde88ae954fa352b71886fe30e', type: "number", maxlength: "5", ref: el => this.maxInput = el, onBlur: (e) => this.handleMaxPrice(e), value: this.maxPrice, placeholder: this.toLabel, class: "s-price-range-number-input", "aria-describedby": "price-currency" })), h("salla-button", { key: 'dd4899512e03f10c18e74f4d2434406dc6922a50', color: 'gray', shape: 'icon', size: 'small', fill: 'outline', onClick: (event) => this.changedEventHandler(event) }, h("span", { key: '98d023ccfe7e26278259bf690a1d7a4323a704fc', innerHTML: this.isRTL ? arrowLeft : arrowRight })))))));
162
+ }), h("div", { key: '99b72a90eb7c99fd0a061f3ae6fdb7a16f4a6cb5', class: "flex justify-center items-center" }, h("div", { key: '90234fcadbfd931e1ccbd8006f47219196b7d958', class: "relative max-w-xl w-full" }, h("div", { key: 'eb284df7b56929fa0b6b31f029024a48ba0528b5', class: "s-price-range-inputs" }, h("div", { key: '43adbda7a9dd480690a678e0efc7aeed889fb81f', class: "s-price-range-relative" }, h("div", { key: '16277456eb7fc08357ff91daef4af1944e79b762', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: '9af2548117afe8389b786621d9e26e8f441c9fa6', type: "number", maxlength: "5", ref: el => this.minInput = el, onBlur: (e) => this.handleMinPrice(e), value: this.minPrice, placeholder: this.fromLabel, class: "s-price-range-number-input" })), h("div", { key: '5f5a45e86632b6183e0b85a5c1489d311b72c9b1', class: "s-price-range-gray-text" }, " -"), h("div", { key: '80198c67b69613cd09f0aa03faaf7f162a432478', class: "s-price-range-relative" }, h("div", { key: '5b84faee68142be3f18215b6f916eb1cd245c74c', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: 'a813df6ce1645b5e3d414a13879f9c4172bb6f4f', type: "number", maxlength: "5", ref: el => this.maxInput = el, onBlur: (e) => this.handleMaxPrice(e), value: this.maxPrice, placeholder: this.toLabel, class: "s-price-range-number-input", "aria-describedby": "price-currency" })), h("salla-button", { key: '34644f25fbd11238f27f3de0343ef5b65d192c16', color: 'gray', shape: 'icon', size: 'small', fill: 'outline', onClick: (event) => this.changedEventHandler(event) }, h("span", { key: '07f5f1d7faad2ad05ea8538076b73b14a8f3137c', innerHTML: this.isRTL ? arrowLeft : arrowRight })))))));
163
163
  }
164
164
  componentDidLoad() {
165
165
  this.isReady = true;