@salla.sa/twilight-components 2.14.388 → 2.14.390

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 (286) hide show
  1. package/dist/cjs/{filepond-JwtIy_PZ.js → filepond-DFct_qpx.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-HbVPHajC.js → filepond-plugin-file-poster-B_Lr4Ulx.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-BfnCLQbe.js → filepond-plugin-file-validate-size-BqkoO_hr.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-ZlRC1VfY.js → filepond-plugin-file-validate-type-DyTH8eH0.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-DiQE1wz9.js → filepond-plugin-image-edit-Cxg-WjCl.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-DIwNNDxM.js → filepond-plugin-image-exif-orientation-BSVkpMNu.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-C51b46QP.js → filepond-plugin-image-preview-DNcmQwuK.js} +1 -1
  8. package/dist/cjs/{index-DO-q5keQ.js → index-B8vh41va.js} +27 -11
  9. package/dist/cjs/{index-ByBROVOr.js → index-DnQaQgSB.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +63 -0
  12. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-add-product-button_4.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
  19. package/dist/cjs/salla-bullet-delivery.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-count-down.cjs.entry.js +196 -0
  27. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-gifting.cjs.entry.js +91 -16
  31. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  41. package/dist/cjs/{salla-accordion-body_3.cjs.entry.js → salla-map.cjs.entry.js} +1 -57
  42. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-order-edit-item.cjs.entry.js +95 -0
  55. package/dist/cjs/salla-order-edit.cjs.entry.js +181 -0
  56. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  62. package/dist/cjs/{salla-count-down_2.cjs.entry.js → salla-product-card.cjs.entry.js} +1 -160
  63. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  84. package/dist/cjs/twilight.cjs.js +2 -2
  85. package/dist/cjs/{vanilla-picker-DiJq-dd5.js → vanilla-picker-BZ48aiBi.js} +1 -1
  86. package/dist/collection/collection-manifest.json +2 -0
  87. package/dist/collection/components/salla-count-down/salla-count-down.css +4 -0
  88. package/dist/collection/components/salla-count-down/salla-count-down.js +122 -13
  89. package/dist/collection/components/salla-gifting/salla-gifting.js +96 -15
  90. package/dist/collection/components/salla-order-edit/interfaces.js +1 -0
  91. package/dist/collection/components/salla-order-edit/salla-order-edit-item.css +0 -0
  92. package/dist/collection/components/salla-order-edit/salla-order-edit-item.js +185 -0
  93. package/dist/collection/components/salla-order-edit/salla-order-edit.css +0 -0
  94. package/dist/collection/components/salla-order-edit/salla-order-edit.js +256 -0
  95. package/dist/components/index.js +3 -3
  96. package/dist/components/salla-count-down2.js +49 -13
  97. package/dist/components/salla-gifting.js +96 -15
  98. package/dist/components/salla-order-edit-item.d.ts +11 -0
  99. package/dist/components/salla-order-edit-item.js +9 -0
  100. package/dist/components/salla-order-edit-item2.js +184 -0
  101. package/dist/components/salla-order-edit.d.ts +11 -0
  102. package/dist/components/salla-order-edit.js +291 -0
  103. package/dist/components/salla-quantity-input.js +1 -125
  104. package/dist/components/salla-quantity-input2.js +130 -0
  105. package/dist/esm/{filepond-CtRmlCu3.js → filepond-C9FlNeRD.js} +1 -1
  106. package/dist/esm/{filepond-plugin-file-poster-CMkOcEkV.js → filepond-plugin-file-poster-BfX4exY0.js} +1 -1
  107. package/dist/esm/{filepond-plugin-file-validate-size-DzG8gDvA.js → filepond-plugin-file-validate-size-B5-cSfmI.js} +1 -1
  108. package/dist/esm/{filepond-plugin-file-validate-type-DSshuV-e.js → filepond-plugin-file-validate-type-DKvNhI35.js} +1 -1
  109. package/dist/esm/{filepond-plugin-image-edit-soyMBqQc.js → filepond-plugin-image-edit-DV1-ZICm.js} +1 -1
  110. package/dist/esm/{filepond-plugin-image-exif-orientation-Bt8OVYG8.js → filepond-plugin-image-exif-orientation-idrSYwAk.js} +1 -1
  111. package/dist/esm/{filepond-plugin-image-preview-N0oEw9xZ.js → filepond-plugin-image-preview-os8BCUOs.js} +1 -1
  112. package/dist/esm/{index-CvIpy7Cj.js → index-BcMtCVX0.js} +27 -11
  113. package/dist/esm/{index-Cw-jhhOv.js → index-DQCZHaDc.js} +1 -1
  114. package/dist/esm/loader.js +3 -3
  115. package/dist/esm/salla-accordion-body_2.entry.js +60 -0
  116. package/dist/esm/salla-accordion_6.entry.js +1 -1
  117. package/dist/esm/salla-add-product-button_4.entry.js +1 -1
  118. package/dist/esm/salla-advertisement.entry.js +1 -1
  119. package/dist/esm/salla-alert_2.entry.js +1 -1
  120. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  121. package/dist/esm/salla-apps-icons.entry.js +1 -1
  122. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  123. package/dist/esm/salla-bullet-delivery.entry.js +1 -1
  124. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  125. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  126. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  127. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  128. package/dist/esm/salla-contacts.entry.js +1 -1
  129. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  130. package/dist/esm/salla-count-down.entry.js +194 -0
  131. package/dist/esm/salla-custom-fields.entry.js +1 -1
  132. package/dist/esm/salla-filters-widget.entry.js +1 -1
  133. package/dist/esm/salla-filters.entry.js +1 -1
  134. package/dist/esm/salla-gifting.entry.js +91 -16
  135. package/dist/esm/salla-hook.entry.js +1 -1
  136. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  137. package/dist/esm/salla-installment.entry.js +1 -1
  138. package/dist/esm/salla-list-tile.entry.js +1 -1
  139. package/dist/esm/salla-localization-modal.entry.js +1 -1
  140. package/dist/esm/salla-login-modal.entry.js +1 -1
  141. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  142. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  143. package/dist/esm/salla-loyalty.entry.js +1 -1
  144. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  145. package/dist/esm/{salla-accordion-body_3.entry.js → salla-map.entry.js} +2 -56
  146. package/dist/esm/salla-menu.entry.js +1 -1
  147. package/dist/esm/salla-metadata.entry.js +1 -1
  148. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  149. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  150. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  151. package/dist/esm/salla-notification-item.entry.js +1 -1
  152. package/dist/esm/salla-notifications.entry.js +1 -1
  153. package/dist/esm/salla-offer-modal.entry.js +1 -1
  154. package/dist/esm/salla-offer.entry.js +1 -1
  155. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  156. package/dist/esm/salla-order-details-options.entry.js +1 -1
  157. package/dist/esm/salla-order-details.entry.js +1 -1
  158. package/dist/esm/salla-order-edit-item.entry.js +93 -0
  159. package/dist/esm/salla-order-edit.entry.js +179 -0
  160. package/dist/esm/salla-order-summary.entry.js +1 -1
  161. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  162. package/dist/esm/salla-orders.entry.js +1 -1
  163. package/dist/esm/salla-payments.entry.js +1 -1
  164. package/dist/esm/salla-placeholder.entry.js +1 -1
  165. package/dist/esm/salla-price-range.entry.js +1 -1
  166. package/dist/esm/{salla-count-down_2.entry.js → salla-product-card.entry.js} +2 -160
  167. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  168. package/dist/esm/salla-products-list.entry.js +1 -1
  169. package/dist/esm/salla-products-slider.entry.js +1 -1
  170. package/dist/esm/salla-progress-bar.entry.js +1 -1
  171. package/dist/esm/salla-quick-order.entry.js +1 -1
  172. package/dist/esm/salla-rating-modal.entry.js +1 -1
  173. package/dist/esm/salla-scopes.entry.js +1 -1
  174. package/dist/esm/salla-search.entry.js +1 -1
  175. package/dist/esm/salla-skeleton.entry.js +1 -1
  176. package/dist/esm/salla-slider.entry.js +1 -1
  177. package/dist/esm/salla-social-share.entry.js +1 -1
  178. package/dist/esm/salla-social.entry.js +1 -1
  179. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  180. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  181. package/dist/esm/salla-tooltip.entry.js +1 -1
  182. package/dist/esm/salla-trust-badges.entry.js +1 -1
  183. package/dist/esm/salla-user-menu.entry.js +1 -1
  184. package/dist/esm/salla-user-profile.entry.js +1 -1
  185. package/dist/esm/salla-user-settings.entry.js +1 -1
  186. package/dist/esm/salla-verify.entry.js +1 -1
  187. package/dist/esm/salla-wallet.entry.js +1 -1
  188. package/dist/esm/twilight.js +3 -3
  189. package/dist/esm/{vanilla-picker-CGGBRKTl.js → vanilla-picker-BBEKwYz7.js} +1 -1
  190. package/dist/twilight/{p-aa5bf3b5.entry.js → p-00a2d261.entry.js} +1 -1
  191. package/dist/twilight/{p-073ee1c3.entry.js → p-0b27ca19.entry.js} +1 -1
  192. package/dist/twilight/{p-7a87c0a9.entry.js → p-0d0ca330.entry.js} +1 -1
  193. package/dist/twilight/{p-d215b7d2.entry.js → p-1054b66c.entry.js} +1 -1
  194. package/dist/twilight/{p-a2c5e7bc.entry.js → p-129d6c0c.entry.js} +1 -1
  195. package/dist/twilight/{p-540297d6.entry.js → p-15a052c7.entry.js} +1 -1
  196. package/dist/twilight/{p-d4b83f2a.entry.js → p-207950ad.entry.js} +1 -1
  197. package/dist/twilight/{p-507fac68.entry.js → p-2548fa30.entry.js} +1 -1
  198. package/dist/twilight/{p-8bd3ba9e.entry.js → p-26cb1fdf.entry.js} +1 -1
  199. package/dist/twilight/{p-6ca09b34.entry.js → p-2b74eb03.entry.js} +1 -1
  200. package/dist/twilight/{p-3c8e6e9f.entry.js → p-359b2de3.entry.js} +1 -1
  201. package/dist/twilight/{p-7c8fe050.entry.js → p-35a2ea22.entry.js} +1 -1
  202. package/dist/twilight/{p-02aa05b3.entry.js → p-3653ad70.entry.js} +1 -1
  203. package/dist/twilight/{p-2200f944.entry.js → p-374057f7.entry.js} +1 -1
  204. package/dist/twilight/p-374c63c7.entry.js +4 -0
  205. package/dist/twilight/{p-b1e8296d.entry.js → p-412643eb.entry.js} +1 -1
  206. package/dist/twilight/{p-3d3b3856.entry.js → p-47cd7ceb.entry.js} +1 -1
  207. package/dist/twilight/{p-31458cbf.entry.js → p-47d1003b.entry.js} +1 -1
  208. package/dist/twilight/{p-2dfe2197.entry.js → p-48353d62.entry.js} +1 -1
  209. package/dist/twilight/{p-da155135.entry.js → p-4866439f.entry.js} +1 -1
  210. package/dist/twilight/{p-d00fc4bf.entry.js → p-4f3964d8.entry.js} +1 -1
  211. package/dist/twilight/{p-1cb9d96c.entry.js → p-4fefd2df.entry.js} +1 -1
  212. package/dist/twilight/{p-5f52e482.entry.js → p-5174aa32.entry.js} +1 -1
  213. package/dist/twilight/{p-8043f8ea.entry.js → p-58c66b0d.entry.js} +1 -1
  214. package/dist/twilight/{p-ce560f66.entry.js → p-58fa3856.entry.js} +1 -1
  215. package/dist/twilight/{p-59758658.entry.js → p-596525f9.entry.js} +1 -1
  216. package/dist/twilight/p-5a629abd.entry.js +4 -0
  217. package/dist/twilight/{p-b2537237.entry.js → p-5d2ebf97.entry.js} +1 -1
  218. package/dist/twilight/{p-b4f431bf.entry.js → p-65df6042.entry.js} +1 -1
  219. package/dist/twilight/{p-694aa670.entry.js → p-67bc002a.entry.js} +1 -1
  220. package/dist/twilight/{p-221456be.entry.js → p-67cf0723.entry.js} +1 -1
  221. package/dist/twilight/{p-a97f10a1.entry.js → p-687a597a.entry.js} +1 -1
  222. package/dist/twilight/{p-9f3f2ac3.entry.js → p-689701b4.entry.js} +1 -1
  223. package/dist/twilight/{p-e0b13c19.entry.js → p-70e478a6.entry.js} +1 -1
  224. package/dist/twilight/{p-189b3238.entry.js → p-74472650.entry.js} +1 -1
  225. package/dist/twilight/{p-4a4c1969.entry.js → p-7855ae93.entry.js} +1 -1
  226. package/dist/twilight/p-8c86ba24.entry.js +4 -0
  227. package/dist/twilight/{p-300be242.entry.js → p-8d4d4a0e.entry.js} +1 -1
  228. package/dist/twilight/{p-93623f07.entry.js → p-8fbd92a2.entry.js} +1 -1
  229. package/dist/twilight/{p-49b7c969.entry.js → p-983f9f1e.entry.js} +1 -1
  230. package/dist/twilight/{p-f81195ae.entry.js → p-998a3b5f.entry.js} +1 -1
  231. package/dist/twilight/{p-e46cb169.entry.js → p-9bf0a7df.entry.js} +1 -1
  232. package/dist/twilight/{p-c43be30b.entry.js → p-9ff1a4dc.entry.js} +1 -1
  233. package/dist/twilight/{p-B1ZkITMY.js → p-B21QGKK8.js} +1 -1
  234. package/dist/twilight/{p-uADDAGsE.js → p-Bc2ExcVy.js} +1 -1
  235. package/dist/twilight/{p-CvIpy7Cj.js → p-BcMtCVX0.js} +2 -2
  236. package/dist/twilight/{p-D26J1_uI.js → p-C3Z9uRGX.js} +1 -1
  237. package/dist/twilight/{p-VRwnn1Qc.js → p-DIeaJrGb.js} +1 -1
  238. package/dist/twilight/{p-BXOq5BwG.js → p-DbdyybJU.js} +1 -1
  239. package/dist/twilight/{p-NiLajaRX.js → p-UFbwqsEd.js} +1 -1
  240. package/dist/twilight/{p-3589bed2.entry.js → p-a39a0eb8.entry.js} +1 -1
  241. package/dist/twilight/{p-402fc86d.entry.js → p-a54364a3.entry.js} +1 -1
  242. package/dist/twilight/{p-1b097cea.entry.js → p-a6bb162e.entry.js} +1 -1
  243. package/dist/twilight/{p-242b6421.entry.js → p-a6cbb4f5.entry.js} +1 -1
  244. package/dist/twilight/{p-73113e85.entry.js → p-a8fd427d.entry.js} +1 -1
  245. package/dist/twilight/{p-23099ba2.entry.js → p-a909028d.entry.js} +1 -1
  246. package/dist/twilight/{p-d07f5e44.entry.js → p-acd70c2f.entry.js} +1 -1
  247. package/dist/twilight/{p-306c4986.entry.js → p-ae1e338f.entry.js} +1 -1
  248. package/dist/twilight/{p-48c94220.entry.js → p-b19ace8d.entry.js} +1 -1
  249. package/dist/twilight/p-b697172b.entry.js +4 -0
  250. package/dist/twilight/{p-04072cae.entry.js → p-bb98a631.entry.js} +1 -1
  251. package/dist/twilight/{p-5638111c.entry.js → p-c18179ed.entry.js} +1 -1
  252. package/dist/twilight/{p-a41f0590.entry.js → p-c2d74b3d.entry.js} +1 -1
  253. package/dist/twilight/{p-f7f592ab.entry.js → p-c45f2128.entry.js} +1 -1
  254. package/dist/twilight/p-c5522363.entry.js +4 -0
  255. package/dist/twilight/{p-249c9d98.entry.js → p-c6e7b06f.entry.js} +1 -1
  256. package/dist/twilight/{p-bc65bb02.entry.js → p-cc6c624c.entry.js} +1 -1
  257. package/dist/twilight/{p-wnPgaQoR.js → p-ctIqN5Fo.js} +1 -1
  258. package/dist/twilight/{p-4c007dc0.entry.js → p-d607bfd3.entry.js} +1 -1
  259. package/dist/twilight/{p-be1c54e6.entry.js → p-d862646f.entry.js} +1 -1
  260. package/dist/twilight/{p-e3b4a179.entry.js → p-dbcc0a7f.entry.js} +1 -1
  261. package/dist/twilight/p-dc6f4d54.entry.js +4 -0
  262. package/dist/twilight/{p-3c982608.entry.js → p-deb74e2e.entry.js} +1 -1
  263. package/dist/twilight/{p-4fc10acd.entry.js → p-dfa729d4.entry.js} +1 -1
  264. package/dist/twilight/p-e7671432.entry.js +4 -0
  265. package/dist/twilight/{p-4da987fc.entry.js → p-e7932d3d.entry.js} +1 -1
  266. package/dist/twilight/{p-e9be8c03.entry.js → p-e879fb84.entry.js} +1 -1
  267. package/dist/twilight/p-e9c7f99a.entry.js +4 -0
  268. package/dist/twilight/{p-a248f209.entry.js → p-f100cc25.entry.js} +1 -1
  269. package/dist/twilight/{p-ed08f5e5.entry.js → p-f63999f8.entry.js} +1 -1
  270. package/dist/twilight/{p-BlMSs0A2.js → p-fbLtV-T9.js} +1 -1
  271. package/dist/twilight/{p-6257e0cd.entry.js → p-fd22cd01.entry.js} +1 -1
  272. package/dist/twilight/{p-DWxyBEuT.js → p-ukob-enB.js} +2 -2
  273. package/dist/twilight/twilight.esm.js +1 -1
  274. package/dist/types/components/salla-count-down/salla-count-down.d.ts +24 -0
  275. package/dist/types/components/salla-gifting/gift-schema.d.ts +4 -0
  276. package/dist/types/components/salla-gifting/intefaces.d.ts +1 -0
  277. package/dist/types/components/salla-gifting/salla-gifting.d.ts +10 -1
  278. package/dist/types/components/salla-order-edit/interfaces.d.ts +114 -0
  279. package/dist/types/components/salla-order-edit/salla-order-edit-item.d.ts +35 -0
  280. package/dist/types/components/salla-order-edit/salla-order-edit.d.ts +42 -0
  281. package/dist/types/components.d.ts +170 -0
  282. package/package.json +5 -5
  283. package/dist/twilight/p-06eb15e2.entry.js +0 -4
  284. package/dist/twilight/p-348106f0.entry.js +0 -4
  285. package/dist/twilight/p-7020a339.entry.js +0 -4
  286. package/dist/twilight/p-e79ad638.entry.js +0 -4
@@ -0,0 +1,256 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { h, Host } from "@stencil/core";
5
+ /**
6
+ * @salla/ui-components
7
+ * The `salla-order-edit` component
8
+ * as an editable card with quantity controls, editable options, and an order summary.
9
+ */
10
+ export class SallaOrderEdit {
11
+ constructor() {
12
+ this.loading = true;
13
+ this.saveLoading = false;
14
+ this.payload = { items: { update: [], remove: [] } };
15
+ this.expired = false;
16
+ this.editPreview = null;
17
+ this.confirming = false;
18
+ }
19
+ async componentWillLoad() {
20
+ await salla.onReady();
21
+ this.loadFromProp();
22
+ this.startExpiryCheck();
23
+ }
24
+ disconnectedCallback() {
25
+ clearInterval(this.expiryInterval);
26
+ }
27
+ startExpiryCheck() {
28
+ const endsAt = this.order?.customer_editing_session?.ends_at;
29
+ if (!endsAt)
30
+ return;
31
+ const isExpired = () => new Date(`${endsAt.replace(' ', 'T')}+03:00`).getTime() <= Date.now();
32
+ if (isExpired()) {
33
+ this.expired = true;
34
+ return;
35
+ }
36
+ this.expiryInterval = setInterval(() => {
37
+ if (isExpired()) {
38
+ this.expired = true;
39
+ clearInterval(this.expiryInterval);
40
+ }
41
+ }, 1000);
42
+ }
43
+ loadFromProp() {
44
+ try {
45
+ if (!this.orderData) {
46
+ this.error = salla.lang.getWithDefault('pages.orders.order_not_found', 'الطلب غير موجود');
47
+ return;
48
+ }
49
+ const data = typeof this.orderData === 'string' ? JSON.parse(this.orderData) : this.orderData;
50
+ this.order = data;
51
+ }
52
+ catch (e) {
53
+ this.error = salla.lang.getWithDefault('pages.orders.order_not_found', 'الطلب غير موجود');
54
+ }
55
+ finally {
56
+ this.loading = false;
57
+ }
58
+ }
59
+ handleItemUpdated(event) {
60
+ if (!this.order)
61
+ return;
62
+ const { itemId, quantity, options } = event.detail;
63
+ const updateList = this.payload.items.update.filter(u => u.id !== itemId);
64
+ const updateEntry = { id: itemId, quantity, options: options ?? [] };
65
+ updateList.push(updateEntry);
66
+ this.payload = {
67
+ ...this.payload,
68
+ items: { ...this.payload.items, update: updateList },
69
+ };
70
+ this.order = {
71
+ ...this.order,
72
+ items: this.order.items.map(item => item.id === itemId ? { ...item, quantity } : item),
73
+ };
74
+ }
75
+ handleItemRemoved(event) {
76
+ if (!this.order)
77
+ return;
78
+ if (this.order.items.length <= 1) {
79
+ salla.notify.error(salla.lang.getWithDefault('pages.orders.order_cannot_be_empty', 'لا يمكن إزالة جميع المنتجات من الطلب'));
80
+ return;
81
+ }
82
+ const { itemId } = event.detail;
83
+ this.payload = {
84
+ ...this.payload,
85
+ items: {
86
+ update: this.payload.items.update.filter(u => u.id !== itemId),
87
+ remove: [...this.payload.items.remove, itemId],
88
+ },
89
+ };
90
+ this.order = {
91
+ ...this.order,
92
+ items: this.order.items.filter(item => item.id !== itemId),
93
+ };
94
+ }
95
+ get hasChanges() {
96
+ return this.payload.items.update.length > 0 || this.payload.items.remove.length > 0;
97
+ }
98
+ async saveOrder() {
99
+ if (!this.hasChanges)
100
+ return;
101
+ this.saveLoading = true;
102
+ try {
103
+ const response = await salla.order.api.editOrder(this.orderId, this.payload);
104
+ this.editPreview = response?.data?.data || response?.data;
105
+ await this.saveModal?.open();
106
+ }
107
+ catch (error) {
108
+ const message = error?.response?.data?.error?.message || error?.response?.data?.message;
109
+ if (message) {
110
+ salla.notify.error(message);
111
+ }
112
+ }
113
+ finally {
114
+ this.saveLoading = false;
115
+ }
116
+ }
117
+ navigateToOrder() {
118
+ const url = new URL(window.location.href);
119
+ url.pathname = url.pathname.replace(/\/edit\/?$/, '');
120
+ url.search = '';
121
+ window.location.href = url.href;
122
+ }
123
+ handleConfirm() {
124
+ this.confirming = true;
125
+ if (this.editPreview?.payment?.required && this.editPreview.payment.payment_url) {
126
+ window.location.href = this.editPreview.payment.payment_url;
127
+ }
128
+ else {
129
+ this.navigateToOrder();
130
+ }
131
+ }
132
+ cancel() {
133
+ this.navigateToOrder();
134
+ }
135
+ renderSaveModal() {
136
+ const preview = this.editPreview;
137
+ const hasRemainingAmount = preview?.totals?.remaining_amount?.amount > 0;
138
+ const hasRefundAmount = preview?.totals?.refund_amount?.amount > 0;
139
+ const taxAmount = preview?.totals?.tax?.amount?.amount;
140
+ return (h("salla-modal", { ref: modal => (this.saveModal = modal), width: "md", onModalVisibilityChanged: (e) => {
141
+ if (!e.detail) {
142
+ this.editPreview = null;
143
+ if (!this.confirming) {
144
+ this.navigateToOrder();
145
+ }
146
+ this.confirming = false;
147
+ }
148
+ } }, h("div", { class: "s-order-edit-modal" }, h("h2", { class: "s-order-edit-modal-title" }, salla.lang.getWithDefault('pages.orders.edit_summary_title', 'ملخص الطلب بعد التعديل')), preview?.items?.length > 0 && (h("div", { class: "s-order-edit-modal-items" }, preview.items.map(item => {
149
+ const orderItem = this.order?.items?.find(oi => oi.id == item.id);
150
+ const imageUrl = orderItem?.product?.image?.url;
151
+ const optionsLabel = item.options?.join('/ ');
152
+ return (h("div", { class: "s-order-edit-modal-item" }, h("div", { class: "s-order-edit-modal-item-start" }, imageUrl && (h("img", { src: imageUrl, alt: item.name, class: "s-order-edit-modal-item-image" })), h("div", null, h("p", { class: "s-order-edit-modal-item-name" }, item.name), optionsLabel && (h("span", { class: "s-order-edit-modal-item-options" }, optionsLabel)))), h("div", { class: "s-order-edit-modal-item-end" }, h("span", { class: "s-order-edit-modal-item-price", innerHTML: salla.money(item.price.amount) }))));
153
+ }))), preview?.totals?.updated_products_total && (h("div", { class: "s-order-edit-modal-row" }, h("span", { class: "s-order-edit-modal-row-label" }, salla.lang.getWithDefault('pages.orders.modified_products_total', 'مجموع المنتجات المعدلة')), h("span", { class: "s-order-edit-modal-row-value", innerHTML: salla.money(preview.totals.updated_products_total.amount) }))), taxAmount > 0 && (h("div", { class: "s-order-edit-modal-row" }, h("span", { class: "s-order-edit-modal-tax-label" }, h("i", { class: "sicon-info-circle s-order-edit-modal-tax-icon" }), salla.lang.getWithDefault('pages.orders.vat', 'ضريبة القيمة المضافة')), h("span", { class: "s-order-edit-modal-row-value", innerHTML: salla.money(taxAmount) }))), preview?.totals?.total && (h("div", { class: "s-order-edit-modal-total" }, h("span", { class: "s-order-edit-modal-total-label" }, salla.lang.getWithDefault('pages.orders.order_total', 'اجمالي الطلب')), h("span", { class: "s-order-edit-modal-total-value", innerHTML: salla.money(preview.totals.total.amount) }))), hasRefundAmount && (h("div", { class: "s-order-edit-modal-refund" }, h("i", { class: "sicon-info-circle s-order-edit-modal-refund-icon" }), h("p", { class: "s-order-edit-modal-refund-text" }, salla.lang.getWithDefault('pages.orders.refund_message', 'سيتم تحويل فارق المبلغ على نفس وسيلة الدفع')))), h("div", { class: "s-order-edit-modal-btn-wrapper" }, h("salla-button", { onClick: () => this.handleConfirm() }, hasRemainingAmount
154
+ ? salla.lang.getWithDefault('pages.orders.pay_difference', 'دفع فارق المبلغ')
155
+ : hasRefundAmount
156
+ ? salla.lang.getWithDefault('pages.orders.confirm_and_receive_difference', 'تأكيد واستلام فارق المبلغ')
157
+ : salla.lang.getWithDefault('pages.orders.confirm_changes', 'تأكيد التعديلات'), h("i", { class: "sicon-keyboard_arrow_left s-order-edit-modal-btn-icon" }))))));
158
+ }
159
+ render() {
160
+ if (this.loading) {
161
+ return (h(Host, null, h("salla-loading", null)));
162
+ }
163
+ if (this.expired) {
164
+ 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', 'العودة إلى تفاصيل الطلب')))));
165
+ }
166
+ if (this.error || !this.order) {
167
+ return (h(Host, null, h("div", { class: "no-content-placeholder" }, h("i", { class: "sicon-shopping-bag icon" }), h("p", null, this.error))));
168
+ }
169
+ const hasItems = this.order.items && this.order.items.length > 0;
170
+ const endsAt = this.order.customer_editing_session?.ends_at;
171
+ 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) => [
172
+ h("salla-order-edit-item", { key: item.id, item: item, orderId: this.orderId }),
173
+ index < this.order.items.length - 1 ? (h("div", { class: "s-order-edit-items-divider" })) : null,
174
+ ])) : (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.cancel() }, salla.lang.getWithDefault('common.elements.cancel', 'الغاء'))), this.renderSaveModal()));
175
+ }
176
+ static get is() { return "salla-order-edit"; }
177
+ static get originalStyleUrls() {
178
+ return {
179
+ "$": ["salla-order-edit.scss"]
180
+ };
181
+ }
182
+ static get styleUrls() {
183
+ return {
184
+ "$": ["salla-order-edit.css"]
185
+ };
186
+ }
187
+ static get properties() {
188
+ return {
189
+ "orderId": {
190
+ "type": "any",
191
+ "attribute": "order-id",
192
+ "mutable": false,
193
+ "complexType": {
194
+ "original": "string | number",
195
+ "resolved": "number | string",
196
+ "references": {}
197
+ },
198
+ "required": false,
199
+ "optional": false,
200
+ "docs": {
201
+ "tags": [],
202
+ "text": "The order ID to edit"
203
+ },
204
+ "getter": false,
205
+ "setter": false,
206
+ "reflect": false
207
+ },
208
+ "orderData": {
209
+ "type": "string",
210
+ "attribute": "order-data",
211
+ "mutable": false,
212
+ "complexType": {
213
+ "original": "string",
214
+ "resolved": "string",
215
+ "references": {}
216
+ },
217
+ "required": false,
218
+ "optional": false,
219
+ "docs": {
220
+ "tags": [],
221
+ "text": "Pre-loaded order data (JSON string)."
222
+ },
223
+ "getter": false,
224
+ "setter": false,
225
+ "reflect": false
226
+ }
227
+ };
228
+ }
229
+ static get states() {
230
+ return {
231
+ "order": {},
232
+ "loading": {},
233
+ "error": {},
234
+ "saveLoading": {},
235
+ "payload": {},
236
+ "expired": {},
237
+ "editPreview": {}
238
+ };
239
+ }
240
+ static get elementRef() { return "host"; }
241
+ static get listeners() {
242
+ return [{
243
+ "name": "orderItemUpdated",
244
+ "method": "handleItemUpdated",
245
+ "target": undefined,
246
+ "capture": false,
247
+ "passive": false
248
+ }, {
249
+ "name": "orderItemRemoved",
250
+ "method": "handleItemRemoved",
251
+ "target": undefined,
252
+ "capture": false,
253
+ "passive": false
254
+ }];
255
+ }
256
+ }