@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
+ {"version":3,"file":"salla-count-down.js","sourceRoot":"","sources":["../../../src/components/salla-count-down/salla-count-down.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAMxE,MAAM,OAAO,cAAc;EACzB;IA4BA;;SAEK;IACG,SAAI,GAAuB,IAAI,CAAC;IAExC;;SAEK;IACG,UAAK,GAAiC,MAAM,CAAC;IAarD;;SAEK;IACG,WAAM,GAAkB,MAAM,CAAC;IAa9B,eAAU,GAAY,KAAK,CAAC;IAhEnC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;MACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;MACtD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;MACxD,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;MAC5D,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;MACvE,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAA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ACL,UAAI,KAAK,EAAC,mBAAmB;UAC3B,WAAK,KAAK,EAAC,yBAAyB,EAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,IAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAO;UACxF,IAAI,CAAC,OAAO,IAAI,WAAK,KAAK,EAAC,yBAAyB,IAAE,IAAI,CAAC,UAAU,CAAO,CAC1E;QACL,UAAI,KAAK,EAAC,mBAAmB;UAC3B,WAAK,KAAK,EAAC,yBAAyB,EAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,EAAE,IAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAO;UACvF,IAAI,CAAC,OAAO,IAAI,WAAK,KAAK,EAAC,yBAAyB,IAAE,IAAI,CAAC,SAAS,CAAO,CACzE,CACF;MAEJ,IAAI,CAAC,UAAU,IAAI,WAAK,KAAK,EAAC,uBAAuB,IAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAO,CACxG,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, State, Method } from '@stencil/core';\n\n@Component({\n tag: 'salla-count-down',\n styleUrl: 'salla-count-down.scss',\n})\nexport class SallaCountDown {\n constructor() {\n salla.lang.onLoaded(() => {\n this.daysLabel = salla.lang.get('pages.checkout.day');\n this.hoursLabel = salla.lang.get('pages.checkout.hour');\n this.minutesLabel = salla.lang.get('pages.checkout.minute');\n this.invalidDate = salla.lang.get('blocks.buy_as_gift.incorrect_date');\n this.secondsLabel = salla.lang.get('pages.checkout.second');\n this.endLabel = salla.lang.get('pages.checkout.offer_ended');\n });\n }\n\n private daysEl: HTMLSpanElement;\n private hoursEl: HTMLSpanElement;\n private minutesEl: HTMLSpanElement;\n private secondsEl: HTMLSpanElement;\n\n /**\n * The date to count down to\n * Format: MMM DD, YYYY HH:mm:ss (e.g. Jan 2, 2023 16:37:52)\n * */\n @Prop() date: string;\n\n\n /**\n * If true, the count down numbers will be appear in a boxes\n * */\n @Prop() boxed: boolean;\n\n /**\n * The size of the count down\n * */\n @Prop() size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * The color of the count down\n * */\n @Prop() color: 'primary' | 'light' | 'dark' = 'dark';\n\n /**\n * Show labels for each count down number\n * */\n @Prop() labeled: boolean;\n\n /**\n * The text to show when the count down ends\n * */\n @Prop() endText: string;\n\n\n /**\n * The digits lang to show in the count down\n * */\n @Prop() digits: 'en' | 'auto' = 'auto';\n \n /**\n * If true, the count down will end at the end of the day\n * */\n @Prop() endOfDay: boolean;\n\n @State() daysLabel: string;\n @State() hoursLabel: string;\n @State() minutesLabel: string;\n @State() secondsLabel: string;\n @State() endLabel: string;\n @State() invalidDate: string;\n @State() offerEnded: boolean = false;\n @State() countInterval: any;\n\n\n /**\n * End the count down\n * */\n @Method()\n async endCountDown() {\n clearInterval(this.countInterval);\n this.offerEnded = true;\n this.daysEl.innerHTML = this.number(0);\n this.hoursEl.innerHTML = this.number(0);\n this.minutesEl.innerHTML = this.number(0);\n this.secondsEl.innerHTML = this.number(0);\n }\n\n private isValidDate(date: string) {\n return !isNaN(Date.parse(date.split(' ')[0]));\n }\n\n private number(digit: number) {\n return salla.helpers.number(digit, this.digits === 'en');\n }\n\n private startCountDown() {\n \n let countDownDate = new Date(this.date.replace(/-/g, \"/\"));\n if (this.endOfDay || this.date.split(' ').length === 1) {\n countDownDate.setHours(23, 59, 59, 999);\n }\n let countDownTime = countDownDate.getTime();\n this.countInterval = setInterval(() => {\n let now = new Date().getTime();\n let distance = countDownTime - now;\n\n this.daysEl.innerHTML = this.number(Math.floor(distance / (1000 * 60 * 60 * 24)));\n this.hoursEl.innerHTML = this.number(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)));\n this.minutesEl.innerHTML = this.number(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)));\n this.secondsEl.innerHTML = this.number(Math.floor((distance % (1000 * 60)) / 1000));\n\n if (distance < 0) {\n this.endCountDown();\n }\n }, 1000);\n }\n\n componentDidLoad() {\n if (!this.date || !this.isValidDate(this.date)) {\n return;\n }\n this.startCountDown();\n }\n\n render() {\n if (!this.date) {\n return;\n }\n else if (this.date && !this.isValidDate(this.date)) {\n return <div class=\"s-count-down-text-center\">{this.invalidDate}</div>\n }\n return (\n <Host class=\"s-count-down-wrapper\">\n <ul class={`s-count-down-list ${this.boxed ? 's-count-down-boxed' : ''} ${this.offerEnded ? 's-count-down-ended' : ''} s-count-down-${this.size} s-count-down-${this.color}`}>\n <li class=\"s-count-down-item\">\n <div class=\"s-count-down-item-value\" ref={el => this.secondsEl = el}>{this.number(0)}</div>\n {this.labeled && <div class=\"s-count-down-item-label\">{this.secondsLabel}</div>}\n </li>\n <li class=\"s-count-down-item\">\n <div class=\"s-count-down-item-value\" ref={el => this.minutesEl = el}>{this.number(0)}</div>\n {this.labeled && <div class=\"s-count-down-item-label\">{this.minutesLabel}</div>}\n </li>\n <li class=\"s-count-down-item\">\n <div class=\"s-count-down-item-value\" ref={el => this.hoursEl = el}>{this.number(0)}</div>\n {this.labeled && <div class=\"s-count-down-item-label\">{this.hoursLabel}</div>}\n </li>\n <li class=\"s-count-down-item\">\n <div class=\"s-count-down-item-value\" ref={el => this.daysEl = el}>{this.number(0)}</div>\n {this.labeled && <div class=\"s-count-down-item-label\">{this.daysLabel}</div>}\n </li>\n </ul>\n\n {this.offerEnded && <div class=\"s-count-down-end-text\">{!!this.endText ? this.endText : this.endLabel}</div>}\n </Host>\n );\n }\n\n}\n"]}
@@ -2,3 +2,4 @@
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
4
  export {};
5
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/components/salla-datetime-picker/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export declare type DateOption = Date | string | number;\n\nexport declare type DateRangeLimit<D = DateOption> = {\n from: D;\n to: D;\n};\n\nexport declare type DateLimit<D = DateOption> = D | DateRangeLimit<D> | ((date: Date) => boolean);\n\nexport declare type Hook = (dates: Date[], currentDateString: string, self: any, data?: any) => void;\n\nexport declare type LocaleKey = \"ar\" | \"at\" | \"az\" | \"be\" | \"bg\" | \"bn\" | \"bs\" | \"ca\" | \"cat\" | \"ckb\" | \"cs\" | \"cy\" | \"da\" | \"de\" | \"default\" | \"en\" | \"eo\" | \"es\" | \"et\" | \"fa\" | \"fi\" | \"fo\" | \"fr\" | \"gr\" | \"he\" | \"hi\" | \"hr\" | \"hu\" | \"hy\" | \"id\" | \"is\" | \"it\" | \"ja\" | \"ka\" | \"ko\" | \"km\" | \"kz\" | \"lt\" | \"lv\" | \"mk\" | \"mn\" | \"ms\" | \"my\" | \"nl\" | \"nn\" | \"no\" | \"pa\" | \"pl\" | \"pt\" | \"ro\" | \"ru\" | \"si\" | \"sk\" | \"sl\" | \"sq\" | \"sr\" | \"sv\" | \"th\" | \"tr\" | \"uk\" | \"vn\" | \"zh\" | \"uz\" | \"uz_latn\" | \"zh_tw\";\n"]}
@@ -1194,3 +1194,4 @@ export class SallaDatetimePicker {
1194
1194
  }
1195
1195
  }]; }
1196
1196
  }
1197
+ //# sourceMappingURL=salla-datetime-picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"salla-datetime-picker.js","sourceRoot":"","sources":["../../../src/components/salla-datetime-picker/salla-datetime-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import flatpickr from \"flatpickr\";\nimport {Component, h, Prop, Event, EventEmitter} from '@stencil/core';\n\nimport {DateOption, LocaleKey, DateLimit} from './interfaces';\n\n@Component({\n tag: 'salla-datetime-picker',\n styleUrl: 'salla-datetime-picker.scss',\n})\nexport class SallaDatetimePicker {\n\n dateInput: HTMLInputElement;\n /**\n * Two way data binding to retrieve the selected date[time] value\n */\n @Prop({reflect: true, mutable: true}) value: string = null;\n\n /**\n * Whether this input i required or not\n */\n @Prop() required: boolean;\n /**\n * the name for the input\n */\n @Prop({reflect: true}) name: string;\n /**\n * Placeholder text to show on the input element\n */\n @Prop() placeholder: string = salla.lang.get('blocks.buy_as_gift.select_send_date_and_time')\n\n /**\n * Allows the user to enter a date directly into the input field. By default, direct entry is disabled.\n */\n @Prop() allowInput: boolean = true;\n\n /**\n * Allows the preloading of an invalid date. When disabled, the field will be cleared if the provided date is invalid\n */\n @Prop() allowInvalidPreload: boolean = false;\n\n /**\n * Exactly the same as date format, but for the altInput field.\n */\n @Prop() altFormat: string = \"F j, Y\";\n\n /**\n * Show the user a readable date (as per altFormat), but return something totally different to the server.\n */\n @Prop() altInput: boolean = false;\n\n /**\n * This class will be added to the input element created by the altInput option.\n * Note that altInput already inherits classes from the original input.\n */\n @Prop() altInputClass: string;\n\n /**\n * Instead of body, appends the calendar to the specified node instead.\n */\n @Prop() appendTo: HTMLElement = undefined;\n\n /**\n * Defines how the date will be formatted in the aria-label for calendar days,\n * using the same tokens as dateFormat. If you change this, you should choose a\n * value that will make sense if a screen reader reads it out loud.\n */\n @Prop() ariaDateFormat: string = \"F j, Y\";\n\n /**\n * Whether the default time should be auto-filled when the input is empty and gains or loses focus.\n */\n @Prop() autoFillDefaultTime: boolean = true;\n\n /**\n * Whether clicking on the input should open the picker.\n * Set it to false if you only want to open the calendar programmatically with [open()]\n */\n @Prop() clickOpens: boolean = true;\n\n /**\n * Whether calendar should close after date selection or not\n */\n @Prop() closeOnSelect: boolean = true;\n\n /**\n * When in \"multiple\" mode, conjunction is used to separate dates in the entry field.\n */\n @Prop() conjunction?: string;\n\n /**\n * A string of characters which are used to define how the date will be displayed in the input box.\n * The supported characters are defined in the table below.\n */\n @Prop() dateFormat: string = \"Y-m-d\";\n\n /**\n * Sets the initial selected date(s). If you're using mode: \"multiple\" or a range calendar supply an\n * Array of Date objects or an Array of date strings which follow your dateFormat. Otherwise, you can supply\n * a single Date object or a date string.\n */\n @Prop() defaultDate: DateOption | DateOption[];\n\n /**\n * Initial value of the hour element, when no date is selected\n */\n @Prop() defaultHour: number = 12;\n\n\n /**\n * Initial value of the minute element, when no date is selected\n */\n @Prop() defaultMinute: number = 0;\n\n /**\n * Initial value of the seconds element, when no date is selected\n */\n @Prop() defaultSeconds: number = 0;\n\n /**\n * Disables certain dates, preventing them from being selected.\n * See https://chmln.github.io/flatpickr/examples/#disabling-specific-dates\n */\n @Prop() disable: DateLimit<DateOption>[] = [];\n\n /**\n * Set this to true to always use the non-native picker on mobile devices.\n * By default, Flatpickr utilizes native datetime widgets unless certain options (e.g. disable) are used.\n */\n @Prop() disableMobile: boolean = false;\n\n /**\n * Disables all dates except these specified. See https://chmln.github.io/flatpickr/examples/#disabling-all-dates-except-select-few\n */\n @Prop() enable: DateLimit<DateOption>[] = [(_) => true];\n\n /**\n * Enables seconds selection in the time picker.\n */\n @Prop() enableSeconds: boolean = false;\n\n /**\n * Enables the time picker\n */\n @Prop() enableTime: boolean = false;\n\n /**\n * Allows using a custom date formatting function instead of the built-in handling for date formats using dateFormat, altFormat, etc.\n */\n @Prop() formatDate: (date: Date, format: string, locale: Object) => string;\n\n /**\n * Adjusts the step for the hour input (incl. scrolling)\n */\n @Prop() hourIncrement: number = 1;\n\n /**\n * Displays the calendar inline\n */\n @Prop() inline: boolean = false;\n\n /**\n * The locale, either as a string (e.g. \"ar\", \"en\") or as an object.\n * See https://chmln.github.io/flatpickr/localization/\n */\n @Prop() locale: LocaleKey = \"en\";\n\n /**\n * The maximum date that a user can pick to (inclusive).\n */\n @Prop() maxDate: DateOption = null;\n\n /**\n * The minimum date that a user can start picking from (inclusive).\n */\n @Prop() maxTime: DateOption = null;\n\n /**\n * The minimum date that a user can start picking from (inclusive).\n */\n @Prop() minDate: DateOption = null;\n\n /**\n * The minimum time that a user can start picking from (inclusive).\n */\n @Prop() minTime: DateOption = null;\n\n /**\n * Adjusts the step for the minute input (incl. scrolling) Defaults to 5\n */\n @Prop() minuteIncrement: number = 5;\n\n /**\n * Date selection mode, defaults to \"single\"\n */\n @Prop() mode: \"single\" | \"multiple\" | \"range\" | \"time\" = \"single\";\n\n /**\n * How the month should be displayed in the header of the calendar.\n * If showMonths has a value greater than 1, the month is always shown as static.\n */\n @Prop() monthSelectorType: \"dropdown\" | \"static\" = \"dropdown\";\n\n /**\n * HTML for the arrow icon, used to switch months.\n */\n @Prop() nextArrow: string = '<span class=\"sicon-keyboard_arrow_right\"></span>';\n\n /**\n * Hides the day selection in calendar. Use it along with enableTime to create a time picker.\n */\n @Prop() noCalendar: boolean = false;\n\n /**\n * A custom datestring parser\n */\n @Prop() dateParser: (date: string, format: string) => Date;\n\n /**\n * How the calendar should be positioned with regards to the input. Defaults to \"auto\"\n */\n @Prop() position: \"auto\" | \"above\" | \"below\" | \"auto left\" | \"auto center\" | \"auto right\" | \"above left\" | \"above center\" | \"above right\" | \"below left\" | \"below center\" | \"below right\" | ((self: any, customElement: HTMLElement | undefined) => void) = \"auto\";\n\n /**\n * The element off of which the calendar will be positioned. Defaults to the date input\n */\n @Prop() positionElement: HTMLElement;\n\n /**\n * HTML for the left arrow icon, used to switch months.\n */\n @Prop() prevArrow: string = '<span class=\"sicon-keyboard_arrow_left\"></span>';\n\n /**\n * Whether to display the current month name in shorthand mode, e.g. \"Sep\" instead \"September\"\n */\n @Prop() shorthandCurrentMonth: boolean = false;\n\n /**\n * Position the calendar inside the wrapper and next to the input element*.\n */\n @Prop() static: boolean = false;\n\n /**\n * The number of months to be shown at the same time when displaying the calendar.\n */\n @Prop() showMonths: number = 1;\n\n /**\n * Displays time picker in 24 hour mode without AM/PM selection when enabled.\n */\n @Prop() time_24hr: boolean = false;\n\n /**\n * Enables display of week numbers in calendar.\n */\n @Prop() weekNumbers: boolean = false;\n\n /**\n * See https://chmln.github.io/flatpickr/examples/#flatpickr-external-elements\n */\n @Prop() wrap: boolean = false;\n\n\n /**\n * Event emitted when the date input gets changed by the user when selecting file(s).\n */\n @Event() picked: EventEmitter<any>;\n \n /**\n * Event emitted when the input is invalid.\n */\n @Event() invalidInput: EventEmitter<any>;\n\n render() {\n return <div class=\"s-datetime-picker\">\n <input type=\"datetime\" name={this.name} value={this.value} required={this.required}\n placeholder={this.placeholder}\n class=\"s-datetime-picker-input\" ref={(el) => this.dateInput = el as HTMLInputElement}/>\n </div>;\n }\n\n componentDidLoad() {\n let options = {\n allowInput: this.allowInput,\n allowInvalidPreload: this.allowInvalidPreload,\n altFormat: this.altFormat,\n altInput: this.altInput,\n altInputClass: this.altInputClass,\n appendTo: this.appendTo,\n ariaDateFormat: this.ariaDateFormat,\n autoFillDefaultTime: this.autoFillDefaultTime,\n clickOpens: this.clickOpens,\n closeOnSelect: this.closeOnSelect,\n conjunction: this.conjunction,\n dateFormat: this.dateFormat,\n defaultDate: !!this.value ? Date.parse(this.value) : this.defaultDate,\n defaultHour: this.defaultHour,\n defaultMinute: this.defaultMinute,\n defaultSeconds: this.defaultSeconds,\n disable: this.disable,\n disableMobile: this.disableMobile,\n enable: this.enable,\n enableSeconds: this.enableSeconds,\n enableTime: this.enableTime,\n formatDate: this.formatDate,\n hourIncrement: this.hourIncrement,\n inline: this.inline,\n locale: this.locale,\n maxDate: this.maxDate,\n maxTime: this.maxTime,\n minDate: this.minDate,\n minTime: this.minTime,\n minuteIncrement: this.minuteIncrement,\n mode: this.mode,\n monthSelectorType: this.monthSelectorType,\n nextArrow: this.nextArrow,\n noCalendar: this.noCalendar,\n parseDate: this.dateParser,\n position: this.position,\n positionElement: this.positionElement,\n prevArrow: this.prevArrow,\n shorthandCurrentMonth: this.shorthandCurrentMonth,\n static: this.static,\n showMonths: this.showMonths,\n time_24hr: this.time_24hr,\n weekNumbers: this.weekNumbers,\n wrap: this.wrap,\n // @ts-ignore\n onChange: (selectedDates, dateStr) => this.picked.emit(this.value = dateStr)\n // onOpen: this.handleOnOpen(selectedDates, dateStr, instance)\n // onClose: this.handleOnClose(selectedDates, dateStr, instance)\n }\n\n flatpickr(this.dateInput, options);\n this.dateInput.addEventListener('invalid', e => {\n this.invalidInput.emit(e);\n });\n this.dateInput.addEventListener('input', () => {\n this.dateInput.setCustomValidity('');\n this.dateInput.reportValidity();\n });\n }\n}\n"]}
@@ -40,3 +40,4 @@ export class FilePondFile {
40
40
  */
41
41
  export class File extends FilePondFile {
42
42
  }
43
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/components/salla-file-upload/interfaces.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,UAUX;AAVD,WAAY,UAAU;EAClB,2CAAQ,CAAA;EACR,2CAAQ,CAAA;EACR,qEAAqB,CAAA;EACrB,uDAAc,CAAA;EACd,yEAAuB,CAAA;EACvB,mEAAoB,CAAA;EACpB,kFAA4B,CAAA;EAC5B,iDAAW,CAAA;EACX,uDAAc,CAAA;AAClB,CAAC,EAVW,UAAU,KAAV,UAAU,QAUrB;AAED,MAAM,CAAN,IAAY,MAMX;AAND,WAAY,MAAM;EACd,qCAAS,CAAA;EACT,mCAAQ,CAAA;EACR,qCAAS,CAAA;EACT,mCAAQ,CAAA;EACR,qCAAS,CAAA;AACb,CAAC,EANW,MAAM,KAAN,MAAM,QAMjB;AAED,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;EAClB,6CAAS,CAAA;EACT,6CAAS,CAAA;EACT,6CAAS,CAAA;AACb,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAQD;;GAEG;AACH,MAAM,OAAO,YAAY;CAoCxB;AAED,cAAc;AACd;;;;GAIG;AACH,MAAM,OAAO,IAAK,SAAQ,YAAY;CAAG","sourcesContent":["export { };\n\nexport enum FileStatus {\n INIT = 1,\n IDLE = 2,\n PROCESSING_QUEUED = 9,\n PROCESSING = 3,\n PROCESSING_COMPLETE = 5,\n PROCESSING_ERROR = 6,\n PROCESSING_REVERT_ERROR = 10,\n LOADING = 7,\n LOAD_ERROR = 8\n}\n\nexport enum Status {\n EMPTY = 0,\n IDLE = 1,\n ERROR = 2,\n BUSY = 3,\n READY = 4\n}\n\nexport enum FileOrigin {\n INPUT = 1,\n LIMBO = 2,\n LOCAL = 3\n}\n\n// TODO replace all references to `ActualFileObject` with native `File`\n/**\n * @deprecated Don't use this type explicitly within your code. It'll be replaced with the native `File` type in a future release.\n */\nexport type ActualFileObject = Blob & { readonly lastModified: number; readonly name: string; };\n\n/**\n * A custom FilePond File.\n */\nexport class FilePondFile {\n /** Returns the ID of the file. */\n id: string;\n /** Returns the server id of the file. */\n serverId: string;\n /** Returns the source of the file. */\n source: ActualFileObject | string;\n /** Returns the origin of the file. */\n origin: FileOrigin;\n /** Returns the current status of the file. */\n status: FileStatus;\n /** Returns the File object. */\n file: ActualFileObject;\n /** Returns the file extensions. */\n fileExtension: string;\n /** Returns the size of the file. */\n fileSize: number;\n /** Returns the type of the file. */\n fileType: string;\n /** Returns the full name of the file. */\n filename: string;\n /** Returns the name of the file without extension. */\n filenameWithoutExtension: string;\n\n /** Aborts loading of this file */\n abortLoad: () => void;\n /** Aborts processing of this file */\n abortProcessing: () => void;\n /**\n * Retrieve metadata saved to the file, pass a key to retrieve\n * a specific part of the metadata (e.g. 'crop' or 'resize').\n * If no key is passed, the entire metadata object is returned.\n */\n getMetadata: (key?: string) => any;\n /** Add additional metadata to the file */\n setMetadata: (key: string, value: any, silent?: boolean) => void;\n}\n\n// TODO delete\n/**\n * A custom FilePond File. Don't confuse this with the native `File` type.\n *\n * @deprecated use `FilePondFile` instead. This type will be removed in a future release.\n */\nexport class File extends FilePondFile {}\n\nexport interface ServerUrl {\n url: string;\n method?: 'GET' | 'POST' | 'PUT' | 'DELETE';\n withCredentials?: boolean;\n headers?: { [key: string]: string | boolean | number };\n timeout?: number;\n\n /**\n * Called when server response is received, useful for getting\n * the unique file id from the server response.\n */\n onload?: (response: any) => number | string;\n /**\n * Called when server error is received, receives the response\n * body, useful to select the relevant error data.\n */\n onerror?: (responseBody: any) => any;\n /**\n * Called with the formdata object right before it is sent,\n * return extended formdata object to make changes.\n */\n ondata?: (data: FormData) => FormData;\n}\n\nexport type ProgressServerConfigFunction = (\n /**\n * Flag indicating if the resource has a length that can be calculated.\n * If not, the totalDataAmount has no significant value. Setting this to\n * false switches the FilePond loading indicator to infinite mode.\n */\n isLengthComputable: boolean,\n /** The amount of data currently transferred. */\n loadedDataAmount: number,\n /** The total amount of data to be transferred. */\n totalDataAmount: number,\n) => void;\n\nexport interface ProcessServerChunkTransferOptions {\n chunkTransferId: string,\n chunkServer: ServerUrl,\n /**\n * Chunk uploads enabled\n */\n chunkUploads: boolean,\n /**\n * Forcing use of chunk uploads even for files smaller than chunk size\n */\n chunkForce: boolean,\n /**\n * Size of chunks\n */\n chunkSize: number,\n /**\n * Amount of times to retry upload of a chunk when it fails\n */\n chunkRetryDelays: number[]\n}\n\nexport type ProcessServerConfigFunction = (\n /** The name of the input field. */\n fieldName: string,\n /** The actual file object to send. */\n file: ActualFileObject,\n metadata: { [key: string]: any },\n /**\n * Should call the load method when done and pass the returned server file id.\n * This server file id is then used later on when reverting or restoring a file\n * so that your server knows which file to return without exposing that info\n * to the client.\n */\n load: (p: string | { [key: string]: any }) => void,\n /** Call if something goes wrong, will exit after. */\n error: (errorText: string) => void,\n /**\n * Should call the progress method to update the progress to 100% before calling load().\n * Setting computable to false switches the loading indicator to infinite mode.\n */\n progress: ProgressServerConfigFunction,\n /** Let FilePond know the request has been cancelled. */\n abort: () => void,\n /**\n * Let Filepond know and store the current file chunk transfer id so it can track the\n * progress of the whole file upload\n */\n transfer: (transferId: string) => void,\n\n options: ProcessServerChunkTransferOptions\n) => void;\n\nexport type RevertServerConfigFunction = (\n /** Server file id of the file to restore. */\n uniqueFieldId: any,\n /** Should call the load method when done. */\n load: () => void,\n /** Call if something goes wrong, will exit after. */\n error: (errorText: string) => void\n) => void;\n\nexport type RestoreServerConfigFunction = (\n /** Server file id of the file to restore. */\n uniqueFileId: any,\n /** Should call the load method with a file object or blob when done. */\n load: (file: ActualFileObject) => void,\n /** Call if something goes wrong, will exit after. */\n error: (errorText: string) => void,\n /**\n * Should call the progress method to update the progress to 100% before calling load().\n * Setting computable to false switches the loading indicator to infinite mode.\n */\n progress: ProgressServerConfigFunction,\n /** Let FilePond know the request has been cancelled. */\n abort: () => void,\n /**\n * Can call the headers method to supply FilePond with early response header string.\n * https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getAllResponseHeaders\n */\n headers: (headersString: string) => void\n) => void;\n\nexport type LoadServerConfigFunction = (\n source: any,\n /** Should call the load method with a file object or blob when done. */\n load: (file: ActualFileObject | Blob) => void,\n /** Call if something goes wrong, will exit after. */\n error: (errorText: string) => void,\n /**\n * Should call the progress method to update the progress to 100% before calling load().\n * Setting computable to false switches the loading indicator to infinite mode.\n */\n progress: ProgressServerConfigFunction,\n /** Let FilePond know the request has been cancelled. */\n abort: () => void,\n /**\n * Can call the headers method to supply FilePond with early response header string.\n * https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getAllResponseHeaders>\n */\n headers: (headersString: string) => void\n) => void;\n\nexport type FetchServerConfigFunction = (\n url: string,\n /** Should call the load method with a file object or blob when done. */\n load: (file: ActualFileObject | Blob) => void,\n /** Call if something goes wrong, will exit after. */\n error: (errorText: string) => void,\n /**\n * Should call the progress method to update the progress to 100% before calling load().\n * Setting computable to false switches the loading indicator to infinite mode.\n */\n progress: ProgressServerConfigFunction,\n /** Let FilePond know the request has been cancelled. */\n abort: () => void,\n /**\n * Can call the headers method to supply FilePond with early response header string.\n * https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getAllResponseHeaders\n */\n headers: (headersString: string) => void\n) => void;\n\nexport type RemoveServerConfigFunction = (\n /** Local file source */\n source: any,\n /** Call when done */\n load: () => void,\n /** Call if something goes wrong, will exit after. */\n error: (errorText: string) => void\n) => void;\n\nexport interface FilePondInitialFile {\n /** The server file reference. */\n source: string;\n options: {\n /** Origin of file being added. */\n type: 'input' | 'limbo' | 'local';\n /** Mock file information. */\n file?: {\n name?: string;\n size?: number;\n type?: string;\n };\n /** File initial metadata. */\n metadata?: { [key: string]: any };\n };\n}\n\nexport interface FilePondServerConfigProps {\n /**\n * Immediately upload new files to the server.\n * @default true\n */\n instantUpload?: boolean;\n /**\n * The maximum number of files that can be uploaded in parallel.\n * @default 2\n */\n maxParallelUploads?: number;\n\n /**\n * Server API Configuration.\n * See: https://pqina.nl/filepond/docs/patterns/api/server\n * @default null\n */\n server?: string | {\n url?: string\n timeout?: number\n headers?: { [key: string]: string | boolean | number };\n process?: string | ServerUrl | ProcessServerConfigFunction | null;\n revert?: string | ServerUrl | RevertServerConfigFunction | null;\n restore?: string | ServerUrl | RestoreServerConfigFunction | null;\n load?: string | ServerUrl | LoadServerConfigFunction | null;\n fetch?: string | ServerUrl | FetchServerConfigFunction | null;\n remove?: RemoveServerConfigFunction | null;\n } | null;\n\n /**\n * Enable chunk uploads\n * @default false\n */\n chunkUploads?: boolean;\n /**\n * Force use of chunk uploads even for files smaller than chunk size\n * @default false\n */\n chunkForce?: boolean;\n /**\n * Size of chunks (5MB default)\n * @default 5000000\n */\n chunkSize?: number;\n /**\n * Amount of times to retry upload of a chunk when it fails\n * @default [500, 1000, 3000]\n */\n chunkRetryDelays?: number[];\n\n /**\n * A list of file locations that should be loaded immediately.\n * See: https://pqina.nl/filepond/docs/patterns/api/filepond-object/#setting-initial-files\n * @default []\n */\n files?: Array<FilePondInitialFile | ActualFileObject | Blob | string>;\n}\n\nexport interface FilePondDragDropProps {\n /**\n * FilePond will catch all files dropped on the webpage.\n * @default false\n */\n dropOnPage?: boolean;\n /**\n * Require drop on the FilePond element itself to catch the file.\n * @default true\n */\n dropOnElement?: boolean;\n /**\n * When enabled, files are validated before they are dropped.\n * A file is not added when it’s invalid.\n * @default false\n */\n dropValidation?: boolean;\n /**\n * Ignored file names when handling dropped directories.\n * Dropping directories is not supported on all browsers.\n * @default ['.ds_store', 'thumbs.db', 'desktop.ini']\n */\n ignoredFiles?: string[];\n}\n\nexport interface FilePondLabelProps {\n /**\n * The decimal separator used to render numbers.\n * By default this is determined automatically.\n * @default 'auto'\n */\n labelDecimalSeparator?: string;\n /**\n * The thousands separator used to render numbers.\n * By default this is determined automatically.\n * @default 'auto'\n */\n labelThousandsSeparator?: string;\n /**\n * Default label shown to indicate this is a drop area.\n * FilePond will automatically bind browse file events to\n * the element with CSS class .filepond--label-action.\n * @default 'Drag & Drop your files or <span class=\"filepond--label-action\"> Browse </span>'\n */\n labelIdle?: string;\n /**\n * Label shown when the field contains invalid files and is validated by the parent form.\n * @default 'Field contains invalid files'\n */\n labelInvalidField?: string;\n /**\n * Label used while waiting for file size information.\n * @default 'Waiting for size'\n */\n labelFileWaitingForSize?: string;\n /**\n * Label used when no file size information was received.\n * @default 'Size not available'\n */\n labelFileSizeNotAvailable?: string;\n /**\n * Label used when showing the number of files and there is only one.\n * @default 'file in list'\n */\n labelFileCountSingular?: string;\n /**\n * Label used when showing the number of files and there is more than one.\n * @default 'files in list'\n */\n labelFileCountPlural?: string;\n /**\n * Label used while loading a file.\n * @default 'Loading'\n */\n labelFileLoading?: string;\n /**\n * Label used when file is added (assistive only).\n * @default 'Added'\n */\n labelFileAdded?: string;\n /**\n * Label used when file load failed.\n * @default 'Error during load'\n */\n labelFileLoadError?: ((error: any) => string) | string;\n /**\n * Label used when file is removed (assistive only).\n * @default 'Removed'\n */\n labelFileRemoved?: string;\n /**\n * Label used when something went during during removing the file upload.\n * @default 'Error during remove'\n */\n labelFileRemoveError?: ((error: any) => string) | string;\n /**\n * Label used when uploading a file.\n * @default 'Uploading'\n */\n labelFileProcessing?: string;\n /**\n * Label used when file upload has completed.\n * @default 'Upload complete'\n */\n labelFileProcessingComplete?: string;\n /**\n * Label used when upload was cancelled.\n * @default 'Upload cancelled'\n */\n labelFileProcessingAborted?: string;\n /**\n * Label used when something went wrong during file upload.\n * @default 'Error during upload'\n */\n labelFileProcessingError?: ((error: any) => string) | string;\n /**\n * Label used when something went wrong during reverting the file upload.\n * @default 'Error during revert'\n */\n labelFileProcessingRevertError?: ((error: any) => string) | string;\n /**\n * Label used to indicate to the user that an action can be cancelled.\n * @default 'tap to cancel'\n */\n labelTapToCancel?: string;\n /**\n * Label used to indicate to the user that an action can be retried.\n * @default 'tap to retry'\n */\n labelTapToRetry?: string;\n /**\n * Label used to indicate to the user that an action can be undone.\n * @default 'tap to undo'\n */\n labelTapToUndo?: string;\n /**\n * Label used for remove button.\n * @default 'Remove'\n */\n labelButtonRemoveItem?: string;\n /**\n * Label used for abort load button.\n * @default 'Abort'\n */\n labelButtonAbortItemLoad?: string;\n /**\n * Label used for retry load.\n * @default 'Retry'\n */\n labelButtonRetryItemLoad?: string;\n /**\n * Label used for abort upload button.\n * @default 'Cancel'\n */\n labelButtonAbortItemProcessing?: string;\n /**\n * Label used for undo upload button.\n * @default 'Undo'\n */\n labelButtonUndoItemProcessing?: string;\n /**\n * Label used for retry upload button.\n * @default 'Retry'\n */\n labelButtonRetryItemProcessing?: string;\n /**\n * Label used for upload button.\n * @default 'Upload'\n */\n labelButtonProcessItem?: string;\n}\n\nexport interface FilePondSvgIconProps {\n /**\n * The icon used for remove actions.\n * @default '<svg></svg>'\n */\n iconRemove?: string;\n /**\n * The icon used for process actions.\n * @default '<svg></svg>'\n */\n iconProcess?: string;\n /**\n * The icon used for retry actions.\n * @default '<svg></svg>'\n */\n iconRetry?: string;\n /**\n * The icon used for undo actions.\n * @default '<svg></svg>'\n */\n iconUndo?: string;\n /**\n * The icon used for done.\n * @default '<svg></svg>'\n */\n iconDone?: string;\n}\n\nexport interface FilePondErrorDescription {\n type: string;\n code: number;\n body: string;\n}\n\nexport interface FilePondCallbackProps {\n /** FilePond instance has been created and is ready. */\n oninit?: () => void;\n /**\n * FilePond instance throws a warning. For instance\n * when the maximum amount of files has been reached.\n * Optionally receives file if error is related to a\n * file object.\n */\n onwarning?: (error: any, file?: FilePondFile, status?: any) => void;\n /**\n * FilePond instance throws an error. Optionally receives\n * file if error is related to a file object.\n */\n onerror?: (error: FilePondErrorDescription, file?: FilePondFile, status?: any) => void;\n /** Started file load. */\n onaddfilestart?: (file: FilePondFile) => void;\n /** Made progress loading a file. */\n onaddfileprogress?: (file: FilePondFile, progress: number) => void;\n /** If no error, file has been successfully loaded. */\n onaddfile?: (error: FilePondErrorDescription | null, file: FilePondFile) => void;\n /** Started processing a file. */\n onprocessfilestart?: (file: FilePondFile) => void;\n /** Made progress processing a file. */\n onprocessfileprogress?: (file: FilePondFile, progress: number) => void;\n /** Aborted processing of a file. */\n onprocessfileabort?: (file: FilePondFile) => void;\n /** Processing of a file has been reverted. */\n onprocessfilerevert?: (file: FilePondFile) => void;\n /** If no error, Processing of a file has been completed. */\n onprocessfile?: (error: FilePondErrorDescription | null, file: FilePondFile) => void;\n /** Called when all files in the list have been processed. */\n onprocessfiles?: () => void;\n /** File has been removed. */\n onremovefile?: (error: FilePondErrorDescription | null, file: FilePondFile) => void;\n /**\n * File has been transformed by the transform plugin or\n * another plugin subscribing to the prepare_output filter.\n * It receives the file item and the output data.\n */\n onpreparefile?: (file: FilePondFile, output: any) => void;\n /** A file has been added or removed, receives a list of file items. */\n onupdatefiles?: (files: FilePondFile[]) => void;\n /* Called when a file is clicked or tapped. **/\n onactivatefile?: (file: FilePondFile) => void;\n /** Called when the files have been reordered */\n onreorderfiles?: (files: FilePondFile[]) => void;\n}\n\nexport interface FilePondHookProps {\n /**\n * FilePond is about to allow this item to be dropped, it can be a URL or a File object.\n *\n * Return `true` or `false` depending on if you want to allow the item to be dropped.\n */\n beforeDropFile?: (file: FilePondFile | string) => boolean;\n /**\n * FilePond is about to add this file.\n *\n * Return `false` to prevent adding it, or return a `Promise` and resolve with `true` or `false`.\n */\n beforeAddFile?: (item: FilePondFile) => boolean | Promise<boolean>;\n /**\n * FilePond is about to remove this file.\n *\n * Return `false` to prevent adding it, or return a `Promise` and resolve with `true` or `false`.\n */\n beforeRemoveFile?: (item: FilePondFile) => boolean | Promise<boolean>;\n}\n\nexport interface FilePondStyleProps {\n /**\n * Set a different layout render mode.\n * @default null\n */\n stylePanelLayout?: 'integrated' | 'compact' | 'circle' | 'integrated circle' | 'compact circle' | null;\n /**\n * Set a forced aspect ratio for the FilePond drop area.\n *\n * Accepts human readable aspect ratios like `1:1` or numeric aspect ratios like `0.75`.\n * @default null\n */\n stylePanelAspectRatio?: string | null;\n /**\n * Set a forced aspect ratio for the file items.\n *\n * Useful when rendering cropped or fixed aspect ratio images in grid view.\n * @default null\n */\n styleItemPanelAspectRatio?: string | null;\n /**\n * The position of the remove item button.\n * @default 'left'\n */\n styleButtonRemoveItemPosition?: string;\n /**\n * The position of the remove item button.\n * @default 'right'\n */\n styleButtonProcessItemPosition?: string;\n /**\n * The position of the load indicator.\n * @default 'right'\n */\n styleLoadIndicatorPosition?: string;\n /**\n * The position of the progress indicator.\n * @default 'right'\n */\n styleProgressIndicatorPosition?: string;\n /**\n * Enable to align the remove button to the left side of the file item.\n * @default false\n */\n styleButtonRemoveItemAlign?: boolean;\n}\n\nexport type CaptureAttribute = \"camera\" | \"microphone\" | \"camcorder\";\n\nexport interface FilePondBaseProps {\n /**\n * The ID to add to the root element.\n * @default null\n */\n id?: string | null;\n /**\n * The input field name to use.\n * @default 'filepond'\n */\n name?: string;\n /**\n * Class Name to put on wrapper.\n * @default null\n */\n className?: string | null;\n /**\n * Sets the required attribute to the output field.\n * @default false\n */\n required?: boolean;\n /**\n * Sets the disabled attribute to the output field.\n * @default false\n */\n disabled?: boolean;\n /**\n * Sets the given value to the capture attribute.\n * @default null\n */\n captureMethod?: CaptureAttribute | null;\n /**\n * Set to false to prevent FilePond from setting the file input field `accept` attribute to the value of the `acceptedFileTypes`.\n */\n allowSyncAcceptAttribute?: boolean;\n /**\n * Enable or disable drag n’ drop.\n * @default true\n */\n allowDrop?: boolean;\n /**\n * Enable or disable file browser.\n * @default true\n */\n allowBrowse?: boolean;\n /**\n * Enable or disable pasting of files. Pasting files is not\n * supported on all browsers.\n * @default true\n */\n allowPaste?: boolean;\n /**\n * Enable or disable adding multiple files.\n * @default false\n */\n allowMultiple?: boolean;\n /**\n * Allow drop to replace a file, only works when allowMultiple is false.\n * @default true\n */\n allowReplace?: boolean;\n /**\n * Allows the user to revert file upload.\n * @default true\n */\n allowRevert?: boolean;\n /**\n * Allows user to process a file. When set to false, this removes the file upload button.\n * @default true\n */\n allowProcess?: boolean;\n /**\n * Allows the user to reorder the file items\n * @default false\n */\n allowReorder?: boolean;\n /**\n * Allow only selecting directories with browse (no support for filtering dnd at this point)\n * @default false\n */\n allowDirectoriesOnly?: boolean;\n\n /**\n * Require the file to be successfully reverted before continuing.\n * @default false\n */\n forceRevert?: boolean;\n\n /**\n * The maximum number of files that filepond pond can handle.\n * @default null\n */\n maxFiles?: number | null;\n /**\n * Enables custom validity messages.\n * @default false\n */\n checkValidity?: boolean;\n\n /**\n * Set to false to always add items to beginning or end of list.\n * @default true\n */\n itemInsertLocationFreedom?: boolean;\n /**\n * Default index in list to add items that have been dropped at the top of the list.\n * @default 'before'\n */\n itemInsertLocation?: 'before' | 'after' | ((a: FilePondFile, b: FilePondFile) => number);\n /**\n * The interval to use before showing each item being added to the list.\n * @default 75\n */\n itemInsertInterval?: number;\n /**\n * The base value used to calculate file size\n * @default 1000\n */\n fileSizeBase?: number;\n\n /**\n * Tells FilePond to store files in hidden file input elements so they can be posted along with\n * normal form post. This only works if the browser supports the DataTransfer constructor,\n * this is the case on Firefox, Chrome, Chromium powered browsers and Safari version 14.1\n * and higher.\n * @default false\n */\n storeAsFile?: boolean;\n\n /**\n * Shows Powered by PQINA in footer. Can be disabled by setting to false, but please do\n * link to https://pqina.nl somewhere else on your website, or otherwise donate to help\n * keep the project alive.\n * @default \"Powered by PQINA\"\n */\n credits?: false\n}\n\n// TODO delete\n/**\n * @deprecated use `FilePondOptions`. This will be removed in a future release.\n */\nexport interface FilePondOptionProps extends\n FilePondDragDropProps,\n FilePondServerConfigProps,\n FilePondLabelProps,\n FilePondSvgIconProps,\n FilePondCallbackProps,\n FilePondHookProps,\n FilePondStyleProps,\n FilePondBaseProps { }\n\nexport interface FilePondOptions extends\n FilePondDragDropProps,\n FilePondServerConfigProps,\n FilePondLabelProps,\n FilePondSvgIconProps,\n FilePondCallbackProps,\n FilePondHookProps,\n FilePondStyleProps,\n FilePondBaseProps { }\n\nexport type FilePondEventPrefixed = 'FilePond:init'\n | 'FilePond:warning'\n | 'FilePond:error'\n | 'FilePond:addfilestart'\n | 'FilePond:addfileprogress'\n | 'FilePond:addfile'\n | 'FilePond:processfilestart'\n | 'FilePond:processfileprogress'\n | 'FilePond:processfileabort'\n | 'FilePond:processfilerevert'\n | 'FilePond:processfile'\n | 'FilePond:removefile'\n | 'FilePond:updatefiles'\n | 'FilePond:reorderfiles';\n\nexport type FilePondEvent = 'init'\n | 'warning'\n | 'error'\n | 'addfilestart'\n | 'addfileprogress'\n | 'addfile'\n | 'processfilestart'\n | 'processfileprogress'\n | 'processfileabort'\n | 'processfilerevert'\n | 'processfile'\n | 'removefile'\n | 'updatefiles'\n | 'reorderfiles';\n\nexport interface RemoveFileOptions {\n remove?: boolean;\n revert?: boolean;\n}\n\nexport interface FilePond extends Required<FilePondOptions> {}\n"]}
@@ -1316,3 +1316,4 @@ export class SallaFileUpload {
1316
1316
  }; }
1317
1317
  static get elementRef() { return "host"; }
1318
1318
  }
1319
+ //# sourceMappingURL=salla-file-upload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"salla-file-upload.js","sourceRoot":"","sources":["../../../src/components/salla-file-upload/salla-file-upload.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,EAAC,MAAM,eAAe,CAAC;AAC7F,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,8BAA8B,MAAM,oCAAoC,CAAC;AAChF,OAAO,kCAAkC,MAAM,wCAAwC,CAAC;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encil/core';\nimport * as FilePond from 'filepond';\nimport FilePondPluginFileValidateSize from 'filepond-plugin-file-validate-size';\nimport FilePondPluginImageExifOrientation from 'filepond-plugin-image-exif-orientation';\nimport FilePondPluginImagePreview from 'filepond-plugin-image-preview';\nimport FilePondPluginImageEdit from 'filepond-plugin-image-edit';\nimport FilePondPluginFileValidateType from 'filepond-plugin-file-validate-type';\nimport FilePondPluginFilePoster from 'filepond-plugin-file-poster';\n\nimport {FilePondFile} from './interfaces'\nimport {FilePond as FilePondType, FilePondErrorDescription} from 'filepond/types/index'\n\n\n@Component({\n tag: 'salla-file-upload',\n styleUrl: 'salla-file-upload.scss',\n})\nexport class SallaFileUpload {\n constructor() {\n FilePond.registerPlugin(\n FilePondPluginImagePreview,\n FilePondPluginImageExifOrientation,\n FilePondPluginFileValidateSize,\n FilePondPluginImageEdit,\n FilePondPluginFileValidateType,\n FilePondPluginFilePoster\n );\n //if cartItemIdIsPassed, we need to set the url\n if (!this.url && this.cartItemId) {\n this.url = salla.cart.getUploadImageEndpoint();\n this.instantUpload = true;\n }\n\n if (!this.url && this.profileImage) {\n this.url = salla.url.api('profile/update');\n this.instantUpload = true;\n this.host.hasAttribute('name') || (this.name = 'avatar');\n }\n\n if (!this.name) {\n this.name = 'file';\n }\n\n salla.lang.onLoaded(() => {\n this.host.querySelectorAll('.filepond--drop-label>label').forEach(label => label.innerHTML = this.getLabel())\n if (this.filepond) {\n this.filepond.labelFileTypeNotAllowed = salla.lang.get('common.uploader.invalid_type');\n this.filepond.labelMaxFileSizeExceeded = salla.lang.get('common.uploader.too_large');\n this.filepond.labelFileSizeNotAvailable = salla.lang.get('common.uploader.size_not_available');\n this.filepond.labelFileLoading = salla.lang.get('common.elements.loading');\n this.filepond.labelFileLoadError = salla.lang.get('common.uploader.failed_to_load');\n this.filepond.labelFileProcessing = salla.lang.get('common.uploader.uploading');\n this.filepond.labelFileProcessingComplete = salla.lang.get('common.uploader.upload_completed');\n this.filepond.labelFileProcessingAborted = salla.lang.get('common.uploader.upload_cancelled');\n this.filepond.labelFileProcessingError = salla.lang.get('common.uploader.error_uploading');\n this.filepond.labelTapToCancel = salla.lang.get(\"common.elements.cancel\");\n this.filepond.labelTapToRetry = salla.lang.get(\"common.elements.retry\");\n this.filepond.labelButtonRemoveItem = salla.lang.get(\"common.elements.remove\");\n this.filepond.labelButtonUndoItemProcessing = salla.lang.get(\"common.elements.undo\");\n this.filepond.labelButtonProcessItem = salla.lang.get(\"common.uploader.upload\");\n }\n });\n }\n\n private fileUploader: HTMLInputElement;\n private hiddenInput: HTMLInputElement;\n public filepond: FilePondType;\n\n @Element() host: HTMLElement;\n\n /**\n * The uploaded image link or URL\n */\n @Prop({reflect: true, mutable: true}) value: string;\n\n /**\n * The uploaded files as json `[{url:\"...\", id:123}]` for delete possibility\n */\n @Prop({reflect: true}) files: string;\n\n /**\n * The original height of the uploader, will be used to reset the height after the image is removed.\n */\n @Prop({reflect: true}) height: string;\n\n /**\n * to prepare the upload url automatically pass this prop, ex to upload attach file in cart Item.\n */\n @Prop() cartItemId?: string;\n\n /**\n * Set the component to be profile image uploader with a preview and a circular shape\n */\n @Prop({reflect: true}) profileImage: boolean = false;\n\n /**\n * File input name for the native formData\n */\n @Prop({mutable: true, reflect: true}) name?: string;\n\n /**\n * File input name in the request payload\n */\n @Prop() payloadName: string;\n\n /**\n * Accepted file types\n */\n @Prop({reflect: true, mutable: true}) accept: string = \"image/png, image/jpeg, image/jpg, image/gif\";\n\n /**\n * If current file has id, pass it here, to be passed back in the `removed` event\n */\n @Prop() fileId?: number;\n\n /**\n * The url to submit the image into.\n */\n @Prop({mutable: true}) url: string;\n /**\n * The submit request method.\n */\n @Prop() method: string = 'POST';\n\n /**\n * json formData to be injected in the submit request\n */\n @Prop() formData: string = \"{}\";\n\n /**\n * Sets the required attribute to the output field\n */\n @Prop() required: boolean;\n\n /**\n * The maximum size of a file, for instance 2MB or 750KB\n */\n @Prop() maxFileSize: `${number}MB` | `${number}KB}` = '2MB'\n\n /**\n * Sets the disabled attribute to the output field\n */\n @Prop() disabled: boolean;\n\n /**\n * Enable or disable drag n' drop\n */\n @Prop() allowDrop: boolean = true;\n\n /**\n * Enable or disable file browser\n */\n @Prop() allowBrowse: boolean = true;\n\n /**\n * Enable or disable pasting of files. Pasting files is not supported on all browesrs.\n */\n @Prop() allowPaste: boolean;\n\n /**\n * Enable or disable adding multiple files\n */\n @Prop() allowMultiple: boolean;\n\n /**\n * Allow drop to replace a file, only works when allowMultiple is false\n */\n @Prop() allowReplace: boolean = true;\n\n /**\n * Enable or disable the revert processing button\n */\n @Prop() allowRevert: boolean = true;\n\n /**\n * When set to false the remove button is hidden and disabled\n */\n @Prop() allowRemove: boolean = true;\n\n /**\n * Enable or disable the process button\n */\n @Prop() allowProcess: boolean;\n\n /**\n * Allow users to reorder files with drag and drop interaction.\n * Note that this only works in single column mode.\n * It also only works on browsers that support pointer events.\n */\n @Prop() allowReorder: boolean;\n\n /**\n * Tells FilePond to store files in hidden file input elements so they can be posted along with normal form post.\n * This only works if the browser supports the DataTransfer constructor (https://caniuse.com/mdn-api_datatransfer_datatransfer),\n * this is the case on Firefox, Chrome, Chromium powered browsers and Safari version 14.1 and higher.\n */\n @Prop() storeAsFile: boolean;\n\n /**\n * Set to true to require the file to be successfully reverted before continuing.\n */\n @Prop() forceRevert: boolean;\n\n /**\n * The maximum number of files that the pond can handle\n */\n @Prop() maxFilesCount: number = null;\n\n /**\n * The maxmimum number of files that can be uploaded in parallel\n */\n @Prop() maxParallelUploads: number = 2;\n\n /**\n * Set to true to enable custom validity messages.\n * FilePond will throw an error when a parent form is submitted and it contains invalid files.\n */\n @Prop() checkValidity: boolean;\n\n /**\n * Set to 'after' to add files to end of list (when dropped at the top of the list or added using browse or paste),\n * set to 'before' to add files at start of list.\n * Set to a compare function to automatically sort items when added\n */\n @Prop() itemInsertLocation: 'before' | 'after' | ((a: FilePondFile, b: FilePondFile) => number) = 'after';\n\n /**\n * The interval to use before showing each item being added to the list\n */\n @Prop() itemInsertInterval: number = 75;\n\n /**\n * Show credits at the bottom of the upload element.\n * Structure is like [{label,url}]\n */\n @Prop() credits: false;\n\n /// DRAG and DROP Props\n\n /**\n * FilePond will catch all files dropped on the webpage\n */\n @Prop() dropOnPage: boolean;\n\n /**\n * Require drop on the FilePond element itself to catch the file.\n */\n @Prop() dropOnElement: boolean = true;\n\n /**\n * When enabled, files are validated before they are dropped. A file is not added when it's invalid.\n */\n\n @Prop() dropValidation: boolean;\n\n /**\n * Ignored file names when handling dropped directories. Dropping directories is not supported on all browsers.\n */\n @Prop() ignoredFiles: Array<any> = ['.ds_store', 'thumbs.db', 'desktop.ini'];\n\n /**\n * Immediately upload new files to the server\n */\n @Prop({mutable: true}) instantUpload: boolean;\n\n /**\n * Enable chunked uploads, when enabled will automatically cut up files in chunkSize chunks before upload.\n */\n @Prop() chunkUploads: boolean;\n\n /**\n * Force chunks even for files smaller than the set chunkSize\n */\n @Prop() chunkForce: boolean;\n\n /**\n * The size of a chunk in bytes\n */\n @Prop() chunkSize: number = 5000000;\n\n /**\n * Amount of times, and delayes, between retried uploading of a chunk\n */\n @Prop() chunkRetryDelays: Array<number> = [500, 1000, 3000];\n\n\n /// Labels Props\n\n /**\n * The decimal separator used to render numbers. By default this is determined automatically.\n */\n @Prop() labelDecimalSeparator: string = undefined;\n\n /**\n * The thousdands separator used to render numbers. By default this is determined automatically.\n */\n @Prop() labelThousandsSeparator: string = undefined;\n\n /**\n * Default label shown to indicate this is a drop area.\n * FilePond will automatically bind browse file events to the element with CSS class .filepond--label-action\n * @default `${salla.lang.get('common.uploader.drag_and_drop')}<span class=\"filepond--label-action\"> ${salla.lang.get('common.uploader.browse')} </span>`\n */\n @Prop({mutable: true}) labelIdle: string;\n\n /// SVG Icons\n\n /**\n * The icon used for remove actions\n */\n @Prop() iconRemove: string = '<svg>...</svg>';\n\n /**\n * The icon used for process actions\n */\n @Prop() iconProcess: string = '<svg>...</svg>';\n\n /**\n * The icon used for retry actions\n */\n @Prop() iconRetry: string = '<svg>...</svg>';\n\n /**\n * The icon used for undo actions\n */\n @Prop() iconUndo: string = '<svg>...</svg>';\n\n /// Hooks\n\n /**\n * Event emitted when the file has been added\n */\n @Event() added: EventEmitter<{ error: FilePondErrorDescription | null, file: FilePondFile }>;\n\n /**\n * Event emitted when the input is invalid\n */\n @Event() invalidInput: EventEmitter<any>;\n\n addedHandler(error: FilePondErrorDescription | null, file: FilePondFile) {\n this.added.emit({error: error, file: file});\n //if the file passed on initiate will not have type\n this.host.querySelector('.filepond--root').classList.remove('s-file-upload-has-error');\n if (error || !file.file.type) {\n this.host.querySelector('.filepond--root').classList.add('s-file-upload-has-error');\n return;\n }\n let container = new DataTransfer;\n let fileInput = this.getFormDataFileInput();\n // @ts-ignore\n container.items.add(file.file);\n fileInput.type = 'file';\n fileInput.files = container.files;\n fileInput.dispatchEvent(new window.Event('change', {bubbles: true}))\n }\n\n /**\n * Event emitted when the file has been uploaded and link to the file has been recieved from the server. Returns string value.\n */\n @Event() uploaded: EventEmitter<string>;\n\n uploadedHandler() {\n let fileInput = this.getFormDataFileInput();\n fileInput.type = 'hidden';\n fileInput.value = this.value;\n this.hiddenInput.value = this.value;\n fileInput.dispatchEvent(new window.Event('change', {bubbles: true}))\n return this.uploaded.emit(this.value);\n }\n\n /**\n * Event emitted when the file is about to be removed. Returns boolean value.\n */\n @Event() removed: EventEmitter<FilePondFile>;\n\n removedHandler(deletedFile: FilePondFile) {\n let fileInput = this.getFormDataFileInput();\n fileInput.type = 'hidden';\n fileInput.value = '';\n this.host.closest('.s-product-options-option')?.removeAttribute('data-has-value');\n if (deletedFile.getMetadata('id')) {\n salla.cart.api.deleteImage(deletedFile.getMetadata('id'));\n }\n if (this.height) {\n setTimeout(() => (this.host.querySelector('.filepond--root') as HTMLElement).style.height = this.height, 1000);\n }\n this.hiddenInput.value = '';\n fileInput.dispatchEvent(new window.Event('change', {bubbles: true}))\n return this.removed.emit(deletedFile);\n }\n\n /**\n * Method to set option for filepond\n * */\n @Method()\n async setOption(key: string, value: string | number) {\n this.filepond[key] = value;\n }\n\n private getLabel() {\n if (this.labelIdle) {\n //some times we are passing label before translations is loaded, so here we will make sure that all translations are translated\n return this.labelIdle\n .replace('common.uploader.drag_and_drop', salla.lang.get('common.uploader.drag_and_drop'))\n .replace('common.uploader.browse', salla.lang.get('common.uploader.browse'));\n }\n return `${salla.lang.get('common.uploader.drag_and_drop')}<span class=\"filepond--label-action\"> ${salla.lang.get('common.uploader.browse')} </span>`;\n }\n\n /**\n *\n * This method will fire head request to get the file size, it's head request,so it will be too fast.\n */\n private getFileSize(url: string) {\n let http = new XMLHttpRequest();\n http.open('HEAD', url, false); // false = Synchronous\n http.send(null); // it will stop here until this http request is complete\n\n return http.status === 200 ? http.getResponseHeader('content-length') : '';\n }\n\n private getFormDataFileInput(): HTMLInputElement {\n return this.host.querySelector('.filepond--data input');\n }\n\n private getFiles() {\n if (!this.value && !this.files) {\n return [];\n }\n try {\n let files = this.files\n ? JSON.parse(this.files)\n : this.value.split(',').map(file => ({url: file}));\n if (files.length) {\n this.host.closest('.s-product-options-option')?.setAttribute('data-has-value', 'true');\n }\n return files.map(file => ({\n source: file.id ? `${file.id}` : file.url,\n options: {\n type: 'local',\n file: {\n name: file.url.substring(file.url.lastIndexOf('/') + 1),\n size: this.getFileSize(file.url)\n },\n metadata: {poster: file.url, name: file.url, id: file.id},\n },\n }));\n } catch (e) {\n salla.log('failed To get files from: ' + (this.files || this.value));\n }\n return [];\n }\n\n componentWillLoad() {\n if (!this.labelIdle) {\n this.labelIdle = this.host.innerHTML;\n this.host.innerHTML = '';\n }\n }\n\n render() {\n return (\n <Host class={{\n \"s-file-upload\": true,\n \"s-file-upload-profile-image\": this.profileImage,\n }}>\n <input\n type=\"file\"\n name={this.name}\n value={this.value}\n ref={ele => this.fileUploader = ele}\n required={this.required}\n class=\"s-file-upload-wrapper s-file-upload-input\"\n accept={this.accept}/>\n\n {/* Workaround to handle native validation on the file input */}\n <input class=\"s-hidden\" name={'hidden-'+this.name} required={this.required} value={this.value} ref={input => this.hiddenInput = input} />\n </Host>\n );\n }\n\n componentDidLoad() {\n let files = this.getFiles();\n this.filepond = FilePond.create(\n this.fileUploader,\n {\n name: this.payloadName || this.name,\n //@ts-ignore\n files: files,\n required: this.required,\n disabled: this.disabled,\n allowDrop: this.allowDrop,\n allowBrowse: this.allowBrowse,\n allowPaste: this.allowPaste,\n allowMultiple: this.allowMultiple,//||files.length,\n allowReplace: this.allowReplace,\n allowRevert: this.allowRevert,\n allowProcess: this.allowProcess,\n allowReorder: this.allowReorder,\n storeAsFile: this.storeAsFile,\n forceRevert: this.forceRevert,\n maxFiles: this.maxFilesCount,\n maxParallelUploads: this.maxParallelUploads,\n checkValidity: this.checkValidity,\n itemInsertLocation: this.itemInsertLocation,\n itemInsertInterval: this.itemInsertInterval,\n credits: this.credits,\n dropOnPage: this.dropOnPage,\n dropOnElement: this.dropOnElement,\n dropValidation: this.dropValidation,\n ignoredFiles: this.ignoredFiles,\n onaddfile: (error, file) => this.addedHandler(error, file),\n server: {\n url: this.url,\n method: this.method,\n // @ts-ignore\n process: {\n onload: response => {\n let url = JSON.parse(response).data;\n this.value = url.filePath || url.url;\n\n this.uploadedHandler();\n return this.value;\n },\n headers: salla.api.getHeaders(),\n onerror: response => {\n try {\n let field = JSON.parse(response).error.fields;\n field = field[this.payloadName || this.name]\n return (field && field[0]) || salla.lang.get('common.errors.error_occurred');\n } catch (e) {\n salla.log('FileUpload:: Error', e);\n return salla.lang.get('common.errors.error_occurred');\n }\n },\n ondata: formData => {\n if (this.payloadName && this.payloadName != this.name) {\n formData.append(this.payloadName, this.filepond.getFile(0).file);\n formData.delete(this.name);\n }\n if (this.cartItemId) {\n formData.append('cart_item_id', this.cartItemId);\n }\n try {\n Object.entries(JSON.parse(this.formData)).forEach((value: [string, string]) => value[1] && formData.append(value[0], value[1]));\n } catch (e) {\n salla.log('Error to inject formData', e);\n }\n return formData;\n }\n },\n },\n instantUpload: this.instantUpload,\n chunkUploads: this.chunkUploads,\n chunkForce: this.chunkForce,\n chunkSize: this.chunkSize,\n chunkRetryDelays: this.chunkRetryDelays,\n labelDecimalSeparator: this.labelDecimalSeparator,\n labelThousandsSeparator: this.labelThousandsSeparator,\n labelIdle: this.getLabel(),\n acceptedFileTypes: this.accept.replace(/\\s+/g, '').split(','),\n labelFileTypeNotAllowed: salla.lang.get('common.uploader.invalid_type'),\n fileValidateTypeLabelExpectedTypes: '{allButLastType}, {lastType}',\n labelMaxFileSizeExceeded: salla.lang.get('common.uploader.too_large'),\n labelMaxFileSize: '{filesize}',\n maxFileSize: this.maxFileSize,\n // onprocessfile: (error, file) =>salla.log(error, JSON.parse(file.serverId)),\n beforeRemoveFile: (deletedFile: FilePondFile) =>\n new Promise((resolve) => {\n this.removedHandler(deletedFile);\n resolve(true);\n }),\n }\n );\n\n this.hiddenInput.addEventListener('invalid', e => {\n this.invalidInput.emit(e);\n });\n this.hiddenInput.addEventListener('change', () => {\n this.hiddenInput.setCustomValidity('');\n this.hiddenInput.reportValidity();\n });\n }\n}\n"]}
@@ -2,3 +2,4 @@
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
4
  export {};
5
+ //# sourceMappingURL=gift-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gift-schema.js","sourceRoot":"","sources":["../../../src/components/salla-gifting/gift-schema.ts"],"names":[],"mappings":"","sourcesContent":["export interface GiftResponse {\n quantity: number;\n product: Product;\n sender_name: string;\n gift_images: GiftImage[];\n gift_texts: GiftText[];\n}\n\nexport interface Product {\n id: number;\n name: string;\n type: string;\n}\n\nexport interface GiftImage {\n id: number;\n url: string;\n}\n\nexport interface GiftText {\n id: number;\n text: string;\n}"]}
@@ -2,3 +2,4 @@
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
4
  export {};
5
+ //# sourceMappingURL=intefaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intefaces.js","sourceRoot":"","sources":["../../../src/components/salla-gifting/intefaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface GiftToCardDTO {\n text: string;\n sender_name: string;\n receiver: Receiver;\n quantity: number;\n deliver_at: string;\n image_url: string;\n time_zone?: string;\n donation_amount?: number;\n}\n\nexport interface Receiver {\n name: string;\n country_code?: string;\n mobile: string;\n}\n\n\nexport interface Phone {\n country_code: string;\n number: string;\n}\n"]}
@@ -563,3 +563,4 @@ export class SallaGifting {
563
563
  }
564
564
  }; }
565
565
  }
566
+ //# sourceMappingURL=salla-gifting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"salla-gifting.js","sourceRoot":"","sources":["../../../src/components/salla-gifting/salla-gifting.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAChE,OAAO,MAAM,MAAM,6BAA6B,CAAC;AACjD,OAAO,SAAS,MAAM,iCAAiC,CAAC;AACxD,OAAO,MAAM,MAAM,6BAA6B,CAAC;AACjD,OAAO,WAAW,MAAM,mCAAmC,CAAC;AAO5D,MAAM,OAAO,YAAY;EACvB;IAyCS,2BAAsB,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;IAiB7F,gBAAW,GAAW,CAAC,CAAC;IACxB,iBAAY,GAAY,KAAK,CAAC;IAC9B,iBAAY,GAAY,KAAK,CAAC;IAC9B,gBAAW,GAAW,EAAE,CAAC;IACzB,gBAAW,GAAW,mBAAmB,CAAC;IAC1C,WAAM,GAAW,EAAE,CAAC;IAEpB,SAAI,GAAiB,SAAS,CAAC;IAC/B,2BAAsB,GAAW,SAAS,CAAC;IAE3C,iBAAY,GAAY,KAAK,CAAC;IAEvC,kBAAkB;IACT,kBAAa,GAAW,SAAS,CAAC;IAClC,kBAAa,GAAW,SAAS,CAAC;IAClC,iBAAY,GAAW,SAAS,CAAC;IAGjC,aAAQ,GAA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EAAC,SAAS,EAAC,KAAK,EAAC,MAAM;wBAC1E,gBAAO,IAAI,CAAC,QAAQ,CAAQ,CACf,CACX,CACF,CACF;eAAC;UAEX,YAAM,IAAI,EAAC,QAAQ,GAAE,CACT,CACV;KAEP,CAAA;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import anime from 'animejs';\nimport {GiftResponse, GiftImage, GiftText} from './gift-schema'\nimport {Component, h, Prop, State, Method} from '@stencil/core';\nimport Images from '../../assets/svg/images.svg';\nimport LeftArrow from '../../assets/svg/arrow-left.svg';\nimport Cancel from '../../assets/svg/cancel.svg';\nimport GiftSharing from '../../assets/svg/gift-sharing.svg';\nimport {GiftToCardDTO, Phone} from './intefaces';\n\n@Component({\n tag: 'salla-gifting',\n styleUrl: 'salla-gifting.scss',\n})\nexport class SallaGifting {\n constructor() {\n salla.lang.onLoaded(() => {\n this.selectImageOrUpload = salla.lang.get('blocks.buy_as_gift.select_image_or_upload');\n this.selectImageForYourGift = salla.lang.get('blocks.buy_as_gift.select_image_for_your_gift');\n this.sectionTitle = salla.lang.get('blocks.buy_as_gift.gift_the_one_you_love');\n this.sectionSubtitle = salla.lang.get('blocks.buy_as_gift.gift_the_one_you_love_message')\n this.sectionBtnText = salla.lang.get('blocks.buy_as_gift.send_as_a_gift');\n this.giftDetails = salla.lang.get('blocks.buy_as_gift.gift_details');\n this.selectGiftMessage = salla.lang.get('blocks.buy_as_gift.select_gift_message');\n this.giftCustomText = salla.lang.get('blocks.buy_as_gift.gift_custom_text');\n this.textId = salla.lang.get('blocks.buy_as_gift.text_id');\n this.incorrectGiftText = salla.lang.get('blocks.buy_as_gift.incorrect_gift_text');\n this.nextStep = salla.lang.get('blocks.buy_as_gift.next_step');\n this.senderNameLabel = salla.lang.get('blocks.buy_as_gift.sender_name');\n this.receiverNameFieldLabel = salla.lang.get('blocks.buy_as_gift.receiver_name');\n this.receiverMobileFieldLabel = salla.lang.get('blocks.buy_as_gift.receiver_mobile');\n this.receiverEmailFieldLabel = salla.lang.get('blocks.buy_as_gift.receiver_email');\n this.emailPlaceholder = salla.lang.get('common.elements.email_placeholder');\n this.sendLater = salla.lang.get('blocks.buy_as_gift.send_later');\n this.selectSendDateAndTime = salla.lang.get('blocks.buy_as_gift.select_send_date_and_time');\n this.canNotEditOrderAfterSelectDate = salla.lang.get('blocks.buy_as_gift.can_not_edit_order_after_select_date');\n this.sendGift = salla.lang.get('blocks.buy_as_gift.send_gift');\n this.donationRequired = salla.lang.get('pages.products.donation_amount_required');\n this.currentLang = salla.lang.locale\n });\n }\n\n private modal: HTMLSallaModalElement;\n private uploader?: HTMLDivElement;\n private stepsWrapper?: HTMLDivElement;\n private textSelect?: HTMLDivElement;\n private customTextArea?: HTMLDivElement;\n private textArea?: HTMLTextAreaElement;\n private calendarFormGroup?: HTMLDivElement;\n private step1Elems?: HTMLDivElement;\n private step2Elems?: HTMLDivElement;\n\n @State() sectionTitle: string;\n @State() sectionSubtitle: string;\n @State() sectionBtnText: string;\n @State() giftDetails: string;\n @State() selectImageForYourGift: string = salla.lang.get('blocks.buy_as_gift.select_image_or_upload');\n @State() selectImageOrUpload: string;\n @State() selectGiftMessage: string;\n @State() giftCustomText: string;\n @State() textId: string;\n @State() incorrectGiftText: string;\n @State() nextStep: string;\n @State() senderNameLabel: string;\n @State() receiverNameFieldLabel: string;\n @State() receiverMobileFieldLabel: string;\n @State() receiverEmailFieldLabel: string;\n @State() emailPlaceholder: string;\n @State() sendLater: string;\n @State() selectSendDateAndTime: string;\n @State() canNotEditOrderAfterSelectDate: string;\n @State() sendGift: string;\n @State() donationRequired: string;\n @State() currentStep: number = 1;\n @State() showCalendar: boolean = false;\n @State() showGiftText: boolean = false;\n @State() currentLang: string = '';\n @State() parentClass: string = \"is-current-step-1\";\n @State() errors: object = {};\n\n @State() gift: GiftResponse = undefined;\n @State() selectedGiftTextOption: string = undefined;\n\n @State() showTextArea: boolean = false;\n\n /// Gift Form Data\n @State() selectedImage: string = undefined;\n @State() uploadedImage: string = undefined;\n @State() selectedText: string = undefined;\n @State() senderName: string;\n @State() errorMessage: string;\n @State() hasError: boolean = false;\n @State() quantity: number;\n @State() deliveryDate: string;\n @State() timeZone?: string = null;\n // Receiver Data\n @State() receiverName: string;\n @State() receiverMobile: string;\n @State() receiverCountryCode: string;\n @State() receiverEmail: string;\n\n\n /**\n * The product id for which the gifting system is required.\n */\n @Prop() productId: number;\n\n /**\n * Widget subtitle\n */\n @Prop() widgetSubtitle: string;\n\n componentDidLoad() {\n salla.event.product.onPriceUpdated(() => {\n const quantityInput = document.querySelector('.s-quantity-input-input') as HTMLElement\n // @ts-ignore\n this.quantity = quantityInput.value\n });\n }\n\n /**\n * Show / Open the gifting modal window\n */\n @Method()\n async open() {\n if (salla.config.isGuest()) {\n salla.event.dispatch('login::open');\n return;\n }\n this.modal.open()\n return await salla.api.withoutNotifier(() => salla.product.getGiftDetails(this.productId))\n .then((response) => {\n this.gift = response.data;\n this.senderName = this.gift.sender_name;\n })\n .catch(e => {\n this.hasError = true;\n this.errorMessage = e.response?.data?.error?.message || e.response?.data;\n })\n .finally(() => this.modal.stopLoading());\n }\n\n /**\n *\n * Hide / close the gifting modal window\n */\n @Method()\n async close() {\n return this.modal.close();\n }\n\n\n /**\n * Update the modal height based on the changes on the inner elements height for a specific step OR just a pass a new fixed height\n */\n private async setWrapperHeight(asStep = 1, delay = 250, additionSpace = 0, newHeight = 0) {\n let currentStep: HTMLElement = document.querySelector(`.gift-step-${asStep}`) as HTMLElement;\n setTimeout(() => {\n let currentStepHeight: number = currentStep.offsetHeight;\n if (newHeight) {\n this.stepsWrapper.style.height = `${newHeight}px`;\n } else {\n this.stepsWrapper.style.height = currentStepHeight + additionSpace + 'px';\n }\n }, delay)\n }\n\n private toggleCalendar() {\n this.showCalendar = !this.showCalendar;\n this.setWrapperHeight(2, 150, 0);\n }\n\n private toggleGiftText(event) {\n this.textSelect?.classList.remove('s-form-has-error');\n let dataID = event.target.children[event.target.selectedIndex].getAttribute('data-id')\n let customID = dataID == \"custom\";\n this.showGiftText = customID;\n\n if (dataID) {\n this.selectedGiftTextOption = dataID\n customID ? this.selectedText = undefined : this.selectedText = event.target.value\n this.setWrapperHeight(1, 150, 5);\n } else {\n // empty textarea value\n this.textArea.value = '';\n this.selectedText = undefined\n this.selectedGiftTextOption = undefined\n this.setWrapperHeight(1, 150, -15);\n }\n\n }\n\n /**\n *\n * Go to the step 2\n */\n @Method()\n async goToStep2() {\n if (!this.selectedGiftTextOption) {\n this.textSelect.classList.add('s-form-has-error');\n this.customTextArea.classList.remove('s-form-has-error');\n return;\n } else if (this.selectedGiftTextOption == 'custom' && !this.selectedText) {\n this.textSelect.classList.remove('s-form-has-error');\n this.customTextArea.classList.add('s-form-has-error');\n return;\n } else {\n this.textSelect.classList.remove('s-form-has-error');\n this.customTextArea.classList.remove('s-form-has-error');\n }\n this.setWrapperHeight(2, 600, 0);\n\n let stepNextAnime = new anime.timeline();\n stepNextAnime.add({\n targets: this.step1Elems.querySelectorAll('.anime-item'),\n opacity: [1, 0],\n translateX: [0, 50],\n delay: anime.stagger(70),\n // easing: 'easeOutExpo',\n duration: 1200,\n })\n .add({\n targets: '.gift-step-2',\n translateX: ['-110%', 0],\n opacity: [0, 1],\n }, '-=1800')\n .add({\n targets: this.step2Elems.querySelectorAll('.anime-item'),\n opacity: [0, 1],\n translateX: [-50, 0],\n delay: anime.stagger(70),\n duration: 1200,\n complete: () => {\n this.step2Elems.querySelectorAll('.anime-item').forEach(item => {\n item.classList.remove('opacity-0')\n item.removeAttribute('style');\n })\n }\n }, '-=1200')\n this.currentStep = 2;\n this.parentClass = `is-current-step-${this.currentStep}`\n }\n\n /**\n *\n * Go to the step 1\n */\n goToStep1(e) {\n e.preventDefault();\n let stepBackAnime = new anime.timeline({\n autoplay: false,\n });\n\n stepBackAnime.add({\n targets: this.step2Elems.querySelectorAll('.anime-item'),\n opacity: [1, 0],\n translateX: [0, -50],\n delay: anime.stagger(70),\n // easing: 'easeOutExpo',\n duration: 1200,\n })\n .add({\n targets: '.gift-step-1',\n translateX: ['110%', 0],\n opacity: [0, 1],\n }, '-=1800')\n .add({\n targets: this.step1Elems.querySelectorAll('.anime-item'),\n opacity: [0, 1],\n translateX: [50, 0],\n delay: anime.stagger(70),\n duration: 1200,\n complete: () => {\n this.step1Elems.querySelectorAll('.anime-item').forEach(item => {\n item.classList.remove('opacity-0')\n item.removeAttribute('style');\n })\n }\n }, '-=1200')\n\n stepBackAnime.play();\n this.setWrapperHeight(1, 600, 0);\n this.currentStep = 1;\n this.parentClass = `is-current-step-${this.currentStep}`\n }\n\n private getFilepondPlaceholder() {\n return `<div class=\"s-gifting-filepond-placeholder\"><span class=\"s-gifting-filepond-placeholder-icon\">${Images}</span><p class=\"s-gifting-filepond-placeholder-text\">${this.selectImageOrUpload ? this.selectImageOrUpload : ''}</p></div>`\n }\n\n setPreview(image: GiftImage) {\n this.uploader?.classList.add('has-bg')\n var bg = document.querySelector('.filepond-bg') ? document.querySelector('.filepond-bg') as HTMLElement : document.createElement('div') as HTMLElement;\n bg.classList.add('filepond-bg')\n bg.classList.remove('s-hidden')\n bg.style.backgroundImage = \"url('\" + image.url + \"')\"\n this.uploader?.querySelector('.filepond--root').appendChild(bg);\n this.uploadedImage = image.url;\n if (!!this.gift && this.gift.gift_images.length) {\n this.setWrapperHeight(1, 150, 0);\n }\n }\n\n removePreview() {\n this.uploader.classList.remove('has-bg');\n let bg = document.querySelector('.filepond-bg') as HTMLElement;\n bg.removeAttribute('style');\n bg.classList.add('s-hidden');\n this.handleRemoveImage()\n }\n\n private handleTextAreaChange(event) {\n this.selectedText = event.target.value;\n this.customTextArea.classList.remove('s-form-has-error');\n }\n\n private handleSenderName(event) {\n this.senderName = event.target.value;\n }\n\n private handleReceiverName(event) {\n this.receiverName = event.target.value;\n }\n\n private handleUploadImage(img) {\n this.uploadedImage = img;\n if (!!this.gift && this.gift.gift_images.length) {\n this.setWrapperHeight(1, 150, 0);\n }\n }\n\n private handleRemoveImage() {\n this.uploadedImage = '';\n if (!!this.gift && this.gift.gift_images.length) {\n this.setWrapperHeight(1, 150, 0);\n }\n }\n\n // private handleReceiverEmail(event) {\n // this.receiverEmail = event.target.value;\n // }\n\n private handlePhoneInputChange(event) {\n let phone: Phone = event.detail;\n this.receiverMobile = phone.number;\n this.receiverCountryCode = phone.country_code;\n }\n\n private handleDateTimePicker(event) {\n this.deliveryDate = event.detail;\n }\n\n private getCalendarClasses() {\n return {\n \"s-form-group\": true,\n \"anime-item\": true,\n \"s-gifting-calendar\": true,\n \"shown\": this.showCalendar,\n \"hide\": !this.showCalendar,\n \"s-form-has-error\": !!this.errors && this.errors['deliver_at']\n }\n }\n\n private async submitForm() {\n // @ts-ignore\n const donatingAmount = document.querySelector('#donating-amount')?.value\n this.calendarFormGroup.classList.remove('s-form-has-error');\n if (!!this.errors) {\n this.errors = {}\n this.setWrapperHeight(2, 150, 0);\n }\n if (this.showCalendar && !this.deliveryDate) {\n this.calendarFormGroup.classList.add('s-form-has-error');\n return;\n }\n let payload: GiftToCardDTO = {\n text: this.selectedText,\n sender_name: this.senderName,\n quantity: this.quantity,\n deliver_at: this.showCalendar ? this.deliveryDate : null,\n image_url: this.uploadedImage ?? this.selectedImage,\n donation_amount: donatingAmount ? donatingAmount : null,\n receiver: {\n name: this.receiverName,\n country_code: this.receiverCountryCode,\n mobile: this.receiverMobile\n }\n }\n return await salla.product.addGiftToCart(this.productId, payload, true).then((resp) => {\n console.log(resp);\n this.modal.close()\n }).catch((e) => {\n if (e.response.status == 422) {\n this.errors = e.response.data.error.fields\n } else {\n console.log(e);\n }\n this.setWrapperHeight(2, 150, 0);\n })\n }\n\n render() {\n return [\n <div>\n <salla-list-tile class=\"s-gifting-widget\">\n <div slot=\"title\">\n <h3>{this.sectionTitle}</h3>\n </div>\n <div slot=\"subtitle\">\n <div>{!!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle}</div>\n </div>\n <div slot=\"action\">\n <salla-button class=\"s-gifting-widget-action\" color=\"gray\" onClick={() => this.open()}>\n <span innerHTML={GiftSharing}></span> &nbsp;\n <span>{this.sectionBtnText}</span>\n </salla-button>\n </div>\n </salla-list-tile>\n\n <salla-modal id='salla-gifting-modal' isLoading={true} class=\"s-gifting-modal\" width=\"sm\"\n ref={modal => this.modal = modal}>\n <div slot=\"loading\">\n <div class=\"s-gifting-skeleton\">\n <div class=\"s-gifting-modal-header\">\n <salla-skeleton type='circle' height='5rem' width='5rem'></salla-skeleton>\n <h2 class=\"s-gifting-modal-title\">\n <div class=\"s-gifting-modal-badge-wrapper\">\n <salla-skeleton height='15px' width='150px'></salla-skeleton>\n </div>\n </h2>\n </div>\n <div class=\"s-gifting-skeleton-content\">\n <salla-skeleton height='10px' width='150px'></salla-skeleton>\n <salla-skeleton height='230px'></salla-skeleton>\n <salla-skeleton height='10px' width='150px'></salla-skeleton>\n <salla-skeleton height='30px'></salla-skeleton>\n <salla-skeleton height='40px'></salla-skeleton>\n </div>\n </div>\n </div>\n <slot name=\"header\"/>\n {!!this.hasError ?\n <salla-placeholder alignment=\"center\">\n <span slot=\"title\">{this.errorMessage || salla.lang.get('common.errors.empty_results')}</span>\n <span slot=\"description\"> </span>\n </salla-placeholder>\n :\n [\n <div class=\"s-gifting-modal-header\">\n <span class=\"s-gifting-modal-icon\">\n <span innerHTML={GiftSharing}></span>\n </span>\n <h2 class=\"s-gifting-modal-title\">\n <div class=\"s-gifting-modal-badge-wrapper\">\n <div class=\"s-gifting-modal-badge\">\n <span><span>{this.currentStep}</span>/2</span>\n </div>\n <span>{this.giftDetails}</span>\n </div>\n </h2>\n </div>,\n <div class={\"s-gifting-steps-wrapper \" + this.parentClass} ref={el => this.stepsWrapper = el}>\n <div class=\"s-gifting-step-one gift-step-1\" ref={el => this.step1Elems = el}>\n <div class=\"s-gifting-modal-uploader-title anime-item\">\n {this.selectImageForYourGift}\n </div>\n <div class=\"s-gifting-modal-uploader anime-item\" ref={el => this.uploader = el as HTMLDivElement}>\n <span class=\"s-gifting-remove-preview\" onClick={() => this.removePreview()} innerHTML={Cancel}/>\n {this.selectImageOrUpload && <salla-file-upload\n instant-upload={true}\n name=\"image_url\"\n url={salla.url.api(salla.product.api.getUrl('giftImage'))}\n onUploaded={event => this.handleUploadImage(event.detail)}\n labelIdle={this.getFilepondPlaceholder()}\n onRemoved={() => this.handleRemoveImage()}/>}\n\n </div>\n <div class=\"anime-item\">\n {!this.uploadedImage && !!this.gift && this.gift.gift_images.length > 0 ?\n <salla-slider\n id=\"gifting-slider\"\n loop={false}\n //todo:: it looks bad attribute\n controls-outer={true}\n class=\"s-gifting-slider\"\n type=\"carousel\">\n <div slot=\"items\">\n {this.gift?.gift_images.map((item: GiftImage) =>\n <img class=\"s-gifting-image s-gifting-clickable\" src={item.url}\n onClick={() => this.setPreview(item)} alt={`${item.id}`}/>\n )}\n </div>\n </salla-slider>\n : \"\"}\n </div>\n <div class=\"anime-item\">\n\n <div class=\"s-form-group s-gifting-selectText\" ref={el => this.textSelect = el as HTMLDivElement}>\n <select id=\"gift-text-selection\" name=\"gift-text-selection\"\n class=\"s-form-control s-gifting-select\" onChange={e => this.toggleGiftText(e)}>\n <option data-id={null} selected>{this.selectGiftMessage}</option>\n {this.gift?.gift_texts.map((txt: GiftText) =>\n <option data-id={txt.id} value={txt.text} key={txt.id}>{txt.text}</option>\n )}\n <option data-id=\"custom\">{this.giftCustomText}</option>\n </select>\n </div>\n\n <div\n class={this.showGiftText ? \"s-form-group s-gifting-textarea shown\" : \"s-form-group s-gifting-textarea hide\"}\n ref={(el) => this.customTextArea = el}>\n <label htmlFor=\"gift-custom-text\" class=\"s-form-label\">{this.giftCustomText}</label>\n <div class=\"mt-1\">\n <textarea onInput={(event) => this.handleTextAreaChange(event)} rows={4}\n ref={(el) => this.textArea = el} name=\"gift-custom-text\" id=\"gift-custom-text\"\n class=\"s-form-control\"/>\n </div>\n </div>\n </div>\n\n <div class=\"anime-item\">\n\n <salla-button color=\"primary\" width=\"wide\" onClick={() => this.goToStep2()}>\n <span>{this.nextStep}</span>\n </salla-button>\n </div>\n\n </div>\n <div class=\"s-gifting-step-two gift-step-2\" ref={el => this.step2Elems = el}>\n <div\n class={this.errors && this.errors['sender_name'] ? \"s-form-group s-form-has-error anime-item opacity-0\" : \"s-form-group anime-item opacity-0\"}>\n <label htmlFor=\"sender_name\" class=\"s-form-label\">{this.senderNameLabel}</label>\n <input type=\"text\"\n class=\"s-form-control\"\n name=\"sender_name\"\n id=\"sender_name\"\n value={this.senderName}\n onInput={(event) => this.handleSenderName(event)}\n placeholder=\"\"\n />\n {this.errors && this.errors['sender_name'] ?\n <span class=\"text-danger text-xs\">{this.errors['sender_name']}</span> : ''}\n </div>\n <div\n class={this.errors && this.errors['receiver.name'] ? \"s-form-group s-form-has-error anime-item opacity-0\" : \"s-form-group anime-item opacity-0\"}>\n <label htmlFor=\"receiver_name\" class=\"s-form-label\">{this.receiverNameFieldLabel}</label>\n <input type=\"text\"\n class=\"s-form-control\"\n name=\"receiver_name\"\n id=\"receiver_name\"\n value=\"\"\n onInput={(event) => this.handleReceiverName(event)}\n placeholder=\"\"\n />\n {this.errors && this.errors['receiver.name'] ?\n <span class=\"text-danger text-xs\">{this.errors['receiver.name']}</span> : ''}\n </div>\n <div\n class={this.errors && this.errors['receiver.mobile'] ? \"s-form-group s-form-has-error anime-item opacity-0\" : \"s-form-group anime-item opacity-0\"}>\n <label class=\"s-form-label\">{this.receiverMobileFieldLabel}</label>\n <salla-tel-input class=\"s-gifting-tel-input\" phone={this.receiverMobile}\n countryCode={this.receiverCountryCode}\n onPhoneEntered={(e) => this.handlePhoneInputChange(e)}/>\n {this.errors && this.errors['receiver.mobile'] ?\n <span class=\"text-danger text-xs\">{this.errors['receiver.mobile']}</span> : ''}\n </div>\n <div class=\"anime-item opacity-0\">\n <label class=\"s-gifting-schedule s-gifting-clickable\" htmlFor=\"schedule\">\n <input type=\"checkbox\" name='schedule' id='schedule' onChange={() => this.toggleCalendar()}\n class=\"s-checkbox\"/>\n <span class=\"s-form-label\"> {this.sendLater} </span>\n </label>\n\n </div>\n <div class={this.getCalendarClasses()} ref={(el) => this.calendarFormGroup = el}>\n <label class=\"s-form-label\">{this.selectSendDateAndTime}</label>\n <salla-datetime-picker value={this.deliveryDate} placeholder={this.selectSendDateAndTime}\n enable-time date-format=\"Y-m-d h:i K\"\n onPicked={(event) => this.handleDateTimePicker(event)}\n >\n </salla-datetime-picker>\n <span class=\"s-gifting-calendar-hint\">{this.canNotEditOrderAfterSelectDate}</span>\n </div>\n <div class=\"s-gifting-step-two-footer anime-item opacity-0\">\n <a href=\"#!\" innerHTML={LeftArrow} onClick={(e) => this.goToStep1(e)}/>\n\n <salla-button onClick={() => this.submitForm()} color=\"primary\" width='wide'>\n <span>{this.sendGift}</span>\n </salla-button>\n </div>\n </div>\n </div>]\n }\n <slot name=\"footer\"/>\n </salla-modal>\n </div>\n\n ]\n }\n\n}\n"]}
@@ -168,3 +168,4 @@ export class SallaInfiniteScroll {
168
168
  }; }
169
169
  static get elementRef() { return "host"; }
170
170
  }
171
+ //# sourceMappingURL=salla-infinite-scroll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"salla-infinite-scroll.js","sourceRoot":"","sources":["../../../src/components/salla-infinite-scroll/salla-infinite-scroll.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C;GACG;AAEH,MAAM,OAAO,mBAAmB;EAC9B;IAoBA;;OAEG;IACK,aAAQ,GAAW,EAAE,CAAC;IAC9B;;OAEG;IACsB,aAAQ,GAAY,KAAK,CAAC;IACnD;;O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AC;MAEpB,IAAI,SAAS,CAAC,SAAS,IAAI,CAAC,EAAE;QAC5B,SAAS,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;OAC3C;MAED,IAAI,SAAS,CAAC,SAAS,IAAI,CAAC,EAAE;QAC5B,SAAS,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;OAC1C;IACH,CAAC,CAAC;OACD,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;EAC5C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop, State } from '@stencil/core';\nimport Helper from '../../Helpers/Helper';\n/**\n */\n@Component({ tag: 'salla-infinite-scroll', styleUrl: 'salla-infinite-scroll.scss' })\nexport class SallaInfiniteScroll {\n constructor() {\n this.status = document.createElement('div');\n this.status.className = 's-infinite-scroll-wrapper';\n this.status.innerHTML = `<div class=\"s-infinite-scroll-status\" style=\"display:none\">\n <p class=\"s-infinite-scroll-last infinite-scroll-last\"></p>\n <p class=\"s-infinite-scroll-error infinite-scroll-error\"></p>\n </div>\n <a href=\"${this.nextPage}\" class=\"s-infinite-scroll-btn s-button-btn s-button-primary\">\n <span class=\"s-button-text s-infinite-scroll-btn-text\">${salla.lang.get('common.elements.load_more')}</span>\n <span class=\"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader\" style=\"display: none\"></span>\n </a>`;\n this.btnLoader = this.status.querySelector('.s-button-loader');\n salla.lang.onLoaded(() => {\n this.status.querySelector('.s-button-text').innerHTML = salla.lang.get('common.elements.load_more');\n this.status.querySelector('.s-infinite-scroll-last').innerHTML = salla.lang.get('common.elements.end_of_content');\n this.status.querySelector('.s-infinite-scroll-error').innerHTML = salla.lang.get('common.elements.failed_to_load_more');\n });\n }\n\n\n /**\n * Next Page element\n */\n @Prop() nextPage: string = '';\n /**\n * Is there is need to autoload next page when scroll `next-page-autoload|next-page.autoload`\n */\n @Prop({ mutable: true }) autoload: boolean = false;\n /**\n * Class selector to know the container if it's not the host `<salla-infinite-scroll>`\n */\n @Prop() container: string = 'salla-infinite-scroll';\n /**\n * Class selector to know list items\n */\n @Prop() item: string = 'salla-infinite-scroll > *';\n @State() loadMore: string;\n @State() noMore: string;\n @State() failedToLoad: string;\n private readonly status: HTMLDivElement;\n private btnLoader: HTMLAnchorElement;\n\n @Element() host: HTMLElement;\n\n private loading(isLoading = true) {\n let btnText = this.status.querySelector('.s-button-text');\n Helper.toggleElementClassIf(btnText, 's-button-hide', 's-button-show', () => isLoading);\n this.btnLoader.style.display = isLoading ? 'inherit' : 'none';\n }\n\n render() {\n return this.nextPage.length > 1 ?\n <Host class=\"s-infinite-scroll-container\">\n <slot />\n </Host> : '';\n }\n\n componentDidLoad() {\n if (this.nextPage.length === 0) {\n return;\n }\n this.host.insertAdjacentElement('afterend', this.status);\n let that = this;\n let infScroll = salla.infiniteScroll.initiate(this.container, {\n history: this.autoload ? 'push' : false,\n scrollThreshold: this.autoload ? 400 : false,\n nextPage: this.nextPage,\n checkLastPage: 'salla-infinite-scroll[next-page*=\":\"],salla-infinite-scroll[next-page*=\".\"]',\n status: '.s-infinite-scroll-status',\n button: this.status.querySelector('.s-button-btn'),\n append: this.item,\n path: function () {\n return that.nextPage.replace(/page\\=(\\d)/g, 'page=' + (this.loadCount + 2));\n },\n })\n .on('request', () => this.loading())\n .on('load', () => {\n this.loading(false);\n\n if (infScroll.pageIndex == 2) {\n infScroll.option({ loadOnScroll: false });\n }\n\n if (infScroll.pageIndex == 3) {\n infScroll.option({ loadOnScroll: true });\n }\n })\n .on('error', () => this.loading(false));\n }\n}\n"]}
@@ -186,3 +186,4 @@ export class SallaInstallment {
186
186
  "spotiiIsActive": {}
187
187
  }; }
188
188
  }
189
+ //# sourceMappingURL=salla-installment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"salla-installment.js","sourceRoot":"","sources":["../../../src/components/salla-installment/salla-installment.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAO9D,MAAM,OAAO,gBAAgB;EAI3B;IAHQ,uBAAkB,GAAY,KAAK,CAAC;IACpC,2BAAsB,GAAW,CAAC,CAAC;IAkB3C;;OAEG;IACK,aAAQ,GAAW,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAClE;;OAEG;IACK,aAAQ,GAAW,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAtBhE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;MACvB,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;MACpE,IAAI,WAAW,EAAE;QACf,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;QACjE,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QAC/D,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;OAC1D;MACD,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;EACL,CAAC;EAmBD,MAAM;IACJ,OAAO,CACL,EAAC,IAAI;MACF,IAAI,CAAC,cAAc,CAAC,CAAC;QACpB,WAAK,KAAK,EAAC,uBAAuB,gBACjB,IAAI,CAAC,KAAK,mBACP,IAAI,CAAC,QAAQ,eACjB,IAAI,CAAC,QAAQ,uBACN,aAAa,GAC9B;QACN,CAAC,CAAC,EAAE;MAEL,IAAI,CAAC,aAAa,CAAC,CAAC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A6B,CAAC,CAAC,CAAC;MACzE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;MAClC,0BAA0B;MAC1B,oBAAoB;MACpB,IAAI;KACL;EAEH,CAAC;EAED;;;KAGG;EACH,iBAAiB;IACf,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,sBAAsB,GAAG,CAAC,EAAE;MAC9D,OAAO;KACR;IACD,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAC9B,UAAU,CAAC,GAAG,EAAE;MACd,IAAI,KAAK,GAAQ,QAAQ,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;MAC/D,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,6CAA6C,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;MACrG,IAAI,KAAK,EAAE;QACT,KAAK,CAAC,KAAK,GAAG,yCAAyC,CAAC;QACxD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;OAChC;WAAM;QACL,IAAI,CAAC,iBAAiB,EAAE,CAAC;OAC1B;IACH,CAAC,EAAE,IAAI,CAAC,sBAAsB,GAAG,GAAG,CAAC,CAAA;EACvC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Host, h, Prop, State} from '@stencil/core';\n\n@Component({\n tag: 'salla-installment',\n styleUrl: 'salla-installment.scss',\n})\n\nexport class SallaInstallment {\n private tabbyBorderRemoved: boolean = false;\n private tabbyRemoveBorderTries: number = 0;\n\n constructor() {\n salla.lang.onLoaded(() => {\n const installment = salla.config.get('store.settings.installments');\n if (installment) {\n this.tamaraIsActive = installment.includes('tamara_installment');\n this.tabbyIsActive = installment.includes('tabby_installment');\n this.spotiiIsActive = installment.includes('spotii_pay');\n }\n this.renderInstallments();\n });\n }\n\n /**\n * Current product price\n */\n @Prop() price: string;\n /**\n * Language code\n */\n @Prop() language: string = salla.config.get('user.language_code');\n /**\n * Currency code\n */\n @Prop() currency: string = salla.config.get('user.currency_code');\n\n @State() tamaraIsActive: boolean;\n @State() tabbyIsActive: boolean;\n @State() spotiiIsActive: boolean;\n\n render() {\n return (\n <Host>\n {this.tamaraIsActive ?\n <div class=\"tamara-product-widget\"\n data-price={this.price}\n data-currency={this.currency}\n data-lang={this.language}\n data-payment-type=\"installment\">\n </div>\n : ''}\n\n {this.tabbyIsActive ?\n <div id=\"tabbyPromoWrapper\">\n <div id=\"tabbyPromo\"></div>\n </div>\n : ''}\n\n {this.spotiiIsActive ?\n <div class=\"spotii-wrapper\">\n {/*No need for the price, the price already in the page, and also tammara & tabby doesn't have price */}\n <div class=\"spotii-promo\"></div>\n </div>\n : ''}\n </Host>\n );\n }\n\n renderInstallments() {\n // Tamara\n if (this.tamaraIsActive) {\n var script = document.createElement('script');\n script.setAttribute('src', 'https://cdn.tamara.co/widget/product-widget.min.js');\n document.head.appendChild(script);\n script.onload = () => {\n window.TamaraProductWidget.init({lang: this.language})\n setTimeout(() => {\n window.TamaraProductWidget.render()\n }, 300)\n }\n }\n\n // tabby\n if (this.tabbyIsActive) {\n var script = document.createElement('script');\n script.setAttribute('src', 'https://checkout.tabby.ai/tabby-promo.js');\n document.head.appendChild(script);\n script.onload = () => {\n const TabbyPromo = window.TabbyPromo;\n new TabbyPromo({\n selector: '#tabbyPromo',\n currency: this.currency,\n price: this.price,\n lang: this.language,\n });\n document.querySelectorAll('.tabby-promo-snippet__logo').forEach(function (element) {\n element.setAttribute('aria-label', 'Tabby Logo')\n });\n }\n //this is workaround to remove the default border and add margin\n this.removeTabbyBorder();\n }\n\n // Spotii\n if (this.spotiiIsActive) {\n let amount = salla.money((Number(this.price) / 3).toFixed(2));\n let isRTL = salla.config.get('theme.is_rtl', true);\n window.spotiiConfig = {\n targetXPath: ['.spotii-wrapper'],\n renderToPath: ['.spotii-promo'],\n numberOfPayment: 3,\n currency: this.currency,\n templateLine: \"${textOne} ${number} ${textTwo} \" + amount + \"${logo} ${info}\",\n //todo:: translate these\n textOne: isRTL ? \"جزء الدفع على\" : \"Split it into\",\n textTwo: isRTL ? \"أقساط متساوية بدون تكاليف اضافية بقيمة\" : \"payments of\",\n textThree: \"مع\",\n price: this.price,\n // forcedShow: false,\n // merchantID: null,\n }\n\n var script = document.createElement('script');\n\n script.setAttribute('src', salla.url.cdn('js/price-widget-ar-salla.js'));\n document.head.appendChild(script);\n // script.onload = () => {\n // // setTimeout()\n // }\n }\n\n }\n\n /**\n * this is workaround to remove the default border and add margin\n * we will try to remove tabby border 5 times for 7.5 seconds\n */\n removeTabbyBorder() {\n if (this.tabbyBorderRemoved || this.tabbyRemoveBorderTries > 5) {\n return;\n }\n this.tabbyRemoveBorderTries++;\n setTimeout(() => {\n let promo: any = document.querySelector('#tabbyPromo>div>div');\n promo = promo ? promo.shadowRoot.querySelector('div[class^=\"styles__tabby-promo-snippet--\"]') : null;\n if (promo) {\n promo.style = 'border: none; margin: 15px 0!important;';\n this.tabbyBorderRemoved = true;\n } else {\n this.removeTabbyBorder();\n }\n }, this.tabbyRemoveBorderTries * 500)\n }\n}\n"]}
@@ -84,3 +84,4 @@ export class SallaListTile {
84
84
  }
85
85
  }; }
86
86
  }
87
+ //# sourceMappingURL=salla-list-tile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"salla-list-tile.js","sourceRoot":"","sources":["../../../src/components/salla-list-tile/salla-list-tile.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AAEvD;;;;;GAKG;AAMH,MAAM,OAAO,aAAa;EAL1B;IAOE;;OAEG;IACK,SAAI,GAAuB,SAAS,CAAC;IAE7C;;OAEG;IACK,WAAM,GAA0D,OAAO,CAAC;GA+BjF;EA7BS,aAAa;IACnB,OAAO;MACL,kBAAkB,EAAE,IAAI;MACxB,uBAAuB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI;KACrC,CAAA;EACH,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI;MACH,SAAG,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM;QAClE,WAAK,KAAK,EAAC,uBAAuB;UAChC,YAAM,IAAI,EAAC,MAAM,GAAE,CACf;QACN,WAAK,KAAK,EAAC,0BAA0B;UACnC,WAAK,KAAK,EAAC,wBAAwB;YACjC,YAAM,IAAI,EAAC,OAAO,GAAE,CAChB;UACN,WAAK,KAAK,EAAC,2BAA2B;YACpC,YAAM,IAAI,EAAC,UAAU,GAAE,CACnB,CACF;QACN,WAAK,KAAK,EAAC,yBAAyB;UAClC,YAAM,IAAI,EAAC,QAAQ,GAAE,CACjB,CACJ,CACC,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Host, h, Prop} from '@stencil/core';\n\n/**\n * @slot icon - An icon to display before the title.\n * @slot title - The primary content of the list tile.\n * @slot subtitle - Additional content displayed below the title.\n * @slot action - An element to display after the title.\n */\n@Component({\n tag: 'salla-list-tile',\n styleUrl: 'salla-list-tile.scss',\n shadow: false,\n})\nexport class SallaListTile {\n\n /**\n * Designates the component as anchor and applies the `href` attribute.\n */\n @Prop() href: string | undefined = undefined;\n\n /**\n * Designates the target attribute. This should only be applied when using the `href` prop.\n */\n @Prop() target: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | \"framename\" = \"_self\";\n\n private generateClass() {\n return {\n \"s-list-tile-item\": true,\n \"s-list-tile-item-href\": !!this.href\n }\n }\n\n render() {\n return (\n <Host>\n <a class={this.generateClass()} href={this.href} target={this.target}>\n <div class=\"s-list-tile-item-icon\">\n <slot name='icon'/>\n </div>\n <div class=\"s-list-tile-item-content\">\n <div class=\"s-list-tile-item-title\">\n <slot name='title'/>\n </div>\n <div class=\"s-list-tile-item-subtitle\">\n <slot name=\"subtitle\"/>\n </div>\n </div>\n <div class=\"s-list-tile-item-action\">\n <slot name='action'/>\n </div>\n </a>\n </Host>\n );\n }\n}\n"]}
@@ -109,3 +109,4 @@ export class SallaLoading {
109
109
  }
110
110
  }; }
111
111
  }
112
+ //# sourceMappingURL=salla-loading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"salla-loading.js","sourceRoot":"","sources":["../../../src/components/salla-loading/salla-loading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAMzD,MAAM,OAAO,YAAY;EAJzB;IAKE;;OAEG;IACK,SAAI,GAAoB,EAAE,CAAC;IAEnC;;OAEG;IACK,UAAK,GAAoB,CAAC,CAAC;IAEnC;;OAEG;IACK,UAAK,GAAW,SAAS,CAAC,CAAE,yDAAyD;IAE7F;;MAEE;IACM,YAAO,GAAW,SAAS,CAAA;GAapC;EAXC,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,IAAC,KAAK,EAAC,qBAAqB;MAC/B,0BAAiB,MAAM,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAC,WAAW,EAAC,OAAO,EAAC,aAAa,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B;QACjN,YAAM,CAAC,EAAC,8WAA8W,EAAC,IAAI,EAAC,cAAc,GAAG;QAC7Y,YAAM,CAAC,EAAC,+kBAA+kB,EAAC,IAAI,EAAC,aAAa,GAAG,CACzmB,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Prop, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'salla-loading',\n styleUrl: 'salla-loading.scss',\n})\nexport class SallaLoading {\n /**\n * Sets the diameter of the circle in pixels, Defaults to `32`\n */\n @Prop() size: number | string = 32;\n\n /**\n * Sets the stroke of the circle (border) in pixels, Defaults to `4`\n */\n @Prop() width: number | string = 2;\n\n /**\n * Spinner content color.\n */\n @Prop() color: string = undefined; // TODO: Should be replaced with primary color (variable)\n\n /**\n * Spinner background color.\n */\n @Prop() bgColor: string = \"#e5e7eb\"\n\n render() {\n return (\n <Host class=\"s-loading-container\">\n <svg aria-hidden=\"true\" style={{ width: `${this.size}px`, height: `${this.size}px`, fill: this.color, color: this.bgColor }} class=\"s-loading\" viewBox=\"0 0 100 101\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\" fill=\"currentColor\" />\n <path d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\" fill=\"currentFill\" />\n </svg>\n </Host>\n );\n }\n\n}\n"]}
@@ -270,3 +270,4 @@ export class SallaLocalizationModal {
270
270
  }; }
271
271
  static get elementRef() { return "host"; }
272
272
  }
273
+ //# sourceMappingURL=salla-localization-modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"salla-localization-modal.js","sourceRoot":"","sources":["../../../src/components/salla-localization-modal/salla-localization-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3E;;;;;GAKG;AAGH,MAAM,OAAO,sBAAsB;EACjC;;IAyBS,sBAAiB,GAAY,KAAK,CAAC;IACnC,cAAS,GAAe,EAAE,CAAC;IAC3B,eAAU,GAAe,EAAE,CAAC;IAC5B,aAAQ,GAAY,KAAK,CAAC;IAKnC;;OAEG;IACqC,aAAQ,GAAW,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAElG;;OAEG;IACqC,aAAQ,GAAW,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAxChG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,oBAAoB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAExD,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;MACvB,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAChC,CAAC,CAAC,CAAC;IAEH;;;;;;;;OAQG;IACH,IAAI,CAAC,YAAY,GAAG,CAAA,MAAA,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,mBAAmB,CAAC,0CAAE,SAAS,KAAI,yKA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gB,CAAC,CAAC,CAAC,IAChG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAC9B,cAAQ,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,IAAI,IAAG,QAAQ,CAAC,IAAI,CAAU,CACjG,CACM,CAEP,CACF;YACN,CAAC,CAAC,EAAE;UAEN,oBAAc,KAAK,EAAC,MAAM,EAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,IAChF,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,CACxB,CACX,CAEI,CACf,CAAC;EACJ,CAAC;EAED;;KAEG;EACH,kBAAkB;IAChB,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAC1F,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;EAC5F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Method, Prop, State } from '@stencil/core';\n/**\n * @slot header - The top of the modal.\n * @slot footer - Replaces the bottom button.\n * @slot language - Replaces language label, has replaceable props `{name}`, `{code}`, `{country_code}`.\n * @slot currency - Replaces currency label, has replaceable props `{name}`, `{code}`, `{country_code}`.\n */\n@Component({ tag: 'salla-localization-modal', styleUrl: 'salla-localization-modal.scss' })\n\nexport class SallaLocalizationModal {\n constructor() {\n salla.event.on('localization::open', () => this.open());\n\n salla.lang.onLoaded(() => {\n this.translationLoaded = true;\n });\n\n /**\n * letting developer to insert his own slot like:\n * <salla-localization>\n * <div slot=\"language\">...{name}....</div>\n * <div slot=\"currency\">...{name}....</div>\n * </salla-localization>\n * Because scoped templates not supported in stencil );\n * we made a workaround to pass language & currency attributes, then replace names in rendering\n */\n this.languageSlot = this.host.querySelector('[slot=\"language\"]')?.innerHTML || '<label class=\"s-localization-modal-label\" for=\"lang-{code}\"><span>{name}</span><div class=\"s-localization-modal-flag flag iti__flag iti__{country_code}\"></div></label>';\n this.currencySlot = this.host.querySelector('[slot=\"currency\"]')?.innerHTML || '<label class=\"s-localization-modal-label\" for=\"currency-{code}\"><span>{name}</span><small class=\"s-localization-modal-currency\">{code}</small></label>';\n }\n\n private modal: HTMLSallaModalElement;\n private btn: HTMLSallaButtonElement;\n private readonly languageSlot: string;\n private readonly currencySlot: string;\n\n @State() translationLoaded: boolean = false;\n @State() languages: Array<any> = [];\n @State() currencies: Array<any> = [];\n @State() hasError: boolean = false;\n @State() errorMessage: string;\n\n\n\n /**\n * Current language (existing or newly selected)\n */\n @Prop({ mutable: true, reflect: true }) language: string = salla.config.get('user.language_code');\n\n /**\n * Current currency (existing or newly selected)\n */\n @Prop({ mutable: true, reflect: true }) currency: string = salla.config.get('user.currency_code');\n\n @Element() host: HTMLElement;\n\n /**\n * open the component\n */\n @Method()\n async open() {\n this.modal.open()\n return await salla.api.withoutNotifier(() => this.getLanguages())\n .then(() => this.getCurrencies())\n .then(() => {\n if (this.languages.length < 2 && this.currencies.length < 2) {\n this.modal.close();\n }\n })\n .catch(e => {\n console.log(e)\n this.hasError = true;\n this.errorMessage = e.response?.data?.error?.message || e.response?.data;\n })\n .finally(() => this.modal.stopLoading());\n }\n\n /**\n * Hide the component\n */\n @Method()\n async close() {\n return this.modal.close();\n }\n\n private async getLanguages() {\n this.language = this.language || salla.config.get('user.language_code');\n return this.languages.length > 1 ? null : await salla.config.languages().then(data => this.languages = data);\n }\n\n private async getCurrencies() {\n this.currency = this.currency || salla.config.get('user.currency_code');\n return this.currencies.length > 1 ? null : await salla.config.currencies().then(data => this.currencies = Object.values(data || {}));\n }\n\n private onChangeCurrency(event) {\n this.currency = event.target.value;\n }\n\n private onChangeLanguage(event) {\n this.language = event.target.value;\n }\n\n /**\n * Change currency and language to the selected ones.\n */\n @Method()\n async submit() {\n let url: string;\n this.btn.load()\n .then(() => {\n if (!this.currency) {\n salla.log('There is no currency!');\n return;\n }\n if (this.currency === salla.config.get('user.currency_code', 'SAR')) {\n return;\n }\n url = window.location.href;\n return salla.currency.api.change(this.currency);\n })\n .then(() => {\n if (this.language !== salla.config.get('user.language_code', 'ar')) {\n url = salla.helpers.addParamToUrl('lang', this.language)\n }\n })\n .then(() => this.btn.stop())\n .then(() => this.close())\n .then(() => {\n if(url){\n window.location.href = url.replace(`/${salla.config.get('user.language_code')}/`,`/${this.language}/`);\n }\n });\n }\n\n render() {\n return (\n <salla-modal isLoading={true} class=\"s-hidden\" ref={modal => this.modal = modal as HTMLSallaModalElement} width=\"xs\">\n <div slot='loading'>\n <div class=\"s-localization-modal-skeleton\">\n <salla-skeleton width='25%' height='15px'></salla-skeleton>\n <div class=\"s-localization-modal-skeleton-content\">\n {[...Array(4)].map(() =>\n <div class=\"s-localization-modal-skeleton-item\">\n <div class=\"s-localization-modal-skeleton-item-flex\">\n <salla-skeleton type='circle' height='16px' width='16px'></salla-skeleton>\n <salla-skeleton height='10px' width='100px'></salla-skeleton>\n </div>\n <salla-skeleton height='15px' width='20px'></salla-skeleton>\n </div>\n )}\n </div>\n <salla-skeleton width='25%' height='15px'></salla-skeleton>\n <div class=\"s-localization-modal-skeleton-content\">\n {[...Array(4)].map(() =>\n <div class=\"s-localization-modal-skeleton-item\">\n <div class=\"s-localization-modal-skeleton-item-flex\">\n <salla-skeleton type='circle' height='16px' width='16px'></salla-skeleton>\n <salla-skeleton height='10px' width='100px'></salla-skeleton>\n </div>\n <salla-skeleton height='15px' width='20px'></salla-skeleton>\n </div>\n )}\n </div>\n <salla-skeleton height='40px' width='100%'></salla-skeleton>\n </div>\n </div>\n {!!this.hasError ?\n <salla-placeholder alignment=\"center\">\n <span slot=\"description\">{this.errorMessage}</span>\n </salla-placeholder> :\n <div class=\"s-localization-modal-inner\">\n {this.languages.length > 1 ?\n <div class=\"s-localization-modal-section\">\n <label class=\"s-localization-modal-title\">{salla.lang.get('common.titles.language')}</label>\n <div class=\"s-localization-modal-section-inner\">\n {this.languages.length < 6 || this.currencies.length == 1 ?\n this.languages.map(lang =>\n <div class=\"s-localization-modal-item\">\n <input class=\"s-localization-modal-input\" type=\"radio\"\n checked={this.language == lang.iso_code}\n onChange={() => this.language = lang.iso_code}\n name=\"language\"\n id={'lang-' + lang.code.toLowerCase()}\n value={lang.code} />\n <div class=\"s-localization-modal-label-slot\" id=\"language-slot\" innerHTML={this.languageSlot\n .replace(/\\{name\\}/g, lang.name)\n .replace(/\\{code\\}/g, lang.code)\n .replace(/\\{country_code\\}/g, lang.country_code)}></div>\n </div>\n ) :\n <select class=\"s-localization-modal-select\" name=\"language\" onChange={e => this.onChangeLanguage(e)}>\n {this.languages.map(lang =>\n <option value={lang.code} selected={this.language == lang.code}>{lang.name}</option>\n )}\n </select>\n }\n </div>\n </div>\n : ''\n }\n\n {this.currencies.length > 1 ?\n <div class=\"s-localization-modal-section\">\n <label class=\"s-localization-modal-title\">{salla.lang.get('common.titles.currency')}</label>\n <div class=\"s-localization-modal-section-inner\">\n {this.currencies.length < 6 || this.languages.length == 1 ?\n this.currencies.map(currency =>\n <div class=\"s-localization-modal-item\">\n <input class=\"s-localization-modal-input\" type=\"radio\"\n name=\"currency\"\n checked={this.currency == currency.code}\n onChange={() => this.currency = currency.code}\n id={'currency-' + currency.code}\n value={currency.code} />\n <div class=\"s-localization-modal-label-slot\" id=\"currency-slot\" innerHTML={this.currencySlot\n .replace(/\\{name\\}/g, currency.name)\n .replace(/\\{code\\}/g, currency.code)\n .replace(/\\{country_code\\}/g, currency.country_code)}></div>\n </div>\n ) :\n <select class=\"s-localization-modal-select\" name=\"currency\" onChange={e => this.onChangeCurrency(e)}>\n {this.currencies.map(currency =>\n <option value={currency.code} selected={this.currency == currency.code}>{currency.name}</option>\n )}\n </select>\n }\n </div>\n </div>\n : ''\n }\n <salla-button width=\"wide\" ref={btn => this.btn = btn} onClick={() => this.submit()}>\n {salla.lang.get('common.elements.ok')}\n </salla-button>\n </div>\n }\n </salla-modal>\n );\n }\n\n /**\n * to reduce dom levels we will move slot data into the parent dom\n */\n componentDidRender() {\n this.host.querySelectorAll('#currency-slot').forEach(el => el.replaceWith(el.firstChild));\n this.host.querySelectorAll('#language-slot').forEach(el => el.replaceWith(el.firstChild));\n }\n}\n"]}
@@ -7,3 +7,4 @@ export var CustomFieldType;
7
7
  CustomFieldType["NUMBER"] = "number";
8
8
  CustomFieldType["PHOTO"] = "photo";
9
9
  })(CustomFieldType || (CustomFieldType = {}));
10
+ //# sourceMappingURL=intefaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intefaces.js","sourceRoot":"","sources":["../../../src/components/salla-login-modal/intefaces.ts"],"names":[],"mappings":"AAQA,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;EACvB,gCAAa,CAAA;EACb,oCAAiB,CAAA;EACjB,kCAAe,CAAA;AACnB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B","sourcesContent":["export interface CustomField {\n id: number;\n label: string;\n description: string;\n type: string;\n required: boolean;\n}\n\nexport enum CustomFieldType {\n TEXT = 'text',\n NUMBER = 'number',\n PHOTO = 'photo'\n}"]}
@@ -445,3 +445,4 @@ export class SallaLoginModal {
445
445
  "passive": false
446
446
  }]; }
447
447
  }
448
+ //# sourceMappingURL=salla-login-modal.js.map