@salla.sa/twilight-components 2.11.86 → 2.11.88

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 (481) hide show
  1. package/dist/cjs/_commonjsHelpers-f57e29ee.js +2 -0
  2. package/dist/cjs/_commonjsHelpers-f57e29ee.js.map +1 -0
  3. package/dist/cjs/app-globals-bf20263f.js +2 -0
  4. package/dist/cjs/app-globals-bf20263f.js.map +1 -0
  5. package/dist/cjs/camera-058ddeeb.js +2 -0
  6. package/dist/cjs/camera-058ddeeb.js.map +1 -0
  7. package/dist/cjs/cart-3ecaa815.js +2 -0
  8. package/dist/cjs/cart-3ecaa815.js.map +1 -0
  9. package/dist/cjs/css-shim-c9fa4209.js +2 -0
  10. package/dist/cjs/css-shim-c9fa4209.js.map +1 -0
  11. package/dist/cjs/dom-92c2a073.js +2 -0
  12. package/dist/cjs/dom-92c2a073.js.map +1 -0
  13. package/dist/cjs/index-1d2b3370.js +2 -0
  14. package/dist/cjs/index-1d2b3370.js.map +1 -0
  15. package/dist/cjs/index.cjs.js +2 -0
  16. package/dist/cjs/index.cjs.js.map +1 -0
  17. package/dist/cjs/loader.cjs.js +2 -0
  18. package/dist/cjs/loader.cjs.js.map +1 -0
  19. package/dist/cjs/salla-add-product-button.cjs.entry.js +2 -0
  20. package/dist/cjs/salla-add-product-button.cjs.entry.js.map +1 -0
  21. package/dist/cjs/salla-button_37.cjs.entry.js +3 -1
  22. package/dist/cjs/salla-button_37.cjs.entry.js.map +1 -0
  23. package/dist/cjs/salla-comment-form.cjs.entry.js +2 -0
  24. package/dist/cjs/salla-comment-form.cjs.entry.js.map +1 -0
  25. package/dist/cjs/salla-conditional-fields.cjs.entry.js +2 -0
  26. package/dist/cjs/salla-conditional-fields.cjs.entry.js.map +1 -0
  27. package/dist/cjs/salla-installment.cjs.entry.js +2 -0
  28. package/dist/cjs/salla-installment.cjs.entry.js.map +1 -0
  29. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +2 -0
  30. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js.map +1 -0
  31. package/dist/cjs/salla-product-options.cjs.entry.js +2 -0
  32. package/dist/cjs/salla-product-options.cjs.entry.js.map +1 -0
  33. package/dist/cjs/salla-select.cjs.entry.js +2 -0
  34. package/dist/cjs/salla-select.cjs.entry.js.map +1 -0
  35. package/dist/cjs/twilight.cjs.js +2 -0
  36. package/dist/cjs/twilight.cjs.js.map +1 -0
  37. package/dist/collection/Helpers/Helper.js +1 -0
  38. package/dist/collection/Helpers/Helper.js.map +1 -0
  39. package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +1 -0
  40. package/dist/collection/components/salla-add-product-button/salla-add-product-button.js.map +1 -0
  41. package/dist/collection/components/salla-button/salla-button.js +1 -0
  42. package/dist/collection/components/salla-button/salla-button.js.map +1 -0
  43. package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +1 -0
  44. package/dist/collection/components/salla-cart-summary/salla-cart-summary.js.map +1 -0
  45. package/dist/collection/components/salla-color-picker/interfaces.js +1 -0
  46. package/dist/collection/components/salla-color-picker/interfaces.js.map +1 -0
  47. package/dist/collection/components/salla-color-picker/salla-color-picker.js +1 -0
  48. package/dist/collection/components/salla-color-picker/salla-color-picker.js.map +1 -0
  49. package/dist/collection/components/salla-comment-form/salla-comment-form.js +1 -0
  50. package/dist/collection/components/salla-comment-form/salla-comment-form.js.map +1 -0
  51. package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +1 -0
  52. package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js.map +1 -0
  53. package/dist/collection/components/salla-count-down/salla-count-down.js +1 -0
  54. package/dist/collection/components/salla-count-down/salla-count-down.js.map +1 -0
  55. package/dist/collection/components/salla-datetime-picker/interfaces.js +1 -0
  56. package/dist/collection/components/salla-datetime-picker/interfaces.js.map +1 -0
  57. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -0
  58. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js.map +1 -0
  59. package/dist/collection/components/salla-file-upload/interfaces.js +1 -0
  60. package/dist/collection/components/salla-file-upload/interfaces.js.map +1 -0
  61. package/dist/collection/components/salla-file-upload/salla-file-upload.js +1 -0
  62. package/dist/collection/components/salla-file-upload/salla-file-upload.js.map +1 -0
  63. package/dist/collection/components/salla-gifting/gift-schema.js +1 -0
  64. package/dist/collection/components/salla-gifting/gift-schema.js.map +1 -0
  65. package/dist/collection/components/salla-gifting/intefaces.js +1 -0
  66. package/dist/collection/components/salla-gifting/intefaces.js.map +1 -0
  67. package/dist/collection/components/salla-gifting/salla-gifting.js +1 -0
  68. package/dist/collection/components/salla-gifting/salla-gifting.js.map +1 -0
  69. package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.js +1 -0
  70. package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.js.map +1 -0
  71. package/dist/collection/components/salla-installment/salla-installment.js +1 -0
  72. package/dist/collection/components/salla-installment/salla-installment.js.map +1 -0
  73. package/dist/collection/components/salla-list-tile/salla-list-tile.js +1 -0
  74. package/dist/collection/components/salla-list-tile/salla-list-tile.js.map +1 -0
  75. package/dist/collection/components/salla-loading/salla-loading.js +1 -0
  76. package/dist/collection/components/salla-loading/salla-loading.js.map +1 -0
  77. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +1 -0
  78. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js.map +1 -0
  79. package/dist/collection/components/salla-login-modal/intefaces.js +1 -0
  80. package/dist/collection/components/salla-login-modal/intefaces.js.map +1 -0
  81. package/dist/collection/components/salla-login-modal/salla-login-modal.js +1 -0
  82. package/dist/collection/components/salla-login-modal/salla-login-modal.js.map +1 -0
  83. package/dist/collection/components/salla-loyalty/loyalty-schema.js +1 -0
  84. package/dist/collection/components/salla-loyalty/loyalty-schema.js.map +1 -0
  85. package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +1 -0
  86. package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js.map +1 -0
  87. package/dist/collection/components/salla-loyalty/salla-loyalty.js +1 -0
  88. package/dist/collection/components/salla-loyalty/salla-loyalty.js.map +1 -0
  89. package/dist/collection/components/salla-map/map-styles.js +1 -0
  90. package/dist/collection/components/salla-map/map-styles.js.map +1 -0
  91. package/dist/collection/components/salla-map/salla-map.js +1 -0
  92. package/dist/collection/components/salla-map/salla-map.js.map +1 -0
  93. package/dist/collection/components/salla-modal/salla-modal.js +1 -0
  94. package/dist/collection/components/salla-modal/salla-modal.js.map +1 -0
  95. package/dist/collection/components/salla-offer-modal/offer-schema.js +1 -0
  96. package/dist/collection/components/salla-offer-modal/offer-schema.js.map +1 -0
  97. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -0
  98. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js.map +1 -0
  99. package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -0
  100. package/dist/collection/components/salla-placeholder/salla-placeholder.js.map +1 -0
  101. package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -0
  102. package/dist/collection/components/salla-product-availability/salla-product-availability.js.map +1 -0
  103. package/dist/collection/components/salla-product-options/interfaces.js +1 -0
  104. package/dist/collection/components/salla-product-options/interfaces.js.map +1 -0
  105. package/dist/collection/components/salla-product-options/salla-product-options.js +1 -0
  106. package/dist/collection/components/salla-product-options/salla-product-options.js.map +1 -0
  107. package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +1 -0
  108. package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js.map +1 -0
  109. package/dist/collection/components/salla-progress-bar/salla-progress-bar.js +1 -0
  110. package/dist/collection/components/salla-progress-bar/salla-progress-bar.js.map +1 -0
  111. package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -0
  112. package/dist/collection/components/salla-quantity-input/salla-quantity-input.js.map +1 -0
  113. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +2 -1
  114. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js.map +1 -0
  115. package/dist/collection/components/salla-quick-order/salla-quick-order.js +1 -0
  116. package/dist/collection/components/salla-quick-order/salla-quick-order.js.map +1 -0
  117. package/dist/collection/components/salla-rating-modal/order-feedback-response.js +1 -0
  118. package/dist/collection/components/salla-rating-modal/order-feedback-response.js.map +1 -0
  119. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +1 -0
  120. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js.map +1 -0
  121. package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +1 -0
  122. package/dist/collection/components/salla-rating-stars/salla-rating-stars.js.map +1 -0
  123. package/dist/collection/components/salla-scopes/interfaces.js +1 -0
  124. package/dist/collection/components/salla-scopes/interfaces.js.map +1 -0
  125. package/dist/collection/components/salla-scopes/salla-scopes.js +1 -0
  126. package/dist/collection/components/salla-scopes/salla-scopes.js.map +1 -0
  127. package/dist/collection/components/salla-search/salla-search.js +1 -0
  128. package/dist/collection/components/salla-search/salla-search.js.map +1 -0
  129. package/dist/collection/components/salla-search/search-response.js +1 -0
  130. package/dist/collection/components/salla-search/search-response.js.map +1 -0
  131. package/dist/collection/components/salla-select/salla-select.js +1 -0
  132. package/dist/collection/components/salla-select/salla-select.js.map +1 -0
  133. package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -0
  134. package/dist/collection/components/salla-skeleton/salla-skeleton.js.map +1 -0
  135. package/dist/collection/components/salla-slider/salla-slider.js +1 -0
  136. package/dist/collection/components/salla-slider/salla-slider.js.map +1 -0
  137. package/dist/collection/components/salla-social-share/interfaces.js +1 -0
  138. package/dist/collection/components/salla-social-share/interfaces.js.map +1 -0
  139. package/dist/collection/components/salla-social-share/salla-social-share.js +1 -0
  140. package/dist/collection/components/salla-social-share/salla-social-share.js.map +1 -0
  141. package/dist/collection/components/salla-tabs/interfaces.js +1 -0
  142. package/dist/collection/components/salla-tabs/interfaces.js.map +1 -0
  143. package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -0
  144. package/dist/collection/components/salla-tabs/salla-tab-content.js.map +1 -0
  145. package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -0
  146. package/dist/collection/components/salla-tabs/salla-tab-header.js.map +1 -0
  147. package/dist/collection/components/salla-tabs/salla-tabs.js +1 -0
  148. package/dist/collection/components/salla-tabs/salla-tabs.js.map +1 -0
  149. package/dist/collection/components/salla-tabs/utils.js +1 -0
  150. package/dist/collection/components/salla-tabs/utils.js.map +1 -0
  151. package/dist/collection/components/salla-tel-input/interfaces.js +1 -0
  152. package/dist/collection/components/salla-tel-input/interfaces.js.map +1 -0
  153. package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -0
  154. package/dist/collection/components/salla-tel-input/salla-tel-input.js.map +1 -0
  155. package/dist/collection/components/salla-user-menu/interfaces.js +1 -0
  156. package/dist/collection/components/salla-user-menu/interfaces.js.map +1 -0
  157. package/dist/collection/components/salla-user-menu/salla-user-menu.js +1 -0
  158. package/dist/collection/components/salla-user-menu/salla-user-menu.js.map +1 -0
  159. package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -0
  160. package/dist/collection/components/salla-user-settings/salla-user-settings.js.map +1 -0
  161. package/dist/collection/components/salla-verify/salla-verify.js +1 -0
  162. package/dist/collection/components/salla-verify/salla-verify.js.map +1 -0
  163. package/dist/collection/global/app-dev.js +1 -0
  164. package/dist/collection/global/app-dev.js.map +1 -0
  165. package/dist/collection/global/app.js +1 -0
  166. package/dist/collection/global/app.js.map +1 -0
  167. package/dist/collection/index.js +1 -0
  168. package/dist/collection/index.js.map +1 -0
  169. package/dist/collection/interfaces/colors.js +1 -0
  170. package/dist/collection/interfaces/colors.js.map +1 -0
  171. package/dist/collection/interfaces/index.js +1 -0
  172. package/dist/collection/interfaces/index.js.map +1 -0
  173. package/dist/collection/interfaces/ratio.js +1 -0
  174. package/dist/collection/interfaces/ratio.js.map +1 -0
  175. package/dist/components/Helper.js +2 -0
  176. package/dist/components/Helper.js.map +1 -0
  177. package/dist/components/_commonjsHelpers.js +2 -0
  178. package/dist/components/_commonjsHelpers.js.map +1 -0
  179. package/dist/components/anime.es.js +2 -0
  180. package/dist/components/anime.es.js.map +1 -0
  181. package/dist/components/bell-ring.js +2 -0
  182. package/dist/components/bell-ring.js.map +1 -0
  183. package/dist/components/camera.js +2 -0
  184. package/dist/components/camera.js.map +1 -0
  185. package/dist/components/cancel.js +2 -0
  186. package/dist/components/cancel.js.map +1 -0
  187. package/dist/components/cart.js +2 -0
  188. package/dist/components/cart.js.map +1 -0
  189. package/dist/components/index.js +2 -0
  190. package/dist/components/index.js.map +1 -0
  191. package/dist/components/keyboard_arrow_down.js +2 -0
  192. package/dist/components/keyboard_arrow_down.js.map +1 -0
  193. package/dist/components/keyboard_arrow_right.js +2 -0
  194. package/dist/components/keyboard_arrow_right.js.map +1 -0
  195. package/dist/components/mail.js +2 -0
  196. package/dist/components/mail.js.map +1 -0
  197. package/dist/components/salla-add-product-button.js +2 -0
  198. package/dist/components/salla-add-product-button.js.map +1 -0
  199. package/dist/components/salla-button.js +2 -0
  200. package/dist/components/salla-button.js.map +1 -0
  201. package/dist/components/salla-button2.js +2 -0
  202. package/dist/components/salla-button2.js.map +1 -0
  203. package/dist/components/salla-cart-summary.js +2 -0
  204. package/dist/components/salla-cart-summary.js.map +1 -0
  205. package/dist/components/salla-color-picker.js +2 -0
  206. package/dist/components/salla-color-picker.js.map +1 -0
  207. package/dist/components/salla-color-picker2.js +2 -0
  208. package/dist/components/salla-color-picker2.js.map +1 -0
  209. package/dist/components/salla-comment-form.js +2 -0
  210. package/dist/components/salla-comment-form.js.map +1 -0
  211. package/dist/components/salla-conditional-fields.js +2 -0
  212. package/dist/components/salla-conditional-fields.js.map +1 -0
  213. package/dist/components/salla-conditional-fields2.js +2 -0
  214. package/dist/components/salla-conditional-fields2.js.map +1 -0
  215. package/dist/components/salla-count-down.js +2 -0
  216. package/dist/components/salla-count-down.js.map +1 -0
  217. package/dist/components/salla-datetime-picker.js +2 -0
  218. package/dist/components/salla-datetime-picker.js.map +1 -0
  219. package/dist/components/salla-datetime-picker2.js +2 -0
  220. package/dist/components/salla-datetime-picker2.js.map +1 -0
  221. package/dist/components/salla-file-upload.js +2 -0
  222. package/dist/components/salla-file-upload.js.map +1 -0
  223. package/dist/components/salla-file-upload2.js +2 -0
  224. package/dist/components/salla-file-upload2.js.map +1 -0
  225. package/dist/components/salla-gifting.js +2 -0
  226. package/dist/components/salla-gifting.js.map +1 -0
  227. package/dist/components/salla-infinite-scroll.js +2 -0
  228. package/dist/components/salla-infinite-scroll.js.map +1 -0
  229. package/dist/components/salla-installment.js +2 -0
  230. package/dist/components/salla-installment.js.map +1 -0
  231. package/dist/components/salla-list-tile.js +2 -0
  232. package/dist/components/salla-list-tile.js.map +1 -0
  233. package/dist/components/salla-list-tile2.js +2 -0
  234. package/dist/components/salla-list-tile2.js.map +1 -0
  235. package/dist/components/salla-loading.js +2 -0
  236. package/dist/components/salla-loading.js.map +1 -0
  237. package/dist/components/salla-loading2.js +2 -0
  238. package/dist/components/salla-loading2.js.map +1 -0
  239. package/dist/components/salla-localization-modal.js +2 -0
  240. package/dist/components/salla-localization-modal.js.map +1 -0
  241. package/dist/components/salla-login-modal.js +2 -0
  242. package/dist/components/salla-login-modal.js.map +1 -0
  243. package/dist/components/salla-loyalty-prize-item.js +2 -0
  244. package/dist/components/salla-loyalty-prize-item.js.map +1 -0
  245. package/dist/components/salla-loyalty.js +2 -0
  246. package/dist/components/salla-loyalty.js.map +1 -0
  247. package/dist/components/salla-map.js +2 -0
  248. package/dist/components/salla-map.js.map +1 -0
  249. package/dist/components/salla-map2.js +2 -0
  250. package/dist/components/salla-map2.js.map +1 -0
  251. package/dist/components/salla-modal.js +2 -0
  252. package/dist/components/salla-modal.js.map +1 -0
  253. package/dist/components/salla-modal2.js +2 -0
  254. package/dist/components/salla-modal2.js.map +1 -0
  255. package/dist/components/salla-offer-modal.js +2 -0
  256. package/dist/components/salla-offer-modal.js.map +1 -0
  257. package/dist/components/salla-placeholder.js +2 -0
  258. package/dist/components/salla-placeholder.js.map +1 -0
  259. package/dist/components/salla-placeholder2.js +2 -0
  260. package/dist/components/salla-placeholder2.js.map +1 -0
  261. package/dist/components/salla-product-availability.js +2 -0
  262. package/dist/components/salla-product-availability.js.map +1 -0
  263. package/dist/components/salla-product-availability2.js +2 -0
  264. package/dist/components/salla-product-availability2.js.map +1 -0
  265. package/dist/components/salla-product-options.js +2 -0
  266. package/dist/components/salla-product-options.js.map +1 -0
  267. package/dist/components/salla-product-size-guide.js +2 -0
  268. package/dist/components/salla-product-size-guide.js.map +1 -0
  269. package/dist/components/salla-progress-bar.js +2 -0
  270. package/dist/components/salla-progress-bar.js.map +1 -0
  271. package/dist/components/salla-progress-bar2.js +2 -0
  272. package/dist/components/salla-progress-bar2.js.map +1 -0
  273. package/dist/components/salla-quantity-input.js +2 -0
  274. package/dist/components/salla-quantity-input.js.map +1 -0
  275. package/dist/components/salla-quick-buy.js +2 -0
  276. package/dist/components/salla-quick-buy.js.map +1 -0
  277. package/dist/components/salla-quick-buy2.js +3 -1
  278. package/dist/components/salla-quick-buy2.js.map +1 -0
  279. package/dist/components/salla-quick-order.js +2 -0
  280. package/dist/components/salla-quick-order.js.map +1 -0
  281. package/dist/components/salla-rating-modal.js +2 -0
  282. package/dist/components/salla-rating-modal.js.map +1 -0
  283. package/dist/components/salla-rating-stars.js +2 -0
  284. package/dist/components/salla-rating-stars.js.map +1 -0
  285. package/dist/components/salla-rating-stars2.js +2 -0
  286. package/dist/components/salla-rating-stars2.js.map +1 -0
  287. package/dist/components/salla-scopes.js +2 -0
  288. package/dist/components/salla-scopes.js.map +1 -0
  289. package/dist/components/salla-search.js +2 -0
  290. package/dist/components/salla-search.js.map +1 -0
  291. package/dist/components/salla-select.js +2 -0
  292. package/dist/components/salla-select.js.map +1 -0
  293. package/dist/components/salla-skeleton.js +2 -0
  294. package/dist/components/salla-skeleton.js.map +1 -0
  295. package/dist/components/salla-skeleton2.js +2 -0
  296. package/dist/components/salla-skeleton2.js.map +1 -0
  297. package/dist/components/salla-slider.js +2 -0
  298. package/dist/components/salla-slider.js.map +1 -0
  299. package/dist/components/salla-slider2.js +2 -0
  300. package/dist/components/salla-slider2.js.map +1 -0
  301. package/dist/components/salla-social-share.js +2 -0
  302. package/dist/components/salla-social-share.js.map +1 -0
  303. package/dist/components/salla-tab-content.js +2 -0
  304. package/dist/components/salla-tab-content.js.map +1 -0
  305. package/dist/components/salla-tab-content2.js +2 -0
  306. package/dist/components/salla-tab-content2.js.map +1 -0
  307. package/dist/components/salla-tab-header.js +2 -0
  308. package/dist/components/salla-tab-header.js.map +1 -0
  309. package/dist/components/salla-tab-header2.js +2 -0
  310. package/dist/components/salla-tab-header2.js.map +1 -0
  311. package/dist/components/salla-tabs.js +2 -0
  312. package/dist/components/salla-tabs.js.map +1 -0
  313. package/dist/components/salla-tabs2.js +2 -0
  314. package/dist/components/salla-tabs2.js.map +1 -0
  315. package/dist/components/salla-tel-input.js +2 -0
  316. package/dist/components/salla-tel-input.js.map +1 -0
  317. package/dist/components/salla-tel-input2.js +2 -0
  318. package/dist/components/salla-tel-input2.js.map +1 -0
  319. package/dist/components/salla-user-menu.js +2 -0
  320. package/dist/components/salla-user-menu.js.map +1 -0
  321. package/dist/components/salla-user-settings.js +2 -0
  322. package/dist/components/salla-user-settings.js.map +1 -0
  323. package/dist/components/salla-verify.js +2 -0
  324. package/dist/components/salla-verify.js.map +1 -0
  325. package/dist/components/salla-verify2.js +2 -0
  326. package/dist/components/salla-verify2.js.map +1 -0
  327. package/dist/components/search.js +2 -0
  328. package/dist/components/search.js.map +1 -0
  329. package/dist/components/star.js +2 -0
  330. package/dist/components/star.js.map +1 -0
  331. package/dist/components/star2.js +2 -0
  332. package/dist/components/star2.js.map +1 -0
  333. package/dist/esm/_commonjsHelpers-a7c4abac.js +2 -0
  334. package/dist/esm/_commonjsHelpers-a7c4abac.js.map +1 -0
  335. package/dist/esm/app-globals-30874674.js +2 -0
  336. package/dist/esm/app-globals-30874674.js.map +1 -0
  337. package/dist/esm/camera-647ab50f.js +2 -0
  338. package/dist/esm/camera-647ab50f.js.map +1 -0
  339. package/dist/esm/cart-8c60b447.js +2 -0
  340. package/dist/esm/cart-8c60b447.js.map +1 -0
  341. package/dist/esm/css-shim-0e7604db.js +2 -0
  342. package/dist/esm/css-shim-0e7604db.js.map +1 -0
  343. package/dist/esm/dom-a1a72c67.js +2 -0
  344. package/dist/esm/dom-a1a72c67.js.map +1 -0
  345. package/dist/esm/index-f1d446ac.js +2 -0
  346. package/dist/esm/index-f1d446ac.js.map +1 -0
  347. package/dist/esm/index.js +2 -0
  348. package/dist/esm/index.js.map +1 -0
  349. package/dist/esm/loader.js +2 -0
  350. package/dist/esm/loader.js.map +1 -0
  351. package/dist/esm/salla-add-product-button.entry.js +2 -0
  352. package/dist/esm/salla-add-product-button.entry.js.map +1 -0
  353. package/dist/esm/salla-button_37.entry.js +3 -1
  354. package/dist/esm/salla-button_37.entry.js.map +1 -0
  355. package/dist/esm/salla-comment-form.entry.js +2 -0
  356. package/dist/esm/salla-comment-form.entry.js.map +1 -0
  357. package/dist/esm/salla-conditional-fields.entry.js +2 -0
  358. package/dist/esm/salla-conditional-fields.entry.js.map +1 -0
  359. package/dist/esm/salla-installment.entry.js +2 -0
  360. package/dist/esm/salla-installment.entry.js.map +1 -0
  361. package/dist/esm/salla-loyalty-prize-item.entry.js +2 -0
  362. package/dist/esm/salla-loyalty-prize-item.entry.js.map +1 -0
  363. package/dist/esm/salla-product-options.entry.js +2 -0
  364. package/dist/esm/salla-product-options.entry.js.map +1 -0
  365. package/dist/esm/salla-select.entry.js +2 -0
  366. package/dist/esm/salla-select.entry.js.map +1 -0
  367. package/dist/esm/twilight.js +2 -0
  368. package/dist/esm/twilight.js.map +1 -0
  369. package/dist/esm-es5/_commonjsHelpers-a7c4abac.js +2 -1
  370. package/dist/esm-es5/_commonjsHelpers-a7c4abac.js.map +1 -0
  371. package/dist/esm-es5/app-globals-30874674.js +2 -1
  372. package/dist/esm-es5/app-globals-30874674.js.map +1 -0
  373. package/dist/esm-es5/camera-647ab50f.js +2 -1
  374. package/dist/esm-es5/camera-647ab50f.js.map +1 -0
  375. package/dist/esm-es5/cart-8c60b447.js +2 -1
  376. package/dist/esm-es5/cart-8c60b447.js.map +1 -0
  377. package/dist/esm-es5/css-shim-0e7604db.js +2 -1
  378. package/dist/esm-es5/css-shim-0e7604db.js.map +1 -0
  379. package/dist/esm-es5/dom-a1a72c67.js +2 -1
  380. package/dist/esm-es5/dom-a1a72c67.js.map +1 -0
  381. package/dist/esm-es5/index-f1d446ac.js +2 -1
  382. package/dist/esm-es5/index-f1d446ac.js.map +1 -0
  383. package/dist/esm-es5/index.js +1 -0
  384. package/dist/esm-es5/index.js.map +1 -0
  385. package/dist/esm-es5/loader.js +2 -1
  386. package/dist/esm-es5/loader.js.map +1 -0
  387. package/dist/esm-es5/salla-add-product-button.entry.js +2 -1
  388. package/dist/esm-es5/salla-add-product-button.entry.js.map +1 -0
  389. package/dist/esm-es5/salla-button_37.entry.js +2 -1
  390. package/dist/esm-es5/salla-button_37.entry.js.map +1 -0
  391. package/dist/esm-es5/salla-comment-form.entry.js +2 -1
  392. package/dist/esm-es5/salla-comment-form.entry.js.map +1 -0
  393. package/dist/esm-es5/salla-conditional-fields.entry.js +2 -1
  394. package/dist/esm-es5/salla-conditional-fields.entry.js.map +1 -0
  395. package/dist/esm-es5/salla-installment.entry.js +2 -1
  396. package/dist/esm-es5/salla-installment.entry.js.map +1 -0
  397. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +2 -1
  398. package/dist/esm-es5/salla-loyalty-prize-item.entry.js.map +1 -0
  399. package/dist/esm-es5/salla-product-options.entry.js +2 -1
  400. package/dist/esm-es5/salla-product-options.entry.js.map +1 -0
  401. package/dist/esm-es5/salla-select.entry.js +2 -1
  402. package/dist/esm-es5/salla-select.entry.js.map +1 -0
  403. package/dist/esm-es5/twilight.js +2 -1
  404. package/dist/esm-es5/twilight.js.map +1 -0
  405. package/dist/twilight/index.esm.js +2 -0
  406. package/dist/twilight/index.esm.js.map +1 -0
  407. package/dist/twilight/p-195385b2.system.entry.js +2 -1
  408. package/dist/twilight/p-195385b2.system.entry.js.map +1 -0
  409. package/dist/twilight/p-1b53ebda.system.entry.js +2 -1
  410. package/dist/twilight/p-1b53ebda.system.entry.js.map +1 -0
  411. package/dist/twilight/p-217e1d1c.system.entry.js +2 -1
  412. package/dist/twilight/p-217e1d1c.system.entry.js.map +1 -0
  413. package/dist/twilight/p-244303eb.system.entry.js +2 -1
  414. package/dist/twilight/p-244303eb.system.entry.js.map +1 -0
  415. package/dist/twilight/p-263fa3eb.entry.js +5 -0
  416. package/dist/twilight/p-263fa3eb.entry.js.map +1 -0
  417. package/dist/twilight/p-3d828bb4.js +2 -1
  418. package/dist/twilight/p-3d828bb4.js.map +1 -0
  419. package/dist/twilight/{p-0d221d45.system.entry.js → p-47d4791b.system.entry.js} +2 -1
  420. package/dist/twilight/p-47d4791b.system.entry.js.map +1 -0
  421. package/dist/twilight/p-4bf1c1a4.system.js +2 -1
  422. package/dist/twilight/p-4bf1c1a4.system.js.map +1 -0
  423. package/dist/twilight/p-4db4fcd9.entry.js +5 -0
  424. package/dist/twilight/p-4db4fcd9.entry.js.map +1 -0
  425. package/dist/twilight/p-56830c52.system.entry.js +2 -1
  426. package/dist/twilight/p-56830c52.system.entry.js.map +1 -0
  427. package/dist/twilight/p-5db948f2.js +12 -9
  428. package/dist/twilight/p-5db948f2.js.map +1 -0
  429. package/dist/twilight/p-6c70f3bc.entry.js +5 -0
  430. package/dist/twilight/p-6c70f3bc.entry.js.map +1 -0
  431. package/dist/twilight/p-71b1ddca.js +10 -3
  432. package/dist/twilight/p-71b1ddca.js.map +1 -0
  433. package/dist/twilight/p-776c1d2a.system.entry.js +2 -1
  434. package/dist/twilight/p-776c1d2a.system.entry.js.map +1 -0
  435. package/dist/twilight/p-7dc66c07.js +3 -2
  436. package/dist/twilight/p-7dc66c07.js.map +1 -0
  437. package/dist/twilight/p-7f520307.system.js +2 -1
  438. package/dist/twilight/p-7f520307.system.js.map +1 -0
  439. package/dist/twilight/p-854e2c89.system.js +2 -1
  440. package/dist/twilight/p-854e2c89.system.js.map +1 -0
  441. package/dist/twilight/p-89f1c6be.system.js +2 -1
  442. package/dist/twilight/p-89f1c6be.system.js.map +1 -0
  443. package/dist/twilight/p-8a13cf01.js +2 -1
  444. package/dist/twilight/p-8a13cf01.js.map +1 -0
  445. package/dist/twilight/p-916b409e.entry.js +5 -0
  446. package/dist/twilight/p-916b409e.entry.js.map +1 -0
  447. package/dist/twilight/p-99ed8fff.system.js +2 -1
  448. package/dist/twilight/p-99ed8fff.system.js.map +1 -0
  449. package/dist/twilight/p-a2885c84.entry.js +54 -0
  450. package/dist/twilight/p-a2885c84.entry.js.map +1 -0
  451. package/dist/twilight/p-ad42e3b6.system.js +2 -1
  452. package/dist/twilight/p-ad42e3b6.system.js.map +1 -0
  453. package/dist/twilight/p-b540cfc6.system.entry.js +2 -1
  454. package/dist/twilight/p-b540cfc6.system.entry.js.map +1 -0
  455. package/dist/twilight/p-b7610000.system.js +2 -1
  456. package/dist/twilight/p-b7610000.system.js.map +1 -0
  457. package/dist/twilight/p-bf0e322d.entry.js +5 -0
  458. package/dist/twilight/p-bf0e322d.entry.js.map +1 -0
  459. package/dist/twilight/p-c328c14e.system.js +2 -1
  460. package/dist/twilight/p-c328c14e.system.js.map +1 -0
  461. package/dist/twilight/p-ccd78636.js +2 -1
  462. package/dist/twilight/p-ccd78636.js.map +1 -0
  463. package/dist/twilight/p-ce54db8d.js +2 -1
  464. package/dist/twilight/p-ce54db8d.js.map +1 -0
  465. package/dist/twilight/p-d9130020.system.js +2 -1
  466. package/dist/twilight/p-d9130020.system.js.map +1 -0
  467. package/dist/twilight/p-ea05267e.entry.js +5 -0
  468. package/dist/twilight/p-ea05267e.entry.js.map +1 -0
  469. package/dist/twilight/p-fc4186fb.entry.js +5 -0
  470. package/dist/twilight/p-fc4186fb.entry.js.map +1 -0
  471. package/dist/twilight/twilight.esm.js +2 -1
  472. package/dist/twilight/twilight.esm.js.map +1 -0
  473. package/package.json +2 -2
  474. package/dist/twilight/p-03695034.entry.js +0 -4
  475. package/dist/twilight/p-55eb5ff5.entry.js +0 -4
  476. package/dist/twilight/p-643ea74e.entry.js +0 -4
  477. package/dist/twilight/p-7707edf6.entry.js +0 -4
  478. package/dist/twilight/p-7d966812.entry.js +0 -4
  479. package/dist/twilight/p-a7bd281c.entry.js +0 -4
  480. package/dist/twilight/p-df0e0ea8.entry.js +0 -36
  481. package/dist/twilight/p-f0de0ca1.entry.js +0 -4
@@ -0,0 +1 @@
1
+ {"file":"salla-map2.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,MAAM,KAAK,GAA+B;EACxC;IACE,WAAW,EAAE,OAAO;IACpB,WAAW,EAAE,UAAU;IACvB,OAAO,EAAE;MACP;QACE,KAAK,EAAE,SAAS;OACjB;MACD;QACE,SAAS,EAAE,EAAE;OACd;KACF;GACF;EACD;IACE,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,UAAU;IACvB,OAAO,EAAE;MACP;QACE,KAAK,EAAE,SAAS;OACjB;MACD;QACE,SAAS,EAAE,EAAE;OACd;KACF;GACF;EACD;IACE,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,eAAe;IAC5B,OAAO,EAAE;MACP;QACE,KAAK,EAAE,SAAS;OACjB;MACD;QACE,SAAS,EAAE,EAAE;OACd;KACF;GACF;EACD;IACE,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,iBAAiB;IAC9B,OAAO,EAAE;MACP;QACE,KAAK,EAAE,SAAS;OACjB;MACD;QACE,SAAS,EAAE,EAAE;OACd;MACD;QACE,MAAM,EAAE,GAAG;OACZ;KACF;GACF;EACD;IACE,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,UAAU;IACvB,OAAO,EAAE;MACP;QACE,KAAK,EAAE,SAAS;OACjB;MACD;QACE,SAAS,EAAE,EAAE;OACd;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,EACf,KAAK,EAAC,uBAAuB,IAE7B,YAAM,KAAK,EAAC,qBAAqB,EAAC,SAAS,EAAE,IAAI,CAAC,gBAAgB,GAAG,IAAI,GAAG,QAAQ,GAAI,EACvF,IAAI,CAAC,gBAAgB,IACpB,eACG,IAAI,CAAC,gBAAgB,SAAK,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAChE,KAEN,IAAI,CAAC,iBAAiB,CACvB,CACY,CACV,EAEP,aAAO,KAAK,EAAC,UAAU,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,EACvF,GAAG,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,GAAG,KAAK,GAAI,CACpC,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/salla-map/map-styles.ts","./node_modules/google-maps/lib/esm/loader.js","./src/components/salla-map/salla-map.scss?tag=salla-map","./src/components/salla-map/salla-map.tsx"],"sourcesContent":["// export json\nconst light: google.maps.MapTypeStyle[] = [\n {\n featureType: 'water',\n elementType: 'geometry',\n stylers: [\n {\n color: '#e9e9e9',\n },\n {\n lightness: 17,\n },\n ],\n },\n {\n featureType: 'landscape',\n elementType: 'geometry',\n stylers: [\n {\n color: '#f5f5f5',\n },\n {\n lightness: 20,\n },\n ],\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry.fill',\n stylers: [\n {\n color: '#ffffff',\n },\n {\n lightness: 17,\n },\n ],\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry.stroke',\n stylers: [\n {\n color: '#ffffff',\n },\n {\n lightness: 29,\n },\n {\n weight: 0.2,\n },\n ],\n },\n {\n featureType: 'road.arterial',\n elementType: 'geometry',\n stylers: [\n {\n color: '#ffffff',\n },\n {\n lightness: 18,\n },\n ],\n },\n {\n featureType: 'road.local',\n elementType: 'geometry',\n stylers: [\n {\n color: '#ffffff',\n },\n {\n lightness: 16,\n },\n ],\n },\n {\n featureType: 'poi',\n elementType: 'geometry',\n stylers: [\n {\n color: '#f5f5f5',\n },\n {\n lightness: 21,\n },\n ],\n },\n {\n featureType: 'poi.park',\n elementType: 'geometry',\n stylers: [\n {\n color: '#dedede',\n },\n {\n lightness: 21,\n },\n ],\n },\n {\n elementType: 'labels.text.stroke',\n stylers: [\n {\n visibility: 'on',\n },\n {\n color: '#ffffff',\n },\n {\n lightness: 16,\n },\n ],\n },\n {\n elementType: 'labels.text.fill',\n stylers: [\n {\n saturation: 36,\n },\n {\n color: '#333333',\n },\n {\n lightness: 40,\n },\n ],\n },\n {\n elementType: 'labels.icon',\n stylers: [\n {\n visibility: 'off',\n },\n ],\n },\n {\n featureType: 'transit',\n elementType: 'geometry',\n stylers: [\n {\n color: '#f2f2f2',\n },\n {\n lightness: 19,\n },\n ],\n },\n {\n featureType: 'administrative',\n elementType: 'geometry.fill',\n stylers: [\n {\n color: '#fefefe',\n },\n {\n lightness: 20,\n },\n ],\n },\n {\n featureType: 'administrative',\n elementType: 'geometry.stroke',\n stylers: [\n {\n color: '#fefefe',\n },\n {\n lightness: 17,\n },\n {\n weight: 1.2,\n },\n ],\n },\n];\nconst dark: google.maps.MapTypeStyle[] = [\n {\n elementType: 'geometry',\n stylers: [\n {\n color: '#242f3e',\n },\n ],\n },\n {\n elementType: 'labels.text.fill',\n stylers: [\n {\n color: '#746855',\n },\n ],\n },\n {\n elementType: 'labels.text.stroke',\n stylers: [\n {\n color: '#242f3e',\n },\n ],\n },\n {\n featureType: 'administrative.locality',\n elementType: 'labels.text.fill',\n stylers: [\n {\n color: '#d59563',\n },\n ],\n },\n {\n featureType: 'poi',\n elementType: 'labels.text.fill',\n stylers: [\n {\n color: '#d59563',\n },\n ],\n },\n {\n featureType: 'poi.park',\n elementType: 'geometry',\n stylers: [\n {\n color: '#263c3f',\n },\n ],\n },\n {\n featureType: 'poi.park',\n elementType: 'labels.text.fill',\n stylers: [\n {\n color: '#6b9a76',\n },\n ],\n },\n {\n featureType: 'road',\n elementType: 'geometry',\n stylers: [\n {\n color: '#38414e',\n },\n ],\n },\n {\n featureType: 'road',\n elementType: 'geometry.stroke',\n stylers: [\n {\n color: '#212a37',\n },\n ],\n },\n {\n featureType: 'road',\n elementType: 'labels.text.fill',\n stylers: [\n {\n color: '#9ca5b3',\n },\n ],\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry',\n stylers: [\n {\n color: '#746855',\n },\n ],\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry.stroke',\n stylers: [\n {\n color: '#1f2835',\n },\n ],\n },\n {\n featureType: 'road.highway',\n elementType: 'labels.text.fill',\n stylers: [\n {\n color: '#f3d19c',\n },\n ],\n },\n {\n featureType: 'transit',\n elementType: 'geometry',\n stylers: [\n {\n color: '#2f3948',\n },\n ],\n },\n {\n featureType: 'transit.station',\n elementType: 'labels.text.fill',\n stylers: [\n {\n color: '#d59563',\n },\n ],\n },\n {\n featureType: 'water',\n elementType: 'geometry',\n stylers: [\n {\n color: '#17263c',\n },\n ],\n },\n {\n featureType: 'water',\n elementType: 'labels.text.fill',\n stylers: [\n {\n color: '#515c6d',\n },\n ],\n },\n {\n featureType: 'water',\n elementType: 'labels.text.stroke',\n stylers: [\n {\n color: '#17263c',\n },\n ],\n },\n];\nexport default {\n light,\n dark,\n};\n","export class Loader {\n constructor(apiKey = null, options = {}) {\n this.apiKey = apiKey;\n this.options = options;\n if (typeof window === 'undefined') {\n throw new Error('google-maps is supported only in browser environment');\n }\n }\n load() {\n if (typeof this.api !== 'undefined') {\n return Promise.resolve(this.api);\n }\n if (typeof this.loader !== 'undefined') {\n return this.loader;\n }\n window[Loader.CALLBACK_NAME] = () => {\n this.api = window['google'];\n if (typeof this.resolve === 'undefined') {\n throw new Error('Should not happen');\n }\n this.resolve(this.api);\n };\n window['gm_authFailure'] = () => {\n if (typeof this.reject === 'undefined') {\n throw new Error('Should not happen');\n }\n this.reject(new Error('google-maps: authentication error'));\n };\n return this.loader = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n const script = document.createElement('script');\n script.src = this.createUrl();\n script.async = true;\n script.onerror = (e) => reject(e);\n document.head.appendChild(script);\n });\n }\n createUrl() {\n const parameters = [\n `callback=${Loader.CALLBACK_NAME}`,\n ];\n if (this.apiKey) {\n parameters.push(`key=${this.apiKey}`);\n }\n for (let name in this.options) {\n if (this.options.hasOwnProperty(name)) {\n let value = this.options[name];\n if (name === 'version') {\n name = 'v';\n }\n if (name === 'libraries') {\n value = value.join(',');\n }\n parameters.push(`${name}=${value}`);\n }\n }\n return `https://maps.googleapis.com/maps/api/js?${parameters.join('&')}`;\n }\n}\nLoader.CALLBACK_NAME = '_dk_google_maps_loader_cb';\n//# sourceMappingURL=loader.js.map","/*\n* Salla Location Component: location popup modal\n* You can use these classes to target the elements in the component.\n*/\n\n.s-map {\n &-wrapper {}\n\n &-modal {\n &-wrapper {\n\n }\n &-title{\n\n }\n &-body{\n\n }\n &-map-element{\n\n }\n &-my-location-button{\n\n }\n &-submit-button{\n\n }\n }\n &-location{\n &-button{\n\n }\n &-icon{\n \n }\n }\n}\n","import { Component, Host, h, Prop, Method, State, Event, EventEmitter, Element } from '@stencil/core';\nimport Location from '../../assets/svg/location.svg';\nimport Edit from '../../assets/svg/edit.svg';\nimport CurrentLocation from '../../assets/svg/location-target.svg';\nimport LocationMarker from '../../assets/svg/location-marker.svg';\nimport styles from './map-styles';\n\n// import google maps\nimport { Loader, LoaderOptions } from 'google-maps';\n\n@Component({\n tag: 'salla-map',\n styleUrl: 'salla-map.scss',\n})\nexport class SallaMap {\n // private variables\n private map: google.maps.Map;\n private locationModal: HTMLSallaModalElement;\n private marker: google.maps.Marker;\n private defaultLat: number = 21.419421;//Mecca 🕋\n private defaultLng: number = 39.82553;//Mecca 🕋\n @Element() host: HTMLElement;\n // state variables\n @State() modalActivityTitle: string = salla.lang.get('pages.checkout.select_your_address_from_map');\n @State() confirmButtonTitle: string = salla.lang.get('pages.checkout.confirm_address');\n @State() locateButtonTitle: string = salla.lang.get('pages.cart.detect_location');\n @State() locateButtonEdit: string = salla.lang.get('common.elements.edit');\n @State() searchPlaceholder: string = salla.lang.get('pages.checkout.search_for_address');\n @State() searchInputValue: string = null;\n @State() formattedAddress: string = '';\n @State() geolocationError: boolean = false;\n @State() searchInput: HTMLInputElement;\n @State() mapInput: HTMLInputElement;\n @State() mapElement: HTMLElement;\n @State() selectedLat: number;\n @State() selectedLng: number;\n\n constructor() {\n salla.lang.onLoaded(() => {\n this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');\n this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');\n this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');\n this.locateButtonEdit = salla.lang.get('common.elements.edit');\n this.searchPlaceholder = salla.lang.get('pages.checkout.search_for_address');\n });\n this.apiKey = 'AIzaSyBPhPJ4KG13ywvmeAovLRnbi7WzlsdcWKs';\n }\n\n private formatAddress(address: string) {\n return address.length > 25 ? address.substring(0, 25) + '...' : address;\n }\n\n private getLatLng(){\n return this.selectedLat && this.selectedLng ? `${this.selectedLat}, ${this.selectedLng}` : null\n }\n private getPositionAddress(location: google.maps.LatLng, submit: boolean = false) {\n // get address and set it to search input\n const Geocoder = new google.maps.Geocoder();\n Geocoder.geocode(\n {\n location,\n },\n (results, status) => {\n if (status === google.maps.GeocoderStatus.OK) {\n if (this.searchable) {\n this.searchInputValue = results[0].formatted_address;\n this.searchInput.value = results[0].formatted_address;\n }\n if (submit) {\n this.formattedAddress = results[0].formatted_address;\n }\n }\n }\n );\n }\n\n private initGoogleMaps(options: LoaderOptions, mapDOM: Element) {\n const loader = new Loader(this.apiKey, options);\n\n loader.load().then(google => {\n this.map = new google.maps.Map(mapDOM, {\n center: (this.lat || this.lng) ? {\n lat: this.lat,\n lng: this.lng,\n } : {\n lat: this.defaultLat,\n lng: this.defaultLng,\n },\n zoom: this.zoom,\n zoomControl: true,\n mapTypeControl: false,\n scaleControl: false,\n streetViewControl: false,\n rotateControl: false,\n fullscreenControl: false,\n disableDefaultUI: false,\n });\n\n this.map.setOptions({\n styles: this.theme === 'light' ? styles.light : styles.dark,\n });\n\n this.marker = new google.maps.Marker({\n position: this.map.getCenter(),\n map: this.map,\n icon: {\n url: 'data:image/svg+xml;utf8,' + encodeURIComponent(LocationMarker),\n scaledSize: new google.maps.Size(30, 30),\n },\n });\n\n if (this.searchable) {\n const searchBox = new google.maps.places.SearchBox(this.searchInput);\n google.maps.event.addListener(searchBox, 'places_changed', () => {\n const places = searchBox.getPlaces();\n // goto first place\n if (places.length > 0 && this.map) {\n this.map.setCenter(places[0].geometry.location);\n this.lat = places[0].geometry.location.lat();\n this.lng = places[0].geometry.location.lng();\n // set marker\n this.marker.setPosition(places[0].geometry.location);\n this.searchInputValue = places[0].formatted_address;\n this.formattedAddress = places[0].formatted_address;\n }\n });\n }\n // add listener to map\n google.maps.event.addListener(this.map, 'click', e => {\n if (this.readonly) return;\n this.marker.setPosition(e.latLng);\n this.lat = e.latLng.lat();\n this.lng = e.latLng.lng();\n this.getPositionAddress(e.latLng);\n this.mapClicked.emit({\n lat: e.latLng.lat(),\n lng: e.latLng.lng(),\n address: this.formattedAddress ? this.formattedAddress : null,\n });\n });\n if (!this.lat && !this.lng) {\n this.getCurrentLocation();\n if (this.geolocationError) {\n this.map.setCenter({\n lat: this.lat,\n lng: this.lng,\n });\n this.marker.setPosition({\n lat: this.lat,\n lng: this.lng,\n });\n }\n }\n });\n }\n\n private getCurrentLocation() {\n if (navigator.geolocation && this.map) {\n navigator.geolocation.getCurrentPosition(position => {\n // set map to this location\n const mapOptions = {\n center: new google.maps.LatLng(position.coords.latitude, position.coords.longitude),\n zoom: 15,\n };\n this.map.setOptions(mapOptions);\n // set marker\n this.marker.setPosition(mapOptions.center);\n this.getPositionAddress(mapOptions.center);\n this.lat = position.coords.latitude;\n this.lng = position.coords.longitude;\n this.currentLocationChanged.emit({\n lat: position.coords.latitude,\n lng: position.coords.longitude,\n address: this.formattedAddress ? this.formattedAddress : null,\n });\n }, this.handleLocationError.bind(this));\n } else {\n salla.log('Geolocation is not supported by this browser.');\n this.geolocationError = true;\n }\n }\n\n private handleLocationError(error) {\n this.geolocationError = true;\n switch (error.code) {\n case error.PERMISSION_DENIED:\n salla.log('User denied the request for Geolocation.');\n break;\n case error.POSITION_UNAVAILABLE:\n salla.log('Location information is unavailable.');\n break;\n case error.TIMEOUT:\n salla.log('The request to get user location timed out.');\n break;\n case error.UNKNOWN_ERROR:\n salla.log('An unknown error occurred.');\n break;\n }\n }\n componentDidLoad() {\n // if lat and lng provided then get the formatted address\n if (this.lat && this.lng) {\n // get address\n fetch(\n `https://maps.googleapis.com/maps/api/geocode/json?latlng=${this.lat},${this.lng}&key=${this.apiKey}&language=${salla.config.get('user.language_code') ||\n document.documentElement.lang ||\n 'ar'}`\n )\n .then(res => res.json())\n .then(res => {\n if (res.status === 'OK') {\n this.formattedAddress = res.results[0].formatted_address;\n this.searchInputValue = res.results[0].formatted_address;\n this.searchInput.value = res.results[0].formatted_address;\n this.selectedLng = this.lng;\n this.selectedLat = this.lat;\n }\n }\n );\n }\n this.mapInput.addEventListener('invalid', e => {\n this.invalidInput.emit(e);\n });\n this.mapInput.addEventListener('input', () => {\n this.mapInput.setCustomValidity('');\n this.mapInput.reportValidity();\n });\n }\n /**\n * Open location component\n */\n @Method()\n async open() {\n // only init google maps on modal open :) to save resources\n if (!this.map)\n this.initGoogleMaps(\n {\n libraries: this.searchable ? ['places', 'search'] : [],\n language:\n salla.config.get('user.language_code') ||\n document.documentElement.lang ||\n 'ar',\n },\n this.mapElement\n );\n return this.locationModal?.open();\n }\n\n /**\n * File input name for the native formData\n */\n @Prop() name: string = 'location';\n\n /**\n * Set if the location input is required or not\n */\n @Prop() required: boolean = false;\n /**\n * Disable or enable actions\n */\n @Prop() readonly: boolean = false;\n\n /**\n * Sets the search bar visibility.\n */\n @Prop({ mutable: true }) searchable: boolean = false;\n\n /**\n * Latitude coordinate, defaults to current user location\n */\n @Prop({ mutable: true }) lat: number;\n\n /**\n * Longitude coordinate, defaults to current user location\n */\n @Prop({ mutable: true }) lng: number;\n\n /**\n * Sets google api key value, default Merchant key\n */\n @Prop({ mutable: true }) apiKey: string;\n\n /**\n * Modal Title\n */\n @Prop() modalTitle: string;\n\n /**\n * Sets start map zoom.\n */\n\n @Prop({ mutable: true }) zoom: number = 10;\n\n /**\n * Sets map style.\n */\n @Prop({ mutable: true }) theme: string = 'light';\n\n /**\n * Custom DOM event emitter when location is selected\n */\n @Event() selected: EventEmitter;\n\n /**\n * Custom DOM event emitter when map is clicked\n */\n @Event() mapClicked: EventEmitter;\n\n /**\n * Custom DOM event emitter when current location is selected\n */\n @Event() currentLocationChanged: EventEmitter;\n\n /**\n * Event emitted when the input is invalid.\n */\n @Event() invalidInput: EventEmitter<any>;\n \n // rendering functions\n private getLocationModal() {\n return (\n <div>\n <div class=\"s-map-modal-title\">{!!this.modalTitle ? this.modalTitle : this.modalActivityTitle}</div>\n <div class=\"s-map-modal-body\">\n <div class=\"s-map-element\" ref={el => (this.mapElement = el)}></div>\n {this.readonly ? \"\" :\n [\n this.searchable && (\n <div class=\"s-map-search-wrapper\">\n <input class=\"s-map-search-input\" ref={el => (this.searchInput = el)} placeholder={this.searchPlaceholder}></input>\n </div>\n ),\n <salla-button\n class=\"s-map-my-location-button\"\n onClick={() => {\n this.getCurrentLocation();\n }}\n shape=\"icon\"\n color=\"primary\"\n >\n <span innerHTML={CurrentLocation}></span>\n </salla-button>,\n <salla-button\n class=\"s-map-submit-button\"\n color=\"primary\"\n width=\"wide\"\n onClick={() => {\n let points = {\n lat: this.lat,\n lng: this.lng,\n address: this.formattedAddress ? this.formattedAddress : null,\n };\n salla.event.emit('salla-map::selected', points)\n this.selected.emit(points);\n this.selectedLat = points.lat;\n this.selectedLng = points.lng;\n this.getPositionAddress(new google.maps.LatLng(points.lat, points.lng), true);\n if (!this.selectedLat || !this.selectedLng) {\n this.mapInput.value = null;\n } else {\n this.mapInput.value = `${this.selectedLat}, ${this.selectedLng}`;\n }\n this.mapInput.dispatchEvent(new window.Event('change', { bubbles: true }))\n this.locationModal.close();\n }}\n >\n {this.confirmButtonTitle}\n </salla-button>]\n }\n </div>\n </div>\n );\n }\n\n // render\n render() {\n return (\n <Host class=\"s-map-wrapper\">\n <salla-modal\n class=\"s-map-modal-wrapper\"\n noPadding\n ref={modal => {\n this.locationModal = modal;\n }}\n >\n {this.getLocationModal()}\n </salla-modal>\n\n <slot name=\"button\">\n <salla-button\n onClick={() => {\n this.open();\n }}\n color=\"primary\"\n class=\"s-map-location-button\"\n >\n <span class=\"s-map-location-icon\" innerHTML={this.formattedAddress ? Edit : Location} />\n {this.formattedAddress ? (\n <div>\n {this.locateButtonEdit} | {this.formatAddress(this.formattedAddress)}\n </div>\n ) : (\n this.locateButtonTitle\n )}\n </salla-button>\n </slot>\n\n <input class=\"s-hidden\" name={this.name} required={this.required} value={this.getLatLng()}\n ref={color => this.mapInput = color} />\n </Host>\n );\n }\n}\n"],"version":3}
@@ -7,3 +7,5 @@ const SallaModal = SallaModal$1;
7
7
  const defineCustomElement = defineCustomElement$1;
8
8
 
9
9
  export { SallaModal, defineCustomElement };
10
+
11
+ //# sourceMappingURL=salla-modal.js.map
@@ -0,0 +1 @@
1
+ {"file":"salla-modal.js","mappings":";;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -226,3 +226,5 @@ function defineCustomElement() {
226
226
  defineCustomElement();
227
227
 
228
228
  export { CheckCircle2 as C, SallaModal as S, defineCustomElement as d };
229
+
230
+ //# sourceMappingURL=salla-modal2.js.map
@@ -0,0 +1 @@
1
+ {"file":"salla-modal2.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,aAAa,GAAG,iFAAiF;;MCW1F,UAAU;EACrB;;;;;;;IASyB,eAAU,GAAY,IAAI,CAAC;;;;IAI3B,U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AC,CAAC,IAAI,CAAC,SAAS;QACf,WAAK,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,OAAO,GAAG,eAAe,GAAGC,YAAe,GAAI;UAC/G,EAAE,CAED,EACP,WAAK,KAAK,EAAC,wBAAwB,IAChC,IAAI,CAAC,UAAU,GAAG,WAAK,KAAK,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,CAAC,aAAa,EAAE,EACjG,SAAS,EAAE,IAAI,CAAC,UAAU,GAAI,GAAG,EAAE,EACpC,IAAI,CAAC,QAAQ,GAAG,SAAG,KAAK,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,GAAI,GAAG,EAAE,CACvF,CACF;QACJ,EAAE,CACF,EACN,eAAQ,EACR,YAAM,IAAI,EAAC,QAAQ,GAAG,CAElB,CACF,CACD,EACP;GACH;;EAED,gBAAgB;IACd,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CancelIcon","CheckCircleIcon"],"sources":["./src/components/salla-modal/salla-modal.scss?tag=salla-modal","./src/components/salla-modal/salla-modal.tsx"],"sourcesContent":["/*\n* Salla Modal Component: popup modal used in most parts of the theme\n* You can use these classes to target the elements in the component.\n*/\n\n@media screen and (max-width: 470px) {\n .modal-is-open {\n position: fixed;\n width: 100%;\n }\n}\n\n.s-modal {\n &-container{\n\n }\n &-wrapper {\n\n }\n &-close {\n\n }\n &-header {\n\n }\n &-header-inner {\n\n }\n &-header-content {\n\n }\n &-header-img {\n\n }\n &-icon {\n\n }\n &-bg-normal {\n\n }\n &-bg-success {\n\n }\n &-bg-error {\n\n }\n &-bg-primary {\n\n }\n &-text-success {\n\n }\n &-text-error {\n\n }\n &-title {\n\n }\n &-sub-title {\n\n }\n &-title-below {\n\n }\n &-body-slot {\n\n }\n &-body {\n\n }\n &-padding {\n\n }\n &-spacer {\n\n }\n &-align-middle {\n\n }\n &-align-top {\n\n }\n &-align-bottom {\n\n }\n &-overlay {\n\n }\n &-overlay-leaving {\n\n }\n &-entering {\n\n }\n &-leaving {\n\n }\n &-is-center {\n\n }\n // modal sizes\n &-xs {\n\n }\n &-sm {\n\n }\n &-md {\n\n }\n &-lg {\n\n }\n &-xl {\n\n }\n &-full {\n\n }\n}\n","import { Component, Element, h, Host, Method, Prop, State, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport CancelIcon from '../../assets/svg/cancel.svg';\nimport AlertEngineIcon from '../../assets/svg/alert-engine.svg';\nimport CheckCircleIcon from '../../assets/svg/check-circle2.svg';\nimport Helper from '../../Helpers/Helper';\n\n/**\n * @slot footer - The footer of modal\n */\n\n@Component({ tag: 'salla-modal', styleUrl: 'salla-modal.scss' })\nexport class SallaModal {\n constructor() {\n salla.event.on('modal::open', target => target == this.host.id && this.open());\n salla.event.on('modal::close', target => target == this.host.id && this.close());\n this.modalTitle = this.host.getAttribute('modal-title');\n }\n\n /**\n * Sets the modal to be closable. Defaults to `true`\n */\n @Prop({ mutable: true }) isClosable: boolean = true;//todo::rename unclude. Suggestion => persistent\n /**\n * The size of the modal\n */\n @Prop({ reflect: true }) width: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full' = 'md';\n /**\n * The position of the modal\n */\n @Prop({ reflect: true }) position: 'top' | 'middle' | 'bottom' = 'middle';\n /**\n * open the modal on rendering\n */\n @Prop({ reflect: true }) visible: boolean = false;\n /**\n * open the modal on rendering\n */\n @Prop({ reflect: true }) hasSkeleton: boolean = false;\n /**\n * Show loading in the middle\n */\n @Prop({ reflect: true, mutable: true }) isLoading: boolean = false;\n\n /**\n * Show subtitle before the title or not, defaults to `false` (after the title)\n */\n @Prop() subTitleFirst: boolean = false;//todo:: choose better name\n\n /**\n * Avoid padding in the modal body or not, defaults to `false`\n */\n @Prop() noPadding: boolean = false;//todo:: choose better name\n\n /**\n * Set modal sub title.\n */\n @Prop() subTitle: string = '';\n\n /**\n * Align modal content to center, defaults to `false`\n */\n @Prop() centered: boolean = false;\n\n /**\n * Set the style of the header icon.\n */\n @Prop() iconStyle: 'error' | 'success' | 'primary' | 'normal' = undefined;\n\n @State() modalTitle: string;\n\n private overlay: HTMLElement;\n\n @Element() host: HTMLElement;\n\n /**\n * Event emitted when the modal visibilty is changed.\n */\n @Event() modalVisibilityChanged: EventEmitter<Boolean>;\n\n @Watch('visible')\n handleVisible(newValue: boolean) {\n if (!newValue) {\n this.modalVisibilityChanged.emit(false);\n this.toggleModal(false);\n return;\n }\n this.modalVisibilityChanged.emit(true);\n this.host.classList.remove('s-hidden');\n setTimeout(() => this.toggleModal(true)); //small amont of time to running toggle After adding hidden\n }\n\n @Listen('keyup')\n handleKeyUp(ev: KeyboardEvent) {\n if (ev.key === \"KeyUp\") {\n this.closeModal()\n }\n }\n\n /**\n * Open the modal\n */\n @Method()\n async open() {\n this.host.setAttribute('visible', '');\n this.handleAutoFocus();\n return this.host;\n }\n\n /**\n * close the modal\n */\n @Method()\n async close() {\n this.host.removeAttribute('visible');\n return this.host;\n }\n\n /**\n * Change the Modal Title\n * @param {string} modalTitle\n */\n @Method()\n async setTitle(modalTitle) {\n this.modalTitle = modalTitle;\n return this.host;\n }\n\n /**\n * Start loading\n */\n @Method()\n async loading() {\n this.isLoading = true;\n return this.host;\n }\n\n\n /**\n * Stop the loading\n */\n @Method()\n async stopLoading() {\n this.isLoading = false;\n return this.host;\n }\n\n private handleAutoFocus() {\n const firstFocusableElement = this.host.querySelector('input, textarea, select') as HTMLElement;\n if (!firstFocusableElement) {\n return;\n }\n setTimeout(() => {\n firstFocusableElement.focus();\n }, 100);\n }\n\n private toggleModal(isOpen) {\n const body = this.host.querySelector('.s-modal-body');\n Helper.toggleElementClassIf(body, 's-modal-entering', 's-modal-leaving', () => isOpen)\n .toggleElementClassIf(this.overlay, 's-modal-entering', 's-modal-overlay-leaving', () => isOpen)\n .toggleElementClassIf(document.body, 'modal-is-open', 'modal-is-closed', () => isOpen);\n if (!isOpen) {\n setTimeout(() => this.host.classList.add('s-hidden'), 350);\n }\n }\n\n private closeModal() {\n if (!this.isClosable) {\n return;\n }\n this.host.removeAttribute('visible');\n }\n\n private iconBlockClasses() {\n return {\n 's-modal-icon': true,\n 's-modal-bg-error': this.iconStyle == 'error',\n 's-modal-bg-success': this.iconStyle == 'success',\n 's-modal-bg-normal': !this.iconStyle,\n 's-modal-bg-primary': this.iconStyle == 'primary'\n };\n }\n\n private getWidth() {\n return this.isLoading ? (this.hasSkeleton ? 'md' : 'xs') : this.width\n }\n\n //todo:: pref for each modal\n render() {\n this.host.id = this.host.id || 'salla-modal';\n\n\n if (this.isLoading) {\n return (\n <Host class='salla-modal s-modal s-modal-container s-hidden' aria-modal=\"true\" role=\"dialog\" onKeyUp={e => this.handleKeyUp(e)}>\n <div class=\"s-modal-overlay\" ref={el => this.overlay = el} onClick={() => this.closeModal()} />\n <div class=\"s-modal-wrapper\">\n <span class={'s-modal-spacer s-modal-align-' + this.position}>&#8203;</span>\n <div class={'s-modal-body ' + 's-modal-align-' + this.position + ' s-modal-' + this.getWidth() + (this.noPadding ? ' s-modal-nopadding' : ' s-modal-padding')}>\n <slot name=\"loading\">\n <salla-loading></salla-loading>\n </slot>\n {\n // we have a limitations with StencilJS, when the component is not shadow\n // all the dom of host append to component even if <slot /> is not in the render\n // So we'll use a workaround, render all the slot as hidden when is loading\n // @see https://github.com/ionic-team/stencil/issues/399\n }\n <div class=\"s-hidden\">\n <slot />\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n\n return (\n <Host class='salla-modal s-modal s-modal-container s-hidden' aria-modal=\"true\" role=\"dialog\">\n <div class=\"s-modal-overlay\" ref={el => this.overlay = el} onClick={() => this.closeModal()} />\n <div class=\"s-modal-wrapper\">\n <span class={'s-modal-spacer s-modal-align-' + this.position}>&#8203;</span>\n <div\n class={'s-modal-body ' + 's-modal-align-' + this.position + ' s-modal-' + this.getWidth() + (this.noPadding ? ' s-modal-nopadding' : ' s-modal-padding')}>\n <div class={{ 's-modal-header': true, 's-modal-is-center': this.centered }}>\n {this.isClosable ?\n <button class=\"s-modal-close\" onClick={() => this.closeModal()} type=\"button\">\n <span innerHTML={CancelIcon} />\n </button>\n : ''}\n\n {this.modalTitle || this.subTitle ?\n <div class=\"s-modal-header-inner\">\n <slot name='icon'>\n {!!this.iconStyle ?\n <div class={this.iconBlockClasses()} innerHTML={this.iconStyle == 'error' ? AlertEngineIcon : CheckCircleIcon} />\n : ''\n }\n </slot>\n <div class=\"s-modal-header-content\">\n {this.modalTitle ? <div class={{ 's-modal-title': true, 's-modal-title-below': this.subTitleFirst }}\n innerHTML={this.modalTitle} /> : ''}\n {this.subTitle ? <p class={{ 's-modal-sub-title': true }} innerHTML={this.subTitle} /> : ''}\n </div>\n </div>\n : ''}\n </div>\n <slot />\n <slot name=\"footer\" />\n\n </div>\n </div>\n </Host>\n );\n }\n //move the modal as root dom, because we need the model to be outside the forms\n componentDidLoad() {\n document.body.append(this.host);\n }\n}\n"],"version":3}
@@ -213,3 +213,5 @@ const SallaOfferModal = SallaOfferModal$1;
213
213
  const defineCustomElement = defineCustomElement$1;
214
214
 
215
215
  export { SallaOfferModal, defineCustomElement };
216
+
217
+ //# sourceMappingURL=salla-offer-modal.js.map
@@ -0,0 +1 @@
1
+ {"file":"salla-offer-modal.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,kBAAkB,GAAG,EAAE;;MCgBhBA,iBAAe;EAa1B;;;;IARS,UAAK,GAAiB,IAAI,CAAC;IAG3B,aAAQ,GAAY,KAAK,CAAC;IAyB1B,sBAAiB,GAAY,KAAK,CAAC;IACnC,mBAAc,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IApBzE,KAAK,CAAC,KAAK,CAAC,EA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K,EAAC,sBAAsB,EAAC,IAAI,EAAC,QAAQ,IAC5C,IAAI,CAAC,KAAK,CAAC,cAAc;UACxB,SACE,KAAK,EAAC,sBAAsB,IAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,iCAAiC,CAAC,OAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAK;YAChH,EAAE,EACN,aAAO,KAAK,EAAC,8BAA8B,IACzC,aAAO,IAAI,EAAC,UAAU,EAAC,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,EAAC,8BAA8B,GAAG,aACzF,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oCAAoC,CAAC,CACtD,CACJ;OACL;MACD,yBAAmB,KAAK,EAAC,uBAAuB,EAAC,SAAS,EAAC,QAAQ,IAChE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,YAAM,IAAI,EAAC,aAAa,IAAE,IAAI,CAAC,YAAY,CAAQ,GAAG,EAAE,CAC7D,CAEV,CAAA;GACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SallaOfferModal"],"sources":["./src/components/salla-offer-modal/salla-offer-modal.scss?tag=salla-offer-modal","./src/components/salla-offer-modal/salla-offer-modal.tsx"],"sourcesContent":["/*\n* Salla Offer Modal Component: popup modal to display the offers\n* You can use these classes to target the elements in the component.\n*/\n\n.s-offer-modal {\n &-body {\n \n }\n &-badge {\n &-icon {\n\n }\n &-text {\n\n }\n }\n &-product {\n &-image-wrap {\n\n }\n &-image {\n\n }\n &-info {\n\n }\n &-name {\n\n }\n &-price {\n\n }\n &-old-price {\n\n }\n }\n &-btn-wrap {\n\n }\n &-footer {\n\n }\n &-expiry {\n\n }\n &-remember-label {\n\n }\n &-remember-input {\n\n }\n &-scrolled-slider-wrap {\n\n }\n &-slider-nav {\n\n }\n &-nav-btn {\n\n }\n &-nav-btn-icon {\n\n }\n &-next-btn {\n \n }\n &-prev-btn {\n \n }\n &-btn-is-active {\n\n }\n}","import { Component, h, Element, Method, State } from '@stencil/core';\nimport Offer from \"./offer-schema\";\nimport SpecialDiscountIcon from '../../assets/svg/special-discount.svg';\nimport Tag from \"../../assets/svg/tag.svg\";\nimport Cart2 from '../../assets/svg/cart2.svg';\n\n/**\n * @slot header - The top of the popup, has replaceable props `{name}`, `{message}`.\n * @slot product - Replaces product card, has replaceable props `{name}`, `{url}`, `{image}`, `{price}`.\n * @slot category - Replaces Category badge, has replaceable props `{name}`, `{url}`.\n */\n@Component({\n tag: 'salla-offer-modal',\n styleUrl: 'salla-offer-modal.scss'\n})\n\nexport class SallaOfferModal {\n private productSlot: string;\n private categorySlot: string;\n private modal: HTMLSallaModalElement;\n @Element() host: HTMLElement;\n @State() offer: null | Offer = null;\n @State() offer_name: string;\n @State() offer_message: string;\n @State() hasError: boolean = false;\n @State() errorMessage: string;\n @State() productID: number;\n @State() offer_type: string;\n\n constructor() {\n salla.event.on('offer-modal::open', product_id => this.open(product_id));\n\n salla.lang.onLoaded(() => {\n this.addToCartLabel = salla.lang.get(\"pages.cart.add_to_cart\")\n this.translationLoaded = true;\n });\n\n this.categorySlot = this.host.querySelector('[slot=\"category\"]')?.innerHTML || `<span class=\"s-offer-modal-badge-icon\">{tagIcon}</span><span class=\"s-offer-modal-badge-text\">{name}</span>`;\n this.productSlot = this.host.querySelector('[slot=\"product\"]')?.innerHTML || this.defaultProductSlot();\n salla.event.on('offer-modal::open', product_id => this.open(product_id));\n salla.product.event.onOfferExisted(offer => {\n if (salla.storage.get('remember-offer-' + offer.id)) {\n salla.log('User selected to don\\'t show this offer again.');\n return;\n }\n this.open(offer.product_id);\n });\n }\n\n @State() translationLoaded: boolean = false;\n @State() addToCartLabel: string = salla.lang.get(\"pages.cart.add_to_cart\");\n\n /**\n * Show the available offers for the product\n * @param product_id\n */\n @Method()\n async open(product_id: number) {\n this.productID = product_id;\n //TODO:: make sure there is only one offer\n\n this.hasError = false;\n this.modal.open()\n return await salla.api.withoutNotifier(() => salla.product.offers(product_id))\n .then(response => this.showOffer(response.data[0]))\n .catch(e => {\n this.hasError = true;\n this.errorMessage = e.response?.data?.error?.message || e.response?.data;\n })\n .finally(() => setTimeout(() => this.modal.stopLoading(), 1000));\n }\n\n /**\n * Show offer details\n * @param {Offer} offer\n */\n @Method()\n async showOffer(offer) {\n this.offer = offer;\n this.offer_name = offer.name;\n this.offer_message = offer.message;\n if (this.offer.get.discounts_table) { \n this.offer_type = 'discounts-table'\n } else if (this.offer.get.products?.length) {\n this.offer_type = 'products'\n } else if (this.offer.get.categories?.length) {\n this.offer_type = 'categories'\n }\n this.modal.setTitle(this.offer_name);\n }\n\n private rememberMe(event) {\n salla.storage.set('remember-offer-' + this.offer.id, event.target.checked);\n }\n\n private addToCart(qty) {\n //todo:: add enhancement, to cover the previous quantity, because if the discount to add two, user already added one before.\n salla.api.withoutNotifier(() => salla.cart.quickAdd(this.productID, qty)).then(() => this.modal.close())\n }\n\n private getOfferContent() {\n if (this.offer.get.discounts_table) {\n return <div class=\"s-offer-modal-discount-table\">\n <table>\n <tbody>\n {this.offer.get.discounts_table?.map(discount =>\n <tr>\n <td>{discount.text}</td>\n <td class=\"s-offer-modal-discount-table-cell\">\n <salla-button fill=\"outline\" shape=\"btn\" color=\"primary\" size=\"medium\" width=\"normal\"\n onClick={() => this.addToCart(discount.quantity)}>{this.addToCartLabel}</salla-button>\n </td>\n </tr>\n )}\n </tbody>\n </table>\n </div>\n }\n else if (this.offer.get.products?.length) {\n return <salla-slider\n type=\"carousel\"\n class={{\"s-offer-modal-slider-centered\": this.offer.get.products?.length <= 2, \"s-offer-modal-slider\": true}}\n id=\"offer-modal-slider\"\n controls-outer\n show-controls={this.offer.get.products?.length <= 2 ? 'false' : 'true'}>\n <div slot='items'>\n {\n this.offer.get.products?.map(product =>\n <div class={{\n \"s-offer-modal-product\": true,\n \"s-offer-modal-slider-item\": true,\n \"s-offer-modal-not-available\": !product.is_available\n }} id={'product_' + product.id} innerHTML={this.productSlot\n .replace(/\\{name\\}/g, product.name)\n .replace(/\\{url\\}/g, product.url)\n .replace(/\\{image\\}/g, product.thumbnail)\n .replace(/\\{price\\}/g, product.has_special_price\n ? '<span class=\"s-offer-modal-product-sale-price\">' + salla.money(product.price) + '</span><span class=\"s-offer-modal-product-old-price\">' + salla.money(product.regular_price) + '</span>'\n : salla.money(product.price))}>\n <div class=\"s-offer-modal-btn-wrap\">\n <salla-button width=\"wide\" fill='outline' data-id={product.id} disabled={!product.is_available}\n loader-position=\"center\" onClick={this.addItem}>\n {product.is_available ? salla.lang.get('pages.cart.add_to_cart') : salla.lang.get('pages.products.out_of_stock')}\n </salla-button>\n </div>\n </div>)\n }\n </div>\n </salla-slider>\n } \n else if (this.offer.get.categories?.length) {\n return <salla-slider\n type=\"carousel\"\n class={{\"s-offer-modal-slider-centered\": this.offer.get.categories?.length <= 2, \"s-offer-modal-slider\": true}}\n id=\"offer-modal-slider\"\n controls-outer\n show-controls={this.offer.get.categories?.length <= 2 ? 'false' : 'true'}>\n <div slot='items'>\n {\n this.offer.get.categories.map(category =>\n <a href={category.urls.customer} class=\"s-offer-modal-badge s-offer-modal-slider-item s-offer-modal-cat-item\" innerHTML={\n this.categorySlot\n .replace(/\\{tagIcon\\}/g, Tag)\n .replace(/\\{name\\}/g, category.name)\n .replace(/\\{url\\}/g, category.urls.customer)\n }>\n </a>\n )}\n </div>\n </salla-slider>\n }\n }\n\n //todo:: pass event then use sallaButton from it\n private addItem() {\n // this here, is sallaButton\n this['load']();\n return salla.cart.api\n .quickAdd(this['dataset'].id)\n .finally(() => this['stop']());\n }\n\n private defaultProductSlot() {\n return '<a href={url} class=\"s-offer-modal-product-image-wrap\"><img class=\"s-offer-modal-product-image\" src=\"{image}\" /></a>' +\n '<div class=\"s-offer-modal-product-info\">' +\n ' <a href={url} class=\"s-offer-modal-product-name\">{name}</a>' +\n ' <div class=\"s-offer-modal-product-price\">{price}</div>' +\n '</div>';\n }\n\n render() {\n return <salla-modal has-skeleton sub-title={this.offer_message} ref={modal => this.modal = modal}\n isLoading={true} class={`s-offer-modal-type-${this.offer_type ? this.offer_type : ''}`}>\n <div slot='loading'>\n <div class=\"s-offer-modal-skeleton\">\n <div class=\"s-offer-modal-skeleton-header\">\n <salla-skeleton type='circle' height='80px' width='80px'></salla-skeleton>\n <salla-skeleton height='15px' width='50%'></salla-skeleton>\n <salla-skeleton height='10px' width='30%'></salla-skeleton>\n </div>\n <div class=\"s-offer-modal-skeleton-items\">\n {[...Array(3)].map(() =>\n <div class=\"s-offer-modal-skeleton-item\">\n <salla-skeleton height='9rem'></salla-skeleton>\n <div class=\"s-offer-modal-skeleton-item-title\">\n <salla-skeleton height='15px' width='100%'></salla-skeleton>\n </div>\n <div class=\"s-offer-modal-skeleton-item-subtitle\">\n <salla-skeleton height='9px' width='50%'></salla-skeleton>\n <div innerHTML={Cart2}></div>\n </div>\n </div>\n )}\n </div>\n <div class=\"s-offer-modal-skeleton-footer\">\n <salla-skeleton height='15px' width='50%'></salla-skeleton>\n <salla-skeleton height='15px' width='30%'></salla-skeleton>\n </div>\n </div>\n </div>\n {!this.hasError && this.offer !== null\n\n ? [<span slot='icon' class=\"s-offer-modal-header-icon\" innerHTML={SpecialDiscountIcon}></span>,\n this.getOfferContent(),\n <div class=\"s-offer-modal-footer\" slot=\"footer\">\n {this.offer.formatted_date ?\n <p\n class=\"s-offer-modal-expiry\">{salla.lang.get('pages.products.offer_expires_in')} {this.offer.formatted_date}</p>\n : ''}\n <label class=\"s-offer-modal-remember-label\">\n <input type=\"checkbox\" onChange={e => this.rememberMe(e)} class=\"s-offer-modal-remember-input\" />\n &nbsp; {salla.lang.get('common.elements.remember_my_choice')}\n </label>\n </div>,\n ] :\n <salla-placeholder class=\"s-loyalty-placeholder\" alignment=\"center\">\n {!!this.errorMessage ? <span slot=\"description\">{this.errorMessage}</span> : ''}\n </salla-placeholder>\n }\n </salla-modal>\n }\n}\n"],"version":3}
@@ -7,3 +7,5 @@ const SallaPlaceholder = SallaPlaceholder$1;
7
7
  const defineCustomElement = defineCustomElement$1;
8
8
 
9
9
  export { SallaPlaceholder, defineCustomElement };
10
+
11
+ //# sourceMappingURL=salla-placeholder.js.map
@@ -0,0 +1 @@
1
+ {"file":"salla-placeholder.js","mappings":";;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -67,3 +67,5 @@ function defineCustomElement() {
67
67
  defineCustomElement();
68
68
 
69
69
  export { SallaPlaceholder as S, defineCustomElement as d };
70
+
71
+ //# sourceMappingURL=salla-placeholder2.js.map
@@ -0,0 +1 @@
1
+ {"file":"salla-placeholder2.js","mappings":";;;;;;;;;;;;AAAA,MAAM,mBAAmB,GAAG,EAAE;;MCWjB,gBAAgB;EAE3B;;;IAMS,sBAAiB,GAAY,KAAK,CAAC;;;;IAKpC,SAAI,GAAW,KAAK,CAAC;;;;IAKrB,cAAS,GAAgC,MAAM,CAAC;;;;IAKhD,aAAQ,GAAsD,IAAI,CAAC;IApBzE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;MAClB,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;KAC/B,CAAC,CAAC;GACJ;EAoBO,cAAc;IACpB,OAAO;MACL,uBAAuB,EAAE,IAAI;MAC7B,0BAA0B,EAAE,IAAI,CAAC,SAAS,IAAI,MAAM;MACpD,4BAA4B,EAAE,IAAI,CAAC,SAAS,IAAI,QAAQ;MACxD,2BAA2B,EAAE,IAAI,CAAC,SAAS,IAAI,OAAO;KACvD,CAAA;GACF;EAGD,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,IAChC,WAAK,KAAK,EAAE,yCAAyC,IAAI,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,GAAQ,EAClG,WAAK,KAAK,EAAC,qBAAqB,IAC9B,YAAM,IAAI,EAAC,OAAO,IAChB,gBACG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,4BAA4B,CAAC,CACxC,CACF,CACH,EAEN,WAAK,KAAK,EAAC,2BAA2B,IACpC,YAAM,IAAI,EAAC,aAAa,IACtB,gBACG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,6BAA6B,CAAC,CACzC,CACF,CACH,CACA,EACR;GACH;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/salla-placeholder/salla-placeholder.scss?tag=salla-placeholder","./src/components/salla-placeholder/salla-placeholder.tsx"],"sourcesContent":["","import { Component, Prop, State, h, Host } from '@stencil/core';\nimport Inbox from '../../assets/svg/inbox.svg';\n\n/**\n * @slot title - The primary content of the placeholder.\n * @slot description - Additional content displayed below the title.\n */\n@Component({\n tag: 'salla-placeholder',\n styleUrl: 'salla-placeholder.scss',\n})\nexport class SallaPlaceholder {\n\n constructor() {\n salla.lang.onLoaded(() => {\n this.translationLoaded = true;\n });\n }\n\n @State() translationLoaded: boolean = false;\n\n /**\n * Custom icon to display, defaults to [`Inbox`], can be any valid svg icon or inline element with font icon\n */\n @Prop() icon: string = Inbox;\n\n /**\n * Defines the alignment of contents. Defaults to [`left`]\n */\n @Prop() alignment: 'left' | 'center' | 'right' = 'left';\n\n /**\n * The size of the icon. Defaults to [`md`] = 45px for font icon & width/height: 3.5rem for svg icon\n */\n @Prop() iconSize: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'xxxl' = 'md';\n\n\n private alignmentClass() {\n return {\n 's-placeholder-wrapper': true,\n 's-placeholder-align-left': this.alignment == 'left',\n 's-placeholder-align-center': this.alignment == 'center',\n 's-placeholder-align-right': this.alignment == 'right',\n }\n }\n\n\n render() {\n return (\n <Host class={this.alignmentClass()}>\n <div class={`s-placeholder-icon s-placeholder-icon-${this.iconSize}`} innerHTML={this.icon}></div>\n <div class=\"s-placeholder-title\">\n <slot name='title'>\n <span>\n {salla.lang.get('common.elements.no_options')}\n </span>\n </slot>\n </div>\n\n <div class=\"s-placeholder-description\">\n <slot name='description'>\n <span>\n {salla.lang.get('common.errors.empty_results')}\n </span>\n </slot>\n </div>\n </Host >\n );\n }\n\n}\n"],"version":3}
@@ -7,3 +7,5 @@ const SallaProductAvailability = SallaProductAvailability$1;
7
7
  const defineCustomElement = defineCustomElement$1;
8
8
 
9
9
  export { SallaProductAvailability, defineCustomElement };
10
+
11
+ //# sourceMappingURL=salla-product-availability.js.map
@@ -0,0 +1 @@
1
+ {"file":"salla-product-availability.js","mappings":";;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -206,3 +206,5 @@ function defineCustomElement() {
206
206
  defineCustomElement();
207
207
 
208
208
  export { SallaProductAvailability as S, defineCustomElement as d };
209
+
210
+ //# sourceMappingURL=salla-product-availability2.js.map
@@ -0,0 +1 @@
1
+ {"file":"salla-product-availability2.js","mappings":";;;;;;;;;;;AAAA,MAAM,2BAA2B,GAAG,EAAE;;MCMzB,wBAAwB;EACnC;;;IAqBQ,WAAM,GAAY,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IASvC,sBAAiB,GAAY,KAAK,CAAC;;;;IAapC,8BAAyB,GAAY,KAAK,CAAC;;;;IAS5B,iBAAY,GAAY,KAAK,CAAC;IAQ7C,wBAAmB,GAAG;MAC5B,IAAI,OAAO,GAAQ,EAAC,EAAE,EAAE,IAAI,CAAC,SAAS,EAAC,CAAC;MACxC,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE;QACnC,OAAO,OAAO,CAAC;OAChB;MACD,IAAI,cAAc,GAAmC,QAAQ,CAAC,aAAa,CAAC,qCAAqC,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC;MACrI,IAAI,OAAO,GAAe,MAAM,CAAC,MAAM,CAAC,OAAM,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,sBAAsB,EAAE,CAAA,IAAI,EAAE,CAAC,CAAC;;MAE9F,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC,OAAM,cAAc,aAAd,cAAc,uBA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EAAE,EAAE,IAAI,IAAI,CAAC,KAAK,GAAG,EAAE,EAC1B,IAAI,EAAC,OAAO,GAAG;MACf,YAAM,KAAK,EAAC,kCAAkC,GAAE;KACjD,GAAG,EAAE,EAEL,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG;MAChC,aAAO,KAAK,EAAC,8BAA8B,IAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAS;MAC9F,uBAAiB,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC,WAAW,GAAG,EAAE,EAAE,SAAS,EAAE,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAI;KACtF,GAAG,EAAE,CACF,EACN,WAAK,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,+BAA+B,IACtD,oBAAc,KAAK,EAAC,kBAAkB,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,SAAS,EAClE,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAC5C,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAC5B,EACf,oBAAc,KAAK,EAAC,YAAY,qBAAiB,QAAQ,EAAC,KAAK,EAAC,MAAM,EAAC,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EACnF,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,IAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAgB,CACjG,CACM,EAAE;GACnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["BellRingIcon"],"sources":["./src/components/salla-product-availability/salla-product-availability.scss?tag=salla-product-availability","./src/components/salla-product-availability/salla-product-availability.tsx"],"sourcesContent":["/*\n* Salla Product Availability Component: popup modal to notify user if the product is available,\n* used in the product single page if the product isn't available.\n* You can use these classes to target the elements in the component.\n*/\n.s-product-availability {\n &-wrap {\n\n }\n &-subscribed {\n\n }\n\n &-subs-icon {\n\n }\n\n &-body {\n\n }\n\n &-label {\n\n }\n\n &-input {\n\n }\n\n &-footer {\n\n }\n\n &-footer-btn {\n\n }\n\n &-error-msg {\n\n }\n}\n","import {Component, Element, Host, Prop, State, Watch, h} from '@stencil/core';\nimport BellRingIcon from '../../assets/svg/bell-ring.svg';\nimport Helper from '../../Helpers/Helper';\n\n@Component({tag: 'salla-product-availability', styleUrl: 'salla-product-availability.scss'})\n\nexport class SallaProductAvailability {\n constructor() {\n salla.lang.onLoaded(() => {\n this.translationLoaded = true;\n this.title_ = this.host.title || salla.lang.get('pages.products.notify_availability_title');\n this.modal?.setTitle(this.title_);\n });\n if (!this.productId) {\n this.productId = salla.config.get('page.id');\n }\n\n if (this.isUser) return;\n\n this.channelsWatcher(this.channels);\n this.title_ = this.host.title || salla.lang.get('pages.products.notify_availability_title');\n this.host.removeAttribute('title');\n\n //todo:: fix this to cover options too\n this.isVisitorSubscribed = !this.notifyOptionsAvailability ? salla.storage.get(`product-${this.productId}-subscribed`) : '';\n }\n\n\n private isUser: boolean = salla.config.isUser();\n private modal: HTMLSallaModalElement;\n private channels_: Array<string>;\n private email: HTMLInputElement;\n private btn: HTMLSallaButtonElement;\n private mobileInput: HTMLSallaTelInputElement;\n\n @Element() host: HTMLElement;\n\n @State() translationLoaded: boolean = false;\n @State() title_: string;\n @State() isVisitorSubscribed: string;\n\n\n /**\n * Notification channels\n */\n @Prop() channels: 'sms' | 'email' | 'sms,email';\n\n /**\n * Listen to product options availability.\n */\n @Prop() notifyOptionsAvailability: boolean = false;\n\n /**\n * product id that can visitor subscribe to its availability notification\n */\n @Prop() productId: number;\n /**\n * is current user already subscribed\n */\n @Prop({mutable: true}) isSubscribed: boolean = false;\n\n\n @Watch('channels')\n channelsWatcher(newValue) {\n this.channels_ = !!newValue ? newValue.split(',') : [];\n }\n\n private handleSubmitOptions = async () => {\n let payload: any = {id: this.productId};\n if (!this.notifyOptionsAvailability) {\n return payload;\n }\n let optionsElement: HTMLSallaProductOptionsElement = document.querySelector(`salla-product-options[product-id=\"${this.productId}\"]`);\n let options: Array<any> = Object.values(await optionsElement?.getSelectedOptionsData() || {});\n //if all options not selected, show message && throw exception\n if (options.length && !await optionsElement?.reportValidity()) {\n let errorMessage = salla.lang.get('common.messages.required_fields');\n salla.error(errorMessage);\n throw errorMessage;\n }\n\n payload.options = [];\n options.forEach(option => {\n //inject numbers only, without zeros\n if (option && !isNaN(option)) {\n payload.options.push(Number(option));\n }\n })\n return payload;\n }\n\n private openModel() {\n this.handleSubmitOptions().then(isSuccess => isSuccess ? this.modal.open() : null)\n }\n\n private async submit() {\n let payload: any = await this.handleSubmitOptions();\n\n if (this.isUser) {\n return salla.api.product.availabilitySubscribe(payload)\n .then(() => this.isSubscribed = true);\n }\n\n if (this.channels_.includes('sms')) {\n let {phone, countryCode} = await this.mobileInput.getValues();\n payload['country_code'] = countryCode;\n payload['phone'] = phone;\n }\n\n if (this.channels_.includes('email')) {\n this.email.value !== '' && (payload['email'] = this.email.value);\n }\n\n await this.validateform();\n\n return this.btn.load()\n .then(() => this.btn.disable())\n .then(() => salla.api.product.availabilitySubscribe(payload))\n .then(() => {\n if (!this.notifyOptionsAvailability) {\n salla.storage.set(`product-${this.productId}-subscribed`, true);\n this.isSubscribed = true;\n return;\n }\n if (payload.options.length) {\n let options = salla.storage.get(`product-${this.productId}-subscribed-options`) || [];\n let selectedOptionsString = payload.options.join(',');\n if (!options.includes(selectedOptionsString)) {\n options.push(selectedOptionsString);\n salla.storage.set(`product-${this.productId}-subscribed-options`, options);\n this.isSubscribed = true;\n } else {\n salla.log('already subscribed to this options');\n }\n }\n })\n .then(() => this.btn.stop())\n .then(() => this.modal.close())\n .catch(() => this.btn.stop() && this.btn.enable());\n }\n\n private async validateform() {\n try {\n if (this.channels_.includes('email')) {\n const isEmailValid = Helper.isValidEmail(this.email.value);\n if (isEmailValid) return;\n !isEmailValid && this.validateField(this.email, salla.lang.get('common.elements.email_is_valid'));\n }\n if (this.channels_.includes('sms')) {\n const isPhoneValid = await this.mobileInput.isValid();\n if (isPhoneValid) return;\n }\n } catch (error) {\n throw ('Please insert required fields');\n }\n }\n\n\n // helpers\n private typing = (e) => {\n const error = e.target.nextElementSibling;\n e.target.classList.remove('s-has-error');\n error?.classList.contains('s-product-availability-error-msg') && (error.innerText = '');\n e.keyCode === 13 && this.submit();\n }\n\n validateField(field: HTMLInputElement, errorMsg: string) {\n field.classList.add('s-has-error');\n field.nextElementSibling['innerText'] = '* ' + errorMsg;\n }\n\n render() {\n return (\n <Host class=\"s-product-availability-wrap\">{this.isSubscribed || this.isVisitorSubscribed\n ? <div class=\"s-product-availability-subscribed\">\n <span innerHTML={BellRingIcon} class=\"s-product-availability-subs-icon\"/>\n {salla.lang.get('pages.products.notify_availability_success')}\n </div>\n :\n <salla-button width=\"wide\" onClick={() => this.isUser ? this.submit() : this.openModel()}>\n {salla.lang.get('pages.products.notify_availability')}\n </salla-button>\n\n }\n {this.isUser || this.isSubscribed || this.isVisitorSubscribed ? '' : this.renderModal()}\n </Host>\n );\n }\n\n private renderModal() {\n return (\n <salla-modal ref={modal => this.modal = modal} modal-title={this.title_}\n subTitle={salla.lang.get('pages.products.notify_availability_subtitle')} width=\"sm\">\n <span slot='icon' class=\"s-product-availability-header-icon\" innerHTML={BellRingIcon}/>\n <div class=\"s-product-availability-body\">\n {this.channels_.includes('email') ? [\n <label class=\"s-product-availability-label\">{salla.lang.get('common.elements.email')}</label>,\n <input class=\"s-product-availability-input\" onKeyDown={e => this.typing(e)}\n placeholder={salla.lang.get('common.elements.email_placeholder') || 'your@email.com'}\n ref={el => this.email = el}\n type=\"email\" />,\n <span class=\"s-product-availability-error-msg\"/>\n ] : ''}\n\n {this.channels_.includes('sms') ? [\n <label class=\"s-product-availability-label\">{salla.lang.get('common.elements.mobile')}</label>,\n <salla-tel-input ref={el => this.mobileInput = el} onKeyDown={e => this.typing(e)} />\n ] : ''}\n </div>\n <div slot=\"footer\" class=\"s-product-availability-footer\">\n <salla-button class=\"modal-cancel-btn\" width=\"wide\" color=\"light\" fill=\"outline\"\n onClick={() => this.modal.close()}>\n {salla.lang.get('common.elements.cancel')}\n </salla-button>\n <salla-button class=\"submit-btn\" loader-position='center' width=\"wide\" ref={btn => this.btn = btn}\n onClick={() => this.submit()}>{salla.lang.get('common.elements.submit')}</salla-button>\n </div>\n </salla-modal>);\n }\n}\n"],"version":3}
@@ -440,3 +440,5 @@ const SallaProductOptions = SallaProductOptions$1;
440
440
  const defineCustomElement = defineCustomElement$1;
441
441
 
442
442
  export { SallaProductOptions, defineCustomElement };
443
+
444
+ //# sourceMappingURL=salla-product-options.js.map
@@ -0,0 +1 @@
1
+ {"file":"salla-product-options.js","mappings":";;;;;;;;;;;;;;;AAAA,IAAY,WAoBX;AApBD,WAAY,WAAW;EACrB,8BAAe,CAAA;EACf,4BAAa,CAAA;EACb,oCAAqB,CAAA;EACrB,oCAAqB,CAAA;EACrB,8BAAe,CAAA;EACf,oDAAqC,CAAA;EACrC,gCAAiB,CAAA;EACjB,8CAA+B,CAAA;EAC/B,oCAAqB,CAAA;EACrB,4BAAa,CAAA;EACb,oCAAqB,CAAA;EACrB,sCAAuB,CAAA;EACvB,4BAAa,CAAA;EACb,8BAAe,CAAA;EACf,oCAAqB,CAAA;EACrB,0BAAW,CAAA;EACX,4BAAa,CAAA;EACb,4CAA6B,CAAA;AAE/B,CAAC,EApBW,WAAW,KAAX,WAAW,QAoBtB;AA8HD,IAAY,QAEX;AAFD,WAAY,QAAQ;EAClB,uBAAW,CAAA;AACb,CAAC,EAFW,QAAQ,KAAR,QAAQ;;;;;;;;;;;;;;;;AClJpB,MAAM,sBAAsB,GAAG,EAAE;;MCWpBA,qBAAmB;EAE9B;;;;IAsCQ,cAAS,GAAW;MAC1B,GAAG,EAAE,iBAAiB;MACtB,GAAG,EAAE,WAAW;MAChB,GAAG,EAAE,YA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AAI,MAAM,CAAC,EAAE,EAAE,iBAChD,MAAM,CAAC,YAAY,EAChC,KAAK,EAAC,aAAa,IACxB,uBAAe,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,IAAI,GAAG,EACvF,YAAM,SAAS,EAAE,eAAe,EAAE,KAAK,EAAC,mCAAmC,GAAE,EAC5E,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC;QAC7B;UACE,aAAO,KAAK,EAAC,0CAA0C,IAAE,IAAI,CAAC,cAAc,CAAS;UACrF,IAAI,CAAC,WAAW,GAAG,WAAK,KAAK,EAAC,4CAA4C,GAAE,GAAG,EAAE;SAClF;UACC,EAAE,CACA,EACR,aAAI,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAC7C,CAAA;KACP,CAAC,CACE,CAAA;GACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SallaProductOptions"],"sources":["./src/components/salla-product-options/interfaces.ts","./src/components/salla-product-options/salla-product-options.scss?tag=salla-product-options","./src/components/salla-product-options/salla-product-options.tsx"],"sourcesContent":["export enum DisplayType {\n COLOR = \"color\",\n DATE = \"date\",\n DATETIME = \"datetime\",\n DONATION = \"donation\",\n IMAGE = \"image\",\n MULTIPLE_OPTIONS = \"multiple-options\",\n NUMBER = \"number\",\n SINGLE_OPTION = \"single-option\",\n SPLITTER = \"splitter\",\n TEXT = \"text\",\n TEXTAREA = \"textarea\",\n THUMBNAIL = \"thumbnail\",\n TIME = \"time\",\n RADIO = \"radio\",\n CHECKBOX = \"checkbox\",\n MAP = \"map\",\n FILE = \"file\", // similar to image type (file-uploader component)\n COLOR_PICKER = \"color_picker\"\n\n}\n\nexport interface ProductDetail {\n id: string;\n sku: string;\n name: string;\n description: string;\n url: string;\n promotion_title: string;\n subtitle: string;\n type: string;\n status: string;\n price: number;\n sale_price: number;\n regular_price: number;\n starting_price: null;\n quantity: number;\n max_quantity: number;\n discount_ends: number;\n is_taxable: boolean;\n has_read_more: boolean;\n can_add_note: boolean;\n can_show_remained_quantity: boolean;\n can_upload_file: boolean;\n has_custom_form: boolean;\n is_on_sale: boolean;\n is_hidden_quantity: boolean;\n is_available: boolean;\n is_out_of_stock: boolean;\n weight: null;\n calories: null;\n image: SimpleImage;\n brand: Brand;\n donation?: ProductDonation;\n images: Image[];\n tags: Tag[];\n notify_availability: null;\n rating: Rating;\n options: Option[];\n sold_quantity: number;\n category: Category;\n}\n\nexport interface SimpleImage {\n url: string;\n alt: string;\n}\n\nexport interface Category {\n name: string;\n url: string;\n icon: string;\n}\n\nexport interface ProductDonation {\n target_message?: string;\n collected_amount?: number;\n target_amount?: number;\n target_percent?: number;\n target_end_date?: string;\n can_donate: boolean;\n}\n\nexport interface Image {\n id: number;\n url: string;\n main: boolean;\n three_d_image_url: string;\n alt: string;\n video_url: string;\n type: string;\n sort: number;\n}\n\nexport interface Option {\n id: number;\n name: string;\n required: boolean;\n type: string;\n placeholder: string;\n option_type: string;\n not_same_day_order: boolean;\n availability_range: number;\n from_date_time: null;\n to_date_time: null;\n visibility_condition?: { option: number, operator: \"=\" | \"!=\", value: number };\n details?: Detail[];\n condition_attributes: string;\n value?: any;\n donation?: Donation\n}\n\nexport interface Donation {\n target_message?: string;\n target_date: string | \"2023-04-18\";\n target_end_date: string | \"2023-04-18\";\n target_amount: number;\n collected_amount: number;\n can_donate: boolean;\n}\n\nexport interface Detail {\n id: number;\n option_id: number;\n name: string;\n additional_price: number;\n option_value: null | string;\n image: null | string;\n color: null | string;\n is_out: boolean;\n skus_availability?: { [sku_id: number]: boolean };\n is_selected: boolean;\n}\n\nexport interface Brand {\n id: string;\n url: string;\n name: string;\n logo: string;\n}\n\nexport interface PreTaxPrice {\n amount: number;\n currency: Currency;\n}\n\nexport enum Currency {\n Sar = \"SAR\",\n}\n\nexport interface Promotion {\n title: string;\n sub_title: string;\n}\n\nexport interface Rating {\n count: number;\n stars: number;\n}\n\nexport interface Tag {\n name: string;\n url: string;\n}\n","\n.s-product-options{\n &-wrapper{\n\n }\n &-option-container{\n\n }\n &-option{\n\n }\n &-option-label{\n\n }\n &-option-content{\n\n }\n &-colors-wrapper{\n\n }\n &-date-element{\n\n }\n &-time-element{\n \n }\n &-datetime-element{\n\n }\n &-image-input{\n\n }\n &-multiple-options-wrapper{\n\n }\n &-splitter{\n\n }\n &-text{\n\n }\n &-textarea{\n\n }\n &-thumbnails-wrapper{\n\n }\n}","import {Component, Prop, h, State, Element, Host, Event, EventEmitter, Method} from '@stencil/core';\nimport {Option, DisplayType, Detail} from './interfaces';\nimport CheckCircleIcon from '../../assets/svg/check.svg';\nimport CameraIcon from '../../assets/svg/camera.svg';\nimport FileIcon from '../../assets/svg/file-upload.svg';\n\n\n@Component({\n tag: 'salla-product-options',\n styleUrl: 'salla-product-options.scss',\n})\nexport class SallaProductOptions {\n\n constructor() {\n this.canDisabled = !salla.config.get('store.settings.products.notify_options_availability');\n salla.lang.onLoaded(() => {\n this.outOfStockText = salla.lang.get(\"pages.products.out_of_stock\");\n this.donationAmount = salla.lang.get('pages.products.donation_amount');\n });\n\n if (this.options) {\n try {\n this.setOptionsData(JSON.parse(this.options));\n return;\n } catch (e) {\n salla.log('Bad json passed via options prop');\n }\n }\n if (!Array.isArray(this.optionsData)) {\n salla.log('Options is not an array[] ---> ', this.optionsData);\n this.setOptionsData([]);\n }\n\n if (this.productId && !salla.url.is_page('cart')) {\n salla.api.product.getDetails(this.productId, ['options']).then(resp => this.setOptionsData(resp.data.options));\n }\n }\n\n private setOptionsData(optionsData: Option[]) {\n this.optionsData = optionsData;\n let that = this\n this.optionsData[0]?.details?.forEach(function (detail) {\n Object.entries(detail.skus_availability || {})\n .filter(sku => !sku[1])\n .map(sku => that.outSkus.push(Number(sku[0])));\n });\n }\n\n\n @Element() host: HTMLElement;\n\n private fileTypes: Object = {\n pdf: 'application/pdf',\n png: 'image/png',\n jpg: 'image/jpeg',\n word: 'application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n exl: 'application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n txt: 'text/plain',\n };\n\n @State() optionsData: Option[];\n @State() outOfStockText: string = ''\n @State() donationAmount: string = salla.lang.get('pages.products.donation_amount')\n @State() selectedOptions: Array<any> = [];\n @State() canDisabled: boolean;\n @State() selectedSkus?: Array<string | number>;\n @State() selectedOutSkus?: Array<string | number>;\n private outSkus: Array<string | number> = [];\n\n\n /**\n * The id of the product to which the options are going to be fetched for.\n */\n @Prop() productId: number = salla.config.get('page.id');\n\n /**\n * Product detail information.\n */\n @Prop() options: string;\n\n /**\n * Get the id's of the selected options.\n * */\n @Method()\n async getSelectedOptionsData() {\n let selectedOptions = {}\n let formData = (this.host as any).getElementSallaData();\n formData.forEach(function (value, key) {\n key.startsWith('options[') && (selectedOptions[key.replace('options[', '').replace(']', '')] = value);\n });\n return selectedOptions;\n }\n\n /**\n * Report options form validity.\n * */\n @Method()\n async reportValidity() {\n let requiredElements: Array<HTMLInputElement> = this.host.querySelectorAll('[required]') as any;\n let pass = true;\n for (let i = 0; i < requiredElements.length; i++) {\n //if there is only one invalid option, return false\n if ('reportValidity' in requiredElements[i] && !requiredElements[i].reportValidity()) {\n pass = false;\n }\n }\n return pass;\n }\n\n /**\n * Return true if there is any out of stock options are selected and vise versa.\n * */\n @Method()\n async hasOutOfStockOption() {\n return this.selectedOptions.some(option => option.is_out) || (this.selectedSkus.length && this.selectedSkus.every(sku => this.outSkus.includes(sku)));\n }\n\n /**\n * Get selected options.\n * */\n @Method()\n async getSelectedOptions() {\n return this.selectedOptions;\n }\n\n /**\n * Get a specific option by its id.\n * */\n @Method()\n async getOption(option_id) {\n return this.optionsData.find(option => option.id === option_id);\n }\n\n /**\n * An event that emitted when any option is changed.\n */\n @Event() changed: EventEmitter;\n\n // @ts-ignore\n private invalidHandler(event, option: Option) {\n const closestProductOption = (event.target as HTMLInputElement).closest('.s-product-options-option') as HTMLElement;\n if (!salla.url.is_page('cart')) {\n closestProductOption.scrollIntoView({behavior: 'smooth', block: 'center'});\n }\n closestProductOption.classList.add('s-product-options-option-error');\n }\n\n private changedHandler(event, option) {\n let data = {event: event, option: option, detail: null};\n if (option.details) {\n let detail = option.details.find((detail) => {\n return Number(detail.id) === Number(event.target.value);\n });\n data.detail = detail\n }\n\n let optionElement = event.target.closest('.s-product-options-option');\n if (event.target.value \n || ((option.type == DisplayType.FILE || option.type == DisplayType.IMAGE) && event.type === 'added') \n || (option.type == DisplayType.MAP && event.type === 'selected' && (event.target.lat && event.target.lng))) {\n setTimeout(() => {\n optionElement.classList.remove('s-product-options-option-error');\n }, 200);\n }\n\n const index = this.selectedOptions.findIndex(option => option.option_id === data.option.id);\n index > -1 ? this.selectedOptions[index] = {\n ...data.detail,\n option_id: data.option.id\n } : this.selectedOptions.push({...data.detail, option_id: data.option.id})\n\n this.setSelectedSkus();\n this.handleRequiredMultipleOptions(option);\n this.changed.emit(data);\n salla.event.emit('product-options::change', data);\n }\n\n /**\n * loop throw all selected details, then get common sku, if it's only one, means we selected all of them;\n */\n private setSelectedSkus() {\n this.selectedSkus = this.selectedOptions.map(detail => Object.keys(detail.skus_availability || {}))\n .reduce((p, c) => p.filter(e => c.includes(e)))\n .map(sku => Number(sku));\n }\n\n private handleRequiredMultipleOptions(option) {\n if (option.type !== DisplayType.MULTIPLE_OPTIONS || !option.required) {\n return;\n }\n const optionContainer = this.host.querySelector(`[data-option-id=\"${option.id}\"]`);\n const hasChecked = optionContainer.querySelectorAll('input:checked').length;\n optionContainer.querySelectorAll('input').forEach(input => input.toggleAttribute('required', !hasChecked));\n }\n\n private getLatLng(value, type: 'lat' | 'lng') {\n return value\n ? value.split(',')[type == 'lat' ? 0 : 1]\n : '';\n }\n\n private getDisplayForType(option: Option) {\n if (this[`${option.type}Option`]) {\n return this[`${option.type}Option`](option);\n }\n\n if (option.type === DisplayType.COLOR_PICKER) {\n return this.colorPickerOption(option)\n }\n\n if (option.type === DisplayType.MULTIPLE_OPTIONS) {\n return this.multipleOptions(option);\n }\n\n if (option.type === DisplayType.SINGLE_OPTION) {\n return this.singleOption(option);\n }\n salla.log(`Couldn't find options type(${option.type})😢`);\n return '';\n }\n\n protected getOptionShownWhen(option: Option) {\n return option.visibility_condition\n ? {\"data-show-when\": `options[${option.visibility_condition.option}] ${option.visibility_condition.operator} ${option.visibility_condition.value}`}\n : {};\n }\n\n //we need the cart Id for productOption Image\n componentWillLoad() {\n this.outOfStockText = salla.lang.get('pages.products.out_of_stock')\n return salla.api.cart.getCurrentCartId();\n }\n\n render() {\n if (this.optionsData?.length == 0) {\n return;\n }\n\n return (\n <Host class=\"s-product-options-wrapper\">\n {/* TODO:: move salla-conditional-field logic to here, no need of another component*/}\n <salla-conditional-fields>\n {this.optionsData.map((option: Option) =>\n <div class={`s-product-options-option-container${option.visibility_condition ? ' hidden' : ''}`}\n data-option-id={option.id}\n {...this.getOptionShownWhen(option)}>\n {option.name == 'splitter' ?\n this.splitterOption()\n : <div class=\"s-product-options-option\" data-option-type={option.type}\n data-option-required={`${option.required}`}>\n <label htmlFor={'options[' + option.id + ']'} class=\"s-product-options-option-label\">\n <b>\n {option.name}\n {option.required && <span> * </span>} </b>\n <small>{option.placeholder}</small>\n </label>\n <div class=\"s-product-options-option-content\">\n {this.getDisplayForType(option)}\n </div>\n </div>}\n </div>\n )}\n </salla-conditional-fields>\n </Host>\n );\n\n }\n\n //@ts-ignore\n private donationOption(option: Option, product: Product) {\n return <div class=\"s-product-options-donation-wrapper\">\n {\n option.donation ?\n <div class=\"s-product-options-donation-progress\">\n <salla-progress-bar donation={option.donation}>\n </salla-progress-bar>\n </div>\n : ''\n }\n <div class=\"s-product-options-donation-input-group\">\n <input\n type=\"text\"\n id=\"donating-amount\"\n name=\"donating_amount\"\n class=\"s-form-control\"\n value={option.value}\n required\n placeholder={option.placeholder}\n onInput={e => salla.helpers.inputDigitsOnly(e.target)}\n onBlur={e => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n />\n {/* value={option.value} */}\n <span class=\"s-product-options-donation-amount-currency\">\n {salla.config.currency(salla.config.get('user.currency_code')).symbol}\n </span>\n </div>\n </div>\n }\n\n private fileUploader(option: Option, additions: Object | null = null) {\n return <salla-file-upload\n {...(additions || {})}\n payload-name=\"file\"\n value={option.value}\n instant-upload={true}\n name={`options[${option.id}]`}\n required={option.required}\n height=\"120px\"\n onAdded={(e) => this.changedHandler(e, option)}\n url={salla.cart.api.getUploadImageEndpoint()}\n form-data={{cart_item_id: this.productId, product_id: this.productId}}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n class={{\"s-product-options-image-input\": true, required: option.required}}\n >\n <div class=\"s-product-options-filepond-placeholder\">\n <span class=\"s-product-options-filepond-placeholder-icon\"\n innerHTML={(additions as any).accept && (additions as any).accept.split(',').every(type => type.includes('image'))\n ? CameraIcon\n : FileIcon}\n />\n <p class=\"s-product-options-filepond-placeholder-text\">{salla.lang.get('common.uploader.drag_and_drop')}</p>\n <span class=\"filepond--label-action\">{salla.lang.get('common.uploader.browse')}</span>\n </div>\n </salla-file-upload>\n }\n\n //@ts-ignore\n private imageOption(option: Option) {\n return this.fileUploader(option, {accept: 'image/png,image/jpeg,image/jpg,image/gif'});\n }\n\n //@ts-ignore\n private fileOption(option: Option) {\n let types = option.details.map(detail => this.fileTypes[detail.name]).filter(Boolean);\n return types?.length\n ? this.fileUploader(option, {accept: types.join(',')})\n : 'File types not selected.';\n }\n\n //@ts-ignore\n private numberOption(option: Option) {\n return <input\n type=\"text\"\n value={option.value}\n class=\"s-form-control\"\n required={option.required}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onBlur={e => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onInput={e => salla.helpers.inputDigitsOnly(e.target)}/>\n }\n\n //@ts-ignore\n private splitterOption() {\n return <div class=\"s-product-options-splitter\"/>\n }\n\n //@ts-ignore\n private textOption(option: Option) {\n return <div class=\"s-product-options-text\">\n <input\n type=\"text\"\n value={option.value}\n class='s-form-control'\n required={option.required}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onInput={e => this.changedHandler(e, option)}/>\n </div>\n }\n\n //@ts-ignore\n private textareaOption(option: Option) {\n //todo::remove mt-1 class, and if it's okay to remove the tag itself will be great\n return <div class=\"s-product-options-textarea\">\n <div class=\"mt-1\">\n <textarea\n rows={4}\n value={option.value}\n class=\"s-form-control\"\n required={option.required}\n id={`options[${option.id}]`}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onInput={(e) => this.changedHandler(e, option)}/>\n </div>\n </div>\n }\n\n //@ts-ignore\n private mapOption(option: Option) {\n return <salla-map\n zoom={15}\n lat={this.getLatLng(option.value, 'lat')}\n lng={this.getLatLng(option.value, 'lng')}\n name={`options[${option.id}]`}\n searchable={true}\n required={option.required}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onSelected={e => this.changedHandler(e, option)}/>\n }\n\n private colorPickerOption(option: Option) {\n return <salla-color-picker\n onSubmitted={e => this.changedHandler(e, option)}\n name={`options[${option.id}]`}\n required={option.required}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n color={option.value}/>\n }\n\n /**\n * ============= Date Time options =============\n */\n //@ts-ignore\n private timeOption(option: Option) {\n return <salla-datetime-picker\n noCalendar={true}\n enableTime={true}\n dateFormat=\"h:i K\"\n value={option.value}\n placeholder={option.name}\n required={option.required}\n name={`options[${option.id}]`}\n class=\"s-product-options-time-element\"\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)}/>\n }\n\n //@ts-ignore\n private dateOption(option: Option) {\n //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23\n return <div class=\"s-product-options-date-element\">\n <salla-datetime-picker\n value={option.value}\n placeholder={option.name}\n required={option.required}\n minDate={new Date()}\n name={`options[${option.id}]`}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)}/>\n </div>\n }\n\n //@ts-ignore\n private datetimeOption(option: Option) {\n //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23\n return <div class=\"s-product-options-datetime-element\">\n <salla-datetime-picker\n enableTime={true}\n value={option.value}\n dateFormat=\"Y-m-d G:i:K\"\n placeholder={option.name}\n required={option.required}\n name={`options[${option.id}]`}\n maxDate={option.to_date_time}\n minDate={option.from_date_time}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)}/>\n </div>\n }\n\n /**\n * ============= Advanced options =============\n */\n protected getOptionDetailName(detail: Detail, outOfStock: boolean = true, optionType?: string) {\n if (optionType && optionType == DisplayType.COLOR) {\n return detail.name\n + ((outOfStock && this.isOptionDetailOut(detail)) ? ` <br/> <p> ${this.outOfStockText} </p>` : '')\n + (detail.additional_price ? ` <p> (${salla.money(detail.additional_price)}) </p>` : '');\n }\n\n return detail.name\n + ((outOfStock && this.isOptionDetailOut(detail)) ? ` - ${this.outOfStockText}` : '')\n + (detail.additional_price ? ` (${salla.money(detail.additional_price)})` : '');\n }\n\n\n protected isOptionDetailOut(detail: Detail) {\n if (detail.is_out || !detail.skus_availability || !this.selectedSkus?.length) {\n return detail.is_out;\n }\n\n let isDetailSelected = this.selectedOptions.filter(option => option.id == detail.id).length;\n //if the current options is the only selected option, so we are sure that it's not out, because there is no other options selected yet\n if (isDetailSelected && this.selectedOptions.length == 1) {\n return false;\n }\n\n //if current details has sku in the possible outSkus it's out for sure\n if (isDetailSelected) {\n //here we will get the possible outSkus for current selected options\n let outSelectableSkus = this.selectedSkus.filter(sku => this.outSkus.includes(sku));\n return Object.keys(detail.skus_availability).some(sku => outSelectableSkus.includes(Number(sku)))\n }\n\n return this.selectedOptions.some(option => option.is_out && option.option_id !== detail.option_id)\n\n }\n\n private singleOption(option: Option) {\n return <div>\n <select name={`options[${option.id}]`}\n required={option.required}\n class=\"s-form-control\"\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={e => this.changedHandler(e, option)}>\n <option value=\"\">{option.placeholder}</option>\n {\n option?.details.map((detail: Detail) => {\n return <option value={detail.id} disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n selected={detail.is_selected}>\n {this.getOptionDetailName(detail)}\n </option>\n })\n }\n </select>\n </div>\n }\n\n private multipleOptions(option: Option) {\n return <div class={{\"s-product-options-multiple-options-wrapper\": true, 'required': option.required}}>\n {\n option?.details.map((detail: Detail) => {\n return <div>\n <input type=\"checkbox\"\n value={detail.id}\n disabled={this.isOptionDetailOut(detail)}\n checked={detail.is_selected}\n required={option.required}\n name={`options[${option.id}][]`}\n id={`field-${option.id}-${detail.id}`}\n onChange={(e) => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n aria-describedby={`options[${option.id}]-description`}/>\n <label htmlFor={`field-${option.id}-${detail.id}`}>{this.getOptionDetailName(detail)}</label>\n </div>\n })\n }\n </div>\n }\n\n //@ts-ignore\n private colorOption(option: Option) {\n return <fieldset class=\"s-product-options-colors-wrapper\">\n {\n option?.details.map((detail) =>\n <div class=\"s-product-options-colors-item\">\n <input type=\"radio\"\n value={detail.id}\n required={option.required}\n checked={detail.is_selected}\n name={`options[${option.id}]`}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n id={`color-${this.productId}-${option.id}-${detail.id}`}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={e => this.changedHandler(e, option)}/>\n <label htmlFor={`color-${this.productId}-${option.id}-${detail.id}`}>\n <span style={{\"background-color\": detail.color}}/>\n <div innerHTML={this.getOptionDetailName(detail, true, option.type)}></div>\n </label>\n </div>\n )\n }\n </fieldset>\n }\n\n //@ts-ignore\n private thumbnailOption(option: Option) {\n return <div class=\"s-product-options-thumbnails-wrapper\">\n {option.details.map((detail: Detail) => {\n return <div>\n <input type=\"radio\"\n value={detail.id}\n data-itemid={detail.id} //todo:: why need this? it's already in the value!\n required={option.required}\n checked={detail.is_selected}\n name={`options[${option.id}]`}\n data-img-id={detail.option_value}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n id={`option_${this.productId}-${option.id}_${detail.id}`}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)}/>\n <label htmlFor={`option_${this.productId}-${option.id}_${detail.id}`}\n data-img-id={detail.option_value}\n class=\"go-to-slide\">\n <img data-src={detail.image} src={detail.image} title={detail.name} alt={detail.name}/>\n <span innerHTML={CheckCircleIcon} class=\"s-product-options-thumbnails-icon\"/>\n {this.isOptionDetailOut(detail) ?\n [\n <small class=\"s-product-options-thumbnails-stock-badge\">{this.outOfStockText}</small>,\n this.canDisabled ? <div class=\"s-product-options-thumbnails-badge-overlay\"/> : '',\n ]\n : ''}\n </label>\n <p>{this.getOptionDetailName(detail, false)} </p>\n </div>\n })}\n </div>\n }\n}\n"],"version":3}
@@ -132,3 +132,5 @@ const SallaProductSizeGuide = SallaProductSizeGuide$1;
132
132
  const defineCustomElement = defineCustomElement$1;
133
133
 
134
134
  export { SallaProductSizeGuide, defineCustomElement };
135
+
136
+ //# sourceMappingURL=salla-product-size-guide.js.map
@@ -0,0 +1 @@
1
+ {"file":"salla-product-size-guide.js","mappings":";;;;;;;;;;;;;;;;;;;AAAA,MAAM,wBAAwB,GAAG,EAAE;;MCetBA,uBAAqB;EAChC;;;IAeS,aAAQ,GAAY,KAAK,CAAC;IAdjC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,kBAAkB,EAAE,CAAC,UAAU,KAAK,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IAC1E,KAAK,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AAgB,MAAM,EAAC,MAAM,EAAC,KAAK,EAAC,KAAK,GAAkB,EAC3D,sBAAgB,MAAM,EAAC,MAAM,EAAC,KAAK,EAAC,KAAK,GAAkB,CACvD,CAGF,CACF,EACN,YAAM,IAAI,EAAC,QAAQ,GAAG,EACrB,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM;MAC9B;QACE,sBACG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAgB,KAChC,wBAAkB,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,KAAK,CAAC,IAAI,IAC9C,gBAAO,KAAK,CAAC,IAAI,CAAQ,CACR,CACpB,EACA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAgB,KAChC,yBAAmB,IAAI,EAAC,SAAS,EAAC,IAAI,EAAE,KAAK,CAAC,IAAI,IAChD,WAAK,SAAS,EAAE,KAAK,CAAC,WAAW,GAAQ,CACvB,CACrB,CACU;OACd;QACC,IAAI,CAAC,eAAe,EAAE,EAE1B,YAAM,IAAI,EAAC,QAAQ,GAAG,CACV,EACd;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SallaProductSizeGuide"],"sources":["./src/components/salla-product-size-guide/salla-product-size-guide.scss?tag=salla-product-size-guide","./src/components/salla-product-size-guide/salla-product-size-guide.tsx"],"sourcesContent":["/*\n* Salla Product Size Guide Component: has many sizes, styles and loading state.\n* You can use these classes to target the elements in the component.\n*/\n","import { Component, State, Method, Element, h } from '@stencil/core';\nimport PencilRuler from \"../../assets/svg/pencil-ruler.svg\";\nexport interface SizeGuide {\n name: string;\n description: string;\n}\n\n/**\n * @slot header - The upper section of the component.Empty by default.\n * @slot footer - The bottom section of the component.Empty by default.\n */\n@Component({\n tag: 'salla-product-size-guide',\n styleUrl: 'salla-product-size-guide.scss',\n})\nexport class SallaProductSizeGuide {\n constructor() {\n salla.event.on('size-guide::open', (product_id) => this.open(product_id));\n salla.lang.onLoaded(() => {\n this.placeholder_title = salla.lang.get('pages.products.size_guide_placeholder')\n this.placeholder_description = salla.lang.get('pages.products.size_guide_placeholder_info')\n this.modal_title = salla.lang.get('pages.products.size_guides');\n })\n }\n private modal: HTMLSallaModalElement;\n @State() guides: Array<SizeGuide> | [];\n @State() productId: number;\n\n @State() placeholder_title: string;\n @State() placeholder_description: string;\n @State() modal_title: string;\n @State() hasError: boolean = false;\n\n @Element() host: HTMLElement;\n /**\n * Show the size-guide modal window\n */\n @Method()\n async open(product_id: number) {\n this.modal.setTitle(this.modal_title)\n this.modal.open()\n return await salla.api.withoutNotifier(() => salla.product.getSizeGuides(product_id))\n .then((response) => {\n this.guides = response.data;\n })\n .catch(e => {\n console.log(e)\n this.hasError = true;\n this.placeholder_description = e.response?.data?.error?.message || e.response?.data;\n })\n .finally(() => this.modal.stopLoading())\n }\n /**\n *\n * Hide the size-guide modal window\n */\n @Method()\n async close() {\n return this.modal.close();\n }\n private showPlaceholder() {\n return <salla-placeholder alignment=\"center\" iconSize=\"xl\">\n <div slot=\"title\">\n {this.placeholder_title}\n </div>\n <div slot=\"description\">\n {this.placeholder_description}\n </div>\n </salla-placeholder>\n }\n render() {\n return (\n <salla-modal class=\"s-product-size-guide-wrapper\" id='salla-product-size-guide-modal' isLoading={true} has-skeleton width=\"md\" ref={modal => this.modal = modal}>\n <span slot='icon' class=\"s-product-size-guide-header-icon\" innerHTML={PencilRuler}></span>\n <div slot=\"loading\">\n <div class=\"s-product-size-guide-skeleton\">\n <salla-skeleton height='15px' width='25%'></salla-skeleton>\n\n <div class=\"s-product-size-guide-skeleton-header\">\n <salla-skeleton height='40px'></salla-skeleton>\n <salla-skeleton height='40px'></salla-skeleton>\n <salla-skeleton height='40px'></salla-skeleton>\n <salla-skeleton height='40px'></salla-skeleton>\n </div>\n <div class=\"s-product-size-guide-skeleton-content\">\n <salla-skeleton height='15px' width='25%'></salla-skeleton>\n <salla-skeleton height='10px' width='75%'></salla-skeleton>\n <salla-skeleton height='10px' width='50%'></salla-skeleton>\n <salla-skeleton height='10px' width='75%'></salla-skeleton>\n <salla-skeleton height='10px' width='100%'></salla-skeleton>\n <salla-skeleton height='10px' width='25%'></salla-skeleton>\n <salla-skeleton height='10px' width='60%'></salla-skeleton>\n <salla-skeleton height='10px' width='45%'></salla-skeleton>\n <salla-skeleton height='10px' width='30%'></salla-skeleton>\n </div>\n\n\n </div>\n </div>\n <slot name=\"header\" />\n {!this.hasError && !!this.guides ?\n [\n <salla-tabs>\n {this.guides.map((guide: SizeGuide) =>\n <salla-tab-header slot=\"header\" name={guide.name}>\n <span>{guide.name}</span>\n </salla-tab-header>\n )}\n {this.guides.map((guide: SizeGuide) =>\n <salla-tab-content slot=\"content\" name={guide.name}>\n <div innerHTML={guide.description}></div>\n </salla-tab-content>\n )}\n </salla-tabs>\n ]\n : this.showPlaceholder()\n }\n <slot name=\"footer\" />\n </salla-modal>\n );\n }\n}\n"],"version":3}
@@ -7,3 +7,5 @@ const SallaProgressBar = SallaProgressBar$1;
7
7
  const defineCustomElement = defineCustomElement$1;
8
8
 
9
9
  export { SallaProgressBar, defineCustomElement };
10
+
11
+ //# sourceMappingURL=salla-progress-bar.js.map
@@ -0,0 +1 @@
1
+ {"file":"salla-progress-bar.js","mappings":";;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -85,3 +85,5 @@ function defineCustomElement() {
85
85
  defineCustomElement();
86
86
 
87
87
  export { SallaProgressBar as S, defineCustomElement as d };
88
+
89
+ //# sourceMappingURL=salla-progress-bar2.js.map
@@ -0,0 +1 @@
1
+ {"file":"salla-progress-bar2.js","mappings":";;;;;AAAA,MAAM,mBAAmB,GAAG,EAAE;;MCOjB,gBAAgB;EAE3B;;;;;;IAgDyB,WAAM,GAAW,MAAM,CAAC;IA/C/C,IAAI;MACF,IAAI,IAAI,CAAC,QAAQ,EAAE;QACjB,IAAI,YAAY,GAAG,OAAO,I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KACP,GAAG,EAAE,CAAC;GACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/salla-progress-bar/salla-progress-bar.scss?tag=salla-progress-bar","./src/components/salla-progress-bar/salla-progress-bar.tsx"],"sourcesContent":[".s-progress-bar{\n &-header{\n }\n &-target-section {\n }\n\n &-container {\n }\n\n &-wrapper {\n }\n\n &-progress {\n }\n\n &-message {\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\nimport { Donation } from \"../salla-product-options/interfaces\";\n\n@Component({\n tag: 'salla-progress-bar',\n styleUrl: 'salla-progress-bar.scss',\n})\nexport class SallaProgressBar {\n\n constructor() {\n try {\n if (this.donation) {\n let donationJson = typeof this.donation == 'string' ? JSON.parse(this.donation) : this.donation;\n if (donationJson.can_donate) {\n this.value = donationJson.collected_amount;\n this.target = donationJson.target_amount;\n this.header = salla.lang.get('pages.products.target');\n this.message = donationJson.target_end_date == '0000-00-00' ? '' : salla.lang.get('pages.products.donation_target_date') + ' ' + donationJson.target_end_date;\n } else {\n this.message = donationJson.target_message;\n }\n }\n } catch (e) {\n salla.log('Wrong donation json');\n }\n\n salla.lang.onLoaded(() => {\n this.header = this.header?.replace('pages.products.target', salla.lang.get('pages.products.target'))\n this.message = this.message?.replace('pages.products.donation_target_date', salla.lang.get('pages.products.donation_target_date'))\n });\n\n salla.onReady(() => {\n this.color = this.color || salla.config.get('theme.color.primary', \"#ffd5c4\")\n if (!this.unit) {\n this.unit = salla.config.currency().symbol;\n }\n })\n }\n\n /**\n * You can just pass the donation as json string ex: `{\"target_message\":null,\"target_date\":\"2023-04-18\",\"target_end_date\":\"2023-04-18\",\"target_amount\":400,\"collected_amount\":380,\"can_donate\":true}`\n */\n @Prop() donation: string | Donation;\n /**\n * The goal of the progress bar\n */\n @Prop({ mutable: true }) target: number;\n\n /**\n * The progress so far as of the goal.\n */\n @Prop({ mutable: true }) value: number;\n \n \n /**\n * Set height for the wrapper.\n */\n @Prop({ mutable: true }) height: string = \"10px\";\n\n /**\n * Big Title, before the progress bar.\n */\n @Prop({ mutable: true }) header: string;\n\n /**\n * Stripped effect for tje progress bar.\n */\n @Prop({ mutable: true }) stripped: boolean;\n\n /**\n * Subtitle under the progress bar or instead of it if the target not being set.\n */\n @Prop({ mutable: true }) message: string;\n\n /**\n * The unite to be added after the numbers, defaults to: `salla.config.currency().symbol`\n */\n @Prop({ mutable: true }) unit: string;\n\n /**\n * Progress bar color, defaults to: `salla.config.get('theme.color.primary', \"#ffd5c4\")`\n */\n @Prop({ mutable: true }) color: string;\n\n private getPercentage(): number {\n return (this.value / this.target) * 100;\n }\n\n render() {\n if (!this.target && !this.message) {\n return '';\n }\n\n return (\n <div class=\"s-progress-bar-container\">\n {this.header ? <div class=\"s-progress-bar-header\">{this.header}</div> : ''}\n {this.getProgressBar()}\n {this.message ? <span class=\"s-progress-bar-message\">{this.message}</span> : ''}\n </div>\n );\n }\n\n private getProgressBar() {\n return this.target ? [\n <div class=\"s-progress-bar-target-section\">\n <span>{salla.helpers.number(this.value)} {this.unit}</span>\n <span>{salla.helpers.number(this.target)} {this.unit}</span>\n </div>,\n <div class=\"s-progress-bar-wrapper\" style={{ 'height': this.height }}>\n <div class={{ \"s-progress-bar-progress\": true, 's-progress-bar-progress-stripped': this.stripped }}\n style={{ 'width': `${this.getPercentage()}%`, 'background-color': this.color }}>\n </div>\n </div>\n ] : '';\n }\n\n}\n"],"version":3}
@@ -118,3 +118,5 @@ const SallaQuantityInput = SallaQuantityInput$1;
118
118
  const defineCustomElement = defineCustomElement$1;
119
119
 
120
120
  export { SallaQuantityInput, defineCustomElement };
121
+
122
+ //# sourceMappingURL=salla-quantity-input.js.map
@@ -0,0 +1 @@
1
+ {"file":"salla-quantity-input.js","mappings":";;;;;;;;;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,EAAE;;MCSnBA,oBAAkB;EAJ/B;;;IAQU,mBAAc,GAAQ,EAAE,CAAC;IACzB,qBAAgB,GAAY,KAAK,CAAC;IAClC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I,CAAC,SAAS,GAAG,EAAsB,EACpD,OAAO,EAAE,CAAC,KAAU,KAAK,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAC1D,GAAG,EAAC,GAAG,EACP,KAAK,EAAE,IAAI,CAAC,QAAQ,IAAI,EAC1B,cAAQ,KAAK,EAAC,0DAA0D,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAC,QAAQ,IACnH,CAAC,IAAI,CAAC,gBAAgB,GAAG,YAAM,SAAS,EAAE,KAAK,GAAS,GAAG,EAAE,EAC9D,YAAM,IAAI,EAAC,kBAAkB,GAAG,CACzB,CACL,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SallaQuantityInput"],"sources":["./src/components/salla-quantity-input/salla-quantity-input.scss?tag=salla-quantity-input","./src/components/salla-quantity-input/salla-quantity-input.tsx"],"sourcesContent":["/*\n* Salla Qunatity Input Component: quantity input with increase & decrease buttons.\n* You can use these classes to target the elements in the component.\n*/\n\n.s-quantity-input{\n &-input{\n \n }\n &-button{\n\n }\n}","import { Component, Element, Host, State, Watch, h, Method } from '@stencil/core';\nimport Add from \"../../assets/svg/add.svg\";\nimport Minus from \"../../assets/svg/minus.svg\";\nimport Helper from '../../Helpers/Helper';\n\n@Component({\n tag: 'salla-quantity-input',\n styleUrl: 'salla-quantity-input.scss'\n})\nexport class SallaQuantityInput {\n\n @Element() host: HTMLElement;\n\n private hostAttributes: any = {};\n private hasIncrementSlot: boolean = false;\n private hasDecrementSlot: boolean = false;\n private textInput: any;\n\n private didLoaded: boolean = false;\n\n @State() quantity: number = 1;\n\n /**\n * Workaround to fire change event for the input.\n */\n @Watch('quantity')\n watchPropHandler() {\n if (!this.didLoaded) {\n return;\n }\n\n Helper.debounce(() => salla.document.event.fireEvent(this.textInput, 'change', { 'bubbles': true }));\n }\n\n componentWillLoad() {\n this.quantity = parseInt(this.host.getAttribute('value')) || 1;\n this.hasIncrementSlot = !!this.host.querySelector('[slot=\"increment-button\"]');\n this.hasDecrementSlot = !!this.host.querySelector('[slot=\"decrement-button\"]');\n }\n\n componentDidLoad() {\n this.didLoaded = true;\n this.textInput.addEventListener('input', (event) => salla.helpers.inputDigitsOnly(event.target));\n }\n\n private getInputAttributes() {\n for (let i = 0; i < this.host.attributes.length; i++) {\n if (!['id', 'value', 'min', 'class'].includes(this.host.attributes[i].name)) {\n this.hostAttributes[this.host.attributes[i].name] = this.host.attributes[i].value;\n }\n }\n\n return this.hostAttributes;\n }\n\n /**\n * decrease quantity by one.\n * @return HTMLSallaQuantityInputElement\n */\n @Method()\n async decrease() {\n return this.setValue(this.quantity - 1);\n }\n\n /**\n * increase quantity by one.\n * @return HTMLSallaQuantityInputElement\n */\n @Method()\n async increase() {\n return this.setValue(Number(this.quantity) + 1);\n }\n\n /**\n * set quantity by one.\n * @return HTMLSallaQuantityInputElement\n */\n @Method()\n async setValue(value) {\n let maxQuantity = parseInt(this.host.getAttribute('max'));\n if (maxQuantity && value > maxQuantity) {\n value = maxQuantity;\n }\n if (value <= 1) {\n value = 1;\n }\n this.quantity = value;\n return this.host;\n }\n\n render() {\n return (\n <Host class=\"s-quantity-input\">\n <div class=\"s-quantity-input-container\">\n <button onClick={() => this.increase()} class=\"s-quantity-input-increase-button s-quantity-input-button\" type=\"button\">\n {!this.hasIncrementSlot ? <span innerHTML={Add}></span> : ''}\n <slot name=\"increment-button\" />\n </button>\n <input class=\"s-quantity-input-input\" {...this.getInputAttributes()}\n ref={(el) => this.textInput = el as HTMLInputElement}\n onInput={(event: any) => this.setValue(event.target.value)}\n min=\"1\"\n value={this.quantity} />\n <button class=\"s-quantity-input-decrease-button s-quantity-input-button\" onClick={() => this.decrease()} type=\"button\">\n {!this.hasDecrementSlot ? <span innerHTML={Minus}></span> : ''}\n <slot name=\"decrement-button\" />\n </button>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -7,3 +7,5 @@ const SallaQuickBuy = SallaQuickBuy$1;
7
7
  const defineCustomElement = defineCustomElement$1;
8
8
 
9
9
  export { SallaQuickBuy, defineCustomElement };
10
+
11
+ //# sourceMappingURL=salla-quick-buy.js.map
@@ -0,0 +1 @@
1
+ {"file":"salla-quick-buy.js","mappings":";;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -2773,7 +2773,7 @@ const SallaQuickBuy = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
2773
2773
  this.currency = response.data.base_currency_price.currency;
2774
2774
  });
2775
2775
  }
2776
- let isNotIframe = window.self !== window.top;
2776
+ let isNotIframe = window.self === window.top;
2777
2777
  this.isApplePayActive = isNotIframe && ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments())
2778
2778
  && ((_b = salla.config.get('store.settings.payments')) === null || _b === void 0 ? void 0 : _b.includes('apple_pay'));
2779
2779
  let applePaySdk = document.getElementById('apple-pay-sdk');
@@ -2833,3 +2833,5 @@ function defineCustomElement() {
2833
2833
  defineCustomElement();
2834
2834
 
2835
2835
  export { SallaQuickBuy as S, browser$1 as b, defineCustomElement as d, global$1 as g };
2836
+
2837
+ //# sourceMappingURL=salla-quick-buy2.js.map