crmbonus-component-wake 2.0.115 → 2.0.116

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 (372) hide show
  1. package/dist/{esm → crmbonus-component-wake}/app-modal.entry.js +2 -3
  2. package/dist/crmbonus-component-wake/app-modal.entry.js.map +1 -0
  3. package/dist/{components/p-8179aaa5.js → crmbonus-component-wake/cart.helper-2643939f.js} +6 -3
  4. package/dist/crmbonus-component-wake/cart.helper-2643939f.js.map +1 -0
  5. package/dist/{components/p-2b3b8d6b.js → crmbonus-component-wake/countdown-timer.entry.js} +7 -27
  6. package/dist/crmbonus-component-wake/countdown-timer.entry.js.map +1 -0
  7. package/dist/{esm → crmbonus-component-wake}/crm-bonus-form.entry.js +3 -4
  8. package/dist/crmbonus-component-wake/{p-51a4fdbf.entry.js.map → crm-bonus-form.entry.js.map} +1 -1
  9. package/dist/{esm → crmbonus-component-wake}/crm-bonus-note.entry.js +16 -14
  10. package/dist/crmbonus-component-wake/crm-bonus-note.entry.js.map +1 -0
  11. package/dist/{esm → crmbonus-component-wake}/crm-bonus.entry.js +10 -9
  12. package/dist/crmbonus-component-wake/crm-bonus.entry.js.map +1 -0
  13. package/dist/crmbonus-component-wake/crm-button.entry.js +20 -0
  14. package/dist/crmbonus-component-wake/crm-button.entry.js.map +1 -0
  15. package/dist/{esm/crm-giftback-form_2.entry.js → crmbonus-component-wake/crm-giftback-form.entry.js} +6 -21
  16. package/dist/{cjs/crm-giftback-form_2.cjs.entry.js.map → crmbonus-component-wake/crm-giftback-form.entry.js.map} +1 -1
  17. package/dist/{components/p-58b97429.js → crmbonus-component-wake/crm-tooltip.entry.js} +8 -27
  18. package/dist/crmbonus-component-wake/crm-tooltip.entry.js.map +1 -0
  19. package/dist/crmbonus-component-wake/crmbonus-component-wake.css +7 -1
  20. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +48 -1
  21. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
  22. package/dist/{esm/crmbonus.service-31fd796c.js → crmbonus-component-wake/crmbonus.service-047b6b01.js} +164 -91
  23. package/dist/crmbonus-component-wake/crmbonus.service-047b6b01.js.map +1 -0
  24. package/dist/{components/p-b79c86a8.js → crmbonus-component-wake/giftback-finish.entry.js} +8 -25
  25. package/dist/crmbonus-component-wake/giftback-finish.entry.js.map +1 -0
  26. package/dist/{components/p-2671d669.js → crmbonus-component-wake/giftback-info.entry.js} +12 -52
  27. package/dist/crmbonus-component-wake/giftback-info.entry.js.map +1 -0
  28. package/dist/{components/p-6186ddcc.js → crmbonus-component-wake/giftback-pin.entry.js} +8 -38
  29. package/dist/crmbonus-component-wake/giftback-pin.entry.js.map +1 -0
  30. package/dist/{components/p-7c744cca.js → crmbonus-component-wake/giftback-progress.entry.js} +8 -37
  31. package/dist/crmbonus-component-wake/giftback-progress.entry.js.map +1 -0
  32. package/dist/{esm/i18n-e8150dff.js → crmbonus-component-wake/i18n-11138a2c.js} +16 -1
  33. package/dist/{esm/i18n-e8150dff.js.map → crmbonus-component-wake/i18n-11138a2c.js.map} +1 -1
  34. package/dist/crmbonus-component-wake/index-d0fd1dc0.js +3039 -0
  35. package/dist/crmbonus-component-wake/index-d0fd1dc0.js.map +1 -0
  36. package/dist/crmbonus-component-wake/index.esm.js +12 -1
  37. package/dist/crmbonus-component-wake/index.esm.js.map +1 -1
  38. package/dist/crmbonus-component-wake/loading-container.entry.js +18 -0
  39. package/dist/crmbonus-component-wake/loading-container.entry.js.map +1 -0
  40. package/dist/{esm → crmbonus-component-wake}/loading-spinner.entry.js +2 -3
  41. package/dist/crmbonus-component-wake/loading-spinner.entry.js.map +1 -0
  42. package/dist/{components/p-246a3e9d.js → crmbonus-component-wake/name-input.entry.js} +8 -37
  43. package/dist/crmbonus-component-wake/name-input.entry.js.map +1 -0
  44. package/dist/{esm → crmbonus-component-wake}/pedido-finalizado.entry.js +7 -5
  45. package/dist/crmbonus-component-wake/pedido-finalizado.entry.js.map +1 -0
  46. package/dist/{esm → crmbonus-component-wake}/phone-cancel-input.entry.js +1 -1
  47. package/dist/crmbonus-component-wake/phone-cancel-input.entry.js.map +1 -0
  48. package/dist/{components/p-6c546e48.js → crmbonus-component-wake/phone-form.entry.js} +8 -47
  49. package/dist/crmbonus-component-wake/phone-form.entry.js.map +1 -0
  50. package/dist/{esm → crmbonus-component-wake}/phone-input-mask.entry.js +2 -3
  51. package/dist/crmbonus-component-wake/phone-input-mask.entry.js.map +1 -0
  52. package/dist/{esm → crmbonus-component-wake}/phone-input.entry.js +1 -1
  53. package/dist/crmbonus-component-wake/phone-input.entry.js.map +1 -0
  54. package/dist/{components/p-83a12a8f.js → crmbonus-component-wake/pin-form.entry.js} +9 -56
  55. package/dist/crmbonus-component-wake/pin-form.entry.js.map +1 -0
  56. package/dist/crmbonus-component-wake/shadow-css-7ad5caf8.js +334 -0
  57. package/dist/crmbonus-component-wake/shadow-css-7ad5caf8.js.map +1 -0
  58. package/dist/{collection/utils/utils.js → crmbonus-component-wake/utils-96cf9ae0.js} +8 -5
  59. package/dist/crmbonus-component-wake/utils-96cf9ae0.js.map +1 -0
  60. package/dist/types/components/crm-bonus/crm-bonus.d.ts +1 -0
  61. package/dist/types/components/note/crm-bonus-note.d.ts +2 -1
  62. package/dist/types/components/pedido/pedido.d.ts +1 -0
  63. package/dist/types/components.d.ts +6 -0
  64. package/dist/types/home/darlison/Projects/Bycoders/crmbonus/crmbonus-component/.stencil/env.d.ts +1 -3
  65. package/package.json +6 -2
  66. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  67. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  68. package/dist/cjs/app-modal.cjs.entry.js +0 -28
  69. package/dist/cjs/app-modal.cjs.entry.js.map +0 -1
  70. package/dist/cjs/cart.helper-6a0021b4.js +0 -49
  71. package/dist/cjs/cart.helper-6a0021b4.js.map +0 -1
  72. package/dist/cjs/countdown-timer_2.cjs.entry.js +0 -63
  73. package/dist/cjs/countdown-timer_2.cjs.entry.js.map +0 -1
  74. package/dist/cjs/crm-bonus-form.cjs.entry.js +0 -104
  75. package/dist/cjs/crm-bonus-form.cjs.entry.js.map +0 -1
  76. package/dist/cjs/crm-bonus-note.cjs.entry.js +0 -100
  77. package/dist/cjs/crm-bonus-note.cjs.entry.js.map +0 -1
  78. package/dist/cjs/crm-bonus.cjs.entry.js +0 -243
  79. package/dist/cjs/crm-bonus.cjs.entry.js.map +0 -1
  80. package/dist/cjs/crm-giftback-form_2.cjs.entry.js +0 -253
  81. package/dist/cjs/crm-tooltip_4.cjs.entry.js +0 -211
  82. package/dist/cjs/crm-tooltip_4.cjs.entry.js.map +0 -1
  83. package/dist/cjs/crmbonus-component-wake.cjs.js +0 -27
  84. package/dist/cjs/crmbonus-component-wake.cjs.js.map +0 -1
  85. package/dist/cjs/crmbonus.service-a4a07c28.js +0 -3875
  86. package/dist/cjs/crmbonus.service-a4a07c28.js.map +0 -1
  87. package/dist/cjs/giftback-finish_4.cjs.entry.js +0 -131
  88. package/dist/cjs/giftback-finish_4.cjs.entry.js.map +0 -1
  89. package/dist/cjs/i18n-f2a6f60e.js +0 -2219
  90. package/dist/cjs/i18n-f2a6f60e.js.map +0 -1
  91. package/dist/cjs/index-6054ed44.js +0 -21
  92. package/dist/cjs/index-6054ed44.js.map +0 -1
  93. package/dist/cjs/index-d11684bd.js +0 -1599
  94. package/dist/cjs/index-d11684bd.js.map +0 -1
  95. package/dist/cjs/index.cjs.js +0 -11
  96. package/dist/cjs/index.cjs.js.map +0 -1
  97. package/dist/cjs/info.config.helper-c5d9f781.js +0 -16
  98. package/dist/cjs/info.config.helper-c5d9f781.js.map +0 -1
  99. package/dist/cjs/keys.storage-de7744aa.js +0 -17
  100. package/dist/cjs/keys.storage-de7744aa.js.map +0 -1
  101. package/dist/cjs/loader.cjs.js +0 -17
  102. package/dist/cjs/loader.cjs.js.map +0 -1
  103. package/dist/cjs/loading-spinner.cjs.entry.js +0 -24
  104. package/dist/cjs/loading-spinner.cjs.entry.js.map +0 -1
  105. package/dist/cjs/pedido-finalizado.cjs.entry.js +0 -37
  106. package/dist/cjs/pedido-finalizado.cjs.entry.js.map +0 -1
  107. package/dist/cjs/phone-cancel-input.cjs.entry.js +0 -25
  108. package/dist/cjs/phone-cancel-input.cjs.entry.js.map +0 -1
  109. package/dist/cjs/phone-input-mask.cjs.entry.js +0 -61
  110. package/dist/cjs/phone-input-mask.cjs.entry.js.map +0 -1
  111. package/dist/cjs/phone-input.cjs.entry.js +0 -25
  112. package/dist/cjs/phone-input.cjs.entry.js.map +0 -1
  113. package/dist/cjs/utils-e9413ee3.js +0 -25
  114. package/dist/cjs/utils-e9413ee3.js.map +0 -1
  115. package/dist/collection/assets/svg/info-circle-svgrepo-com.svg +0 -6
  116. package/dist/collection/assets/svg/money-dollars-svgrepo-com.svg +0 -6
  117. package/dist/collection/collection-manifest.json +0 -32
  118. package/dist/collection/components/button/crm-button.css +0 -22
  119. package/dist/collection/components/button/index.js +0 -76
  120. package/dist/collection/components/button/index.js.map +0 -1
  121. package/dist/collection/components/countdown-timer/countdown-timer.js +0 -81
  122. package/dist/collection/components/countdown-timer/countdown-timer.js.map +0 -1
  123. package/dist/collection/components/crm-bonus/assets/logo.svg +0 -18
  124. package/dist/collection/components/crm-bonus/assets/success-svgrepo-com.svg +0 -8
  125. package/dist/collection/components/crm-bonus/assets/svg/logo.svg +0 -18
  126. package/dist/collection/components/crm-bonus/assets/svg/success-svgrepo-com.svg +0 -8
  127. package/dist/collection/components/crm-bonus/crm-bonus.css +0 -84
  128. package/dist/collection/components/crm-bonus/crm-bonus.js +0 -267
  129. package/dist/collection/components/crm-bonus/crm-bonus.js.map +0 -1
  130. package/dist/collection/components/crm-bonus-form/crm-bonus-form.css +0 -19
  131. package/dist/collection/components/crm-bonus-form/crm-bonus-form.js +0 -348
  132. package/dist/collection/components/crm-bonus-form/crm-bonus-form.js.map +0 -1
  133. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.css +0 -10
  134. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js +0 -20
  135. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js.map +0 -1
  136. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.css +0 -70
  137. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js +0 -126
  138. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js.map +0 -1
  139. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.css +0 -110
  140. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js +0 -127
  141. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js.map +0 -1
  142. package/dist/collection/components/crm-bonus-form/subcomponents/name-input/name-input.css +0 -108
  143. package/dist/collection/components/crm-bonus-form/subcomponents/name-input/name-input.js +0 -110
  144. package/dist/collection/components/crm-bonus-form/subcomponents/name-input/name-input.js.map +0 -1
  145. package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js +0 -75
  146. package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js.map +0 -1
  147. package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js +0 -75
  148. package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js.map +0 -1
  149. package/dist/collection/components/giftback-form/giftback-form.css +0 -75
  150. package/dist/collection/components/giftback-form/giftback-form.js +0 -410
  151. package/dist/collection/components/giftback-form/giftback-form.js.map +0 -1
  152. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.css +0 -181
  153. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js +0 -221
  154. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js.map +0 -1
  155. package/dist/collection/components/giftback-form/subcomponents/giftback-message/giftback-massage.js +0 -11
  156. package/dist/collection/components/giftback-form/subcomponents/giftback-message/giftback-massage.js.map +0 -1
  157. package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js +0 -103
  158. package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js.map +0 -1
  159. package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.css +0 -84
  160. package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js +0 -197
  161. package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js.map +0 -1
  162. package/dist/collection/components/loading-container/loading-container.css +0 -47
  163. package/dist/collection/components/loading-container/loading-container.js +0 -43
  164. package/dist/collection/components/loading-container/loading-container.js.map +0 -1
  165. package/dist/collection/components/loading-spinner/loading-spinner.css +0 -17
  166. package/dist/collection/components/loading-spinner/loading-spinner.js +0 -63
  167. package/dist/collection/components/loading-spinner/loading-spinner.js.map +0 -1
  168. package/dist/collection/components/modal/app-modal.css +0 -45
  169. package/dist/collection/components/modal/app-modal.js +0 -83
  170. package/dist/collection/components/modal/app-modal.js.map +0 -1
  171. package/dist/collection/components/note/crm-bonus-note.css +0 -71
  172. package/dist/collection/components/note/crm-bonus-note.js +0 -94
  173. package/dist/collection/components/note/crm-bonus-note.js.map +0 -1
  174. package/dist/collection/components/pedido/pedido.js +0 -26
  175. package/dist/collection/components/pedido/pedido.js.map +0 -1
  176. package/dist/collection/components/phone/phone-input-mask.css +0 -40
  177. package/dist/collection/components/phone/phone-input-mask.js +0 -125
  178. package/dist/collection/components/phone/phone-input-mask.js.map +0 -1
  179. package/dist/collection/components/tooltip/crm-tooltip.css +0 -49
  180. package/dist/collection/components/tooltip/tooltip.js +0 -61
  181. package/dist/collection/components/tooltip/tooltip.js.map +0 -1
  182. package/dist/collection/contants/index.js +0 -16
  183. package/dist/collection/contants/index.js.map +0 -1
  184. package/dist/collection/contants/mocks.js +0 -28
  185. package/dist/collection/contants/mocks.js.map +0 -1
  186. package/dist/collection/dto/pin.sent.js +0 -2
  187. package/dist/collection/dto/pin.sent.js.map +0 -1
  188. package/dist/collection/dto/update.order.dto.js +0 -2
  189. package/dist/collection/dto/update.order.dto.js.map +0 -1
  190. package/dist/collection/dto/validate.pin.bonus.js +0 -5
  191. package/dist/collection/dto/validate.pin.bonus.js.map +0 -1
  192. package/dist/collection/helpers/build.payload.helper.js +0 -25
  193. package/dist/collection/helpers/build.payload.helper.js.map +0 -1
  194. package/dist/collection/helpers/cart.helper.js +0 -20
  195. package/dist/collection/helpers/cart.helper.js.map +0 -1
  196. package/dist/collection/helpers/info.config.helper.js +0 -11
  197. package/dist/collection/helpers/info.config.helper.js.map +0 -1
  198. package/dist/collection/helpers/time.helper.js +0 -12
  199. package/dist/collection/helpers/time.helper.js.map +0 -1
  200. package/dist/collection/i18n/i18n.js +0 -35
  201. package/dist/collection/i18n/i18n.js.map +0 -1
  202. package/dist/collection/index.js +0 -11
  203. package/dist/collection/index.js.map +0 -1
  204. package/dist/collection/objectvalues/cart.wake.js +0 -24
  205. package/dist/collection/objectvalues/cart.wake.js.map +0 -1
  206. package/dist/collection/services/crmbonus.service.js +0 -118
  207. package/dist/collection/services/crmbonus.service.js.map +0 -1
  208. package/dist/collection/utils/keys.storage.js +0 -9
  209. package/dist/collection/utils/keys.storage.js.map +0 -1
  210. package/dist/collection/utils/utils.js.map +0 -1
  211. package/dist/components/app-modal.js +0 -46
  212. package/dist/components/app-modal.js.map +0 -1
  213. package/dist/components/countdown-timer.js +0 -8
  214. package/dist/components/countdown-timer.js.map +0 -1
  215. package/dist/components/crm-bonus-form.js +0 -165
  216. package/dist/components/crm-bonus-form.js.map +0 -1
  217. package/dist/components/crm-bonus-note.js +0 -137
  218. package/dist/components/crm-bonus-note.js.map +0 -1
  219. package/dist/components/crm-bonus.js +0 -330
  220. package/dist/components/crm-bonus.js.map +0 -1
  221. package/dist/components/crm-button.js +0 -8
  222. package/dist/components/crm-button.js.map +0 -1
  223. package/dist/components/crm-giftback-form.js +0 -8
  224. package/dist/components/crm-giftback-form.js.map +0 -1
  225. package/dist/components/crm-tooltip.js +0 -8
  226. package/dist/components/crm-tooltip.js.map +0 -1
  227. package/dist/components/giftback-finish.js +0 -8
  228. package/dist/components/giftback-finish.js.map +0 -1
  229. package/dist/components/giftback-info.js +0 -8
  230. package/dist/components/giftback-info.js.map +0 -1
  231. package/dist/components/giftback-pin.js +0 -8
  232. package/dist/components/giftback-pin.js.map +0 -1
  233. package/dist/components/giftback-progress.js +0 -8
  234. package/dist/components/giftback-progress.js.map +0 -1
  235. package/dist/components/index.js +0 -4
  236. package/dist/components/index.js.map +0 -1
  237. package/dist/components/loading-container.js +0 -8
  238. package/dist/components/loading-container.js.map +0 -1
  239. package/dist/components/loading-spinner.js +0 -8
  240. package/dist/components/loading-spinner.js.map +0 -1
  241. package/dist/components/name-input.js +0 -8
  242. package/dist/components/name-input.js.map +0 -1
  243. package/dist/components/p-11085d9b.js +0 -79
  244. package/dist/components/p-11085d9b.js.map +0 -1
  245. package/dist/components/p-246a3e9d.js.map +0 -1
  246. package/dist/components/p-2671d669.js.map +0 -1
  247. package/dist/components/p-2b3b8d6b.js.map +0 -1
  248. package/dist/components/p-3e84f78c.js +0 -1408
  249. package/dist/components/p-3e84f78c.js.map +0 -1
  250. package/dist/components/p-47f9da55.js +0 -46
  251. package/dist/components/p-47f9da55.js.map +0 -1
  252. package/dist/components/p-58b97429.js.map +0 -1
  253. package/dist/components/p-6186ddcc.js.map +0 -1
  254. package/dist/components/p-6c546e48.js.map +0 -1
  255. package/dist/components/p-75ba7b9a.js +0 -14
  256. package/dist/components/p-75ba7b9a.js.map +0 -1
  257. package/dist/components/p-7c744cca.js.map +0 -1
  258. package/dist/components/p-7cfea8fe.js +0 -19
  259. package/dist/components/p-7cfea8fe.js.map +0 -1
  260. package/dist/components/p-7f0cb052.js +0 -316
  261. package/dist/components/p-7f0cb052.js.map +0 -1
  262. package/dist/components/p-8179aaa5.js.map +0 -1
  263. package/dist/components/p-83a12a8f.js.map +0 -1
  264. package/dist/components/p-b79c86a8.js.map +0 -1
  265. package/dist/components/p-ba369e65.js +0 -21
  266. package/dist/components/p-ba369e65.js.map +0 -1
  267. package/dist/components/p-cc1ea33f.js +0 -36
  268. package/dist/components/p-cc1ea33f.js.map +0 -1
  269. package/dist/components/p-e8c19a64.js +0 -2217
  270. package/dist/components/p-e8c19a64.js.map +0 -1
  271. package/dist/components/p-f9aeffc1.js +0 -12
  272. package/dist/components/p-f9aeffc1.js.map +0 -1
  273. package/dist/components/p-fd62879e.js +0 -3873
  274. package/dist/components/p-fd62879e.js.map +0 -1
  275. package/dist/components/p-fe9c3966.js +0 -39
  276. package/dist/components/p-fe9c3966.js.map +0 -1
  277. package/dist/components/pedido-finalizado.js +0 -50
  278. package/dist/components/pedido-finalizado.js.map +0 -1
  279. package/dist/components/phone-cancel-input.js +0 -55
  280. package/dist/components/phone-cancel-input.js.map +0 -1
  281. package/dist/components/phone-form.js +0 -8
  282. package/dist/components/phone-form.js.map +0 -1
  283. package/dist/components/phone-input-mask.js +0 -8
  284. package/dist/components/phone-input-mask.js.map +0 -1
  285. package/dist/components/phone-input.js +0 -55
  286. package/dist/components/phone-input.js.map +0 -1
  287. package/dist/components/pin-form.js +0 -8
  288. package/dist/components/pin-form.js.map +0 -1
  289. package/dist/crmbonus-component-wake/p-03b77c41.entry.js +0 -2
  290. package/dist/crmbonus-component-wake/p-03b77c41.entry.js.map +0 -1
  291. package/dist/crmbonus-component-wake/p-289a892a.entry.js +0 -2
  292. package/dist/crmbonus-component-wake/p-289a892a.entry.js.map +0 -1
  293. package/dist/crmbonus-component-wake/p-3d6152b1.js +0 -3
  294. package/dist/crmbonus-component-wake/p-3d6152b1.js.map +0 -1
  295. package/dist/crmbonus-component-wake/p-4f47b32c.entry.js +0 -2
  296. package/dist/crmbonus-component-wake/p-4f47b32c.entry.js.map +0 -1
  297. package/dist/crmbonus-component-wake/p-51a4fdbf.entry.js +0 -2
  298. package/dist/crmbonus-component-wake/p-620ec1a3.entry.js +0 -2
  299. package/dist/crmbonus-component-wake/p-620ec1a3.entry.js.map +0 -1
  300. package/dist/crmbonus-component-wake/p-74206c91.entry.js +0 -2
  301. package/dist/crmbonus-component-wake/p-74206c91.entry.js.map +0 -1
  302. package/dist/crmbonus-component-wake/p-75ba7b9a.js +0 -2
  303. package/dist/crmbonus-component-wake/p-75ba7b9a.js.map +0 -1
  304. package/dist/crmbonus-component-wake/p-7b7fb354.entry.js +0 -2
  305. package/dist/crmbonus-component-wake/p-7b7fb354.entry.js.map +0 -1
  306. package/dist/crmbonus-component-wake/p-7cfea8fe.js +0 -2
  307. package/dist/crmbonus-component-wake/p-7cfea8fe.js.map +0 -1
  308. package/dist/crmbonus-component-wake/p-8179aaa5.js +0 -2
  309. package/dist/crmbonus-component-wake/p-8179aaa5.js.map +0 -1
  310. package/dist/crmbonus-component-wake/p-885fc30e.entry.js +0 -2
  311. package/dist/crmbonus-component-wake/p-885fc30e.entry.js.map +0 -1
  312. package/dist/crmbonus-component-wake/p-90716188.entry.js +0 -2
  313. package/dist/crmbonus-component-wake/p-90716188.entry.js.map +0 -1
  314. package/dist/crmbonus-component-wake/p-a11e6510.entry.js +0 -2
  315. package/dist/crmbonus-component-wake/p-a11e6510.entry.js.map +0 -1
  316. package/dist/crmbonus-component-wake/p-b7a8f915.entry.js +0 -2
  317. package/dist/crmbonus-component-wake/p-b7a8f915.entry.js.map +0 -1
  318. package/dist/crmbonus-component-wake/p-ba369e65.js +0 -2
  319. package/dist/crmbonus-component-wake/p-ba369e65.js.map +0 -1
  320. package/dist/crmbonus-component-wake/p-be3ddacc.entry.js +0 -2
  321. package/dist/crmbonus-component-wake/p-be3ddacc.entry.js.map +0 -1
  322. package/dist/crmbonus-component-wake/p-e1255160.js +0 -2
  323. package/dist/crmbonus-component-wake/p-e1255160.js.map +0 -1
  324. package/dist/crmbonus-component-wake/p-e85698cd.entry.js +0 -2
  325. package/dist/crmbonus-component-wake/p-e85698cd.entry.js.map +0 -1
  326. package/dist/crmbonus-component-wake/p-e8c19a64.js +0 -2
  327. package/dist/crmbonus-component-wake/p-e8c19a64.js.map +0 -1
  328. package/dist/crmbonus-component-wake/p-f9aeffc1.js +0 -2
  329. package/dist/crmbonus-component-wake/p-f9aeffc1.js.map +0 -1
  330. package/dist/crmbonus-component-wake/p-fd62879e.js +0 -2
  331. package/dist/crmbonus-component-wake/p-fd62879e.js.map +0 -1
  332. package/dist/env.js +0 -5
  333. package/dist/env.js.map +0 -1
  334. package/dist/esm/app-modal.entry.js.map +0 -1
  335. package/dist/esm/cart.helper-dfef7b74.js +0 -47
  336. package/dist/esm/cart.helper-dfef7b74.js.map +0 -1
  337. package/dist/esm/countdown-timer_2.entry.js +0 -58
  338. package/dist/esm/countdown-timer_2.entry.js.map +0 -1
  339. package/dist/esm/crm-bonus-form.entry.js.map +0 -1
  340. package/dist/esm/crm-bonus-note.entry.js.map +0 -1
  341. package/dist/esm/crm-bonus.entry.js.map +0 -1
  342. package/dist/esm/crm-giftback-form_2.entry.js.map +0 -1
  343. package/dist/esm/crm-tooltip_4.entry.js +0 -204
  344. package/dist/esm/crm-tooltip_4.entry.js.map +0 -1
  345. package/dist/esm/crmbonus-component-wake.js +0 -22
  346. package/dist/esm/crmbonus-component-wake.js.map +0 -1
  347. package/dist/esm/crmbonus.service-31fd796c.js.map +0 -1
  348. package/dist/esm/giftback-finish_4.entry.js +0 -124
  349. package/dist/esm/giftback-finish_4.entry.js.map +0 -1
  350. package/dist/esm/index-e8724c8f.js +0 -1571
  351. package/dist/esm/index-e8724c8f.js.map +0 -1
  352. package/dist/esm/index.js +0 -3
  353. package/dist/esm/index.js.map +0 -1
  354. package/dist/esm/loader.js +0 -13
  355. package/dist/esm/loader.js.map +0 -1
  356. package/dist/esm/loading-spinner.entry.js.map +0 -1
  357. package/dist/esm/pedido-finalizado.entry.js.map +0 -1
  358. package/dist/esm/phone-cancel-input.entry.js.map +0 -1
  359. package/dist/esm/phone-input-mask.entry.js.map +0 -1
  360. package/dist/esm/phone-input.entry.js.map +0 -1
  361. package/dist/esm/utils-d642b4db.js +0 -21
  362. package/dist/esm/utils-d642b4db.js.map +0 -1
  363. package/dist/index.cjs.js +0 -1
  364. package/dist/index.js +0 -1
  365. /package/dist/{esm → crmbonus-component-wake}/app-globals-0f993ce5.js +0 -0
  366. /package/dist/{esm → crmbonus-component-wake}/app-globals-0f993ce5.js.map +0 -0
  367. /package/dist/{esm → crmbonus-component-wake}/index-5b567099.js +0 -0
  368. /package/dist/{esm → crmbonus-component-wake}/index-5b567099.js.map +0 -0
  369. /package/dist/{esm → crmbonus-component-wake}/info.config.helper-42d9ddf9.js +0 -0
  370. /package/dist/{esm → crmbonus-component-wake}/info.config.helper-42d9ddf9.js.map +0 -0
  371. /package/dist/{esm → crmbonus-component-wake}/keys.storage-8c76fcd7.js +0 -0
  372. /package/dist/{esm → crmbonus-component-wake}/keys.storage-8c76fcd7.js.map +0 -0
@@ -1,330 +0,0 @@
1
- import { p as proxyCustomElement, H, h } from './p-3e84f78c.js';
2
- import { C as CrmBonusService } from './p-fd62879e.js';
3
- import { S as StepFormEnum } from './p-7cfea8fe.js';
4
- import { i as instance } from './p-e8c19a64.js';
5
- import { g as getCart } from './p-8179aaa5.js';
6
- import { d as defineCustomElement$b } from './p-2b3b8d6b.js';
7
- import { d as defineCustomElement$a } from './p-47f9da55.js';
8
- import { d as defineCustomElement$9 } from './p-7f0cb052.js';
9
- import { d as defineCustomElement$8 } from './p-58b97429.js';
10
- import { d as defineCustomElement$7 } from './p-2671d669.js';
11
- import { d as defineCustomElement$6 } from './p-cc1ea33f.js';
12
- import { d as defineCustomElement$5 } from './p-fe9c3966.js';
13
- import { d as defineCustomElement$4 } from './p-6c546e48.js';
14
- import { d as defineCustomElement$3 } from './p-11085d9b.js';
15
- import { d as defineCustomElement$2 } from './p-83a12a8f.js';
16
-
17
- var AjustesTipoEnum;
18
- (function (AjustesTipoEnum) {
19
- AjustesTipoEnum["P"] = "Promocao";
20
- })(AjustesTipoEnum || (AjustesTipoEnum = {}));
21
-
22
- function buildProductsByWake(productsWake = []) {
23
- const products = [];
24
- for (const pw of productsWake) {
25
- let discounts = getDiscount(pw.Ajustes);
26
- products.push({
27
- sku: pw.SKU,
28
- value: (pw.PrecoPor * pw.Quantidade),
29
- productVariantId: pw.ProdutoVarianteId.toString(),
30
- quantity: pw.Quantidade,
31
- discount: (discounts * -1)
32
- });
33
- }
34
- return products;
35
- }
36
- function getDiscount(ajustes = []) {
37
- let discounts = 0;
38
- for (const discount of ajustes) {
39
- if (discount.Tipo === AjustesTipoEnum.P) {
40
- discounts += discount.Valor;
41
- }
42
- }
43
- return discounts;
44
- }
45
-
46
- const crmBonusCss = ".container-button.sc-crm-bonus{cursor:pointer;padding:5px 5px 5px 14px}.section-crm.sc-crm-bonus{border:1px solid #dbd4d4;text-align:-webkit-center;margin-bottom:20px}.section-cart-crm.sc-crm-bonus{margin-top:10px}.section-cart-crm.sc-crm-bonus p.sc-crm-bonus{padding:0;margin:0px 0px 0px 15px}.button.sc-crm-bonus{top:50%;background-color:#6c6c7e;color:#fff;border:none;padding:15px;min-height:30px;min-width:120px;font-size:20px;cursor:pointer;margin-left:10px;height:70px}.form-container.sc-crm-bonus{width:97%;display:flex;justify-content:space-around}.btn.sc-crm-bonus{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:0px}.form-container.sc-crm-bonus .btnCrm.sc-crm-bonus{background:#00162e;border-color:#00162e;width:30%;color:#fff}.message-alert.sc-crm-bonus{font-family:sans-serif;color:#df4d4d;margin-top:5px}";
47
- const CrmBonusStyle0 = crmBonusCss;
48
-
49
- const CrmBonus$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonus extends H {
50
- constructor() {
51
- super();
52
- this.__registerHost();
53
- this.crmBonusService = CrmBonusService.getInstance();
54
- this.showModal = false;
55
- this.cartWake = undefined;
56
- this.customer = {
57
- birthDate: "",
58
- document: "",
59
- name: "",
60
- phone: ""
61
- };
62
- this.loading = false;
63
- this.message = undefined;
64
- this.phone = undefined;
65
- this.canCancel = false;
66
- this.amountCancel = undefined;
67
- this.sent = undefined;
68
- this.session = undefined;
69
- this.loading_reprocess = false;
70
- }
71
- async resetBonus() {
72
- console.log('[START RESET BONUS]!!!!!');
73
- try {
74
- await this.crmBonusRef.processBonus(this.buildProducts(), true);
75
- console.log('[BONUS RESETADO]!!!!!');
76
- }
77
- catch (err) {
78
- this.loading = false;
79
- console.log('[error ao reprocessar bonous]');
80
- await this.crmBonusRef.setStep(StepFormEnum.STEP_PHONE);
81
- }
82
- finally {
83
- this.loading = false;
84
- }
85
- }
86
- async reprocess() {
87
- this.loading_reprocess = true;
88
- try {
89
- this.cartWake = await getCart();
90
- console.log('cart', this.cartWake);
91
- await this.resetBonus();
92
- }
93
- catch (err) {
94
- console.debug('[watchProducts]', err.message);
95
- }
96
- finally {
97
- this.loading_reprocess = false;
98
- }
99
- }
100
- // @Watch("productsInString")
101
- // async watchProducts(newValue: string) {
102
- // try {
103
- // console.log('[update products list]');
104
- // this.productsInString = newValue;
105
- // await this.handleLoad();
106
- // await this.resetBonus();
107
- // } catch (err) {
108
- // console.debug('[watchProducts]', err.message);
109
- // }
110
- // }
111
- async componentWillLoad() {
112
- instance.changeLanguage(instance.language);
113
- await this.handleLoad();
114
- await this.loadSession();
115
- await this.loadConfigStore();
116
- }
117
- async loadConfigStore() {
118
- await this.crmBonusService.getCustomization(this.cartWake.store.name);
119
- }
120
- async handleLoad() {
121
- try {
122
- this.cartWake = await getCart();
123
- console.log('cart', this.cartWake);
124
- if (this.cartWake.user.id) {
125
- this.customer = await this.crmBonusService.getCustomer(this.cartWake.user.id, this.cartWake.store.name);
126
- console.log('customer', this.customer);
127
- }
128
- const amount = localStorage.getItem(this.cartWake.id);
129
- if (amount) {
130
- this.canCancel = true;
131
- this.amountCancel = amount;
132
- }
133
- await this.buildAndGetProducts(this.cartWake.products);
134
- }
135
- catch (error) {
136
- console.log('info customer');
137
- }
138
- }
139
- async loadSession() {
140
- console.log('this.storeName', this.cartWake.store.name);
141
- this.session = await this.crmBonusService.getToken(this.cartWake.store.name);
142
- setTimeout(() => {
143
- this.loadSession();
144
- }, 1500000);
145
- }
146
- async buildAndGetProducts(productsWake) {
147
- const key = `bc-products:${this.cartWake.id}`;
148
- const productsString = JSON.stringify(productsWake);
149
- localStorage.setItem(key, productsString);
150
- const products_in_cache = JSON.parse(localStorage.getItem(key));
151
- const products = [];
152
- for (const product_cart of productsWake) {
153
- const [pro] = products_in_cache.filter(p => p.ProdutoVarianteId == product_cart.ProdutoVarianteId);
154
- const [ajuste = { Valor: 0 }] = pro.Ajustes.filter(aj => aj.Tipo === "Formula");
155
- if (pro) {
156
- products.push(Object.assign(Object.assign({}, product_cart), { PrecoPor: pro.PrecoPor + (ajuste.Valor * -1), Quantidade: pro.Quantidade, Ajustes: pro.Ajustes }));
157
- }
158
- else {
159
- products.push(product_cart);
160
- }
161
- }
162
- this.cartWake.products = products; //cache_products ? JSON.parse(cache_products) : JSON.parse(this.productsInString);
163
- }
164
- async sendPin(phone) {
165
- var _a, _b;
166
- this.loading = true;
167
- this.message = "";
168
- try {
169
- const _phone = phone.replace(/\D/g, '');
170
- this.phone = Number(_phone);
171
- this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.cartWake.store.name);
172
- await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);
173
- this.showModal = true;
174
- }
175
- catch (error) {
176
- this.message = (_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message;
177
- }
178
- finally {
179
- this.loading = false;
180
- }
181
- }
182
- async sendPinName(customerName) {
183
- var _a, _b;
184
- this.loading = true;
185
- this.message = "";
186
- try {
187
- this.customer.name = customerName;
188
- this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.cartWake.store.name);
189
- await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);
190
- this.showModal = true;
191
- }
192
- catch (error) {
193
- this.message = (_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message;
194
- }
195
- finally {
196
- this.loading = false;
197
- }
198
- }
199
- buildProducts() {
200
- return buildProductsByWake(this.cartWake.products);
201
- }
202
- handleCloseModal() {
203
- this.showModal = false;
204
- }
205
- save(amount) {
206
- localStorage.setItem(this.cartWake.id, amount.toString());
207
- this.canCancel = true;
208
- this.amountCancel = amount.toString();
209
- }
210
- async cancel() {
211
- this.message = "";
212
- this.loading = true;
213
- try {
214
- await this.crmBonusService.cancel(this.cartWake.id);
215
- this.canCancel = false;
216
- localStorage.removeItem(this.cartWake.id);
217
- }
218
- catch (error) {
219
- this.message = "Não consegui cancelar o bônus, tente novamente!";
220
- }
221
- finally {
222
- this.loading = false;
223
- }
224
- }
225
- async handleSendPin(phone) {
226
- this.message = "";
227
- if (!phone) {
228
- this.message = "Informe seu telefone";
229
- return;
230
- }
231
- this.customer.phone = phone;
232
- const _phone = phone.replace(/\D/g, '');
233
- this.phone = Number(_phone);
234
- if (this.customer.name) {
235
- return this.sendPin(phone);
236
- }
237
- await this.crmBonusRef.setStep(StepFormEnum.STEP_NAME);
238
- this.showModal = true;
239
- }
240
- render() {
241
- return (h("loading-container", { key: '67b0c86da1b59ec891a48bfcd4d7b0572c322cee', loading: this.loading_reprocess }, h("crm-giftback-form", { key: '59cddeaba1f47ea10aaa20371b33892b9b555304', style: { position: "relative" }, ref: ref => this.crmBonusRef = ref, storeName: this.cartWake.store.name, products: this.buildProducts(), cartId: this.cartWake.id, customer: this.customer, loadProducts: () => this.buildProducts() })));
242
- }
243
- static get assetsDirs() { return ["assets"]; }
244
- static get style() { return CrmBonusStyle0; }
245
- }, [2, "crm-bonus", {
246
- "showModal": [32],
247
- "cartWake": [32],
248
- "customer": [32],
249
- "loading": [32],
250
- "message": [32],
251
- "phone": [32],
252
- "canCancel": [32],
253
- "amountCancel": [32],
254
- "sent": [32],
255
- "session": [32],
256
- "loading_reprocess": [32],
257
- "resetBonus": [64],
258
- "reprocess": [64]
259
- }]);
260
- function defineCustomElement$1() {
261
- if (typeof customElements === "undefined") {
262
- return;
263
- }
264
- const components = ["crm-bonus", "countdown-timer", "crm-button", "crm-giftback-form", "crm-tooltip", "giftback-info", "loading-container", "loading-spinner", "phone-form", "phone-input-mask", "pin-form"];
265
- components.forEach(tagName => { switch (tagName) {
266
- case "crm-bonus":
267
- if (!customElements.get(tagName)) {
268
- customElements.define(tagName, CrmBonus$1);
269
- }
270
- break;
271
- case "countdown-timer":
272
- if (!customElements.get(tagName)) {
273
- defineCustomElement$b();
274
- }
275
- break;
276
- case "crm-button":
277
- if (!customElements.get(tagName)) {
278
- defineCustomElement$a();
279
- }
280
- break;
281
- case "crm-giftback-form":
282
- if (!customElements.get(tagName)) {
283
- defineCustomElement$9();
284
- }
285
- break;
286
- case "crm-tooltip":
287
- if (!customElements.get(tagName)) {
288
- defineCustomElement$8();
289
- }
290
- break;
291
- case "giftback-info":
292
- if (!customElements.get(tagName)) {
293
- defineCustomElement$7();
294
- }
295
- break;
296
- case "loading-container":
297
- if (!customElements.get(tagName)) {
298
- defineCustomElement$6();
299
- }
300
- break;
301
- case "loading-spinner":
302
- if (!customElements.get(tagName)) {
303
- defineCustomElement$5();
304
- }
305
- break;
306
- case "phone-form":
307
- if (!customElements.get(tagName)) {
308
- defineCustomElement$4();
309
- }
310
- break;
311
- case "phone-input-mask":
312
- if (!customElements.get(tagName)) {
313
- defineCustomElement$3();
314
- }
315
- break;
316
- case "pin-form":
317
- if (!customElements.get(tagName)) {
318
- defineCustomElement$2();
319
- }
320
- break;
321
- } });
322
- }
323
- defineCustomElement$1();
324
-
325
- const CrmBonus = CrmBonus$1;
326
- const defineCustomElement = defineCustomElement$1;
327
-
328
- export { CrmBonus, defineCustomElement };
329
-
330
- //# sourceM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AC5B,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAE5B,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;YACtB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;SAC3B;QAED,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QACvD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;KACvB;IAED,MAAM;QAEJ,QACE,0EAAmB,OAAO,EAAE,IAAI,CAAC,iBAAiB,IAChD,0EACE,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,EAC/B,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,WAAW,GAAG,GAAG,EAClC,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EACnC,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,EAC9B,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,EACxB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,YAAY,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,GAExC,CACgB,EACrB;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CrmBonus","i18next"],"sources":["src/dto/validate.pin.bonus.ts","src/helpers/build.payload.helper.ts","src/components/crm-bonus/crm-bonus.css?tag=crm-bonus&encapsulation=scoped","src/components/crm-bonus/crm-bonus.tsx"],"sourcesContent":["export interface IProduct {\n productVariantId: string;\n sku: string;\n value: number;\n quantity: number;\n discount: number;\n}\n\nexport enum AjustesTipoEnum {\n P = \"Promocao\" \n}\n\nexport interface IAjustes {\n Tipo: AjustesTipoEnum;\n Valor: number;\n}\n\nexport interface IUser {\n id: number;\n}\n\nexport interface IStore {\n name: string;\n}\n\nexport interface IProductWake {\n ProdutoVarianteId: number;\n SKU: string;\n PrecoPor: number;\n Quantidade: number;\n Ajustes: IAjustes[];\n}\n\nexport interface ICustomer {\n birthDate: string;\n document: string;\n name: string;\n phone: string;\n}\n\nexport interface IProccesPinBonusDto {\n storeName: string;\n name: string;\n checkoutId: string;\n checkoutProducts: Array<IProduct>;\n storeId: string;\n userId: string;\n cellphone: number;\n pin: string;\n\n}\n\nexport interface IBonus {\n hasBonus: boolean;\n bonusBalance: number;\n totalBonus: number;\n minimumPurchase: number;\n bonusIds: string;\n firstValidityDate: string\n history: [\n {\n validityStart: string;\n validityEnd: string;\n value: number\n },\n {\n validityStart: string;\n validityEnd: string\n value: number\n }\n ]\n storeId: number;\n userId: number;\n cartId: string\n calculatedValue: number;\n totalValue: number\n}\n\n\nexport interface IReserveDTO {\n storeName: string;\n cartId: string;\n grossValue: number;\n redeemedBonus: number;\n ticket: string;\n storeId: string;\n userId: number;\n}","import { AjustesTipoEnum, IAjustes, IProduct, IProductWake } from \"../dto/validate.pin.bonus\";\n\nexport function buildProductsByWake(productsWake: Array<IProductWake> = []): Array<IProduct> {\n\n const products: Array<IProduct> = [];\n\n for ( const pw of productsWake ) {\n let discounts = getDiscount(pw.Ajustes)\n\n products.push(\n {\n sku: pw.SKU,\n value: (pw.PrecoPor * pw.Quantidade),\n productVariantId: pw.ProdutoVarianteId.toString(),\n quantity: pw.Quantidade,\n discount: (discounts * -1)\n }\n )\n }\n\n return products;\n}\n\nfunction getDiscount(ajustes: IAjustes[] = []) {\n \n let discounts = 0;\n \n for(const discount of ajustes) {\n if(discount.Tipo === AjustesTipoEnum.P) {\n discounts += discount.Valor;\n }\n }\n\n return discounts;\n}","\n.container-button {\n /* max-width: 100%; */\n cursor: pointer;\n padding: 5px 5px 5px 14px;\n /* display: flex; */\n}\n\n/* padding: 0 15px 15px;\nborder: 1px solid #ddd;\nmargin-bottom: 20px; */\n\n.section-crm {\n border: 1px solid #dbd4d4;\n /* min-height: 50px; */\n text-align: -webkit-center;\n margin-bottom: 20px;\n}\n\n.section-cart-crm {\n margin-top: 10px;\n}\n\n.section-cart-crm p {\n padding: 0;\n margin: 0px 0px 0px 15px;\n}\n\n.button {\n top: 50%;\n background-color: #6c6c7e;\n color: #fff;\n border: none;\n /* border-radius: 10px; */\n padding: 15px;\n min-height: 30px;\n min-width: 120px;\n font-size: 20px;\n cursor: pointer;\n margin-left: 10px;\n height: 70px;\n}\n\n.form-container {\n width: 97%;\n display: flex;\n justify-content: space-around;\n}\n\n\n.btn {\n display: inline-block;\n padding: 6px 12px;\n margin-bottom: 0;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.42857143;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 0px;\n}\n\n.form-container .btnCrm {\n background: #00162e;\n border-color: #00162e;\n width: 30%;\n color: #fff;\n}\n\n.message-alert {\n font-family: sans-serif;\n color: #df4d4d;\n margin-top: 5px;\n}","import { Component, Method, Prop, State, h } from '@stencil/core';\nimport { IProduct, IProductWake, ICustomer } from '../../dto/validate.pin.bonus';\nimport { CrmBonusService } from '../../services/crmbonus.service';\nimport { IPinSent } from '../../components';\nimport { StepFormEnum } from '../../contants';\n\nimport i18next from '../../i18n/i18n'\nimport { buildProductsByWake } from '../../helpers/build.payload.helper';\nimport { getCart } from '../../helpers/cart.helper';\nimport { CartWake } from '../../objectvalues/cart.wake';\n\n@Component({\n tag: 'crm-bonus',\n styleUrl: 'crm-bonus.css',\n scoped: true,\n assetsDirs: ['assets']\n})\nexport class CrmBonus {\n\n private crmBonusService: CrmBonusService = CrmBonusService.getInstance();\n\n private crmBonusRef: HTMLCrmGiftbackFormElement;\n\n @State() showModal: boolean = false;\n \n @State() cartWake: CartWake;\n \n @State() customer: ICustomer = {\n birthDate: \"\",\n document: \"\",\n name: \"\",\n phone: \"\"\n };\n\n @State() loading: boolean = false;\n @State() message: string;\n @State() phone: number;\n @State() canCancel: boolean = false;\n @State() amountCancel: string;\n @State() sent: IPinSent;\n\n @State() session: string;\n @State() loading_reprocess = false;\n\n @Method()\n async resetBonus() {\n console.log('[START RESET BONUS]!!!!!');\n \n try {\n await this.crmBonusRef.processBonus(this.buildProducts(), true);\n console.log('[BONUS RESETADO]!!!!!');\n } catch (err) {\n\n this.loading = false;\n console.log('[error ao reprocessar bonous]');\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PHONE);\n } finally {\n this.loading = false;\n }\n }\n\n @Method()\n async reprocess() {\n this.loading_reprocess = true\n\n try {\n\n this.cartWake = await getCart();\n\n console.log('cart', this.cartWake)\n\n await this.resetBonus();\n } catch (err) {\n console.debug('[watchProducts]', err.message);\n } finally {\n this.loading_reprocess = false\n }\n }\n\n // @Watch(\"productsInString\")\n // async watchProducts(newValue: string) {\n // try {\n // console.log('[update products list]');\n // this.productsInString = newValue;\n // await this.handleLoad();\n\n // await this.resetBonus();\n // } catch (err) {\n // console.debug('[watchProducts]', err.message);\n // }\n // }\n\n async componentWillLoad() {\n i18next.changeLanguage(i18next.language);\n\n await this.handleLoad();\n\n await this.loadSession();\n await this.loadConfigStore()\n }\n\n async loadConfigStore() {\n await this.crmBonusService.getCustomization(this.cartWake.store.name);\n }\n\n async handleLoad() {\n try {\n\n this.cartWake = await getCart();\n\n console.log('cart', this.cartWake)\n\n if (this.cartWake.user.id) {\n this.customer = await this.crmBonusService.getCustomer(this.cartWake.user.id, this.cartWake.store.name);\n console.log('customer', this.customer);\n }\n\n const amount = localStorage.getItem(this.cartWake.id);\n\n if (amount) {\n this.canCancel = true;\n this.amountCancel = amount;\n }\n\n await this.buildAndGetProducts(this.cartWake.products);\n } catch (error) {\n console.log('info customer')\n }\n }\n\n async loadSession() {\n console.log('this.storeName', this.cartWake.store.name)\n this.session = await this.crmBonusService.getToken(this.cartWake.store.name);\n\n setTimeout(() => {\n this.loadSession()\n }, 1500000)\n\n }\n\n async buildAndGetProducts(productsWake: IProductWake[]) {\n\n const key = `bc-products:${this.cartWake.id}`;\n\n const productsString = JSON.stringify(productsWake)\n\n localStorage.setItem(key, productsString);\n\n const products_in_cache = JSON.parse(localStorage.getItem(key));\n\n const products: Array<IProductWake> = []\n\n for (const product_cart of productsWake) {\n\n const [pro] = products_in_cache.filter(p => p.ProdutoVarianteId == product_cart.ProdutoVarianteId)\n\n const [ajuste = { Valor: 0 }] = pro.Ajustes.filter(aj => aj.Tipo === \"Formula\")\n\n if (pro) {\n products.push({\n ...product_cart,\n PrecoPor: pro.PrecoPor + (ajuste.Valor * -1),\n Quantidade: pro.Quantidade,\n Ajustes: pro.Ajustes\n })\n } else {\n products.push(product_cart)\n }\n\n }\n\n this.cartWake.products = products; //cache_products ? JSON.parse(cache_products) : JSON.parse(this.productsInString);\n\n }\n\n public async sendPin(phone: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n\n this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.cartWake.store.name);;\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n public async sendPinName(customerName: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n this.customer.name = customerName;\n\n this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.cartWake.store.name);\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n buildProducts(): IProduct[] {\n return buildProductsByWake(this.cartWake.products);\n }\n\n handleCloseModal() {\n this.showModal = false;\n }\n\n save(amount: number) {\n localStorage.setItem(this.cartWake.id, amount.toString());\n this.canCancel = true;\n this.amountCancel = amount.toString()\n }\n\n async cancel() {\n this.message = \"\";\n this.loading = true;\n try {\n await this.crmBonusService.cancel(this.cartWake.id);\n this.canCancel = false;\n\n localStorage.removeItem(this.cartWake.id);\n } catch (error) {\n this.message = \"Não consegui cancelar o bônus, tente novamente!\"\n } finally {\n this.loading = false;\n }\n }\n\n async handleSendPin(phone: string) {\n this.message = \"\"\n if (!phone) {\n this.message = \"Informe seu telefone\";\n return;\n }\n\n this.customer.phone = phone;\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n\n if (this.customer.name) {\n return this.sendPin(phone)\n }\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_NAME);\n this.showModal = true;\n }\n\n render() {\n\n return (\n <loading-container loading={this.loading_reprocess} >\n <crm-giftback-form\n style={{ position: \"relative\" }}\n ref={ref => this.crmBonusRef = ref}\n storeName={this.cartWake.store.name}\n products={this.buildProducts()}\n cartId={this.cartWake.id}\n customer={this.customer}\n loadProducts={() => this.buildProducts()}\n\n />\n </loading-container>\n )\n }\n}\n"],"version":3}
@@ -1,8 +0,0 @@
1
- import { B as Button, d as defineCustomElement$1 } from './p-47f9da55.js';
2
-
3
- const CrmButton = Button;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { CrmButton, defineCustomElement };
7
-
8
- //# sourceMappingURL=crm-button.js.map
@@ -1 +0,0 @@
1
- {"file":"crm-button.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,8 +0,0 @@
1
- import { C as CrmBonus, d as defineCustomElement$1 } from './p-7f0cb052.js';
2
-
3
- const CrmGiftbackForm = CrmBonus;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { CrmGiftbackForm, defineCustomElement };
7
-
8
- //# sourceMappingURL=crm-giftback-form.js.map
@@ -1 +0,0 @@
1
- {"file":"crm-giftback-form.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,8 +0,0 @@
1
- import { T as Tooltip, d as defineCustomElement$1 } from './p-58b97429.js';
2
-
3
- const CrmTooltip = Tooltip;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { CrmTooltip, defineCustomElement };
7
-
8
- //# sourceMappingURL=crm-tooltip.js.map
@@ -1 +0,0 @@
1
- {"file":"crm-tooltip.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,8 +0,0 @@
1
- import { G as GiftbackFinish$1, d as defineCustomElement$1 } from './p-b79c86a8.js';
2
-
3
- const GiftbackFinish = GiftbackFinish$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { GiftbackFinish, defineCustomElement };
7
-
8
- //# sourceMappingURL=giftback-finish.js.map
@@ -1 +0,0 @@
1
- {"file":"giftback-finish.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,8 +0,0 @@
1
- import { G as GiftbackInfo$1, d as defineCustomElement$1 } from './p-2671d669.js';
2
-
3
- const GiftbackInfo = GiftbackInfo$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { GiftbackInfo, defineCustomElement };
7
-
8
- //# sourceMappingURL=giftback-info.js.map
@@ -1 +0,0 @@
1
- {"file":"giftback-info.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,8 +0,0 @@
1
- import { G as GiftbackPin$1, d as defineCustomElement$1 } from './p-6186ddcc.js';
2
-
3
- const GiftbackPin = GiftbackPin$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { GiftbackPin, defineCustomElement };
7
-
8
- //# sourceMappingURL=giftback-pin.js.map
@@ -1 +0,0 @@
1
- {"file":"giftback-pin.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,8 +0,0 @@
1
- import { G as GiftbackProgress$1, d as defineCustomElement$1 } from './p-7c744cca.js';
2
-
3
- const GiftbackProgress = GiftbackProgress$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { GiftbackProgress, defineCustomElement };
7
-
8
- //# sourceMappingURL=giftback-progress.js.map
@@ -1 +0,0 @@
1
- {"file":"giftback-progress.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,4 +0,0 @@
1
- export { g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-3e84f78c.js';
2
- export { f as format } from './p-ba369e65.js';
3
-
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"file":"index.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,8 +0,0 @@
1
- import { L as LoadingContainer$1, d as defineCustomElement$1 } from './p-cc1ea33f.js';
2
-
3
- const LoadingContainer = LoadingContainer$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { LoadingContainer, defineCustomElement };
7
-
8
- //# sourceMappingURL=loading-container.js.map
@@ -1 +0,0 @@
1
- {"file":"loading-container.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,8 +0,0 @@
1
- import { L as LoadingSpinner$1, d as defineCustomElement$1 } from './p-fe9c3966.js';
2
-
3
- const LoadingSpinner = LoadingSpinner$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { LoadingSpinner, defineCustomElement };
7
-
8
- //# sourceMappingURL=loading-spinner.js.map
@@ -1 +0,0 @@
1
- {"file":"loading-spinner.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,8 +0,0 @@
1
- import { N as NameInput$1, d as defineCustomElement$1 } from './p-246a3e9d.js';
2
-
3
- const NameInput = NameInput$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { NameInput, defineCustomElement };
7
-
8
- //# sourceMappingURL=name-input.js.map
@@ -1 +0,0 @@
1
- {"file":"name-input.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,79 +0,0 @@
1
- import { p as proxyCustomElement, H, h } from './p-3e84f78c.js';
2
- import { M as MESSAGE_ERROR_INVALID_NUMBER } from './p-7cfea8fe.js';
3
-
4
- const phoneInputMaskCss = "*{margin:0;padding:0;box-sizing:border-box}.phone{display:block;width:100%;height:24px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:0px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);-webkit-transition:border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s}.phone-input-form{width:100%;height:48px;padding:13px 16px 13px 16px;border:1px solid #CCCCCC;font-size:14px}.crm-erro-msg{color:#E11D48;font-size:12px;font-weight:500;margin-top:11px}";
5
- const PhoneInputMaskStyle0 = phoneInputMaskCss;
6
-
7
- const PhoneInputMask = /*@__PURE__*/ proxyCustomElement(class PhoneInputMask extends H {
8
- constructor() {
9
- super();
10
- this.__registerHost();
11
- this.__attachShadow();
12
- this.phone = '';
13
- this.message = "";
14
- this.initialValue = undefined;
15
- this.disabled = undefined;
16
- }
17
- componentWillLoad() {
18
- this.phone = this.initialValue;
19
- }
20
- formatPhone(value) {
21
- const cleaned = value.replace(/\D/g, ''); // Remove tudo que não for número
22
- const match = cleaned.match(/^(\d{0,2})(\d{0,5})(\d{0,4})$/);
23
- if (!match)
24
- return value;
25
- const part1 = match[1] ? `(${match[1]}` : '';
26
- const part2 = match[2] ? `) ${match[2]}` : '';
27
- const part3 = match[3] ? ` ${match[3]}` : '';
28
- return `${part1}${part2}${part3}`;
29
- }
30
- handleInput(event) {
31
- const input = event.target;
32
- this.phone = this.formatPhone(input.value);
33
- if (!this.validatePhoneNumber(input.value)) {
34
- this.message = MESSAGE_ERROR_INVALID_NUMBER;
35
- }
36
- else {
37
- this.message = "";
38
- }
39
- console.log('phone', this.phone);
40
- }
41
- validatePhoneNumber(phone) {
42
- if (phone.length < 15) {
43
- return true;
44
- }
45
- const phoneRegex = /^\(\d{2}\) \d{5} \d{4}$/; // Valida formato (99) 99999-9999
46
- return phoneRegex.test(phone);
47
- }
48
- async getPhone() {
49
- return this.phone;
50
- }
51
- render() {
52
- return (h("div", { key: '44d9a3f88829cdf269da2ea029ca81197a9ca31e' }, h("input", { key: '4af46e5c7eb38f108f3a3b58937b3b5560a0757d', disabled: this.disabled, id: "phone", type: "text", class: "phone-input-form", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(99) 99999 9999" }), h("p", { key: '5058284a0a7bda9e750cbf4e1134fdc47c7de83e', class: "crm-erro-msg" }, this.message)));
53
- }
54
- static get style() { return PhoneInputMaskStyle0; }
55
- }, [1, "phone-input-mask", {
56
- "initialValue": [1, "initial-value"],
57
- "disabled": [4],
58
- "phone": [32],
59
- "message": [32],
60
- "getPhone": [64]
61
- }]);
62
- function defineCustomElement() {
63
- if (typeof customElements === "undefined") {
64
- return;
65
- }
66
- const components = ["phone-input-mask"];
67
- components.forEach(tagName => { switch (tagName) {
68
- case "phone-input-mask":
69
- if (!customElements.get(tagName)) {
70
- customElements.define(tagName, PhoneInputMask);
71
- }
72
- break;
73
- } });
74
- }
75
- defineCustomElement();
76
-
77
- export { PhoneInputMask as P, defineCustomElement as d };
78
-
79
- //# sourceMappingURL=p-11085d9b.js.map
@@ -1 +0,0 @@
1
- {"file":"p-11085d9b.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,kvBAAkvB,CAAC;AAC7wB,6BAAe,iBAAiB;;MCOnB,cAAc;;;;;qBACE,EAAE;uBACA,EAAE;;;;IAK7B,iBAAiB;QACb,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;KAClC;IAEO,WAAW,CAAC,KAAa;QAE7B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACzC,MAAM,KAA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AAC,QAAQ,EACvB,EAAE,EAAC,OAAO,EACV,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,kBAAkB,EACxB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAC3C,WAAW,EAAC,iBAAiB,GAC/B,EACF,0DAAG,KAAK,EAAC,cAAc,IAAE,IAAI,CAAC,OAAO,CAAK,CACxC,EAER;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/phone/phone-input-mask.css?tag=phone-input-mask&encapsulation=shadow","src/components/phone/phone-input-mask.tsx"],"sourcesContent":["* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\n.phone {\n display: block;\n width: 100%;\n height: 24px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 0px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n\n\n.phone-input-form {\n width: 100%;\n height: 48px;\n padding: 13px 16px 13px 16px;\n border: 1px solid #CCCCCC;\n font-size: 14px;\n}\n\n.crm-erro-msg {\n color: #E11D48;\n font-size: 12px;\n font-weight: 500;\n margin-top: 11px;\n}\n","import { Component, h, Method, Prop, State } from '@stencil/core';\nimport { MESSAGE_ERROR_INVALID_NUMBER } from '../../contants';\n\n@Component({\n tag: 'phone-input-mask',\n styleUrl: 'phone-input-mask.css',\n shadow: true,\n})\nexport class PhoneInputMask {\n @State() phone: string = '';\n @State() message: string = \"\";\n\n @Prop() initialValue: string;\n @Prop() disabled: boolean;\n\n componentWillLoad() {\n this.phone = this.initialValue;\n }\n\n private formatPhone(value: string): string {\n\n const cleaned = value.replace(/\\D/g, ''); // Remove tudo que não for número\n const match = cleaned.match(/^(\\d{0,2})(\\d{0,5})(\\d{0,4})$/);\n\n if (!match) return value;\n\n const part1 = match[1] ? `(${match[1]}` : '';\n const part2 = match[2] ? `) ${match[2]}` : '';\n const part3 = match[3] ? ` ${match[3]}` : '';\n\n return `${part1}${part2}${part3}`;\n }\n\n private handleInput(event: Event): void {\n const input = event.target as HTMLInputElement;\n this.phone = this.formatPhone(input.value);\n\n if(!this.validatePhoneNumber(input.value)) {\n this.message = MESSAGE_ERROR_INVALID_NUMBER\n } else {\n this.message = \"\"\n }\n\n console.log('phone', this.phone)\n }\n\n validatePhoneNumber(phone: string): boolean {\n if(phone.length < 15) {\n return true\n }\n const phoneRegex = /^\\(\\d{2}\\) \\d{5} \\d{4}$/; // Valida formato (99) 99999-9999\n return phoneRegex.test(phone);\n }\n\n @Method()\n public async getPhone() {\n return this.phone;\n }\n\n render() {\n return (\n <div>\n <input\n disabled={this.disabled}\n id=\"phone\"\n type=\"text\"\n class=\"phone-input-form\"\n value={this.phone}\n onInput={(event) => this.handleInput(event)}\n placeholder=\"(99) 99999 9999\"\n />\n <p class=\"crm-erro-msg\">{this.message}</p>\n </div>\n\n );\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"p-246a3e9d.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,wpDAAwpD,CAAC;AAC9qD,wBAAe,YAAY;;MCKd,SAAS;;;;;;;;;;;IAWlB,gBAAgB,CAAC,KAAU;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;KACtC;IAGD,aAAa,CAAC,IAAY;QACtB,IAAG,CAAC,IAAI,EAAE;YACN,IAAI,CAAC,OAAO,GAAG,kBAAkB,CAAC;YAClC,OAAM;SACT;QAED,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;KACxB;IAED,MAAM;QACF,QACI,4DAAK,KAAK,EAAC,gBAAgB,IACvB,wEAAgB,EAChB,8DAAO,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAI,EAEnH,4DAAK,IAAI,CAAC,OAAO,CAAM,EAMvB,4DAAK,KAAK,EAAC,eAAe,IACtB,+DAAQ,KAAK,EAAC,eAAe,EAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,eAEzE,EACT,+DAAQ,KAAK,EAAE,UAAU,IAAI,CAAC,OAAO,GAAG,UAAU,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,IAE5H,CAAC,IAAI,CAAC,OAAO,GAAG,UAAU,GAAG,uBAAiB,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,GAAG,CAExE,CACP,CACJ,EACT;KACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/crm-bonus-form/subcomponents/name-input/name-input.css?tag=name-input","src/components/crm-bonus-form/subcomponents/name-input/name-input.tsx"],"sourcesContent":[".bc-form-control {\n display: block;\n width: 90%;\n height: 24px;\n padding: 7px 18px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 0px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n\n.bc-btn {\n display: inline-block;\n padding: 6px 12px;\n margin-bottom: 0;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.42857143;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 0px;\n}\n\n.bc-btn-process {\n background: #00162e;\n border-color: #00162e;\n width: 30%;\n color: #fff;\n}\n\n.bc-footer-btn {\n display: flex;\n justify-content: end;\n margin: 11px;\n}\n\n.name-container {\n font-weight: bold;\n color: #494545;\n}\n\n\nbutton {\n padding: 10px 20px;\n background-color: #ddd;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n}\n\nbutton:hover {\n background-color: #bbb;\n}\n\n.success {\n color: green;\n margin-top: 10px;\n}\n\n.button {\n top: 50%;\n background-color: #6c6c7e;\n color: #fff;\n border: none;\n border-radius: 10px;\n padding: 11px;\n min-width: 120px;\n font-size: 20px;\n cursor: pointer;\n}\n\n.button-cancel {\n top: 50%;\n background-color: #ffffff;\n color: #1e1c1c;\n border: 1px solid gray;\n border-radius: 10px;\n padding: 10px;\n min-height: 30px;\n min-width: 120px;\n font-size: 19px;\n cursor: pointer;\n}\n\n.footer-button {\n display: flex;\n justify-content: space-between;\n width: 97%;\n margin-top: 14px;\n}","import { Component, Prop, State, h } from \"@stencil/core\";\n\n@Component({\n tag: 'name-input',\n styleUrl: 'name-input.css'\n})\nexport class NameInput {\n\n @Prop() value: string;\n\n @Prop() loading: boolean;\n @Prop() applyName: (value: string) => void;\n @Prop() cancel: () => void;\n \n @State() newValue: string;\n @State() message: string;\n\n handleChangeName(event: any) {\n this.newValue = event.target.value;\n }\n\n\n handleSetName(name: string) {\n if(!name) {\n this.message = \"Informe seu nome\";\n return\n }\n\n this.applyName(name);\n }\n\n render() {\n return (\n <div class=\"name-container\">\n <p>Seu Nome:</p>\n <input class=\"bc-form-control\" type=\"text\" value={this.value} onChange={(event) => this.handleChangeName(event)} />\n\n <p>{ this.message }</p>\n\n {/* <div class=\"bc-footer-btn\">\n <button class=\"bc-btn bc-btn-process\" onClick={() => this.applyName(this.newValue)} >Prosseguir</button>\n </div> */}\n\n <div class=\"footer-button\">\n <button class=\"button-cancel\" disabled={this.loading} onClick={() => this.cancel()}>\n Cancelar\n </button>\n <button class={`button ${this.loading ? 'disabled' : ''} `} disabled={this.loading} onClick={() => this.handleSetName(this.newValue)}>\n {\n !this.loading ? \"Continua\" : <loading-spinner size=\"15px\" color=\"#fff\" />\n }\n </button>\n </div>\n </div>\n )\n }\n}"],"version":3}