crmbonus-component-wake 2.0.116 → 2.0.117

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 (366) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  2. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  3. package/dist/cjs/app-modal.cjs.entry.js +28 -0
  4. package/dist/cjs/app-modal.cjs.entry.js.map +1 -0
  5. package/dist/cjs/cart.helper-63c75a64.js +53 -0
  6. package/dist/cjs/cart.helper-63c75a64.js.map +1 -0
  7. package/dist/cjs/countdown-timer_2.cjs.entry.js +63 -0
  8. package/dist/cjs/countdown-timer_2.cjs.entry.js.map +1 -0
  9. package/dist/cjs/crm-bonus-form.cjs.entry.js +104 -0
  10. package/dist/cjs/crm-bonus-form.cjs.entry.js.map +1 -0
  11. package/dist/cjs/crm-bonus-note.cjs.entry.js +103 -0
  12. package/dist/cjs/crm-bonus-note.cjs.entry.js.map +1 -0
  13. package/dist/cjs/crm-bonus.cjs.entry.js +244 -0
  14. package/dist/cjs/crm-bonus.cjs.entry.js.map +1 -0
  15. package/dist/cjs/crm-giftback-form_2.cjs.entry.js +253 -0
  16. package/dist/{crmbonus-component-wake/crm-giftback-form.entry.js.map → cjs/crm-giftback-form_2.cjs.entry.js.map} +1 -1
  17. package/dist/cjs/crm-tooltip_4.cjs.entry.js +211 -0
  18. package/dist/cjs/crm-tooltip_4.cjs.entry.js.map +1 -0
  19. package/dist/cjs/crmbonus-component-wake.cjs.js +27 -0
  20. package/dist/cjs/crmbonus-component-wake.cjs.js.map +1 -0
  21. package/dist/cjs/crmbonus.service-566fc43f.js +3877 -0
  22. package/dist/cjs/crmbonus.service-566fc43f.js.map +1 -0
  23. package/dist/cjs/giftback-finish_4.cjs.entry.js +131 -0
  24. package/dist/cjs/giftback-finish_4.cjs.entry.js.map +1 -0
  25. package/dist/cjs/i18n-f2a6f60e.js +2219 -0
  26. package/dist/cjs/i18n-f2a6f60e.js.map +1 -0
  27. package/dist/cjs/index-6054ed44.js +21 -0
  28. package/dist/cjs/index-6054ed44.js.map +1 -0
  29. package/dist/cjs/index-d11684bd.js +1599 -0
  30. package/dist/cjs/index-d11684bd.js.map +1 -0
  31. package/dist/cjs/index.cjs.js +11 -0
  32. package/dist/cjs/index.cjs.js.map +1 -0
  33. package/dist/cjs/info.config.helper-c5d9f781.js +16 -0
  34. package/dist/cjs/info.config.helper-c5d9f781.js.map +1 -0
  35. package/dist/cjs/keys.storage-de7744aa.js +17 -0
  36. package/dist/cjs/keys.storage-de7744aa.js.map +1 -0
  37. package/dist/cjs/loader.cjs.js +17 -0
  38. package/dist/cjs/loader.cjs.js.map +1 -0
  39. package/dist/cjs/loading-spinner.cjs.entry.js +24 -0
  40. package/dist/cjs/loading-spinner.cjs.entry.js.map +1 -0
  41. package/dist/cjs/pedido-finalizado.cjs.entry.js +39 -0
  42. package/dist/cjs/pedido-finalizado.cjs.entry.js.map +1 -0
  43. package/dist/cjs/phone-cancel-input.cjs.entry.js +25 -0
  44. package/dist/cjs/phone-cancel-input.cjs.entry.js.map +1 -0
  45. package/dist/cjs/phone-input-mask.cjs.entry.js +61 -0
  46. package/dist/cjs/phone-input-mask.cjs.entry.js.map +1 -0
  47. package/dist/cjs/phone-input.cjs.entry.js +25 -0
  48. package/dist/cjs/phone-input.cjs.entry.js.map +1 -0
  49. package/dist/cjs/utils-e9413ee3.js +25 -0
  50. package/dist/cjs/utils-e9413ee3.js.map +1 -0
  51. package/dist/collection/assets/svg/info-circle-svgrepo-com.svg +6 -0
  52. package/dist/collection/assets/svg/money-dollars-svgrepo-com.svg +6 -0
  53. package/dist/collection/collection-manifest.json +32 -0
  54. package/dist/collection/components/button/crm-button.css +22 -0
  55. package/dist/collection/components/button/index.js +76 -0
  56. package/dist/collection/components/button/index.js.map +1 -0
  57. package/dist/collection/components/countdown-timer/countdown-timer.js +81 -0
  58. package/dist/collection/components/countdown-timer/countdown-timer.js.map +1 -0
  59. package/dist/collection/components/crm-bonus/assets/logo.svg +18 -0
  60. package/dist/collection/components/crm-bonus/assets/success-svgrepo-com.svg +8 -0
  61. package/dist/collection/components/crm-bonus/assets/svg/logo.svg +18 -0
  62. package/dist/collection/components/crm-bonus/assets/svg/success-svgrepo-com.svg +8 -0
  63. package/dist/collection/components/crm-bonus/crm-bonus.css +84 -0
  64. package/dist/collection/components/crm-bonus/crm-bonus.js +290 -0
  65. package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -0
  66. package/dist/collection/components/crm-bonus-form/crm-bonus-form.css +19 -0
  67. package/dist/collection/components/crm-bonus-form/crm-bonus-form.js +348 -0
  68. package/dist/collection/components/crm-bonus-form/crm-bonus-form.js.map +1 -0
  69. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.css +10 -0
  70. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js +20 -0
  71. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js.map +1 -0
  72. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.css +70 -0
  73. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js +126 -0
  74. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js.map +1 -0
  75. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.css +110 -0
  76. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js +127 -0
  77. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js.map +1 -0
  78. package/dist/collection/components/crm-bonus-form/subcomponents/name-input/name-input.css +108 -0
  79. package/dist/collection/components/crm-bonus-form/subcomponents/name-input/name-input.js +110 -0
  80. package/dist/collection/components/crm-bonus-form/subcomponents/name-input/name-input.js.map +1 -0
  81. package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js +75 -0
  82. package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js.map +1 -0
  83. package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js +75 -0
  84. package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js.map +1 -0
  85. package/dist/collection/components/giftback-form/giftback-form.css +75 -0
  86. package/dist/collection/components/giftback-form/giftback-form.js +410 -0
  87. package/dist/collection/components/giftback-form/giftback-form.js.map +1 -0
  88. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.css +181 -0
  89. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js +221 -0
  90. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js.map +1 -0
  91. package/dist/collection/components/giftback-form/subcomponents/giftback-message/giftback-massage.js +11 -0
  92. package/dist/collection/components/giftback-form/subcomponents/giftback-message/giftback-massage.js.map +1 -0
  93. package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js +103 -0
  94. package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js.map +1 -0
  95. package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.css +84 -0
  96. package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js +197 -0
  97. package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js.map +1 -0
  98. package/dist/collection/components/loading-container/loading-container.css +47 -0
  99. package/dist/collection/components/loading-container/loading-container.js +43 -0
  100. package/dist/collection/components/loading-container/loading-container.js.map +1 -0
  101. package/dist/collection/components/loading-spinner/loading-spinner.css +17 -0
  102. package/dist/collection/components/loading-spinner/loading-spinner.js +63 -0
  103. package/dist/collection/components/loading-spinner/loading-spinner.js.map +1 -0
  104. package/dist/collection/components/modal/app-modal.css +45 -0
  105. package/dist/collection/components/modal/app-modal.js +83 -0
  106. package/dist/collection/components/modal/app-modal.js.map +1 -0
  107. package/dist/collection/components/note/crm-bonus-note.css +71 -0
  108. package/dist/collection/components/note/crm-bonus-note.js +119 -0
  109. package/dist/collection/components/note/crm-bonus-note.js.map +1 -0
  110. package/dist/collection/components/pedido/pedido.js +52 -0
  111. package/dist/collection/components/pedido/pedido.js.map +1 -0
  112. package/dist/collection/components/phone/phone-input-mask.css +40 -0
  113. package/dist/collection/components/phone/phone-input-mask.js +125 -0
  114. package/dist/collection/components/phone/phone-input-mask.js.map +1 -0
  115. package/dist/collection/components/tooltip/crm-tooltip.css +49 -0
  116. package/dist/collection/components/tooltip/tooltip.js +61 -0
  117. package/dist/collection/components/tooltip/tooltip.js.map +1 -0
  118. package/dist/collection/contants/index.js +16 -0
  119. package/dist/collection/contants/index.js.map +1 -0
  120. package/dist/collection/contants/mocks.js +28 -0
  121. package/dist/collection/contants/mocks.js.map +1 -0
  122. package/dist/collection/dto/pin.sent.js +2 -0
  123. package/dist/collection/dto/pin.sent.js.map +1 -0
  124. package/dist/collection/dto/update.order.dto.js +2 -0
  125. package/dist/collection/dto/update.order.dto.js.map +1 -0
  126. package/dist/collection/dto/validate.pin.bonus.js +5 -0
  127. package/dist/collection/dto/validate.pin.bonus.js.map +1 -0
  128. package/dist/collection/helpers/build.payload.helper.js +25 -0
  129. package/dist/collection/helpers/build.payload.helper.js.map +1 -0
  130. package/dist/collection/helpers/cart.helper.js +24 -0
  131. package/dist/collection/helpers/cart.helper.js.map +1 -0
  132. package/dist/collection/helpers/info.config.helper.js +11 -0
  133. package/dist/collection/helpers/info.config.helper.js.map +1 -0
  134. package/dist/collection/helpers/time.helper.js +12 -0
  135. package/dist/collection/helpers/time.helper.js.map +1 -0
  136. package/dist/collection/i18n/i18n.js +35 -0
  137. package/dist/collection/i18n/i18n.js.map +1 -0
  138. package/dist/collection/index.js +11 -0
  139. package/dist/collection/index.js.map +1 -0
  140. package/dist/collection/objectvalues/cart.wake.js +24 -0
  141. package/dist/collection/objectvalues/cart.wake.js.map +1 -0
  142. package/dist/collection/services/crmbonus.service.js +118 -0
  143. package/dist/collection/services/crmbonus.service.js.map +1 -0
  144. package/dist/collection/utils/keys.storage.js +9 -0
  145. package/dist/collection/utils/keys.storage.js.map +1 -0
  146. package/dist/{crmbonus-component-wake/utils-96cf9ae0.js → collection/utils/utils.js} +5 -8
  147. package/dist/collection/utils/utils.js.map +1 -0
  148. package/dist/components/app-modal.js +46 -0
  149. package/dist/components/app-modal.js.map +1 -0
  150. package/dist/components/countdown-timer.js +8 -0
  151. package/dist/components/countdown-timer.js.map +1 -0
  152. package/dist/components/crm-bonus-form.js +165 -0
  153. package/dist/components/crm-bonus-form.js.map +1 -0
  154. package/dist/components/crm-bonus-note.js +141 -0
  155. package/dist/components/crm-bonus-note.js.map +1 -0
  156. package/dist/components/crm-bonus.js +332 -0
  157. package/dist/components/crm-bonus.js.map +1 -0
  158. package/dist/components/crm-button.js +8 -0
  159. package/dist/components/crm-button.js.map +1 -0
  160. package/dist/components/crm-giftback-form.js +8 -0
  161. package/dist/components/crm-giftback-form.js.map +1 -0
  162. package/dist/components/crm-tooltip.js +8 -0
  163. package/dist/components/crm-tooltip.js.map +1 -0
  164. package/dist/components/giftback-finish.js +8 -0
  165. package/dist/components/giftback-finish.js.map +1 -0
  166. package/dist/components/giftback-info.js +8 -0
  167. package/dist/components/giftback-info.js.map +1 -0
  168. package/dist/components/giftback-pin.js +8 -0
  169. package/dist/components/giftback-pin.js.map +1 -0
  170. package/dist/components/giftback-progress.js +8 -0
  171. package/dist/components/giftback-progress.js.map +1 -0
  172. package/dist/components/index.js +4 -0
  173. package/dist/components/index.js.map +1 -0
  174. package/dist/components/loading-container.js +8 -0
  175. package/dist/components/loading-container.js.map +1 -0
  176. package/dist/components/loading-spinner.js +8 -0
  177. package/dist/components/loading-spinner.js.map +1 -0
  178. package/dist/components/name-input.js +8 -0
  179. package/dist/components/name-input.js.map +1 -0
  180. package/dist/components/p-11085d9b.js +79 -0
  181. package/dist/components/p-11085d9b.js.map +1 -0
  182. package/dist/{crmbonus-component-wake/name-input.entry.js → components/p-246a3e9d.js} +37 -8
  183. package/dist/components/p-246a3e9d.js.map +1 -0
  184. package/dist/{crmbonus-component-wake/giftback-info.entry.js → components/p-2671d669.js} +52 -12
  185. package/dist/components/p-2671d669.js.map +1 -0
  186. package/dist/{crmbonus-component-wake/countdown-timer.entry.js → components/p-2b3b8d6b.js} +27 -7
  187. package/dist/components/p-2b3b8d6b.js.map +1 -0
  188. package/dist/components/p-3e84f78c.js +1408 -0
  189. package/dist/components/p-3e84f78c.js.map +1 -0
  190. package/dist/components/p-47f9da55.js +46 -0
  191. package/dist/components/p-47f9da55.js.map +1 -0
  192. package/dist/{crmbonus-component-wake/crm-tooltip.entry.js → components/p-58b97429.js} +27 -8
  193. package/dist/components/p-58b97429.js.map +1 -0
  194. package/dist/{crmbonus-component-wake/giftback-pin.entry.js → components/p-6186ddcc.js} +38 -8
  195. package/dist/components/p-6186ddcc.js.map +1 -0
  196. package/dist/{crmbonus-component-wake/phone-form.entry.js → components/p-6c546e48.js} +47 -8
  197. package/dist/components/p-6c546e48.js.map +1 -0
  198. package/dist/components/p-75ba7b9a.js +14 -0
  199. package/dist/components/p-75ba7b9a.js.map +1 -0
  200. package/dist/{crmbonus-component-wake/giftback-progress.entry.js → components/p-7c744cca.js} +37 -8
  201. package/dist/components/p-7c744cca.js.map +1 -0
  202. package/dist/components/p-7cfea8fe.js +19 -0
  203. package/dist/components/p-7cfea8fe.js.map +1 -0
  204. package/dist/{crmbonus-component-wake/pin-form.entry.js → components/p-83a12a8f.js} +56 -9
  205. package/dist/components/p-83a12a8f.js.map +1 -0
  206. package/dist/{crmbonus-component-wake/cart.helper-2643939f.js → components/p-a61d6a12.js} +2 -2
  207. package/dist/components/p-a61d6a12.js.map +1 -0
  208. package/dist/{crmbonus-component-wake/giftback-finish.entry.js → components/p-b79c86a8.js} +25 -8
  209. package/dist/components/p-b79c86a8.js.map +1 -0
  210. package/dist/components/p-ba369e65.js +21 -0
  211. package/dist/components/p-ba369e65.js.map +1 -0
  212. package/dist/components/p-c0ce1213.js +316 -0
  213. package/dist/components/p-c0ce1213.js.map +1 -0
  214. package/dist/components/p-cc1ea33f.js +36 -0
  215. package/dist/components/p-cc1ea33f.js.map +1 -0
  216. package/dist/{crmbonus-component-wake/i18n-11138a2c.js → components/p-e8c19a64.js} +1 -16
  217. package/dist/components/p-e8c19a64.js.map +1 -0
  218. package/dist/components/p-e9895f08.js +3874 -0
  219. package/dist/components/p-e9895f08.js.map +1 -0
  220. package/dist/components/p-f9aeffc1.js +12 -0
  221. package/dist/components/p-f9aeffc1.js.map +1 -0
  222. package/dist/components/p-fe9c3966.js +39 -0
  223. package/dist/components/p-fe9c3966.js.map +1 -0
  224. package/dist/components/pedido-finalizado.js +54 -0
  225. package/dist/components/pedido-finalizado.js.map +1 -0
  226. package/dist/components/phone-cancel-input.js +55 -0
  227. package/dist/components/phone-cancel-input.js.map +1 -0
  228. package/dist/components/phone-form.js +8 -0
  229. package/dist/components/phone-form.js.map +1 -0
  230. package/dist/components/phone-input-mask.js +8 -0
  231. package/dist/components/phone-input-mask.js.map +1 -0
  232. package/dist/components/phone-input.js +55 -0
  233. package/dist/components/phone-input.js.map +1 -0
  234. package/dist/components/pin-form.js +8 -0
  235. package/dist/components/pin-form.js.map +1 -0
  236. package/dist/crmbonus-component-wake/crmbonus-component-wake.css +1 -7
  237. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -48
  238. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
  239. package/dist/crmbonus-component-wake/index.esm.js +1 -12
  240. package/dist/crmbonus-component-wake/index.esm.js.map +1 -1
  241. package/dist/crmbonus-component-wake/p-03b77c41.entry.js +2 -0
  242. package/dist/crmbonus-component-wake/p-03b77c41.entry.js.map +1 -0
  243. package/dist/crmbonus-component-wake/p-3d6152b1.js +3 -0
  244. package/dist/crmbonus-component-wake/p-3d6152b1.js.map +1 -0
  245. package/dist/crmbonus-component-wake/p-432e371d.entry.js +2 -0
  246. package/dist/crmbonus-component-wake/p-432e371d.entry.js.map +1 -0
  247. package/dist/crmbonus-component-wake/p-571f0bb1.entry.js +2 -0
  248. package/dist/crmbonus-component-wake/p-571f0bb1.entry.js.map +1 -0
  249. package/dist/crmbonus-component-wake/p-620ec1a3.entry.js +2 -0
  250. package/dist/crmbonus-component-wake/p-620ec1a3.entry.js.map +1 -0
  251. package/dist/crmbonus-component-wake/p-74206c91.entry.js +2 -0
  252. package/dist/crmbonus-component-wake/p-74206c91.entry.js.map +1 -0
  253. package/dist/crmbonus-component-wake/p-75ba7b9a.js +2 -0
  254. package/dist/crmbonus-component-wake/p-75ba7b9a.js.map +1 -0
  255. package/dist/crmbonus-component-wake/p-7b7fb354.entry.js +2 -0
  256. package/dist/crmbonus-component-wake/p-7b7fb354.entry.js.map +1 -0
  257. package/dist/crmbonus-component-wake/p-7cfea8fe.js +2 -0
  258. package/dist/crmbonus-component-wake/p-7cfea8fe.js.map +1 -0
  259. package/dist/crmbonus-component-wake/p-7df4432d.entry.js +2 -0
  260. package/dist/crmbonus-component-wake/p-7df4432d.entry.js.map +1 -0
  261. package/dist/crmbonus-component-wake/p-7e6797e3.entry.js +2 -0
  262. package/dist/crmbonus-component-wake/p-7e6797e3.entry.js.map +1 -0
  263. package/dist/crmbonus-component-wake/p-885fc30e.entry.js +2 -0
  264. package/dist/crmbonus-component-wake/p-885fc30e.entry.js.map +1 -0
  265. package/dist/crmbonus-component-wake/p-90716188.entry.js +2 -0
  266. package/dist/crmbonus-component-wake/p-90716188.entry.js.map +1 -0
  267. package/dist/crmbonus-component-wake/p-a61d6a12.js +2 -0
  268. package/dist/crmbonus-component-wake/p-a61d6a12.js.map +1 -0
  269. package/dist/crmbonus-component-wake/p-a63f44b6.entry.js +2 -0
  270. package/dist/crmbonus-component-wake/{crm-bonus-form.entry.js.map → p-a63f44b6.entry.js.map} +1 -1
  271. package/dist/crmbonus-component-wake/p-b7a8f915.entry.js +2 -0
  272. package/dist/crmbonus-component-wake/p-b7a8f915.entry.js.map +1 -0
  273. package/dist/crmbonus-component-wake/p-ba369e65.js +2 -0
  274. package/dist/crmbonus-component-wake/p-ba369e65.js.map +1 -0
  275. package/dist/crmbonus-component-wake/p-be3ddacc.entry.js +2 -0
  276. package/dist/crmbonus-component-wake/p-be3ddacc.entry.js.map +1 -0
  277. package/dist/crmbonus-component-wake/p-e1255160.js +2 -0
  278. package/dist/crmbonus-component-wake/p-e1255160.js.map +1 -0
  279. package/dist/crmbonus-component-wake/p-e8c19a64.js +2 -0
  280. package/dist/crmbonus-component-wake/p-e8c19a64.js.map +1 -0
  281. package/dist/crmbonus-component-wake/p-e9895f08.js +2 -0
  282. package/dist/crmbonus-component-wake/p-e9895f08.js.map +1 -0
  283. package/dist/crmbonus-component-wake/p-f9aeffc1.js +2 -0
  284. package/dist/crmbonus-component-wake/p-f9aeffc1.js.map +1 -0
  285. package/dist/env.js +3 -0
  286. package/dist/env.js.map +1 -0
  287. package/dist/{crmbonus-component-wake → esm}/app-modal.entry.js +3 -2
  288. package/dist/esm/app-modal.entry.js.map +1 -0
  289. package/dist/esm/cart.helper-69d64e28.js +50 -0
  290. package/dist/{crmbonus-component-wake/cart.helper-2643939f.js.map → esm/cart.helper-69d64e28.js.map} +1 -1
  291. package/dist/esm/countdown-timer_2.entry.js +58 -0
  292. package/dist/esm/countdown-timer_2.entry.js.map +1 -0
  293. package/dist/{crmbonus-component-wake → esm}/crm-bonus-form.entry.js +4 -3
  294. package/dist/esm/crm-bonus-form.entry.js.map +1 -0
  295. package/dist/{crmbonus-component-wake → esm}/crm-bonus-note.entry.js +11 -10
  296. package/dist/esm/crm-bonus-note.entry.js.map +1 -0
  297. package/dist/{crmbonus-component-wake → esm}/crm-bonus.entry.js +8 -8
  298. package/dist/esm/crm-bonus.entry.js.map +1 -0
  299. package/dist/{crmbonus-component-wake/crm-giftback-form.entry.js → esm/crm-giftback-form_2.entry.js} +21 -6
  300. package/dist/esm/crm-giftback-form_2.entry.js.map +1 -0
  301. package/dist/esm/crm-tooltip_4.entry.js +204 -0
  302. package/dist/esm/crm-tooltip_4.entry.js.map +1 -0
  303. package/dist/esm/crmbonus-component-wake.js +22 -0
  304. package/dist/esm/crmbonus-component-wake.js.map +1 -0
  305. package/dist/{crmbonus-component-wake/crmbonus.service-047b6b01.js → esm/crmbonus.service-ad8702ce.js} +90 -162
  306. package/dist/esm/crmbonus.service-ad8702ce.js.map +1 -0
  307. package/dist/esm/giftback-finish_4.entry.js +124 -0
  308. package/dist/esm/giftback-finish_4.entry.js.map +1 -0
  309. package/dist/esm/i18n-e8150dff.js +2217 -0
  310. package/dist/{crmbonus-component-wake/i18n-11138a2c.js.map → esm/i18n-e8150dff.js.map} +1 -1
  311. package/dist/esm/index-e8724c8f.js +1571 -0
  312. package/dist/esm/index-e8724c8f.js.map +1 -0
  313. package/dist/esm/index.js +3 -0
  314. package/dist/esm/index.js.map +1 -0
  315. package/dist/esm/loader.js +13 -0
  316. package/dist/esm/loader.js.map +1 -0
  317. package/dist/{crmbonus-component-wake → esm}/loading-spinner.entry.js +3 -2
  318. package/dist/esm/loading-spinner.entry.js.map +1 -0
  319. package/dist/{crmbonus-component-wake → esm}/pedido-finalizado.entry.js +5 -5
  320. package/dist/esm/pedido-finalizado.entry.js.map +1 -0
  321. package/dist/{crmbonus-component-wake → esm}/phone-cancel-input.entry.js +1 -1
  322. package/dist/esm/phone-cancel-input.entry.js.map +1 -0
  323. package/dist/{crmbonus-component-wake → esm}/phone-input-mask.entry.js +3 -2
  324. package/dist/esm/phone-input-mask.entry.js.map +1 -0
  325. package/dist/{crmbonus-component-wake → esm}/phone-input.entry.js +1 -1
  326. package/dist/esm/phone-input.entry.js.map +1 -0
  327. package/dist/esm/utils-d642b4db.js +21 -0
  328. package/dist/esm/utils-d642b4db.js.map +1 -0
  329. package/dist/index.cjs.js +1 -0
  330. package/dist/index.js +1 -0
  331. package/package.json +1 -1
  332. package/dist/crmbonus-component-wake/app-modal.entry.js.map +0 -1
  333. package/dist/crmbonus-component-wake/countdown-timer.entry.js.map +0 -1
  334. package/dist/crmbonus-component-wake/crm-bonus-note.entry.js.map +0 -1
  335. package/dist/crmbonus-component-wake/crm-bonus.entry.js.map +0 -1
  336. package/dist/crmbonus-component-wake/crm-button.entry.js +0 -20
  337. package/dist/crmbonus-component-wake/crm-button.entry.js.map +0 -1
  338. package/dist/crmbonus-component-wake/crm-tooltip.entry.js.map +0 -1
  339. package/dist/crmbonus-component-wake/crmbonus.service-047b6b01.js.map +0 -1
  340. package/dist/crmbonus-component-wake/giftback-finish.entry.js.map +0 -1
  341. package/dist/crmbonus-component-wake/giftback-info.entry.js.map +0 -1
  342. package/dist/crmbonus-component-wake/giftback-pin.entry.js.map +0 -1
  343. package/dist/crmbonus-component-wake/giftback-progress.entry.js.map +0 -1
  344. package/dist/crmbonus-component-wake/index-d0fd1dc0.js +0 -3039
  345. package/dist/crmbonus-component-wake/index-d0fd1dc0.js.map +0 -1
  346. package/dist/crmbonus-component-wake/loading-container.entry.js +0 -18
  347. package/dist/crmbonus-component-wake/loading-container.entry.js.map +0 -1
  348. package/dist/crmbonus-component-wake/loading-spinner.entry.js.map +0 -1
  349. package/dist/crmbonus-component-wake/name-input.entry.js.map +0 -1
  350. package/dist/crmbonus-component-wake/pedido-finalizado.entry.js.map +0 -1
  351. package/dist/crmbonus-component-wake/phone-cancel-input.entry.js.map +0 -1
  352. package/dist/crmbonus-component-wake/phone-form.entry.js.map +0 -1
  353. package/dist/crmbonus-component-wake/phone-input-mask.entry.js.map +0 -1
  354. package/dist/crmbonus-component-wake/phone-input.entry.js.map +0 -1
  355. package/dist/crmbonus-component-wake/pin-form.entry.js.map +0 -1
  356. package/dist/crmbonus-component-wake/shadow-css-7ad5caf8.js +0 -334
  357. package/dist/crmbonus-component-wake/shadow-css-7ad5caf8.js.map +0 -1
  358. package/dist/crmbonus-component-wake/utils-96cf9ae0.js.map +0 -1
  359. /package/dist/{crmbonus-component-wake → esm}/app-globals-0f993ce5.js +0 -0
  360. /package/dist/{crmbonus-component-wake → esm}/app-globals-0f993ce5.js.map +0 -0
  361. /package/dist/{crmbonus-component-wake → esm}/index-5b567099.js +0 -0
  362. /package/dist/{crmbonus-component-wake → esm}/index-5b567099.js.map +0 -0
  363. /package/dist/{crmbonus-component-wake → esm}/info.config.helper-42d9ddf9.js +0 -0
  364. /package/dist/{crmbonus-component-wake → esm}/info.config.helper-42d9ddf9.js.map +0 -0
  365. /package/dist/{crmbonus-component-wake → esm}/keys.storage-8c76fcd7.js +0 -0
  366. /package/dist/{crmbonus-component-wake → esm}/keys.storage-8c76fcd7.js.map +0 -0
@@ -0,0 +1,348 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import { CrmBonusService } from "../../services/crmbonus.service";
3
+ import { StepFormEnum } from "../../contants";
4
+ export class CrmBonusForm {
5
+ constructor() {
6
+ this.crmBonusService = CrmBonusService.getInstance();
7
+ this.storeName = undefined;
8
+ this.cartId = undefined;
9
+ this.products = undefined;
10
+ this.customer = {
11
+ phone: "",
12
+ birthDate: "",
13
+ document: "",
14
+ name: ""
15
+ };
16
+ this.sent = undefined;
17
+ this.stepNext = undefined;
18
+ this.phone = undefined;
19
+ this.loadingModal = undefined;
20
+ this.saveStore = undefined;
21
+ this.cancel = undefined;
22
+ this.handleCustomerName = undefined;
23
+ this.loading = false;
24
+ this.step = StepFormEnum.STEP_NAME;
25
+ this.message = undefined;
26
+ this.bonus = undefined;
27
+ }
28
+ async setStep(step) {
29
+ this.step = step;
30
+ }
31
+ async validateBonus(pin) {
32
+ var _a, _b;
33
+ this.loading = true;
34
+ this.message = "";
35
+ const payload = {
36
+ pin: pin,
37
+ cellphone: parseInt(this.phone.toString()),
38
+ storeId: this.sent.storeId.toString(),
39
+ userId: this.sent.userId.toString(),
40
+ checkoutId: this.cartId,
41
+ checkoutProducts: this.products,
42
+ name: null,
43
+ storeName: this.storeName
44
+ };
45
+ try {
46
+ this.bonus = await this.crmBonusService.validatePinBonus(payload);
47
+ this.step = StepFormEnum.STEP_RESERVE;
48
+ }
49
+ catch (error) {
50
+ 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;
51
+ }
52
+ finally {
53
+ this.loading = false;
54
+ }
55
+ }
56
+ async reserveApply(amount) {
57
+ this.loading = true;
58
+ this.message = "";
59
+ try {
60
+ await this.reserve(amount);
61
+ this.step = StepFormEnum.STEP_APPLY;
62
+ this.saveStore(amount);
63
+ }
64
+ catch (error) {
65
+ this.message = "ocorreu um error ao solicitar a aplicação do bonus! tente novamente";
66
+ }
67
+ finally {
68
+ this.loading = false;
69
+ }
70
+ }
71
+ async reserve(amount) {
72
+ await this.crmBonusService.reserve({
73
+ redeemedBonus: amount,
74
+ cartId: this.cartId,
75
+ ticket: this.cartId,
76
+ grossValue: Number(this.bonus.totalValue),
77
+ storeName: this.storeName,
78
+ storeId: this.bonus.storeId.toString(),
79
+ userId: this.bonus.userId
80
+ });
81
+ }
82
+ handleCancel() {
83
+ this.step = StepFormEnum.STEP_PHONE;
84
+ this.cancel();
85
+ }
86
+ render() {
87
+ return (h(Host, { key: '2d736cd603436521bf15f0ef8eaf0670ad9f6a42' }, this.step == StepFormEnum.STEP_NAME && h("name-input", { key: 'bfa12463c1f29bb65814368790f201dcab869dd9', loading: this.loadingModal, value: this.customer.name, applyName: (name) => this.handleCustomerName(name) }), this.step === StepFormEnum.STEP_PIN && h("giftback-pin", { key: '3fdf1c285b5d777289b42fcfbcf80dfc92579f29', cancel: () => this.handleCancel(), sent: this.sent, validate: (data) => this.validateBonus(data), loading: this.loading }), this.step === StepFormEnum.STEP_RESERVE && h("giftback-progress", { key: 'f06df8cab7361a51d1b89b4f0f0a1a8ceb7a7e30', loading: this.loading, cancel: () => this.handleCancel(), bonus: this.bonus, reserve: (amountRedeemed) => this.reserveApply(amountRedeemed) }), this.step === StepFormEnum.STEP_APPLY && h("giftback-finish", { key: 'eaacf1438652b04cfd607e5bac81dffbe4b542bb' }), h("p", { key: 'a2014780bbb5dfb23cf6165500f43c6fcca700d3', class: "message-error" }, this.message)));
88
+ }
89
+ static get is() { return "crm-bonus-form"; }
90
+ static get encapsulation() { return "shadow"; }
91
+ static get originalStyleUrls() {
92
+ return {
93
+ "$": ["crm-bonus-form.css"]
94
+ };
95
+ }
96
+ static get styleUrls() {
97
+ return {
98
+ "$": ["crm-bonus-form.css"]
99
+ };
100
+ }
101
+ static get properties() {
102
+ return {
103
+ "storeName": {
104
+ "type": "any",
105
+ "mutable": false,
106
+ "complexType": {
107
+ "original": "any",
108
+ "resolved": "any",
109
+ "references": {}
110
+ },
111
+ "required": false,
112
+ "optional": false,
113
+ "docs": {
114
+ "tags": [],
115
+ "text": ""
116
+ },
117
+ "attribute": "storename",
118
+ "reflect": false
119
+ },
120
+ "cartId": {
121
+ "type": "any",
122
+ "mutable": false,
123
+ "complexType": {
124
+ "original": "any",
125
+ "resolved": "any",
126
+ "references": {}
127
+ },
128
+ "required": false,
129
+ "optional": false,
130
+ "docs": {
131
+ "tags": [],
132
+ "text": ""
133
+ },
134
+ "attribute": "cart-id",
135
+ "reflect": false
136
+ },
137
+ "products": {
138
+ "type": "unknown",
139
+ "mutable": false,
140
+ "complexType": {
141
+ "original": "Array<IProduct>",
142
+ "resolved": "IProduct[]",
143
+ "references": {
144
+ "Array": {
145
+ "location": "global",
146
+ "id": "global::Array"
147
+ },
148
+ "IProduct": {
149
+ "location": "import",
150
+ "path": "../../dto/validate.pin.bonus",
151
+ "id": "src/dto/validate.pin.bonus.ts::IProduct"
152
+ }
153
+ }
154
+ },
155
+ "required": false,
156
+ "optional": false,
157
+ "docs": {
158
+ "tags": [],
159
+ "text": ""
160
+ }
161
+ },
162
+ "customer": {
163
+ "type": "unknown",
164
+ "mutable": false,
165
+ "complexType": {
166
+ "original": "ICustomer",
167
+ "resolved": "ICustomer",
168
+ "references": {
169
+ "ICustomer": {
170
+ "location": "import",
171
+ "path": "../../dto/validate.pin.bonus",
172
+ "id": "src/dto/validate.pin.bonus.ts::ICustomer"
173
+ }
174
+ }
175
+ },
176
+ "required": false,
177
+ "optional": false,
178
+ "docs": {
179
+ "tags": [],
180
+ "text": ""
181
+ },
182
+ "defaultValue": "{\n phone: \"\",\n birthDate: \"\",\n document: \"\",\n name: \"\"\n }"
183
+ },
184
+ "sent": {
185
+ "type": "unknown",
186
+ "mutable": false,
187
+ "complexType": {
188
+ "original": "IPinSent",
189
+ "resolved": "IPinSent",
190
+ "references": {
191
+ "IPinSent": {
192
+ "location": "import",
193
+ "path": "../../dto/pin.sent",
194
+ "id": "src/dto/pin.sent.ts::IPinSent"
195
+ }
196
+ }
197
+ },
198
+ "required": false,
199
+ "optional": false,
200
+ "docs": {
201
+ "tags": [],
202
+ "text": ""
203
+ }
204
+ },
205
+ "stepNext": {
206
+ "type": "number",
207
+ "mutable": false,
208
+ "complexType": {
209
+ "original": "StepFormEnum",
210
+ "resolved": "StepFormEnum.STEP_APPLY | StepFormEnum.STEP_NAME | StepFormEnum.STEP_NO_BONUS | StepFormEnum.STEP_PHONE | StepFormEnum.STEP_PIN | StepFormEnum.STEP_RESERVE",
211
+ "references": {
212
+ "StepFormEnum": {
213
+ "location": "import",
214
+ "path": "../../contants",
215
+ "id": "src/contants/index.ts::StepFormEnum"
216
+ }
217
+ }
218
+ },
219
+ "required": false,
220
+ "optional": false,
221
+ "docs": {
222
+ "tags": [],
223
+ "text": ""
224
+ },
225
+ "attribute": "step-next",
226
+ "reflect": false
227
+ },
228
+ "phone": {
229
+ "type": "number",
230
+ "mutable": false,
231
+ "complexType": {
232
+ "original": "number",
233
+ "resolved": "number",
234
+ "references": {}
235
+ },
236
+ "required": false,
237
+ "optional": false,
238
+ "docs": {
239
+ "tags": [],
240
+ "text": ""
241
+ },
242
+ "attribute": "phone",
243
+ "reflect": false
244
+ },
245
+ "loadingModal": {
246
+ "type": "boolean",
247
+ "mutable": false,
248
+ "complexType": {
249
+ "original": "boolean",
250
+ "resolved": "boolean",
251
+ "references": {}
252
+ },
253
+ "required": false,
254
+ "optional": false,
255
+ "docs": {
256
+ "tags": [],
257
+ "text": ""
258
+ },
259
+ "attribute": "loading-modal",
260
+ "reflect": false
261
+ },
262
+ "saveStore": {
263
+ "type": "unknown",
264
+ "mutable": false,
265
+ "complexType": {
266
+ "original": "(amount: number) => void",
267
+ "resolved": "(amount: number) => void",
268
+ "references": {}
269
+ },
270
+ "required": false,
271
+ "optional": false,
272
+ "docs": {
273
+ "tags": [],
274
+ "text": ""
275
+ }
276
+ },
277
+ "cancel": {
278
+ "type": "unknown",
279
+ "mutable": false,
280
+ "complexType": {
281
+ "original": "() => void",
282
+ "resolved": "() => void",
283
+ "references": {}
284
+ },
285
+ "required": false,
286
+ "optional": false,
287
+ "docs": {
288
+ "tags": [],
289
+ "text": ""
290
+ }
291
+ },
292
+ "handleCustomerName": {
293
+ "type": "unknown",
294
+ "mutable": false,
295
+ "complexType": {
296
+ "original": "(name: string) => void",
297
+ "resolved": "(name: string) => void",
298
+ "references": {}
299
+ },
300
+ "required": false,
301
+ "optional": false,
302
+ "docs": {
303
+ "tags": [],
304
+ "text": ""
305
+ }
306
+ }
307
+ };
308
+ }
309
+ static get states() {
310
+ return {
311
+ "loading": {},
312
+ "step": {},
313
+ "message": {},
314
+ "bonus": {}
315
+ };
316
+ }
317
+ static get methods() {
318
+ return {
319
+ "setStep": {
320
+ "complexType": {
321
+ "signature": "(step: StepFormEnum) => Promise<void>",
322
+ "parameters": [{
323
+ "name": "step",
324
+ "type": "StepFormEnum",
325
+ "docs": ""
326
+ }],
327
+ "references": {
328
+ "Promise": {
329
+ "location": "global",
330
+ "id": "global::Promise"
331
+ },
332
+ "StepFormEnum": {
333
+ "location": "import",
334
+ "path": "../../contants",
335
+ "id": "src/contants/index.ts::StepFormEnum"
336
+ }
337
+ },
338
+ "return": "Promise<void>"
339
+ },
340
+ "docs": {
341
+ "text": "",
342
+ "tags": []
343
+ }
344
+ }
345
+ };
346
+ }
347
+ }
348
+ //# sourceMappingURL=crm-bonus-form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crm-bonus-form.js","sourceRoot":"","sources":["../../../../src/components/crm-bonus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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Host, Method, Prop, State, h } from \"@stencil/core\";\nimport { CrmBonusService } from \"../../services/crmbonus.service\";\nimport { IBonus, ICustomer, IProccesPinBonusDto, IProduct } from \"../../dto/validate.pin.bonus\";\nimport { StepFormEnum } from \"../../contants\";\nimport { IPinSent } from '../../dto/pin.sent';\n\n@Component({\n tag: 'crm-bonus-form',\n styleUrl: 'crm-bonus-form.css',\n shadow: true\n})\nexport class CrmBonusForm {\n\n private crmBonusService: CrmBonusService = CrmBonusService.getInstance();\n\n @Prop({ attribute: 'storename' }) storeName;\n @Prop() cartId;\n @Prop() products: Array<IProduct>;\n @Prop() customer: ICustomer = {\n phone: \"\",\n birthDate: \"\",\n document: \"\",\n name: \"\"\n };\n @Prop() sent: IPinSent;\n @Prop() stepNext: StepFormEnum;\n @Prop() phone: number;\n @Prop() loadingModal: boolean;\n\n @Prop() saveStore: (amount: number) => void;\n\n @Prop() cancel: () => void;\n\n @Prop() handleCustomerName: (name: string) => void;\n\n @State() loading: boolean = false;\n\n @State() step: number = StepFormEnum.STEP_NAME;\n\n @State() message: string;\n\n @State() bonus: IBonus;\n\n @Method()\n async setStep(step: StepFormEnum) {\n this.step = step\n }\n\n public async validateBonus(pin: string) {\n this.loading = true;\n this.message = \"\";\n const payload: IProccesPinBonusDto = {\n pin: pin,\n cellphone: parseInt(this.phone.toString()),\n storeId: this.sent.storeId.toString(),\n userId: this.sent.userId.toString(),\n checkoutId: this.cartId,\n checkoutProducts: this.products,\n name: null,\n storeName: this.storeName\n }\n\n try {\n this.bonus = await this.crmBonusService.validatePinBonus(payload);\n\n this.step = StepFormEnum.STEP_RESERVE;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false;\n }\n }\n\n public async reserveApply(amount: number) {\n this.loading = true;\n this.message = \"\";\n try {\n await this.reserve(amount);\n\n this.step = StepFormEnum.STEP_APPLY;\n\n this.saveStore(amount);\n } catch (error) {\n this.message = \"ocorreu um error ao solicitar a aplicação do bonus! tente novamente\"\n } finally {\n this.loading = false;\n }\n }\n\n public async reserve(amount: number) {\n await this.crmBonusService.reserve({\n redeemedBonus: amount,\n cartId: this.cartId,\n ticket: this.cartId,\n grossValue: Number(this.bonus.totalValue),\n storeName: this.storeName,\n storeId: this.bonus.storeId.toString(),\n userId: this.bonus.userId\n });\n }\n\n public handleCancel() {\n this.step = StepFormEnum.STEP_PHONE;\n this.cancel()\n }\n\n render() {\n return (\n <Host>\n {/* {this.step === StepFormEnum.STEP_PHONE && <phone-input value={this.customer.phone} sendPin={(phone) => this.sendPin(phone)} loading={this.loading} />} */}\n \n {this.step == StepFormEnum.STEP_NAME && <name-input loading={this.loadingModal} value={this.customer.name} applyName={(name) => this.handleCustomerName(name)} />}\n {this.step === StepFormEnum.STEP_PIN && <giftback-pin cancel={() => this.handleCancel()} sent={this.sent} validate={(data) => this.validateBonus(data)} loading={this.loading} />}\n\n {this.step === StepFormEnum.STEP_RESERVE && <giftback-progress loading={this.loading} cancel={() => this.handleCancel()} bonus={this.bonus} reserve={(amountRedeemed: number) => this.reserveApply(amountRedeemed)} />}\n {this.step === StepFormEnum.STEP_APPLY && <giftback-finish />}\n <p class=\"message-error\">{this.message}</p>\n </Host>\n )\n }\n}"]}
@@ -0,0 +1,10 @@
1
+ .message-finish {
2
+ align-content: center;
3
+ text-align: center;
4
+ }
5
+
6
+ .message-finish p {
7
+ color: #777676;
8
+ font-size: xx-large;
9
+ font-family: sans-serif;
10
+ }
@@ -0,0 +1,20 @@
1
+ import { h } from "@stencil/core";
2
+ import success from "../../../crm-bonus/assets/svg/success-svgrepo-com.svg";
3
+ export class GiftbackFinish {
4
+ render() {
5
+ return (h("div", { key: 'e72f82799146a6e94acbdd62324e07cdf9f77009', class: "message-finish" }, h("img", { key: '46e2436a3dbe4745225c3b9674e6bf6c299ad63e', src: success, width: 80 }), h("p", { key: '270e42050956f7f3d1ae9b90f314211fa310f797' }, "Legal! O B\u00F4nus ser\u00E1 aplicado na sua compra.")));
6
+ }
7
+ static get is() { return "giftback-finish"; }
8
+ static get encapsulation() { return "shadow"; }
9
+ static get originalStyleUrls() {
10
+ return {
11
+ "$": ["giftback-finish.css"]
12
+ };
13
+ }
14
+ static get styleUrls() {
15
+ return {
16
+ "$": ["giftback-finish.css"]
17
+ };
18
+ }
19
+ }
20
+ //# sourceMappingURL=giftback-finish.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"giftback-finish.js","sourceRoot":"","sources":["../../../../../../src/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,OAAO,MAAM,uDAAuD,CAAA;AAO3E,MAAM,OAAO,cAAc;IACvB,MAAM;QACF,OAAO,CACH,4DAAK,KAAK,EAAC,gBAAgB;YACvB,4DAAK,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,GAAI;YAChC,oHAAkD,CAChD,CACT,CAAA;IACL,CAAC;;;;;;;;;CACJ","sourcesContent":["import { Component, h } from \"@stencil/core\";\nimport success from '../../../crm-bonus/assets/svg/success-svgrepo-com.svg'\n\n@Component({\n tag: 'giftback-finish',\n styleUrl: 'giftback-finish.css',\n shadow: true\n})\nexport class GiftbackFinish {\n render() {\n return (\n <div class=\"message-finish\">\n <img src={success} width={80} />\n <p>Legal! O Bônus será aplicado na sua compra.</p>\n </div>\n )\n }\n}"]}
@@ -0,0 +1,70 @@
1
+ :host {
2
+ display: block;
3
+ font-family: Arial, sans-serif;
4
+ }
5
+
6
+ .form-container-pin {
7
+ display: flex;
8
+ flex-direction: column;
9
+ align-items: center;
10
+ }
11
+
12
+ .pin-container {
13
+ display: flex;
14
+ gap: 10px;
15
+ margin: 26px 0;
16
+ }
17
+
18
+ input {
19
+ width: 58px;
20
+ height: 40px;
21
+ font-size: 18px;
22
+ text-align: center;
23
+ border: 1px solid #ccc;
24
+ border-radius: 5px;
25
+ }
26
+
27
+ button {
28
+ padding: 10px 20px;
29
+ /* background-color: #ddd; */
30
+ border: none;
31
+ border-radius: 5px;
32
+ cursor: pointer;
33
+ }
34
+
35
+ .success {
36
+ color: green;
37
+ margin-top: 10px;
38
+ }
39
+
40
+ .button {
41
+ top: 50%;
42
+ background-color: #6c6c7e;
43
+ color: #fff;
44
+ border: none;
45
+ border-radius: 10px;
46
+ padding: 15px;
47
+ min-height: 30px;
48
+ min-width: 120px;
49
+ font-size: 20px;
50
+ cursor: pointer;
51
+ }
52
+
53
+ .button-cancel {
54
+ top: 50%;
55
+ background-color: #ffffff;
56
+ color: #1e1c1c;
57
+ border: 1px solid gray;
58
+ border-radius: 10px;
59
+ padding: 10px;
60
+ min-height: 30px;
61
+ min-width: 120px;
62
+ font-size: 19px;
63
+ cursor: pointer;
64
+ }
65
+
66
+ .footer-button {
67
+ display: flex;
68
+ justify-content: space-between;
69
+ width: 100%;
70
+ }
@@ -0,0 +1,126 @@
1
+ import { h } from "@stencil/core";
2
+ export class GiftbackPin {
3
+ constructor() {
4
+ this.sent = undefined;
5
+ this.validate = undefined;
6
+ this.cancel = undefined;
7
+ this.pin = ['', '', '', ''];
8
+ this.isVerified = false;
9
+ this.loading = false;
10
+ }
11
+ handleInput(event, index) {
12
+ const input = event.target;
13
+ const value = input.value.slice(0, 1); // Limitar a um único dígito
14
+ this.pin[index] = value;
15
+ // Focar no próximo campo, se possível
16
+ if (value && index < this.pin.length - 1) {
17
+ const nextInput = input.nextElementSibling;
18
+ nextInput === null || nextInput === void 0 ? void 0 : nextInput.focus();
19
+ }
20
+ this.pin = [...this.pin];
21
+ }
22
+ validatePin() {
23
+ this.validate(this.pin.join(""));
24
+ }
25
+ verifyPin() {
26
+ const pinCode = this.pin.join('');
27
+ if (pinCode === '9999') {
28
+ this.isVerified = true;
29
+ }
30
+ }
31
+ render() {
32
+ return (h("div", { key: '1757d5be19ea7a7f3b6ec2d52dacc188acf85eb9', class: "form-container-pin" }, h("div", { key: 'ff4c4f4de2b3f652752145855cdfd92809d831dc' }, h("p", { key: '0f0b8a7e16fc419953ccca0d954664860e6165d2' }, "Insira o PIN de 4 d\u00EDgitos enviado por SMS."), h("div", { key: '08fd4f430bf3186c62fbbdb747aa12173f2ec055', class: "pin-container" }, this.pin.map((_, index) => (h("input", { type: "text", maxLength: 1, value: this.pin[index], onInput: (event) => this.handleInput(event, index) }))))), h("div", { key: 'bc44db06179215f590db0cd0bd9c38ab8807cd0f', class: "footer-button" }, h("button", { key: '4a75e42791e79489ff69e884b7cdc0dbdc46c40e', class: "button-cancel", disabled: this.loading, onClick: () => this.cancel() }, "Cancelar"), h("button", { key: 'fe93430a1c13ecdd062062650fb268ba9350be76', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePin() }, !this.loading ? "Enviar" : h("loading-spinner", { size: "15px", color: "#fff" })))));
33
+ }
34
+ static get is() { return "giftback-pin"; }
35
+ static get encapsulation() { return "shadow"; }
36
+ static get originalStyleUrls() {
37
+ return {
38
+ "$": ["giftback-pin.css"]
39
+ };
40
+ }
41
+ static get styleUrls() {
42
+ return {
43
+ "$": ["giftback-pin.css"]
44
+ };
45
+ }
46
+ static get properties() {
47
+ return {
48
+ "sent": {
49
+ "type": "unknown",
50
+ "mutable": false,
51
+ "complexType": {
52
+ "original": "IPinSent",
53
+ "resolved": "IPinSent",
54
+ "references": {
55
+ "IPinSent": {
56
+ "location": "import",
57
+ "path": "../../../../dto/pin.sent",
58
+ "id": "src/dto/pin.sent.ts::IPinSent"
59
+ }
60
+ }
61
+ },
62
+ "required": false,
63
+ "optional": false,
64
+ "docs": {
65
+ "tags": [],
66
+ "text": ""
67
+ }
68
+ },
69
+ "validate": {
70
+ "type": "unknown",
71
+ "mutable": false,
72
+ "complexType": {
73
+ "original": "(pin: string) => void",
74
+ "resolved": "(pin: string) => void",
75
+ "references": {}
76
+ },
77
+ "required": false,
78
+ "optional": false,
79
+ "docs": {
80
+ "tags": [],
81
+ "text": ""
82
+ }
83
+ },
84
+ "cancel": {
85
+ "type": "unknown",
86
+ "mutable": false,
87
+ "complexType": {
88
+ "original": "() => void",
89
+ "resolved": "() => void",
90
+ "references": {}
91
+ },
92
+ "required": false,
93
+ "optional": false,
94
+ "docs": {
95
+ "tags": [],
96
+ "text": ""
97
+ }
98
+ },
99
+ "loading": {
100
+ "type": "boolean",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "boolean",
104
+ "resolved": "boolean",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": false,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": ""
112
+ },
113
+ "attribute": "loading",
114
+ "reflect": false,
115
+ "defaultValue": "false"
116
+ }
117
+ };
118
+ }
119
+ static get states() {
120
+ return {
121
+ "pin": {},
122
+ "isVerified": {}
123
+ };
124
+ }
125
+ }
126
+ //# sourceMappingURL=giftback-pin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"giftback-pin.js","sourceRoot":"","sources":["../../../../../../src/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQ1D,MAAM,OAAO,WAAW;;;;;mBAMK,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;0BACV,KAAK;uBAET,KAAK;;IAEhC,WAAW,CAAC,KAAY,EAAE,KAAa;QACnC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;QAC/C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,4BAA4B;QACnE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,KA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DAAQ,KAAK,EAAE,UAAU,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,IAE7G,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,uBAAiB,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,GAAG,CAEtE,CACP,CAGJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop, State } from '@stencil/core';\nimport { IPinSent } from '../../../../dto/pin.sent';\n\n@Component({\n tag: 'giftback-pin',\n styleUrl: 'giftback-pin.css',\n shadow: true,\n})\nexport class GiftbackPin {\n\n @Prop() sent: IPinSent;\n @Prop() validate: (pin: string) => void;\n @Prop() cancel: () => void;\n\n @State() pin: string[] = ['', '', '', ''];\n @State() isVerified: boolean = false;\n\n @Prop() loading: boolean = false;\n\n handleInput(event: Event, index: number) {\n const input = event.target as HTMLInputElement;\n const value = input.value.slice(0, 1); // Limitar a um único dígito\n this.pin[index] = value;\n\n // Focar no próximo campo, se possível\n if (value && index < this.pin.length - 1) {\n const nextInput = input.nextElementSibling as HTMLInputElement;\n nextInput?.focus();\n }\n\n this.pin = [...this.pin];\n }\n\n validatePin() {\n this.validate(this.pin.join(\"\"))\n }\n\n verifyPin() {\n const pinCode = this.pin.join('');\n if (pinCode === '9999') {\n this.isVerified = true;\n }\n }\n\n render() {\n return (\n <div class=\"form-container-pin\">\n <div >\n <p>Insira o PIN de 4 dígitos enviado por SMS.</p>\n <div class=\"pin-container\">\n {this.pin.map((_, index) => (\n <input\n type=\"text\"\n maxLength={1}\n value={this.pin[index]}\n onInput={(event) => this.handleInput(event, index)}\n />\n ))}\n </div>\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.validatePin()}>\n {\n !this.loading ? \"Enviar\" : <loading-spinner size=\"15px\" color=\"#fff\" />\n }\n </button>\n </div>\n {/* <button onClick={() => this.verifyPin()}>Enviar</button>\n {this.isVerified && <p class=\"success\">Código verificado com sucesso!</p>} */}\n </div>\n );\n }\n}\n"]}