@salla.sa/twilight-components 2.14.537 → 2.14.539

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 (685) hide show
  1. package/dist/cjs/{cancel-B5SbMYEk.js → cancel-De6vslRA.js} +2 -2
  2. package/dist/cjs/{check-BnVBPQNp.js → check-x3w3-gpj.js} +2 -2
  3. package/dist/cjs/{filepond-BKilDzmk.js → filepond-CIpOpiw6.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-poster-DMIbAyAM.js → filepond-plugin-file-poster-CPV_SZrj.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-size-NaEK453w.js → filepond-plugin-file-validate-size-C_XGylG1.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-file-validate-type-C4fSQyfm.js → filepond-plugin-file-validate-type-CmVS48lk.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-edit-M4p4znH2.js → filepond-plugin-image-edit-KfqhH5F9.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-exif-orientation-BmZUQ1qY.js → filepond-plugin-image-exif-orientation-BfRIDxO-.js} +1 -1
  9. package/dist/cjs/{filepond-plugin-image-preview-DQeJbx48.js → filepond-plugin-image-preview-DlvO4sHZ.js} +1 -1
  10. package/dist/cjs/{gift-DbNivqYO.js → gift-CJ-3Yw_x.js} +2 -2
  11. package/dist/cjs/{gift-sharing-BE0uszUm.js → gift-sharing-CStz46FA.js} +2 -2
  12. package/dist/cjs/{index-B_5gLFr2.js → index-CMDyFi6Q.js} +112 -66
  13. package/dist/cjs/{intlTelInput-B5hswC8S.js → intlTelInput-BK34b4sR.js} +1 -1
  14. package/dist/cjs/{iphone-x-qC21wCLj.js → iphone-x-B683VspR.js} +2 -2
  15. package/dist/cjs/loader.cjs.js +2 -2
  16. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-accordion_6.cjs.entry.js +10 -10
  18. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +8 -8
  19. package/dist/cjs/salla-advertisement.cjs.entry.js +2 -2
  20. package/dist/cjs/salla-alert_2.cjs.entry.js +3 -3
  21. package/dist/cjs/salla-app-install-alert.cjs.entry.js +2 -2
  22. package/dist/cjs/salla-apps-icons.cjs.entry.js +2 -2
  23. package/dist/cjs/salla-badge.cjs.entry.js +2 -2
  24. package/dist/cjs/salla-basket-gap.cjs.entry.js +2 -2
  25. package/dist/cjs/salla-booking-field_7.cjs.entry.js +16 -16
  26. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +42 -39
  27. package/dist/cjs/salla-cart-coupons.cjs.entry.js +2 -2
  28. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +5 -5
  29. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +4 -1
  30. package/dist/cjs/salla-cashback-banner.cjs.entry.js +2 -2
  31. package/dist/cjs/salla-comment-factors.cjs.entry.js +2 -2
  32. package/dist/cjs/salla-comment-form_8.cjs.entry.js +15 -13
  33. package/dist/cjs/salla-conditional-offer.cjs.entry.js +2 -2
  34. package/dist/cjs/salla-contacts.cjs.entry.js +2 -2
  35. package/dist/cjs/salla-cookies-bar.cjs.entry.js +2 -2
  36. package/dist/cjs/{salla-count-down_2.cjs.entry.js → salla-count-down.cjs.entry.js} +2 -210
  37. package/dist/cjs/salla-custom-fields.cjs.entry.js +2 -2
  38. package/dist/cjs/salla-delivery-promise.cjs.entry.js +4 -1
  39. package/dist/cjs/salla-edit-order-button.cjs.entry.js +2 -2
  40. package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
  41. package/dist/cjs/salla-filters.cjs.entry.js +2 -2
  42. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +4 -1
  43. package/dist/cjs/salla-gifting.cjs.entry.js +7 -7
  44. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-installment.cjs.entry.js +2 -2
  47. package/dist/cjs/salla-list-tile.cjs.entry.js +2 -2
  48. package/dist/cjs/salla-localization-modal.cjs.entry.js +5 -2
  49. package/dist/cjs/salla-login-modal.cjs.entry.js +2 -2
  50. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +980 -0
  51. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +27 -0
  52. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +2 -2
  53. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +7 -4
  54. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-loyalty.cjs.entry.js +4 -4
  56. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +4 -4
  57. package/dist/cjs/salla-map_2.cjs.entry.js +3 -3
  58. package/dist/cjs/salla-menu.cjs.entry.js +2 -2
  59. package/dist/cjs/salla-metadata.cjs.entry.js +2 -2
  60. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +2 -2
  63. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +2 -2
  64. package/dist/cjs/salla-notification-item_2.cjs.entry.js +172 -0
  65. package/dist/cjs/salla-offer-modal.cjs.entry.js +6 -7
  66. package/dist/cjs/salla-offer.cjs.entry.js +2 -2
  67. package/dist/cjs/salla-order-branch.cjs.entry.js +2 -2
  68. package/dist/cjs/salla-order-cancel.cjs.entry.js +2 -2
  69. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-details.cjs.entry.js +2 -2
  72. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-edit.cjs.entry.js +2 -2
  75. package/dist/cjs/salla-order-options-modal_2.cjs.entry.js +367 -0
  76. package/dist/cjs/salla-order-shipments.cjs.entry.js +2 -2
  77. package/dist/cjs/salla-order-summary.cjs.entry.js +4 -4
  78. package/dist/cjs/salla-order-totals-card.cjs.entry.js +2 -2
  79. package/dist/cjs/salla-orders.cjs.entry.js +5 -3
  80. package/dist/cjs/salla-payments.cjs.entry.js +2 -2
  81. package/dist/cjs/salla-placeholder.cjs.entry.js +2 -2
  82. package/dist/cjs/salla-price-range.cjs.entry.js +2 -2
  83. package/dist/cjs/salla-product-card-embed.cjs.entry.js +2 -2
  84. package/dist/cjs/salla-product-size-guide.cjs.entry.js +2 -2
  85. package/dist/cjs/salla-products-list.cjs.entry.js +5 -3
  86. package/dist/cjs/salla-products-slider.cjs.entry.js +167 -0
  87. package/dist/cjs/salla-quick-order.cjs.entry.js +6 -6
  88. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +2 -2
  89. package/dist/cjs/salla-rating-modal.cjs.entry.js +2 -2
  90. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +2 -2
  91. package/dist/cjs/salla-scopes.cjs.entry.js +2 -2
  92. package/dist/cjs/salla-search.cjs.entry.js +2 -2
  93. package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
  94. package/dist/cjs/salla-slider.cjs.entry.js +2 -2
  95. package/dist/cjs/salla-social-share.cjs.entry.js +5 -5
  96. package/dist/cjs/salla-social.cjs.entry.js +2 -2
  97. package/dist/cjs/salla-tab-content_3.cjs.entry.js +2 -2
  98. package/dist/cjs/salla-tiered-offer.cjs.entry.js +2 -2
  99. package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
  100. package/dist/cjs/salla-trust-badges.cjs.entry.js +2 -2
  101. package/dist/cjs/salla-user-menu.cjs.entry.js +6 -6
  102. package/dist/cjs/salla-user-profile.cjs.entry.js +2 -2
  103. package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
  104. package/dist/cjs/salla-verify.cjs.entry.js +2 -2
  105. package/dist/cjs/salla-wallet.cjs.entry.js +5 -3
  106. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
  107. package/dist/cjs/{cart2-B98PSAFN.js → tag-BH5n_Nx3.js} +9 -2
  108. package/dist/cjs/twilight.cjs.js +2 -2
  109. package/dist/cjs/{vanilla-picker-DcX-oQDe.js → vanilla-picker-DYTpjTDj.js} +1 -1
  110. package/dist/collection/collection-manifest.json +20 -0
  111. package/dist/collection/components/salla-accordion/salla-accordion.css +233 -0
  112. package/dist/collection/components/salla-add-product-button/salla-add-product-button.css +248 -1
  113. package/dist/collection/components/salla-advertisement/salla-advertisement.css +53 -2
  114. package/dist/collection/components/salla-alert/salla-alert.css +57 -2
  115. package/dist/collection/components/salla-app-install-alert/salla-app-install-alert.css +123 -2
  116. package/dist/collection/components/salla-apps-icons/salla-apps-icons.css +15 -2
  117. package/dist/collection/components/salla-badge/salla-badge.css +72 -0
  118. package/dist/collection/components/salla-basket-gap/salla-basket-gap.css +282 -2
  119. package/dist/collection/components/salla-booking-field/salla-booking-field.css +108 -2
  120. package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.css +273 -2
  121. package/dist/collection/components/salla-bought-together/salla-bought-together.css +139 -2
  122. package/dist/collection/components/salla-breadcrumb/salla-breadcrumb.css +49 -2
  123. package/dist/collection/components/salla-bullet-delivery/helpers.js +14 -0
  124. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +1170 -5
  125. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +20 -19
  126. package/dist/collection/components/salla-button/salla-button.css +681 -2
  127. package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.css +344 -2
  128. package/dist/collection/components/salla-cart-item-offers/salla-cart-item-offers.css +108 -2
  129. package/dist/collection/components/salla-cart-summary/salla-cart-summary.css +43 -0
  130. package/dist/collection/components/salla-cart-summary-card/salla-cart-summary-card.css +308 -0
  131. package/dist/collection/components/salla-cart-summary-card/salla-cart-summary-card.js +10 -0
  132. package/dist/collection/components/salla-cashback-banner/salla-cashback-banner.css +39 -0
  133. package/dist/collection/components/salla-color-picker/salla-color-picker.css +48 -0
  134. package/dist/collection/components/salla-comment-form/salla-comment-form.css +94 -2
  135. package/dist/collection/components/salla-comments/salla-comments.css +626 -2
  136. package/dist/collection/components/salla-comments/salla-comments.js +2 -2
  137. package/dist/collection/components/salla-conditional-offer/salla-conditional-offer.css +293 -2
  138. package/dist/collection/components/salla-contacts/salla-contacts.css +105 -2
  139. package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.css +91 -2
  140. package/dist/collection/components/salla-count-down/salla-count-down.css +395 -2
  141. package/dist/collection/components/salla-custom-fields/salla-custom-fields.css +86 -2
  142. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.css +88 -2
  143. package/dist/collection/components/salla-delivery-promise/salla-delivery-promise.css +452 -0
  144. package/dist/collection/components/salla-delivery-promise/salla-delivery-promise.js +10 -0
  145. package/dist/collection/components/salla-drawer/salla-drawer.css +403 -0
  146. package/dist/collection/components/salla-edit-order-button/salla-edit-order-button.css +2 -2
  147. package/dist/collection/components/salla-file-upload/salla-file-upload.css +277 -2
  148. package/dist/collection/components/salla-filters/salla-filters.css +199 -2
  149. package/dist/collection/components/salla-filters-widget/salla-filters-widget.css +169 -2
  150. package/dist/collection/components/salla-fulfillment-methods/salla-fulfillment-methods.css +140 -0
  151. package/dist/collection/components/salla-fulfillment-methods/salla-fulfillment-methods.js +10 -0
  152. package/dist/collection/components/salla-gifting/salla-gifting.css +593 -2
  153. package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.css +107 -2
  154. package/dist/collection/components/salla-installment/salla-installment.css +8 -2
  155. package/dist/collection/components/salla-list-tile/salla-list-tile.css +190 -0
  156. package/dist/collection/components/salla-loading/salla-loading.css +13 -2
  157. package/dist/collection/components/salla-localization-modal/salla-localization-modal.css +170 -0
  158. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +11 -1
  159. package/dist/collection/components/salla-login-modal/salla-login-modal.css +8 -2
  160. package/dist/collection/components/salla-loyalty/salla-loyalty.css +377 -0
  161. package/dist/collection/components/salla-loyalty-points-banner/salla-loyalty-points-banner.css +36 -0
  162. package/dist/collection/components/salla-loyalty-points-history/salla-loyalty-points-history.css +365 -0
  163. package/dist/collection/components/salla-loyalty-points-history/salla-loyalty-points-history.js +11 -1
  164. package/dist/collection/components/salla-loyalty-program/salla-loyalty-program.css +1621 -2
  165. package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.css +156 -2
  166. package/dist/collection/components/salla-map/salla-map.css +88 -2
  167. package/dist/collection/components/salla-menu/salla-menu.css +175 -2
  168. package/dist/collection/components/salla-metadata/salla-metadata.css +49 -0
  169. package/dist/collection/components/salla-modal/salla-modal.css +556 -2
  170. package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.css +342 -2
  171. package/dist/collection/components/salla-next-order-coupon/salla-next-order-coupon.css +190 -2
  172. package/dist/collection/components/salla-notifications/salla-notifications.css +217 -0
  173. package/dist/collection/components/salla-notifications/salla-notifications.js +2 -2
  174. package/dist/collection/components/salla-offer/salla-offer.css +961 -2
  175. package/dist/collection/components/salla-offer-modal/salla-offer-modal.css +514 -2
  176. package/dist/collection/components/salla-order-branch/salla-order-branch.css +269 -2
  177. package/dist/collection/components/salla-order-cancel/salla-order-cancel.css +283 -2
  178. package/dist/collection/components/salla-order-details/salla-order-details.css +319 -0
  179. package/dist/collection/components/salla-order-edit/salla-order-edit.css +773 -2
  180. package/dist/collection/components/salla-order-options-modal/salla-order-options-modal.css +50 -2
  181. package/dist/collection/components/salla-order-shipments/salla-order-shipments.css +110 -2
  182. package/dist/collection/components/salla-order-summary/salla-order-summary.css +117 -2
  183. package/dist/collection/components/salla-order-totals-card/salla-order-totals-card.css +116 -2
  184. package/dist/collection/components/salla-orders/salla-orders.css +367 -2
  185. package/dist/collection/components/salla-orders/salla-orders.js +2 -2
  186. package/dist/collection/components/salla-payments/salla-payments.css +40 -2
  187. package/dist/collection/components/salla-placeholder/salla-placeholder.css +121 -0
  188. package/dist/collection/components/salla-price-range/salla-price-range.css +146 -2
  189. package/dist/collection/components/salla-product-availability/salla-product-availability.css +188 -2
  190. package/dist/collection/components/salla-product-card/salla-product-card.css +694 -2
  191. package/dist/collection/components/salla-product-card-embed/salla-product-card-embed.css +42 -2
  192. package/dist/collection/components/salla-product-options/salla-product-options.css +749 -0
  193. package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.css +105 -2
  194. package/dist/collection/components/salla-products-list/salla-products-list.css +286 -2
  195. package/dist/collection/components/salla-products-list/salla-products-list.js +2 -2
  196. package/dist/collection/components/salla-products-slider/salla-products-slider.css +48 -0
  197. package/dist/collection/components/salla-progress-bar/salla-progress-bar.css +53 -0
  198. package/dist/collection/components/salla-quantity-input/salla-quantity-input.css +47 -2
  199. package/dist/collection/components/salla-quick-buy/salla-quick-buy.css +32 -2
  200. package/dist/collection/components/salla-quick-order/salla-quick-order.css +233 -1
  201. package/dist/collection/components/salla-rating-modal/salla-rating-modal.css +540 -2
  202. package/dist/collection/components/salla-rating-stars/salla-rating-stars.css +91 -2
  203. package/dist/collection/components/salla-review-card/salla-review-card.css +213 -1
  204. package/dist/collection/components/salla-review-factors-tags/salla-review-factors-tags.css +45 -2
  205. package/dist/collection/components/salla-reviews/salla-reviews.css +378 -0
  206. package/dist/collection/components/salla-reviews-page/salla-reviews-page.css +124 -2
  207. package/dist/collection/components/salla-reviews-summary/salla-reviews-summary.css +118 -2
  208. package/dist/collection/components/salla-scopes/salla-scopes.css +299 -2
  209. package/dist/collection/components/salla-search/salla-search.css +298 -2
  210. package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.css +508 -0
  211. package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.js +14 -4
  212. package/dist/collection/components/salla-skeleton/salla-skeleton.css +31 -2
  213. package/dist/collection/components/salla-slider/salla-slider.css +749 -2
  214. package/dist/collection/components/salla-social/salla-social.css +31 -2
  215. package/dist/collection/components/salla-social-share/salla-social-share.css +56 -2
  216. package/dist/collection/components/salla-tabs/salla-tabs.css +233 -2
  217. package/dist/collection/components/salla-tel-input/salla-tel-input.css +82 -2
  218. package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.css +305 -2
  219. package/dist/collection/components/salla-tooltip/salla-tooltip.css +10 -3
  220. package/dist/collection/components/salla-trust-badges/salla-trust-badges.css +36 -0
  221. package/dist/collection/components/salla-user-menu/salla-user-menu.css +395 -0
  222. package/dist/collection/components/salla-user-profile/salla-user-profile.css +79 -2
  223. package/dist/collection/components/salla-user-settings/salla-user-settings.css +299 -2
  224. package/dist/collection/components/salla-verify/salla-verify.css +226 -2
  225. package/dist/collection/components/salla-wallet/salla-wallet.css +333 -2
  226. package/dist/collection/components/salla-wallet/salla-wallet.js +2 -2
  227. package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.css +88 -2
  228. package/dist/collection/global/app.js +60 -0
  229. package/dist/collection/global/app.ts +60 -0
  230. package/dist/collection/global/base-css.js +5 -0
  231. package/dist/collection/global/base-css.ts +2 -0
  232. package/dist/collection/plugins/build-base-css.js +43 -0
  233. package/dist/collection/plugins/css-coverage-check.js +363 -0
  234. package/dist/collection/plugins/tailwind-per-component.js +146 -0
  235. package/dist/collection/plugins/watch-utilities.js +22 -0
  236. package/dist/components/index.js +64 -2
  237. package/dist/components/salla-accordion2.js +1 -1
  238. package/dist/components/salla-add-product-button2.js +1 -1
  239. package/dist/components/salla-advertisement.js +1 -1
  240. package/dist/components/salla-alert.js +1 -1
  241. package/dist/components/salla-app-install-alert.js +1 -1
  242. package/dist/components/salla-apps-icons.js +1 -1
  243. package/dist/components/salla-badge2.js +1 -1
  244. package/dist/components/salla-basket-gap.js +1 -1
  245. package/dist/components/salla-booking-field2.js +1 -1
  246. package/dist/components/salla-bottom-alert.js +1 -1
  247. package/dist/components/salla-bought-together.js +1 -1
  248. package/dist/components/salla-breadcrumb.js +1 -1
  249. package/dist/components/salla-bullet-delivery.js +34 -34
  250. package/dist/components/salla-button2.js +1 -1
  251. package/dist/components/salla-cart-coupons.js +1 -1
  252. package/dist/components/salla-cart-item-offers.js +1 -1
  253. package/dist/components/salla-cart-summary-card.js +3 -0
  254. package/dist/components/salla-cart-summary.js +1 -1
  255. package/dist/components/salla-cashback-banner.js +1 -1
  256. package/dist/components/salla-color-picker2.js +1 -1
  257. package/dist/components/salla-comment-factors2.js +1 -1
  258. package/dist/components/salla-comment-form2.js +1 -1
  259. package/dist/components/salla-comment-item2.js +1 -1
  260. package/dist/components/salla-comments.js +4 -2
  261. package/dist/components/salla-conditional-offer.js +1 -1
  262. package/dist/components/salla-contacts.js +1 -1
  263. package/dist/components/salla-cookies-bar.js +1 -1
  264. package/dist/components/salla-count-down2.js +1 -1
  265. package/dist/components/salla-custom-fields.js +1 -1
  266. package/dist/components/salla-datetime-picker2.js +1 -1
  267. package/dist/components/salla-delivery-promise.js +3 -0
  268. package/dist/components/salla-drawer2.js +1 -1
  269. package/dist/components/salla-edit-order-button.js +1 -1
  270. package/dist/components/salla-file-upload2.js +1 -1
  271. package/dist/components/salla-filters-widget2.js +1 -1
  272. package/dist/components/salla-filters.js +1 -1
  273. package/dist/components/salla-fulfillment-methods.js +3 -0
  274. package/dist/components/salla-gifting.js +1 -1
  275. package/dist/components/salla-infinite-scroll.js +1 -1
  276. package/dist/components/salla-installment.js +1 -1
  277. package/dist/components/salla-list-tile2.js +1 -1
  278. package/dist/components/salla-loading2.js +1 -1
  279. package/dist/components/salla-localization-modal.js +4 -1
  280. package/dist/components/salla-login-modal2.js +1 -1
  281. package/dist/components/salla-loyalty-banner.js +1 -1
  282. package/dist/components/salla-loyalty-exchange-product-card2.js +1 -1
  283. package/dist/components/salla-loyalty-hero2.js +1 -1
  284. package/dist/components/salla-loyalty-panel.js +1 -1
  285. package/dist/components/salla-loyalty-point2.js +1 -1
  286. package/dist/components/salla-loyalty-points-banner.js +1 -1
  287. package/dist/components/salla-loyalty-points-history.js +4 -1
  288. package/dist/components/salla-loyalty-program.js +1 -1
  289. package/dist/components/salla-loyalty-reward.js +1 -1
  290. package/dist/components/salla-loyalty.js +1 -1
  291. package/dist/components/salla-maintenance-alert.js +1 -1
  292. package/dist/components/salla-map2.js +1 -1
  293. package/dist/components/salla-menu.js +1 -1
  294. package/dist/components/salla-metadata.js +1 -1
  295. package/dist/components/salla-modal2.js +1 -1
  296. package/dist/components/salla-multiple-bundle-product.js +1 -1
  297. package/dist/components/salla-next-order-coupon.js +1 -1
  298. package/dist/components/salla-notification-item2.js +1 -1
  299. package/dist/components/salla-notifications.js +4 -2
  300. package/dist/components/salla-offer-modal.js +1 -1
  301. package/dist/components/salla-offer.js +1 -1
  302. package/dist/components/salla-order-branch.js +1 -1
  303. package/dist/components/salla-order-cancel.js +1 -1
  304. package/dist/components/salla-order-details.js +1 -1
  305. package/dist/components/salla-order-edit.js +1 -1
  306. package/dist/components/salla-order-options-modal2.js +1 -1
  307. package/dist/components/salla-order-shipments.js +1 -1
  308. package/dist/components/salla-order-summary.js +1 -1
  309. package/dist/components/salla-order-totals-card.js +1 -1
  310. package/dist/components/salla-orders.js +4 -2
  311. package/dist/components/salla-payments.js +1 -1
  312. package/dist/components/salla-placeholder2.js +1 -1
  313. package/dist/components/salla-price-range2.js +1 -1
  314. package/dist/components/salla-product-availability2.js +1 -1
  315. package/dist/components/salla-product-card-embed.js +1 -1
  316. package/dist/components/salla-product-card2.js +1 -1
  317. package/dist/components/salla-product-options2.js +1 -1
  318. package/dist/components/salla-product-size-guide.js +1 -1
  319. package/dist/components/salla-products-list2.js +4 -2
  320. package/dist/components/salla-products-slider2.js +1 -1
  321. package/dist/components/salla-progress-bar2.js +1 -1
  322. package/dist/components/salla-quantity-input2.js +1 -1
  323. package/dist/components/salla-quick-buy2.js +1 -1
  324. package/dist/components/salla-quick-order.js +1 -1
  325. package/dist/components/salla-rating-modal-v22.js +1 -1
  326. package/dist/components/salla-rating-modal.js +1 -1
  327. package/dist/components/salla-rating-stars2.js +1 -1
  328. package/dist/components/salla-review-card2.js +1 -1
  329. package/dist/components/salla-review-factors-tags2.js +1 -1
  330. package/dist/components/salla-reviews-page.js +1 -1
  331. package/dist/components/salla-reviews-summary2.js +1 -1
  332. package/dist/components/salla-reviews.js +1 -1
  333. package/dist/components/salla-reward-action2.js +1 -1
  334. package/dist/components/salla-reward-card2.js +1 -1
  335. package/dist/components/salla-reward-details2.js +1 -1
  336. package/dist/components/salla-reward-exchange2.js +1 -1
  337. package/dist/components/salla-scopes.js +1 -1
  338. package/dist/components/salla-search.js +1 -1
  339. package/dist/components/salla-searchable-dropdown2.js +7 -4
  340. package/dist/components/salla-skeleton2.js +1 -1
  341. package/dist/components/salla-slider2.js +1 -1
  342. package/dist/components/salla-social-share2.js +1 -1
  343. package/dist/components/salla-social.js +1 -1
  344. package/dist/components/salla-tabs2.js +1 -1
  345. package/dist/components/salla-tel-input2.js +1 -1
  346. package/dist/components/salla-tiered-offer.js +1 -1
  347. package/dist/components/salla-tooltip2.js +1 -1
  348. package/dist/components/salla-trust-badges.js +1 -1
  349. package/dist/components/salla-user-menu.js +1 -1
  350. package/dist/components/salla-user-profile.js +1 -1
  351. package/dist/components/salla-user-settings.js +1 -1
  352. package/dist/components/salla-verify.js +1 -1
  353. package/dist/components/salla-wallet.js +4 -2
  354. package/dist/components/salla-wishlist-actions.js +1 -1
  355. package/dist/esm/{cancel-8Tsmrwno.js → cancel-BsLF_HK7.js} +2 -2
  356. package/dist/esm/{check-BZp0rKEO.js → check-BsXh13x8.js} +2 -2
  357. package/dist/esm/{filepond-Co-IypIA.js → filepond-DMUE9Fyj.js} +1 -1
  358. package/dist/esm/{filepond-plugin-file-poster-CoRXw3k-.js → filepond-plugin-file-poster-DBZQTm7s.js} +1 -1
  359. package/dist/esm/{filepond-plugin-file-validate-size-CGJ0QOyy.js → filepond-plugin-file-validate-size-CrKxdsNW.js} +1 -1
  360. package/dist/esm/{filepond-plugin-file-validate-type-DDAxGYz8.js → filepond-plugin-file-validate-type-DvEJrucY.js} +1 -1
  361. package/dist/esm/{filepond-plugin-image-edit-BTbI51S8.js → filepond-plugin-image-edit-C6ptCg9o.js} +1 -1
  362. package/dist/esm/{filepond-plugin-image-exif-orientation-C0VSH5eq.js → filepond-plugin-image-exif-orientation-IcgeTieF.js} +1 -1
  363. package/dist/esm/{filepond-plugin-image-preview-DZbIdviE.js → filepond-plugin-image-preview-CDMh74os.js} +1 -1
  364. package/dist/esm/{gift-CXRKXFgT.js → gift-BChI23pG.js} +2 -2
  365. package/dist/esm/{gift-sharing-0-eTJXSD.js → gift-sharing-DxkgAGoT.js} +2 -2
  366. package/dist/esm/{index-BICKbbaT.js → index-CjQzkU95.js} +112 -66
  367. package/dist/esm/{intlTelInput-CcU6kFYO.js → intlTelInput-Dsx2z7pR.js} +1 -1
  368. package/dist/esm/{iphone-x-CciN5Q_x.js → iphone-x-Z7udRKSZ.js} +2 -2
  369. package/dist/esm/loader.js +3 -3
  370. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  371. package/dist/esm/salla-accordion_6.entry.js +10 -10
  372. package/dist/esm/salla-add-product-button_5.entry.js +8 -8
  373. package/dist/esm/salla-advertisement.entry.js +2 -2
  374. package/dist/esm/salla-alert_2.entry.js +3 -3
  375. package/dist/esm/salla-app-install-alert.entry.js +2 -2
  376. package/dist/esm/salla-apps-icons.entry.js +2 -2
  377. package/dist/esm/salla-badge.entry.js +2 -2
  378. package/dist/esm/salla-basket-gap.entry.js +2 -2
  379. package/dist/esm/salla-booking-field_7.entry.js +16 -16
  380. package/dist/esm/salla-bullet-delivery_2.entry.js +42 -39
  381. package/dist/esm/salla-cart-coupons.entry.js +2 -2
  382. package/dist/esm/salla-cart-item-offers_2.entry.js +5 -5
  383. package/dist/esm/salla-cart-summary-card.entry.js +4 -1
  384. package/dist/esm/salla-cashback-banner.entry.js +2 -2
  385. package/dist/esm/salla-comment-factors.entry.js +2 -2
  386. package/dist/esm/salla-comment-form_8.entry.js +15 -13
  387. package/dist/esm/salla-conditional-offer.entry.js +2 -2
  388. package/dist/esm/salla-contacts.entry.js +2 -2
  389. package/dist/esm/salla-cookies-bar.entry.js +2 -2
  390. package/dist/esm/{salla-count-down_2.entry.js → salla-count-down.entry.js} +3 -210
  391. package/dist/esm/salla-custom-fields.entry.js +2 -2
  392. package/dist/esm/salla-delivery-promise.entry.js +4 -1
  393. package/dist/esm/salla-edit-order-button.entry.js +2 -2
  394. package/dist/esm/salla-filters-widget.entry.js +2 -2
  395. package/dist/esm/salla-filters.entry.js +2 -2
  396. package/dist/esm/salla-fulfillment-methods.entry.js +4 -1
  397. package/dist/esm/salla-gifting.entry.js +7 -7
  398. package/dist/esm/salla-hook.entry.js +1 -1
  399. package/dist/esm/salla-infinite-scroll.entry.js +2 -2
  400. package/dist/esm/salla-installment.entry.js +2 -2
  401. package/dist/esm/salla-list-tile.entry.js +2 -2
  402. package/dist/esm/salla-localization-modal.entry.js +5 -2
  403. package/dist/esm/salla-login-modal.entry.js +2 -2
  404. package/dist/esm/salla-loyalty-banner_10.entry.js +969 -0
  405. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +25 -0
  406. package/dist/esm/salla-loyalty-points-banner.entry.js +2 -2
  407. package/dist/esm/salla-loyalty-points-history.entry.js +7 -4
  408. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  409. package/dist/esm/salla-loyalty.entry.js +4 -4
  410. package/dist/esm/salla-maintenance-alert.entry.js +4 -4
  411. package/dist/esm/salla-map_2.entry.js +3 -3
  412. package/dist/esm/salla-menu.entry.js +2 -2
  413. package/dist/esm/salla-metadata.entry.js +2 -2
  414. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  415. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  416. package/dist/esm/salla-multiple-bundle-product.entry.js +2 -2
  417. package/dist/esm/salla-next-order-coupon.entry.js +2 -2
  418. package/dist/esm/salla-notification-item_2.entry.js +169 -0
  419. package/dist/esm/salla-offer-modal.entry.js +6 -7
  420. package/dist/esm/salla-offer.entry.js +2 -2
  421. package/dist/esm/salla-order-branch.entry.js +2 -2
  422. package/dist/esm/salla-order-cancel.entry.js +2 -2
  423. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  424. package/dist/esm/salla-order-details-options.entry.js +1 -1
  425. package/dist/esm/salla-order-details.entry.js +2 -2
  426. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  427. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  428. package/dist/esm/salla-order-edit.entry.js +2 -2
  429. package/dist/esm/salla-order-options-modal_2.entry.js +364 -0
  430. package/dist/esm/salla-order-shipments.entry.js +2 -2
  431. package/dist/esm/salla-order-summary.entry.js +4 -4
  432. package/dist/esm/salla-order-totals-card.entry.js +2 -2
  433. package/dist/esm/salla-orders.entry.js +5 -3
  434. package/dist/esm/salla-payments.entry.js +2 -2
  435. package/dist/esm/salla-placeholder.entry.js +2 -2
  436. package/dist/esm/salla-price-range.entry.js +2 -2
  437. package/dist/esm/salla-product-card-embed.entry.js +2 -2
  438. package/dist/esm/salla-product-size-guide.entry.js +2 -2
  439. package/dist/esm/salla-products-list.entry.js +5 -3
  440. package/dist/esm/salla-products-slider.entry.js +165 -0
  441. package/dist/esm/salla-quick-order.entry.js +6 -6
  442. package/dist/esm/salla-rating-modal-v2.entry.js +2 -2
  443. package/dist/esm/salla-rating-modal.entry.js +2 -2
  444. package/dist/esm/salla-review-factors-tags.entry.js +2 -2
  445. package/dist/esm/salla-scopes.entry.js +2 -2
  446. package/dist/esm/salla-search.entry.js +2 -2
  447. package/dist/esm/salla-skeleton.entry.js +2 -2
  448. package/dist/esm/salla-slider.entry.js +2 -2
  449. package/dist/esm/salla-social-share.entry.js +5 -5
  450. package/dist/esm/salla-social.entry.js +2 -2
  451. package/dist/esm/salla-tab-content_3.entry.js +2 -2
  452. package/dist/esm/salla-tiered-offer.entry.js +2 -2
  453. package/dist/esm/salla-tooltip.entry.js +2 -2
  454. package/dist/esm/salla-trust-badges.entry.js +2 -2
  455. package/dist/esm/salla-user-menu.entry.js +6 -6
  456. package/dist/esm/salla-user-profile.entry.js +2 -2
  457. package/dist/esm/salla-user-settings.entry.js +2 -2
  458. package/dist/esm/salla-verify.entry.js +2 -2
  459. package/dist/esm/salla-wallet.entry.js +5 -3
  460. package/dist/esm/salla-wishlist-actions.entry.js +2 -2
  461. package/dist/esm/{cart2-D1s2kXqL.js → tag-DRvZV5oe.js} +8 -2
  462. package/dist/esm/twilight.js +3 -3
  463. package/dist/esm/{vanilla-picker-ZYaCOUKK.js → vanilla-picker-oYjMgYry.js} +1 -1
  464. package/dist/twilight/global/app.ts +60 -0
  465. package/dist/twilight/global/base-css.ts +2 -0
  466. package/dist/twilight/p-0a1271e1.entry.js +4 -0
  467. package/dist/twilight/p-1151ebd7.entry.js +4 -0
  468. package/dist/twilight/p-116e7555.entry.js +4 -0
  469. package/dist/twilight/{p-a5d54ce0.entry.js → p-1470e96a.entry.js} +1 -1
  470. package/dist/twilight/p-14c72ffd.entry.js +4 -0
  471. package/dist/twilight/p-152c657e.entry.js +4 -0
  472. package/dist/twilight/p-1754903f.entry.js +4 -0
  473. package/dist/twilight/{p-e24e104a.entry.js → p-187a502c.entry.js} +1 -1
  474. package/dist/twilight/p-1c31cec0.entry.js +4 -0
  475. package/dist/twilight/p-1c369bcf.entry.js +4 -0
  476. package/dist/twilight/{p-eb1bdbee.entry.js → p-1d2804ac.entry.js} +1 -1
  477. package/dist/twilight/p-1dd1fef0.entry.js +4 -0
  478. package/dist/twilight/p-1fb46b43.entry.js +4 -0
  479. package/dist/twilight/p-236f371d.entry.js +4 -0
  480. package/dist/twilight/{p-54f5ab92.entry.js → p-250d7ab2.entry.js} +1 -1
  481. package/dist/twilight/{p-45199451.entry.js → p-27a0a4cc.entry.js} +1 -1
  482. package/dist/twilight/p-298ff716.entry.js +4 -0
  483. package/dist/twilight/p-2babb4bd.entry.js +4 -0
  484. package/dist/twilight/p-2c6c0844.entry.js +4 -0
  485. package/dist/twilight/p-2e112687.entry.js +4 -0
  486. package/dist/twilight/p-2e43ddf0.entry.js +4 -0
  487. package/dist/twilight/p-3052178c.entry.js +4 -0
  488. package/dist/twilight/p-31c36417.entry.js +4 -0
  489. package/dist/twilight/p-331679d8.entry.js +4 -0
  490. package/dist/twilight/p-37413a02.entry.js +4 -0
  491. package/dist/twilight/{p-036f67e4.entry.js → p-3b6b3c54.entry.js} +1 -1
  492. package/dist/twilight/p-3bc64439.entry.js +4 -0
  493. package/dist/twilight/p-3bdba697.entry.js +4 -0
  494. package/dist/twilight/{p-3ff03500.entry.js → p-3c22551b.entry.js} +1 -1
  495. package/dist/twilight/p-3f26f1c5.entry.js +4 -0
  496. package/dist/twilight/p-40217fcc.entry.js +4 -0
  497. package/dist/twilight/p-4058b619.entry.js +4 -0
  498. package/dist/twilight/{p-b4a173be.entry.js → p-437fe6f1.entry.js} +1 -1
  499. package/dist/twilight/{p-15f20a28.entry.js → p-44cfb2c2.entry.js} +1 -1
  500. package/dist/twilight/p-4868c03c.entry.js +4 -0
  501. package/dist/twilight/p-48db7b95.entry.js +4 -0
  502. package/dist/twilight/p-49e6fe86.entry.js +4 -0
  503. package/dist/twilight/p-51a860bc.entry.js +4 -0
  504. package/dist/twilight/p-54d0db9a.entry.js +4 -0
  505. package/dist/twilight/p-58184ae2.entry.js +4 -0
  506. package/dist/twilight/p-5b03dca8.entry.js +4 -0
  507. package/dist/twilight/{p-149e1143.entry.js → p-5bbf829e.entry.js} +1 -1
  508. package/dist/twilight/{p-b10e56fd.entry.js → p-5d01f25c.entry.js} +1 -1
  509. package/dist/twilight/p-5e9fb02d.entry.js +4 -0
  510. package/dist/twilight/p-664f0936.entry.js +4 -0
  511. package/dist/twilight/{p-e8d773b2.entry.js → p-665bca88.entry.js} +1 -1
  512. package/dist/twilight/p-67e88dc4.entry.js +4 -0
  513. package/dist/twilight/p-68c8772a.entry.js +4 -0
  514. package/dist/twilight/p-699bea26.entry.js +4 -0
  515. package/dist/twilight/p-6ed4c9bb.entry.js +4 -0
  516. package/dist/twilight/p-7c74dc6e.entry.js +4 -0
  517. package/dist/twilight/{p-3c52b097.entry.js → p-7f73ff43.entry.js} +1 -1
  518. package/dist/twilight/{p-c1caae26.entry.js → p-80ff5572.entry.js} +1 -1
  519. package/dist/twilight/{p-b8980a7c.entry.js → p-8230c543.entry.js} +38 -38
  520. package/dist/twilight/p-82c12191.entry.js +4 -0
  521. package/dist/twilight/p-84f35767.entry.js +4 -0
  522. package/dist/twilight/{p-56f180b1.entry.js → p-8ae7bf96.entry.js} +1 -1
  523. package/dist/twilight/p-8bce41c8.entry.js +4 -0
  524. package/dist/twilight/{p-3be661be.entry.js → p-8ef3693b.entry.js} +1 -1
  525. package/dist/twilight/p-8fa84b87.entry.js +4 -0
  526. package/dist/twilight/p-91b4a1a0.entry.js +4 -0
  527. package/dist/twilight/{p-710a3ce8.entry.js → p-997c4966.entry.js} +1 -1
  528. package/dist/twilight/p-9b6db6a7.entry.js +4 -0
  529. package/dist/twilight/p-9c7fcbb0.entry.js +4 -0
  530. package/dist/twilight/p-9fa351ab.entry.js +4 -0
  531. package/dist/twilight/{p-DwA0FvNE.js → p-B9VKgTTF.js} +1 -1
  532. package/dist/twilight/{p-CXRKXFgT.js → p-BChI23pG.js} +1 -1
  533. package/dist/twilight/{p-gy7RAvBD.js → p-BiyhYWus.js} +1 -1
  534. package/dist/twilight/{p-8Tsmrwno.js → p-BsLF_HK7.js} +1 -1
  535. package/dist/twilight/{p-BZp0rKEO.js → p-BsXh13x8.js} +1 -1
  536. package/dist/twilight/{p-BqKKpKiZ.js → p-BtymczNp.js} +1 -1
  537. package/dist/twilight/{p-BBYplmag.js → p-C1wu6qA1.js} +1 -1
  538. package/dist/twilight/{p-BMmR9fBv.js → p-C6w35AiQ.js} +1 -1
  539. package/dist/twilight/{p-CnydhXLD.js → p-CGDRqU6i.js} +1 -1
  540. package/dist/twilight/{p-BICKbbaT.js → p-CjQzkU95.js} +2 -2
  541. package/dist/twilight/{p-DGAX-mOJ.js → p-CmQyEOxJ.js} +2 -2
  542. package/dist/twilight/{p-Dbba1-no.js → p-D2uiOzVz.js} +1 -1
  543. package/dist/twilight/{p-D1s2kXqL.js → p-DRvZV5oe.js} +1 -1
  544. package/dist/twilight/{p-CH2gmG7u.js → p-DfJdKB52.js} +1 -1
  545. package/dist/twilight/{p-0-eTJXSD.js → p-DxkgAGoT.js} +1 -1
  546. package/dist/twilight/{p-CciN5Q_x.js → p-Z7udRKSZ.js} +1 -1
  547. package/dist/twilight/p-a1494e64.entry.js +4 -0
  548. package/dist/twilight/p-a3f00389.entry.js +4 -0
  549. package/dist/twilight/p-a669483e.entry.js +4 -0
  550. package/dist/twilight/p-a802826b.entry.js +4 -0
  551. package/dist/twilight/p-ae536a61.entry.js +4 -0
  552. package/dist/twilight/p-aeb76c46.entry.js +4 -0
  553. package/dist/twilight/p-b0e86201.entry.js +4 -0
  554. package/dist/twilight/p-b1812d5c.entry.js +4 -0
  555. package/dist/twilight/p-b193c991.entry.js +4 -0
  556. package/dist/twilight/p-b3fe5e44.entry.js +4 -0
  557. package/dist/twilight/p-b69e98a8.entry.js +4 -0
  558. package/dist/twilight/{p-2ac47b6b.entry.js → p-bbe79568.entry.js} +1 -1
  559. package/dist/twilight/{p-99b6543b.entry.js → p-bf183f3a.entry.js} +1 -1
  560. package/dist/twilight/p-c254b6fa.entry.js +4 -0
  561. package/dist/twilight/{p-064d4340.entry.js → p-cb179aba.entry.js} +1 -1
  562. package/dist/twilight/{p-8ea78b6a.entry.js → p-cc2b960c.entry.js} +1 -1
  563. package/dist/twilight/p-db02986a.entry.js +4 -0
  564. package/dist/twilight/{p-5d14a4ee.entry.js → p-dd5800dd.entry.js} +1 -1
  565. package/dist/twilight/p-e020f1c3.entry.js +4 -0
  566. package/dist/twilight/p-e701a3dc.entry.js +4 -0
  567. package/dist/twilight/p-f1eebeda.entry.js +4 -0
  568. package/dist/twilight/p-f4bdf19e.entry.js +4 -0
  569. package/dist/twilight/p-f7298462.entry.js +4 -0
  570. package/dist/twilight/{p-24cb77eb.entry.js → p-fa28a89f.entry.js} +1 -1
  571. package/dist/twilight/p-faaf4423.entry.js +4 -0
  572. package/dist/twilight/p-fe7990b7.entry.js +4 -0
  573. package/dist/twilight/twilight.esm.js +1 -1
  574. package/dist/types/components/salla-bullet-delivery/helpers.d.ts +9 -0
  575. package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +1 -0
  576. package/dist/types/components/salla-loyalty-program/interfaces.d.ts +1 -1
  577. package/dist/types/global/base-css.d.ts +1 -0
  578. package/package.json +8 -7
  579. package/dist/cjs/functions-BbsKJYTv.js +0 -102
  580. package/dist/cjs/percentage-Fs83gq6Q.js +0 -21
  581. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +0 -67
  582. package/dist/cjs/salla-loyalty-exchange-product-card_5.cjs.entry.js +0 -305
  583. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +0 -255
  584. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +0 -104
  585. package/dist/cjs/salla-loyalty-program.cjs.entry.js +0 -134
  586. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +0 -54
  587. package/dist/cjs/salla-notification-item.cjs.entry.js +0 -20
  588. package/dist/cjs/salla-notifications.cjs.entry.js +0 -157
  589. package/dist/cjs/salla-product-card_2.cjs.entry.js +0 -319
  590. package/dist/cjs/shipping-CPYcgyCL.js +0 -13
  591. package/dist/cjs/tag-D-PcUR33.js +0 -12
  592. package/dist/cjs/tracked-promise-FYMkib0n.js +0 -31
  593. package/dist/cjs/user-add-BCGrddZS.js +0 -13
  594. package/dist/esm/functions-DBwN_PnC.js +0 -95
  595. package/dist/esm/percentage-Bs6JxDkg.js +0 -18
  596. package/dist/esm/salla-loyalty-banner.entry.js +0 -65
  597. package/dist/esm/salla-loyalty-exchange-product-card_5.entry.js +0 -299
  598. package/dist/esm/salla-loyalty-hero_2.entry.js +0 -252
  599. package/dist/esm/salla-loyalty-panel.entry.js +0 -102
  600. package/dist/esm/salla-loyalty-program.entry.js +0 -132
  601. package/dist/esm/salla-loyalty-reward.entry.js +0 -52
  602. package/dist/esm/salla-notification-item.entry.js +0 -18
  603. package/dist/esm/salla-notifications.entry.js +0 -155
  604. package/dist/esm/salla-product-card_2.entry.js +0 -316
  605. package/dist/esm/shipping-CZRcMGA9.js +0 -11
  606. package/dist/esm/tag-cgSL_BIo.js +0 -10
  607. package/dist/esm/tracked-promise-BGUdJ_Y7.js +0 -29
  608. package/dist/esm/user-add-QpH8MU22.js +0 -11
  609. package/dist/twilight/p-035e0ede.entry.js +0 -4
  610. package/dist/twilight/p-0a34505a.entry.js +0 -4
  611. package/dist/twilight/p-123ea3ce.entry.js +0 -4
  612. package/dist/twilight/p-169db5a8.entry.js +0 -4
  613. package/dist/twilight/p-182271b9.entry.js +0 -4
  614. package/dist/twilight/p-1d6e569d.entry.js +0 -4
  615. package/dist/twilight/p-21eef21b.entry.js +0 -4
  616. package/dist/twilight/p-22da89fa.entry.js +0 -4
  617. package/dist/twilight/p-23e937b6.entry.js +0 -4
  618. package/dist/twilight/p-2b07007d.entry.js +0 -4
  619. package/dist/twilight/p-2bf03b63.entry.js +0 -4
  620. package/dist/twilight/p-2c78a0ef.entry.js +0 -4
  621. package/dist/twilight/p-30660cd8.entry.js +0 -4
  622. package/dist/twilight/p-34ed76ac.entry.js +0 -4
  623. package/dist/twilight/p-3eb13818.entry.js +0 -4
  624. package/dist/twilight/p-3ff42b07.entry.js +0 -4
  625. package/dist/twilight/p-44a81e6e.entry.js +0 -4
  626. package/dist/twilight/p-44b0d992.entry.js +0 -4
  627. package/dist/twilight/p-45982933.entry.js +0 -4
  628. package/dist/twilight/p-45b975c2.entry.js +0 -4
  629. package/dist/twilight/p-492415ef.entry.js +0 -4
  630. package/dist/twilight/p-4c9e1e69.entry.js +0 -4
  631. package/dist/twilight/p-4f75de82.entry.js +0 -4
  632. package/dist/twilight/p-4ffb3087.entry.js +0 -4
  633. package/dist/twilight/p-598c5098.entry.js +0 -4
  634. package/dist/twilight/p-5c333767.entry.js +0 -4
  635. package/dist/twilight/p-5c452062.entry.js +0 -4
  636. package/dist/twilight/p-60901520.entry.js +0 -4
  637. package/dist/twilight/p-649e1e03.entry.js +0 -4
  638. package/dist/twilight/p-670e6462.entry.js +0 -4
  639. package/dist/twilight/p-6a814b15.entry.js +0 -4
  640. package/dist/twilight/p-6def828f.entry.js +0 -4
  641. package/dist/twilight/p-70e3120c.entry.js +0 -4
  642. package/dist/twilight/p-74d7660d.entry.js +0 -4
  643. package/dist/twilight/p-7518b9d3.entry.js +0 -4
  644. package/dist/twilight/p-8638175a.entry.js +0 -4
  645. package/dist/twilight/p-8ea18b13.entry.js +0 -4
  646. package/dist/twilight/p-95ef5ed3.entry.js +0 -4
  647. package/dist/twilight/p-9c98fca1.entry.js +0 -4
  648. package/dist/twilight/p-9ee5b0f7.entry.js +0 -4
  649. package/dist/twilight/p-BgfpunEY.js +0 -4
  650. package/dist/twilight/p-Bs6JxDkg.js +0 -4
  651. package/dist/twilight/p-CZRcMGA9.js +0 -4
  652. package/dist/twilight/p-QpH8MU22.js +0 -4
  653. package/dist/twilight/p-a0a248bd.entry.js +0 -4
  654. package/dist/twilight/p-a0cf8839.entry.js +0 -4
  655. package/dist/twilight/p-a665082c.entry.js +0 -4
  656. package/dist/twilight/p-abe7ac70.entry.js +0 -4
  657. package/dist/twilight/p-ad38c3e0.entry.js +0 -4
  658. package/dist/twilight/p-adf1ebf6.entry.js +0 -4
  659. package/dist/twilight/p-aec408ec.entry.js +0 -4
  660. package/dist/twilight/p-afa12e38.entry.js +0 -4
  661. package/dist/twilight/p-b17da4d5.entry.js +0 -4
  662. package/dist/twilight/p-b5ca8b9f.entry.js +0 -4
  663. package/dist/twilight/p-b5cc3e95.entry.js +0 -4
  664. package/dist/twilight/p-b725b869.entry.js +0 -4
  665. package/dist/twilight/p-bba004e0.entry.js +0 -4
  666. package/dist/twilight/p-bcef7f80.entry.js +0 -4
  667. package/dist/twilight/p-bdc23bcf.entry.js +0 -4
  668. package/dist/twilight/p-bfdb98db.entry.js +0 -4
  669. package/dist/twilight/p-c139be2a.entry.js +0 -4
  670. package/dist/twilight/p-c47486be.entry.js +0 -4
  671. package/dist/twilight/p-c861e9f8.entry.js +0 -4
  672. package/dist/twilight/p-cc6eb9fd.entry.js +0 -4
  673. package/dist/twilight/p-cdb0d7fb.entry.js +0 -4
  674. package/dist/twilight/p-cdc3ac03.entry.js +0 -4
  675. package/dist/twilight/p-cgSL_BIo.js +0 -4
  676. package/dist/twilight/p-d6941dc6.entry.js +0 -4
  677. package/dist/twilight/p-dd6ec724.entry.js +0 -4
  678. package/dist/twilight/p-ddabd5f2.entry.js +0 -4
  679. package/dist/twilight/p-e7a1f0c1.entry.js +0 -4
  680. package/dist/twilight/p-eafff38c.entry.js +0 -4
  681. package/dist/twilight/p-efccc05e.entry.js +0 -4
  682. package/dist/twilight/p-faec58b8.entry.js +0 -4
  683. package/dist/twilight/p-fdbe9913.entry.js +0 -4
  684. package/dist/twilight/p-fde5aae7.entry.js +0 -4
  685. package/dist/twilight/p-g9J0grSR.js +0 -4
@@ -1,155 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import { r as registerInstance, h, a as getElement } from './index-BICKbbaT.js';
5
- import { H as Helper } from './Helper-CBmYxrzX.js';
6
- import './anime.es-CgtvEd63.js';
7
-
8
- const sallaNotificationsCss = "";
9
-
10
- const SallaNotifications = class {
11
- constructor(hostRef) {
12
- registerInstance(this, hostRef);
13
- /**
14
- * Number of notifications to load per request.
15
- */
16
- this.itemPerPage = 10;
17
- this.no_notifications_trans = salla.lang.get('blocks.header.no_notifications');
18
- this.load_more_text_trans = salla.lang.get('common.elements.load_more');
19
- salla.lang.onLoaded(() => {
20
- this.no_notifications_trans = salla.lang.get('blocks.header.no_notifications');
21
- this.load_more_text_trans = salla.lang.get('common.elements.load_more');
22
- });
23
- }
24
- // Show/hide loading
25
- loading(isLoading = true) {
26
- let btnText = this.status?.querySelector('.s-button-text');
27
- if (btnText) {
28
- Helper.toggleElementClassIf(btnText, 's-button-hide', 's-button-show', () => isLoading);
29
- this.btnLoader.style.display = isLoading ? 'inherit' : 'none';
30
- }
31
- }
32
- getNotificationCard(notification) {
33
- const notificationItem = document.createElement('salla-notification-item');
34
- notificationItem.notification = notification;
35
- notificationItem.classList.add('s-block');
36
- return notificationItem;
37
- }
38
- render() {
39
- if (this.showPlaceholder) {
40
- return h("div", { class: "s-notifications-no-content" }, h("salla-placeholder", { alignment: 'center' }, h("span", { slot: 'title' }, this.no_notifications_trans)));
41
- }
42
- return h("div", { class: "s-notifications-wrapper" }, h("div", { class: "s-notifications-container", ref: wrapper => this.wrapper = wrapper }), this.nextPage && (h("div", { class: "s-infinite-scroll-wrapper", ref: status => this.status = status }, h("button", { onClick: () => this.loadMore(), class: "s-infinite-scroll-btn s-button-btn s-button-primary" }, h("span", { class: "s-button-text s-infinite-scroll-btn-text" }, this.loadMoreText ?? this.load_more_text_trans), h("span", { class: "s-button-loader s-button-loader-center s-infinite-scroll-btn-loader", ref: btnLoader => this.btnLoader = btnLoader, style: { "display": "none" } })))));
43
- }
44
- /**
45
- * Detect whether the response uses the new API format (v2) by checking for `cursor` key.
46
- */
47
- isV2Response(resp) {
48
- return !!resp.cursor;
49
- }
50
- /**
51
- * Map a single v2 notification to the legacy Notification interface.
52
- */
53
- normalizeNotification(item) {
54
- return {
55
- title: item.title,
56
- sub_title: item.body,
57
- date: item.time_ago,
58
- is_new: !item.is_read,
59
- url: item.url,
60
- };
61
- }
62
- /**
63
- * Normalize a v2 cursor pagination to the legacy Pagination format.
64
- */
65
- normalizePagination(cursor) {
66
- return {
67
- count: cursor.count,
68
- currentPage: cursor.current,
69
- links: {
70
- next: cursor.next != null ? String(cursor.next) : undefined,
71
- },
72
- };
73
- }
74
- /**
75
- * Middleware that normalizes any API response to the legacy shape.
76
- * If the response is already in legacy format, it passes through unchanged.
77
- */
78
- normalizeResponse(resp) {
79
- if (this.isV2Response(resp)) {
80
- return {
81
- data: (resp.data || []).map((item) => this.normalizeNotification(item)),
82
- pagination: this.normalizePagination(resp.cursor),
83
- };
84
- }
85
- return resp;
86
- }
87
- handleResponse(notificationsList) {
88
- return notificationsList.map(notification => this.getNotificationCard(notification));
89
- }
90
- initiateInfiniteScroll() {
91
- if (!this.wrapper) {
92
- salla.logger.error('Wrapper is undefined. Cannot initiate infinite scroll.');
93
- return;
94
- }
95
- this.infiniteScroll = salla.infiniteScroll.initiate(this.wrapper, this.wrapper, {
96
- path: () => this.nextPage,
97
- history: true,
98
- nextPage: this.nextPage,
99
- scrollThreshold: false,
100
- }, true);
101
- this.infiniteScroll?.on('request', _response => {
102
- this.loading();
103
- });
104
- this.infiniteScroll?.on('load', rawResponse => {
105
- this.loading(false);
106
- const response = this.normalizeResponse(rawResponse);
107
- this.pagination = response.pagination;
108
- this.nextPage = response.pagination.links?.next || null;
109
- this.handleResponse(response.data).forEach(data => this.wrapper.append(data));
110
- let items = this.host.querySelectorAll('salla-notification-item:not(.animated)');
111
- Helper.animateItems(items);
112
- });
113
- this.infiniteScroll?.on('error', (e) => {
114
- salla.logger.error('Error loading more comments:', e);
115
- });
116
- }
117
- async loadInitialData() {
118
- await salla.api.notifications.fetch({ "per_page": this.itemPerPage })
119
- .then(rawResp => {
120
- const resp = this.normalizeResponse(rawResp);
121
- this.pagination = resp.pagination;
122
- this.total = resp.pagination.total;
123
- this.nextPage = resp.pagination.links?.next || null;
124
- // if (!this.notifications.length) {
125
- // this.showPlaceholder = true;
126
- // return this.loading(false);
127
- // }
128
- setTimeout(() => {
129
- if (!resp.data.length) {
130
- return this.showPlaceholder = true;
131
- }
132
- this.handleResponse(resp.data).forEach(data => this.wrapper.append(data));
133
- this.initiateInfiniteScroll();
134
- let items = this.wrapper.querySelectorAll('salla-notification-item:not(.animated)');
135
- Helper.animateItems(items);
136
- }, 100);
137
- })
138
- .catch(error => {
139
- salla.logger.error(error);
140
- this.showPlaceholder = true;
141
- this.loading(false);
142
- });
143
- }
144
- // Get next page
145
- async loadMore() {
146
- this.infiniteScroll?.loadNextPage();
147
- }
148
- async componentWillLoad() {
149
- await this.loadInitialData();
150
- }
151
- get host() { return getElement(this); }
152
- };
153
- SallaNotifications.style = sallaNotificationsCss;
154
-
155
- export { SallaNotifications as salla_notifications };
@@ -1,316 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-BICKbbaT.js';
5
- import { S as Star } from './star2-D4oPi1Ov.js';
6
- import { H as Helper } from './Helper-CBmYxrzX.js';
7
- import './anime.es-CgtvEd63.js';
8
-
9
- var Heart = `<!-- Generated by IcoMoon.io -->
10
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
11
- <title>heart</title>
12
- <path d="M23.333 2.267c-3.547 0-5.779 1.605-7.333 3.061-1.555-1.456-3.787-3.061-7.333-3.061-5.955 0-8.667 5.045-8.667 9.733 0 8.503 10.147 14.735 15.513 16.841 0.156 0.061 0.321 0.092 0.487 0.092s0.331-0.031 0.487-0.092c5.367-2.107 15.513-8.339 15.513-16.841 0-4.688-2.712-9.733-8.667-9.733zM16 26.161c-5.537-2.309-13.333-7.799-13.333-14.161 0-3.517 1.856-7.067 6-7.067 2.983 0 4.656 1.451 6.384 3.203 0.5 0.508 1.399 0.508 1.899 0 1.728-1.752 3.401-3.203 6.384-3.203 4.144 0 6 3.549 6 7.067 0 6.363-7.796 11.852-13.333 14.161z"></path>
13
- </svg>
14
- `;
15
-
16
- const sallaProductCardCss = ".s-product-card-image::before{font-family:\"sallaicons\";content:\"\\ec1f\" !important}.s-product-card-content-pie-svg circle{transition:stroke-dashoffset 1s linear;-webkit-transition:stroke-dashoffset 1s linear;-moz-transition:stroke-dashoffset 1s linear;-ms-transition:stroke-dashoffset 1s linear;-o-transition:stroke-dashoffset 1s linear;stroke:#E8EDF2;stroke-width:2px;stroke-linecap:round;fill:none}.s-product-card-content-pie-svg-bar{stroke:var(--color-primary) !important;stroke-dasharray:100 100;stroke-dashoffset:100}";
17
-
18
- const SallaProductCard = class {
19
- constructor(hostRef) {
20
- registerInstance(this, hostRef);
21
- // Store configs
22
- salla.onReady(() => {
23
- this.fitImageHeight = salla.config.get('store.settings.product.fit_type');
24
- salla.wishlist.event.onAdded((_res, id) => this.toggleFavoriteIcon(true, id));
25
- salla.wishlist.event.onRemoved((_res, id) => this.toggleFavoriteIcon(false, id));
26
- this.placeholder = salla.url.asset(salla.config.get('theme.settings.placeholder'));
27
- });
28
- // Language
29
- salla.lang.onLoaded(() => {
30
- this.remained = salla.lang.get('pages.products.remained');
31
- this.donationAmount = salla.lang.get('pages.products.donation_amount');
32
- this.startingPrice = salla.lang.get('pages.products.starting_price');
33
- this.addToCart = salla.lang.get('pages.cart.add_to_cart');
34
- this.outOfStock = salla.lang.get('pages.products.out_of_stock');
35
- });
36
- // Parse product data
37
- if (!this.product) {
38
- return;
39
- }
40
- try {
41
- this.productData = typeof this.product == 'object' ? this.product : JSON.parse(this.product);
42
- }
43
- catch (e) {
44
- salla.log('Bad json passed via product prop');
45
- }
46
- }
47
- // Private Methods
48
- initCircleBar() {
49
- let qty = this.productData.quantity, total = this.productData.quantity > 100 ? this.productData.quantity * 2 : 100, roundPercent = (qty / total) * 100, bar = this.pie.querySelector('.s-product-card-content-pie-svg-bar'), strokeDashOffsetValue = 100 - roundPercent;
50
- bar.style.strokeDashoffset = strokeDashOffsetValue;
51
- }
52
- toggleFavoriteIcon(isAdded = true, id = null) {
53
- if (id && id !== this.productData.id) {
54
- return;
55
- }
56
- this.wishlistBtn?.classList.toggle('s-product-card-wishlist-added', isAdded);
57
- }
58
- isInWishlist() {
59
- return salla.storage.get('salla::wishlist', []).includes(this.productData?.id);
60
- }
61
- async handleWishlistClick() {
62
- const wasInWishlist = this.isInWishlist();
63
- this.toggleFavoriteIcon(!wasInWishlist);
64
- try {
65
- await salla.wishlist.toggle(this.productData.id);
66
- }
67
- catch {
68
- this.toggleFavoriteIcon(wasInWishlist);
69
- }
70
- }
71
- formatDate(date) {
72
- let d = new Date(date);
73
- return `${d.getFullYear()}-${d.getMonth() + 1}-${d.getDate()}`;
74
- }
75
- getProductBadge() {
76
- if (this.productData.promotion_title) {
77
- return h("div", { class: "s-product-card-promotion-title" }, this.productData.promotion_title);
78
- }
79
- if (this.showQuantity && this.productData?.quantity) {
80
- return h("div", { class: "s-product-card-quantity" }, this.remained, " ", salla.helpers.number(this.productData?.quantity));
81
- }
82
- if (this.showQuantity && this.productData?.is_out_of_stock) {
83
- return h("div", { class: "s-product-card-out-badge" }, this.outOfStock);
84
- }
85
- return '';
86
- }
87
- getPriceFormat(price) {
88
- if (!price || price == 0) {
89
- return salla.config.get('store.settings.product.show_price_as_dash') ? '-' : '';
90
- }
91
- return salla.money(price);
92
- }
93
- getProductPrice() {
94
- if (this.productData.is_on_sale) {
95
- return h("div", { class: "s-product-card-sale-price" }, h("h4", { innerHTML: this.getPriceFormat(this.productData.sale_price) }), h("span", { innerHTML: this.getPriceFormat(this.productData?.regular_price) }));
96
- }
97
- if (this.productData.starting_price) {
98
- return h("div", { class: "s-product-card-starting-price" }, h("p", null, this.startingPrice), h("h4", { innerHTML: this.getPriceFormat(this.productData?.starting_price) }));
99
- }
100
- return h("h4", { class: "s-product-card-price", innerHTML: this.getPriceFormat(this.productData?.price) });
101
- }
102
- render() {
103
- const classes = {
104
- 's-product-card-entry': true,
105
- 's-product-card-vertical': !this.horizontal && !this.fullImage && !this.minimal,
106
- 's-product-card-horizontal': this.horizontal && !this.fullImage && !this.minimal,
107
- 's-product-card-fit-height': this.fitImageHeight && !this.isSpecial && !this.fullImage && !this.minimal,
108
- 's-product-card-special': this.isSpecial,
109
- 's-product-card-full-image': this.fullImage,
110
- 's-product-card-minimal': this.minimal,
111
- 's-product-card-compact': this.compact,
112
- 's-product-card-donation': this.productData?.donation,
113
- 's-product-card-shadow': this.shadowOnHover,
114
- 's-product-card-out-of-stock': this.productData?.is_out_of_stock,
115
- };
116
- const hrefProp = this.productData?.url ? { href: this.productData.url, title: `Learn more about ${this.productData?.name}` } : {};
117
- return (h(Host, { key: 'c5a6d2bc2fcf23da1a41ab8b19b2e981fb111e30', id: `product-${this.productData?.id}`, class: classes }, h("div", { key: 'e8d5105e4dbe367c612d62ef1dd6c95d04f440b0', class: !this.fullImage ? 's-product-card-image' : 's-product-card-image-full' }, h("a", { key: '8714997fcb48ef0eaabdf0a52cb775514e53db56', ...hrefProp }, h("img", { key: 'eebd3c1dde0894037a7723c46e2f07f6a5aef939', class: `s-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)
118
- ? 'contain'
119
- : this.fitImageHeight
120
- ? this.fitImageHeight
121
- : 'cover'} lazy`, src: this.placeholder, alt: this.productData?.image?.alt || this.productData?.name, "data-src": this.productData?.image?.url || this.productData?.thumbnail }), !this.fullImage && !this.minimal ? this.getProductBadge() : ''), this.fullImage && h("a", { key: '72e240315320e976dcad8d3f027711b9c1d7bcf1', ...hrefProp, class: "s-product-card-overlay" }), !this.horizontal && !this.fullImage ?
122
- h("salla-button", { shape: "icon", fill: "none", color: "light", loading: false, "aria-label": "Add or remove to wishlist", ref: el => this.wishlistBtn = el, class: "s-product-card-wishlist-btn animated", onClick: () => this.handleWishlistClick() }, h("span", { innerHTML: Heart })) : ''), h("div", { key: '2f0186ffc102488824cd7c346f4e07439474fc26', class: "s-product-card-content" }, this.isSpecial && this.productData?.quantity ?
123
- h("div", { class: "s-product-card-content-pie", ref: pie => this.pie = pie }, h("span", null, h("b", null, salla.helpers.number(this.productData?.quantity)), this.remained), h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -1 36 34", class: "s-product-card-content-pie-svg" }, h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-base" }), h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-bar" })))
124
- : '', h("div", { key: 'd50ea0726d25bf3b551050e906fc615bc682e694', class: { 's-product-card-content-main': true, 's-product-card-content-extra-padding': this.isSpecial } }, h("h3", { key: 'e4f39676d661a01d1aa6352cac7be6e764fa8687', class: "s-product-card-content-title" }, h("a", { key: '0aacc2e00a0db730d1e803da34336085082df75d', ...hrefProp }, this.productData?.name)), this.productData?.subtitle && !this.minimal ?
125
- h("p", { class: "s-product-card-content-subtitle" }, this.productData?.subtitle)
126
- : ''), this.productData?.donation && !this.minimal && !this.fullImage ?
127
- [h("salla-progress-bar", { donation: this.productData?.donation }), h("div", { class: "s-product-card-donation-input" }, this.productData?.donation?.can_donate ?
128
- [h("label", { htmlFor: "donation-amount" }, this.donationAmount, " ", h("span", null, "*")), h("input", { type: "text", onInput: e => {
129
- salla.helpers.inputDigitsOnly(e.target);
130
- this.addBtn.donatingAmount = e.target.value;
131
- }, id: "donation-amount", name: "donating_amount", class: "s-form-control", placeholder: this.donationAmount })]
132
- : '')]
133
- : '', h("div", { key: '445a1e16fee6ebb6ab5012aca324d3845991d13e', class: { 's-product-card-content-sub': true, 's-product-card-content-extra-padding': this.isSpecial } }, this.getProductPrice(), this.productData?.rating?.stars && !this.minimal ?
134
- h("div", { class: "s-product-card-rating" }, h("span", { innerHTML: Star }), h("span", null, this.productData.rating.stars))
135
- : ''), this.isSpecial && this.productData.discount_ends
136
- ? h("salla-count-down", { date: this.formatDate(this.productData.discount_ends), "end-of-day": true, boxed: true, labeled: true })
137
- : '', !this.hideAddBtn && !this.compact ?
138
- h("div", { class: "s-product-card-content-footer" }, h("salla-add-product-button", { fill: "outline", width: "wide", ref: el => this.addBtn = el, "product-id": this.productData.id, "product-status": this.productData.status, "product-type": this.productData.type }, h("slot", { name: "add-to-cart-label" }, this.productData.add_to_cart_label)), this.horizontal || this.fullImage ?
139
- h("salla-button", { shape: "icon", fill: "none", color: "light", loading: false, ref: el => this.wishlistBtn = el, "aria-label": "Add or remove to wishlist", class: "s-product-card-wishlist-btn animated", onClick: () => this.handleWishlistClick(), "data-id": "{{ product.id }}" }, h("span", { class: "text-xl", innerHTML: Heart }))
140
- : '')
141
- : ''), !this.hideAddBtn && this.compact ?
142
- h("div", { class: "s-product-card-content-footer" }, h("salla-add-product-button", { ref: el => this.addBtn = el, "product-id": this.productData.id, "product-status": this.productData.status, "product-type": this.productData.type, class: "s-add-product-button-compact" }, h("slot", { name: "add-to-cart-label" }, this.productData.add_to_cart_label)))
143
- : ''));
144
- }
145
- componentDidLoad() {
146
- document.lazyLoadInstance?.update(this.host.querySelectorAll('.lazy'));
147
- if (this.productData?.quantity && this.isSpecial) {
148
- this.initCircleBar();
149
- }
150
- if (!salla.config.isGuest() && salla.storage.get('salla::wishlist', []).includes(this.productData?.id)) {
151
- this.toggleFavoriteIcon();
152
- }
153
- }
154
- static get assetsDirs() { return ["assets"]; }
155
- get host() { return getElement(this); }
156
- };
157
- SallaProductCard.style = sallaProductCardCss;
158
-
159
- const sallaProductsSliderCss = "";
160
-
161
- const SallaProductsSlider = class {
162
- constructor(hostRef) {
163
- registerInstance(this, hostRef);
164
- /**
165
- * Custom Card Component for the Salla Products Slider.
166
- *
167
- * This component allows you to customize the appearance of individual product cards within a Salla Products Slider.
168
- *
169
- * @example
170
- * <salla-products-slider product-card-component="my-custom-card-style1" ...
171
- * <salla-products-slider product-card-component="my-custom-card-style2" ...
172
- */
173
- this.productCardComponent = 'custom-salla-product-card';
174
- this.apiUrl = '';
175
- this.onWishlistStorageSynced = () => Helper.syncWishlistIcons(this.host, `${this.productCardComponent}, salla-product-card`);
176
- }
177
- componentWillLoad() {
178
- return salla.onReady()
179
- .then(async () => {
180
- //TODO:: check why `this.includes` not working!!
181
- this.includes = Helper.parseJson(this.includes || this.host.getAttribute('includes'));
182
- if (!Array.isArray(this.includes)) {
183
- this.includes = null;
184
- }
185
- Helper.setIncludes(this.includes);
186
- this.sourceValueIsValid = !!(this.getSourceValue() || this.isSourceWithoutValue());
187
- if (!this.sourceValueIsValid) {
188
- salla.logger.warn(`source-value prop is required for source [${this.getSource()}]`);
189
- return;
190
- }
191
- this.hasCustomComponent = !!customElements.get(this.productCardComponent);
192
- if (this.source === 'json') {
193
- this.productsData = await this.applyBeforeAppendItems(this.getSourceValue());
194
- this.isReady = true;
195
- return;
196
- }
197
- if ((this.getSource() == 'related' && !salla.config.get('store.settings.product.related_products_enabled'))) {
198
- this.isReady = false;
199
- return;
200
- }
201
- if (this.getSource() === 'related' &&
202
- salla.config.get('store.settings.product.related_products_enabled') &&
203
- salla.config.get('store.settings.product.product-recommendation-type') === 'random' &&
204
- salla.config.get('store.features')?.includes('ai-driven-personalized-product')) {
205
- this.sourceValue = await salla.recommendations.similarProducts(this.sourceValue, { limit: this.limit || 12 }).extractProductIds();
206
- this.source = 'selected';
207
- }
208
- return salla.api.withoutNotifier(() => salla.product.api.fetch({
209
- source: Helper.getApiSource(this.getSource()),
210
- source_value: this.getSourceValue(),
211
- limit: this.limit
212
- }))
213
- .then(response => Helper.injectExtraFieldsToResponse(response))
214
- .then(async (response) => {
215
- this.productsData = await this.applyBeforeAppendItems(response.data);
216
- this.isReady = true;
217
- response.source = this.getSource();
218
- response.sourceValue = this.getSourceValue();
219
- salla.event.emit('salla-products-slider::products.fetched', this.productsData);
220
- });
221
- });
222
- }
223
- componentDidRender() {
224
- let processedCount = 0;
225
- const intervalId = setInterval(() => {
226
- this.host.querySelectorAll('[loading="lazy"]')?.forEach(img => img.removeAttribute('loading'));
227
- processedCount++;
228
- if (processedCount >= 10) {
229
- clearInterval(intervalId);
230
- }
231
- }, 1000);
232
- }
233
- connectedCallback() {
234
- salla.event.on('wishlist::storage.synced', this.onWishlistStorageSynced);
235
- }
236
- disconnectedCallback() {
237
- salla.event.off('wishlist::storage.synced', this.onWishlistStorageSynced);
238
- }
239
- async componentDidLoad() {
240
- await Salla.hooks.registerComponent('salla-products-slider', this);
241
- }
242
- onReadyChanged(isReady) {
243
- if (!isReady)
244
- return;
245
- void salla.wishlist.api.syncStorageFromServer();
246
- }
247
- isSourceWithoutValue() {
248
- return ['offers', 'latest', 'sales', 'top-rated'].includes(this.getSource());
249
- }
250
- getItemHTML(product) {
251
- //as a request they don't want to let the user to open the product details
252
- //todo:: find a better way to handle this request
253
- const isLandingPage = this.getSource() === 'landing-page';
254
- isLandingPage && (product.url = '');
255
- const handleClick = isLandingPage ? undefined : () => {
256
- Helper.saveProductSource(this.getSource());
257
- Helper.saveProductPosition(product.position);
258
- };
259
- if (this.hasCustomComponent && this.productCardComponent.toLowerCase() == 'custom-salla-product-card') {
260
- return h("div", { class: "s-products-slider-card", onClick: handleClick }, h("custom-salla-product-card", { product: product, source: this.getSource(), "source-value": this.getSourceValue() }));
261
- }
262
- if (this.hasCustomComponent) {
263
- const customElem = document.createElement(this.productCardComponent);
264
- customElem.setAttribute('product', JSON.stringify(product));
265
- customElem.setAttribute('source', this.getSource());
266
- customElem.setAttribute('source-value', this.getSourceValue());
267
- return h("div", { class: "s-products-slider-card", onClick: handleClick, innerHTML: customElem.outerHTML });
268
- }
269
- return h("div", { class: "s-products-slider-card", onClick: handleClick }, h("salla-product-card", { "show-quantity": isLandingPage, "hide-add-btn": isLandingPage, "shadow-on-hover": true, product: product }));
270
- }
271
- canRender() {
272
- return this.sourceValueIsValid && this.isReady;
273
- }
274
- getSource() {
275
- return Helper.getProductsSource(this.source);
276
- }
277
- getSourceValue() {
278
- return Helper.getProductsSourceValue(this.source, this.sourceValue);
279
- }
280
- /**
281
- * Allows bundles to modify or replace products before they are rendered.
282
- *
283
- * @example
284
- * salla.hooks.registerHook(
285
- * 'salla-products-slider',
286
- * 'beforeAppendItems',
287
- * async (ctx) => {
288
- * ctx.items = ctx.items.filter((item) => item.is_available);
289
- * },
290
- * );
291
- */
292
- async applyBeforeAppendItems(items) {
293
- const originalItems = Array.isArray(items) ? items : [];
294
- const ctx = { component: this, items: originalItems };
295
- try {
296
- await salla.hooks.call('salla-products-slider', 'beforeAppendItems', ctx);
297
- return Array.isArray(ctx.items) ? ctx.items : originalItems;
298
- }
299
- catch {
300
- return originalItems;
301
- }
302
- }
303
- render() {
304
- if (!this.canRender()) {
305
- return;
306
- }
307
- return (h(Host, { class: "s-products-slider-wrapper" }, h("salla-slider", { class: "s-products-slider-slider", id: this.sliderId || `s-products-slider-${Math.random().toString(36).substr(2, 9)}`, ...(this.sliderProps || {}), "auto-play": this.autoplay, type: "carousel", "block-title": this.blockTitle, "block-subTitle": this.subTitle, "display-all-url": this.displayAllUrl, sliderConfig: this.sliderConfig ? this.sliderConfig : null }, h("div", { slot: "items" }, this.productsData?.map(product => this.getItemHTML(product))))));
308
- }
309
- get host() { return getElement(this); }
310
- static get watchers() { return {
311
- "isReady": ["onReadyChanged"]
312
- }; }
313
- };
314
- SallaProductsSlider.style = sallaProductsSliderCss;
315
-
316
- export { SallaProductCard as salla_product_card, SallaProductsSlider as salla_products_slider };
@@ -1,11 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- var SIShipping = `<!-- Generated by IcoMoon.io -->
5
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
6
- <title>shipping</title>
7
- <path d="M31.124 13.104l-3.148-3.935c-1.273-1.591-3.171-2.503-5.207-2.503h-1.436c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v17.333c0 0.737 0.596 1.333 1.333 1.333h2.856c0.596 2.295 2.665 4 5.144 4 2.941 0 5.333-2.392 5.333-5.333s-2.392-5.333-5.333-5.333c-2.479 0-4.548 1.705-5.144 4h-1.523v-16c0-0.735 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.599 1.333 1.333v1.333c0 0.248 0.087 0.468 0.204 0.667-0.117 0.199-0.204 0.419-0.204 0.667v5.333c0 0.736 0.596 1.333 1.333 1.333h9.333v6.667h-1.333c-0.063 0-0.117 0.028-0.179 0.036-0.583-2.313-2.663-4.036-5.155-4.036-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333c2.492 0 4.572-1.723 5.155-4.036 0.061 0.008 0.116 0.036 0.179 0.036h2.667c0.737 0 1.333-0.596 1.333-1.333v-8.397c0-0.907-0.311-1.795-0.876-2.499zM9.333 21.333c1.471 0 2.667 1.196 2.667 2.667s-1.196 2.667-2.667 2.667-2.667-1.196-2.667-2.667 1.196-2.667 2.667-2.667zM21.333 13.333v-4h1.436c1.221 0 2.361 0.548 3.124 1.501l1.999 2.499zM22.667 26.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z"></path>
8
- </svg>
9
- `;
10
-
11
- export { SIShipping as S };
@@ -1,10 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- var SITag = `<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
5
- <title>tag</title>
6
- <path d="M28 0h-9.344c-1.059 0-2.056 0.411-2.809 1.153l-14.673 14.456c-1.56 1.56-1.561 4.097-0.001 5.657l9.56 9.56c0.755 0.755 1.76 1.172 2.828 1.173h0.003c1.068 0 2.072-0.416 2.833-1.179l14.451-14.668c0.743-0.753 1.153-1.751 1.153-2.809v-9.344c0-2.205-1.795-4-4-4zM29.333 13.344c0 0.353-0.137 0.685-0.385 0.937l-14.444 14.661c-0.252 0.252-0.587 0.391-0.941 0.391-0.001 0-0.001 0-0.001 0-0.356-0.001-0.691-0.139-0.943-0.392l-9.561-9.56c-0.52-0.52-0.52-1.365-0.005-1.88l14.667-14.449c0.253-0.248 0.585-0.385 0.937-0.385h9.344c0.736 0 1.333 0.597 1.333 1.333zM24 6.673c-0.737 0-1.333 0.604-1.333 1.341s0.596 1.333 1.333 1.333 1.333-0.596 1.333-1.333v-0.015c0-0.737-0.596-1.327-1.333-1.327z"></path>
7
- </svg>
8
- `;
9
-
10
- export { SITag as S };
@@ -1,29 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import { f as forceUpdate } from './index-BICKbbaT.js';
5
-
6
- function TrackedPromise(fn, options = {}) {
7
- options = Object.assign({ initialData: undefined, initialStatus: 'idle' }, options);
8
- return (target, propertyKey) => {
9
- const trackedPromise = Object.assign(function (...args) {
10
- const update = (newState) => {
11
- Object.assign(this[propertyKey], newState);
12
- forceUpdate(this);
13
- };
14
- update({ status: 'pending', error: undefined });
15
- return fn.call(this, ...args).then((data) => {
16
- update({ status: 'success', data, error: undefined });
17
- return data;
18
- }, (error) => {
19
- update({ status: 'error', error });
20
- return Promise.reject(error);
21
- });
22
- }, { status: options.initialStatus, data: options.initialData, error: undefined });
23
- Object.defineProperty(target, propertyKey, {
24
- value: trackedPromise,
25
- });
26
- };
27
- }
28
-
29
- export { TrackedPromise as T };
@@ -1,11 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- var SIUserAdd = `<!-- Generated by IcoMoon.io -->
5
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
6
- <title>user-add</title>
7
- <path d="M10.667 16c4.044 0 7.333-3.289 7.333-7.333s-3.289-7.333-7.333-7.333-7.333 3.289-7.333 7.333 3.289 7.333 7.333 7.333zM10.667 4c2.573 0 4.667 2.093 4.667 4.667s-2.093 4.667-4.667 4.667-4.667-2.093-4.667-4.667 2.093-4.667 4.667-4.667zM30.667 14.667h-2.667v-2.667c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v2.667h-2.667c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h2.667v2.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.667h2.667c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333zM10.667 18.667c-5.881 0-10.667 3.813-10.667 8.5v2.167c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-3.217 3.588-5.833 8-5.833s8 2.616 8 5.833v2.167c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-2.167c0-4.687-4.785-8.5-10.667-8.5z"></path>
8
- </svg>
9
- `;
10
-
11
- export { SIUserAdd as S };
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as e,c as t,h as s,H as i}from"./p-BICKbbaT.js";import{a}from"./p-BedNk7k1.js";import{a as l}from"./p-B9q7ymSg.js";const r=class{constructor(s){e(this,s),this.changed=t(this,"changed"),this.min=0,this.max=1e4,this.moreThanLabel="أكثر من",this.lessThanLabel="أقل من",this.toLabel="الى",this.fromLabel="من",this.typing=!1,this.isMin=!1,this.isRTL=salla.config.get("theme.is_rtl",!0),this.filterValues=[]}connectedCallback(){if(this.filtersData&&this.filtersData?.price&&(this.minPrice=this.filtersData.price.min,this.maxPrice=this.filtersData.price.max),salla.lang.onLoaded((()=>{this.moreThanLabel=salla.lang.getWithDefault("common.elements.more_than",this.moreThanLabel),this.lessThanLabel=salla.lang.getWithDefault("common.elements.less_than",this.lessThanLabel),this.toLabel=salla.lang.getWithDefault("common.elements.to",this.toLabel),this.fromLabel=salla.lang.getWithDefault("common.elements.from",this.fromLabel)})),1==this.option.values.length)return;if(this.option.values.length<=5)return void(this.filterValues=this.option.values);const e=Math.ceil(this.option.values.length/5);for(let t=0;t<this.option.values.length;t+=e)this.filterValues.push(this.option.values.slice(t,t+e).reduce(((e,t)=>(e.to=t.to,e.count+=t.count,e))))}async reset(){this.minInput.value=null,this.maxInput.value=null,this.minPrice=null,this.maxPrice=null}getPriceLabel(e){return isNaN(e.from)||e.from<1?`${this.lessThanLabel} ${salla.money(e.to)}`:isNaN(e.to)||e.to<1?`${this.moreThanLabel} ${salla.money(e.from)}`:`${salla.money(e.from)} ${this.toLabel} ${salla.money(e.to)}`}minInputValidation(e){e&&(e>this.max||this.maxPrice&&e>this.maxPrice)||(e<this.min?this.minPrice=this.min:e&&(this.minPrice=e))}maxInputValidation(e){e&&(e<this.min||this.minPrice&&e<this.minPrice)||e>this.max&&(this.maxPrice=this.max)}async changedEventHandler(e){salla.helpers.inputDigitsOnly(this.minInput),salla.helpers.inputDigitsOnly(this.maxInput);const t=this.minPrice?1*+this.minPrice:null,s=this.maxPrice?1*+this.maxPrice:null;this.maxPrice||(this.maxPrice=""),this.isMin?this.minInputValidation(t):(this.minPrice||(this.minPrice=0),this.maxInputValidation(s)),this.isReady&&this.changed.emit({event:e,option:this.option,value:{max:this.maxPrice,min:this.minPrice}})}handleMinMaxPrice(e,t){this.minPrice=t.from,this.maxPrice="*"!==t.to?t.to:"",this.changedEventHandler(e)}isChecked(e){return!(!this.minPrice&&!this.maxPrice)&&(((e.from<1||"*"==e.from)&&0==this.minPrice||e.from==this.minPrice)&&("*"==e.to||!e.to||e.to==this.maxPrice))}handleMinPrice(e){this.isMin=!0;const t=e.target.value;this.minPrice=""===t?0:t}handleMaxPrice(e){this.isMin=!1;const t=e.target.value;this.maxPrice=void 0===t?"":t}render(){return s(i,{key:"dc74966c1d2d9e5626b23db0a80b693fef047f41"},this.filterValues.map(((e,t)=>s("label",{class:"s-filters-label",htmlFor:`${this.option.key}-${t}`,key:t},s("input",{id:`${this.option.key}-${t}`,name:"price",type:"radio",checked:this.isChecked(e),class:"s-filters-radio",onChange:t=>this.handleMinMaxPrice(t,e)}),s("span",{innerHTML:this.getPriceLabel(e)})))),s("div",{key:"b12dad0c27f3fbe9ad8a9c98b9bd1302388b35ef",class:"flex justify-center items-center"},s("div",{key:"e034058e195a94c2434e99c5b30b2e5909daff87",class:"relative max-w-xl w-full"},s("div",{key:"4c59f5a3c8249717c4c6decbcdb63d97343bd871",class:"s-price-range-inputs"},s("div",{key:"65de0733e3ce1ea7b37976f1d077d1f3192056c5",class:"s-price-range-relative"},s("div",{key:"ed842802aff5cd874e708c062aa79e8185d330f3",class:"s-price-range-currency"}," ",salla.config.currency().symbol),s("input",{key:"78d020948e3edc4e53fff976fa8e00b2e6ac6868",type:"number",maxlength:"5",ref:e=>this.minInput=e,onBlur:e=>this.handleMinPrice(e),value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),s("div",{key:"edfb3dd62b7898d4493a1adefeee20bdb305c89a",class:"s-price-range-gray-text"}," -"),s("div",{key:"f2227f09a344b8cc8c1160c23a6dbc9cd96cb260",class:"s-price-range-relative"},s("div",{key:"e528e7766eb7f6b9e0791116c87374441c73afe6",class:"s-price-range-currency"}," ",salla.config.currency().symbol),s("input",{key:"6dda7a17097ae51c50c3d4aae290ce1b0369dcfa",type:"number",maxlength:"5",ref:e=>this.maxInput=e,onBlur:e=>this.handleMaxPrice(e),value:this.maxPrice,placeholder:this.toLabel,class:"s-price-range-number-input","aria-describedby":"price-currency"})),s("salla-button",{key:"970d39060c565e7dc18e6a2039452a3b3df04082",color:"gray",shape:"icon",size:"small",fill:"outline",onClick:e=>this.changedEventHandler(e)},s("span",{key:"da9b6ed688a64d624eedc3834ad3be47533c9dd5",innerHTML:this.isRTL?a:l}))))))}componentDidLoad(){this.isReady=!0}};r.style=":host{display:block}.rtl .rtl-range-slider,[dir=rtl] .rtl-range-slider{transform:rotateY(180deg)}.rtl .rtl-range-numbers,[dir=rtl] .rtl-range-numbers{flex-direction:row-reverse}.rtl .form-select,.rtl select,[dir=rtl] .form-select,[dir=rtl] select{background-position:left 0.5rem center;padding-right:12px}.rtl .menu-divide li:not(:last-child):after,[dir=rtl] .menu-divide li:not(:last-child):after{left:0;right:auto}input[type=range]::-webkit-slider-thumb{pointer-events:all;width:24px;height:24px;-webkit-appearance:none}[type=checkbox]:checked{background-size:80%}";export{r as salla_price_range}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as s,h as i,H as e,a as t}from"./p-BICKbbaT.js";function l(s,i){localStorage.getItem("salla-delivery-promise-debug")&&(void 0!==i?console.log(s,i):console.log(s))}async function r(s,i){l("fetchCities start",{productId:s,keyword:i});const e=null!=i?`?keyword=${encodeURIComponent(i)}`:"",t=await salla.api.request(salla.url.api(`products/${s}/delivery-promises/cities${e}`));return t.success&&Array.isArray(t.data)&&0!==t.data.length?(l("fetchCities success",{count:t.data.length}),{cities:t.data}):(l("fetchCities: no data",{response:t}),{cities:[]})}function a(){const s=(Boolean(salla.config.get("store.settings.bullet_delivery.settings.remember_last_session"))?salla.storage.store:salla.storage.session).get("bullet_delivery_intent");return s&&"object"==typeof s?s:null}const o={deliveryTo:"توصيل إلى",pickupFromBranch:"الاستلام من فرع",noResults:"لا توجد نتائج",selectCity:"اختر المدينة",changeCityTitle:"تغيير المدينة",changeCitySubtitle:"",cityFieldLabel:"المدينة",modalSearchPlaceholder:"ابحث عن مدينة",confirmAddress:"تأكيد العنوان",errorDeliveryPromise:"لا يتوفر وعد تسليم لهذه المدينة",errorPickupPromise:"لا يتوفر وعد تسليم لهذا الفرع"},n="salla-bullet-delivery-override-ip",h=class{constructor(i){s(this,i),this.isDeliveryPromiseEnabled=!1,this.isLoginCycleEnabled=!1,this.canRender=!1,this.labels=o,this.selectedLabel=null,this.deliveryMessage=null,this.hasError=!1,this.errorMessage="",this.isLoadingPromises=!1,this.selectedCityLoginCycle=null,this.selectedBranchLoginCycle=null,this.cities=[],this.selectedCity=null,this.isLoadingCities=!1,this.cityPendingSelection=null,this.modalCities=[],this.isSearchingCities=!1,this.citySearchCounter=0,this.onBulletDeliveryConfirmed=()=>{this.applyBulletIntent()},this.handleCitySearch=s=>{if(clearTimeout(this.citySearchTimer),!s.trim())return this.modalCities=[...this.cities],void(this.isSearchingCities=!1);this.citySearchTimer=setTimeout((()=>this.searchCitiesRemote(s)),300)},this.handleHeaderClick=s=>{s.stopPropagation(),this.isLoginCycleEnabled?this.openBulletDeliveryModal():this.openCityChangeModal()}}async componentDidLoad(){await salla.onReady(),await salla.lang.onLoaded(),this.labels={deliveryTo:salla.lang.getWithDefault("pages.products.promise_deliver_to",o.deliveryTo),pickupFromBranch:salla.lang.getWithDefault("pages.products.promise_pickup_from_branch",o.pickupFromBranch),noResults:salla.lang.getWithDefault("common.elements.no_options",o.noResults),selectCity:salla.lang.getWithDefault("common.elements.select_city",o.selectCity),changeCityTitle:salla.lang.getWithDefault("pages.products.promise_change_city_title",o.changeCityTitle),changeCitySubtitle:salla.lang.getWithDefault("pages.products.promise_change_city_subtitle","قد تتغيّر مدة التوصيل حسب المدينة."),cityFieldLabel:salla.lang.getWithDefault("pages.products.promise_city_field",o.cityFieldLabel),modalSearchPlaceholder:salla.lang.getWithDefault("pages.products.promise_search_city",o.modalSearchPlaceholder),confirmAddress:salla.lang.getWithDefault("pages.checkout.confirm_address",o.confirmAddress),errorDeliveryPromise:salla.lang.getWithDefault("pages.products.promise_delivery_not_available",o.errorDeliveryPromise),errorPickupPromise:salla.lang.getWithDefault("pages.products.promise_pickup_not_available",o.errorPickupPromise)},this.isDeliveryPromiseEnabled=salla.config.get("store.features",[]).includes("delivery-promises"),this.isLoginCycleEnabled=salla.config.get("store.features",[]).includes("bullet-delivery-v2")&&Salla.config.get("store.settings.bullet_delivery.enabled"),this.productId=salla.config.get("page.id"),this.isDeliveryPromiseEnabled?this.isLoginCycleEnabled?await this.initLoginCycleFlow():(this.selectedLabel=`${this.labels.deliveryTo} ${this.labels.selectCity}`,await this.loadCities()):this.canRender=!1}disconnectedCallback(){window.removeEventListener("bulletDeliveryConfirmed",this.onBulletDeliveryConfirmed)}getIPDeliveryLocation(){const s="store.shipping.delivery_location",i={cityId:salla.config.get(`${s}.city_id`),cityName:salla.config.get(`${s}.city_name`)};return localStorage.getItem(n)?JSON.parse(localStorage.getItem(n)):i}async initLoginCycleFlow(){const s=this.applyBulletIntent(),{cityId:i,cityName:e}=this.getIPDeliveryLocation();l("delivery promise login cycle flow getIPDeliveryLocation",this.getIPDeliveryLocation()),i&&e&&!s&&(this.selectedLabel=`${this.labels.deliveryTo} ${e}`,await this.loadDeliveryMessage(i,"city")),this.canRender=!0,window.addEventListener("bulletDeliveryConfirmed",this.onBulletDeliveryConfirmed)}applyBulletIntent(){const s=function(){const s=a();if(!s)return null;if("address"===s.type){const i=s.address_details?.city,e=null!=i?.id?Number(i.id):null!=s.city_id?Number(s.city_id):null,t=i?.name?.trim()||"";return null!=e?{type:"address",option:{id:e,name:t}}:null}if("branch"===s.type){const i=null!=s.branch_id?Number(s.branch_id):null!=s.branch_details?.id?Number(s.branch_details.id):null,e=s.branch_details?.name?.trim()||"";return null!=i?{type:"branch",option:{id:i,name:e}}:null}return null}();return s?("address"===s.type?(this.selectedCityLoginCycle=s.option,this.selectedBranchLoginCycle=null,this.selectedLabel=`${this.labels.deliveryTo} ${s.option.name||this.labels.selectCity}`,this.loadDeliveryMessage(s.option.id,"city")):(this.selectedBranchLoginCycle=s.option,this.selectedCityLoginCycle=null,this.selectedLabel=`${this.labels.pickupFromBranch} ${s.option.name}`,this.loadDeliveryMessage(s.option.id,"branch")),!0):(this.selectedLabel=`${this.labels.deliveryTo} ${this.labels.selectCity}`,this.selectedCityLoginCycle=null,this.selectedBranchLoginCycle=null,this.deliveryMessage=null,!1)}openBulletDeliveryModal(){salla.event.emit("salla::bullet-delivery.modal.open.requested",function(){const s=a(),i={};if("address"===s?.type&&null!=s.address_id&&(i.preselected_address_id=Number(s.address_id)),"branch"===s?.type){const e=s.branch_id??s.branch_details?.id;null!=e&&(i.preselected_branch_id=Number(e))}return i}())}async loadCities(){this.isLoadingCities=!0,this.hasError=!1;const{cityId:s,cityName:i}=this.getIPDeliveryLocation();l("delivery promise standard flow getIPDeliveryLocation",this.getIPDeliveryLocation());try{const{cities:e}=await r(this.productId);if(!e.length)return void(this.canRender=!1);if(this.cities=e,this.canRender=!0,s&&i){this.selectedLabel=`${this.labels.deliveryTo} ${i}`;const e=this.cities.find((i=>String(i.id)===String(s)));e&&(l("delivery promise standard flow autoCity found",e),this.selectedCity=e),await this.loadDeliveryMessage(s,"city")}}catch(s){this.hasError=!0,this.errorMessage=s.message||"Failed to load cities",this.canRender=!1}finally{this.isLoadingCities=!1}}async loadDeliveryMessage(s,i){this.isLoadingPromises=!0,this.hasError=!1,this.deliveryMessage=null;try{this.deliveryMessage=await async function(s,i,e,t){l("fetchDeliveryMessage start",{productId:s,id:i,optionType:e});let r="";r="city"!==e||t?`?reference_id=${i}&reference_type=${e}`:`?reference_id=${i}`;const a=await salla.api.withoutNotifier((()=>salla.api.request(salla.url.api(`products/${s}/delivery-promises${r}`))));if(!a.success)throw l("fetchDeliveryMessage error",{response:a}),new Error(a.error?.message||"Failed to fetch delivery promise");const o=a.data?.message?.trim();return l("fetchDeliveryMessage success",{message:o}),o||null}(this.productId,s,i,this.isLoginCycleEnabled)}catch(s){this.hasError=!0,this.errorMessage="city"===i?this.labels.errorDeliveryPromise:this.labels.errorPickupPromise}finally{this.isLoadingPromises=!1}}async openCityChangeModal(){this.cityModalRef&&(this.cityPendingSelection=null,this.modalCities=[...this.cities],await this.cityModalRef.setTitle(this.labels.changeCityTitle),await this.cityModalRef.open())}async searchCitiesRemote(s){const i=++this.citySearchCounter;this.isSearchingCities=!0;try{const{cities:e}=await r(this.productId,s);if(i!==this.citySearchCounter)return;this.modalCities=e}catch{if(i!==this.citySearchCounter)return;this.modalCities=[]}finally{i===this.citySearchCounter&&(this.isSearchingCities=!1)}}async handleConfirmCityModal(){if(!this.cityPendingSelection)return void await(this.cityModalRef?.close());const s=this.cityPendingSelection;this.selectedCity=s,this.selectedLabel=`${this.labels.deliveryTo} ${function(s){const i=salla.config.get("user.language_code");return i&&"ar"!==i&&s.name_en?.trim()?s.name_en.trim():s.name}(s)}`,await this.loadDeliveryMessage(s.id,"city"),await(this.cityModalRef?.close())}renderLoadingSkeleton(){return i(e,{class:"s-delivery-promise-wrapper s-delivery-promise-skeleton"},i("div",{class:"s-delivery-promise-container"},i("div",{class:"s-delivery-promise-header s-delivery-promise-header-skeleton"},i("div",{class:"s-delivery-promise-location"},i("salla-skeleton",{height:"14px",width:"180px"})),i("salla-skeleton",{height:"18px",width:"18px"})),i("div",{class:"s-delivery-promise-loading"},i("salla-skeleton",{height:"20px",width:"80%"}))))}renderDeliveryMessage(){return this.isLoadingPromises?i("div",{class:"s-delivery-promise-loading"},i("salla-skeleton",{height:"20px",width:"80%"})):this.deliveryMessage?i("div",{class:"s-delivery-promise-message"},this.deliveryMessage):null}renderCityModalBody(){return i("div",{class:"s-delivery-promise-modal-body"},i("salla-searchable-dropdown",{label:this.labels.cityFieldLabel,placeholder:this.labels.modalSearchPlaceholder,items:this.modalCities,selectedItem:this.cityPendingSelection,searching:this.isSearchingCities,required:!0,noResultsText:this.labels.noResults,inputId:"s-delivery-promise-modal-search",onItemSelected:s=>{this.cityPendingSelection=s.detail},onSearchInput:s=>{this.handleCitySearch(s.detail)}}))}renderCityChangeModal(){return this.isLoginCycleEnabled?null:i("salla-modal",{id:"s-delivery-promise-city-modal",ref:s=>{this.cityModalRef=s},class:"s-delivery-promise-city-modal",isClosable:!0,width:"md","modal-title":this.labels.changeCityTitle,subTitle:this.labels.changeCitySubtitle},this.renderCityModalBody(),i("salla-button",{slot:"footer",width:"wide",disabled:!this.cityPendingSelection,onClick:()=>this.handleConfirmCityModal()},!this.isLoadingPromises&&this.labels.confirmAddress))}render(){return this.isDeliveryPromiseEnabled?this.isLoadingCities?this.renderLoadingSkeleton():this.canRender?i(e,{class:"s-delivery-promise-wrapper"},i("div",{class:"s-delivery-promise-container"},i("div",{class:"s-delivery-promise-header",onClick:this.handleHeaderClick},i("div",{class:"s-delivery-promise-location"},i("span",{class:"s-delivery-promise-title"},this.selectedLabel)),i("i",{class:"sicon-keyboard_arrow_down s-delivery-promise-arrow"})),this.hasError&&i("div",{class:"s-delivery-promise-error"},this.errorMessage),!this.hasError&&this.renderDeliveryMessage()),this.renderCityChangeModal()):null:null}get host(){return t(this)}};export{h as salla_delivery_promise}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as t,h as o,a as r}from"./p-BICKbbaT.js";const i=class{constructor(o){t(this,o),this.theme="default",this.show=!1,this.targetElement=null}handleMouseOver(t){this.targetElement&&this.targetElement.contains(t.target)&&(this.show=!0)}handleMouseOut(t){this.targetElement&&this.targetElement.contains(t.target)&&(this.show=!1)}componentDidLoad(){this.targetElement=document.getElementById(this.targetId)}render(){const t=["default","dark"].includes(this.theme)?this.theme:"default";return o("div",{key:"84dfb23d4eb2689ff71b65c4a8b24dd36f8cb6ca",class:"s-tooltip-container"},o("div",{key:"59d3bac320e20f99de1c4bf49531a61962190efc",class:`s-tooltip-item s-tooltip-item--${t}`,style:{display:this.show?"block":"none"}},this.text?o("span",null,this.text):o("slot",null)))}get el(){return r(this)}};i.style='.s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;transform:translateX(-63%) translateY(-50%);background-color:var(--color-primary);color:var(--color-primary-reverse);bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:"";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:var(--color-primary) transparent transparent transparent}.s-tooltip-item:dir(ltr){transform:translateX(-72%)}.s-tooltip-item--dark{background-color:#555555;color:white;padding:5px 15px;border-radius:8px;font-size:12px;font-weight:normal;max-width:330px;width:max-content}.s-tooltip-item--dark::after{border-color:#555555 transparent transparent transparent}';export{i as salla_tooltip}