@salla.sa/twilight-components 2.14.418 → 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 (374) hide show
  1. package/dist/cjs/{filepond-C1_8U7ht.js → filepond-BiRMqsJc.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-C2QZkcu0.js → filepond-plugin-file-poster-LU25G59n.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-CbVRd24w.js → filepond-plugin-file-validate-size-J3-riOvN.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-63RP4vcL.js → filepond-plugin-file-validate-type-DMawm6j5.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-CjWMhhkZ.js → filepond-plugin-image-edit-QXtHYcEz.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-CJxStqYG.js → filepond-plugin-image-exif-orientation-C0VBHQjd.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview--RTa59Q8.js → filepond-plugin-image-preview-xG9m-vgD.js} +1 -1
  8. package/dist/cjs/{functions-T48FHZw8.js → functions-CZrHAX2r.js} +1 -1
  9. package/dist/cjs/helpers-BJ2rnhxz.js +197 -0
  10. package/dist/cjs/{index-DO_QXaSt.js → index-Ce-Twd7-.js} +10 -6
  11. package/dist/cjs/{index-CQ4zjhzH.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 +36 -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-BnNAgCN_.js → tracked-promise-DChUtH5B.js} +1 -1
  97. package/dist/cjs/twilight.cjs.js +2 -2
  98. package/dist/cjs/{vanilla-picker-wbE79zwn.js → vanilla-picker-ivACsPLJ.js} +1 -1
  99. package/dist/collection/collection-manifest.json +1 -0
  100. package/dist/collection/components/salla-order-edit/helpers.js +181 -0
  101. package/dist/collection/components/salla-order-edit/salla-order-edit-item.css +3 -0
  102. package/dist/collection/components/salla-order-edit/salla-order-edit-item.js +42 -30
  103. package/dist/collection/components/salla-order-edit/salla-order-edit-product-card.css +4 -0
  104. package/dist/collection/components/salla-order-edit/salla-order-edit-product-card.js +93 -0
  105. package/dist/collection/components/salla-order-edit/salla-order-edit.css +3 -0
  106. package/dist/collection/components/salla-order-edit/salla-order-edit.js +353 -39
  107. package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
  108. package/dist/collection/components/salla-payments/salla-payments.js +2 -2
  109. package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
  110. package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
  111. package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
  112. package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
  113. package/dist/collection/components/salla-product-options/salla-product-options.js +28 -0
  114. package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
  115. package/dist/collection/components/salla-products-list/salla-products-list.js +54 -14
  116. package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
  117. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +1 -1
  118. package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
  119. package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
  120. package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
  121. package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
  122. package/dist/collection/components/salla-search/salla-search.js +5 -5
  123. package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
  124. package/dist/collection/components/salla-social/salla-social.js +1 -1
  125. package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
  126. package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
  127. package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
  128. package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
  129. package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
  130. package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
  131. package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
  132. package/dist/components/index.js +2 -2
  133. package/dist/components/salla-order-edit-item2.js +207 -30
  134. package/dist/components/salla-order-edit-product-card.d.ts +11 -0
  135. package/dist/components/salla-order-edit-product-card.js +59 -0
  136. package/dist/components/salla-order-edit.js +378 -65
  137. package/dist/components/salla-order-summary.js +1 -1
  138. package/dist/components/salla-payments.js +2 -2
  139. package/dist/components/salla-placeholder2.js +1 -1
  140. package/dist/components/salla-price-range2.js +2 -2
  141. package/dist/components/salla-product-availability2.js +1 -1
  142. package/dist/components/salla-product-card2.js +5 -5
  143. package/dist/components/salla-product-options2.js +8 -1
  144. package/dist/components/salla-product-size-guide.js +2 -2
  145. package/dist/components/salla-products-list2.js +39 -15
  146. package/dist/components/salla-quantity-input2.js +1 -1
  147. package/dist/components/salla-quick-buy2.js +1 -1
  148. package/dist/components/salla-review-card2.js +1 -1
  149. package/dist/components/salla-reviews-page.js +1 -1
  150. package/dist/components/salla-reviews.js +1 -1
  151. package/dist/components/salla-scopes.js +1 -1
  152. package/dist/components/salla-search.js +5 -5
  153. package/dist/components/salla-skeleton2.js +1 -1
  154. package/dist/components/salla-social-share.js +1 -1
  155. package/dist/components/salla-social.js +1 -1
  156. package/dist/components/salla-tab-content2.js +1 -1
  157. package/dist/components/salla-tab-header2.js +1 -1
  158. package/dist/components/salla-tabs2.js +1 -1
  159. package/dist/components/salla-tel-input2.js +1 -1
  160. package/dist/components/salla-tooltip2.js +1 -1
  161. package/dist/components/salla-user-settings.js +1 -1
  162. package/dist/esm/{filepond-BaqNYv3C.js → filepond-0Pvy36B6.js} +1 -1
  163. package/dist/esm/{filepond-plugin-file-poster-nENZqIRv.js → filepond-plugin-file-poster-DV7OW1XJ.js} +1 -1
  164. package/dist/esm/{filepond-plugin-file-validate-size-DGOq4RG8.js → filepond-plugin-file-validate-size-DEya24r_.js} +1 -1
  165. package/dist/esm/{filepond-plugin-file-validate-type-DwM-3UO7.js → filepond-plugin-file-validate-type-DiFvVzC6.js} +1 -1
  166. package/dist/esm/{filepond-plugin-image-edit-BCqDiFWK.js → filepond-plugin-image-edit-DGBw5KRt.js} +1 -1
  167. package/dist/esm/{filepond-plugin-image-exif-orientation-DiuxhjrQ.js → filepond-plugin-image-exif-orientation-BbpZAlI-.js} +1 -1
  168. package/dist/esm/{filepond-plugin-image-preview-DbFvPPQQ.js → filepond-plugin-image-preview-CjRkn0jY.js} +1 -1
  169. package/dist/esm/{functions-JPNAXx4d.js → functions-BcJ4xDKw.js} +1 -1
  170. package/dist/esm/helpers-DR_vlSvU.js +184 -0
  171. package/dist/esm/{index-DElBWCVR.js → index-313k5SuU.js} +1 -1
  172. package/dist/esm/{index-BwsreBbG.js → index-CfaNNoM2.js} +10 -6
  173. package/dist/esm/interfaces-CoQJOPRz.js +33 -0
  174. package/dist/esm/loader.js +3 -3
  175. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  176. package/dist/esm/salla-accordion_6.entry.js +1 -1
  177. package/dist/esm/salla-add-product-button_5.entry.js +10 -32
  178. package/dist/esm/salla-advertisement.entry.js +1 -1
  179. package/dist/esm/salla-alert_2.entry.js +1 -1
  180. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  181. package/dist/esm/salla-apps-icons.entry.js +1 -1
  182. package/dist/esm/salla-badge.entry.js +1 -1
  183. package/dist/esm/salla-booking-field_7.entry.js +12 -12
  184. package/dist/esm/salla-bullet-delivery.entry.js +1 -1
  185. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  186. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  187. package/dist/esm/salla-comment-form_8.entry.js +4 -4
  188. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  189. package/dist/esm/salla-contacts.entry.js +1 -1
  190. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  191. package/dist/esm/salla-count-down.entry.js +1 -1
  192. package/dist/esm/salla-custom-fields.entry.js +1 -1
  193. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  194. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  195. package/dist/esm/salla-filters-widget.entry.js +1 -1
  196. package/dist/esm/salla-filters.entry.js +1 -1
  197. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  198. package/dist/esm/salla-gifting.entry.js +1 -1
  199. package/dist/esm/salla-hook.entry.js +1 -1
  200. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  201. package/dist/esm/salla-installment.entry.js +1 -1
  202. package/dist/esm/salla-list-tile.entry.js +1 -1
  203. package/dist/esm/salla-localization-modal.entry.js +1 -1
  204. package/dist/esm/salla-login-modal.entry.js +1 -1
  205. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  206. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  207. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  208. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  209. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  210. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  211. package/dist/esm/salla-loyalty.entry.js +1 -1
  212. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  213. package/dist/esm/salla-map.entry.js +1 -1
  214. package/dist/esm/salla-menu.entry.js +1 -1
  215. package/dist/esm/salla-metadata.entry.js +1 -1
  216. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  217. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  218. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  219. package/dist/esm/salla-notification-item.entry.js +1 -1
  220. package/dist/esm/salla-notifications.entry.js +1 -1
  221. package/dist/esm/salla-offer-modal.entry.js +1 -1
  222. package/dist/esm/salla-offer.entry.js +1 -1
  223. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  224. package/dist/esm/salla-order-details-options.entry.js +1 -1
  225. package/dist/esm/salla-order-details.entry.js +1 -1
  226. package/dist/esm/salla-order-edit-item.entry.js +28 -29
  227. package/dist/esm/salla-order-edit-product-card.entry.js +39 -0
  228. package/dist/esm/salla-order-edit.entry.js +339 -40
  229. package/dist/esm/salla-order-summary.entry.js +2 -2
  230. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  231. package/dist/esm/salla-orders.entry.js +1 -1
  232. package/dist/esm/salla-payments.entry.js +3 -3
  233. package/dist/esm/salla-placeholder.entry.js +2 -2
  234. package/dist/esm/salla-price-range.entry.js +3 -3
  235. package/dist/esm/salla-product-card_2.entry.js +6 -6
  236. package/dist/esm/salla-product-size-guide.entry.js +3 -3
  237. package/dist/esm/salla-products-list.entry.js +38 -15
  238. package/dist/esm/salla-progress-bar.entry.js +1 -1
  239. package/dist/esm/salla-quick-order.entry.js +1 -1
  240. package/dist/esm/salla-rating-modal.entry.js +1 -1
  241. package/dist/esm/salla-reward-action_4.entry.js +3 -3
  242. package/dist/esm/salla-scopes.entry.js +2 -2
  243. package/dist/esm/salla-search.entry.js +6 -6
  244. package/dist/esm/salla-skeleton.entry.js +2 -2
  245. package/dist/esm/salla-slider.entry.js +1 -1
  246. package/dist/esm/salla-social-share.entry.js +2 -2
  247. package/dist/esm/salla-social.entry.js +2 -2
  248. package/dist/esm/salla-tab-content_3.entry.js +4 -4
  249. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  250. package/dist/esm/salla-tooltip.entry.js +2 -2
  251. package/dist/esm/salla-trust-badges.entry.js +1 -1
  252. package/dist/esm/salla-user-menu.entry.js +1 -1
  253. package/dist/esm/salla-user-profile.entry.js +1 -1
  254. package/dist/esm/salla-user-settings.entry.js +2 -2
  255. package/dist/esm/salla-verify.entry.js +1 -1
  256. package/dist/esm/salla-wallet.entry.js +1 -1
  257. package/dist/esm/{tracked-promise-BD-FZk2P.js → tracked-promise-xD-AZOwt.js} +1 -1
  258. package/dist/esm/twilight.js +3 -3
  259. package/dist/esm/{vanilla-picker-CqoFxJJE.js → vanilla-picker-Bu8PG2Le.js} +1 -1
  260. package/dist/twilight/{p-ce588635.entry.js → p-02600ee1.entry.js} +1 -1
  261. package/dist/twilight/{p-c5e18341.entry.js → p-02608fcd.entry.js} +1 -1
  262. package/dist/twilight/{p-f73c7b43.entry.js → p-029f9bfd.entry.js} +1 -1
  263. package/dist/twilight/p-073536c3.entry.js +4 -0
  264. package/dist/twilight/{p-ceb9458e.entry.js → p-0d4afc4b.entry.js} +1 -1
  265. package/dist/twilight/{p-edaba475.entry.js → p-11da9c5a.entry.js} +1 -1
  266. package/dist/twilight/{p-7d3722ad.entry.js → p-13b1dae0.entry.js} +1 -1
  267. package/dist/twilight/{p-ab5e0aef.entry.js → p-13f019f5.entry.js} +1 -1
  268. package/dist/twilight/{p-069485ec.entry.js → p-15be9e7a.entry.js} +1 -1
  269. package/dist/twilight/{p-d9c4d2ed.entry.js → p-1bce06bf.entry.js} +1 -1
  270. package/dist/twilight/{p-0bf11f89.entry.js → p-1fe827c7.entry.js} +1 -1
  271. package/dist/twilight/{p-fec6b08b.entry.js → p-22d12f28.entry.js} +1 -1
  272. package/dist/twilight/{p-b737dbcb.entry.js → p-2afe64d1.entry.js} +1 -1
  273. package/dist/twilight/{p-3f50a52d.entry.js → p-2bb796b3.entry.js} +1 -1
  274. package/dist/twilight/{p-f653f2bb.entry.js → p-2f1cb6da.entry.js} +1 -1
  275. package/dist/twilight/{p-f88806d7.entry.js → p-3252277a.entry.js} +1 -1
  276. package/dist/twilight/{p-4110e600.entry.js → p-3539d2a1.entry.js} +1 -1
  277. package/dist/twilight/{p-167f5262.entry.js → p-3bda095b.entry.js} +1 -1
  278. package/dist/twilight/{p-61215f22.entry.js → p-3d286589.entry.js} +1 -1
  279. package/dist/twilight/{p-5ac81ffe.entry.js → p-410f0149.entry.js} +1 -1
  280. package/dist/twilight/{p-57451f00.entry.js → p-42bf8cc1.entry.js} +1 -1
  281. package/dist/twilight/p-43c4c857.entry.js +4 -0
  282. package/dist/twilight/{p-ff90dbf0.entry.js → p-4550de2d.entry.js} +1 -1
  283. package/dist/twilight/{p-fbe07d2d.entry.js → p-4752dc2c.entry.js} +1 -1
  284. package/dist/twilight/{p-9d8e4e7c.entry.js → p-48aba4cd.entry.js} +1 -1
  285. package/dist/twilight/p-49e28ca2.entry.js +4 -0
  286. package/dist/twilight/{p-10884e6e.entry.js → p-4a7cbe49.entry.js} +1 -1
  287. package/dist/twilight/{p-46088f51.entry.js → p-51252013.entry.js} +1 -1
  288. package/dist/twilight/{p-29fc145b.entry.js → p-53e63007.entry.js} +1 -1
  289. package/dist/twilight/{p-dcc65eb2.entry.js → p-57a4f3d2.entry.js} +1 -1
  290. package/dist/twilight/{p-a96ec635.entry.js → p-5dbb89d5.entry.js} +1 -1
  291. package/dist/twilight/p-5dd07559.entry.js +4 -0
  292. package/dist/twilight/{p-ac008da7.entry.js → p-5dd75357.entry.js} +1 -1
  293. package/dist/twilight/p-5e4e45be.entry.js +4 -0
  294. package/dist/twilight/{p-d0cf9b68.entry.js → p-5f174a3e.entry.js} +1 -1
  295. package/dist/twilight/{p-695e3211.entry.js → p-625218f7.entry.js} +1 -1
  296. package/dist/twilight/{p-03c39b2d.entry.js → p-654a0990.entry.js} +1 -1
  297. package/dist/twilight/{p-d739ae41.entry.js → p-654b9857.entry.js} +1 -1
  298. package/dist/twilight/{p-60878c2e.entry.js → p-65ff0bf4.entry.js} +1 -1
  299. package/dist/twilight/{p-aaff5603.entry.js → p-665aa4d1.entry.js} +1 -1
  300. package/dist/twilight/{p-5b371b1f.entry.js → p-69bec0e3.entry.js} +1 -1
  301. package/dist/twilight/{p-2bd83486.entry.js → p-6b02b118.entry.js} +1 -1
  302. package/dist/twilight/{p-44db7163.entry.js → p-72d4121c.entry.js} +1 -1
  303. package/dist/twilight/{p-993bdcbe.entry.js → p-74cd506d.entry.js} +1 -1
  304. package/dist/twilight/{p-b6ac7a22.entry.js → p-75f26291.entry.js} +1 -1
  305. package/dist/twilight/{p-1c3e0dbc.entry.js → p-7ce1dff1.entry.js} +1 -1
  306. package/dist/twilight/{p-7d492d3c.entry.js → p-7d08def1.entry.js} +1 -1
  307. package/dist/twilight/{p-ad762138.entry.js → p-7f6c6d8a.entry.js} +1 -1
  308. package/dist/twilight/{p-0a786447.entry.js → p-82d776ae.entry.js} +1 -1
  309. package/dist/twilight/{p-d469525b.entry.js → p-87e78adc.entry.js} +1 -1
  310. package/dist/twilight/{p-b6dce61a.entry.js → p-891e4b61.entry.js} +1 -1
  311. package/dist/twilight/{p-91d74168.entry.js → p-8bdd9c9b.entry.js} +1 -1
  312. package/dist/twilight/{p-19e82de2.entry.js → p-8d0b4049.entry.js} +1 -1
  313. package/dist/twilight/{p-9134d94d.entry.js → p-8dbff2c8.entry.js} +1 -1
  314. package/dist/twilight/{p-9c73e42a.entry.js → p-944b02ec.entry.js} +1 -1
  315. package/dist/twilight/{p-af1474dd.entry.js → p-9693310b.entry.js} +1 -1
  316. package/dist/twilight/{p-c1d4db6f.entry.js → p-9dcc291b.entry.js} +1 -1
  317. package/dist/twilight/{p-Dw7mGaHj.js → p-B6bkY5-l.js} +1 -1
  318. package/dist/twilight/{p-BuNOvMeU.js → p-BCWPIsso.js} +1 -1
  319. package/dist/twilight/p-BLehGhpL.js +4 -0
  320. package/dist/twilight/{p-CTyl0UJE.js → p-BN2EOPT0.js} +1 -1
  321. package/dist/twilight/{p-DlGhggDp.js → p-BeZ-z3uX.js} +1 -1
  322. package/dist/twilight/{p-GgHo6Cr_.js → p-Bu7ZSFM5.js} +1 -1
  323. package/dist/twilight/{p-CEuTw3-D.js → p-C0UBM1r0.js} +1 -1
  324. package/dist/twilight/{p-Cw0Ky-u0.js → p-C1ReTfKT.js} +1 -1
  325. package/dist/twilight/p-C8xwacGT.js +4 -0
  326. package/dist/twilight/{p-DPgASjJ8.js → p-CX1cQxmm.js} +1 -1
  327. package/dist/twilight/{p-BwsreBbG.js → p-CfaNNoM2.js} +1 -1
  328. package/dist/twilight/p-CoQJOPRz.js +4 -0
  329. package/dist/twilight/{p-LWKLIOwS.js → p-P9Uquv6J.js} +1 -1
  330. package/dist/twilight/p-a132e9dc.entry.js +4 -0
  331. package/dist/twilight/{p-a3a0bafa.entry.js → p-a22ab12e.entry.js} +1 -1
  332. package/dist/twilight/{p-4807586a.entry.js → p-a5093858.entry.js} +1 -1
  333. package/dist/twilight/{p-4edf67be.entry.js → p-a5483eab.entry.js} +1 -1
  334. package/dist/twilight/{p-57e0b11b.entry.js → p-ab922196.entry.js} +1 -1
  335. package/dist/twilight/{p-2f833767.entry.js → p-adf1ff1f.entry.js} +1 -1
  336. package/dist/twilight/{p-4c57de7b.entry.js → p-b075bdd3.entry.js} +1 -1
  337. package/dist/twilight/{p-b9062150.entry.js → p-b6446ed0.entry.js} +1 -1
  338. package/dist/twilight/{p-25104b13.entry.js → p-bd29fa58.entry.js} +1 -1
  339. package/dist/twilight/{p-b4fd50ef.entry.js → p-c0a96a41.entry.js} +1 -1
  340. package/dist/twilight/{p-b9c9c487.entry.js → p-c0da03a4.entry.js} +1 -1
  341. package/dist/twilight/{p-1c1ac203.entry.js → p-ce4823e8.entry.js} +1 -1
  342. package/dist/twilight/{p-af84c7b8.entry.js → p-cef8dfa8.entry.js} +1 -1
  343. package/dist/twilight/p-d737a90e.entry.js +4 -0
  344. package/dist/twilight/p-d7e404d1.entry.js +4 -0
  345. package/dist/twilight/{p-a00015ec.entry.js → p-d95fad47.entry.js} +1 -1
  346. package/dist/twilight/{p-201926a3.entry.js → p-dacc7681.entry.js} +1 -1
  347. package/dist/twilight/{p-580441f5.entry.js → p-e15ceaae.entry.js} +1 -1
  348. package/dist/twilight/p-e692fd88.entry.js +4 -0
  349. package/dist/twilight/{p-59657a19.entry.js → p-ee5afe29.entry.js} +1 -1
  350. package/dist/twilight/{p-681953ef.entry.js → p-f248ce38.entry.js} +1 -1
  351. package/dist/twilight/{p-c968dab0.entry.js → p-f6468e0f.entry.js} +1 -1
  352. package/dist/twilight/{p-cd6fc43c.entry.js → p-f9e89a30.entry.js} +1 -1
  353. package/dist/twilight/{p-e5325563.entry.js → p-fdd2d95e.entry.js} +1 -1
  354. package/dist/twilight/{p-0654ccca.entry.js → p-ff0d8f2b.entry.js} +1 -1
  355. package/dist/twilight/{p-CbukOCNI.js → p-nj3fF7xi.js} +1 -1
  356. package/dist/twilight/twilight.esm.js +1 -1
  357. package/dist/types/components/salla-order-edit/helpers.d.ts +25 -0
  358. package/dist/types/components/salla-order-edit/interfaces.d.ts +22 -25
  359. package/dist/types/components/salla-order-edit/salla-order-edit-item.d.ts +7 -5
  360. package/dist/types/components/salla-order-edit/salla-order-edit-product-card.d.ts +11 -0
  361. package/dist/types/components/salla-order-edit/salla-order-edit.d.ts +56 -4
  362. package/dist/types/components/salla-product-options/salla-product-options.d.ts +4 -0
  363. package/dist/types/components/salla-products-list/salla-products-list.d.ts +5 -0
  364. package/dist/types/components.d.ts +51 -4
  365. package/package.json +5 -5
  366. package/dist/twilight/p-36048354.entry.js +0 -4
  367. package/dist/twilight/p-60d875cc.entry.js +0 -4
  368. package/dist/twilight/p-7a33e83b.entry.js +0 -4
  369. package/dist/twilight/p-86cfa253.entry.js +0 -4
  370. package/dist/twilight/p-c0b690b2.entry.js +0 -4
  371. package/dist/twilight/p-e07f938a.entry.js +0 -4
  372. package/dist/twilight/p-f-qXMnue.js +0 -4
  373. package/dist/twilight/p-f2815da9.entry.js +0 -4
  374. package/dist/twilight/p-f7b21078.entry.js +0 -4
@@ -2,22 +2,23 @@
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
4
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
5
- import { d as defineCustomElement$f } from './salla-booking-field2.js';
6
- import { d as defineCustomElement$e } from './salla-button2.js';
7
- import { d as defineCustomElement$d } from './salla-color-picker2.js';
8
- import { d as defineCustomElement$c } from './salla-conditional-fields2.js';
9
- import { d as defineCustomElement$b } from './salla-count-down2.js';
10
- import { d as defineCustomElement$a } from './salla-datetime-picker2.js';
11
- import { d as defineCustomElement$9 } from './salla-file-upload2.js';
12
- import { d as defineCustomElement$8 } from './salla-loading2.js';
13
- import { d as defineCustomElement$7 } from './salla-map2.js';
14
- import { d as defineCustomElement$6 } from './salla-modal2.js';
15
- import { d as defineCustomElement$5 } from './salla-order-edit-item2.js';
16
- import { d as defineCustomElement$4 } from './salla-product-options2.js';
5
+ import { d as defineCustomElement$6, g as getOrderItemSelectedOptions, a as getOrderEditProductMaxQuantity, c as clampOrderEditQuantity, u as updateOrderItems, r as removeOrderItems, m as mergePayloadItems, b as cloneOrderEditProduct, f as findMergeableItem, e as updateAddedPayloadList, h as upsertPayloadUpdateList, i as createAddedOrderItem, j as buildSavePayload } from './salla-order-edit-item2.js';
6
+ import { d as defineCustomElement$g } from './salla-booking-field2.js';
7
+ import { d as defineCustomElement$f } from './salla-button2.js';
8
+ import { d as defineCustomElement$e } from './salla-color-picker2.js';
9
+ import { d as defineCustomElement$d } from './salla-conditional-fields2.js';
10
+ import { d as defineCustomElement$c } from './salla-count-down2.js';
11
+ import { d as defineCustomElement$b } from './salla-datetime-picker2.js';
12
+ import { d as defineCustomElement$a } from './salla-file-upload2.js';
13
+ import { d as defineCustomElement$9 } from './salla-loading2.js';
14
+ import { d as defineCustomElement$8 } from './salla-map2.js';
15
+ import { d as defineCustomElement$7 } from './salla-modal2.js';
16
+ import { d as defineCustomElement$5 } from './salla-product-options2.js';
17
+ import { d as defineCustomElement$4 } from './salla-products-list2.js';
17
18
  import { d as defineCustomElement$3 } from './salla-progress-bar2.js';
18
19
  import { d as defineCustomElement$2 } from './salla-quantity-input2.js';
19
20
 
20
- const sallaOrderEditCss = "";
21
+ const sallaOrderEditCss = ":host{display:block}";
21
22
 
22
23
  const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit extends HTMLElement {
23
24
  constructor() {
@@ -25,18 +26,73 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
25
26
  this.__registerHost();
26
27
  this.loading = true;
27
28
  this.saveLoading = false;
28
- this.payload = { items: { update: [], remove: [] } };
29
+ this.payload = { items: { update: [], remove: [], add: [] } };
29
30
  this.expired = false;
30
31
  this.editPreview = null;
32
+ this.productSearchQuery = '';
33
+ this.productsListKey = 0;
34
+ this.productsListSource = 'latest';
35
+ this.productsListSourceValue = '';
36
+ this.selectedProductToAdd = null;
37
+ this.addProductQuantity = 1;
38
+ this.addProductLoading = false;
39
+ this.addProductConfirmLoading = false;
40
+ this.mobileProductsModalMounted = false;
41
+ this.isMobileViewport = false;
42
+ // Plain field (not @State): scroll-loading guard never affects rendering, so avoid re-render churn.
43
+ this.mobileProductsListLoading = false;
31
44
  this.confirming = false;
45
+ this.handleMobileProductSelected = (event) => {
46
+ event.stopPropagation();
47
+ void this.handleProductSelected(event);
48
+ };
49
+ this.productsPanelMobileQuery = '(max-width: 768px)';
50
+ this.handleProductsPanelViewportChange = (event) => {
51
+ this.isMobileViewport = event.matches;
52
+ };
53
+ this.hasProductTypeFilter = (url) => {
54
+ const queryStart = url.indexOf('?');
55
+ const query = (queryStart >= 0 ? url.slice(queryStart + 1) : url).split('#')[0];
56
+ return Array.from(new URLSearchParams(query)).some(([key, value]) => (value === 'product' &&
57
+ /^filters\[types\](?:\[(?:\d*)\])?$/.test(key)));
58
+ };
59
+ this.normalizeProductsListArrayParams = (url) => {
60
+ return url.replace(/(^|[?&])(includes|source_value|filters(?:\[|%5B)[^&=\]%]+?(?:\]|%5D))(\[|%5B)\d+(\]|%5D)(?==)/gi, (_, sep, name, open, close) => `${sep}${name}${open}${close}`);
61
+ };
62
+ this.handleBeforeBuildListUrl = (ctx) => {
63
+ if (ctx.component?.productCardComponent !== 'salla-order-edit-product-card' ||
64
+ typeof ctx.url !== 'string') {
65
+ return;
66
+ }
67
+ ctx.url = this.normalizeProductsListArrayParams(ctx.url);
68
+ if (this.hasProductTypeFilter(ctx.url)) {
69
+ return;
70
+ }
71
+ ctx.url += `${ctx.url.includes('?') ? '&' : '?'}filters[types][]=product`;
72
+ };
73
+ this.defaultProductsListSource = 'latest';
74
+ this.debouncedProductSearch = salla.helpers.debounce((query) => this.applyProductSearch(query), 500);
32
75
  }
33
76
  async componentWillLoad() {
77
+ this.setupProductsPanelViewportQuery();
34
78
  await salla.onReady();
79
+ this.unregisterBeforeBuildListUrlHook = salla.hooks.registerHook('salla-products-list', 'beforeBuildListUrl', this.handleBeforeBuildListUrl);
35
80
  this.loadFromProp();
36
81
  this.startExpiryCheck();
37
82
  }
38
83
  disconnectedCallback() {
39
84
  clearInterval(this.expiryInterval);
85
+ this.unregisterBeforeBuildListUrlHook?.();
86
+ this.productsPanelViewportQuery?.removeEventListener('change', this.handleProductsPanelViewportChange);
87
+ this.mobileProductsModal?.removeEventListener('orderEditProductSelected', this.handleMobileProductSelected);
88
+ }
89
+ setupProductsPanelViewportQuery() {
90
+ if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {
91
+ return;
92
+ }
93
+ this.productsPanelViewportQuery = window.matchMedia(this.productsPanelMobileQuery);
94
+ this.isMobileViewport = this.productsPanelViewportQuery.matches;
95
+ this.productsPanelViewportQuery.addEventListener('change', this.handleProductsPanelViewportChange);
40
96
  }
41
97
  startExpiryCheck() {
42
98
  const endsAt = this.order?.customer_editing_session?.ends_at;
@@ -61,7 +117,13 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
61
117
  return;
62
118
  }
63
119
  const data = typeof this.orderData === 'string' ? JSON.parse(this.orderData) : this.orderData;
64
- this.order = data;
120
+ this.order = {
121
+ ...data,
122
+ items: data.items.map(item => ({
123
+ ...item,
124
+ selectedOptions: getOrderItemSelectedOptions(item),
125
+ })),
126
+ };
65
127
  }
66
128
  catch (e) {
67
129
  this.error = salla.lang.getWithDefault('pages.orders.order_not_found', 'الطلب غير موجود');
@@ -70,22 +132,223 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
70
132
  this.loading = false;
71
133
  }
72
134
  }
73
- handleItemUpdated(event) {
74
- if (!this.order)
135
+ applyProductSearch(query) {
136
+ const normalizedQuery = query?.trim() || '';
137
+ const nextSource = normalizedQuery ? 'search' : this.defaultProductsListSource;
138
+ const nextSourceValue = nextSource === 'search' ? JSON.stringify(normalizedQuery) : '';
139
+ if (this.productsListSource === nextSource &&
140
+ this.productsListSourceValue === nextSourceValue) {
75
141
  return;
76
- const { itemId, quantity, options } = event.detail;
77
- const updateList = this.payload.items.update.filter(u => u.id !== itemId);
78
- const updateEntry = { id: itemId, quantity, options: options ?? [] };
79
- updateList.push(updateEntry);
80
- this.payload = {
81
- ...this.payload,
82
- items: { ...this.payload.items, update: updateList },
142
+ }
143
+ this.productsListSource = nextSource;
144
+ this.productsListSourceValue = nextSourceValue;
145
+ this.productsListKey += 1;
146
+ }
147
+ handleProductSearch(event) {
148
+ const value = event.target?.value || '';
149
+ this.productSearchQuery = value;
150
+ this.debouncedProductSearch(value);
151
+ }
152
+ getProductsListKey(scope) {
153
+ return `${scope}-${this.productsListSource}-${this.productsListSourceValue}-${this.productsListKey}`;
154
+ }
155
+ handleMobileProductsScroll(event) {
156
+ const container = event.currentTarget;
157
+ const distanceToBottom = container.scrollHeight - container.scrollTop - container.clientHeight;
158
+ if (distanceToBottom > 200 || this.mobileProductsListLoading) {
159
+ return;
160
+ }
161
+ const productsList = container.querySelector('salla-products-list');
162
+ if (!productsList) {
163
+ return;
164
+ }
165
+ this.mobileProductsListLoading = true;
166
+ void productsList.loadMore().finally(() => {
167
+ this.mobileProductsListLoading = false;
168
+ });
169
+ }
170
+ waitForNextFrame() {
171
+ return new Promise(resolve => requestAnimationFrame(() => resolve(undefined)));
172
+ }
173
+ async openMobileProductsModal() {
174
+ if (!this.mobileProductsModalMounted) {
175
+ this.mobileProductsModalMounted = true;
176
+ await this.waitForNextFrame();
177
+ }
178
+ await this.mobileProductsModal?.open?.();
179
+ }
180
+ setMobileProductsModal(modal) {
181
+ if (this.mobileProductsModal === modal) {
182
+ return;
183
+ }
184
+ this.mobileProductsModal?.removeEventListener('orderEditProductSelected', this.handleMobileProductSelected);
185
+ this.mobileProductsModal = modal;
186
+ this.mobileProductsModal?.addEventListener('orderEditProductSelected', this.handleMobileProductSelected);
187
+ }
188
+ resetAddProductDrawer() {
189
+ this.selectedProductToAdd = null;
190
+ this.addProductQuantity = 1;
191
+ this.addProductLoading = false;
192
+ this.addProductConfirmLoading = false;
193
+ this.addProductOptions = null;
194
+ }
195
+ getAddProductMaxQuantity(product = this.selectedProductToAdd) {
196
+ return getOrderEditProductMaxQuantity(product);
197
+ }
198
+ clampAddProductQuantity(quantity, product = this.selectedProductToAdd) {
199
+ return clampOrderEditQuantity(quantity, this.getAddProductMaxQuantity(product));
200
+ }
201
+ getApiErrorMessage(error) {
202
+ return error?.response?.data?.error?.message || error?.response?.data?.message;
203
+ }
204
+ notifyApiError(error) {
205
+ const message = this.getApiErrorMessage(error);
206
+ if (message) {
207
+ salla.notify.error(message);
208
+ }
209
+ }
210
+ async validateAddProductOptions() {
211
+ if (!this.selectedProductToAdd?.options?.length) {
212
+ return true;
213
+ }
214
+ if (!this.addProductOptions) {
215
+ return false;
216
+ }
217
+ return ((await this.addProductOptions.validateAndScroll?.()) ??
218
+ (await this.addProductOptions.reportValidity?.()) ??
219
+ false);
220
+ }
221
+ updateLocalOrderItem(itemId, quantity, optionDefinitions, selectedOptions) {
222
+ this.order = {
223
+ ...this.order,
224
+ items: updateOrderItems(this.order.items, itemId, quantity, optionDefinitions, selectedOptions),
83
225
  };
226
+ }
227
+ removeLocalOrderItem(itemId) {
84
228
  this.order = {
85
229
  ...this.order,
86
- items: this.order.items.map(item => item.id === itemId ? { ...item, quantity } : item),
230
+ items: removeOrderItems(this.order.items, itemId),
231
+ };
232
+ }
233
+ setPayloadItems(patch) {
234
+ this.payload = {
235
+ ...this.payload,
236
+ items: mergePayloadItems(this.payload.items, patch),
87
237
  };
88
238
  }
239
+ handleAddProductQuantityChange(event) {
240
+ const detail = event.detail;
241
+ const newQuantity = detail?.quantity ?? parseInt(event.target?.value, 10);
242
+ if (isNaN(newQuantity) || newQuantity < 1) {
243
+ return;
244
+ }
245
+ this.addProductQuantity = this.clampAddProductQuantity(newQuantity);
246
+ }
247
+ async handleProductSelected(event) {
248
+ const product = event.detail?.product;
249
+ if (!product?.id || this.addProductLoading) {
250
+ return;
251
+ }
252
+ this.addProductLoading = true;
253
+ try {
254
+ this.selectedProductToAdd = cloneOrderEditProduct(product);
255
+ this.addProductQuantity = 1;
256
+ await this.mobileProductsModal?.close?.();
257
+ await this.waitForNextFrame();
258
+ await this.addProductDrawer?.open?.();
259
+ }
260
+ catch (error) {
261
+ this.notifyApiError(error);
262
+ }
263
+ finally {
264
+ this.addProductLoading = false;
265
+ }
266
+ }
267
+ async confirmAddProduct() {
268
+ if (!this.selectedProductToAdd?.id) {
269
+ return;
270
+ }
271
+ if (this.addProductConfirmLoading) {
272
+ return;
273
+ }
274
+ this.addProductConfirmLoading = true;
275
+ try {
276
+ const maxQuantity = this.getAddProductMaxQuantity();
277
+ const normalizedQuantity = this.clampAddProductQuantity(this.addProductQuantity);
278
+ if (normalizedQuantity !== this.addProductQuantity) {
279
+ this.addProductQuantity = normalizedQuantity;
280
+ }
281
+ const productOptions = this.addProductOptions;
282
+ const optionsAreValid = await this.validateAddProductOptions();
283
+ if (!optionsAreValid) {
284
+ salla.notify.error(salla.lang.getWithDefault('common.messages.required_fields', 'يرجى تعبئة الحقول المطلوبة'));
285
+ return;
286
+ }
287
+ const selectedOptionsPayload = (await productOptions?.getSelectedOptionsData?.()) || {};
288
+ const optionDefinitions = (await productOptions?.getOptionsData?.()) ||
289
+ this.selectedProductToAdd.options ||
290
+ [];
291
+ const existingItem = findMergeableItem(this.order?.items, this.selectedProductToAdd.id, selectedOptionsPayload);
292
+ if (existingItem) {
293
+ const mergedQuantity = clampOrderEditQuantity(existingItem.quantity + normalizedQuantity, maxQuantity);
294
+ this.updateLocalOrderItem(existingItem.id, mergedQuantity, optionDefinitions, selectedOptionsPayload);
295
+ if (existingItem.isNew) {
296
+ this.setPayloadItems({
297
+ add: updateAddedPayloadList(this.payload.items.add, existingItem.id, mergedQuantity, selectedOptionsPayload),
298
+ });
299
+ }
300
+ else {
301
+ this.setPayloadItems({
302
+ update: upsertPayloadUpdateList(this.payload.items.update, existingItem.id, mergedQuantity, selectedOptionsPayload),
303
+ });
304
+ }
305
+ await this.addProductDrawer?.close?.();
306
+ return;
307
+ }
308
+ const newItem = createAddedOrderItem(this.selectedProductToAdd, normalizedQuantity, optionDefinitions, selectedOptionsPayload);
309
+ const addEntry = {
310
+ itemId: newItem.id,
311
+ product_id: this.selectedProductToAdd.id,
312
+ quantity: normalizedQuantity,
313
+ options: selectedOptionsPayload,
314
+ };
315
+ this.order = {
316
+ ...this.order,
317
+ items: [...this.order.items, newItem],
318
+ };
319
+ this.setPayloadItems({
320
+ add: [...this.payload.items.add, addEntry],
321
+ });
322
+ await this.addProductDrawer?.close?.();
323
+ }
324
+ catch (error) {
325
+ this.notifyApiError(error);
326
+ }
327
+ finally {
328
+ this.addProductConfirmLoading = false;
329
+ }
330
+ }
331
+ handleItemUpdated(event) {
332
+ if (!this.order)
333
+ return;
334
+ const { itemId, quantity, options, optionDefinitions } = event.detail;
335
+ const currentItem = this.order.items.find(item => item.id === itemId);
336
+ if (!currentItem) {
337
+ return;
338
+ }
339
+ const safeQuantity = clampOrderEditQuantity(quantity, getOrderEditProductMaxQuantity(currentItem.product));
340
+ if (currentItem.isNew) {
341
+ this.setPayloadItems({
342
+ add: updateAddedPayloadList(this.payload.items.add, itemId, safeQuantity, options),
343
+ });
344
+ this.updateLocalOrderItem(itemId, safeQuantity, optionDefinitions, options);
345
+ return;
346
+ }
347
+ this.setPayloadItems({
348
+ update: upsertPayloadUpdateList(this.payload.items.update, itemId, safeQuantity, options ?? {}),
349
+ });
350
+ this.updateLocalOrderItem(itemId, safeQuantity, optionDefinitions, options);
351
+ }
89
352
  handleItemRemoved(event) {
90
353
  if (!this.order)
91
354
  return;
@@ -94,35 +357,39 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
94
357
  return;
95
358
  }
96
359
  const { itemId } = event.detail;
97
- this.payload = {
98
- ...this.payload,
99
- items: {
100
- update: this.payload.items.update.filter(u => u.id !== itemId),
101
- remove: [...this.payload.items.remove, itemId],
102
- },
103
- };
104
- this.order = {
105
- ...this.order,
106
- items: this.order.items.filter(item => item.id !== itemId),
107
- };
360
+ const currentItem = this.order.items.find(item => item.id === itemId);
361
+ if (!currentItem) {
362
+ return;
363
+ }
364
+ if (currentItem.isNew) {
365
+ this.setPayloadItems({
366
+ add: this.payload.items.add.filter(item => item.itemId !== itemId),
367
+ });
368
+ this.removeLocalOrderItem(itemId);
369
+ return;
370
+ }
371
+ this.setPayloadItems({
372
+ update: this.payload.items.update.filter(u => u.id !== itemId),
373
+ remove: [...this.payload.items.remove, itemId],
374
+ });
375
+ this.removeLocalOrderItem(itemId);
108
376
  }
109
377
  get hasChanges() {
110
- return this.payload.items.update.length > 0 || this.payload.items.remove.length > 0;
378
+ return (this.payload.items.update.length > 0 ||
379
+ this.payload.items.remove.length > 0 ||
380
+ this.payload.items.add.length > 0);
111
381
  }
112
382
  async saveOrder() {
113
383
  if (!this.hasChanges)
114
384
  return;
115
385
  this.saveLoading = true;
116
386
  try {
117
- const response = await salla.order.api.editOrder(this.orderId, this.payload);
387
+ const response = await salla.order.api.editOrder(this.orderId, buildSavePayload(this.payload));
118
388
  this.editPreview = response?.data?.data || response?.data;
119
- await this.saveModal?.open();
389
+ await this.saveModal?.open?.();
120
390
  }
121
391
  catch (error) {
122
- const message = error?.response?.data?.error?.message || error?.response?.data?.message;
123
- if (message) {
124
- salla.notify.error(message);
125
- }
392
+ this.notifyApiError(error);
126
393
  }
127
394
  finally {
128
395
  this.saveLoading = false;
@@ -149,11 +416,43 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
149
416
  this.navigateToOrder();
150
417
  }
151
418
  catch (error) {
152
- const message = error?.response?.data?.error?.message || error?.response?.data?.message;
153
- if (message) {
154
- salla.notify.error(message);
155
- }
419
+ this.notifyApiError(error);
420
+ }
421
+ }
422
+ renderProductsPanel() {
423
+ const addProductTitle = salla.lang.getWithDefault('pages.orders.add_product_to_order', 'أضف منتج للطلب');
424
+ 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')));
425
+ }
426
+ renderProductsPickerContent(scope) {
427
+ return (h("div", { class: {
428
+ 's-order-edit-products-picker': true,
429
+ 's-order-edit-products-modal-content': scope === 'modal',
430
+ } }, 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" }))));
431
+ }
432
+ renderMobileProductsModal() {
433
+ 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) => {
434
+ if (!e.detail) {
435
+ this.mobileProductsModalMounted = false;
436
+ }
437
+ } }, this.mobileProductsModalMounted ? this.renderProductsPickerContent('modal') : null));
438
+ }
439
+ renderAddProductDrawer() {
440
+ const product = this.selectedProductToAdd;
441
+ const productName = product?.name || salla.lang.getWithDefault('common.elements.product', 'منتج');
442
+ const price = product?.price;
443
+ const maxQuantity = this.getAddProductMaxQuantity(product);
444
+ const optionsInstanceKey = product ? `order-edit-add-${product.id}` : 'order-edit-add';
445
+ const quantityAttrs = {
446
+ value: this.clampAddProductQuantity(this.addProductQuantity, product),
447
+ };
448
+ if (maxQuantity) {
449
+ quantityAttrs.max = maxQuantity;
156
450
  }
451
+ return (h("salla-modal", { ref: drawer => (this.addProductDrawer = drawer), width: "md", "modal-title": salla.lang.getWithDefault('pages.orders.add_product_to_order', 'أضف منتج للطلب'), onModalVisibilityChanged: (e) => {
452
+ if (!e.detail) {
453
+ this.resetAddProductDrawer();
454
+ }
455
+ } }, 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)));
157
456
  }
158
457
  renderSaveModal() {
159
458
  const preview = this.editPreview;
@@ -187,16 +486,15 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
187
486
  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', 'العودة إلى تفاصيل الطلب')))));
188
487
  }
189
488
  if (this.error || !this.order) {
190
- return (h(Host, null, h("div", { class: "no-content-placeholder" }, h("i", { class: "sicon-shopping-bag icon" }), h("p", null, this.error))));
489
+ 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))));
191
490
  }
192
491
  const hasItems = this.order.items && this.order.items.length > 0;
193
492
  const endsAt = this.order.customer_editing_session?.ends_at;
194
- 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) => [
493
+ 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) => [
195
494
  h("salla-order-edit-item", { key: item.id, item: item, orderId: this.orderId }),
196
495
  index < this.order.items.length - 1 ? (h("div", { class: "s-order-edit-items-divider" })) : null,
197
- ])) : (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()));
496
+ ])) : (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()));
198
497
  }
199
- get host() { return this; }
200
498
  static get style() { return sallaOrderEditCss; }
201
499
  }, [0, "salla-order-edit", {
202
500
  "orderId": [8, "order-id"],
@@ -207,13 +505,23 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
207
505
  "saveLoading": [32],
208
506
  "payload": [32],
209
507
  "expired": [32],
210
- "editPreview": [32]
211
- }, [[0, "orderItemUpdated", "handleItemUpdated"], [0, "orderItemRemoved", "handleItemRemoved"]]]);
508
+ "editPreview": [32],
509
+ "productSearchQuery": [32],
510
+ "productsListKey": [32],
511
+ "productsListSource": [32],
512
+ "productsListSourceValue": [32],
513
+ "selectedProductToAdd": [32],
514
+ "addProductQuantity": [32],
515
+ "addProductLoading": [32],
516
+ "addProductConfirmLoading": [32],
517
+ "mobileProductsModalMounted": [32],
518
+ "isMobileViewport": [32]
519
+ }, [[0, "orderEditProductSelected", "handleProductSelected"], [0, "orderItemUpdated", "handleItemUpdated"], [0, "orderItemRemoved", "handleItemRemoved"]]]);
212
520
  function defineCustomElement$1() {
213
521
  if (typeof customElements === "undefined") {
214
522
  return;
215
523
  }
216
- const components = ["salla-order-edit", "salla-booking-field", "salla-button", "salla-color-picker", "salla-conditional-fields", "salla-count-down", "salla-datetime-picker", "salla-file-upload", "salla-loading", "salla-map", "salla-modal", "salla-order-edit-item", "salla-product-options", "salla-progress-bar", "salla-quantity-input"];
524
+ const components = ["salla-order-edit", "salla-booking-field", "salla-button", "salla-color-picker", "salla-conditional-fields", "salla-count-down", "salla-datetime-picker", "salla-file-upload", "salla-loading", "salla-map", "salla-modal", "salla-order-edit-item", "salla-product-options", "salla-products-list", "salla-progress-bar", "salla-quantity-input"];
217
525
  components.forEach(tagName => { switch (tagName) {
218
526
  case "salla-order-edit":
219
527
  if (!customElements.get(tagName)) {
@@ -222,60 +530,65 @@ function defineCustomElement$1() {
222
530
  break;
223
531
  case "salla-booking-field":
224
532
  if (!customElements.get(tagName)) {
225
- defineCustomElement$f();
533
+ defineCustomElement$g();
226
534
  }
227
535
  break;
228
536
  case "salla-button":
229
537
  if (!customElements.get(tagName)) {
230
- defineCustomElement$e();
538
+ defineCustomElement$f();
231
539
  }
232
540
  break;
233
541
  case "salla-color-picker":
234
542
  if (!customElements.get(tagName)) {
235
- defineCustomElement$d();
543
+ defineCustomElement$e();
236
544
  }
237
545
  break;
238
546
  case "salla-conditional-fields":
239
547
  if (!customElements.get(tagName)) {
240
- defineCustomElement$c();
548
+ defineCustomElement$d();
241
549
  }
242
550
  break;
243
551
  case "salla-count-down":
244
552
  if (!customElements.get(tagName)) {
245
- defineCustomElement$b();
553
+ defineCustomElement$c();
246
554
  }
247
555
  break;
248
556
  case "salla-datetime-picker":
249
557
  if (!customElements.get(tagName)) {
250
- defineCustomElement$a();
558
+ defineCustomElement$b();
251
559
  }
252
560
  break;
253
561
  case "salla-file-upload":
254
562
  if (!customElements.get(tagName)) {
255
- defineCustomElement$9();
563
+ defineCustomElement$a();
256
564
  }
257
565
  break;
258
566
  case "salla-loading":
259
567
  if (!customElements.get(tagName)) {
260
- defineCustomElement$8();
568
+ defineCustomElement$9();
261
569
  }
262
570
  break;
263
571
  case "salla-map":
264
572
  if (!customElements.get(tagName)) {
265
- defineCustomElement$7();
573
+ defineCustomElement$8();
266
574
  }
267
575
  break;
268
576
  case "salla-modal":
269
577
  if (!customElements.get(tagName)) {
270
- defineCustomElement$6();
578
+ defineCustomElement$7();
271
579
  }
272
580
  break;
273
581
  case "salla-order-edit-item":
274
582
  if (!customElements.get(tagName)) {
275
- defineCustomElement$5();
583
+ defineCustomElement$6();
276
584
  }
277
585
  break;
278
586
  case "salla-product-options":
587
+ if (!customElements.get(tagName)) {
588
+ defineCustomElement$5();
589
+ }
590
+ break;
591
+ case "salla-products-list":
279
592
  if (!customElements.get(tagName)) {
280
593
  defineCustomElement$4();
281
594
  }
@@ -93,7 +93,7 @@ const SallaOrderSummary$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderSum
93
93
  this.copyCodeButtonTimeout && clearTimeout(this.copyCodeButtonTimeout);
94
94
  }
95
95
  render() {
96
- return (h("ul", { key: 'bb8c8e2c3a44f0922012789efc9a73d71fd213d5', class: "s-order-summary-wrapper" }, this.noItemFound ? h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" })) :
96
+ return (h("ul", { key: '20b8d793a83306a203cd0f7eadededf3ce224181', class: "s-order-summary-wrapper" }, this.noItemFound ? h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" })) :
97
97
  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 ? IconVerified : iconCopy }), h("span", null, this.copy_text))))))) :
98
98
  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))));
99
99
  }
@@ -35,12 +35,12 @@ const SallaPayments$1 = /*@__PURE__*/ proxyCustomElement(class SallaPayments ext
35
35
  render() {
36
36
  const madeInKSA = !this.exclude.includes('made-in-ksa') && salla.config.get('store.settings.made_in_ksa');
37
37
  const sbcId = this.exclude.includes('sbc') ? null : salla.config.get('store.settings.certificate.id');
38
- 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" ?
38
+ 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" ?
39
39
  h("div", { id: "cod-slot", innerHTML: this.codSlot
40
40
  .replace(/\{image\}/g, salla.url.cdn(`images/payment/cod_mini.png`, 58, 58)) }) :
41
41
  h("div", { id: "payment-slot", innerHTML: this.paymentSlot
42
42
  .replace(/\{image\}/g, salla.url.cdn(`images/payment/${payment}_mini.png`, 58, 58))
43
- .replace(/\{payment\}/g, payment) }))), sbcId && h("div", { key: 'ef5bbf9934a50015e2eb588f41ec9b5f86341dea', id: "sbc-slot", innerHTML: this.sbcSlot
43
+ .replace(/\{payment\}/g, payment) }))), sbcId && h("div", { key: '5071bb1e003ff36b445fd15948b7612f6a1ecde4', id: "sbc-slot", innerHTML: this.sbcSlot
44
44
  .replace(/\{image\}/g, salla.url.cdn(`images/sbc.png`, 58, 58))
45
45
  .replace(/\{link\}/g, `https://eauthenticate.saudibusiness.gov.sa/certificate-details/${sbcId}`) }))));
46
46
  }
@@ -42,7 +42,7 @@ const SallaPlaceholder = /*@__PURE__*/ proxyCustomElement(class SallaPlaceholder
42
42
  };
43
43
  }
44
44
  render() {
45
- 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'))))));
45
+ 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'))))));
46
46
  }
47
47
  static get style() { return sallaPlaceholderCss; }
48
48
  }, [4, "salla-placeholder", {