@salla.sa/twilight-components 2.14.389 → 2.14.391

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 (302) hide show
  1. package/dist/cjs/{filepond-D-Sm5mfd.js → filepond-DFNeUlJZ.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-D_Q9tOzh.js → filepond-plugin-file-poster-CdscjCyV.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-jE8i9yLT.js → filepond-plugin-file-validate-size-CeIHus23.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-ClNK2GsY.js → filepond-plugin-file-validate-type-B-xReGXI.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-BtI2loP1.js → filepond-plugin-image-edit-BEZKgnin.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-DFksd-cT.js → filepond-plugin-image-exif-orientation-BsIhjiXV.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-B6iy7dvj.js → filepond-plugin-image-preview-CgGyHHMF.js} +1 -1
  8. package/dist/cjs/{index-CZzG9P8m.js → index-RCgJUM7B.js} +34 -10
  9. package/dist/cjs/{index-PbcABX0l.js → index-U__MmWip.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-delivery-promise.cjs.entry.js +230 -0
  29. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +45 -0
  32. package/dist/cjs/salla-gifting.cjs.entry.js +91 -16
  33. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  43. package/dist/cjs/{salla-accordion-body_3.cjs.entry.js → salla-map.cjs.entry.js} +1 -57
  44. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-order-edit-item.cjs.entry.js +95 -0
  57. package/dist/cjs/salla-order-edit.cjs.entry.js +181 -0
  58. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  64. package/dist/cjs/{salla-count-down_2.cjs.entry.js → salla-product-card.cjs.entry.js} +1 -160
  65. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  86. package/dist/cjs/twilight.cjs.js +2 -2
  87. package/dist/cjs/{vanilla-picker-BP4lqf-K.js → vanilla-picker-yWlr4I9a.js} +1 -1
  88. package/dist/collection/collection-manifest.json +4 -0
  89. package/dist/collection/components/salla-count-down/salla-count-down.css +4 -0
  90. package/dist/collection/components/salla-count-down/salla-count-down.js +122 -13
  91. package/dist/collection/components/salla-delivery-promise/interfaces.js +1 -0
  92. package/dist/collection/components/salla-delivery-promise/salla-delivery-promise.js +247 -0
  93. package/dist/collection/components/salla-fulfillment-methods/salla-fulfillment-methods.js +51 -0
  94. package/dist/collection/components/salla-gifting/salla-gifting.js +96 -15
  95. package/dist/collection/components/salla-order-edit/interfaces.js +1 -0
  96. package/dist/collection/components/salla-order-edit/salla-order-edit-item.css +0 -0
  97. package/dist/collection/components/salla-order-edit/salla-order-edit-item.js +185 -0
  98. package/dist/collection/components/salla-order-edit/salla-order-edit.css +0 -0
  99. package/dist/collection/components/salla-order-edit/salla-order-edit.js +256 -0
  100. package/dist/components/index.js +2 -2
  101. package/dist/components/salla-count-down2.js +49 -13
  102. package/dist/components/salla-delivery-promise.d.ts +11 -0
  103. package/dist/components/salla-delivery-promise.js +266 -0
  104. package/dist/components/salla-fulfillment-methods.d.ts +11 -0
  105. package/dist/components/salla-fulfillment-methods.js +64 -0
  106. package/dist/components/salla-gifting.js +96 -15
  107. package/dist/components/salla-order-edit-item.d.ts +11 -0
  108. package/dist/components/salla-order-edit-item.js +9 -0
  109. package/dist/components/salla-order-edit-item2.js +184 -0
  110. package/dist/components/salla-order-edit.d.ts +11 -0
  111. package/dist/components/salla-order-edit.js +291 -0
  112. package/dist/components/salla-quantity-input.js +1 -125
  113. package/dist/components/salla-quantity-input2.js +130 -0
  114. package/dist/esm/{filepond-PPWykQxI.js → filepond-dioc1UNj.js} +1 -1
  115. package/dist/esm/{filepond-plugin-file-poster-BRSyNznG.js → filepond-plugin-file-poster-BpOMmY57.js} +1 -1
  116. package/dist/esm/{filepond-plugin-file-validate-size-BKa_IBRc.js → filepond-plugin-file-validate-size-D3zrIASS.js} +1 -1
  117. package/dist/esm/{filepond-plugin-file-validate-type-B2Gqcysx.js → filepond-plugin-file-validate-type-C_O5sg3V.js} +1 -1
  118. package/dist/esm/{filepond-plugin-image-edit-C0UvZ9iA.js → filepond-plugin-image-edit-vV9cFwQt.js} +1 -1
  119. package/dist/esm/{filepond-plugin-image-exif-orientation-Dmzu9ZJy.js → filepond-plugin-image-exif-orientation-DQHJunT0.js} +1 -1
  120. package/dist/esm/{filepond-plugin-image-preview-CaZ36U6e.js → filepond-plugin-image-preview-CK8pdQ2g.js} +1 -1
  121. package/dist/esm/{index-C3w2qMi0.js → index-B6FFbRiW.js} +1 -1
  122. package/dist/esm/{index-CyfZeaV2.js → index-BBHnyTVS.js} +34 -10
  123. package/dist/esm/loader.js +3 -3
  124. package/dist/esm/salla-accordion-body_2.entry.js +60 -0
  125. package/dist/esm/salla-accordion_6.entry.js +1 -1
  126. package/dist/esm/salla-add-product-button_4.entry.js +1 -1
  127. package/dist/esm/salla-advertisement.entry.js +1 -1
  128. package/dist/esm/salla-alert_2.entry.js +1 -1
  129. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  130. package/dist/esm/salla-apps-icons.entry.js +1 -1
  131. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  132. package/dist/esm/salla-bullet-delivery.entry.js +1 -1
  133. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  134. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  135. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  136. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  137. package/dist/esm/salla-contacts.entry.js +1 -1
  138. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  139. package/dist/esm/salla-count-down.entry.js +194 -0
  140. package/dist/esm/salla-custom-fields.entry.js +1 -1
  141. package/dist/esm/salla-delivery-promise.entry.js +228 -0
  142. package/dist/esm/salla-filters-widget.entry.js +1 -1
  143. package/dist/esm/salla-filters.entry.js +1 -1
  144. package/dist/esm/salla-fulfillment-methods.entry.js +43 -0
  145. package/dist/esm/salla-gifting.entry.js +91 -16
  146. package/dist/esm/salla-hook.entry.js +1 -1
  147. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  148. package/dist/esm/salla-installment.entry.js +1 -1
  149. package/dist/esm/salla-list-tile.entry.js +1 -1
  150. package/dist/esm/salla-localization-modal.entry.js +1 -1
  151. package/dist/esm/salla-login-modal.entry.js +1 -1
  152. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  153. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  154. package/dist/esm/salla-loyalty.entry.js +1 -1
  155. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  156. package/dist/esm/{salla-accordion-body_3.entry.js → salla-map.entry.js} +2 -56
  157. package/dist/esm/salla-menu.entry.js +1 -1
  158. package/dist/esm/salla-metadata.entry.js +1 -1
  159. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  160. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  161. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  162. package/dist/esm/salla-notification-item.entry.js +1 -1
  163. package/dist/esm/salla-notifications.entry.js +1 -1
  164. package/dist/esm/salla-offer-modal.entry.js +1 -1
  165. package/dist/esm/salla-offer.entry.js +1 -1
  166. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  167. package/dist/esm/salla-order-details-options.entry.js +1 -1
  168. package/dist/esm/salla-order-details.entry.js +1 -1
  169. package/dist/esm/salla-order-edit-item.entry.js +93 -0
  170. package/dist/esm/salla-order-edit.entry.js +179 -0
  171. package/dist/esm/salla-order-summary.entry.js +1 -1
  172. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  173. package/dist/esm/salla-orders.entry.js +1 -1
  174. package/dist/esm/salla-payments.entry.js +1 -1
  175. package/dist/esm/salla-placeholder.entry.js +1 -1
  176. package/dist/esm/salla-price-range.entry.js +1 -1
  177. package/dist/esm/{salla-count-down_2.entry.js → salla-product-card.entry.js} +2 -160
  178. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  179. package/dist/esm/salla-products-list.entry.js +1 -1
  180. package/dist/esm/salla-products-slider.entry.js +1 -1
  181. package/dist/esm/salla-progress-bar.entry.js +1 -1
  182. package/dist/esm/salla-quick-order.entry.js +1 -1
  183. package/dist/esm/salla-rating-modal.entry.js +1 -1
  184. package/dist/esm/salla-scopes.entry.js +1 -1
  185. package/dist/esm/salla-search.entry.js +1 -1
  186. package/dist/esm/salla-skeleton.entry.js +1 -1
  187. package/dist/esm/salla-slider.entry.js +1 -1
  188. package/dist/esm/salla-social-share.entry.js +1 -1
  189. package/dist/esm/salla-social.entry.js +1 -1
  190. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  191. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  192. package/dist/esm/salla-tooltip.entry.js +1 -1
  193. package/dist/esm/salla-trust-badges.entry.js +1 -1
  194. package/dist/esm/salla-user-menu.entry.js +1 -1
  195. package/dist/esm/salla-user-profile.entry.js +1 -1
  196. package/dist/esm/salla-user-settings.entry.js +1 -1
  197. package/dist/esm/salla-verify.entry.js +1 -1
  198. package/dist/esm/salla-wallet.entry.js +1 -1
  199. package/dist/esm/twilight.js +3 -3
  200. package/dist/esm/{vanilla-picker-BnLjo9lg.js → vanilla-picker-DSMkPxn-.js} +1 -1
  201. package/dist/twilight/p-01cb129f.entry.js +4 -0
  202. package/dist/twilight/{p-CKAWVE2E.js → p-03jJUGJM.js} +1 -1
  203. package/dist/twilight/{p-414f399b.entry.js → p-042206f2.entry.js} +1 -1
  204. package/dist/twilight/{p-8c1f6ff5.entry.js → p-0557c403.entry.js} +1 -1
  205. package/dist/twilight/{p-f9b6a945.entry.js → p-06d3f60c.entry.js} +1 -1
  206. package/dist/twilight/{p-8538541b.entry.js → p-099267e9.entry.js} +1 -1
  207. package/dist/twilight/{p-d224ad78.entry.js → p-0a779ecb.entry.js} +1 -1
  208. package/dist/twilight/p-0c45b777.entry.js +4 -0
  209. package/dist/twilight/{p-c782ba90.entry.js → p-143f385c.entry.js} +1 -1
  210. package/dist/twilight/p-1646270f.entry.js +4 -0
  211. package/dist/twilight/{p-7eebae69.entry.js → p-1a7e8dc4.entry.js} +1 -1
  212. package/dist/twilight/p-1b50e37e.entry.js +4 -0
  213. package/dist/twilight/{p-f8b53b4a.entry.js → p-1bacbd68.entry.js} +1 -1
  214. package/dist/twilight/{p-5db4f7be.entry.js → p-214c17ba.entry.js} +1 -1
  215. package/dist/twilight/{p-5a3fbfcc.entry.js → p-23c450bb.entry.js} +1 -1
  216. package/dist/twilight/{p-3490e1f2.entry.js → p-2534ee8d.entry.js} +1 -1
  217. package/dist/twilight/{p-2d3c3fc0.entry.js → p-2690964e.entry.js} +1 -1
  218. package/dist/twilight/{p-749f87cc.entry.js → p-2f4352f5.entry.js} +1 -1
  219. package/dist/twilight/{p-fdb99998.entry.js → p-2fd9954e.entry.js} +1 -1
  220. package/dist/twilight/{p-de4fc6d3.entry.js → p-3094c1a1.entry.js} +1 -1
  221. package/dist/twilight/{p-313e016b.entry.js → p-31cff9d6.entry.js} +1 -1
  222. package/dist/twilight/{p-49178d13.entry.js → p-3570139b.entry.js} +1 -1
  223. package/dist/twilight/p-3a20fbc0.entry.js +4 -0
  224. package/dist/twilight/{p-fca12e58.entry.js → p-43a3d74b.entry.js} +1 -1
  225. package/dist/twilight/{p-b6924b12.entry.js → p-43fd9024.entry.js} +1 -1
  226. package/dist/twilight/{p-7367264c.entry.js → p-45c1eaa8.entry.js} +1 -1
  227. package/dist/twilight/p-49260c6c.entry.js +4 -0
  228. package/dist/twilight/{p-f713d4c1.entry.js → p-495a9262.entry.js} +1 -1
  229. package/dist/twilight/{p-9b03dc5f.entry.js → p-4b78b5b6.entry.js} +1 -1
  230. package/dist/twilight/{p-92aa6f9c.entry.js → p-4f664ee5.entry.js} +1 -1
  231. package/dist/twilight/{p-981aa6b2.entry.js → p-5039c032.entry.js} +1 -1
  232. package/dist/twilight/{p-282b2717.entry.js → p-51eeff00.entry.js} +1 -1
  233. package/dist/twilight/{p-a3479656.entry.js → p-5abc72fb.entry.js} +1 -1
  234. package/dist/twilight/{p-52249b73.entry.js → p-5de17423.entry.js} +1 -1
  235. package/dist/twilight/{p-71e9036c.entry.js → p-5e08505f.entry.js} +1 -1
  236. package/dist/twilight/{p-7b3e9e94.entry.js → p-64316672.entry.js} +1 -1
  237. package/dist/twilight/{p-68e1946b.entry.js → p-698cda6b.entry.js} +1 -1
  238. package/dist/twilight/p-6d9ff62d.entry.js +4 -0
  239. package/dist/twilight/p-72128782.entry.js +4 -0
  240. package/dist/twilight/{p-9af46409.entry.js → p-736661d1.entry.js} +1 -1
  241. package/dist/twilight/{p-6f230886.entry.js → p-73fc8bc2.entry.js} +1 -1
  242. package/dist/twilight/{p-e51abff8.entry.js → p-78230ff2.entry.js} +1 -1
  243. package/dist/twilight/{p-9dace77f.entry.js → p-7b1e18b9.entry.js} +1 -1
  244. package/dist/twilight/p-8735bed6.entry.js +4 -0
  245. package/dist/twilight/{p-d0d9eaa7.entry.js → p-911df985.entry.js} +1 -1
  246. package/dist/twilight/{p-b85269f0.entry.js → p-917e279a.entry.js} +1 -1
  247. package/dist/twilight/{p-0dcadf17.entry.js → p-9623211d.entry.js} +1 -1
  248. package/dist/twilight/{p-56f20bf9.entry.js → p-98365139.entry.js} +1 -1
  249. package/dist/twilight/{p-e4984da6.entry.js → p-9a2fa95c.entry.js} +1 -1
  250. package/dist/twilight/{p-3424772f.entry.js → p-9f09f917.entry.js} +1 -1
  251. package/dist/twilight/{p-CyfZeaV2.js → p-BBHnyTVS.js} +2 -2
  252. package/dist/twilight/{p-DV84B4Zf.js → p-BLNd0Q7w.js} +1 -1
  253. package/dist/twilight/p-BdSnnWWn.js +9 -0
  254. package/dist/twilight/{p-DgRZXtp7.js → p-BywTh96y.js} +1 -1
  255. package/dist/twilight/{p-B5sTdzgA.js → p-CWQJdJyB.js} +1 -1
  256. package/dist/twilight/{p-DaXFe_AG.js → p-CttEbJoQ.js} +1 -1
  257. package/dist/twilight/{p-oPo_An7U.js → p-HRFCteJK.js} +1 -1
  258. package/dist/twilight/{p-nDM6sAQW.js → p-IulbkBPB.js} +1 -1
  259. package/dist/twilight/{p-71199938.entry.js → p-a50a28ea.entry.js} +1 -1
  260. package/dist/twilight/{p-1fa74395.entry.js → p-abfc0327.entry.js} +1 -1
  261. package/dist/twilight/{p-9ae66ab7.entry.js → p-b9a7a8b1.entry.js} +1 -1
  262. package/dist/twilight/{p-646ac137.entry.js → p-bc9aa300.entry.js} +1 -1
  263. package/dist/twilight/{p-28691a37.entry.js → p-c800360f.entry.js} +1 -1
  264. package/dist/twilight/{p-83bb3e08.entry.js → p-cc8c8ee0.entry.js} +1 -1
  265. package/dist/twilight/{p-a5215f9c.entry.js → p-ccf81e66.entry.js} +1 -1
  266. package/dist/twilight/{p-46715ed4.entry.js → p-ce4e06b8.entry.js} +1 -1
  267. package/dist/twilight/{p-85e08789.entry.js → p-d375a0d6.entry.js} +1 -1
  268. package/dist/twilight/{p-ccc3689d.entry.js → p-d5bea7d7.entry.js} +1 -1
  269. package/dist/twilight/{p-dccaabbe.entry.js → p-daf6d030.entry.js} +1 -1
  270. package/dist/twilight/{p-6c5ab45f.entry.js → p-db1699d8.entry.js} +1 -1
  271. package/dist/twilight/{p-75744403.entry.js → p-db8ea013.entry.js} +1 -1
  272. package/dist/twilight/{p-f2a021d2.entry.js → p-dd95dd45.entry.js} +1 -1
  273. package/dist/twilight/{p-6b642ef5.entry.js → p-df66218c.entry.js} +1 -1
  274. package/dist/twilight/{p-0e064e79.entry.js → p-e2a6cc78.entry.js} +1 -1
  275. package/dist/twilight/{p-b6d4d88f.entry.js → p-e5faf311.entry.js} +1 -1
  276. package/dist/twilight/{p-8c918f58.entry.js → p-e8ee7b09.entry.js} +1 -1
  277. package/dist/twilight/{p-016b3b19.entry.js → p-ec2a876a.entry.js} +1 -1
  278. package/dist/twilight/{p-549d8385.entry.js → p-f08590d7.entry.js} +1 -1
  279. package/dist/twilight/{p-c48e2a05.entry.js → p-f17b1333.entry.js} +1 -1
  280. package/dist/twilight/{p-4a0248ab.entry.js → p-f8b8c0da.entry.js} +1 -1
  281. package/dist/twilight/{p-833e8364.entry.js → p-f8beca67.entry.js} +1 -1
  282. package/dist/twilight/{p-77a89284.entry.js → p-fc6852a0.entry.js} +1 -1
  283. package/dist/twilight/{p-69ae622f.entry.js → p-fd540f5b.entry.js} +1 -1
  284. package/dist/twilight/{p-1a9b64ea.entry.js → p-fe417603.entry.js} +1 -1
  285. package/dist/twilight/{p-CJnMMMxb.js → p-okSe2zH1.js} +1 -1
  286. package/dist/twilight/twilight.esm.js +1 -1
  287. package/dist/types/components/salla-count-down/salla-count-down.d.ts +24 -0
  288. package/dist/types/components/salla-delivery-promise/interfaces.d.ts +27 -0
  289. package/dist/types/components/salla-delivery-promise/salla-delivery-promise.d.ts +48 -0
  290. package/dist/types/components/salla-fulfillment-methods/salla-fulfillment-methods.d.ts +18 -0
  291. package/dist/types/components/salla-gifting/gift-schema.d.ts +4 -0
  292. package/dist/types/components/salla-gifting/intefaces.d.ts +1 -0
  293. package/dist/types/components/salla-gifting/salla-gifting.d.ts +10 -1
  294. package/dist/types/components/salla-order-edit/interfaces.d.ts +114 -0
  295. package/dist/types/components/salla-order-edit/salla-order-edit-item.d.ts +35 -0
  296. package/dist/types/components/salla-order-edit/salla-order-edit.d.ts +42 -0
  297. package/dist/types/components.d.ts +236 -0
  298. package/package.json +5 -5
  299. package/dist/twilight/p-1048b469.entry.js +0 -4
  300. package/dist/twilight/p-C11T4TVo.js +0 -9
  301. package/dist/twilight/p-d33f3c58.entry.js +0 -4
  302. package/dist/twilight/p-fbcc194e.entry.js +0 -4
@@ -0,0 +1,93 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BBHnyTVS.js';
5
+
6
+ const sallaOrderEditItemCss = "";
7
+
8
+ const SallaOrderEditItem = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.orderItemUpdated = createEvent(this, "orderItemUpdated");
12
+ this.orderItemRemoved = createEvent(this, "orderItemRemoved");
13
+ this.handleQuantityChange = (event) => {
14
+ const detail = event.detail;
15
+ const newQuantity = detail?.quantity ?? parseInt(event.target.value, 10);
16
+ if (isNaN(newQuantity) || newQuantity < 1)
17
+ return;
18
+ if (newQuantity === this.quantity)
19
+ return;
20
+ this.quantity = newQuantity;
21
+ this.emitUpdate(newQuantity);
22
+ };
23
+ this.handleOptionsChange = () => {
24
+ this.emitUpdate(this.quantity);
25
+ };
26
+ }
27
+ componentWillLoad() {
28
+ this.quantity = this.item?.quantity || 1;
29
+ }
30
+ componentDidLoad() {
31
+ const quantityEl = this.host.querySelector('salla-quantity-input');
32
+ if (quantityEl) {
33
+ quantityEl.addEventListener('change', this.handleQuantityChange);
34
+ }
35
+ const optionsEl = this.host.querySelector('salla-product-options');
36
+ if (optionsEl) {
37
+ optionsEl.addEventListener('change', this.handleOptionsChange);
38
+ }
39
+ }
40
+ disconnectedCallback() {
41
+ const quantityEl = this.host.querySelector('salla-quantity-input');
42
+ if (quantityEl) {
43
+ quantityEl.removeEventListener('change', this.handleQuantityChange);
44
+ }
45
+ const optionsEl = this.host.querySelector('salla-product-options');
46
+ if (optionsEl) {
47
+ optionsEl.removeEventListener('change', this.handleOptionsChange);
48
+ }
49
+ }
50
+ get hasOptions() {
51
+ const options = this.item.product?.options;
52
+ return options && options.length > 0;
53
+ }
54
+ async getSelectedOptions() {
55
+ const optionsEl = this.host.querySelector(`salla-product-options[product-id="${this.item.product?.id}"]`);
56
+ return (await optionsEl?.getSelectedOptionsData()) || {};
57
+ }
58
+ async emitUpdate(quantity) {
59
+ const detail = { itemId: this.item?.id, quantity };
60
+ if (this.hasOptions) {
61
+ detail.options = await this.getSelectedOptions();
62
+ }
63
+ this.orderItemUpdated.emit(detail);
64
+ }
65
+ removeItem() {
66
+ const itemId = this.item?.id;
67
+ if (itemId == null)
68
+ return;
69
+ this.orderItemRemoved.emit({ itemId });
70
+ }
71
+ render() {
72
+ if (!this.item)
73
+ return null;
74
+ const product = this.item.product;
75
+ const productName = this.item.name || product?.name || '';
76
+ const imageUrl = product?.image?.url || '';
77
+ const imageAlt = product?.image?.alt || productName;
78
+ const productUrl = product?.url || '#';
79
+ const price = product?.price;
80
+ const maxQuantity = product?.max_quantity;
81
+ const weightLabel = product?.weight_label;
82
+ const options = this.item.product?.options;
83
+ const quantityAttrs = { value: this.quantity };
84
+ if (maxQuantity) {
85
+ quantityAttrs.max = maxQuantity;
86
+ }
87
+ return (h(Host, null, h("div", null, h("div", { class: "s-order-edit-item-header" }, h("div", { class: "s-order-edit-item-media" }, imageUrl && (h("a", { href: productUrl }, h("img", { src: imageUrl, alt: imageAlt, class: "s-order-edit-item-image" }))), h("div", { class: "s-order-edit-item-details" }, h("h2", { class: "s-order-edit-item-name" }, h("a", { href: productUrl, class: "s-order-edit-item-link" }, productName)), price != null && (h("span", { class: "s-order-edit-item-price", innerHTML: salla.money(price) })), weightLabel && (h("p", { class: "s-order-edit-item-weight" }, salla.lang.getWithDefault('pages.products.weight', 'الوزن'), " ", weightLabel)))), h("salla-button", { type: "button", shape: "icon", size: "small", color: "danger", "aria-label": salla.lang.getWithDefault('common.elements.delete', 'حذف'), onClick: () => this.removeItem() }, h("i", { class: "sicon-cancel" }))), h("div", { class: "s-order-edit-item-quantity" }, h("h3", { class: "s-order-edit-item-quantity-label" }, salla.lang.getWithDefault('common.elements.quantity', 'الكمية')), h("div", { class: "s-order-edit-item-quantity-input" }, h("salla-quantity-input", { ...quantityAttrs }))), this.hasOptions && (h("form", { onSubmit: e => e.preventDefault() }, h("salla-product-options", { "product-id": product.id, options: JSON.stringify(options), key: `${product.id}-order-edit-item-options` }))))));
88
+ }
89
+ get host() { return getElement(this); }
90
+ };
91
+ SallaOrderEditItem.style = sallaOrderEditItemCss;
92
+
93
+ export { SallaOrderEditItem as salla_order_edit_item };
@@ -0,0 +1,179 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-BBHnyTVS.js';
5
+
6
+ const sallaOrderEditCss = "";
7
+
8
+ const SallaOrderEdit = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.loading = true;
12
+ this.saveLoading = false;
13
+ this.payload = { items: { update: [], remove: [] } };
14
+ this.expired = false;
15
+ this.editPreview = null;
16
+ this.confirming = false;
17
+ }
18
+ async componentWillLoad() {
19
+ await salla.onReady();
20
+ this.loadFromProp();
21
+ this.startExpiryCheck();
22
+ }
23
+ disconnectedCallback() {
24
+ clearInterval(this.expiryInterval);
25
+ }
26
+ startExpiryCheck() {
27
+ const endsAt = this.order?.customer_editing_session?.ends_at;
28
+ if (!endsAt)
29
+ return;
30
+ const isExpired = () => new Date(`${endsAt.replace(' ', 'T')}+03:00`).getTime() <= Date.now();
31
+ if (isExpired()) {
32
+ this.expired = true;
33
+ return;
34
+ }
35
+ this.expiryInterval = setInterval(() => {
36
+ if (isExpired()) {
37
+ this.expired = true;
38
+ clearInterval(this.expiryInterval);
39
+ }
40
+ }, 1000);
41
+ }
42
+ loadFromProp() {
43
+ try {
44
+ if (!this.orderData) {
45
+ this.error = salla.lang.getWithDefault('pages.orders.order_not_found', 'الطلب غير موجود');
46
+ return;
47
+ }
48
+ const data = typeof this.orderData === 'string' ? JSON.parse(this.orderData) : this.orderData;
49
+ this.order = data;
50
+ }
51
+ catch (e) {
52
+ this.error = salla.lang.getWithDefault('pages.orders.order_not_found', 'الطلب غير موجود');
53
+ }
54
+ finally {
55
+ this.loading = false;
56
+ }
57
+ }
58
+ handleItemUpdated(event) {
59
+ if (!this.order)
60
+ return;
61
+ const { itemId, quantity, options } = event.detail;
62
+ const updateList = this.payload.items.update.filter(u => u.id !== itemId);
63
+ const updateEntry = { id: itemId, quantity, options: options ?? [] };
64
+ updateList.push(updateEntry);
65
+ this.payload = {
66
+ ...this.payload,
67
+ items: { ...this.payload.items, update: updateList },
68
+ };
69
+ this.order = {
70
+ ...this.order,
71
+ items: this.order.items.map(item => item.id === itemId ? { ...item, quantity } : item),
72
+ };
73
+ }
74
+ handleItemRemoved(event) {
75
+ if (!this.order)
76
+ return;
77
+ if (this.order.items.length <= 1) {
78
+ salla.notify.error(salla.lang.getWithDefault('pages.orders.order_cannot_be_empty', 'لا يمكن إزالة جميع المنتجات من الطلب'));
79
+ return;
80
+ }
81
+ const { itemId } = event.detail;
82
+ this.payload = {
83
+ ...this.payload,
84
+ items: {
85
+ update: this.payload.items.update.filter(u => u.id !== itemId),
86
+ remove: [...this.payload.items.remove, itemId],
87
+ },
88
+ };
89
+ this.order = {
90
+ ...this.order,
91
+ items: this.order.items.filter(item => item.id !== itemId),
92
+ };
93
+ }
94
+ get hasChanges() {
95
+ return this.payload.items.update.length > 0 || this.payload.items.remove.length > 0;
96
+ }
97
+ async saveOrder() {
98
+ if (!this.hasChanges)
99
+ return;
100
+ this.saveLoading = true;
101
+ try {
102
+ const response = await salla.order.api.editOrder(this.orderId, this.payload);
103
+ this.editPreview = response?.data?.data || response?.data;
104
+ await this.saveModal?.open();
105
+ }
106
+ catch (error) {
107
+ const message = error?.response?.data?.error?.message || error?.response?.data?.message;
108
+ if (message) {
109
+ salla.notify.error(message);
110
+ }
111
+ }
112
+ finally {
113
+ this.saveLoading = false;
114
+ }
115
+ }
116
+ navigateToOrder() {
117
+ const url = new URL(window.location.href);
118
+ url.pathname = url.pathname.replace(/\/edit\/?$/, '');
119
+ url.search = '';
120
+ window.location.href = url.href;
121
+ }
122
+ handleConfirm() {
123
+ this.confirming = true;
124
+ if (this.editPreview?.payment?.required && this.editPreview.payment.payment_url) {
125
+ window.location.href = this.editPreview.payment.payment_url;
126
+ }
127
+ else {
128
+ this.navigateToOrder();
129
+ }
130
+ }
131
+ cancel() {
132
+ this.navigateToOrder();
133
+ }
134
+ renderSaveModal() {
135
+ const preview = this.editPreview;
136
+ const hasRemainingAmount = preview?.totals?.remaining_amount?.amount > 0;
137
+ const hasRefundAmount = preview?.totals?.refund_amount?.amount > 0;
138
+ const taxAmount = preview?.totals?.tax?.amount?.amount;
139
+ return (h("salla-modal", { ref: modal => (this.saveModal = modal), width: "md", onModalVisibilityChanged: (e) => {
140
+ if (!e.detail) {
141
+ this.editPreview = null;
142
+ if (!this.confirming) {
143
+ this.navigateToOrder();
144
+ }
145
+ this.confirming = false;
146
+ }
147
+ } }, 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 => {
148
+ const orderItem = this.order?.items?.find(oi => oi.id == item.id);
149
+ const imageUrl = orderItem?.product?.image?.url;
150
+ const optionsLabel = item.options?.join('/ ');
151
+ 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) }))));
152
+ }))), 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
153
+ ? salla.lang.getWithDefault('pages.orders.pay_difference', 'دفع فارق المبلغ')
154
+ : hasRefundAmount
155
+ ? salla.lang.getWithDefault('pages.orders.confirm_and_receive_difference', 'تأكيد واستلام فارق المبلغ')
156
+ : salla.lang.getWithDefault('pages.orders.confirm_changes', 'تأكيد التعديلات'), h("i", { class: "sicon-keyboard_arrow_left s-order-edit-modal-btn-icon" }))))));
157
+ }
158
+ render() {
159
+ if (this.loading) {
160
+ return (h(Host, null, h("salla-loading", null)));
161
+ }
162
+ if (this.expired) {
163
+ 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', 'العودة إلى تفاصيل الطلب')))));
164
+ }
165
+ if (this.error || !this.order) {
166
+ return (h(Host, null, h("div", { class: "no-content-placeholder" }, h("i", { class: "sicon-shopping-bag icon" }), h("p", null, this.error))));
167
+ }
168
+ const hasItems = this.order.items && this.order.items.length > 0;
169
+ const endsAt = this.order.customer_editing_session?.ends_at;
170
+ 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) => [
171
+ h("salla-order-edit-item", { key: item.id, item: item, orderId: this.orderId }),
172
+ index < this.order.items.length - 1 ? (h("div", { class: "s-order-edit-items-divider" })) : null,
173
+ ])) : (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()));
174
+ }
175
+ get host() { return getElement(this); }
176
+ };
177
+ SallaOrderEdit.style = sallaOrderEditCss;
178
+
179
+ export { SallaOrderEdit as salla_order_edit };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h } from './index-BBHnyTVS.js';
5
5
  import { i as iconCheck } from './check-BsXh13x8.js';
6
6
 
7
7
  var iconFileArchive = `<!-- Generated by IcoMoon.io -->
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, H as Host } from './index-BBHnyTVS.js';
5
5
 
6
6
  const sallaOrderTotalsCardCss = ":host{display:block}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, a as getElement } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-BBHnyTVS.js';
5
5
  import { H as Helper } from './Helper-DFMXF2_h.js';
6
6
  import './anime.es-CgtvEd63.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-BBHnyTVS.js';
5
5
 
6
6
  const sallaPaymentsCss = ":host{display:block}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, H as Host } from './index-BBHnyTVS.js';
5
5
 
6
6
  var Inbox = `<!-- Generated by IcoMoon.io -->
7
7
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-BBHnyTVS.js';
5
5
  import { a as arrowLeft } from './arrow-left-BedNk7k1.js';
6
6
 
7
7
  var arrowRight = `<!-- Generated by IcoMoon.io -->
@@ -1,167 +1,9 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-BBHnyTVS.js';
5
5
  import { S as Star } from './star2-D4oPi1Ov.js';
6
6
 
7
- const sallaCountDownCss = "";
8
-
9
- const SallaCountDown = class {
10
- constructor(hostRef) {
11
- registerInstance(this, hostRef);
12
- /**
13
- * The size of the count down
14
- * */
15
- this.size = 'md';
16
- /**
17
- * The color of the count down
18
- * */
19
- this.color = 'dark';
20
- /**
21
- * The digits lang to show in the count down
22
- * */
23
- this.digits = 'auto';
24
- this.daysLabel = salla.lang.getWithDefault('pages.checkout.day', 'يوم');
25
- this.hoursLabel = salla.lang.getWithDefault('pages.checkout.hour', 'ساعة');
26
- this.minutesLabel = salla.lang.getWithDefault('pages.checkout.minute', 'دقيقة');
27
- this.secondsLabel = salla.lang.getWithDefault('pages.checkout.second', 'ثانية');
28
- this.endLabel = salla.lang.getWithDefault('pages.checkout.offer_ended', 'انتهت مدة العرض');
29
- this.invalidDate = salla.lang.getWithDefault('blocks.buy_as_gift.incorrect_date', 'الرجاء إدخال الموعد بشكل صحيح');
30
- this.offerEnded = false;
31
- this.days = this.number(0);
32
- this.hours = this.number(0);
33
- this.minutes = this.number(0);
34
- this.seconds = this.number(0);
35
- salla.lang.onLoaded(() => {
36
- this.daysLabel = salla.lang.getWithDefault('pages.checkout.day', 'يوم');
37
- this.hoursLabel = salla.lang.getWithDefault('pages.checkout.hour', 'ساعة');
38
- this.minutesLabel = salla.lang.getWithDefault('pages.checkout.minute', 'دقيقة');
39
- this.invalidDate = salla.lang.getWithDefault('blocks.buy_as_gift.incorrect_date', 'الرجاء إدخال الموعد بشكل صحيح');
40
- this.secondsLabel = salla.lang.getWithDefault('pages.checkout.second', 'ثانية');
41
- this.endLabel = salla.lang.getWithDefault('pages.checkout.offer_ended', 'انتهت مدة العرض');
42
- });
43
- if (this.date && this.isValidDate(this.date)) {
44
- this.startCountDown();
45
- }
46
- }
47
- /**
48
- * End the count down
49
- * */
50
- async endCountDown() {
51
- clearInterval(this.countInterval);
52
- this.offerEnded = true;
53
- this.days = this.number(0);
54
- this.hours = this.number(0);
55
- this.minutes = this.number(0);
56
- this.seconds = this.number(0);
57
- }
58
- componentWillLoad() {
59
- if (typeof this.preOrder === 'string') {
60
- try {
61
- this.normalizedPreOrder = JSON.parse(this.preOrder);
62
- }
63
- catch {
64
- this.normalizedPreOrder = undefined;
65
- }
66
- }
67
- else {
68
- this.normalizedPreOrder = this.preOrder;
69
- }
70
- if (this.normalizedPreOrder?.end_date) {
71
- this.date = this.normalizedPreOrder.end_date;
72
- if (this.date && this.isValidDate(this.date)) {
73
- this.startCountDown();
74
- }
75
- }
76
- }
77
- isValidDate(date) {
78
- let dateHasDashes = date.includes('-'), dateParts = date.split(' '), testedDate;
79
- if (dateHasDashes) {
80
- testedDate = dateParts[0].replace(/-/g, '/');
81
- }
82
- else {
83
- testedDate = dateParts[0];
84
- }
85
- return !isNaN(Date.parse(testedDate));
86
- }
87
- number(digit) {
88
- return salla.helpers.number(digit, this.digits === 'en');
89
- }
90
- startCountDown() {
91
- let countDownDate = new Date(this.date.replace(/-/g, '/'));
92
- if (this.endOfDay || this.date.split(' ').length === 1) {
93
- countDownDate.setHours(23, 59, 59, 999);
94
- }
95
- let countDownTime = countDownDate.getTime();
96
- this.countInterval = setInterval(() => {
97
- let now = new Date().getTime();
98
- let distance = countDownTime - now;
99
- this.days = this.number(Math.floor(distance / (1000 * 60 * 60 * 24)));
100
- this.hours = this.number(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)));
101
- this.minutes = this.number(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)));
102
- this.seconds = this.number(Math.floor((distance % (1000 * 60)) / 1000));
103
- if (distance < 0) {
104
- this.endCountDown();
105
- }
106
- }, 1000);
107
- }
108
- renderCountDown() {
109
- return (h("ul", { class: `s-count-down-list ${this.boxed ? 's-count-down-boxed' : ''} ${this.offerEnded ? 's-count-down-ended' : ''} s-count-down-${this.size} s-count-down-${this.color}` }, h("li", { class: "s-count-down-item" }, h("div", { class: "s-count-down-item-value" }, this.seconds), this.labeled && h("div", { class: "s-count-down-item-label" }, this.secondsLabel)), h("li", { class: "s-count-down-item" }, h("div", { class: "s-count-down-item-value" }, this.minutes), this.labeled && h("div", { class: "s-count-down-item-label" }, this.minutesLabel)), h("li", { class: "s-count-down-item" }, h("div", { class: "s-count-down-item-value" }, this.hours), this.labeled && h("div", { class: "s-count-down-item-label" }, this.hoursLabel)), h("li", { class: "s-count-down-item" }, h("div", { class: "s-count-down-item-value" }, this.days), this.labeled && h("div", { class: "s-count-down-item-label" }, this.daysLabel))));
110
- }
111
- renderInvalidDate() {
112
- return h("div", { class: "s-count-down-text-center" }, this.invalidDate);
113
- }
114
- renderOfferEnded() {
115
- return h("div", { class: "s-count-down-end-text" }, !!this.endText ? this.endText : this.endLabel);
116
- }
117
- renderPreOrderToBeAvailableOn() {
118
- if (!this.normalizedPreOrder?.availability_date ||
119
- !this.isValidDate(this.normalizedPreOrder?.availability_date))
120
- return null;
121
- return (h("div", { class: "s-count-down-info-message" }, h("i", { class: "sicon-info" }), h("span", null, salla.lang.getWithDefault('pages.products.expected_to_be', 'متوقَّع توفُّره بتاريخ:')), h("span", null, new Date(this.normalizedPreOrder?.availability_date).toLocaleDateString(salla.lang.locale, {
122
- weekday: 'long',
123
- year: 'numeric',
124
- month: 'long',
125
- day: 'numeric',
126
- }))));
127
- }
128
- renderPreOrderCountDown() {
129
- if (!this.normalizedPreOrder?.activate_countdown)
130
- return null;
131
- return (h("div", { class: "s-count-down-pre-order-container" }, h("p", { class: "text-sm " }, salla.lang.getWithDefault('pages.products.pre_order_ends_in', 'ينتهي الطلب المسبق خلال:')), this.renderCountDown()));
132
- }
133
- renderPreOrder() {
134
- return (h("div", null, typeof this.normalizedPreOrder === 'object' &&
135
- this.normalizedPreOrder?.availability_date &&
136
- this.renderPreOrderToBeAvailableOn(), this.renderPreOrderCountDown()));
137
- }
138
- renderPrefixText() {
139
- if (!this.prefixText)
140
- return null;
141
- return h("span", { class: "s-count-down-prefix-text" }, this.prefixText);
142
- }
143
- renderButton() {
144
- if (!this.withButton || !this.buttonText)
145
- return null;
146
- return h("salla-button", { color: "primary", size: "medium", href: this.buttonHref }, this.buttonIcon ? h("i", { class: this.buttonIcon }) : null, h("span", null, this.buttonText));
147
- }
148
- renderContent() {
149
- if (!this.date)
150
- return null;
151
- if (!this.isValidDate(this.date)) {
152
- return this.renderInvalidDate();
153
- }
154
- if (this.preOrder) {
155
- return this.renderPreOrder();
156
- }
157
- return this.renderCountDown();
158
- }
159
- render() {
160
- return (h(Host, { key: '0cfdbb009d256be108123cabf3cb4311866bdc17', class: `s-count-down-wrapper ${this.preOrder && this.isValidDate(this.date) ? 's-count-down-pre-order' : ''} ${this.horizontal ? 's-count-down-horizontal' : ''} ${this.withButton ? 's-count-down-with-button' : ''}` }, this.renderPrefixText(), this.renderContent(), this.offerEnded && this.renderOfferEnded(), this.renderButton()));
161
- }
162
- };
163
- SallaCountDown.style = sallaCountDownCss;
164
-
165
7
  var Heart = `<!-- Generated by IcoMoon.io -->
166
8
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
167
9
  <title>heart</title>
@@ -312,4 +154,4 @@ const SallaProductCard = class {
312
154
  };
313
155
  SallaProductCard.style = sallaProductCardCss;
314
156
 
315
- export { SallaCountDown as salla_count_down, SallaProductCard as salla_product_card };
157
+ export { SallaProductCard as salla_product_card };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, a as getElement } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-BBHnyTVS.js';
5
5
 
6
6
  var PencilRuler = `<!-- Generated by IcoMoon.io -->
7
7
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BBHnyTVS.js';
5
5
  import { a as anime } from './anime.es-CgtvEd63.js';
6
6
  import { S as ShoppingBag } from './shopping-bag-DiKTtDW5.js';
7
7
  import { H as Helper } from './Helper-DFMXF2_h.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-BBHnyTVS.js';
5
5
  import { H as Helper } from './Helper-DFMXF2_h.js';
6
6
  import './anime.es-CgtvEd63.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h } from './index-BBHnyTVS.js';
5
5
 
6
6
  const sallaProgressBarCss = "";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BBHnyTVS.js';
5
5
  import { M as MailIcon } from './mail-DmgxDvXL.js';
6
6
  import { C as Cancel } from './cancel-BsLF_HK7.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-BBHnyTVS.js';
5
5
  import { W as WishListIcon } from './star-ZT7ehBBk.js';
6
6
  import { C as CheckCircle2 } from './check-circle2-BV4kqbdL.js';
7
7
  import { H as Helper } from './Helper-DFMXF2_h.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, H as Host } from './index-BBHnyTVS.js';
5
5
  import { S as Search } from './search-BscTeWDc.js';
6
6
 
7
7
  var StoreAlt = `<!-- Generated by IcoMoon.io -->
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, a as getElement } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-BBHnyTVS.js';
5
5
  import { S as Search } from './search-BscTeWDc.js';
6
6
  import { H as Helper } from './Helper-DFMXF2_h.js';
7
7
  import './anime.es-CgtvEd63.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, H as Host } from './index-BBHnyTVS.js';
5
5
 
6
6
  const sallaSkeletonCss = ":host{display:block}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BBHnyTVS.js';
5
5
  import { a as ArrowRightIcon, A as ArrowLeftIcon } from './keyboard_arrow_right-Vqpj4CWE.js';
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, a as getElement } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, a as getElement } from './index-BBHnyTVS.js';
5
5
  import { a as anime } from './anime.es-CgtvEd63.js';
6
6
  import { f as facebook, t as twitter } from './facebook-CO-PeZ27.js';
7
7
  import { M as MailIcon } from './mail-DmgxDvXL.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-BBHnyTVS.js';
5
5
  import { f as facebook, t as twitter } from './facebook-CO-PeZ27.js';
6
6
 
7
7
  var instagram = `<!-- Generated by IcoMoon.io -->
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, c as createEvent, a as getElement } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, c as createEvent, a as getElement } from './index-BBHnyTVS.js';
5
5
 
6
6
  const sallaTabContentCss = "";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-CyfZeaV2.js';
4
+ import { r as registerInstance, h, H as Host } from './index-BBHnyTVS.js';
5
5
 
6
6
  var DiscountType;
7
7
  (function (DiscountType) {