crmbonus-component-wake 1.0.47 → 2.0.48

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 (288) hide show
  1. package/dist/cjs/app-modal.cjs.entry.js +28 -0
  2. package/dist/cjs/app-modal.cjs.entry.js.map +1 -0
  3. package/dist/cjs/countdown-timer_4.cjs.entry.js +176 -0
  4. package/dist/cjs/countdown-timer_4.cjs.entry.js.map +1 -0
  5. package/dist/cjs/crm-bonus-form.cjs.entry.js +103 -0
  6. package/dist/cjs/crm-bonus-form.cjs.entry.js.map +1 -0
  7. package/dist/cjs/crm-bonus-note.cjs.entry.js +16 -6
  8. package/dist/cjs/crm-bonus-note.cjs.entry.js.map +1 -1
  9. package/dist/cjs/crm-bonus.cjs.entry.js +41 -5
  10. package/dist/cjs/crm-bonus.cjs.entry.js.map +1 -1
  11. package/dist/cjs/crm-button.cjs.entry.js +24 -0
  12. package/dist/cjs/crm-button.cjs.entry.js.map +1 -0
  13. package/dist/cjs/crm-giftback-form.cjs.entry.js +171 -0
  14. package/dist/cjs/crm-giftback-form.cjs.entry.js.map +1 -0
  15. package/dist/cjs/crmbonus-component-wake.cjs.js +2 -2
  16. package/dist/cjs/{crmbonus.service-e375ebfe.js → crmbonus.service-7991795d.js} +10 -2
  17. package/dist/cjs/crmbonus.service-7991795d.js.map +1 -0
  18. package/dist/cjs/giftback-finish_4.cjs.entry.js +6 -6
  19. package/dist/cjs/giftback-finish_4.cjs.entry.js.map +1 -1
  20. package/dist/cjs/i18n-818275e6.js +2209 -0
  21. package/dist/cjs/i18n-818275e6.js.map +1 -0
  22. package/dist/cjs/{index-52d8a075.js → index-80419303.js} +9 -4
  23. package/dist/cjs/index-80419303.js.map +1 -0
  24. package/dist/cjs/{index-861e0cbe.js → index-96a8951f.js} +5 -1
  25. package/dist/cjs/index-96a8951f.js.map +1 -0
  26. package/dist/cjs/info.config.helper-c5d9f781.js +16 -0
  27. package/dist/cjs/info.config.helper-c5d9f781.js.map +1 -0
  28. package/dist/cjs/loader.cjs.js +2 -2
  29. package/dist/cjs/loading-spinner.cjs.entry.js +2 -2
  30. package/dist/cjs/pedido-finalizado.cjs.entry.js +3 -3
  31. package/dist/cjs/phone-cancel-input.cjs.entry.js +25 -0
  32. package/dist/cjs/phone-cancel-input.cjs.entry.js.map +1 -0
  33. package/dist/cjs/phone-input-mask.cjs.entry.js +17 -4
  34. package/dist/cjs/phone-input-mask.cjs.entry.js.map +1 -1
  35. package/dist/cjs/phone-input.cjs.entry.js +25 -0
  36. package/dist/cjs/phone-input.cjs.entry.js.map +1 -0
  37. package/dist/collection/collection-manifest.json +6 -0
  38. package/dist/collection/components/button/crm-button.css +22 -0
  39. package/dist/collection/components/button/index.js +59 -0
  40. package/dist/collection/components/button/index.js.map +1 -1
  41. package/dist/collection/components/countdown-timer/countdown-timer.js +51 -0
  42. package/dist/collection/components/countdown-timer/countdown-timer.js.map +1 -0
  43. package/dist/collection/components/crm-bonus/crm-bonus.css +0 -3
  44. package/dist/collection/components/crm-bonus/crm-bonus.js +38 -2
  45. package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
  46. package/dist/collection/components/crm-bonus-form/crm-bonus-form.js +2 -2
  47. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js +1 -1
  48. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.css +1 -5
  49. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js +1 -1
  50. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.css +1 -0
  51. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js +1 -1
  52. package/dist/collection/components/crm-bonus-form/subcomponents/name-input/name-input.js +1 -1
  53. package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js +1 -1
  54. package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js +1 -1
  55. package/dist/collection/components/giftback-form/giftback-form.css +74 -0
  56. package/dist/collection/components/giftback-form/giftback-form.js +246 -0
  57. package/dist/collection/components/giftback-form/giftback-form.js.map +1 -0
  58. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.css +154 -0
  59. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js +156 -0
  60. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js.map +1 -0
  61. package/dist/collection/components/giftback-form/subcomponents/giftback-message/giftback-massage.js +11 -0
  62. package/dist/collection/components/giftback-form/subcomponents/giftback-message/giftback-massage.js.map +1 -0
  63. package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js +80 -0
  64. package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js.map +1 -0
  65. package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.css +84 -0
  66. package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js +174 -0
  67. package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js.map +1 -0
  68. package/dist/collection/components/loading-spinner/loading-spinner.js +1 -1
  69. package/dist/collection/components/modal/app-modal.js +1 -1
  70. package/dist/collection/components/note/crm-bonus-note.css +23 -7
  71. package/dist/collection/components/note/crm-bonus-note.js +33 -5
  72. package/dist/collection/components/note/crm-bonus-note.js.map +1 -1
  73. package/dist/collection/components/pedido/pedido.js +1 -1
  74. package/dist/collection/components/phone/phone-input-mask.css +18 -39
  75. package/dist/collection/components/phone/phone-input-mask.js +17 -3
  76. package/dist/collection/components/phone/phone-input-mask.js.map +1 -1
  77. package/dist/collection/contants/index.js +2 -0
  78. package/dist/collection/contants/index.js.map +1 -1
  79. package/dist/collection/helpers/info.config.helper.js +11 -0
  80. package/dist/collection/helpers/info.config.helper.js.map +1 -0
  81. package/dist/collection/i18n/i18n.js +25 -0
  82. package/dist/collection/i18n/i18n.js.map +1 -0
  83. package/dist/collection/services/crmbonus.service.js +8 -0
  84. package/dist/collection/services/crmbonus.service.js.map +1 -1
  85. package/dist/components/app-modal.js +39 -1
  86. package/dist/components/app-modal.js.map +1 -1
  87. package/dist/components/countdown-timer.d.ts +11 -0
  88. package/dist/components/countdown-timer.js +8 -0
  89. package/dist/components/countdown-timer.js.map +1 -0
  90. package/dist/components/crm-bonus-form.js +158 -1
  91. package/dist/components/crm-bonus-form.js.map +1 -1
  92. package/dist/components/crm-bonus-note.js +19 -7
  93. package/dist/components/crm-bonus-note.js.map +1 -1
  94. package/dist/components/crm-bonus.js +58 -33
  95. package/dist/components/crm-bonus.js.map +1 -1
  96. package/dist/components/crm-button.d.ts +11 -0
  97. package/dist/components/crm-button.js +8 -0
  98. package/dist/components/crm-button.js.map +1 -0
  99. package/dist/components/crm-giftback-form.d.ts +11 -0
  100. package/dist/components/crm-giftback-form.js +8 -0
  101. package/dist/components/crm-giftback-form.js.map +1 -0
  102. package/dist/components/giftback-finish.js +1 -1
  103. package/dist/components/giftback-info.d.ts +11 -0
  104. package/dist/components/giftback-info.js +8 -0
  105. package/dist/components/giftback-info.js.map +1 -0
  106. package/dist/components/giftback-pin.js +1 -1
  107. package/dist/components/giftback-progress.js +1 -1
  108. package/dist/components/index.js +1 -1
  109. package/dist/components/loading-spinner.js +1 -1
  110. package/dist/components/name-input.js +1 -1
  111. package/dist/components/p-0a57e57f.js +91 -0
  112. package/dist/components/p-0a57e57f.js.map +1 -0
  113. package/dist/components/p-1d5eeac0.js +2207 -0
  114. package/dist/components/p-1d5eeac0.js.map +1 -0
  115. package/dist/components/{p-faf7103e.js → p-2f266d73.js} +6 -2
  116. package/dist/components/p-2f266d73.js.map +1 -0
  117. package/dist/{esm/crmbonus.service-4ee773c8.js → components/p-384fabf7.js} +10 -2
  118. package/dist/components/p-384fabf7.js.map +1 -0
  119. package/dist/components/p-39d680b6.js +49 -0
  120. package/dist/components/p-39d680b6.js.map +1 -0
  121. package/dist/components/p-46578efa.js +44 -0
  122. package/dist/components/p-46578efa.js.map +1 -0
  123. package/dist/components/{p-0e99f907.js → p-4f18f4c0.js} +5 -5
  124. package/dist/components/p-4f18f4c0.js.map +1 -0
  125. package/dist/components/{p-ddc0ac71.js → p-5c3fe5a8.js} +3 -3
  126. package/dist/components/{p-ddc0ac71.js.map → p-5c3fe5a8.js.map} +1 -1
  127. package/dist/components/p-5f0003a4.js +62 -0
  128. package/dist/components/p-5f0003a4.js.map +1 -0
  129. package/dist/components/p-6703fdff.js +106 -0
  130. package/dist/components/p-6703fdff.js.map +1 -0
  131. package/dist/components/p-6a95cc63.js +238 -0
  132. package/dist/components/p-6a95cc63.js.map +1 -0
  133. package/dist/components/p-75ba7b9a.js +14 -0
  134. package/dist/components/p-75ba7b9a.js.map +1 -0
  135. package/dist/components/{p-19b83423.js → p-a30bd6b1.js} +4 -4
  136. package/dist/components/{p-19b83423.js.map → p-a30bd6b1.js.map} +1 -1
  137. package/dist/{esm/index-ea02697e.js → components/p-a561251a.js} +4 -2
  138. package/dist/components/p-a561251a.js.map +1 -0
  139. package/dist/components/p-be365312.js +76 -0
  140. package/dist/components/p-be365312.js.map +1 -0
  141. package/dist/components/{p-e2727638.js → p-f168d5f6.js} +4 -4
  142. package/dist/components/p-f168d5f6.js.map +1 -0
  143. package/dist/components/{p-530006e6.js → p-f5fcff75.js} +3 -3
  144. package/dist/components/{p-530006e6.js.map → p-f5fcff75.js.map} +1 -1
  145. package/dist/components/pedido-finalizado.js +3 -3
  146. package/dist/components/phone-cancel-input.js +48 -1
  147. package/dist/components/phone-cancel-input.js.map +1 -1
  148. package/dist/components/phone-form.d.ts +11 -0
  149. package/dist/components/phone-form.js +8 -0
  150. package/dist/components/phone-form.js.map +1 -0
  151. package/dist/components/phone-input-mask.js +1 -1
  152. package/dist/components/phone-input.js +48 -1
  153. package/dist/components/phone-input.js.map +1 -1
  154. package/dist/components/pin-form.d.ts +11 -0
  155. package/dist/components/pin-form.js +8 -0
  156. package/dist/components/pin-form.js.map +1 -0
  157. package/dist/crmbonus-component-wake/crmbonus-component-wake.css +1 -0
  158. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -1
  159. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
  160. package/dist/crmbonus-component-wake/p-1d5eeac0.js +2 -0
  161. package/dist/crmbonus-component-wake/p-1d5eeac0.js.map +1 -0
  162. package/dist/crmbonus-component-wake/{p-878c694e.js → p-384fabf7.js} +2 -2
  163. package/dist/crmbonus-component-wake/p-384fabf7.js.map +1 -0
  164. package/dist/crmbonus-component-wake/{p-a01c57ab.entry.js → p-3beb5158.entry.js} +2 -2
  165. package/dist/crmbonus-component-wake/p-5a8fa5b9.entry.js +2 -0
  166. package/dist/crmbonus-component-wake/p-5a8fa5b9.entry.js.map +1 -0
  167. package/dist/crmbonus-component-wake/p-5ede3b10.entry.js +2 -0
  168. package/dist/crmbonus-component-wake/p-5ede3b10.entry.js.map +1 -0
  169. package/dist/crmbonus-component-wake/p-66f41fd0.entry.js +2 -0
  170. package/dist/crmbonus-component-wake/p-66f41fd0.entry.js.map +1 -0
  171. package/dist/crmbonus-component-wake/p-6e6bf96e.js +3 -0
  172. package/dist/crmbonus-component-wake/p-6e6bf96e.js.map +1 -0
  173. package/dist/crmbonus-component-wake/p-75ba7b9a.js +2 -0
  174. package/dist/crmbonus-component-wake/p-75ba7b9a.js.map +1 -0
  175. package/dist/crmbonus-component-wake/p-830b5bdc.entry.js +2 -0
  176. package/dist/crmbonus-component-wake/p-830b5bdc.entry.js.map +1 -0
  177. package/dist/crmbonus-component-wake/p-8944b009.entry.js +2 -0
  178. package/dist/crmbonus-component-wake/p-8944b009.entry.js.map +1 -0
  179. package/dist/crmbonus-component-wake/p-8b9a1aec.entry.js +2 -0
  180. package/dist/crmbonus-component-wake/p-8b9a1aec.entry.js.map +1 -0
  181. package/dist/crmbonus-component-wake/{p-001e3e2b.entry.js → p-9514339e.entry.js} +2 -2
  182. package/dist/crmbonus-component-wake/p-a561251a.js +2 -0
  183. package/dist/crmbonus-component-wake/p-a561251a.js.map +1 -0
  184. package/dist/crmbonus-component-wake/p-adb37e26.entry.js +2 -0
  185. package/dist/crmbonus-component-wake/p-adb37e26.entry.js.map +1 -0
  186. package/dist/crmbonus-component-wake/p-c72a11ba.entry.js +2 -0
  187. package/dist/crmbonus-component-wake/p-c72a11ba.entry.js.map +1 -0
  188. package/dist/crmbonus-component-wake/p-cc452df3.entry.js +2 -0
  189. package/dist/crmbonus-component-wake/p-cc452df3.entry.js.map +1 -0
  190. package/dist/crmbonus-component-wake/p-d0349daf.entry.js +2 -0
  191. package/dist/crmbonus-component-wake/p-d0349daf.entry.js.map +1 -0
  192. package/dist/crmbonus-component-wake/p-e9cc180e.entry.js +2 -0
  193. package/dist/crmbonus-component-wake/p-e9cc180e.entry.js.map +1 -0
  194. package/dist/env.js +1 -1
  195. package/dist/env.js.map +1 -1
  196. package/dist/esm/app-modal.entry.js +24 -0
  197. package/dist/esm/app-modal.entry.js.map +1 -0
  198. package/dist/esm/countdown-timer_4.entry.js +169 -0
  199. package/dist/esm/countdown-timer_4.entry.js.map +1 -0
  200. package/dist/esm/crm-bonus-form.entry.js +99 -0
  201. package/dist/esm/crm-bonus-form.entry.js.map +1 -0
  202. package/dist/esm/crm-bonus-note.entry.js +16 -6
  203. package/dist/esm/crm-bonus-note.entry.js.map +1 -1
  204. package/dist/esm/crm-bonus.entry.js +41 -5
  205. package/dist/esm/crm-bonus.entry.js.map +1 -1
  206. package/dist/esm/crm-button.entry.js +20 -0
  207. package/dist/esm/crm-button.entry.js.map +1 -0
  208. package/dist/esm/crm-giftback-form.entry.js +167 -0
  209. package/dist/esm/crm-giftback-form.entry.js.map +1 -0
  210. package/dist/esm/crmbonus-component-wake.js +3 -3
  211. package/dist/{components/p-878c694e.js → esm/crmbonus.service-a846150c.js} +10 -2
  212. package/dist/esm/crmbonus.service-a846150c.js.map +1 -0
  213. package/dist/esm/giftback-finish_4.entry.js +6 -6
  214. package/dist/esm/giftback-finish_4.entry.js.map +1 -1
  215. package/dist/esm/i18n-853fedb3.js +2207 -0
  216. package/dist/esm/i18n-853fedb3.js.map +1 -0
  217. package/dist/esm/index-3c6d4feb.js +14 -0
  218. package/dist/esm/index-3c6d4feb.js.map +1 -0
  219. package/dist/esm/{index-9f7bde48.js → index-a4c14fca.js} +9 -4
  220. package/dist/esm/index-a4c14fca.js.map +1 -0
  221. package/dist/esm/info.config.helper-42d9ddf9.js +14 -0
  222. package/dist/esm/info.config.helper-42d9ddf9.js.map +1 -0
  223. package/dist/esm/loader.js +3 -3
  224. package/dist/esm/loading-spinner.entry.js +2 -2
  225. package/dist/esm/pedido-finalizado.entry.js +3 -3
  226. package/dist/esm/phone-cancel-input.entry.js +21 -0
  227. package/dist/esm/phone-cancel-input.entry.js.map +1 -0
  228. package/dist/esm/phone-input-mask.entry.js +17 -4
  229. package/dist/esm/phone-input-mask.entry.js.map +1 -1
  230. package/dist/esm/phone-input.entry.js +21 -0
  231. package/dist/esm/phone-input.entry.js.map +1 -0
  232. package/dist/types/components/button/index.d.ts +5 -0
  233. package/dist/types/components/countdown-timer/countdown-timer.d.ts +8 -0
  234. package/dist/types/components/crm-bonus/crm-bonus.d.ts +1 -0
  235. package/dist/types/components/giftback-form/giftback-form.d.ts +32 -0
  236. package/dist/types/components/giftback-form/subcomponents/giftback-info/giftback-info.d.ts +15 -0
  237. package/dist/types/components/giftback-form/subcomponents/giftback-message/giftback-massage.d.ts +3 -0
  238. package/dist/types/components/giftback-form/subcomponents/phone-form/phone-form.d.ts +8 -0
  239. package/dist/types/components/giftback-form/subcomponents/pin-form/pin-form.d.ts +19 -0
  240. package/dist/types/components/note/crm-bonus-note.d.ts +4 -0
  241. package/dist/types/components/phone/phone-input-mask.d.ts +2 -0
  242. package/dist/types/components.d.ts +118 -0
  243. package/dist/types/contants/index.d.ts +3 -1
  244. package/dist/types/helpers/info.config.helper.d.ts +6 -0
  245. package/dist/types/i18n/i18n.d.ts +2 -0
  246. package/dist/types/services/crmbonus.service.d.ts +1 -0
  247. package/package.json +3 -2
  248. package/dist/cjs/app-modal_4.cjs.entry.js +0 -157
  249. package/dist/cjs/app-modal_4.cjs.entry.js.map +0 -1
  250. package/dist/cjs/crmbonus.service-e375ebfe.js.map +0 -1
  251. package/dist/cjs/index-52d8a075.js.map +0 -1
  252. package/dist/cjs/index-861e0cbe.js.map +0 -1
  253. package/dist/components/p-03c2447c.js +0 -170
  254. package/dist/components/p-03c2447c.js.map +0 -1
  255. package/dist/components/p-0e99f907.js.map +0 -1
  256. package/dist/components/p-1dbb0f43.js +0 -43
  257. package/dist/components/p-1dbb0f43.js.map +0 -1
  258. package/dist/components/p-3c29c6ad.js +0 -62
  259. package/dist/components/p-3c29c6ad.js.map +0 -1
  260. package/dist/components/p-41d42a66.js +0 -52
  261. package/dist/components/p-41d42a66.js.map +0 -1
  262. package/dist/components/p-6c553ee7.js +0 -52
  263. package/dist/components/p-6c553ee7.js.map +0 -1
  264. package/dist/components/p-878c694e.js.map +0 -1
  265. package/dist/components/p-e2727638.js.map +0 -1
  266. package/dist/components/p-faf7103e.js.map +0 -1
  267. package/dist/crmbonus-component-wake/p-002f2417.entry.js +0 -2
  268. package/dist/crmbonus-component-wake/p-002f2417.entry.js.map +0 -1
  269. package/dist/crmbonus-component-wake/p-2636f2f0.entry.js +0 -2
  270. package/dist/crmbonus-component-wake/p-2636f2f0.entry.js.map +0 -1
  271. package/dist/crmbonus-component-wake/p-3582baf8.entry.js +0 -2
  272. package/dist/crmbonus-component-wake/p-3582baf8.entry.js.map +0 -1
  273. package/dist/crmbonus-component-wake/p-5febaa3c.entry.js +0 -2
  274. package/dist/crmbonus-component-wake/p-5febaa3c.entry.js.map +0 -1
  275. package/dist/crmbonus-component-wake/p-61df4eb6.entry.js +0 -2
  276. package/dist/crmbonus-component-wake/p-61df4eb6.entry.js.map +0 -1
  277. package/dist/crmbonus-component-wake/p-72510682.js +0 -3
  278. package/dist/crmbonus-component-wake/p-72510682.js.map +0 -1
  279. package/dist/crmbonus-component-wake/p-878c694e.js.map +0 -1
  280. package/dist/crmbonus-component-wake/p-9b967605.js +0 -2
  281. package/dist/crmbonus-component-wake/p-9b967605.js.map +0 -1
  282. package/dist/esm/app-modal_4.entry.js +0 -150
  283. package/dist/esm/app-modal_4.entry.js.map +0 -1
  284. package/dist/esm/crmbonus.service-4ee773c8.js.map +0 -1
  285. package/dist/esm/index-9f7bde48.js.map +0 -1
  286. package/dist/esm/index-ea02697e.js.map +0 -1
  287. /package/dist/crmbonus-component-wake/{p-a01c57ab.entry.js.map → p-3beb5158.entry.js.map} +0 -0
  288. /package/dist/crmbonus-component-wake/{p-001e3e2b.entry.js.map → p-9514339e.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"phone-input-mask.entry.js","mappings":";;AAAA,MAAM,iBAAiB,GAAG,ivCAAivC,CAAC;AAC5wC,6BAAe,iBAAiB;;MCMnB,cAAc;;;qBACE,EAAE;;;;IAI3B,iBAAiB;QACb,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;KAClC;IAEO,WAAW,CAAC,KAAa;QAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACzC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;QAC7D,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QAEzB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAC7C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAE7C,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC;KACrC;IAEO,WAAW,CAAC,KAAY;QAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KAC9C;IAGM,MAAM,QAAQ;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC;KACrB;IAED,MAAM;QACF,QACI,8DACI,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAC,OAAO,EACV,IAAI,EAAC,KAAK,EACV,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAC3C,WAAW,EAAC,iBAAiB,GAC/B,EACJ;KACL;;;;;;","names":[],"sources":["src/components/phone/phone-input-mask.css?tag=phone-input-mask&encapsulation=shadow","src/components/phone/phone-input-mask.tsx"],"sourcesContent":[":host {\n width: 100%;\n}\n\n.inline-text-field-container {\n display: flex;\n flex-direction: column;\n}\n\n@supports (top: max(0%)) {\n .mdc-text-field--outlined {\n padding-right: max(16px, var(--mdc-shape-small, 4px));\n }\n}\n\n@supports (top: max(0%)) {\n .mdc-text-field--outlined {\n padding-left: max(16px, calc(var(--mdc-shape-small, 4px) + 4px));\n }\n}\n\n.mdc-text-field--outlined {\n height: 55px;\n overflow: visible;\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.mdc-text-field {\n border-top-left-radius: 4px;\n border-top-left-radius: var(--mdc-shape-small, 4px);\n border-top-right-radius: 4px;\n border-top-right-radius: var(--mdc-shape-small, 4px);\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n display: inline-flex;\n align-items: baseline;\n padding: 0 16px;\n position: relative;\n box-sizing: border-box;\n overflow: hidden;\n will-change: opacity, transform, color;\n}","import { Component, h, Method, Prop, State } from '@stencil/core';\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 @Prop() initialValue: string;\n @Prop() disabled: boolean;\n\n componentWillLoad() {\n this.phone = this.initialValue; \n }\n\n private formatPhone(value: string): string {\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 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\n @Method()\n public async getPhone() {\n return this.phone;\n }\n\n render() {\n return (\n <input\n disabled={this.disabled}\n id=\"phone\"\n type=\"tel\"\n class=\"phone\"\n value={this.phone}\n onInput={(event) => this.handleInput(event)}\n placeholder=\"(12) 94567-8910\"\n />\n );\n }\n}\n"],"version":3}
1
+ {"file":"phone-input-mask.entry.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,ouBAAouB,CAAC;AAC/vB,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,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;QAE7D,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QAEzB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAC7C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAE7C,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC;KACrC;IAEO,WAAW,CAAC,KAAY;QAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE3C,IAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;YACvC,IAAI,CAAC,OAAO,GAAG,4BAA4B,CAAA;SAC9C;aAAM;YACH,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;SACpB;KACJ;IAED,mBAAmB,CAAC,KAAa;QAC7B,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QAC3B,MAAM,UAAU,GAAG,yBAAyB,CAAC;QAC7C,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACjC;IAGM,MAAM,QAAQ;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC;KACrB;IAED,MAAM;QACF,QACI,8DACI,8DACI,QAAQ,EAAE,IAAI,CAAC,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: 246px;\n height: 48px;\n padding: 13px 16px 13px 16px;\n border: 1px solid #CCCCCC;\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\n validatePhoneNumber(phone: string): boolean {\n console.log('phone', phone)\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=\"(12) 94567-8910\"\n />\n <p class=\"crm-erro-msg\">{this.message}</p>\n </div>\n\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,21 @@
1
+ import { r as registerInstance, h } from './index-a4c14fca.js';
2
+
3
+ const PhoneInput = class {
4
+ constructor(hostRef) {
5
+ registerInstance(this, hostRef);
6
+ this.sendPin = undefined;
7
+ this.loading = undefined;
8
+ this.value = undefined;
9
+ }
10
+ async validatePhone() {
11
+ const phone = await this.phoneInputMask.getPhone();
12
+ await this.sendPin(phone);
13
+ }
14
+ render() {
15
+ return (h("div", { key: '7388feb890331d696bf51ddc5690707673e06546', class: "form-container" }, h("phone-input-mask", { key: 'a3241090e731daa0b558503a9347de7a15f0025e', initialValue: this.value, ref: ref => this.phoneInputMask = ref }), h("button", { key: 'd36c5fd1b8cf7dfb0d3100450215c426855e82a6', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "validar" : h("loading-spinner", { size: "11px", color: "#fff" }))));
16
+ }
17
+ };
18
+
19
+ export { PhoneInput as phone_input };
20
+
21
+ //# sourceMappingURL=phone-input.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"phone-input.entry.js","mappings":";;MAKa,UAAU;;;;;;;IAQnB,MAAM,aAAa;QACf,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;QACnD,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KAC7B;IAED,MAAM;QACF,QACI,4DAAK,KAAK,EAAC,gBAAgB,IACvB,yEAAkB,YAAY,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,cAAc,GAAG,GAAG,GAAI,EACrF,+DAAQ,KAAK,EAAE,0BAA0B,IAAI,CAAC,OAAO,GAAG,UAAU,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,IAE/H,CAAC,IAAI,CAAC,OAAO,GAAG,SAAS,GAAG,uBAAiB,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,GAAG,CAEvE,CACP,EACT;KACJ;;;;;","names":[],"sources":["src/components/crm-bonus-form/subcomponents/phone/phone.input.tsx"],"sourcesContent":["import { Component, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: 'phone-input'\n})\nexport class PhoneInput {\n\n private phoneInputMask: HTMLPhoneInputMaskElement;\n\n @Prop() sendPin: Function;\n @Prop() loading: boolean;\n @Prop() value: string;\n\n async validatePhone() {\n const phone = await this.phoneInputMask.getPhone();\n await this.sendPin(phone);\n }\n\n render() {\n return (\n <div class=\"form-container\">\n <phone-input-mask initialValue={this.value} ref={ref => this.phoneInputMask = ref} />\n <button class={`btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `} disabled={this.loading} onClick={() => this.validatePhone()}>\n {\n !this.loading ? \"validar\" : <loading-spinner size=\"11px\" color=\"#fff\" />\n }\n </button>\n </div>\n )\n }\n}"],"version":3}
@@ -0,0 +1,5 @@
1
+ export declare class Button {
2
+ txtBtn: string;
3
+ loading: boolean;
4
+ render(): any;
5
+ }
@@ -0,0 +1,8 @@
1
+ export declare class CountdownTimer {
2
+ downtime: () => void;
3
+ counter: number;
4
+ private intervalId;
5
+ componentWillLoad(): void;
6
+ disconnectedCallback(): void;
7
+ render(): any;
8
+ }
@@ -18,6 +18,7 @@ export declare class CrmBonus {
18
18
  sent: IPinSent;
19
19
  session: string;
20
20
  componentWillLoad(): Promise<void>;
21
+ loadConfigStore(): Promise<void>;
21
22
  handleLoad(): Promise<void>;
22
23
  loadSession(): Promise<void>;
23
24
  buildAndGetProducts(): Promise<void>;
@@ -0,0 +1,32 @@
1
+ import { StepFormEnum } from "../../contants";
2
+ import { IPinSent } from '../../dto/pin.sent';
3
+ import { IBonus, IProduct } from "../../dto/validate.pin.bonus";
4
+ import { IInfoStore } from "../../helpers/info.config.helper";
5
+ export declare class CrmBonus {
6
+ private crmBonusService;
7
+ storeName: any;
8
+ cartId: any;
9
+ products: Array<IProduct>;
10
+ value: string;
11
+ loading: boolean;
12
+ message: string;
13
+ phone: string;
14
+ pinInfo: IPinSent;
15
+ step: StepFormEnum;
16
+ bonus: IBonus;
17
+ sucess: string;
18
+ error: string;
19
+ config: IInfoStore;
20
+ handleSendPin(phone: string): Promise<void>;
21
+ componentWillLoad(): void;
22
+ private convertStringToNumber;
23
+ sendPin(): Promise<void>;
24
+ changePhone(): void;
25
+ validateBonus(pin: string): Promise<void>;
26
+ handleCancel(): void;
27
+ cancel(): Promise<void>;
28
+ reserveApply(amount: number): Promise<void>;
29
+ save(amount: number): void;
30
+ reserve(amount: number): Promise<void>;
31
+ render(): any;
32
+ }
@@ -0,0 +1,15 @@
1
+ import { IBonus } from "../../../../dto/validate.pin.bonus";
2
+ export declare class GiftbackInfo {
3
+ usedValue: number;
4
+ selectedOption: string;
5
+ loading: boolean;
6
+ bonus: Partial<IBonus>;
7
+ reserve: (amountRedeemed: number) => void;
8
+ cancel: () => void;
9
+ sliderPosition: number;
10
+ componentWillLoad(): void;
11
+ handleSliderChange(event: Event): void;
12
+ private buildPositionSlider;
13
+ handleOptionChange(option: string): Promise<void>;
14
+ render(): any;
15
+ }
@@ -0,0 +1,3 @@
1
+ export declare class GiftbackMessage {
2
+ render(): any;
3
+ }
@@ -0,0 +1,8 @@
1
+ export declare class PhoneForm {
2
+ private phoneInputMask;
3
+ value: string;
4
+ loading: boolean;
5
+ handlerSubmit: (phone: string) => void;
6
+ handlePhone(): Promise<void>;
7
+ render(): any;
8
+ }
@@ -0,0 +1,19 @@
1
+ import { IPinSent } from '../../../../dto/pin.sent';
2
+ export declare class GiftbackPin {
3
+ validate: (pin: string) => void;
4
+ cancel: () => void;
5
+ resend: () => void;
6
+ sent: IPinSent;
7
+ loading: boolean;
8
+ phone: string;
9
+ pin: string[];
10
+ isVerified: boolean;
11
+ canResend: boolean;
12
+ componentWillLoad(): void;
13
+ handleInput(event: Event, index: number): void;
14
+ validatePin(): void;
15
+ verifyPin(): void;
16
+ handleTimeout(): void;
17
+ handleResend(): Promise<void>;
18
+ render(): any;
19
+ }
@@ -1,8 +1,12 @@
1
+ import { IInfoStore } from "../../helpers/info.config.helper";
1
2
  export declare class CrmBonusNote {
2
3
  cartId: any;
4
+ storename: any;
3
5
  url: string;
6
+ config: IInfoStore;
4
7
  componentWillLoad(): void;
5
8
  upadateCheckToFreteAndGetUrl(): void;
6
9
  handleHide(): boolean;
10
+ getAmount(): string;
7
11
  render(): any;
8
12
  }
@@ -1,10 +1,12 @@
1
1
  export declare class PhoneInputMask {
2
2
  phone: string;
3
+ message: string;
3
4
  initialValue: string;
4
5
  disabled: boolean;
5
6
  componentWillLoad(): void;
6
7
  private formatPhone;
7
8
  private handleInput;
9
+ validatePhoneNumber(phone: string): boolean;
8
10
  getPhone(): Promise<string>;
9
11
  render(): any;
10
12
  }
@@ -16,6 +16,9 @@ export namespace Components {
16
16
  "isOpen": boolean;
17
17
  "modalTitle": string;
18
18
  }
19
+ interface CountdownTimer {
20
+ "downtime": () => void;
21
+ }
19
22
  interface CrmBonus {
20
23
  "cartId": any;
21
24
  "productsInString": string;
@@ -38,9 +41,25 @@ export namespace Components {
38
41
  }
39
42
  interface CrmBonusNote {
40
43
  "cartId": any;
44
+ "storename": any;
45
+ }
46
+ interface CrmButton {
47
+ "loading": boolean;
48
+ "txtBtn": string;
49
+ }
50
+ interface CrmGiftbackForm {
51
+ "cartId": any;
52
+ "products": Array<IProduct>;
53
+ "storeName": any;
41
54
  }
42
55
  interface GiftbackFinish {
43
56
  }
57
+ interface GiftbackInfo {
58
+ "bonus": Partial<IBonus>;
59
+ "cancel": () => void;
60
+ "loading": boolean;
61
+ "reserve": (amountRedeemed: number) => void;
62
+ }
44
63
  interface GiftbackPin {
45
64
  "cancel": () => void;
46
65
  "loading": boolean;
@@ -73,6 +92,11 @@ export namespace Components {
73
92
  "sendPin": Function;
74
93
  "value": string;
75
94
  }
95
+ interface PhoneForm {
96
+ "handlerSubmit": (phone: string) => void;
97
+ "loading": boolean;
98
+ "value": string;
99
+ }
76
100
  interface PhoneInput {
77
101
  "loading": boolean;
78
102
  "sendPin": Function;
@@ -83,6 +107,14 @@ export namespace Components {
83
107
  "getPhone": () => Promise<string>;
84
108
  "initialValue": string;
85
109
  }
110
+ interface PinForm {
111
+ "cancel": () => void;
112
+ "loading": boolean;
113
+ "phone": string;
114
+ "resend": () => void;
115
+ "sent": IPinSent;
116
+ "validate": (pin: string) => void;
117
+ }
86
118
  }
87
119
  export interface AppModalCustomEvent<T> extends CustomEvent<T> {
88
120
  detail: T;
@@ -106,6 +138,12 @@ declare global {
106
138
  prototype: HTMLAppModalElement;
107
139
  new (): HTMLAppModalElement;
108
140
  };
141
+ interface HTMLCountdownTimerElement extends Components.CountdownTimer, HTMLStencilElement {
142
+ }
143
+ var HTMLCountdownTimerElement: {
144
+ prototype: HTMLCountdownTimerElement;
145
+ new (): HTMLCountdownTimerElement;
146
+ };
109
147
  interface HTMLCrmBonusElement extends Components.CrmBonus, HTMLStencilElement {
110
148
  }
111
149
  var HTMLCrmBonusElement: {
@@ -124,12 +162,30 @@ declare global {
124
162
  prototype: HTMLCrmBonusNoteElement;
125
163
  new (): HTMLCrmBonusNoteElement;
126
164
  };
165
+ interface HTMLCrmButtonElement extends Components.CrmButton, HTMLStencilElement {
166
+ }
167
+ var HTMLCrmButtonElement: {
168
+ prototype: HTMLCrmButtonElement;
169
+ new (): HTMLCrmButtonElement;
170
+ };
171
+ interface HTMLCrmGiftbackFormElement extends Components.CrmGiftbackForm, HTMLStencilElement {
172
+ }
173
+ var HTMLCrmGiftbackFormElement: {
174
+ prototype: HTMLCrmGiftbackFormElement;
175
+ new (): HTMLCrmGiftbackFormElement;
176
+ };
127
177
  interface HTMLGiftbackFinishElement extends Components.GiftbackFinish, HTMLStencilElement {
128
178
  }
129
179
  var HTMLGiftbackFinishElement: {
130
180
  prototype: HTMLGiftbackFinishElement;
131
181
  new (): HTMLGiftbackFinishElement;
132
182
  };
183
+ interface HTMLGiftbackInfoElement extends Components.GiftbackInfo, HTMLStencilElement {
184
+ }
185
+ var HTMLGiftbackInfoElement: {
186
+ prototype: HTMLGiftbackInfoElement;
187
+ new (): HTMLGiftbackInfoElement;
188
+ };
133
189
  interface HTMLGiftbackPinElement extends Components.GiftbackPin, HTMLStencilElement {
134
190
  }
135
191
  var HTMLGiftbackPinElement: {
@@ -166,6 +222,12 @@ declare global {
166
222
  prototype: HTMLPhoneCancelInputElement;
167
223
  new (): HTMLPhoneCancelInputElement;
168
224
  };
225
+ interface HTMLPhoneFormElement extends Components.PhoneForm, HTMLStencilElement {
226
+ }
227
+ var HTMLPhoneFormElement: {
228
+ prototype: HTMLPhoneFormElement;
229
+ new (): HTMLPhoneFormElement;
230
+ };
169
231
  interface HTMLPhoneInputElement extends Components.PhoneInput, HTMLStencilElement {
170
232
  }
171
233
  var HTMLPhoneInputElement: {
@@ -178,20 +240,32 @@ declare global {
178
240
  prototype: HTMLPhoneInputMaskElement;
179
241
  new (): HTMLPhoneInputMaskElement;
180
242
  };
243
+ interface HTMLPinFormElement extends Components.PinForm, HTMLStencilElement {
244
+ }
245
+ var HTMLPinFormElement: {
246
+ prototype: HTMLPinFormElement;
247
+ new (): HTMLPinFormElement;
248
+ };
181
249
  interface HTMLElementTagNameMap {
182
250
  "app-modal": HTMLAppModalElement;
251
+ "countdown-timer": HTMLCountdownTimerElement;
183
252
  "crm-bonus": HTMLCrmBonusElement;
184
253
  "crm-bonus-form": HTMLCrmBonusFormElement;
185
254
  "crm-bonus-note": HTMLCrmBonusNoteElement;
255
+ "crm-button": HTMLCrmButtonElement;
256
+ "crm-giftback-form": HTMLCrmGiftbackFormElement;
186
257
  "giftback-finish": HTMLGiftbackFinishElement;
258
+ "giftback-info": HTMLGiftbackInfoElement;
187
259
  "giftback-pin": HTMLGiftbackPinElement;
188
260
  "giftback-progress": HTMLGiftbackProgressElement;
189
261
  "loading-spinner": HTMLLoadingSpinnerElement;
190
262
  "name-input": HTMLNameInputElement;
191
263
  "pedido-finalizado": HTMLPedidoFinalizadoElement;
192
264
  "phone-cancel-input": HTMLPhoneCancelInputElement;
265
+ "phone-form": HTMLPhoneFormElement;
193
266
  "phone-input": HTMLPhoneInputElement;
194
267
  "phone-input-mask": HTMLPhoneInputMaskElement;
268
+ "pin-form": HTMLPinFormElement;
195
269
  }
196
270
  }
197
271
  declare namespace LocalJSX {
@@ -200,6 +274,9 @@ declare namespace LocalJSX {
200
274
  "modalTitle"?: string;
201
275
  "onModalClosed"?: (event: AppModalCustomEvent<void>) => void;
202
276
  }
277
+ interface CountdownTimer {
278
+ "downtime"?: () => void;
279
+ }
203
280
  interface CrmBonus {
204
281
  "cartId"?: any;
205
282
  "productsInString"?: string;
@@ -221,9 +298,25 @@ declare namespace LocalJSX {
221
298
  }
222
299
  interface CrmBonusNote {
223
300
  "cartId"?: any;
301
+ "storename"?: any;
302
+ }
303
+ interface CrmButton {
304
+ "loading"?: boolean;
305
+ "txtBtn"?: string;
306
+ }
307
+ interface CrmGiftbackForm {
308
+ "cartId"?: any;
309
+ "products"?: Array<IProduct>;
310
+ "storeName"?: any;
224
311
  }
225
312
  interface GiftbackFinish {
226
313
  }
314
+ interface GiftbackInfo {
315
+ "bonus"?: Partial<IBonus>;
316
+ "cancel"?: () => void;
317
+ "loading"?: boolean;
318
+ "reserve"?: (amountRedeemed: number) => void;
319
+ }
227
320
  interface GiftbackPin {
228
321
  "cancel"?: () => void;
229
322
  "loading"?: boolean;
@@ -256,6 +349,11 @@ declare namespace LocalJSX {
256
349
  "sendPin"?: Function;
257
350
  "value"?: string;
258
351
  }
352
+ interface PhoneForm {
353
+ "handlerSubmit"?: (phone: string) => void;
354
+ "loading"?: boolean;
355
+ "value"?: string;
356
+ }
259
357
  interface PhoneInput {
260
358
  "loading"?: boolean;
261
359
  "sendPin"?: Function;
@@ -265,20 +363,34 @@ declare namespace LocalJSX {
265
363
  "disabled"?: boolean;
266
364
  "initialValue"?: string;
267
365
  }
366
+ interface PinForm {
367
+ "cancel"?: () => void;
368
+ "loading"?: boolean;
369
+ "phone"?: string;
370
+ "resend"?: () => void;
371
+ "sent"?: IPinSent;
372
+ "validate"?: (pin: string) => void;
373
+ }
268
374
  interface IntrinsicElements {
269
375
  "app-modal": AppModal;
376
+ "countdown-timer": CountdownTimer;
270
377
  "crm-bonus": CrmBonus;
271
378
  "crm-bonus-form": CrmBonusForm;
272
379
  "crm-bonus-note": CrmBonusNote;
380
+ "crm-button": CrmButton;
381
+ "crm-giftback-form": CrmGiftbackForm;
273
382
  "giftback-finish": GiftbackFinish;
383
+ "giftback-info": GiftbackInfo;
274
384
  "giftback-pin": GiftbackPin;
275
385
  "giftback-progress": GiftbackProgress;
276
386
  "loading-spinner": LoadingSpinner;
277
387
  "name-input": NameInput;
278
388
  "pedido-finalizado": PedidoFinalizado;
279
389
  "phone-cancel-input": PhoneCancelInput;
390
+ "phone-form": PhoneForm;
280
391
  "phone-input": PhoneInput;
281
392
  "phone-input-mask": PhoneInputMask;
393
+ "pin-form": PinForm;
282
394
  }
283
395
  }
284
396
  export { LocalJSX as JSX };
@@ -286,18 +398,24 @@ declare module "@stencil/core" {
286
398
  export namespace JSX {
287
399
  interface IntrinsicElements {
288
400
  "app-modal": LocalJSX.AppModal & JSXBase.HTMLAttributes<HTMLAppModalElement>;
401
+ "countdown-timer": LocalJSX.CountdownTimer & JSXBase.HTMLAttributes<HTMLCountdownTimerElement>;
289
402
  "crm-bonus": LocalJSX.CrmBonus & JSXBase.HTMLAttributes<HTMLCrmBonusElement>;
290
403
  "crm-bonus-form": LocalJSX.CrmBonusForm & JSXBase.HTMLAttributes<HTMLCrmBonusFormElement>;
291
404
  "crm-bonus-note": LocalJSX.CrmBonusNote & JSXBase.HTMLAttributes<HTMLCrmBonusNoteElement>;
405
+ "crm-button": LocalJSX.CrmButton & JSXBase.HTMLAttributes<HTMLCrmButtonElement>;
406
+ "crm-giftback-form": LocalJSX.CrmGiftbackForm & JSXBase.HTMLAttributes<HTMLCrmGiftbackFormElement>;
292
407
  "giftback-finish": LocalJSX.GiftbackFinish & JSXBase.HTMLAttributes<HTMLGiftbackFinishElement>;
408
+ "giftback-info": LocalJSX.GiftbackInfo & JSXBase.HTMLAttributes<HTMLGiftbackInfoElement>;
293
409
  "giftback-pin": LocalJSX.GiftbackPin & JSXBase.HTMLAttributes<HTMLGiftbackPinElement>;
294
410
  "giftback-progress": LocalJSX.GiftbackProgress & JSXBase.HTMLAttributes<HTMLGiftbackProgressElement>;
295
411
  "loading-spinner": LocalJSX.LoadingSpinner & JSXBase.HTMLAttributes<HTMLLoadingSpinnerElement>;
296
412
  "name-input": LocalJSX.NameInput & JSXBase.HTMLAttributes<HTMLNameInputElement>;
297
413
  "pedido-finalizado": LocalJSX.PedidoFinalizado & JSXBase.HTMLAttributes<HTMLPedidoFinalizadoElement>;
298
414
  "phone-cancel-input": LocalJSX.PhoneCancelInput & JSXBase.HTMLAttributes<HTMLPhoneCancelInputElement>;
415
+ "phone-form": LocalJSX.PhoneForm & JSXBase.HTMLAttributes<HTMLPhoneFormElement>;
299
416
  "phone-input": LocalJSX.PhoneInput & JSXBase.HTMLAttributes<HTMLPhoneInputElement>;
300
417
  "phone-input-mask": LocalJSX.PhoneInputMask & JSXBase.HTMLAttributes<HTMLPhoneInputMaskElement>;
418
+ "pin-form": LocalJSX.PinForm & JSXBase.HTMLAttributes<HTMLPinFormElement>;
301
419
  }
302
420
  }
303
421
  }
@@ -3,5 +3,7 @@ export declare enum StepFormEnum {
3
3
  STEP_PHONE = 1,
4
4
  STEP_PIN = 2,
5
5
  STEP_RESERVE = 3,
6
- STEP_APPLY = 4
6
+ STEP_APPLY = 4,
7
+ STEP_NO_BONUS = 5
7
8
  }
9
+ export declare const MESSAGE_ERROR_INVALID_NUMBER = "N\u00FAmero inv\u00E1lido";
@@ -0,0 +1,6 @@
1
+ export interface IInfoStore {
2
+ btnApplyBonusLabel: string;
3
+ confirmationMessage: string;
4
+ giftbackTitle: string;
5
+ }
6
+ export declare function getInfoCustomization(storeName: string): IInfoStore;
@@ -0,0 +1,2 @@
1
+ import i18next from 'i18next';
2
+ export default i18next;
@@ -14,4 +14,5 @@ export declare class CrmBonusService {
14
14
  reserve(payload: IReserveDTO): Promise<any>;
15
15
  cancel(cartId: string): Promise<any>;
16
16
  getToken(store: string): Promise<string>;
17
+ getCustomization(storeName: string): Promise<void>;
17
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crmbonus-component-wake",
3
- "version": "1.0.47",
3
+ "version": "2.0.48",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -48,6 +48,7 @@
48
48
  },
49
49
  "license": "MIT",
50
50
  "dependencies": {
51
- "axios": "^1.7.7"
51
+ "axios": "^1.7.7",
52
+ "i18next": "^24.0.5"
52
53
  }
53
54
  }
@@ -1,157 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-52d8a075.js');
6
- const crmbonus_service = require('./crmbonus.service-e375ebfe.js');
7
- const index$1 = require('./index-861e0cbe.js');
8
-
9
- const appModalCss = ".modal-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);display:none;justify-content:center;align-items:center;z-index:1000}.modal-backdrop.visible{display:flex}.modal{background:white;border-radius:8px;padding:1rem;max-width:500px;width:90%;box-shadow:0 2px 10px rgba(0, 0, 0, 0.3)}.modal-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;margin-bottom:1rem}.close-button{background:none;border:none;font-size:1.5rem;cursor:pointer}.modal-body{}";
10
- const AppModalStyle0 = appModalCss;
11
-
12
- const AppModal = class {
13
- constructor(hostRef) {
14
- index.registerInstance(this, hostRef);
15
- this.modalClosed = index.createEvent(this, "modalClosed", 7);
16
- this.isOpen = false;
17
- this.modalTitle = undefined;
18
- }
19
- closeModal() {
20
- this.modalClosed.emit();
21
- }
22
- render() {
23
- return (index.h("div", { key: 'c6da9ce70d919346c641a5aa372ba17305c0d670', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, index.h("div", { key: '807ac561f4825f3ba470529d80135b7e2024a149', class: "modal" }, index.h("div", { key: '57de6ce754a7ad665b7bac3bcfc561e0baa694b4', class: "modal-header" }, index.h("h3", { key: 'a716a0c910ba51cf3700b4812924e8e75505b6ac' }, this.modalTitle), index.h("button", { key: '295e0b32f08233d48c376287496717a4edfeae6d', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), index.h("div", { key: 'b1abe2d5c073ba9a7bd329c47a631e5cff51e0ea', class: "modal-body" }, index.h("slot", { key: '135950e8e07a6eb1dc8c3eb2326c182617143893' })))));
24
- }
25
- };
26
- AppModal.style = AppModalStyle0;
27
-
28
- const crmBonusFormCss = ".form-container{width:100%;display:flex;justify-content:center;justify-content:space-around}.disabled{opacity:0.6;cursor:not-allowed}.message-error{color:#d11111;font-weight:bold;font-family:Arial;font-size:small;margin-left:16px}";
29
- const CrmBonusFormStyle0 = crmBonusFormCss;
30
-
31
- const CrmBonusForm = class {
32
- constructor(hostRef) {
33
- index.registerInstance(this, hostRef);
34
- this.crmBonusService = crmbonus_service.CrmBonusService.getInstance();
35
- this.storeName = undefined;
36
- this.cartId = undefined;
37
- this.products = undefined;
38
- this.customer = {
39
- phone: "",
40
- birthDate: "",
41
- document: "",
42
- name: ""
43
- };
44
- this.sent = undefined;
45
- this.stepNext = undefined;
46
- this.phone = undefined;
47
- this.loadingModal = undefined;
48
- this.saveStore = undefined;
49
- this.cancel = undefined;
50
- this.handleCustomerName = undefined;
51
- this.loading = false;
52
- this.step = index$1.StepFormEnum.STEP_NAME;
53
- this.message = undefined;
54
- this.bonus = undefined;
55
- }
56
- async setStep(step) {
57
- this.step = step;
58
- }
59
- async validateBonus(pin) {
60
- var _a, _b;
61
- this.loading = true;
62
- this.message = "";
63
- const payload = {
64
- pin: pin,
65
- cellphone: this.phone.toString(),
66
- storeId: this.sent.storeId.toString(),
67
- userId: this.sent.userId.toString(),
68
- checkoutId: this.cartId,
69
- checkoutProducts: this.products,
70
- name: null,
71
- storeName: this.storeName
72
- };
73
- try {
74
- this.bonus = await this.crmBonusService.validatePinBonus(payload);
75
- this.step = index$1.StepFormEnum.STEP_RESERVE;
76
- }
77
- catch (error) {
78
- 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;
79
- }
80
- finally {
81
- this.loading = false;
82
- }
83
- }
84
- async reserveApply(amount) {
85
- this.loading = true;
86
- this.message = "";
87
- try {
88
- await this.reserve(amount);
89
- this.step = index$1.StepFormEnum.STEP_APPLY;
90
- this.saveStore(amount);
91
- }
92
- catch (error) {
93
- this.message = "ocorreu um error ao solicitar a aplicação do bonus! tente novamente";
94
- }
95
- finally {
96
- this.loading = false;
97
- }
98
- }
99
- async reserve(amount) {
100
- await this.crmBonusService.reserve({
101
- redeemedBonus: amount,
102
- cartId: this.cartId,
103
- ticket: this.cartId,
104
- grossValue: Number(this.bonus.totalValue),
105
- storeName: this.storeName,
106
- storeId: this.bonus.storeId.toString(),
107
- userId: this.bonus.userId
108
- });
109
- }
110
- handleCancel() {
111
- this.step = index$1.StepFormEnum.STEP_PHONE;
112
- this.cancel();
113
- }
114
- render() {
115
- return (index.h(index.Host, { key: '6e71114a1e7b254f5f3a1fa907c96bb2c2f36171' }, this.step == index$1.StepFormEnum.STEP_NAME && index.h("name-input", { key: 'd44a3757015d8af2062f98d2cc0271dd2d9e79af', loading: this.loadingModal, value: this.customer.name, applyName: (name) => this.handleCustomerName(name) }), this.step === index$1.StepFormEnum.STEP_PIN && index.h("giftback-pin", { key: '74e74078485e3f75d053f54300acb5e99c84533a', cancel: () => this.handleCancel(), sent: this.sent, validate: (data) => this.validateBonus(data), loading: this.loading }), this.step === index$1.StepFormEnum.STEP_RESERVE && index.h("giftback-progress", { key: '2b9c3cd91e20af1efca4590b6f94e694b2f4c03f', loading: this.loading, cancel: () => this.handleCancel(), bonus: this.bonus, reserve: (amountRedeemed) => this.reserveApply(amountRedeemed) }), this.step === index$1.StepFormEnum.STEP_APPLY && index.h("giftback-finish", { key: 'f66d8c5da16a1a48a1b1be8b48a61a62676fa753' }), index.h("p", { key: 'c68f26529c21ce047819449f0414538f5e9771f8', class: "message-error" }, this.message)));
116
- }
117
- };
118
- CrmBonusForm.style = CrmBonusFormStyle0;
119
-
120
- const PhoneCancelInput = class {
121
- constructor(hostRef) {
122
- index.registerInstance(this, hostRef);
123
- this.sendPin = undefined;
124
- this.loading = undefined;
125
- this.value = undefined;
126
- }
127
- async validatePhone() {
128
- const phone = await this.phoneInputMask.getPhone();
129
- await this.sendPin(phone);
130
- }
131
- render() {
132
- return (index.h("div", { key: '7d3f18239fdd1c87fda497e8940629664a3ea177', class: "form-container" }, index.h("phone-input-mask", { key: '83227ee73df037e32c2923a5bcdcb1a97f8adf4b', initialValue: `Valor aplicado R$ ${this.value}`, ref: ref => this.phoneInputMask = ref, disabled: true }), index.h("button", { key: '03e84e9279aaae1a02c581c233367b175bdc8a88', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "Cancelar" : index.h("loading-spinner", { size: "11px", color: "#fff" }))));
133
- }
134
- };
135
-
136
- const PhoneInput = class {
137
- constructor(hostRef) {
138
- index.registerInstance(this, hostRef);
139
- this.sendPin = undefined;
140
- this.loading = undefined;
141
- this.value = undefined;
142
- }
143
- async validatePhone() {
144
- const phone = await this.phoneInputMask.getPhone();
145
- await this.sendPin(phone);
146
- }
147
- render() {
148
- return (index.h("div", { key: '32725cc609ea28dced36cc25ad20e0458446eee6', class: "form-container" }, index.h("phone-input-mask", { key: '60ec6db64dbee3896f14b149853fbe541d0aa0d9', initialValue: this.value, ref: ref => this.phoneInputMask = ref }), index.h("button", { key: '893acc63121be36c0a56fdff99e07d4bc0801412', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "validar" : index.h("loading-spinner", { size: "11px", color: "#fff" }))));
149
- }
150
- };
151
-
152
- exports.app_modal = AppModal;
153
- exports.crm_bonus_form = CrmBonusForm;
154
- exports.phone_cancel_input = PhoneCancelInput;
155
- exports.phone_input = PhoneInput;
156
-
157
- //# sourceMappingURL=app-modal_4.cjs.entry.js.map