@salla.sa/twilight-components 2.14.239 → 2.14.241

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 (333) hide show
  1. package/dist/cjs/{app-globals-DbdvvtOW.js → app-globals-DvkVPAlZ.js} +3 -3
  2. package/dist/cjs/{app-globals-DbdvvtOW.js.map → app-globals-DvkVPAlZ.js.map} +1 -1
  3. package/dist/cjs/{index-BDdHgq9_.js → index-BPhiWOV7.js} +4 -4
  4. package/dist/cjs/index-BPhiWOV7.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/salla-accordion-body.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-accordion-head.cjs.entry.js +1 -1
  8. package/dist/cjs/salla-accordion.cjs.entry.js +1 -1
  9. package/dist/cjs/salla-add-product-button_51.cjs.entry.js +1 -1
  10. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  11. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-booking-field_2.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-product-options.cjs.entry.js +37 -6
  31. package/dist/cjs/salla-product-options.cjs.entry.js.map +1 -1
  32. package/dist/cjs/salla-product-options.entry.cjs.js.map +1 -1
  33. package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-tiered-offer.cjs.entry.js +23 -10
  38. package/dist/cjs/salla-tiered-offer.cjs.entry.js.map +1 -1
  39. package/dist/cjs/salla-tiered-offer.entry.cjs.js.map +1 -1
  40. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  43. package/dist/cjs/twilight.cjs.js +2 -2
  44. package/dist/collection/components/salla-product-options/salla-product-options.js +36 -5
  45. package/dist/collection/components/salla-product-options/salla-product-options.js.map +1 -1
  46. package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js +22 -9
  47. package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js.map +1 -1
  48. package/dist/components/index.js +2 -2
  49. package/dist/components/index.js.map +1 -1
  50. package/dist/components/salla-product-options.js +36 -5
  51. package/dist/components/salla-product-options.js.map +1 -1
  52. package/dist/components/salla-tiered-offer.js +22 -9
  53. package/dist/components/salla-tiered-offer.js.map +1 -1
  54. package/dist/esm/{app-globals-Db6Lb5QT.js → app-globals-BoC0E74W.js} +3 -3
  55. package/dist/esm/{app-globals-Db6Lb5QT.js.map → app-globals-BoC0E74W.js.map} +1 -1
  56. package/dist/esm/{index-Dxu9oA9K.js → index-Qk6_ks1N.js} +4 -4
  57. package/dist/esm/index-Qk6_ks1N.js.map +1 -0
  58. package/dist/esm/loader.js +3 -3
  59. package/dist/esm/salla-accordion-body.entry.js +1 -1
  60. package/dist/esm/salla-accordion-head.entry.js +1 -1
  61. package/dist/esm/salla-accordion.entry.js +1 -1
  62. package/dist/esm/salla-add-product-button_51.entry.js +1 -1
  63. package/dist/esm/salla-advertisement.entry.js +1 -1
  64. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  65. package/dist/esm/salla-apps-icons.entry.js +1 -1
  66. package/dist/esm/salla-booking-field_2.entry.js +1 -1
  67. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  68. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  69. package/dist/esm/salla-contacts.entry.js +1 -1
  70. package/dist/esm/salla-filters-widget.entry.js +1 -1
  71. package/dist/esm/salla-filters.entry.js +1 -1
  72. package/dist/esm/salla-installment.entry.js +1 -1
  73. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  74. package/dist/esm/salla-loyalty-program.entry.js +1 -1
  75. package/dist/esm/salla-metadata.entry.js +1 -1
  76. package/dist/esm/salla-notification-item.entry.js +1 -1
  77. package/dist/esm/salla-notifications.entry.js +1 -1
  78. package/dist/esm/salla-offer.entry.js +1 -1
  79. package/dist/esm/salla-order-summary.entry.js +1 -1
  80. package/dist/esm/salla-orders.entry.js +1 -1
  81. package/dist/esm/salla-payments.entry.js +1 -1
  82. package/dist/esm/salla-price-range.entry.js +1 -1
  83. package/dist/esm/salla-product-options.entry.js +37 -6
  84. package/dist/esm/salla-product-options.entry.js.map +1 -1
  85. package/dist/esm/salla-review-card.entry.js +1 -1
  86. package/dist/esm/salla-reviews-page.entry.js +1 -1
  87. package/dist/esm/salla-reviews.entry.js +1 -1
  88. package/dist/esm/salla-social.entry.js +1 -1
  89. package/dist/esm/salla-tiered-offer.entry.js +23 -10
  90. package/dist/esm/salla-tiered-offer.entry.js.map +1 -1
  91. package/dist/esm/salla-tooltip.entry.js +1 -1
  92. package/dist/esm/salla-verify.entry.js +1 -1
  93. package/dist/esm/salla-wallet.entry.js +1 -1
  94. package/dist/esm/twilight.js +3 -3
  95. package/dist/esm-es5/{app-globals-Db6Lb5QT.js → app-globals-BoC0E74W.js} +2 -2
  96. package/dist/esm-es5/{app-globals-Db6Lb5QT.js.map → app-globals-BoC0E74W.js.map} +1 -1
  97. package/dist/esm-es5/{index-Dxu9oA9K.js → index-Qk6_ks1N.js} +3 -3
  98. package/dist/{twilight/p-Dxu9oA9K.js.map → esm-es5/index-Qk6_ks1N.js.map} +1 -1
  99. package/dist/esm-es5/loader.js +1 -1
  100. package/dist/esm-es5/salla-accordion-body.entry.js +1 -1
  101. package/dist/esm-es5/salla-accordion-head.entry.js +1 -1
  102. package/dist/esm-es5/salla-accordion.entry.js +1 -1
  103. package/dist/esm-es5/salla-add-product-button_51.entry.js +1 -1
  104. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  105. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  106. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  107. package/dist/esm-es5/salla-booking-field_2.entry.js +2 -2
  108. package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
  109. package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
  110. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  111. package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
  112. package/dist/esm-es5/salla-filters.entry.js +1 -1
  113. package/dist/esm-es5/salla-installment.entry.js +1 -1
  114. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  115. package/dist/esm-es5/salla-loyalty-program.entry.js +2 -2
  116. package/dist/esm-es5/salla-metadata.entry.js +1 -1
  117. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  118. package/dist/esm-es5/salla-notifications.entry.js +1 -1
  119. package/dist/esm-es5/salla-offer.entry.js +1 -1
  120. package/dist/esm-es5/salla-order-summary.entry.js +1 -1
  121. package/dist/esm-es5/salla-orders.entry.js +1 -1
  122. package/dist/esm-es5/salla-payments.entry.js +1 -1
  123. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  124. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  125. package/dist/esm-es5/salla-product-options.entry.js.map +1 -1
  126. package/dist/esm-es5/salla-review-card.entry.js +1 -1
  127. package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
  128. package/dist/esm-es5/salla-reviews.entry.js +1 -1
  129. package/dist/esm-es5/salla-social.entry.js +1 -1
  130. package/dist/esm-es5/salla-tiered-offer.entry.js +2 -2
  131. package/dist/esm-es5/salla-tiered-offer.entry.js.map +1 -1
  132. package/dist/esm-es5/salla-tooltip.entry.js +1 -1
  133. package/dist/esm-es5/salla-verify.entry.js +1 -1
  134. package/dist/esm-es5/salla-wallet.entry.js +1 -1
  135. package/dist/esm-es5/twilight.js +1 -1
  136. package/dist/twilight/p-0080e341.entry.js +5 -0
  137. package/dist/twilight/{p-79dab8b8.system.entry.js → p-03f69cea.system.entry.js} +2 -2
  138. package/dist/twilight/{p-7167cda0.system.entry.js → p-0488395f.system.entry.js} +2 -2
  139. package/dist/twilight/{p-cab02e98.system.entry.js → p-085de295.system.entry.js} +2 -2
  140. package/dist/twilight/{p-03f98d2f.system.entry.js → p-095cd107.system.entry.js} +2 -2
  141. package/dist/twilight/{p-7632d96b.system.entry.js → p-0b5059a8.system.entry.js} +2 -2
  142. package/dist/twilight/{p-64128588.entry.js → p-109639b5.entry.js} +2 -2
  143. package/dist/twilight/p-109639b5.entry.js.map +1 -0
  144. package/dist/twilight/{p-11fe6afc.entry.js → p-113610e6.entry.js} +2 -2
  145. package/dist/twilight/{p-1b84dff7.system.entry.js → p-17ac3f07.system.entry.js} +2 -2
  146. package/dist/twilight/{p-2d41b312.entry.js → p-1bac43db.entry.js} +2 -2
  147. package/dist/twilight/{p-2b6b8c81.entry.js → p-1cbfdf9c.entry.js} +2 -2
  148. package/dist/twilight/{p-eb410142.entry.js → p-2018f332.entry.js} +2 -2
  149. package/dist/twilight/{p-b24fe018.system.entry.js → p-22a97b77.system.entry.js} +2 -2
  150. package/dist/twilight/{p-67c709ff.entry.js → p-2504b7c0.entry.js} +2 -2
  151. package/dist/twilight/{p-6f2cf177.entry.js → p-26f3294b.entry.js} +2 -2
  152. package/dist/twilight/{p-DjvOm_NU.system.js.map → p-2pstlFTx.system.js.map} +1 -1
  153. package/dist/twilight/{p-4c9e43fe.system.entry.js → p-31249011.system.entry.js} +2 -2
  154. package/dist/twilight/{p-331c6ed5.system.entry.js → p-33c1da66.system.entry.js} +2 -2
  155. package/dist/twilight/{p-9110491f.entry.js → p-34170712.entry.js} +2 -2
  156. package/dist/twilight/{p-3f455e4b.entry.js → p-3ca55ad3.entry.js} +2 -2
  157. package/dist/twilight/{p-3917911e.system.entry.js → p-3d646989.system.entry.js} +2 -2
  158. package/dist/twilight/{p-37ef34af.entry.js → p-3e782481.entry.js} +2 -2
  159. package/dist/twilight/{p-5eb4592c.entry.js → p-3f2e984c.entry.js} +2 -2
  160. package/dist/twilight/{p-142c7169.entry.js → p-4049f624.entry.js} +2 -2
  161. package/dist/twilight/{p-529f23c6.system.entry.js → p-41c210db.system.entry.js} +2 -2
  162. package/dist/twilight/p-4aad96c4.system.entry.js +5 -0
  163. package/dist/twilight/p-4aad96c4.system.entry.js.map +1 -0
  164. package/dist/twilight/{p-b3451de7.system.entry.js → p-4c901b62.system.entry.js} +2 -2
  165. package/dist/twilight/{p-C1Uuu_Iz.system.js.map → p-4qh49PqK.system.js.map} +1 -1
  166. package/dist/twilight/{p-462c7109.system.entry.js → p-59796bb2.system.entry.js} +2 -2
  167. package/dist/twilight/{p-f8352357.entry.js → p-6029cdd7.entry.js} +2 -2
  168. package/dist/twilight/{p-3b21bc63.entry.js → p-60dac7ef.entry.js} +2 -2
  169. package/dist/twilight/{p-28c53329.system.entry.js → p-60f649f5.system.entry.js} +2 -2
  170. package/dist/twilight/{p-5ee8e3ee.system.entry.js → p-61cec922.system.entry.js} +2 -2
  171. package/dist/twilight/{p-c698caa6.system.entry.js → p-65c74d07.system.entry.js} +2 -2
  172. package/dist/twilight/{p-099c2ddf.entry.js → p-65ee4bcd.entry.js} +2 -2
  173. package/dist/twilight/{p-3971d884.system.entry.js → p-66f0d009.system.entry.js} +2 -2
  174. package/dist/twilight/{p-a642fb2d.system.entry.js → p-69c4dc57.system.entry.js} +3 -3
  175. package/dist/twilight/{p-f6a84618.entry.js → p-824f1195.entry.js} +2 -2
  176. package/dist/twilight/{p-5b5a6101.entry.js → p-84013163.entry.js} +2 -2
  177. package/dist/twilight/p-87b54ba7.system.entry.js +5 -0
  178. package/dist/twilight/p-87b54ba7.system.entry.js.map +1 -0
  179. package/dist/twilight/{p-bdf35a25.system.entry.js → p-8a9bfcbb.system.entry.js} +2 -2
  180. package/dist/twilight/{p-816097f4.entry.js → p-8c3bf70a.entry.js} +2 -2
  181. package/dist/twilight/{p-ea58fa22.entry.js → p-8e111e2e.entry.js} +2 -2
  182. package/dist/twilight/{p-ad1bfcf3.entry.js → p-90e0ff36.entry.js} +7 -7
  183. package/dist/twilight/{p-411b87ef.entry.js → p-92cbc26e.entry.js} +2 -2
  184. package/dist/twilight/{p-c24b8585.system.entry.js → p-932a9495.system.entry.js} +2 -2
  185. package/dist/twilight/{p-b5838794.entry.js → p-9c99ec9d.entry.js} +2 -2
  186. package/dist/twilight/{p-cf060e6c.system.entry.js → p-9da459e3.system.entry.js} +2 -2
  187. package/dist/twilight/{p-01aded94.system.entry.js → p-9da95409.system.entry.js} +2 -2
  188. package/dist/twilight/{p-ab42e437.entry.js → p-9f52c186.entry.js} +2 -2
  189. package/dist/twilight/{p-_oBuExIe.system.js.map → p-B-e3U5P8.system.js.map} +1 -1
  190. package/dist/twilight/{p-DNbI4S_I.js → p-B2te2F0k.js} +2 -2
  191. package/dist/twilight/{p-DNbI4S_I.js.map → p-B2te2F0k.js.map} +1 -1
  192. package/dist/twilight/{p-CFR20olG.system.js.map → p-B7cmAuH9.system.js.map} +1 -1
  193. package/dist/twilight/{p-Cih6sizk.system.js.map → p-BBH0E_z-.system.js.map} +1 -1
  194. package/dist/twilight/{p-Dlx1ErOi.system.js.map → p-BKPR76P3.system.js.map} +1 -1
  195. package/dist/twilight/p-BZcH7srY.system.js.map +1 -0
  196. package/dist/twilight/{p-DdyaaxwR.system.js.map → p-BahDCVg3.system.js.map} +1 -1
  197. package/dist/twilight/{p-DNQHLxWG.system.js.map → p-Bb2NxpFe.system.js.map} +1 -1
  198. package/dist/twilight/{p-CwLRhDos.system.js.map → p-BcNL_T6G.system.js.map} +1 -1
  199. package/dist/twilight/{p-CkkLk7Pj.system.js.map → p-Bn8EiyAB.system.js.map} +1 -1
  200. package/dist/twilight/{p-Cym5H1Z6.system.js.map → p-Brs9NM0b.system.js.map} +1 -1
  201. package/dist/twilight/{p-D5r3ATtc.system.js.map → p-BtBYqT4P.system.js.map} +1 -1
  202. package/dist/twilight/{p-gKm1xaeh.system.js.map → p-C0CfWHAH.system.js.map} +1 -1
  203. package/dist/twilight/{p-NfM7SGbO.system.js.map → p-C3WNijb1.system.js.map} +1 -1
  204. package/dist/twilight/p-CJsgY2dR.system.js.map +1 -0
  205. package/dist/twilight/{p-Cww7QFEI.system.js.map → p-CNDItboI.system.js.map} +1 -1
  206. package/dist/twilight/{p-Dl5noMXr.system.js.map → p-CVoL_QTn.system.js.map} +1 -1
  207. package/dist/twilight/{p-BuTOc-d8.system.js.map → p-CanB30IP.system.js.map} +1 -1
  208. package/dist/twilight/{p-Dzux6KMv.system.js.map → p-CdbjWpSy.system.js.map} +1 -1
  209. package/dist/twilight/{p-Cv46yWRf.system.js.map → p-CpwGQDDt.system.js.map} +1 -1
  210. package/dist/twilight/{p-D2DsyAg6.system.js.map → p-Ct1jxnfI.system.js.map} +1 -1
  211. package/dist/twilight/{p-BDyUK9ox.system.js.map → p-CtJIl0_w.system.js.map} +1 -1
  212. package/dist/twilight/{p-DdBJaRrc.system.js.map → p-CxzOd1Cr.system.js.map} +1 -1
  213. package/dist/twilight/{p-B6bpYnnP.system.js.map → p-Cyx08ZZ7.system.js.map} +1 -1
  214. package/dist/twilight/{p-DyN-KAxy.system.js.map → p-D41YJ-X4.system.js.map} +1 -1
  215. package/dist/twilight/{p-DxmXbXHz.system.js.map → p-D68XohHN.system.js.map} +1 -1
  216. package/dist/twilight/{p-BUwki4wf.system.js.map → p-DG5qnodN.system.js.map} +1 -1
  217. package/dist/twilight/{p-D1zqgG9Y.system.js.map → p-DQoj-KfA.system.js.map} +1 -1
  218. package/dist/twilight/{p-DST6iM3C.system.js.map → p-DVqAtg79.system.js.map} +1 -1
  219. package/dist/twilight/{p-BV4kErtd.system.js → p-DdFhEMb6.system.js} +3 -3
  220. package/dist/twilight/p-DdFhEMb6.system.js.map +1 -0
  221. package/dist/twilight/{p-dQTzJHLh.system.js.map → p-Dhb4JyLV.system.js.map} +1 -1
  222. package/dist/twilight/{p-CRhaoLbg.system.js.map → p-DrQZJLBF.system.js.map} +1 -1
  223. package/dist/twilight/{p-BbWNHcOU.system.js → p-DxWLRF--.system.js} +2 -2
  224. package/dist/twilight/{p-BbWNHcOU.system.js.map → p-DxWLRF--.system.js.map} +1 -1
  225. package/dist/twilight/{p-E94lGW7o.system.js.map → p-L6p0JXbn.system.js.map} +1 -1
  226. package/dist/twilight/{p-Dxu9oA9K.js → p-Qk6_ks1N.js} +3 -3
  227. package/dist/twilight/p-Qk6_ks1N.js.map +1 -0
  228. package/dist/twilight/{p-DIHPMktR.system.js → p-XH--V_xY.system.js} +2 -2
  229. package/dist/twilight/{p-DIHPMktR.system.js.map → p-XH--V_xY.system.js.map} +1 -1
  230. package/dist/twilight/{p-e651f83f.system.entry.js → p-a0bfb9f0.system.entry.js} +2 -2
  231. package/dist/twilight/{p-4437951d.system.entry.js → p-b4dcca7d.system.entry.js} +2 -2
  232. package/dist/twilight/{p-67d370cb.entry.js → p-ba73145a.entry.js} +2 -2
  233. package/dist/twilight/{p-b854bd23.entry.js → p-bd157361.entry.js} +2 -2
  234. package/dist/twilight/p-c09b9065.entry.js +5 -0
  235. package/dist/twilight/p-c09b9065.entry.js.map +1 -0
  236. package/dist/twilight/{p-12198e85.system.entry.js → p-c32b29f3.system.entry.js} +2 -2
  237. package/dist/twilight/{p-4659c645.entry.js → p-cafa90ca.entry.js} +2 -2
  238. package/dist/twilight/{p-554092d9.system.entry.js → p-cb051f40.system.entry.js} +2 -2
  239. package/dist/twilight/p-d7834bb8.system.entry.js +5 -0
  240. package/dist/twilight/{p-4bc9089d.entry.js → p-da0d4708.entry.js} +2 -2
  241. package/dist/twilight/p-da239ecb.entry.js +5 -0
  242. package/dist/twilight/{p-cc5e1937.system.entry.js → p-e0c33d75.system.entry.js} +2 -2
  243. package/dist/twilight/{p-bd89e063.system.entry.js → p-e3a5c60b.system.entry.js} +2 -2
  244. package/dist/twilight/{p-c695b1d9.system.entry.js → p-e505c759.system.entry.js} +2 -2
  245. package/dist/twilight/{p-788980fa.entry.js → p-e702680e.entry.js} +2 -2
  246. package/dist/twilight/{p-a3cd1fad.entry.js → p-f289d1e4.entry.js} +2 -2
  247. package/dist/twilight/{p-f36b71e2.system.entry.js → p-f7619cf4.system.entry.js} +2 -2
  248. package/dist/twilight/{p-07f023da.entry.js → p-f8ddee2c.entry.js} +2 -2
  249. package/dist/twilight/{p-Cr6XPQwf.system.js.map → p-xWkxNUTt.system.js.map} +1 -1
  250. package/dist/twilight/salla-product-options.entry.esm.js.map +1 -1
  251. package/dist/twilight/salla-tiered-offer.entry.esm.js.map +1 -1
  252. package/dist/twilight/twilight.esm.js +1 -1
  253. package/dist/twilight/twilight.js +1 -1
  254. package/dist/types/components/salla-product-options/salla-product-options.d.ts +11 -1
  255. package/package.json +5 -5
  256. package/dist/cjs/index-BDdHgq9_.js.map +0 -1
  257. package/dist/esm/index-Dxu9oA9K.js.map +0 -1
  258. package/dist/esm-es5/index-Dxu9oA9K.js.map +0 -1
  259. package/dist/twilight/p-06af0212.entry.js +0 -5
  260. package/dist/twilight/p-06af0212.entry.js.map +0 -1
  261. package/dist/twilight/p-5273af20.entry.js +0 -5
  262. package/dist/twilight/p-63f5db56.system.entry.js +0 -5
  263. package/dist/twilight/p-63f5db56.system.entry.js.map +0 -1
  264. package/dist/twilight/p-64128588.entry.js.map +0 -1
  265. package/dist/twilight/p-BV4kErtd.system.js.map +0 -1
  266. package/dist/twilight/p-DRACrmyE.system.js.map +0 -1
  267. package/dist/twilight/p-STaxwEDu.system.js.map +0 -1
  268. package/dist/twilight/p-b4b32523.system.entry.js +0 -5
  269. package/dist/twilight/p-bf84ef7e.system.entry.js +0 -5
  270. package/dist/twilight/p-bf84ef7e.system.entry.js.map +0 -1
  271. package/dist/twilight/p-efcb6ca0.entry.js +0 -5
  272. /package/dist/twilight/{p-efcb6ca0.entry.js.map → p-0080e341.entry.js.map} +0 -0
  273. /package/dist/twilight/{p-79dab8b8.system.entry.js.map → p-03f69cea.system.entry.js.map} +0 -0
  274. /package/dist/twilight/{p-7167cda0.system.entry.js.map → p-0488395f.system.entry.js.map} +0 -0
  275. /package/dist/twilight/{p-cab02e98.system.entry.js.map → p-085de295.system.entry.js.map} +0 -0
  276. /package/dist/twilight/{p-03f98d2f.system.entry.js.map → p-095cd107.system.entry.js.map} +0 -0
  277. /package/dist/twilight/{p-7632d96b.system.entry.js.map → p-0b5059a8.system.entry.js.map} +0 -0
  278. /package/dist/twilight/{p-11fe6afc.entry.js.map → p-113610e6.entry.js.map} +0 -0
  279. /package/dist/twilight/{p-1b84dff7.system.entry.js.map → p-17ac3f07.system.entry.js.map} +0 -0
  280. /package/dist/twilight/{p-2d41b312.entry.js.map → p-1bac43db.entry.js.map} +0 -0
  281. /package/dist/twilight/{p-2b6b8c81.entry.js.map → p-1cbfdf9c.entry.js.map} +0 -0
  282. /package/dist/twilight/{p-eb410142.entry.js.map → p-2018f332.entry.js.map} +0 -0
  283. /package/dist/twilight/{p-b24fe018.system.entry.js.map → p-22a97b77.system.entry.js.map} +0 -0
  284. /package/dist/twilight/{p-67c709ff.entry.js.map → p-2504b7c0.entry.js.map} +0 -0
  285. /package/dist/twilight/{p-6f2cf177.entry.js.map → p-26f3294b.entry.js.map} +0 -0
  286. /package/dist/twilight/{p-4c9e43fe.system.entry.js.map → p-31249011.system.entry.js.map} +0 -0
  287. /package/dist/twilight/{p-331c6ed5.system.entry.js.map → p-33c1da66.system.entry.js.map} +0 -0
  288. /package/dist/twilight/{p-9110491f.entry.js.map → p-34170712.entry.js.map} +0 -0
  289. /package/dist/twilight/{p-3f455e4b.entry.js.map → p-3ca55ad3.entry.js.map} +0 -0
  290. /package/dist/twilight/{p-3917911e.system.entry.js.map → p-3d646989.system.entry.js.map} +0 -0
  291. /package/dist/twilight/{p-37ef34af.entry.js.map → p-3e782481.entry.js.map} +0 -0
  292. /package/dist/twilight/{p-5eb4592c.entry.js.map → p-3f2e984c.entry.js.map} +0 -0
  293. /package/dist/twilight/{p-142c7169.entry.js.map → p-4049f624.entry.js.map} +0 -0
  294. /package/dist/twilight/{p-529f23c6.system.entry.js.map → p-41c210db.system.entry.js.map} +0 -0
  295. /package/dist/twilight/{p-b3451de7.system.entry.js.map → p-4c901b62.system.entry.js.map} +0 -0
  296. /package/dist/twilight/{p-462c7109.system.entry.js.map → p-59796bb2.system.entry.js.map} +0 -0
  297. /package/dist/twilight/{p-f8352357.entry.js.map → p-6029cdd7.entry.js.map} +0 -0
  298. /package/dist/twilight/{p-3b21bc63.entry.js.map → p-60dac7ef.entry.js.map} +0 -0
  299. /package/dist/twilight/{p-28c53329.system.entry.js.map → p-60f649f5.system.entry.js.map} +0 -0
  300. /package/dist/twilight/{p-5ee8e3ee.system.entry.js.map → p-61cec922.system.entry.js.map} +0 -0
  301. /package/dist/twilight/{p-c698caa6.system.entry.js.map → p-65c74d07.system.entry.js.map} +0 -0
  302. /package/dist/twilight/{p-099c2ddf.entry.js.map → p-65ee4bcd.entry.js.map} +0 -0
  303. /package/dist/twilight/{p-3971d884.system.entry.js.map → p-66f0d009.system.entry.js.map} +0 -0
  304. /package/dist/twilight/{p-a642fb2d.system.entry.js.map → p-69c4dc57.system.entry.js.map} +0 -0
  305. /package/dist/twilight/{p-f6a84618.entry.js.map → p-824f1195.entry.js.map} +0 -0
  306. /package/dist/twilight/{p-5b5a6101.entry.js.map → p-84013163.entry.js.map} +0 -0
  307. /package/dist/twilight/{p-bdf35a25.system.entry.js.map → p-8a9bfcbb.system.entry.js.map} +0 -0
  308. /package/dist/twilight/{p-816097f4.entry.js.map → p-8c3bf70a.entry.js.map} +0 -0
  309. /package/dist/twilight/{p-ea58fa22.entry.js.map → p-8e111e2e.entry.js.map} +0 -0
  310. /package/dist/twilight/{p-ad1bfcf3.entry.js.map → p-90e0ff36.entry.js.map} +0 -0
  311. /package/dist/twilight/{p-411b87ef.entry.js.map → p-92cbc26e.entry.js.map} +0 -0
  312. /package/dist/twilight/{p-c24b8585.system.entry.js.map → p-932a9495.system.entry.js.map} +0 -0
  313. /package/dist/twilight/{p-b5838794.entry.js.map → p-9c99ec9d.entry.js.map} +0 -0
  314. /package/dist/twilight/{p-cf060e6c.system.entry.js.map → p-9da459e3.system.entry.js.map} +0 -0
  315. /package/dist/twilight/{p-01aded94.system.entry.js.map → p-9da95409.system.entry.js.map} +0 -0
  316. /package/dist/twilight/{p-ab42e437.entry.js.map → p-9f52c186.entry.js.map} +0 -0
  317. /package/dist/twilight/{p-e651f83f.system.entry.js.map → p-a0bfb9f0.system.entry.js.map} +0 -0
  318. /package/dist/twilight/{p-4437951d.system.entry.js.map → p-b4dcca7d.system.entry.js.map} +0 -0
  319. /package/dist/twilight/{p-67d370cb.entry.js.map → p-ba73145a.entry.js.map} +0 -0
  320. /package/dist/twilight/{p-b854bd23.entry.js.map → p-bd157361.entry.js.map} +0 -0
  321. /package/dist/twilight/{p-12198e85.system.entry.js.map → p-c32b29f3.system.entry.js.map} +0 -0
  322. /package/dist/twilight/{p-4659c645.entry.js.map → p-cafa90ca.entry.js.map} +0 -0
  323. /package/dist/twilight/{p-554092d9.system.entry.js.map → p-cb051f40.system.entry.js.map} +0 -0
  324. /package/dist/twilight/{p-b4b32523.system.entry.js.map → p-d7834bb8.system.entry.js.map} +0 -0
  325. /package/dist/twilight/{p-4bc9089d.entry.js.map → p-da0d4708.entry.js.map} +0 -0
  326. /package/dist/twilight/{p-5273af20.entry.js.map → p-da239ecb.entry.js.map} +0 -0
  327. /package/dist/twilight/{p-cc5e1937.system.entry.js.map → p-e0c33d75.system.entry.js.map} +0 -0
  328. /package/dist/twilight/{p-bd89e063.system.entry.js.map → p-e3a5c60b.system.entry.js.map} +0 -0
  329. /package/dist/twilight/{p-c695b1d9.system.entry.js.map → p-e505c759.system.entry.js.map} +0 -0
  330. /package/dist/twilight/{p-788980fa.entry.js.map → p-e702680e.entry.js.map} +0 -0
  331. /package/dist/twilight/{p-a3cd1fad.entry.js.map → p-f289d1e4.entry.js.map} +0 -0
  332. /package/dist/twilight/{p-f36b71e2.system.entry.js.map → p-f7619cf4.system.entry.js.map} +0 -0
  333. /package/dist/twilight/{p-07f023da.entry.js.map → p-f8ddee2c.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as a,H as i,g as s}from"./p-Dxu9oA9K.js";const e="salla-installment:empty{display:none}#tabbyPromoWrapper{background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px;border:unset !important;font-weight:500}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;-webkit-box-shadow:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--main-text-color);font-size:var(--font-sm);line-height:1.25;padding:20px 20px 20px 115px !important;background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);border:unset !important;font-family:inherit !important;font-weight:500}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper{margin-bottom:20px}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px !important;top:35px !important;margin:0 !important;height:24px !important}.ltr .tamara-product-widget .tamara-logo{right:20px !important;left:auto !important}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}.s-installment-mispay-wrapper,.s-installment-madfu-wrapper,.s-installment-emkan-wrapper,.s-installment-rajehi-wrapper{font-size:14px;text-align:right;padding:20px;gap:42px;line-height:22px;color:rgb(0, 0, 0);min-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;background-color:white;border-radius:10px;margin:15px 0;display:-ms-flexbox;display:flex;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.s-installment-mispay-wrapper:hover,.s-installment-madfu-wrapper:hover,.s-installment-emkan-wrapper:hover,.s-installment-rajehi-wrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.s-installment-mispay-content,.s-installment-madfu-content,.s-installment-emkan-content,.s-installment-rajehi-content{display:-ms-flexbox;display:flex;-ms-flex-direction:row-reverse;flex-direction:row-reverse;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;gap:1rem}.s-installment-mispay-content-text,.s-installment-madfu-content-text,.s-installment-emkan-content-text,.s-installment-rajehi-content-text{color:var(--main-text-color);font-size:14px;font-weight:500;margin:0 16px 0 0;width:80%;left:14px;text-align:left}.s-installment-mispay-content img,.s-installment-madfu-content img,.s-installment-emkan-content img,.s-installment-rajehi-content img{height:28px;width:70px;display:inline-block;max-height:100%;vertical-align:middle;fill:none;stroke:unset;width:auto}.rtl .s-installment-mispay-content-text,.rtl .s-installment-madfu-content-text,.rtl .s-installment-emkan-content-text,.rtl .s-installment-rajehi-content-text{right:14px;text-align:right;margin:0 0 0 16px}.rtl .s-installment-mispay-content img,.rtl .s-installment-madfu-content img,.rtl .s-installment-emkan-content img,.rtl .s-installment-rajehi-content img{left:14px !important}.ltr .s-installment-mispay-content img,.ltr .s-installment-madfu-content img,.ltr .s-installment-emkan-content img,.ltr .s-installment-rajehi-content img{right:14px !important}.s-installment-rajehi-content img{width:70px !important;height:40px !important}.s-installment-emkan-content img{height:35px !important}";const o=class{constructor(a){t(this,a);this.tabbyBorderRemoved=false;this.tabbyRemoveBorderTries=0;this.language=salla.config.get("user.language_code");this.currency=salla.config.get("user.currency_code");this.country=salla.config.get("user.country_code");this.installment_sheria_text=(t,a)=>salla.lang.get(t,a)}async componentWillLoad(){await salla.onReady();await salla.lang.onLoaded();this.currency=salla.config.get("user.currency_code")||"SAR";this.language=salla.config.get("user.language_code")||"ar";this.country=salla.config.get("user.country_code")||"SA";const t=[{key:"pages.products.installments",installments:3},{key:"pages.products.installments_emkan",installments:5}];t.forEach((t=>{this.installment_sheria_text(t.key,{payment:salla.money(parseFloat(this.price)),amount:salla.money((parseFloat(this.price)/t.installments).toFixed(2)).replace(/\.00$/,""),installments:t.installments})}));const a=salla.config.get("store.settings.installments");if(a){this.tamaraIsActive=a.tamara;this.tabbyIsActive=a.tabby;this.spotiiIsActive=a.spotii;this.mispayActive=a.mispay;this.emkanIsActive=a.emkan;this.madfuActive=a.madfu;this.rajehiIsActive=a.mokafaa_alrajhi}salla.event.on("product::price.updated",(({data:t})=>{if(!t.price||t.price==this.price){return}this.price=t.price;this.renderInstallments(true)}))}componentDidLoad(){this.renderInstallments()}render(){var t;const s=this.currency==="SAR";if(!this.isValidPrice(this.price)){return""}return a(i,null,this.tamaraIsActive&&(((t=this.tamaraIsActive)===null||t===void 0?void 0:t.publicKey)?a("div",{class:"mb-5"},a("tamara-widget",{type:"tamara-summary","inline-type":"2",amount:this.price})):a("div",{class:"tamara-product-widget","data-price":this.price,"data-currency":this.currency,"data-lang":this.language,"data-payment-type":"installment"})),this.tabbyIsActive?a("div",{id:"tabbyPromoWrapper"},a("div",{id:"tabbyPromo"})):"",this.spotiiIsActive?a("div",{class:"spotii-wrapper"},a("div",{class:"spotii-promo"})):"",this.shouldShowMispay()&&(this.mispayActive.publicKey?a("div",{class:"mb-5"},a("mispay-widget",{amount:this.price,lang:this.language})):a("div",{class:"s-installment-mispay-wrapper"},a("div",{class:"s-installment-mispay-content"},a("img",{src:salla.url.cdn("images/payment/png/mispay.png"),alt:"mispay"}),a("span",{class:"s-installment-mispay-content-text",innerHTML:this.installment_sheria_text("pages.products.installments",{payment:salla.money(parseFloat(this.price)),amount:salla.money((parseFloat(this.price)/4).toFixed(2)),installments:4})})))),this.emkanIsActive&&this.currency==="SAR"?a("div",{class:"s-installment-emkan-wrapper"},a("div",{class:"s-installment-emkan-content"},a("img",{src:salla.url.cdn("images/payment/png/emkan.png"),alt:"emkan"}),a("span",{class:"s-installment-emkan-content-text",innerHTML:this.installment_sheria_text("pages.products.installments_emkan",{payment:salla.money(parseFloat(this.price)),installments:5})}))):"",this.madfuActive&&this.currency==="SAR"?a("div",{class:"s-installment-madfu-wrapper"},a("div",{class:"s-installment-madfu-content"},a("img",{src:salla.url.cdn("images/payment/png/madfu.png"),alt:"madfu"}),a("span",{class:"s-installment-madfu-content-text"},salla.lang.get("pages.products.installments_madfu")))):"",s&&this.rajehiIsActive?a("div",{class:"s-installment-rajehi-wrapper"},a("div",{class:"s-installment-rajehi-content"},a("img",{src:salla.url.cdn("images/payment/png/mokafaa_alrajhi_loyalty.png"),alt:"mokafaa_alrajhi_loyalty"}),a("span",{class:"s-installment-rajehi-content-text"},salla.lang.get("pages.products.rajahi_earn_points",{points:Math.floor(+this.price*this.rajehiIsActive.pointsPerRiyal)})))):"")}renderInstallments(t=false){if(!this.isValidPrice(this.price)){return}if(this.tamaraIsActive){this.loadTamara({isUpdating:t})}if(this.tabbyIsActive){if(t){var a=this.host.querySelector("#tabbyPromoWrapper");if(a){a.remove()}var i=document.createElement("div");i.setAttribute("id","tabbyPromoWrapper");var s=document.createElement("div");s.setAttribute("id","tabbyPromo");i.appendChild(s);this.host.appendChild(i);var e=document.querySelector('script[src="https://checkout.tabby.ai/tabby-promo.js"]');if(e){e.remove()}}var o=document.createElement("script");o.setAttribute("src","https://checkout.tabby.ai/tabby-promo.js");document.head.appendChild(o);o.onload=()=>{const t=window.TabbyPromo;new t({selector:"#tabbyPromo",currency:this.currency,price:this.price,lang:this.language,publicKey:salla.config.get("store.settings.installments.tabby.publicKey"),merchantCode:salla.config.get("store.settings.installments.tabby.merchantCode")});document.querySelectorAll(".tabby-promo-snippet__logo").forEach((function(t){t.setAttribute("aria-label","Tabby Logo")}))};this.removeTabbyBorder()}if(this.spotiiIsActive){if(t){var r=this.host.querySelector(".spotii-wrapper");if(r){r.remove()}var n=document.createElement("div");n.classList.add("spotii-wrapper");var l=document.createElement("div");l.classList.add("spotii-promo");n.appendChild(l);this.host.appendChild(n);var p=document.querySelector('script[src="'+salla.url.cdn("js/price-widget-ar-salla.js")+'"]');if(p){p.remove()}}let a=salla.money((Number(this.price)/3).toFixed(2),false);let i=salla.config.get("theme.is_rtl",true);window.spotiiConfig={targetXPath:[".spotii-wrapper"],renderToPath:[".spotii-promo"],numberOfPayment:3,currency:this.currency,templateLine:"${textOne} ${number} ${textTwo} "+a+"${logo} ${info}",textOne:i?"جزء الدفع على":"Split it into",textTwo:i?"أقساط متساوية بدون تكاليف اضافية بقيمة":"payments of",textThree:"مع",price:this.price};var m=document.createElement("script");m.setAttribute("src",salla.url.cdn("js/price-widget-ar-salla.js"));document.head.appendChild(m)}if(this.shouldShowMispay()&&this.mispayActive.publicKey){this.loadExternalScript({position:"head",src:`https://widget.mispay.co/v1/sdk.js?authorize=${this.mispayActive.publicKey}`})}}isValidPrice(t){const a=/^\d+(\.\d{1,2})?$/;const i=a.test(t);const s=parseFloat(t)>0;return i&&s}loadExternalScript({src:t,onLoad:a,position:i}){const s=document.createElement("script");s.src=t;s.onload=a;document[i].appendChild(s)}loadTamara({isUpdating:t}){var a,i;const s=!!((a=this.tamaraIsActive)===null||a===void 0?void 0:a.publicKey);if(t){setTimeout((()=>{var t,a;if(s){return(t=window.TamaraWidgetV2)===null||t===void 0?void 0:t.refresh()}(a=window.TamaraProductWidget)===null||a===void 0?void 0:a.render()}),300)}else{if(s){const t=salla.config.get("user.language_code");const a=["ar","en"].includes(t)?t:"ar";const s=(i=this.currency)===null||i===void 0?void 0:i.slice(0,-1);const e=["SA","AE","KW","BH","OM","QA"].includes(s)?s:null;if(!e){console.error("Tamara: Country code is not supported",s)}else{window.tamaraWidgetConfig={lang:a,country:e,publicKey:this.tamaraIsActive.publicKey,style:{fontSize:"14px"}};this.loadExternalScript({position:"head",src:"https://cdn.tamara.co/widget-v2/tamara-widget.js"})}}else{this.loadExternalScript({position:"head",src:"https://cdn.tamara.co/widget/product-widget.min.js",onLoad:()=>{window.TamaraProductWidget.init({lang:this.language});setTimeout((()=>{window.TamaraProductWidget.render()}),300)}})}}}shouldShowMispay(){return this.currency==="SAR"&&this.mispayActive}removeTabbyBorder(){if(this.tabbyBorderRemoved||this.tabbyRemoveBorderTries>5){return}this.tabbyRemoveBorderTries++;setTimeout((()=>{let t=document.querySelector("#tabbyPromo>div>div");t=t&&t.shadowRoot?t.shadowRoot.querySelector('div[class^="styles__tabby-promo-snippet--"]'):null;if(t){t.style="border: none; margin: 15px 0!important;";this.tabbyBorderRemoved=true}else{this.removeTabbyBorder()}}),this.tabbyRemoveBorderTries*500)}get host(){return s(this)}};o.style=e;export{o as salla_installment};
5
- //# sourceMappingURL=p-07f023da.entry.js.map
4
+ import{r as t,h as a,H as i,g as s}from"./p-Qk6_ks1N.js";const e="salla-installment:empty{display:none}#tabbyPromoWrapper{background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px;border:unset !important;font-weight:500}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;-webkit-box-shadow:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--main-text-color);font-size:var(--font-sm);line-height:1.25;padding:20px 20px 20px 115px !important;background:white;border-radius:0.375rem;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);border:unset !important;font-family:inherit !important;font-weight:500}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper{margin-bottom:20px}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px !important;top:35px !important;margin:0 !important;height:24px !important}.ltr .tamara-product-widget .tamara-logo{right:20px !important;left:auto !important}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}.s-installment-mispay-wrapper,.s-installment-madfu-wrapper,.s-installment-emkan-wrapper,.s-installment-rajehi-wrapper{font-size:14px;text-align:right;padding:20px;gap:42px;line-height:22px;color:rgb(0, 0, 0);min-width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;background-color:white;border-radius:10px;margin:15px 0;display:-ms-flexbox;display:flex;-webkit-transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.s-installment-mispay-wrapper:hover,.s-installment-madfu-wrapper:hover,.s-installment-emkan-wrapper:hover,.s-installment-rajehi-wrapper:hover{-webkit-box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922);box-shadow:0 0 rgba(0, 0, 0, 0), 0 0 rgba(0, 0, 0, 0), 5px 10px 30px rgba(43, 45, 52, 0.0509803922)}.s-installment-mispay-content,.s-installment-madfu-content,.s-installment-emkan-content,.s-installment-rajehi-content{display:-ms-flexbox;display:flex;-ms-flex-direction:row-reverse;flex-direction:row-reverse;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;gap:1rem}.s-installment-mispay-content-text,.s-installment-madfu-content-text,.s-installment-emkan-content-text,.s-installment-rajehi-content-text{color:var(--main-text-color);font-size:14px;font-weight:500;margin:0 16px 0 0;width:80%;left:14px;text-align:left}.s-installment-mispay-content img,.s-installment-madfu-content img,.s-installment-emkan-content img,.s-installment-rajehi-content img{height:28px;width:70px;display:inline-block;max-height:100%;vertical-align:middle;fill:none;stroke:unset;width:auto}.rtl .s-installment-mispay-content-text,.rtl .s-installment-madfu-content-text,.rtl .s-installment-emkan-content-text,.rtl .s-installment-rajehi-content-text{right:14px;text-align:right;margin:0 0 0 16px}.rtl .s-installment-mispay-content img,.rtl .s-installment-madfu-content img,.rtl .s-installment-emkan-content img,.rtl .s-installment-rajehi-content img{left:14px !important}.ltr .s-installment-mispay-content img,.ltr .s-installment-madfu-content img,.ltr .s-installment-emkan-content img,.ltr .s-installment-rajehi-content img{right:14px !important}.s-installment-rajehi-content img{width:70px !important;height:40px !important}.s-installment-emkan-content img{height:35px !important}";const o=class{constructor(a){t(this,a);this.tabbyBorderRemoved=false;this.tabbyRemoveBorderTries=0;this.language=salla.config.get("user.language_code");this.currency=salla.config.get("user.currency_code");this.country=salla.config.get("user.country_code");this.installment_sheria_text=(t,a)=>salla.lang.get(t,a)}async componentWillLoad(){await salla.onReady();await salla.lang.onLoaded();this.currency=salla.config.get("user.currency_code")||"SAR";this.language=salla.config.get("user.language_code")||"ar";this.country=salla.config.get("user.country_code")||"SA";const t=[{key:"pages.products.installments",installments:3},{key:"pages.products.installments_emkan",installments:5}];t.forEach((t=>{this.installment_sheria_text(t.key,{payment:salla.money(parseFloat(this.price)),amount:salla.money((parseFloat(this.price)/t.installments).toFixed(2)).replace(/\.00$/,""),installments:t.installments})}));const a=salla.config.get("store.settings.installments");if(a){this.tamaraIsActive=a.tamara;this.tabbyIsActive=a.tabby;this.spotiiIsActive=a.spotii;this.mispayActive=a.mispay;this.emkanIsActive=a.emkan;this.madfuActive=a.madfu;this.rajehiIsActive=a.mokafaa_alrajhi}salla.event.on("product::price.updated",(({data:t})=>{if(!t.price||t.price==this.price){return}this.price=t.price;this.renderInstallments(true)}))}componentDidLoad(){this.renderInstallments()}render(){var t;const s=this.currency==="SAR";if(!this.isValidPrice(this.price)){return""}return a(i,null,this.tamaraIsActive&&(((t=this.tamaraIsActive)===null||t===void 0?void 0:t.publicKey)?a("div",{class:"mb-5"},a("tamara-widget",{type:"tamara-summary","inline-type":"2",amount:this.price})):a("div",{class:"tamara-product-widget","data-price":this.price,"data-currency":this.currency,"data-lang":this.language,"data-payment-type":"installment"})),this.tabbyIsActive?a("div",{id:"tabbyPromoWrapper"},a("div",{id:"tabbyPromo"})):"",this.spotiiIsActive?a("div",{class:"spotii-wrapper"},a("div",{class:"spotii-promo"})):"",this.shouldShowMispay()&&(this.mispayActive.publicKey?a("div",{class:"mb-5"},a("mispay-widget",{amount:this.price,lang:this.language})):a("div",{class:"s-installment-mispay-wrapper"},a("div",{class:"s-installment-mispay-content"},a("img",{src:salla.url.cdn("images/payment/png/mispay.png"),alt:"mispay"}),a("span",{class:"s-installment-mispay-content-text",innerHTML:this.installment_sheria_text("pages.products.installments",{payment:salla.money(parseFloat(this.price)),amount:salla.money((parseFloat(this.price)/4).toFixed(2)),installments:4})})))),this.emkanIsActive&&this.currency==="SAR"?a("div",{class:"s-installment-emkan-wrapper"},a("div",{class:"s-installment-emkan-content"},a("img",{src:salla.url.cdn("images/payment/png/emkan.png"),alt:"emkan"}),a("span",{class:"s-installment-emkan-content-text",innerHTML:this.installment_sheria_text("pages.products.installments_emkan",{payment:salla.money(parseFloat(this.price)),installments:5})}))):"",this.madfuActive&&this.currency==="SAR"?a("div",{class:"s-installment-madfu-wrapper"},a("div",{class:"s-installment-madfu-content"},a("img",{src:salla.url.cdn("images/payment/png/madfu.png"),alt:"madfu"}),a("span",{class:"s-installment-madfu-content-text"},salla.lang.get("pages.products.installments_madfu")))):"",s&&this.rajehiIsActive?a("div",{class:"s-installment-rajehi-wrapper"},a("div",{class:"s-installment-rajehi-content"},a("img",{src:salla.url.cdn("images/payment/png/mokafaa_alrajhi_loyalty.png"),alt:"mokafaa_alrajhi_loyalty"}),a("span",{class:"s-installment-rajehi-content-text"},salla.lang.get("pages.products.rajahi_earn_points",{points:Math.floor(+this.price*this.rajehiIsActive.pointsPerRiyal)})))):"")}renderInstallments(t=false){if(!this.isValidPrice(this.price)){return}if(this.tamaraIsActive){this.loadTamara({isUpdating:t})}if(this.tabbyIsActive){if(t){var a=this.host.querySelector("#tabbyPromoWrapper");if(a){a.remove()}var i=document.createElement("div");i.setAttribute("id","tabbyPromoWrapper");var s=document.createElement("div");s.setAttribute("id","tabbyPromo");i.appendChild(s);this.host.appendChild(i);var e=document.querySelector('script[src="https://checkout.tabby.ai/tabby-promo.js"]');if(e){e.remove()}}var o=document.createElement("script");o.setAttribute("src","https://checkout.tabby.ai/tabby-promo.js");document.head.appendChild(o);o.onload=()=>{const t=window.TabbyPromo;new t({selector:"#tabbyPromo",currency:this.currency,price:this.price,lang:this.language,publicKey:salla.config.get("store.settings.installments.tabby.publicKey"),merchantCode:salla.config.get("store.settings.installments.tabby.merchantCode")});document.querySelectorAll(".tabby-promo-snippet__logo").forEach((function(t){t.setAttribute("aria-label","Tabby Logo")}))};this.removeTabbyBorder()}if(this.spotiiIsActive){if(t){var r=this.host.querySelector(".spotii-wrapper");if(r){r.remove()}var n=document.createElement("div");n.classList.add("spotii-wrapper");var l=document.createElement("div");l.classList.add("spotii-promo");n.appendChild(l);this.host.appendChild(n);var p=document.querySelector('script[src="'+salla.url.cdn("js/price-widget-ar-salla.js")+'"]');if(p){p.remove()}}let a=salla.money((Number(this.price)/3).toFixed(2),false);let i=salla.config.get("theme.is_rtl",true);window.spotiiConfig={targetXPath:[".spotii-wrapper"],renderToPath:[".spotii-promo"],numberOfPayment:3,currency:this.currency,templateLine:"${textOne} ${number} ${textTwo} "+a+"${logo} ${info}",textOne:i?"جزء الدفع على":"Split it into",textTwo:i?"أقساط متساوية بدون تكاليف اضافية بقيمة":"payments of",textThree:"مع",price:this.price};var m=document.createElement("script");m.setAttribute("src",salla.url.cdn("js/price-widget-ar-salla.js"));document.head.appendChild(m)}if(this.shouldShowMispay()&&this.mispayActive.publicKey){this.loadExternalScript({position:"head",src:`https://widget.mispay.co/v1/sdk.js?authorize=${this.mispayActive.publicKey}`})}}isValidPrice(t){const a=/^\d+(\.\d{1,2})?$/;const i=a.test(t);const s=parseFloat(t)>0;return i&&s}loadExternalScript({src:t,onLoad:a,position:i}){const s=document.createElement("script");s.src=t;s.onload=a;document[i].appendChild(s)}loadTamara({isUpdating:t}){var a,i;const s=!!((a=this.tamaraIsActive)===null||a===void 0?void 0:a.publicKey);if(t){setTimeout((()=>{var t,a;if(s){return(t=window.TamaraWidgetV2)===null||t===void 0?void 0:t.refresh()}(a=window.TamaraProductWidget)===null||a===void 0?void 0:a.render()}),300)}else{if(s){const t=salla.config.get("user.language_code");const a=["ar","en"].includes(t)?t:"ar";const s=(i=this.currency)===null||i===void 0?void 0:i.slice(0,-1);const e=["SA","AE","KW","BH","OM","QA"].includes(s)?s:null;if(!e){console.error("Tamara: Country code is not supported",s)}else{window.tamaraWidgetConfig={lang:a,country:e,publicKey:this.tamaraIsActive.publicKey,style:{fontSize:"14px"}};this.loadExternalScript({position:"head",src:"https://cdn.tamara.co/widget-v2/tamara-widget.js"})}}else{this.loadExternalScript({position:"head",src:"https://cdn.tamara.co/widget/product-widget.min.js",onLoad:()=>{window.TamaraProductWidget.init({lang:this.language});setTimeout((()=>{window.TamaraProductWidget.render()}),300)}})}}}shouldShowMispay(){return this.currency==="SAR"&&this.mispayActive}removeTabbyBorder(){if(this.tabbyBorderRemoved||this.tabbyRemoveBorderTries>5){return}this.tabbyRemoveBorderTries++;setTimeout((()=>{let t=document.querySelector("#tabbyPromo>div>div");t=t&&t.shadowRoot?t.shadowRoot.querySelector('div[class^="styles__tabby-promo-snippet--"]'):null;if(t){t.style="border: none; margin: 15px 0!important;";this.tabbyBorderRemoved=true}else{this.removeTabbyBorder()}}),this.tabbyRemoveBorderTries*500)}get host(){return s(this)}};o.style=e;export{o as salla_installment};
5
+ //# sourceMappingURL=p-f8ddee2c.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-Cr6XPQwf.system.js","sources":["src/components/salla-filters-widget/salla-filters-widget.scss?tag=salla-filters-widget","src/components/salla-filters-widget/salla-filters-widget.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, h, Method, State, Prop, Event, Element } from '@stencil/core';\nimport Helper from '../../Helpers/Helper';\nimport { Filter, FilterOptionTypes } from \"../salla-filters/interfaces\";\n\n@Component({\n tag: 'salla-filters-widget',\n styleUrl: 'salla-filters-widget.scss',\n})\nexport class SallaFiltersWidget {\n @Element() host: HTMLElement;\n\n /**\n * Show more or less filter options.\n */\n @Prop({ mutable: true }) withLoadMore: boolean;\n\n /**\n * Selected filter options value.\n */\n @Prop({ reflect: true }) filtersData: object;\n\n /**\n * Filter option along with possible values.\n */\n @Prop({ reflect: true }) option: Filter;\n\n\n priceRange: HTMLSallaPriceRangeElement\n\n\n private widgetValues: HTMLElement;\n private widgetContent: HTMLDivElement;\n private initHeight: number = 195;\n\n @State() isOpen: boolean = true;\n @State() isShowMore: boolean = false;\n @State() showMoreLabel: string = \"عرض المزيد\";\n @State() showLessLabel: string = \"عرض أقل\";\n @State() page: any = salla.config.get('page');\n\n /**\n * Custom event emitted up on filter option selection changes.\n */\n @Event() changed: any;\n\n connectedCallback() {\n //lets be smart and don't show 5 and more link for 8 options\n this.withLoadMore = this.option.key != 'price' && Array.isArray(this.option.values) && this.option.values.length > 8;\n salla.onReady(() => {\n this.page = salla.config.get('page');\n })\n salla.lang.onLoaded(() => {\n this.showMoreLabel = salla.lang.getWithDefault('common.titles.more', this.showMoreLabel)\n this.showLessLabel = salla.lang.getWithDefault('common.elements.show_less', this.showLessLabel)\n })\n }\n\n componentDidLoad() {\n this.widgetValues.scrollHeight < this.initHeight && (this.withLoadMore = false);\n (this.withLoadMore && this.widgetValues) && (this.widgetValues.style.maxHeight = `${this.initHeight}px`);\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }\n\n /**\n * Asynchronously sets the height of a widget element to its current height, allowing for smooth transitions.\n * This function is often used in scenarios where the widget's content changes dynamically, and animating\n * the height adjustment is desired for a smoother user experience.\n *\n * @param {number} [delay=250] - Optional. The delay (in milliseconds) before updating the widget height.\n * Defaults to 250 milliseconds.\n *\n * @returns {Promise<void>} - A Promise that resolves once the widget height is set after the specified delay.\n *\n * @example\n * // Set widget height with the default delay (250 milliseconds)\n * await setWidgetHeight();\n *\n * // Set widget height with a custom delay (e.g., 500 milliseconds)\n * await setWidgetHeight(500);\n */\n @Method()\n async setWidgetHeight(delay = 250) {\n this.widgetContent.removeAttribute('style');\n setTimeout(() => {\n let currentWidgetHeight: number = this.widgetContent.scrollHeight;\n this.widgetContent.style.height = currentWidgetHeight + 'px';\n }, delay)\n }\n\n /**\n * Reset selected filter options.\n */\n @Method()\n async reset() {\n if (this.option.type === FilterOptionTypes.RANGE) {\n this.priceRange.reset()\n }\n Array.from(this.host.querySelectorAll('input')).forEach(input => input.checked = false);\n }\n\n\n /**\n * Action to show more or less filter options.\n */\n @Method()\n async showMore() {\n this.isShowMore = !this.isShowMore\n this.widgetContent.style.height = 'auto';\n this.widgetValues.style.maxHeight = this.isShowMore ? `${this.widgetValues.scrollHeight}px` : `${this.initHeight}px`;\n setTimeout(() => {\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }, 400); // get height after time of collapse animtion (duration-300)\n }\n\n /**\n * Action to toggle widget open or closed (expand/ collapse).\n */\n @Method()\n async toggleWidget() {\n this.isOpen = !this.isOpen;\n Helper.toggleElementClassIf(this.widgetContent, 's-filters-widget-opened', 's-filters-widget-closed', () => this.isOpen);\n }\n\n renderFilterOption(option: Filter) {\n if (![FilterOptionTypes.VALUES, FilterOptionTypes.MINIMUM, FilterOptionTypes.VARIANTS].includes(option.type)) {\n return '';\n }\n //@ts-ignore\n return option.values.map((filterOption, index) => {\n let value = typeof filterOption == 'number' ? filterOption : (filterOption.key || filterOption.value);\n\n return <label class=\"s-filters-label\" htmlFor={`${option.key}-option-${value}`} key={`${option.key}-option-${value}`}>\n <input\n id={`${option.key}-option-${value}`}\n name={option.key}\n type=\"radio\"\n checked={this.isSelectedOption(option, value)}\n class={`s-filters-radio`}\n onChange={event => this.changed.emit({ event, option, value })}\n />\n {this.getOptionLabel(option, filterOption)}\n </label>\n }\n )\n\n }\n private isSelectedOption(option: Filter, value: any): boolean {\n if (option.type === FilterOptionTypes.MINIMUM) {\n return this.filtersData[option.key] == value;\n }\n if (option.type === FilterOptionTypes.VARIANTS) {\n return this.filtersData[option.type] && this.filtersData[option.type][Object.keys(this.filtersData[option.type])[0]] == value;\n }\n if (option.type === FilterOptionTypes.RANGE) {\n\n return this.filtersData[option.key] && this.filtersData[option.key].min == value.min && this.filtersData[option.key].max == value.max;\n }\n\n if (option.type === FilterOptionTypes.VALUES) {\n return this.filtersData[option.key] && Number(this.filtersData[option.key]) == Number(value);\n }\n return false;\n }\n\n\n\n private getOptionLabel(option: Filter, filterOption) {\n if (option.key == 'rating') {\n //in amazon has stars & up, should we add it, to avoid those people who will come to say I selected 4 why I see 5 sars products\n return <salla-rating-stars size=\"small\" value={filterOption} />;\n }\n let label = filterOption.value || 'null';\n //label+=filterOption.count ? ` (${salla.helpers.number(filterOption.count)})` : '';\n return <span class=\"s-filters-option-name\">{label}</span>;\n }\n\n render() {\n return (\n <Host class=\"s-filters-widget-container\">\n <h3 class=\"s-filters-widget-title\" onClick={() => this.toggleWidget()}>\n <span>{this.option.label}</span>\n <span class={`s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}`} />\n </h3>\n <div class=\"s-filters-widget-content\" ref={(el) => this.widgetContent = el}>\n <div class=\"s-filters-widget-values\" ref={(el) => this.widgetValues = el}>\n <slot />\n {\n this.option.type !== FilterOptionTypes.RANGE\n ? this.renderFilterOption(this.option)\n : <salla-price-range onChanged={(event) => {\n this.changed.emit(event.detail)\n }}\n ref={price => this.priceRange = price}\n filtersData={this.filtersData}\n option={this.option} />\n }\n </div>\n {this.withLoadMore &&\n <a class=\"s-filters-widget-more\"\n onClick={() => this.showMore()}>{!this.isShowMore ? this.showMoreLabel : this.showLessLabel}</a>\n }\n </div>\n </Host>\n );\n }\n\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MAAA,MAAM,qBAAqB,GAAG,sBAAsB;;YCQvC,kBAAkB,mCAAA,MAAA;MAJ/B,IAAA,WAAA,CAAA,OAAA,EAAA;;;MA4BU,QAAA,IAAU,CAAA,UAAA,GAAW,GAAG;MAEvB,QAAA,IAAM,CAAA,MAAA,GAAY,IAAI;MACtB,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;MAC3B,QAAA,IAAa,CAAA,aAAA,GAAW,YAAY;MACpC,QAAA,IAAa,CAAA,aAAA,GAAW,SAAS;cACjC,IAAI,CAAA,IAAA,GAAQ,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;MAwK9C;UAjKC,iBAAiB,GAAA;;MAEf,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;MACpH,QAAA,KAAK,CAAC,OAAO,CAAC,MAAK;kBACjB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;MACtC,SAAC,CAAC;MACF,QAAA,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAK;MACvB,YAAA,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,oBAAoB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la-filters-widget","src/components/salla-filters-widget/salla-filters-widget.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, h, Method, State, Prop, Event, Element } from '@stencil/core';\nimport Helper from '../../Helpers/Helper';\nimport { Filter, FilterOptionTypes } from \"../salla-filters/interfaces\";\n\n@Component({\n tag: 'salla-filters-widget',\n styleUrl: 'salla-filters-widget.scss',\n})\nexport class SallaFiltersWidget {\n @Element() host: HTMLElement;\n\n /**\n * Show more or less filter options.\n */\n @Prop({ mutable: true }) withLoadMore: boolean;\n\n /**\n * Selected filter options value.\n */\n @Prop({ reflect: true }) filtersData: object;\n\n /**\n * Filter option along with possible values.\n */\n @Prop({ reflect: true }) option: Filter;\n\n\n priceRange: HTMLSallaPriceRangeElement\n\n\n private widgetValues: HTMLElement;\n private widgetContent: HTMLDivElement;\n private initHeight: number = 195;\n\n @State() isOpen: boolean = true;\n @State() isShowMore: boolean = false;\n @State() showMoreLabel: string = \"عرض المزيد\";\n @State() showLessLabel: string = \"عرض أقل\";\n @State() page: any = salla.config.get('page');\n\n /**\n * Custom event emitted up on filter option selection changes.\n */\n @Event() changed: any;\n\n connectedCallback() {\n //lets be smart and don't show 5 and more link for 8 options\n this.withLoadMore = this.option.key != 'price' && Array.isArray(this.option.values) && this.option.values.length > 8;\n salla.onReady(() => {\n this.page = salla.config.get('page');\n })\n salla.lang.onLoaded(() => {\n this.showMoreLabel = salla.lang.getWithDefault('common.titles.more', this.showMoreLabel)\n this.showLessLabel = salla.lang.getWithDefault('common.elements.show_less', this.showLessLabel)\n })\n }\n\n componentDidLoad() {\n this.widgetValues.scrollHeight < this.initHeight && (this.withLoadMore = false);\n (this.withLoadMore && this.widgetValues) && (this.widgetValues.style.maxHeight = `${this.initHeight}px`);\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }\n\n /**\n * Asynchronously sets the height of a widget element to its current height, allowing for smooth transitions.\n * This function is often used in scenarios where the widget's content changes dynamically, and animating\n * the height adjustment is desired for a smoother user experience.\n *\n * @param {number} [delay=250] - Optional. The delay (in milliseconds) before updating the widget height.\n * Defaults to 250 milliseconds.\n *\n * @returns {Promise<void>} - A Promise that resolves once the widget height is set after the specified delay.\n *\n * @example\n * // Set widget height with the default delay (250 milliseconds)\n * await setWidgetHeight();\n *\n * // Set widget height with a custom delay (e.g., 500 milliseconds)\n * await setWidgetHeight(500);\n */\n @Method()\n async setWidgetHeight(delay = 250) {\n this.widgetContent.removeAttribute('style');\n setTimeout(() => {\n let currentWidgetHeight: number = this.widgetContent.scrollHeight;\n this.widgetContent.style.height = currentWidgetHeight + 'px';\n }, delay)\n }\n\n /**\n * Reset selected filter options.\n */\n @Method()\n async reset() {\n if (this.option.type === FilterOptionTypes.RANGE) {\n this.priceRange.reset()\n }\n Array.from(this.host.querySelectorAll('input')).forEach(input => input.checked = false);\n }\n\n\n /**\n * Action to show more or less filter options.\n */\n @Method()\n async showMore() {\n this.isShowMore = !this.isShowMore\n this.widgetContent.style.height = 'auto';\n this.widgetValues.style.maxHeight = this.isShowMore ? `${this.widgetValues.scrollHeight}px` : `${this.initHeight}px`;\n setTimeout(() => {\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }, 400); // get height after time of collapse animtion (duration-300)\n }\n\n /**\n * Action to toggle widget open or closed (expand/ collapse).\n */\n @Method()\n async toggleWidget() {\n this.isOpen = !this.isOpen;\n Helper.toggleElementClassIf(this.widgetContent, 's-filters-widget-opened', 's-filters-widget-closed', () => this.isOpen);\n }\n\n renderFilterOption(option: Filter) {\n if (![FilterOptionTypes.VALUES, FilterOptionTypes.MINIMUM, FilterOptionTypes.VARIANTS].includes(option.type)) {\n return '';\n }\n //@ts-ignore\n return option.values.map((filterOption, index) => {\n let value = typeof filterOption == 'number' ? filterOption : (filterOption.key || filterOption.value);\n\n return <label class=\"s-filters-label\" htmlFor={`${option.key}-option-${value}`} key={`${option.key}-option-${value}`}>\n <input\n id={`${option.key}-option-${value}`}\n name={option.key}\n type=\"radio\"\n checked={this.isSelectedOption(option, value)}\n class={`s-filters-radio`}\n onChange={event => this.changed.emit({ event, option, value })}\n />\n {this.getOptionLabel(option, filterOption)}\n </label>\n }\n )\n\n }\n private isSelectedOption(option: Filter, value: any): boolean {\n if (option.type === FilterOptionTypes.MINIMUM) {\n return this.filtersData[option.key] == value;\n }\n if (option.type === FilterOptionTypes.VARIANTS) {\n return this.filtersData[option.type] && this.filtersData[option.type][Object.keys(this.filtersData[option.type])[0]] == value;\n }\n if (option.type === FilterOptionTypes.RANGE) {\n\n return this.filtersData[option.key] && this.filtersData[option.key].min == value.min && this.filtersData[option.key].max == value.max;\n }\n\n if (option.type === FilterOptionTypes.VALUES) {\n return this.filtersData[option.key] && Number(this.filtersData[option.key]) == Number(value);\n }\n return false;\n }\n\n\n\n private getOptionLabel(option: Filter, filterOption) {\n if (option.key == 'rating') {\n //in amazon has stars & up, should we add it, to avoid those people who will come to say I selected 4 why I see 5 sars products\n return <salla-rating-stars size=\"small\" value={filterOption} />;\n }\n let label = filterOption.value || 'null';\n //label+=filterOption.count ? ` (${salla.helpers.number(filterOption.count)})` : '';\n return <span class=\"s-filters-option-name\">{label}</span>;\n }\n\n render() {\n return (\n <Host class=\"s-filters-widget-container\">\n <h3 class=\"s-filters-widget-title\" onClick={() => this.toggleWidget()}>\n <span>{this.option.label}</span>\n <span class={`s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}`} />\n </h3>\n <div class=\"s-filters-widget-content\" ref={(el) => this.widgetContent = el}>\n <div class=\"s-filters-widget-values\" ref={(el) => this.widgetValues = el}>\n <slot />\n {\n this.option.type !== FilterOptionTypes.RANGE\n ? this.renderFilterOption(this.option)\n : <salla-price-range onChanged={(event) => {\n this.changed.emit(event.detail)\n }}\n ref={price => this.priceRange = price}\n filtersData={this.filtersData}\n option={this.option} />\n }\n </div>\n {this.withLoadMore &&\n <a class=\"s-filters-widget-more\"\n onClick={() => this.showMore()}>{!this.isShowMore ? this.showMoreLabel : this.showLessLabel}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,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,yBAAyB,EAAC,GAAG,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC,YAAY,GAAG,EAAE,EAAA,EACtE,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,EAEN,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,iBAAiB,CAAC;oBACnC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM;oBACnC,CAAmB,CAAA,mBAAA,EAAA,EAAA,SAAS,EAAE,CAAC,KAAK,KAAI;0BACxC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;MACjC,iBAAC,EACC,GAAG,EAAE,KAAK,IAAI,IAAI,CAAC,UAAU,GAAG,KAAK,EACrC,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,MAAM,EAAE,IAAI,CAAC,MAAM,EAAA,CAAI,CAEzB,EACL,IAAI,CAAC,YAAY;MAChB,YAAA,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,uBAAuB,EAC9B,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAA,EAAG,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAK,CAEhG,CACD;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"salla-product-options.entry.esm.js","sources":["src/components/salla-product-options/interfaces.ts","src/components/salla-product-options/salla-product-options.scss?tag=salla-product-options","src/components/salla-product-options/salla-product-options.tsx"],"sourcesContent":["export enum DisplayType {\n COLOR = \"color\",\n DATE = \"date\",\n DATETIME = \"datetime\",\n DONATION = \"donation\",\n IMAGE = \"image\",\n MULTIPLE_OPTIONS = \"multiple-options\",\n NUMBER = \"number\",\n SINGLE_OPTION = \"single-option\",\n DIGITAL_CARD_VALUE = \"digital-code-value\",\n COUNTRY = \"country\",\n SPLITTER = \"splitter\",\n TEXT = \"text\",\n TEXTAREA = \"textarea\",\n THUMBNAIL = \"thumbnail\",\n TIME = \"time\",\n RADIO = \"radio\",\n CHECKBOX = \"checkbox\",\n MAP = \"map\",\n FILE = \"file\", // similar to image type (file-uploader component)\n COLOR_PICKER = \"color_picker\",\n BOOKING = \"booking\"\n}\n\nexport interface ProductDetail {\n id: string;\n sku: string;\n name: string;\n description: string;\n url: string;\n promotion_title: string;\n subtitle: string;\n type: string;\n status: string;\n price: number;\n sale_price: number;\n regular_price: number;\n starting_price: null;\n quantity: number;\n max_quantity: number;\n discount_ends: number;\n is_taxable: boolean;\n has_read_more: boolean;\n can_add_note: boolean;\n can_show_remained_quantity: boolean;\n can_upload_file: boolean;\n has_custom_form: boolean;\n is_on_sale: boolean;\n is_hidden_quantity: boolean;\n is_available: boolean;\n is_out_of_stock: boolean;\n weight: null;\n calories: null;\n image: SimpleImage;\n brand: Brand;\n donation?: ProductDonation;\n images: Image[];\n tags: Tag[];\n notify_availability: null;\n rating: Rating;\n options: Option[];\n sold_quantity: number;\n category: Category;\n}\n\nexport interface SimpleImage {\n url: string;\n alt: string;\n}\n\nexport interface Category {\n name: string;\n url: string;\n icon: string;\n}\n\nexport interface ProductDonation {\n target_message?: string;\n collected_amount?: number;\n target_amount?: number;\n target_percent?: number;\n target_end_date?: string;\n can_donate: boolean;\n custom_amount_enabled: boolean;\n}\n\nexport interface Image {\n id: number;\n url: string;\n main: boolean;\n three_d_image_url: string;\n alt: string;\n video_url: string;\n type: string;\n sort: number;\n}\n\nexport interface Option {\n id: number;\n name: string;\n required: boolean;\n type: string;\n placeholder: string;\n option_type: string;\n not_same_day_order: boolean;\n availability_range: number;\n from_date_time: null;\n to_date_time: null;\n visibility_condition?: { option: number, operator: \"=\" | \"!=\", value: number };\n details?: Detail[];\n condition_attributes: string;\n value?: any;\n length?: number;\n donation?: Donation\n}\n\nexport interface Donation {\n custom_amount_enabled: boolean;\n target_message?: string;\n target_date: string | \"2023-04-18\";\n target_end_date: string | \"2023-04-18\";\n target_amount: number;\n collected_amount: number;\n can_donate: boolean;\n}\n\nexport interface Detail {\n id: number;\n option_id: number;\n name: string;\n additional_price: number;\n option_value: null | string;\n image: null | string;\n color: null | string;\n is_out: boolean;\n skus_availability?: { [sku_id: number]: boolean };\n is_selected: boolean;\n is_default?: 0 | 1;\n code?: string;\n type?: string;\n\n}\n\nexport interface Brand {\n id: string;\n url: string;\n name: string;\n logo: string;\n}\n\nexport interface PreTaxPrice {\n amount: number;\n currency: Currency;\n}\n\nexport enum Currency {\n Sar = \"SAR\",\n}\n\nexport interface Promotion {\n title: string;\n sub_title: string;\n}\n\nexport interface Rating {\n count: number;\n stars: number;\n}\n\nexport interface Tag {\n name: string;\n url: string;\n}\n\nexport interface OptionConfig {\n singleOption?: OptionDisplayType;\n multipleOption?: OptionDisplayType;\n}\n\nexport interface OptionDisplayType {\n type: 'button' | 'default'; // defaults to 'default', which is select and checkbox for single and multiple options respectivly\n}\n","\n.s-product-options{\n &-wrapper{\n\n }\n &-option-container{\n\n }\n &-option{\n\n }\n &-option-label{\n\n }\n &-option-content{\n\n }\n &-colors-wrapper{\n\n }\n &-date-element{\n\n }\n &-time-element{\n \n }\n &-datetime-element{\n\n }\n &-image-input{\n\n }\n &-multiple-options-wrapper{\n\n }\n &-splitter{\n\n }\n &-text{\n\n }\n &-textarea{\n\n }\n &-thumbnails-wrapper{\n\n }\n}\n","import { Component, Prop, h, State, Element, Host, Event, type EventEmitter, Method } from '@stencil/core';\nimport { type Option, DisplayType, type Detail, OptionConfig } from './interfaces';\nimport CheckCircleIcon from '../../assets/svg/check.svg';\nimport CameraIcon from '../../assets/svg/camera.svg';\nimport FileIcon from '../../assets/svg/file-upload.svg';\n\n@Component({\n tag: 'salla-product-options',\n styleUrl: 'salla-product-options.scss',\n})\nexport class SallaProductOptions {\n\n constructor() {\n this.canDisabled = !salla.config.get('store.settings.product.notify_options_availability') || salla.url.is_page('cart');\n salla.lang.onLoaded(() => {\n this.outOfStockText = salla.lang.get(\"pages.products.out_of_stock\");\n this.donationAmount = salla.lang.get('pages.products.donation_amount');\n this.selectDonationAmount = salla.lang.getWithDefault('pages.products.select_donation_amount', 'تحديد مبلغ التبرع');\n this.selectAmount = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ');\n });\n\n if (this.options) {\n try {\n this.setOptionsData(Array.isArray(this.options) ? this.options : JSON.parse(this.options));\n return;\n } catch (e) {\n salla.log('Bad json passed via options prop');\n }\n }\n if (!Array.isArray(this.optionsData)) {\n salla.log('Options is not an array[] ---> ', this.optionsData);\n this.setOptionsData([]);\n }\n\n if (this.productId && !salla.url.is_page('cart')) {\n salla.api.product.getDetails(this.productId, ['options']).then(resp => this.setOptionsData(resp.data.options));\n }\n }\n /**\n * Sets the options data for the product\n * @param optionsData - Array of product options\n */\n @Method()\n async setOptionsData(optionsData: Option[]) {\n this.optionsData = optionsData;\n const that = this\n this.optionsData[0]?.details?.forEach(function (detail) {\n Object.entries(detail.skus_availability || {})\n .filter(sku => !sku[1])\n .map(sku => that.outSkus.push(Number(sku[0])));\n });\n }\n\n @Element() host: HTMLElement;\n\n private fileTypes: Record<string, string> = {\n pdf: 'application/pdf',\n png: 'image/png',\n jpg: 'image/jpeg',\n word: 'application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n exl: 'application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n txt: 'text/plain',\n };\n\n @State() optionsData: Option[]\n @State() outOfStockText = \"\"\n @State() donationAmount: string = salla.lang.get('pages.products.donation_amount')\n @State() selectDonationAmount: string = salla.lang.getWithDefault('pages.products.select_donation_amount', 'تحديد مبلغ التبرع')\n @State() selectAmount: string = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ')\n @State() isCustomDonation = false;\n @State() selectedOptions = [];\n @State() canDisabled: boolean;\n @State() selectedSkus?: Array<string | number>;\n @State() selectedOutSkus?: Array<string | number>;\n @State() disableCardValue = true\n @State() availableDigitalCardValues: Detail[] = []\n\n private outSkus: Array<string | number> = [];\n private donationInput?: HTMLInputElement;\n private optionConfig: OptionConfig;\n /**\n * Avoid selection of previous default or selected card value option \n * when switching between digital card country options for the 1st time\n */\n private ignoreDefaultCardValue = false\n /**\n * The id of the product to which the options are going to be fetched for.\n */\n @Prop() productId: number = salla.config.get('page.id');\n\n /**\n * Product detail information.\n */\n @Prop() options: string\n\n /**\n * Hide the out of stock label.\n * Will be used in the case of live validation such as cart page and inline checkout\n */\n @Prop() hideOutLabel: string\n\n /**\n * A unique key used to generate distinct identifiers.\n * \n * This key is appended to a default value to ensure uniqueness\n * across instances or components where differentiation is required.\n */\n @Prop() uniqueKey: string\n\n /**\n * Configuration for customizing the display layout of product options.\n * The `config` prop accepts a JSON string that specifies the layout type for rendering options.\n * It allows customization of how single-option and multiple-option selections are displayed.\n * \n * Example Usage:\n * ```html\n * <salla-product-options \n * options=\"{{ product.options }}\" \n * product-id=\"{{ product.id }}\" \n * unique-key=\"abc123\"\n * config='{\n * \"single-option\": { \"type\": \"button\" },\n * \"multiple-option\": { \"type\": \"button\" }\n * }'>\n * </salla-product-options>\n * ```\n * \n * Example Config JSON:\n * ```json\n * {\n * \"single-option\": { \"type\": \"button\" },\n * \"multiple-option\": { \"type\": \"default\" }\n * }\n * ```\n * \n * - `single-option`:\n * - Defines the display style for single-option selections.\n * - `type`: Supported values:\n * - `\"button\"`: Displays options in a button-style grid layout.\n * - `\"default\"`: Displays options as a dropdown (default).\n * \n * - `multiple-option`:\n * - Defines the display style for multiple-option selections.\n * - `type`: Supported values:\n * - `\"button\"`: Displays options in a button-style grid layout.\n * - `\"default\"`: Displays options as a list of checkboxes (default).\n */\n @Prop() config: string;\n\n /**\n * Get the id's of the selected options.\n * */\n @Method()\n async getSelectedOptionsData() {\n const selectedOptions = {}\n const formData = (this.host as HTMLElement & { getElementSallaData: () => FormData }).getElementSallaData();\n formData.forEach((value, key) => {\n if (key.startsWith('options[')) { (selectedOptions[key.replace('options[', '').replace(']', '')] = value) }\n });\n return selectedOptions;\n }\n\n /**\n * Report options form validity.\n * */\n @Method()\n async reportValidity() {\n const requiredElements = this.host.querySelectorAll('[required]') as unknown as Array<HTMLInputElement>;\n let pass = true;\n for (let i = 0; i < requiredElements.length; i++) {\n //if there is only one invalid option, return false\n if ('reportValidity' in requiredElements[i] && !requiredElements[i].reportValidity()) {\n pass = false;\n }\n }\n return pass;\n }\n\n /**\n * Return true if there is any out of stock options are selected and vise versa.\n * */\n @Method()\n async hasOutOfStockOption() {\n return this.selectedOptions.some(option => option.is_out) || (this.selectedSkus?.length && this.selectedSkus?.every(sku => this.outSkus.includes(sku)));\n }\n\n /**\n * Get selected options.\n * */\n @Method()\n async getSelectedOptions() {\n return this.selectedOptions;\n }\n\n /**\n * Get a specific option by its id.\n * */\n @Method()\n async getOption(option_id) {\n return this.optionsData.find(option => option.id === option_id);\n }\n\n /**\n * An event that emitted when any option is changed.\n */\n @Event() changed: EventEmitter;\n\n // @ts-ignore\n private invalidHandler(event: Event, option: Option) {\n const closestProductOption = (event.target as HTMLInputElement).closest('.s-product-options-option') as HTMLElement;\n\n if (!closestProductOption.classList.contains('s-product-options-option-error')) {\n closestProductOption.classList.add('s-product-options-option-error');\n }\n\n if (!salla.url.is_page('cart')) {\n const firstInvalidElement = this.host.querySelector('.s-product-options-option-error');\n if (firstInvalidElement === closestProductOption) {\n this.scrollToElement(closestProductOption);\n }\n }\n }\n\n private scrollToElement(element: HTMLElement) {\n if (element) {\n element.scrollIntoView({ behavior: 'smooth', block: 'center' });\n }\n }\n\n private changedHandler(event, option, fireChangeEvent = true) {\n const data = {\n event: event,\n option: option,\n detail: null,\n productId: this.productId\n };\n\n if (option.details) {\n const detail = option.details.find((detail) => {\n return Number(detail.id) === Number(event.target.value);\n });\n data.detail = detail;\n }\n\n if (option.type === 'country') {\n this.handleCountryOptionChange(event, data.detail);\n }\n\n const optionElement = event.target.closest('.s-product-options-option');\n if (event.target.value ||\n ((option.type === DisplayType.FILE || option.type === DisplayType.IMAGE) && event.type === 'added') ||\n (option.type === DisplayType.MAP && event.type === 'selected' && (event.target.lat && event.target.lng))) {\n setTimeout(() => {\n optionElement.classList.remove('s-product-options-option-error');\n }, 200);\n }\n\n if (option.type === DisplayType.DONATION) {\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: event.target.value\n });\n }\n\n this.setSelectedSkus();\n this.handleRequiredMultipleOptions(option);\n\n const index = this.selectedOptions.findIndex(opt => opt.option_id === data.option.id);\n\n if (data.option.type === DisplayType.MULTIPLE_OPTIONS) {\n // Handle multiple selections\n const detailIndex = this.selectedOptions.findIndex(\n opt => opt.option_id === data.option.id && opt?.id === data.detail?.id\n );\n if (detailIndex > -1) {\n // If the option is already selected, remove it (unselect)\n this.selectedOptions.splice(detailIndex, 1);\n } else {\n // If the option is not selected, add it to the selectedOptions array\n this.selectedOptions.push({ ...data.detail, option_id: data.option.id });\n }\n } else {\n // Handle single selection\n if (!data.detail || Object.keys(data.detail).length === 0) {\n // If there is no value for the single-select, remove it from the selectedOptions array\n if (index > -1) {\n this.selectedOptions.splice(index, 1);\n }\n } else {\n // If a value exists, update or add the selection\n if (index > -1) {\n // Replace the existing selection with the new one\n this.selectedOptions[index] = { ...data.detail, option_id: data.option.id };\n } else {\n // If no selection exists for this input, add the new selection\n this.selectedOptions.push({ ...data.detail, option_id: data.option.id });\n }\n }\n }\n\n \n // Update optionsData directly\n this.optionsData = this.optionsData.map(opt => {\n if (opt.id === data.option.id) {\n return {\n ...opt,\n details: opt.details.map(detail => ({\n ...detail,\n is_selected: data.option.type === DisplayType.MULTIPLE_OPTIONS\n ? this.selectedOptions.some(selected => selected.id === detail.id)\n : Number(detail.id) === Number(data.detail?.id),\n value: data.detail?.value\n }))\n };\n }\n return opt;\n });\n // Emit the event only if fireChangeEvent is true\n if (fireChangeEvent) {\n this.changed.emit(data);\n salla.event.emit('product-options::change', data);\n }\n }\n\n\n private handleDonationOptions = (event, detail, type) => {\n if (detail === 'custom' && type === 'input') {\n salla.helpers.inputDigitsOnly(event.target)\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: event.target.value\n });\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n this.isCustomDonation = event.target.value === 'custom';\n if (this.donationInput) {\n if (event.target.value === 'custom') {\n this.donationInput.value = '';\n this.donationInput.focus()\n } else {\n this.donationInput.value = event.target.value;\n }\n if (detail === 'custom') {\n return\n }\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: event.target.value\n });\n }\n }\n\n private hideLabel = (option) => {\n if (option.type === DisplayType.DONATION && (option.donation && !option.donation.can_donate)) {\n return true;\n }\n return false;\n }\n\n private getExpireDonationMessage = (option) => {\n if (!option.donation) {\n return;\n }\n const completed = option.donation.target_amount <= option.donation.collected_amount;\n return <div class={{ \"s-product-options-donation-message\": true, \"s-product-options-donation-completed\": completed, \"s-product-options-donation-expired\": !completed }}>\n <p>{option.donation.target_message}</p>\n <span innerHTML={completed ? salla.money(option.donation.target_amount) : ''}></span>\n </div>\n }\n /**\n * loop throw all selected details, then get common sku, if it's only one, means we selected all of them;\n */\n private setSelectedSkus() {\n this.selectedSkus = this.selectedOptions.map(detail => Object.keys(detail.skus_availability || {}))\n .reduce((p, c) => p.filter(e => c.includes(e)), []) // Initialize accumulator as an empty array\n .map(sku => Number(sku));\n }\n \n\n private handleRequiredMultipleOptions(option) {\n if (option.type !== DisplayType.MULTIPLE_OPTIONS || !option.required) {\n return;\n }\n const optionContainer = this.host.querySelector(`[data-option-id=\"${option.id}\"]`);\n const hasChecked = optionContainer.querySelectorAll('input:checked').length;\n optionContainer.querySelectorAll('input').forEach(input => input.toggleAttribute('required', !hasChecked));\n }\n\n private getLatLng(value, type: 'lat' | 'lng') {\n return value\n ? value.split(',')[type === 'lat' ? 0 : 1]\n : '';\n }\n\n private getDisplayForType(option: Option) {\n if (this[`${option.type}Option`]) {\n return this[`${option.type}Option`](option);\n }\n\n if (option.type === DisplayType.COLOR_PICKER) {\n return this.colorPickerOption(option)\n }\n\n if (option.type === DisplayType.MULTIPLE_OPTIONS) {\n return this.multipleOptions(option);\n }\n\n if (option.type === DisplayType.SINGLE_OPTION) {\n return this.singleOption(option);\n }\n\n if (option.type === DisplayType.DIGITAL_CARD_VALUE) {\n return this.digitalCardValuesOption(option);\n }\n if (option.type === DisplayType.COUNTRY) {\n return this.countryOption(option);\n }\n\n if (option.type === DisplayType.BOOKING && salla.url.is_page(\"cart\")) {\n return <salla-booking-field onInvalidInput={(e) => this.invalidHandler(e, option)} option={option as any} productId={option.value}></salla-booking-field>\n }\n\n salla.log(`Couldn't find options type(${option.type})😢`);\n return '';\n }\n\n protected getOptionShownWhen(option: Option) {\n return option.visibility_condition\n ? { \"data-show-when\": `options[${option.visibility_condition.option}] ${option.visibility_condition.operator} ${option.visibility_condition.value}` }\n : {};\n }\n\n private getAvailableDigitalCardSKUs(detail: Detail) {\n const digitalCardOption = this.optionsData.find(({ type }) => type === 'digital-code-value')\n\n if (!digitalCardOption) throw new Error('product-options:: No digital card options found')\n\n const outofStockSKUs = Object.keys(detail.skus_availability).filter(key => detail.skus_availability[key] === false)\n\n this.availableDigitalCardValues = digitalCardOption.details.filter((op) => {\n\n return !Object.keys(op.skus_availability).filter(SKU_key => outofStockSKUs.includes(SKU_key)).length\n\n })\n\n }\n private handleCountryOptionChange(event: Event, detail: Detail) {\n event.stopImmediatePropagation()\n\n this.ignoreDefaultCardValue = true\n\n const currentCardValue = this.host.querySelector(\"input[data-code-value]:checked\") as HTMLInputElement | null\n\n if (currentCardValue) currentCardValue.checked = false\n\n const digitalCardOption = this.optionsData.find(({ type }) => type === 'digital-code-value')\n\n if (!digitalCardOption) throw new Error('product-options:: No digital card options found')\n\n this.getAvailableDigitalCardSKUs(detail)\n }\n\n private getSelectedDigitalCardOptions(option: Option) {\n const selectedOption = option.details.find(detail => detail.is_selected)\n const defaultOption = option.details.find(detail => !!detail.is_default) || option.details[0] /*option.details[0] only applys for counrty options*/\n if (!['digital-code-value', 'country'].includes(option.type)) return\n\n return selectedOption || defaultOption\n\n\n }\n\n //we need the cart Id for productOption Image\n componentWillLoad() {\n if(salla.url.is_page(\"cart\")){\n this.disableCardValue=false\n this.fillSelectedOptions();\n }\n\n if (this.config) {\n try {\n this.optionConfig = typeof this.config === 'string' ? JSON.parse(this.config) : this.config;\n } catch (error) {\n console.error('Failed to parse JSON in config prop:', error);\n }\n }\n\n const shouldSelectDefaultOption = this.optionsData.filter(({ type }) => [\"country\", \"digital-card-value\"].includes(type)).length > 0 && salla.url.is_page('cart')\n\n if (shouldSelectDefaultOption) {\n const countryOption = this.optionsData.find(option => option.type === 'country')\n\n const defaultSelection = countryOption && this.getSelectedDigitalCardOptions(countryOption)\n\n if (defaultSelection) {\n this.getAvailableDigitalCardSKUs(defaultSelection)\n }\n }\n this.outOfStockText = salla.lang.get('pages.products.out_of_stock')\n return salla.onReady(() => {\n const needsCartId = (!salla.storage.get('cart.id') && this.optionsData.some(option => ['file', 'image'].includes(option.type)));\n return needsCartId ? salla.api.cart.getCurrentCartId(false, \"salla-product-options\") : null;\n })\n }\n\n private hideDigitalCardsOptions(option:Option){\n return (this.disableCardValue && option.type===DisplayType.DIGITAL_CARD_VALUE && !salla.url.is_page(\"cart\"))\n }\n\n render() {\n if (this.optionsData?.length === 0) {\n return;\n }\n\n return (\n <Host class=\"s-product-options-wrapper\">\n {/* TODO:: move salla-conditional-field logic to here, no need of another component*/}\n <salla-conditional-fields>\n {this.optionsData.map((option: Option) =>\n <div key={option.id} class={`s-product-options-option-container${option.visibility_condition || this.hideDigitalCardsOptions(option) ? ' hidden' : ''}`}\n data-option-id={option.id}\n {...this.getOptionShownWhen(option)}>\n {option.name === 'splitter' ?\n this.splitterOption()\n : <div class={{ \"s-product-options-option\": true, \"s-product-options-option-booking\": option.type === DisplayType.BOOKING && salla.url.is_page(\"cart\") }} data-option-type={option.type}\n data-option-required={`${option.required}`}>\n <label htmlFor={`options[${option.id}]`} class={`s-product-options-option-label ${this.hideLabel(option) ? 's-product-options-option-label-hidden' : ''}`}>\n <b>\n {option.name}\n {option.required && <span> * </span>} </b>\n <small>{option.placeholder}</small>\n </label>\n <div class={`s-product-options-option-content ${this.hideLabel(option) || (option.type === DisplayType.BOOKING && salla.url.is_page(\"cart\")) ? 's-product-options-option-content-full-width' : ''}`}>\n {this.getDisplayForType(option)}\n </div>\n </div>}\n </div>\n )}\n </salla-conditional-fields>\n </Host>\n );\n\n }\n\n private generateUniqueKey(defaultValue: string): string {\n return this.uniqueKey ? `${defaultValue}-${this.uniqueKey}` : defaultValue;\n }\n private fillSelectedOptions() {\n this.selectedOptions = this.optionsData.reduce((acc, opt) => {\n const selectedDetails = opt.details.filter(detail => detail.is_selected);\n const mappedDetails = selectedDetails.map(detail => ({\n ...detail,\n option_id: opt.id\n }));\n return acc.concat(mappedDetails);\n }, []);\n }\n\n componentDidLoad() {\n if (this.optionsData?.length === 0 && !this.optionsData.some(option => option.type === DisplayType.DONATION)) {\n return;\n }\n const selectedDonationOption = this.optionsData.find(option => option.type === DisplayType.DONATION)?.details.find(detail => detail.is_selected);\n if (!selectedDonationOption) {\n return;\n }\n setTimeout(() => {\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: selectedDonationOption.additional_price\n });\n }, 1000);\n }\n //@ts-ignore\n private donationOption(option: Option, product: Product) {\n return <div class=\"s-product-options-donation-wrapper\">\n\n {option.donation?.can_donate ? [\n option.donation ?\n <div key={option.id} class=\"s-product-options-donation-progress\">\n <salla-progress-bar donation={option.donation}>\n </salla-progress-bar>\n </div>\n : '',\n option.details.length ?\n [<h4 key={option.id}>{this.selectAmount}</h4>,\n <div key={option.id} class=\"s-product-options-donation-options\">\n {option.details.map((detail, i) =>\n <div key={option.id} class=\"s-product-options-donation-options-item\">\n <input id={this.generateUniqueKey(`donation-option-${i}`)} type=\"radio\" name=\"donating_option\" checked={detail.is_selected} value={detail.additional_price} onChange={e => this.handleDonationOptions(e, detail, 'option')} />\n <label htmlFor={this.generateUniqueKey(`donation-option-${i}`)}>\n <span innerHTML={salla.money(detail.name)}></span>\n </label>\n </div>\n )}\n {option.donation?.custom_amount_enabled ?\n <div class=\"s-product-options-donation-options-item\">\n <input id={this.generateUniqueKey(\"donation-option-custom\")} type=\"radio\" name=\"donating_option\" value=\"custom\" onChange={e => this.handleDonationOptions(e, 'custom', 'option')} />\n <label htmlFor={this.generateUniqueKey(\"donation-option-custom\")}>\n <span> {this.selectDonationAmount} </span>\n </label>\n </div>\n : ''\n }\n </div>] : '',\n\n <div key={option.id} class={{ \"s-product-options-donation-input-group\": true, \"shown\": !option.details.length || (option.details.length && this.isCustomDonation) }}>\n <input\n type=\"text\"\n id=\"donating-amount\"\n name=\"donation_amount\"\n class=\"s-form-control\"\n ref={el => { this.donationInput = el as HTMLInputElement }}\n value={\n option.details.length\n && option.details.some(detail => detail.is_selected)\n ? option.details.find(detail => detail.is_selected).additional_price\n : option.value}\n // required\n placeholder={option.placeholder}\n onInput={e => this.handleDonationOptions(e, 'custom', 'input')}\n onBlur={e => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n />\n {/* value={option.value} */}\n <span class=\"s-product-options-donation-amount-currency\">\n {salla.config.currency(salla.config.get('user.currency_code')).symbol}\n </span>\n </div>\n ] :\n this.getExpireDonationMessage(option)\n }\n </div>\n }\n\n private fileUploader(option: Option, additions: Record<string, unknown> | null = null) {\n return <salla-file-upload\n {...(additions || {})}\n payload-name=\"file\"\n value={option.value}\n instant-upload={true}\n name={`options[${option.id}]`}\n required={!option.visibility_condition && option.required}\n height=\"120px\"\n onAdded={(e) => this.changedHandler(e, option)}\n url={salla.cart.api.getUploadImageEndpoint()}\n form-data={{ cart_item_id: this.productId, product_id: this.productId }}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n class={{ \"s-product-options-image-input\": true, required: option.required }}\n >\n <div class=\"s-product-options-filepond-placeholder\">\n <span class=\"s-product-options-filepond-placeholder-icon\"\n innerHTML={(additions as { accept: string }).accept?.split(',').every(type => type.includes('image'))\n ? CameraIcon\n : FileIcon}\n />\n <p class=\"s-product-options-filepond-placeholder-text\">{salla.lang.get('common.uploader.drag_and_drop')}</p>\n <span class=\"filepond--label-action\">{salla.lang.get('common.uploader.browse')}</span>\n </div>\n </salla-file-upload>\n }\n\n //@ts-ignore\n private imageOption(option: Option) {\n return this.fileUploader(option, { accept: 'image/png,image/jpeg,image/jpg,image/gif' });\n }\n\n //@ts-ignore\n private fileOption(option: Option) {\n const types = option.details.map(detail => this.fileTypes[detail.name]).filter(Boolean);\n return types?.length\n ? this.fileUploader(option, { accept: types.join(',') })\n : 'File types not selected.';\n }\n\n // TODO: (ONLY FOR TESTING!) find a better way to make it testable, e.g. wrap it with a unique class like textOption\n //@ts-ignore\n private numberOption(option: Option) {\n return <input\n type=\"text\"\n value={option.value}\n class=\"s-form-control\"\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onBlur={e => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onInput={e => salla.helpers.inputDigitsOnly(e.target)} />\n }\n\n //@ts-ignore\n private splitterOption() {\n return <div class=\"s-product-options-splitter\" />\n }\n\n //@ts-ignore\n private textOption(option: Option) {\n return <div class=\"s-product-options-text\">\n <input\n type=\"text\"\n value={option.value}\n maxLength={option?.length}\n class='s-form-control'\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={e => this.changedHandler(e, option)} />\n </div>\n }\n\n //@ts-ignore\n private textareaOption(option: Option) {\n //todo::remove mt-1 class, and if it's okay to remove the tag itself will be great\n return <div class=\"s-product-options-textarea\">\n <div class=\"mt-1\">\n <textarea\n rows={4}\n value={option.value}\n maxLength={option?.length}\n class=\"s-form-control\"\n required={!option.visibility_condition && option.required}\n id={`options[${option.id}]`}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)} />\n </div>\n </div>\n }\n\n //@ts-ignore\n private mapOption(option: Option) {\n return <salla-map\n zoom={15}\n lat={this.getLatLng(option.value, 'lat')}\n lng={this.getLatLng(option.value, 'lng')}\n name={`options[${option.id}]`}\n searchable={true}\n required={option.required}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onSelected={e => this.changedHandler(e, option)} />\n }\n\n private colorPickerOption(option: Option) {\n return <salla-color-picker\n onSubmitted={e => this.changedHandler(e, option)}\n name={`options[${option.id}]`}\n required={!option.visibility_condition && option.required}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n color={option.value} />\n }\n\n /**\n * ============= Date Time options =============\n */\n //@ts-ignore\n private timeOption(option: Option) {\n return <salla-datetime-picker\n noCalendar={true}\n enableTime={true}\n dateFormat=\"h:i K\"\n value={option.value}\n placeholder={option.name}\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n class=\"s-product-options-time-element\"\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n }\n\n //@ts-ignore\n private dateOption(option: Option) {\n //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23\n return <div class=\"s-product-options-date-element\">\n <salla-datetime-picker\n value={option.value}\n placeholder={option.name}\n required={!option.visibility_condition && option.required}\n minDate={new Date()}\n name={`options[${option.id}]`}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n </div>\n }\n\n //@ts-ignore\n private datetimeOption(option: Option) {\n //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23\n return <div class=\"s-product-options-datetime-element\">\n <salla-datetime-picker\n enableTime={true}\n value={option.value}\n dateFormat=\"Y-m-d G:i:K\"\n placeholder={option.name}\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n maxDate={option.to_date_time}\n minDate={option.from_date_time}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n </div>\n }\n\n /**\n * ============= Advanced options =============\n */\n protected getOptionDetailName(detail: Detail, outOfStock = true, optionType?: string) {\n let detailName;\n if (optionType && optionType === DisplayType.COLOR) {\n detailName = detail.name\n + ((outOfStock && this.isOptionDetailOut(detail) && !salla.url.is_page(\"cart\")) && !this.hideOutLabel ? ` <br/> <p> ${this.outOfStockText} </p>` : '')\n + (detail.additional_price ? ` <p> (${salla.money(detail.additional_price, false)}) </p>` : '');\n }\n\n if(!detailName){\n detailName = detail.name\n + ((outOfStock && this.isOptionDetailOut(detail) && !salla.url.is_page(\"cart\")) && !this.hideOutLabel ? ` - ${this.outOfStockText}` : '')\n + (detail.additional_price ? ` (${salla.money(detail.additional_price, false)})` : '');\n }\n\n //Some merchants adding price to the names of the options,\n //and because we are using this inside select option, we need to replace the html currency symbol with the store currency symbol\n return detailName.replace('<i class=sicon-sar></i>',salla.config.currency()?.symbol || 'ر.س');\n }\n\n\n protected isOptionDetailOut(detail: Detail) {\n if (detail.is_out || !detail.skus_availability || !this.selectedSkus?.length) {\n return detail.is_out;\n }\n\n const isDetailSelected = this.selectedOptions.filter(option => option.id === detail.id).length;\n //if the current options is the only selected option, so we are sure that it's not out, because there is no other options selected yet\n if (isDetailSelected && this.selectedOptions.length === 1) {\n return false;\n }\n\n //if current details has sku in the possible outSkus it's out for sure\n if (isDetailSelected) {\n //here we will get the possible outSkus for current selected options\n const outSelectableSkus = this.selectedSkus.filter(sku => this.outSkus.includes(sku));\n return Object.keys(detail.skus_availability).some(sku => outSelectableSkus.includes(Number(sku)))\n }\n\n return this.selectedOptions.some(option => option.is_out && option.option_id !== detail.option_id)\n\n }\n\n /**\n * Renders a single input element (radio or checkbox) for an option detail.\n * @param type - The type of input element ('radio' or 'checkbox').\n * @param detail - The detail object representing an option detail.\n * @param option - The parent option object containing the details.\n * @param isRequired - Indicates if the input is required based on the option's rules.\n * @param name - The name attribute for the input element.\n * @returns HTMLElement - A labeled input element.\n */\n private renderInput(\n type: 'radio' | 'checkbox',\n detail: Detail,\n option: Option,\n isRequired: boolean,\n name: string,\n buttonStyle: boolean,\n ): HTMLElement {\n const id = this.generateUniqueKey(`${type}-${option.id}-${detail.id}`);\n const isDisabled = this.isOptionDetailOut(detail);\n return (\n <label class={{\n \"s-product-options-disabled\": isDisabled,\n }}>\n <input\n id={id}\n type={type}\n name={name}\n value={detail.id}\n disabled={isDisabled}\n required={isRequired}\n checked={detail.is_selected}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)}\n />\n <div class={{\"s-product-options-grid-mode-span\": buttonStyle, \"s-product-options-disabled\": isDisabled}}>\n {this.getOptionDetailName(detail)}\n </div>\n </label>\n );\n }\n\n /**\n * Renders a collection of input elements for all details of an option.\n * @param type - The type of input elements ('radio' or 'checkbox').\n * @param option - The parent option object containing the details.\n * @param isRequired - Indicates if the inputs are required based on the option's rules.\n * @returns HTMLElement[] - An array of labeled input elements.\n */\n private renderOptionDetails(\n type: 'radio' | 'checkbox',\n option: Option,\n isRequired: boolean,\n buttonStyle: boolean = false\n ): HTMLElement[] {\n const name = type === 'radio' ? `options[${option.id}]` : `options[${option.id}][]`;\n return option?.details.map((detail: Detail) =>\n this.renderInput(type, detail, option, isRequired, name, buttonStyle)\n );\n }\n\n /**\n * Renders a dropdown (select) element for a single-option selection.\n * @param option - The parent option object.\n * @returns HTMLElement - A select dropdown element with all option details.\n */\n private renderSelect(option: Option): HTMLElement {\n return (\n <div>\n <select\n name={`options[${option.id}]`}\n required={!option.visibility_condition && option.required}\n class=\"s-form-control\"\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)}\n >\n <option value=\"\">{option.placeholder}</option>\n {option?.details.map((detail: Detail) => (\n <option\n key={detail.id}\n value={detail.id}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n selected={detail.is_selected}\n >\n {this.getOptionDetailName(detail)}\n </option>\n ))}\n </select>\n </div>\n );\n }\n\n /**\n * Renders a grid-based layout for option inputs (radio or checkbox).\n * @param type - The type of input elements ('radio' or 'checkbox').\n * @param option - The parent option object containing the details.\n * @param isRequired - Indicates if the inputs are required based on the option's rules.\n * @returns HTMLElement - A grid-based container with input elements.\n */\n private renderButtonStyle(\n type: 'radio' | 'checkbox',\n option: Option,\n isRequired: boolean\n ): HTMLElement {\n return (\n <div class=\"s-product-options-grid-mode\">\n {this.renderOptionDetails(type, option, isRequired, true)}\n </div>\n );\n }\n\n /**\n * Renders a single-option selection, either as a grid or dropdown, based on configuration.\n * @param option - The parent option object.\n * @returns HTMLElement - The rendered single-option element.\n */\n private singleOption(option: Option): HTMLElement {\n const buttonStyle = this.optionConfig?.['single-option']?.type === 'button';\n const isRequired = !option.visibility_condition && option.required;\n\n return buttonStyle\n ? this.renderButtonStyle('radio', option, isRequired)\n : this.renderSelect(option);\n }\n\n /**\n * Renders a multiple-option selection, either as a grid or list, based on configuration.\n * @param option - The parent option object.\n * @returns HTMLElement - The rendered multiple-option element.\n */\n private multipleOptions(option: Option): HTMLElement {\n const buttonStyle = this.optionConfig?.['multiple-option']?.type === 'button';\n const isRequired =\n option.required &&\n !option.details.some((detail) => detail.is_selected) &&\n !option.visibility_condition;\n\n return buttonStyle\n ? this.renderButtonStyle('checkbox', option, isRequired)\n : (\n <div\n class={{\n 's-product-options-multiple-options-wrapper': true,\n required: option.required,\n }}\n >\n {this.renderOptionDetails('checkbox', option, isRequired)}\n </div>\n );\n }\n \n //@ts-ignore\n private colorOption(option: Option) {\n return (\n <fieldset\n class=\"s-product-options-colors-wrapper\"\n >\n {option?.details.map((detail) => (\n <div\n class=\"s-product-options-colors-item\"\n key={detail.id}\n >\n <input\n type=\"radio\"\n value={detail.id}\n required={!option.visibility_condition && option.required}\n checked={detail.is_selected}\n name={`options[${option.id}]`}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n id={this.generateUniqueKey(`color-${this.productId}-${option.id}-${detail.id}`)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)}\n />\n <label htmlFor={this.generateUniqueKey(`color-${this.productId}-${option.id}-${detail.id}`)}>\n <span style={{ backgroundColor: detail.color }} />\n <div innerHTML={this.getOptionDetailName(detail, true, option.type)} />\n </label>\n </div>\n ))}\n </fieldset>\n );\n } \n\n //@ts-ignore\n private thumbnailOption(option: Option) {\n return <div class=\"s-product-options-thumbnails-wrapper\">\n {option.details.map((detail: Detail) => {\n return <div key={detail.id}>\n <input type=\"radio\"\n value={detail.id}\n data-itemid={detail.id} //todo:: why need this? it's already in the value!\n required={!option.visibility_condition && option.required}\n checked={detail.is_selected}\n name={`options[${option.id}]`}\n data-img-id={detail.option_value}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n id={this.generateUniqueKey(`option_${this.productId}-${option.id}_${detail.id}`)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)} />\n <label htmlFor={this.generateUniqueKey(`option_${this.productId}-${option.id}_${detail.id}`)}\n data-img-id={detail.option_value}\n class=\"go-to-slide\">\n <img data-src={detail.image} src={detail.image} title={detail.name} alt={detail.name} />\n <span innerHTML={CheckCircleIcon} class=\"s-product-options-thumbnails-icon\" />\n {this.isOptionDetailOut(detail) ?\n [\n <small key={detail.id} class=\"s-product-options-thumbnails-stock-badge\">{this.outOfStockText}</small>,\n this.canDisabled ? <div key={detail.id} class=\"s-product-options-thumbnails-badge-overlay\" /> : '',\n ]\n : ''}\n </label>\n <p>{this.getOptionDetailName(detail, false)} </p>\n </div>\n })}\n </div>\n }\n\n // Digital card options\n private digitalCardValuesOption(option: Option) {\n\n return <div class=\"s-product-options-digital-card-wrapper\">\n {this.availableDigitalCardValues.length > 0 ? this.availableDigitalCardValues.map((detail) => {\n const id = String(detail.id)\n return <label htmlFor={this.generateUniqueKey(id.toString())} key={id} class=\"s-product-options-digital-card-option\">\n <input type=\"radio\" data-code-value class=\"s-form-control s-product-options-digital-card-input\" value={detail.id}\n name={`options[${option.id}]`}\n id={this.generateUniqueKey(id.toString())}\n required={!option.visibility_condition && option.required}\n onInvalid={(e) => this.invalidHandler(e, option)}\n {...(!this.ignoreDefaultCardValue ? {defaultChecked: this.getSelectedDigitalCardOptions(option)?.id === detail.id}:{})}\n\n />\n <span>{detail.name} {salla.config?.currency()?.symbol}</span>\n </label>\n })\n : <div class=\"s-product-options-digital-card-out-of-stock\"/>\n }\n </div>\n }\n private countryOption(option: Option) {\n return <div class=\"s-product-options-digital-card-wrapper\">\n {option.details.map((detail) => {\n\n return <label htmlFor={this.generateUniqueKey(detail.id.toString())} key={detail.id} class={{\"s-product-options-digital-card-option\":true,\"s-product-options-digital-card-option-stock-out\":detail.is_out}}>\n <input id={this.generateUniqueKey(detail.id.toString())} type=\"radio\" class=\"s-form-control s-product-options-digital-card-input\" value={detail.id}\n name={`options[${option.id}]`}\n disabled={detail.is_out}\n required={!option.visibility_condition && option.required}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={e => this.changedHandler(e, option)}\n onClick={()=>{ this.disableCardValue = false}}\n {...(salla.url.is_page(\"cart\") ? {defaultChecked:this.getSelectedDigitalCardOptions(option)?.id === detail.id}:{})}\n\n />\n <img loading='lazy' alt={detail.code} height={24} width={24} class=\"s-product-options-country-flag\" src={`https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/${String(detail.code).toLocaleLowerCase()}.svg`}/>\n <span >{detail.name}</span>\n </label>\n })\n }\n </div>\n\n }\n\n}"],"names":["CheckCircleIcon"],"mappings":";;;;;;;AAAA,IAAY,WAsBX;AAtBD,CAAA,UAAY,WAAW,EAAA;AACrB,IAAA,WAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WA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,CAAA,MAAA,IAAI,CAAC,6BAA6B,CAAC,MAAM,CAAC,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,EAAE,MAAK,MAAM,CAAC,EAAE,EAAC,GAAC,EAAE,EAEjH,CAAA,EACG,CAAA,CAAA,KAAA,EAAA,EAAK,OAAO,EAAC,MAAM,EAAC,GAAG,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAC,gCAAgC,EAAC,GAAG,EAAE,CAAmE,gEAAA,EAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAM,IAAA,CAAA,EAAG,CAAA,EACjO,CAAA,CAAA,MAAA,EAAA,IAAA,EAAQ,MAAM,CAAC,IAAI,CAAQ,CACrB;SACb,CAAC,CAEM;;;;;;;;"}
1
+ {"version":3,"file":"salla-product-options.entry.esm.js","sources":["src/components/salla-product-options/interfaces.ts","src/components/salla-product-options/salla-product-options.scss?tag=salla-product-options","src/components/salla-product-options/salla-product-options.tsx"],"sourcesContent":["export enum DisplayType {\n COLOR = \"color\",\n DATE = \"date\",\n DATETIME = \"datetime\",\n DONATION = \"donation\",\n IMAGE = \"image\",\n MULTIPLE_OPTIONS = \"multiple-options\",\n NUMBER = \"number\",\n SINGLE_OPTION = \"single-option\",\n DIGITAL_CARD_VALUE = \"digital-code-value\",\n COUNTRY = \"country\",\n SPLITTER = \"splitter\",\n TEXT = \"text\",\n TEXTAREA = \"textarea\",\n THUMBNAIL = \"thumbnail\",\n TIME = \"time\",\n RADIO = \"radio\",\n CHECKBOX = \"checkbox\",\n MAP = \"map\",\n FILE = \"file\", // similar to image type (file-uploader component)\n COLOR_PICKER = \"color_picker\",\n BOOKING = \"booking\"\n}\n\nexport interface ProductDetail {\n id: string;\n sku: string;\n name: string;\n description: string;\n url: string;\n promotion_title: string;\n subtitle: string;\n type: string;\n status: string;\n price: number;\n sale_price: number;\n regular_price: number;\n starting_price: null;\n quantity: number;\n max_quantity: number;\n discount_ends: number;\n is_taxable: boolean;\n has_read_more: boolean;\n can_add_note: boolean;\n can_show_remained_quantity: boolean;\n can_upload_file: boolean;\n has_custom_form: boolean;\n is_on_sale: boolean;\n is_hidden_quantity: boolean;\n is_available: boolean;\n is_out_of_stock: boolean;\n weight: null;\n calories: null;\n image: SimpleImage;\n brand: Brand;\n donation?: ProductDonation;\n images: Image[];\n tags: Tag[];\n notify_availability: null;\n rating: Rating;\n options: Option[];\n sold_quantity: number;\n category: Category;\n}\n\nexport interface SimpleImage {\n url: string;\n alt: string;\n}\n\nexport interface Category {\n name: string;\n url: string;\n icon: string;\n}\n\nexport interface ProductDonation {\n target_message?: string;\n collected_amount?: number;\n target_amount?: number;\n target_percent?: number;\n target_end_date?: string;\n can_donate: boolean;\n custom_amount_enabled: boolean;\n}\n\nexport interface Image {\n id: number;\n url: string;\n main: boolean;\n three_d_image_url: string;\n alt: string;\n video_url: string;\n type: string;\n sort: number;\n}\n\nexport interface Option {\n id: number;\n name: string;\n required: boolean;\n type: string;\n placeholder: string;\n option_type: string;\n not_same_day_order: boolean;\n availability_range: number;\n from_date_time: null;\n to_date_time: null;\n visibility_condition?: { option: number, operator: \"=\" | \"!=\", value: number };\n details?: Detail[];\n condition_attributes: string;\n value?: any;\n length?: number;\n donation?: Donation\n}\n\nexport interface Donation {\n custom_amount_enabled: boolean;\n target_message?: string;\n target_date: string | \"2023-04-18\";\n target_end_date: string | \"2023-04-18\";\n target_amount: number;\n collected_amount: number;\n can_donate: boolean;\n}\n\nexport interface Detail {\n id: number;\n option_id: number;\n name: string;\n additional_price: number;\n option_value: null | string;\n image: null | string;\n color: null | string;\n is_out: boolean;\n skus_availability?: { [sku_id: number]: boolean };\n is_selected: boolean;\n is_default?: 0 | 1;\n code?: string;\n type?: string;\n\n}\n\nexport interface Brand {\n id: string;\n url: string;\n name: string;\n logo: string;\n}\n\nexport interface PreTaxPrice {\n amount: number;\n currency: Currency;\n}\n\nexport enum Currency {\n Sar = \"SAR\",\n}\n\nexport interface Promotion {\n title: string;\n sub_title: string;\n}\n\nexport interface Rating {\n count: number;\n stars: number;\n}\n\nexport interface Tag {\n name: string;\n url: string;\n}\n\nexport interface OptionConfig {\n singleOption?: OptionDisplayType;\n multipleOption?: OptionDisplayType;\n}\n\nexport interface OptionDisplayType {\n type: 'button' | 'default'; // defaults to 'default', which is select and checkbox for single and multiple options respectivly\n}\n","\n.s-product-options{\n &-wrapper{\n\n }\n &-option-container{\n\n }\n &-option{\n\n }\n &-option-label{\n\n }\n &-option-content{\n\n }\n &-colors-wrapper{\n\n }\n &-date-element{\n\n }\n &-time-element{\n \n }\n &-datetime-element{\n\n }\n &-image-input{\n\n }\n &-multiple-options-wrapper{\n\n }\n &-splitter{\n\n }\n &-text{\n\n }\n &-textarea{\n\n }\n &-thumbnails-wrapper{\n\n }\n}\n","import { Component, Prop, h, State, Element, Host, Event, type EventEmitter, Method } from '@stencil/core';\nimport { type Option, DisplayType, type Detail, OptionConfig } from './interfaces';\nimport CheckCircleIcon from '../../assets/svg/check.svg';\nimport CameraIcon from '../../assets/svg/camera.svg';\nimport FileIcon from '../../assets/svg/file-upload.svg';\n\n@Component({\n tag: 'salla-product-options',\n styleUrl: 'salla-product-options.scss',\n})\nexport class SallaProductOptions {\n\n constructor() {\n this.canDisabled = !salla.config.get('store.settings.product.notify_options_availability') || salla.url.is_page('cart');\n salla.lang.onLoaded(() => {\n this.outOfStockText = salla.lang.get(\"pages.products.out_of_stock\");\n this.donationAmount = salla.lang.get('pages.products.donation_amount');\n this.selectDonationAmount = salla.lang.getWithDefault('pages.products.select_donation_amount', 'تحديد مبلغ التبرع');\n this.selectAmount = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ');\n });\n\n if (this.options) {\n try {\n this.setOptionsData(Array.isArray(this.options) ? this.options : JSON.parse(this.options));\n return;\n } catch (e) {\n salla.log('Bad json passed via options prop');\n }\n }\n if (!Array.isArray(this.optionsData)) {\n salla.log('Options is not an array[] ---> ', this.optionsData);\n this.setOptionsData([]);\n }\n\n if (this.productId && !salla.url.is_page('cart')) {\n salla.api.product.getDetails(this.productId, ['options']).then(resp => this.setOptionsData(resp.data.options));\n }\n }\n /**\n * Sets the options data for the product\n * @param optionsData - Array of product options\n */\n @Method()\n async setOptionsData(optionsData: Option[]) {\n this.optionsData = optionsData;\n const that = this\n this.optionsData[0]?.details?.forEach(function (detail) {\n Object.entries(detail.skus_availability || {})\n .filter(sku => !sku[1])\n .map(sku => that.outSkus.push(Number(sku[0])));\n });\n }\n\n @Element() host: HTMLElement;\n\n private fileTypes: Record<string, string> = {\n pdf: 'application/pdf',\n png: 'image/png',\n jpg: 'image/jpeg',\n word: 'application/doc,application/ms-doc,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n exl: 'application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n txt: 'text/plain',\n };\n\n @State() optionsData: Option[]\n @State() outOfStockText = \"\"\n @State() donationAmount: string = salla.lang.get('pages.products.donation_amount')\n @State() selectDonationAmount: string = salla.lang.getWithDefault('pages.products.select_donation_amount', 'تحديد مبلغ التبرع')\n @State() selectAmount: string = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ')\n @State() isCustomDonation = false;\n @State() selectedOptions = [];\n @State() canDisabled: boolean;\n @State() selectedSkus?: Array<string | number>;\n @State() selectedOutSkus?: Array<string | number>;\n @State() disableCardValue = true\n @State() availableDigitalCardValues: Detail[] = []\n\n private outSkus: Array<string | number> = [];\n private donationInput?: HTMLInputElement;\n private optionConfig: OptionConfig;\n /**\n * Avoid selection of previous default or selected card value option \n * when switching between digital card country options for the 1st time\n */\n private ignoreDefaultCardValue = false\n /**\n * The id of the product to which the options are going to be fetched for.\n */\n @Prop() productId: number = salla.config.get('page.id');\n\n /**\n * Product detail information.\n */\n @Prop() options: string\n\n /**\n * Hide the out of stock label.\n * Will be used in the case of live validation such as cart page and inline checkout\n */\n @Prop() hideOutLabel: string\n\n /**\n * A unique key used to generate distinct identifiers.\n * \n * This key is appended to a default value to ensure uniqueness\n * across instances or components where differentiation is required.\n */\n @Prop() uniqueKey: string\n\n /**\n * Configuration for customizing the display layout of product options.\n * The `config` prop accepts a JSON string that specifies the layout type for rendering options.\n * It allows customization of how single-option and multiple-option selections are displayed.\n * \n * Example Usage:\n * ```html\n * <salla-product-options \n * options=\"{{ product.options }}\" \n * product-id=\"{{ product.id }}\" \n * unique-key=\"abc123\"\n * config='{\n * \"single-option\": { \"type\": \"button\" },\n * \"multiple-option\": { \"type\": \"button\" }\n * }'>\n * </salla-product-options>\n * ```\n * \n * Example Config JSON:\n * ```json\n * {\n * \"single-option\": { \"type\": \"button\" },\n * \"multiple-option\": { \"type\": \"default\" }\n * }\n * ```\n * \n * - `single-option`:\n * - Defines the display style for single-option selections.\n * - `type`: Supported values:\n * - `\"button\"`: Displays options in a button-style grid layout.\n * - `\"default\"`: Displays options as a dropdown (default).\n * \n * - `multiple-option`:\n * - Defines the display style for multiple-option selections.\n * - `type`: Supported values:\n * - `\"button\"`: Displays options in a button-style grid layout.\n * - `\"default\"`: Displays options as a list of checkboxes (default).\n */\n @Prop() config: string;\n\n /**\n * Get the id's of the selected options.\n * */\n @Method()\n async getSelectedOptionsData() {\n const selectedOptions = {}\n const formData = (this.host as HTMLElement & { getElementSallaData: () => FormData }).getElementSallaData();\n formData.forEach((value, key) => {\n if (key.startsWith('options[')) { (selectedOptions[key.replace('options[', '').replace(']', '')] = value) }\n });\n return selectedOptions;\n }\n\n /**\n * Report options form validity.\n * */\n @Method()\n async reportValidity() {\n const requiredElements = this.host.querySelectorAll('[required]') as unknown as Array<HTMLInputElement>;\n let pass = true;\n for (let i = 0; i < requiredElements.length; i++) {\n //if there is only one invalid option, return false\n if ('reportValidity' in requiredElements[i] && !requiredElements[i].reportValidity()) {\n pass = false;\n }\n }\n return pass;\n }\n\n /**\n * Return true if there is any out of stock options are selected and vise versa.\n * */\n @Method()\n async hasOutOfStockOption() {\n return this.selectedOptions.some(option => option.is_out) || (this.selectedSkus?.length && this.selectedSkus?.every(sku => this.outSkus.includes(sku)));\n }\n\n /**\n * Get selected options.\n * */\n @Method()\n async getSelectedOptions() {\n return this.selectedOptions;\n }\n\n /**\n * Get a specific option by its id.\n * */\n @Method()\n async getOption(option_id) {\n return this.optionsData.find(option => option.id === option_id);\n }\n\n /**\n * An event that emitted when any option is changed.\n */\n @Event() changed: EventEmitter;\n\n // @ts-ignore\n private invalidHandler(event: Event, option: Option) {\n const closestProductOption = (event.target as HTMLInputElement).closest('.s-product-options-option') as HTMLElement;\n\n if (!closestProductOption.classList.contains('s-product-options-option-error')) {\n closestProductOption.classList.add('s-product-options-option-error');\n }\n\n if (!salla.url.is_page('cart')) {\n const firstInvalidElement = this.host.querySelector('.s-product-options-option-error');\n if (firstInvalidElement === closestProductOption) {\n this.scrollToElement(closestProductOption);\n }\n }\n }\n\n private scrollToElement(element: HTMLElement) {\n if (element) {\n element.scrollIntoView({ behavior: 'smooth', block: 'center' });\n }\n }\n\n private changedHandler(event, option, fireChangeEvent = true) {\n const data = {\n event: event,\n option: option,\n detail: null,\n productId: this.productId\n };\n\n if (option.details) {\n const detail = option.details.find((detail) => {\n return Number(detail.id) === Number(event.target.value);\n });\n data.detail = detail;\n }\n\n if (option.type === 'country') {\n this.handleCountryOptionChange(event, data.detail);\n }\n\n const optionElement = event.target.closest('.s-product-options-option');\n if (event.target.value ||\n ((option.type === DisplayType.FILE || option.type === DisplayType.IMAGE) && event.type === 'added') ||\n (option.type === DisplayType.MAP && event.type === 'selected' && (event.target.lat && event.target.lng))) {\n setTimeout(() => {\n optionElement.classList.remove('s-product-options-option-error');\n }, 200);\n }\n\n if (option.type === DisplayType.DONATION) {\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: event.target.value\n });\n }\n\n this.setSelectedSkus();\n this.handleRequiredMultipleOptions(option);\n\n const index = this.selectedOptions.findIndex(opt => opt.option_id === data.option.id);\n\n if (data.option.type === DisplayType.MULTIPLE_OPTIONS) {\n // Handle multiple selections\n const detailIndex = this.selectedOptions.findIndex(\n opt => opt.option_id === data.option.id && opt?.id === data.detail?.id\n );\n if (detailIndex > -1) {\n // If the option is already selected, remove it (unselect)\n this.selectedOptions.splice(detailIndex, 1);\n } else {\n // If the option is not selected, add it to the selectedOptions array\n this.selectedOptions.push({ ...data.detail, option_id: data.option.id });\n }\n } else {\n // Handle single selection\n if (!data.detail || Object.keys(data.detail).length === 0) {\n // If there is no value for the single-select, remove it from the selectedOptions array\n if (index > -1) {\n this.selectedOptions.splice(index, 1);\n }\n } else {\n // If a value exists, update or add the selection\n if (index > -1) {\n // Replace the existing selection with the new one\n this.selectedOptions[index] = { ...data.detail, option_id: data.option.id };\n } else {\n // If no selection exists for this input, add the new selection\n this.selectedOptions.push({ ...data.detail, option_id: data.option.id });\n }\n }\n }\n\n \n // Update optionsData directly\n this.optionsData = this.optionsData.map(opt => {\n if (opt.id === data.option.id) {\n return {\n ...opt,\n details: opt.details.map(detail => ({\n ...detail,\n is_selected: data.option.type === DisplayType.MULTIPLE_OPTIONS\n ? this.selectedOptions.some(selected => selected.id === detail.id)\n : Number(detail.id) === Number(data.detail?.id),\n value: data.detail?.value\n }))\n };\n }\n return opt;\n });\n // Emit the event only if fireChangeEvent is true\n if (fireChangeEvent) {\n this.changed.emit(data);\n salla.event.emit('product-options::change', data);\n }\n }\n\n\n private handleDonationOptions = (event, detail, type) => {\n if (detail === 'custom' && type === 'input') {\n salla.helpers.inputDigitsOnly(event.target)\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: event.target.value\n });\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n this.isCustomDonation = event.target.value === 'custom';\n if (this.donationInput) {\n if (event.target.value === 'custom') {\n this.donationInput.value = '';\n this.donationInput.focus()\n } else {\n this.donationInput.value = event.target.value;\n }\n if (detail === 'custom') {\n return\n }\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: event.target.value\n });\n }\n }\n\n private hideLabel = (option) => {\n if (option.type === DisplayType.DONATION && (option.donation && !option.donation.can_donate)) {\n return true;\n }\n return false;\n }\n\n private getExpireDonationMessage = (option) => {\n if (!option.donation) {\n return;\n }\n const completed = option.donation.target_amount <= option.donation.collected_amount;\n return <div class={{ \"s-product-options-donation-message\": true, \"s-product-options-donation-completed\": completed, \"s-product-options-donation-expired\": !completed }}>\n <p>{option.donation.target_message}</p>\n <span innerHTML={completed ? salla.money(option.donation.target_amount) : ''}></span>\n </div>\n }\n /**\n * loop throw all selected details, then get common sku, if it's only one, means we selected all of them;\n */\n private setSelectedSkus() {\n this.selectedSkus = this.selectedOptions.map(detail => Object.keys(detail.skus_availability || {}))\n .reduce((p, c) => p.filter(e => c.includes(e)), []) // Initialize accumulator as an empty array\n .map(sku => Number(sku));\n }\n \n\n private handleRequiredMultipleOptions(option) {\n if (option.type !== DisplayType.MULTIPLE_OPTIONS || !option.required) {\n return;\n }\n const optionContainer = this.host.querySelector(`[data-option-id=\"${option.id}\"]`);\n const hasChecked = optionContainer.querySelectorAll('input:checked').length;\n optionContainer.querySelectorAll('input').forEach(input => input.toggleAttribute('required', !hasChecked));\n }\n\n private getLatLng(value, type: 'lat' | 'lng') {\n return value\n ? value.split(',')[type === 'lat' ? 0 : 1]\n : '';\n }\n\n private getDisplayForType(option: Option) {\n if (this[`${option.type}Option`]) {\n return this[`${option.type}Option`](option);\n }\n\n if (option.type === DisplayType.COLOR_PICKER) {\n return this.colorPickerOption(option)\n }\n\n if (option.type === DisplayType.MULTIPLE_OPTIONS) {\n return this.multipleOptions(option);\n }\n\n if (option.type === DisplayType.SINGLE_OPTION) {\n return this.singleOption(option);\n }\n\n if (option.type === DisplayType.DIGITAL_CARD_VALUE) {\n return this.digitalCardValuesOption(option);\n }\n if (option.type === DisplayType.COUNTRY) {\n return this.countryOption(option);\n }\n\n if (option.type === DisplayType.BOOKING && salla.url.is_page(\"cart\")) {\n return <salla-booking-field onInvalidInput={(e) => this.invalidHandler(e, option)} option={option as any} productId={option.value}></salla-booking-field>\n }\n\n salla.log(`Couldn't find options type(${option.type})😢`);\n return '';\n }\n\n protected getOptionShownWhen(option: Option) {\n return option.visibility_condition\n ? { \"data-show-when\": `options[${option.visibility_condition.option}] ${option.visibility_condition.operator} ${option.visibility_condition.value}` }\n : {};\n }\n\n private getAvailableDigitalCardSKUs(detail: Detail) {\n const digitalCardOption = this.optionsData.find(({ type }) => type === 'digital-code-value')\n\n if (!digitalCardOption) throw new Error('product-options:: No digital card options found')\n\n const outofStockSKUs = Object.keys(detail.skus_availability).filter(key => detail.skus_availability[key] === false)\n\n this.availableDigitalCardValues = digitalCardOption.details.filter((op) => {\n\n return !Object.keys(op.skus_availability).filter(SKU_key => outofStockSKUs.includes(SKU_key)).length\n\n })\n\n }\n private handleCountryOptionChange(event: Event, detail: Detail) {\n event.stopImmediatePropagation()\n\n this.ignoreDefaultCardValue = true\n\n const currentCardValue = this.host.querySelector(\"input[data-code-value]:checked\") as HTMLInputElement | null\n\n if (currentCardValue) currentCardValue.checked = false\n\n const digitalCardOption = this.optionsData.find(({ type }) => type === 'digital-code-value')\n\n if (!digitalCardOption) throw new Error('product-options:: No digital card options found')\n\n this.getAvailableDigitalCardSKUs(detail)\n }\n\n private getSelectedDigitalCardOptions(option: Option) {\n const selectedOption = option.details.find(detail => detail.is_selected)\n const defaultOption = option.details.find(detail => !!detail.is_default) || option.details[0] /*option.details[0] only applys for counrty options*/\n if (!['digital-code-value', 'country'].includes(option.type)) return\n\n return selectedOption || defaultOption\n\n\n }\n\n //we need the cart Id for productOption Image\n async componentWillLoad() {\n if(salla.url.is_page(\"cart\")){\n this.disableCardValue=false\n this.fillSelectedOptions();\n }\n\n if (this.config) {\n try {\n this.optionConfig = typeof this.config === 'string' ? JSON.parse(this.config) : this.config;\n } catch (error) {\n console.error('Failed to parse JSON in config prop:', error);\n }\n }\n\n const shouldSelectDefaultOption = this.optionsData.filter(({ type }) => [\"country\", \"digital-card-value\"].includes(type)).length > 0 && salla.url.is_page('cart')\n\n if (shouldSelectDefaultOption) {\n const countryOption = this.optionsData.find(option => option.type === 'country')\n\n const defaultSelection = countryOption && this.getSelectedDigitalCardOptions(countryOption)\n\n if (defaultSelection) {\n this.getAvailableDigitalCardSKUs(defaultSelection)\n }\n }\n this.outOfStockText = salla.lang.get('pages.products.out_of_stock')\n await salla.onReady();\n document.addEventListener(\"paste\", this.handlePaste.bind(this));\n const needsCartId = (!salla.storage.get('cart.id') && this.optionsData.some(option => ['file', 'image'].includes(option.type)));\n return needsCartId ? salla.api.cart.getCurrentCartId(false, \"salla-product-options\") : null;\n }\n\n /**\n * This is a workaround for a bug in iOS 26 Safari, when pasting English text to RTL inputs, it adds extra text!!\n * To avoid any break changes, we will make it only work on these conditions:\n * - content_copyright is on\n * - Apple Pay is enabled (means it's iOS/safari)\n * - Input is an input or textarea\n * - Salla form control\n * - Options array\n */\n private handlePaste(event: ClipboardEvent) {\n const target = event.target;\n if (\n !Salla.config.get('store.settings.content_copyright')\n || !Salla.helpers.hasApplePay()\n || !(target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement)\n || !target.classList.contains('s-form-control')\n || !target.name.startsWith('options[')) {\n return;\n }\n // Prevent default paste (to avoid Safari inserting extra content)\n event.preventDefault();\n\n // Read only the clipboard data\n const text = event.clipboardData?.getData(\"text\") || \"\";\n\n // Insert it manually at cursor if you want\n const start = target.selectionStart;\n const end = target.selectionEnd;\n\n const newValue = target.value.slice(0, start) + text + target.value.slice(end);\n\n target.value = newValue;\n\n // Reset cursor position\n target.setSelectionRange(start + text.length, start + text.length);\n }\n\n private hideDigitalCardsOptions(option:Option){\n return (this.disableCardValue && option.type===DisplayType.DIGITAL_CARD_VALUE && !salla.url.is_page(\"cart\"))\n }\n\n render() {\n if (this.optionsData?.length === 0) {\n return;\n }\n\n return (\n <Host class=\"s-product-options-wrapper\">\n {/* TODO:: move salla-conditional-field logic to here, no need of another component*/}\n <salla-conditional-fields>\n {this.optionsData.map((option: Option) =>\n <div key={option.id} class={`s-product-options-option-container${option.visibility_condition || this.hideDigitalCardsOptions(option) ? ' hidden' : ''}`}\n data-option-id={option.id}\n {...this.getOptionShownWhen(option)}>\n {option.name === 'splitter' ?\n this.splitterOption()\n : <div class={{ \"s-product-options-option\": true, \"s-product-options-option-booking\": option.type === DisplayType.BOOKING && salla.url.is_page(\"cart\") }} data-option-type={option.type}\n data-option-required={`${option.required}`}>\n <label htmlFor={`options[${option.id}]`} class={`s-product-options-option-label ${this.hideLabel(option) ? 's-product-options-option-label-hidden' : ''}`}>\n <b>\n {option.name}\n {option.required && <span> * </span>} </b>\n <small>{option.placeholder}</small>\n </label>\n <div class={`s-product-options-option-content ${this.hideLabel(option) || (option.type === DisplayType.BOOKING && salla.url.is_page(\"cart\")) ? 's-product-options-option-content-full-width' : ''}`}>\n {this.getDisplayForType(option)}\n </div>\n </div>}\n </div>\n )}\n </salla-conditional-fields>\n </Host>\n );\n\n }\n\n private generateUniqueKey(defaultValue: string): string {\n return this.uniqueKey ? `${defaultValue}-${this.uniqueKey}` : defaultValue;\n }\n private fillSelectedOptions() {\n this.selectedOptions = this.optionsData.reduce((acc, opt) => {\n const selectedDetails = opt.details.filter(detail => detail.is_selected);\n const mappedDetails = selectedDetails.map(detail => ({\n ...detail,\n option_id: opt.id\n }));\n return acc.concat(mappedDetails);\n }, []);\n }\n\n componentDidLoad() {\n if (this.optionsData?.length === 0 && !this.optionsData.some(option => option.type === DisplayType.DONATION)) {\n return;\n }\n const selectedDonationOption = this.optionsData.find(option => option.type === DisplayType.DONATION)?.details.find(detail => detail.is_selected);\n if (!selectedDonationOption) {\n return;\n }\n setTimeout(() => {\n salla.event.emit('product-options::donation-changed', {\n id: this.productId,\n price: selectedDonationOption.additional_price\n });\n }, 1000);\n }\n //@ts-ignore\n private donationOption(option: Option, product: Product) {\n return <div class=\"s-product-options-donation-wrapper\">\n\n {option.donation?.can_donate ? [\n option.donation ?\n <div key={option.id} class=\"s-product-options-donation-progress\">\n <salla-progress-bar donation={option.donation}>\n </salla-progress-bar>\n </div>\n : '',\n option.details.length ?\n [<h4 key={option.id}>{this.selectAmount}</h4>,\n <div key={option.id} class=\"s-product-options-donation-options\">\n {option.details.map((detail, i) =>\n <div key={option.id} class=\"s-product-options-donation-options-item\">\n <input id={this.generateUniqueKey(`donation-option-${i}`)} type=\"radio\" name=\"donating_option\" checked={detail.is_selected} value={detail.additional_price} onChange={e => this.handleDonationOptions(e, detail, 'option')} />\n <label htmlFor={this.generateUniqueKey(`donation-option-${i}`)}>\n <span innerHTML={salla.money(detail.name)}></span>\n </label>\n </div>\n )}\n {option.donation?.custom_amount_enabled ?\n <div class=\"s-product-options-donation-options-item\">\n <input id={this.generateUniqueKey(\"donation-option-custom\")} type=\"radio\" name=\"donating_option\" value=\"custom\" onChange={e => this.handleDonationOptions(e, 'custom', 'option')} />\n <label htmlFor={this.generateUniqueKey(\"donation-option-custom\")}>\n <span> {this.selectDonationAmount} </span>\n </label>\n </div>\n : ''\n }\n </div>] : '',\n\n <div key={option.id} class={{ \"s-product-options-donation-input-group\": true, \"shown\": !option.details.length || (option.details.length && this.isCustomDonation) }}>\n <input\n type=\"text\"\n id=\"donating-amount\"\n name=\"donation_amount\"\n class=\"s-form-control\"\n ref={el => { this.donationInput = el as HTMLInputElement }}\n value={\n option.details.length\n && option.details.some(detail => detail.is_selected)\n ? option.details.find(detail => detail.is_selected).additional_price\n : option.value}\n // required\n placeholder={option.placeholder}\n onInput={e => this.handleDonationOptions(e, 'custom', 'input')}\n onBlur={e => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n />\n {/* value={option.value} */}\n <span class=\"s-product-options-donation-amount-currency\">\n {salla.config.currency(salla.config.get('user.currency_code')).symbol}\n </span>\n </div>\n ] :\n this.getExpireDonationMessage(option)\n }\n </div>\n }\n\n private fileUploader(option: Option, additions: Record<string, unknown> | null = null) {\n return <salla-file-upload\n {...(additions || {})}\n payload-name=\"file\"\n value={option.value}\n instant-upload={true}\n name={`options[${option.id}]`}\n required={!option.visibility_condition && option.required}\n height=\"120px\"\n onAdded={(e) => this.changedHandler(e, option)}\n url={salla.cart.api.getUploadImageEndpoint()}\n form-data={{ cart_item_id: this.productId, product_id: this.productId }}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n class={{ \"s-product-options-image-input\": true, required: option.required }}\n >\n <div class=\"s-product-options-filepond-placeholder\">\n <span class=\"s-product-options-filepond-placeholder-icon\"\n innerHTML={(additions as { accept: string }).accept?.split(',').every(type => type.includes('image'))\n ? CameraIcon\n : FileIcon}\n />\n <p class=\"s-product-options-filepond-placeholder-text\">{salla.lang.get('common.uploader.drag_and_drop')}</p>\n <span class=\"filepond--label-action\">{salla.lang.get('common.uploader.browse')}</span>\n </div>\n </salla-file-upload>\n }\n\n //@ts-ignore\n private imageOption(option: Option) {\n return this.fileUploader(option, { accept: 'image/png,image/jpeg,image/jpg,image/gif' });\n }\n\n //@ts-ignore\n private fileOption(option: Option) {\n const types = option.details.map(detail => this.fileTypes[detail.name]).filter(Boolean);\n return types?.length\n ? this.fileUploader(option, { accept: types.join(',') })\n : 'File types not selected.';\n }\n\n // TODO: (ONLY FOR TESTING!) find a better way to make it testable, e.g. wrap it with a unique class like textOption\n //@ts-ignore\n private numberOption(option: Option) {\n return <input\n type=\"text\"\n value={option.value}\n class=\"s-form-control\"\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onBlur={e => this.changedHandler(e, option)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onInput={e => salla.helpers.inputDigitsOnly(e.target)} />\n }\n\n //@ts-ignore\n private splitterOption() {\n return <div class=\"s-product-options-splitter\" />\n }\n\n //@ts-ignore\n private textOption(option: Option) {\n return <div class=\"s-product-options-text\">\n <input\n type=\"text\"\n value={option.value}\n maxLength={option?.length}\n class='s-form-control'\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={e => this.changedHandler(e, option)} />\n </div>\n }\n\n //@ts-ignore\n private textareaOption(option: Option) {\n //todo::remove mt-1 class, and if it's okay to remove the tag itself will be great\n return <div class=\"s-product-options-textarea\">\n <div class=\"mt-1\">\n <textarea\n rows={4}\n value={option.value}\n maxLength={option?.length}\n class=\"s-form-control\"\n required={!option.visibility_condition && option.required}\n id={`options[${option.id}]`}\n name={`options[${option.id}]`}\n placeholder={option.placeholder}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)} />\n </div>\n </div>\n }\n\n //@ts-ignore\n private mapOption(option: Option) {\n return <salla-map\n zoom={15}\n lat={this.getLatLng(option.value, 'lat')}\n lng={this.getLatLng(option.value, 'lng')}\n name={`options[${option.id}]`}\n searchable={true}\n required={option.required}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onSelected={e => this.changedHandler(e, option)} />\n }\n\n private colorPickerOption(option: Option) {\n return <salla-color-picker\n onSubmitted={e => this.changedHandler(e, option)}\n name={`options[${option.id}]`}\n required={!option.visibility_condition && option.required}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n color={option.value} />\n }\n\n /**\n * ============= Date Time options =============\n */\n //@ts-ignore\n private timeOption(option: Option) {\n return <salla-datetime-picker\n noCalendar={true}\n enableTime={true}\n dateFormat=\"h:i K\"\n value={option.value}\n placeholder={option.name}\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n class=\"s-product-options-time-element\"\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n }\n\n //@ts-ignore\n private dateOption(option: Option) {\n //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23\n return <div class=\"s-product-options-date-element\">\n <salla-datetime-picker\n value={option.value}\n placeholder={option.name}\n required={!option.visibility_condition && option.required}\n minDate={new Date()}\n name={`options[${option.id}]`}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n </div>\n }\n\n //@ts-ignore\n private datetimeOption(option: Option) {\n //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23\n return <div class=\"s-product-options-datetime-element\">\n <salla-datetime-picker\n enableTime={true}\n value={option.value}\n dateFormat=\"Y-m-d G:i:K\"\n placeholder={option.name}\n required={!option.visibility_condition && option.required}\n name={`options[${option.id}]`}\n maxDate={option.to_date_time}\n minDate={option.from_date_time}\n onInvalidInput={(e) => this.invalidHandler(e, option)}\n onPicked={e => this.changedHandler(e, option)} />\n </div>\n }\n\n /**\n * ============= Advanced options =============\n */\n protected getOptionDetailName(detail: Detail, outOfStock = true, optionType?: string) {\n let detailName;\n if (optionType && optionType === DisplayType.COLOR) {\n detailName = detail.name\n + ((outOfStock && this.isOptionDetailOut(detail) && !salla.url.is_page(\"cart\")) && !this.hideOutLabel ? ` <br/> <p> ${this.outOfStockText} </p>` : '')\n + (detail.additional_price ? ` <p> (${salla.money(detail.additional_price, false)}) </p>` : '');\n }\n\n if(!detailName){\n detailName = detail.name\n + ((outOfStock && this.isOptionDetailOut(detail) && !salla.url.is_page(\"cart\")) && !this.hideOutLabel ? ` - ${this.outOfStockText}` : '')\n + (detail.additional_price ? ` (${salla.money(detail.additional_price, false)})` : '');\n }\n\n //Some merchants adding price to the names of the options,\n //and because we are using this inside select option, we need to replace the html currency symbol with the store currency symbol\n return detailName.replace('<i class=sicon-sar></i>',salla.config.currency()?.symbol || 'ر.س');\n }\n\n\n protected isOptionDetailOut(detail: Detail) {\n if (detail.is_out || !detail.skus_availability || !this.selectedSkus?.length) {\n return detail.is_out;\n }\n\n const isDetailSelected = this.selectedOptions.filter(option => option.id === detail.id).length;\n //if the current options is the only selected option, so we are sure that it's not out, because there is no other options selected yet\n if (isDetailSelected && this.selectedOptions.length === 1) {\n return false;\n }\n\n //if current details has sku in the possible outSkus it's out for sure\n if (isDetailSelected) {\n //here we will get the possible outSkus for current selected options\n const outSelectableSkus = this.selectedSkus.filter(sku => this.outSkus.includes(sku));\n return Object.keys(detail.skus_availability).some(sku => outSelectableSkus.includes(Number(sku)))\n }\n\n return this.selectedOptions.some(option => option.is_out && option.option_id !== detail.option_id)\n\n }\n\n /**\n * Renders a single input element (radio or checkbox) for an option detail.\n * @param type - The type of input element ('radio' or 'checkbox').\n * @param detail - The detail object representing an option detail.\n * @param option - The parent option object containing the details.\n * @param isRequired - Indicates if the input is required based on the option's rules.\n * @param name - The name attribute for the input element.\n * @returns HTMLElement - A labeled input element.\n */\n private renderInput(\n type: 'radio' | 'checkbox',\n detail: Detail,\n option: Option,\n isRequired: boolean,\n name: string,\n buttonStyle: boolean,\n ): HTMLElement {\n const id = this.generateUniqueKey(`${type}-${option.id}-${detail.id}`);\n const isDisabled = this.isOptionDetailOut(detail);\n return (\n <label class={{\n \"s-product-options-disabled\": isDisabled,\n }}>\n <input\n id={id}\n type={type}\n name={name}\n value={detail.id}\n disabled={isDisabled}\n required={isRequired}\n checked={detail.is_selected}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)}\n />\n <div class={{\"s-product-options-grid-mode-span\": buttonStyle, \"s-product-options-disabled\": isDisabled}}>\n {this.getOptionDetailName(detail)}\n </div>\n </label>\n );\n }\n\n /**\n * Renders a collection of input elements for all details of an option.\n * @param type - The type of input elements ('radio' or 'checkbox').\n * @param option - The parent option object containing the details.\n * @param isRequired - Indicates if the inputs are required based on the option's rules.\n * @returns HTMLElement[] - An array of labeled input elements.\n */\n private renderOptionDetails(\n type: 'radio' | 'checkbox',\n option: Option,\n isRequired: boolean,\n buttonStyle: boolean = false\n ): HTMLElement[] {\n const name = type === 'radio' ? `options[${option.id}]` : `options[${option.id}][]`;\n return option?.details.map((detail: Detail) =>\n this.renderInput(type, detail, option, isRequired, name, buttonStyle)\n );\n }\n\n /**\n * Renders a dropdown (select) element for a single-option selection.\n * @param option - The parent option object.\n * @returns HTMLElement - A select dropdown element with all option details.\n */\n private renderSelect(option: Option): HTMLElement {\n return (\n <div>\n <select\n name={`options[${option.id}]`}\n required={!option.visibility_condition && option.required}\n class=\"s-form-control\"\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)}\n >\n <option value=\"\">{option.placeholder}</option>\n {option?.details.map((detail: Detail) => (\n <option\n key={detail.id}\n value={detail.id}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n selected={detail.is_selected}\n >\n {this.getOptionDetailName(detail)}\n </option>\n ))}\n </select>\n </div>\n );\n }\n\n /**\n * Renders a grid-based layout for option inputs (radio or checkbox).\n * @param type - The type of input elements ('radio' or 'checkbox').\n * @param option - The parent option object containing the details.\n * @param isRequired - Indicates if the inputs are required based on the option's rules.\n * @returns HTMLElement - A grid-based container with input elements.\n */\n private renderButtonStyle(\n type: 'radio' | 'checkbox',\n option: Option,\n isRequired: boolean\n ): HTMLElement {\n return (\n <div class=\"s-product-options-grid-mode\">\n {this.renderOptionDetails(type, option, isRequired, true)}\n </div>\n );\n }\n\n /**\n * Renders a single-option selection, either as a grid or dropdown, based on configuration.\n * @param option - The parent option object.\n * @returns HTMLElement - The rendered single-option element.\n */\n private singleOption(option: Option): HTMLElement {\n const buttonStyle = this.optionConfig?.['single-option']?.type === 'button';\n const isRequired = !option.visibility_condition && option.required;\n\n return buttonStyle\n ? this.renderButtonStyle('radio', option, isRequired)\n : this.renderSelect(option);\n }\n\n /**\n * Renders a multiple-option selection, either as a grid or list, based on configuration.\n * @param option - The parent option object.\n * @returns HTMLElement - The rendered multiple-option element.\n */\n private multipleOptions(option: Option): HTMLElement {\n const buttonStyle = this.optionConfig?.['multiple-option']?.type === 'button';\n const isRequired =\n option.required &&\n !option.details.some((detail) => detail.is_selected) &&\n !option.visibility_condition;\n\n return buttonStyle\n ? this.renderButtonStyle('checkbox', option, isRequired)\n : (\n <div\n class={{\n 's-product-options-multiple-options-wrapper': true,\n required: option.required,\n }}\n >\n {this.renderOptionDetails('checkbox', option, isRequired)}\n </div>\n );\n }\n \n //@ts-ignore\n private colorOption(option: Option) {\n return (\n <fieldset\n class=\"s-product-options-colors-wrapper\"\n >\n {option?.details.map((detail) => (\n <div\n class=\"s-product-options-colors-item\"\n key={detail.id}\n >\n <input\n type=\"radio\"\n value={detail.id}\n required={!option.visibility_condition && option.required}\n checked={detail.is_selected}\n name={`options[${option.id}]`}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n id={this.generateUniqueKey(`color-${this.productId}-${option.id}-${detail.id}`)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)}\n />\n <label htmlFor={this.generateUniqueKey(`color-${this.productId}-${option.id}-${detail.id}`)}>\n <span style={{ backgroundColor: detail.color }} />\n <div innerHTML={this.getOptionDetailName(detail, true, option.type)} />\n </label>\n </div>\n ))}\n </fieldset>\n );\n } \n\n //@ts-ignore\n private thumbnailOption(option: Option) {\n return <div class=\"s-product-options-thumbnails-wrapper\">\n {option.details.map((detail: Detail) => {\n return <div key={detail.id}>\n <input type=\"radio\"\n value={detail.id}\n data-itemid={detail.id} //todo:: why need this? it's already in the value!\n required={!option.visibility_condition && option.required}\n checked={detail.is_selected}\n name={`options[${option.id}]`}\n data-img-id={detail.option_value}\n disabled={this.canDisabled && this.isOptionDetailOut(detail)}\n id={this.generateUniqueKey(`option_${this.productId}-${option.id}_${detail.id}`)}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={(e) => this.changedHandler(e, option)} />\n <label htmlFor={this.generateUniqueKey(`option_${this.productId}-${option.id}_${detail.id}`)}\n data-img-id={detail.option_value}\n class=\"go-to-slide\">\n <img data-src={detail.image} src={detail.image} title={detail.name} alt={detail.name} />\n <span innerHTML={CheckCircleIcon} class=\"s-product-options-thumbnails-icon\" />\n {this.isOptionDetailOut(detail) ?\n [\n <small key={detail.id} class=\"s-product-options-thumbnails-stock-badge\">{this.outOfStockText}</small>,\n this.canDisabled ? <div key={detail.id} class=\"s-product-options-thumbnails-badge-overlay\" /> : '',\n ]\n : ''}\n </label>\n <p>{this.getOptionDetailName(detail, false)} </p>\n </div>\n })}\n </div>\n }\n\n // Digital card options\n private digitalCardValuesOption(option: Option) {\n\n return <div class=\"s-product-options-digital-card-wrapper\">\n {this.availableDigitalCardValues.length > 0 ? this.availableDigitalCardValues.map((detail) => {\n const id = String(detail.id)\n return <label htmlFor={this.generateUniqueKey(id.toString())} key={id} class=\"s-product-options-digital-card-option\">\n <input type=\"radio\" data-code-value class=\"s-form-control s-product-options-digital-card-input\" value={detail.id}\n name={`options[${option.id}]`}\n id={this.generateUniqueKey(id.toString())}\n required={!option.visibility_condition && option.required}\n onInvalid={(e) => this.invalidHandler(e, option)}\n {...(!this.ignoreDefaultCardValue ? {defaultChecked: this.getSelectedDigitalCardOptions(option)?.id === detail.id}:{})}\n\n />\n <span>{detail.name} {salla.config?.currency()?.symbol}</span>\n </label>\n })\n : <div class=\"s-product-options-digital-card-out-of-stock\"/>\n }\n </div>\n }\n private countryOption(option: Option) {\n return <div class=\"s-product-options-digital-card-wrapper\">\n {option.details.map((detail) => {\n\n return <label htmlFor={this.generateUniqueKey(detail.id.toString())} key={detail.id} class={{\"s-product-options-digital-card-option\":true,\"s-product-options-digital-card-option-stock-out\":detail.is_out}}>\n <input id={this.generateUniqueKey(detail.id.toString())} type=\"radio\" class=\"s-form-control s-product-options-digital-card-input\" value={detail.id}\n name={`options[${option.id}]`}\n disabled={detail.is_out}\n required={!option.visibility_condition && option.required}\n onInvalid={(e) => this.invalidHandler(e, option)}\n onChange={e => this.changedHandler(e, option)}\n onClick={()=>{ this.disableCardValue = false}}\n {...(salla.url.is_page(\"cart\") ? {defaultChecked:this.getSelectedDigitalCardOptions(option)?.id === detail.id}:{})}\n\n />\n <img loading='lazy' alt={detail.code} height={24} width={24} class=\"s-product-options-country-flag\" src={`https://cdn.assets.salla.network/prod/admin/cp/assets/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