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.
- package/dist/cjs/app-modal.cjs.entry.js +28 -0
- package/dist/cjs/app-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/countdown-timer_4.cjs.entry.js +176 -0
- package/dist/cjs/countdown-timer_4.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-bonus-form.cjs.entry.js +103 -0
- package/dist/cjs/crm-bonus-form.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-bonus-note.cjs.entry.js +16 -6
- package/dist/cjs/crm-bonus-note.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-bonus.cjs.entry.js +41 -5
- package/dist/cjs/crm-bonus.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-button.cjs.entry.js +24 -0
- package/dist/cjs/crm-button.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-giftback-form.cjs.entry.js +171 -0
- package/dist/cjs/crm-giftback-form.cjs.entry.js.map +1 -0
- package/dist/cjs/crmbonus-component-wake.cjs.js +2 -2
- package/dist/cjs/{crmbonus.service-e375ebfe.js → crmbonus.service-7991795d.js} +10 -2
- package/dist/cjs/crmbonus.service-7991795d.js.map +1 -0
- package/dist/cjs/giftback-finish_4.cjs.entry.js +6 -6
- package/dist/cjs/giftback-finish_4.cjs.entry.js.map +1 -1
- package/dist/cjs/i18n-818275e6.js +2209 -0
- package/dist/cjs/i18n-818275e6.js.map +1 -0
- package/dist/cjs/{index-52d8a075.js → index-80419303.js} +9 -4
- package/dist/cjs/index-80419303.js.map +1 -0
- package/dist/cjs/{index-861e0cbe.js → index-96a8951f.js} +5 -1
- package/dist/cjs/index-96a8951f.js.map +1 -0
- package/dist/cjs/info.config.helper-c5d9f781.js +16 -0
- package/dist/cjs/info.config.helper-c5d9f781.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loading-spinner.cjs.entry.js +2 -2
- package/dist/cjs/pedido-finalizado.cjs.entry.js +3 -3
- package/dist/cjs/phone-cancel-input.cjs.entry.js +25 -0
- package/dist/cjs/phone-cancel-input.cjs.entry.js.map +1 -0
- package/dist/cjs/phone-input-mask.cjs.entry.js +17 -4
- package/dist/cjs/phone-input-mask.cjs.entry.js.map +1 -1
- package/dist/cjs/phone-input.cjs.entry.js +25 -0
- package/dist/cjs/phone-input.cjs.entry.js.map +1 -0
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/button/crm-button.css +22 -0
- package/dist/collection/components/button/index.js +59 -0
- package/dist/collection/components/button/index.js.map +1 -1
- package/dist/collection/components/countdown-timer/countdown-timer.js +51 -0
- package/dist/collection/components/countdown-timer/countdown-timer.js.map +1 -0
- package/dist/collection/components/crm-bonus/crm-bonus.css +0 -3
- package/dist/collection/components/crm-bonus/crm-bonus.js +38 -2
- package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
- package/dist/collection/components/crm-bonus-form/crm-bonus-form.js +2 -2
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js +1 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.css +1 -5
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js +1 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.css +1 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js +1 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/name-input/name-input.js +1 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js +1 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js +1 -1
- package/dist/collection/components/giftback-form/giftback-form.css +74 -0
- package/dist/collection/components/giftback-form/giftback-form.js +246 -0
- package/dist/collection/components/giftback-form/giftback-form.js.map +1 -0
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.css +154 -0
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js +156 -0
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js.map +1 -0
- package/dist/collection/components/giftback-form/subcomponents/giftback-message/giftback-massage.js +11 -0
- package/dist/collection/components/giftback-form/subcomponents/giftback-message/giftback-massage.js.map +1 -0
- package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js +80 -0
- package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js.map +1 -0
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.css +84 -0
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js +174 -0
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js.map +1 -0
- package/dist/collection/components/loading-spinner/loading-spinner.js +1 -1
- package/dist/collection/components/modal/app-modal.js +1 -1
- package/dist/collection/components/note/crm-bonus-note.css +23 -7
- package/dist/collection/components/note/crm-bonus-note.js +33 -5
- package/dist/collection/components/note/crm-bonus-note.js.map +1 -1
- package/dist/collection/components/pedido/pedido.js +1 -1
- package/dist/collection/components/phone/phone-input-mask.css +18 -39
- package/dist/collection/components/phone/phone-input-mask.js +17 -3
- package/dist/collection/components/phone/phone-input-mask.js.map +1 -1
- package/dist/collection/contants/index.js +2 -0
- package/dist/collection/contants/index.js.map +1 -1
- package/dist/collection/helpers/info.config.helper.js +11 -0
- package/dist/collection/helpers/info.config.helper.js.map +1 -0
- package/dist/collection/i18n/i18n.js +25 -0
- package/dist/collection/i18n/i18n.js.map +1 -0
- package/dist/collection/services/crmbonus.service.js +8 -0
- package/dist/collection/services/crmbonus.service.js.map +1 -1
- package/dist/components/app-modal.js +39 -1
- package/dist/components/app-modal.js.map +1 -1
- package/dist/components/countdown-timer.d.ts +11 -0
- package/dist/components/countdown-timer.js +8 -0
- package/dist/components/countdown-timer.js.map +1 -0
- package/dist/components/crm-bonus-form.js +158 -1
- package/dist/components/crm-bonus-form.js.map +1 -1
- package/dist/components/crm-bonus-note.js +19 -7
- package/dist/components/crm-bonus-note.js.map +1 -1
- package/dist/components/crm-bonus.js +58 -33
- package/dist/components/crm-bonus.js.map +1 -1
- package/dist/components/crm-button.d.ts +11 -0
- package/dist/components/crm-button.js +8 -0
- package/dist/components/crm-button.js.map +1 -0
- package/dist/components/crm-giftback-form.d.ts +11 -0
- package/dist/components/crm-giftback-form.js +8 -0
- package/dist/components/crm-giftback-form.js.map +1 -0
- package/dist/components/giftback-finish.js +1 -1
- package/dist/components/giftback-info.d.ts +11 -0
- package/dist/components/giftback-info.js +8 -0
- package/dist/components/giftback-info.js.map +1 -0
- package/dist/components/giftback-pin.js +1 -1
- package/dist/components/giftback-progress.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/loading-spinner.js +1 -1
- package/dist/components/name-input.js +1 -1
- package/dist/components/p-0a57e57f.js +91 -0
- package/dist/components/p-0a57e57f.js.map +1 -0
- package/dist/components/p-1d5eeac0.js +2207 -0
- package/dist/components/p-1d5eeac0.js.map +1 -0
- package/dist/components/{p-faf7103e.js → p-2f266d73.js} +6 -2
- package/dist/components/p-2f266d73.js.map +1 -0
- package/dist/{esm/crmbonus.service-4ee773c8.js → components/p-384fabf7.js} +10 -2
- package/dist/components/p-384fabf7.js.map +1 -0
- package/dist/components/p-39d680b6.js +49 -0
- package/dist/components/p-39d680b6.js.map +1 -0
- package/dist/components/p-46578efa.js +44 -0
- package/dist/components/p-46578efa.js.map +1 -0
- package/dist/components/{p-0e99f907.js → p-4f18f4c0.js} +5 -5
- package/dist/components/p-4f18f4c0.js.map +1 -0
- package/dist/components/{p-ddc0ac71.js → p-5c3fe5a8.js} +3 -3
- package/dist/components/{p-ddc0ac71.js.map → p-5c3fe5a8.js.map} +1 -1
- package/dist/components/p-5f0003a4.js +62 -0
- package/dist/components/p-5f0003a4.js.map +1 -0
- package/dist/components/p-6703fdff.js +106 -0
- package/dist/components/p-6703fdff.js.map +1 -0
- package/dist/components/p-6a95cc63.js +238 -0
- package/dist/components/p-6a95cc63.js.map +1 -0
- package/dist/components/p-75ba7b9a.js +14 -0
- package/dist/components/p-75ba7b9a.js.map +1 -0
- package/dist/components/{p-19b83423.js → p-a30bd6b1.js} +4 -4
- package/dist/components/{p-19b83423.js.map → p-a30bd6b1.js.map} +1 -1
- package/dist/{esm/index-ea02697e.js → components/p-a561251a.js} +4 -2
- package/dist/components/p-a561251a.js.map +1 -0
- package/dist/components/p-be365312.js +76 -0
- package/dist/components/p-be365312.js.map +1 -0
- package/dist/components/{p-e2727638.js → p-f168d5f6.js} +4 -4
- package/dist/components/p-f168d5f6.js.map +1 -0
- package/dist/components/{p-530006e6.js → p-f5fcff75.js} +3 -3
- package/dist/components/{p-530006e6.js.map → p-f5fcff75.js.map} +1 -1
- package/dist/components/pedido-finalizado.js +3 -3
- package/dist/components/phone-cancel-input.js +48 -1
- package/dist/components/phone-cancel-input.js.map +1 -1
- package/dist/components/phone-form.d.ts +11 -0
- package/dist/components/phone-form.js +8 -0
- package/dist/components/phone-form.js.map +1 -0
- package/dist/components/phone-input-mask.js +1 -1
- package/dist/components/phone-input.js +48 -1
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/pin-form.d.ts +11 -0
- package/dist/components/pin-form.js +8 -0
- package/dist/components/pin-form.js.map +1 -0
- package/dist/crmbonus-component-wake/crmbonus-component-wake.css +1 -0
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -1
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
- package/dist/crmbonus-component-wake/p-1d5eeac0.js +2 -0
- package/dist/crmbonus-component-wake/p-1d5eeac0.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-878c694e.js → p-384fabf7.js} +2 -2
- package/dist/crmbonus-component-wake/p-384fabf7.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-a01c57ab.entry.js → p-3beb5158.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-5a8fa5b9.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-5a8fa5b9.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-5ede3b10.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-5ede3b10.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-66f41fd0.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-66f41fd0.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-6e6bf96e.js +3 -0
- package/dist/crmbonus-component-wake/p-6e6bf96e.js.map +1 -0
- package/dist/crmbonus-component-wake/p-75ba7b9a.js +2 -0
- package/dist/crmbonus-component-wake/p-75ba7b9a.js.map +1 -0
- package/dist/crmbonus-component-wake/p-830b5bdc.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-830b5bdc.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-8944b009.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-8944b009.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-8b9a1aec.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-8b9a1aec.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-001e3e2b.entry.js → p-9514339e.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-a561251a.js +2 -0
- package/dist/crmbonus-component-wake/p-a561251a.js.map +1 -0
- package/dist/crmbonus-component-wake/p-adb37e26.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-adb37e26.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c72a11ba.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-c72a11ba.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-cc452df3.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-cc452df3.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-d0349daf.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-d0349daf.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-e9cc180e.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-e9cc180e.entry.js.map +1 -0
- package/dist/env.js +1 -1
- package/dist/env.js.map +1 -1
- package/dist/esm/app-modal.entry.js +24 -0
- package/dist/esm/app-modal.entry.js.map +1 -0
- package/dist/esm/countdown-timer_4.entry.js +169 -0
- package/dist/esm/countdown-timer_4.entry.js.map +1 -0
- package/dist/esm/crm-bonus-form.entry.js +99 -0
- package/dist/esm/crm-bonus-form.entry.js.map +1 -0
- package/dist/esm/crm-bonus-note.entry.js +16 -6
- package/dist/esm/crm-bonus-note.entry.js.map +1 -1
- package/dist/esm/crm-bonus.entry.js +41 -5
- package/dist/esm/crm-bonus.entry.js.map +1 -1
- package/dist/esm/crm-button.entry.js +20 -0
- package/dist/esm/crm-button.entry.js.map +1 -0
- package/dist/esm/crm-giftback-form.entry.js +167 -0
- package/dist/esm/crm-giftback-form.entry.js.map +1 -0
- package/dist/esm/crmbonus-component-wake.js +3 -3
- package/dist/{components/p-878c694e.js → esm/crmbonus.service-a846150c.js} +10 -2
- package/dist/esm/crmbonus.service-a846150c.js.map +1 -0
- package/dist/esm/giftback-finish_4.entry.js +6 -6
- package/dist/esm/giftback-finish_4.entry.js.map +1 -1
- package/dist/esm/i18n-853fedb3.js +2207 -0
- package/dist/esm/i18n-853fedb3.js.map +1 -0
- package/dist/esm/index-3c6d4feb.js +14 -0
- package/dist/esm/index-3c6d4feb.js.map +1 -0
- package/dist/esm/{index-9f7bde48.js → index-a4c14fca.js} +9 -4
- package/dist/esm/index-a4c14fca.js.map +1 -0
- package/dist/esm/info.config.helper-42d9ddf9.js +14 -0
- package/dist/esm/info.config.helper-42d9ddf9.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loading-spinner.entry.js +2 -2
- package/dist/esm/pedido-finalizado.entry.js +3 -3
- package/dist/esm/phone-cancel-input.entry.js +21 -0
- package/dist/esm/phone-cancel-input.entry.js.map +1 -0
- package/dist/esm/phone-input-mask.entry.js +17 -4
- package/dist/esm/phone-input-mask.entry.js.map +1 -1
- package/dist/esm/phone-input.entry.js +21 -0
- package/dist/esm/phone-input.entry.js.map +1 -0
- package/dist/types/components/button/index.d.ts +5 -0
- package/dist/types/components/countdown-timer/countdown-timer.d.ts +8 -0
- package/dist/types/components/crm-bonus/crm-bonus.d.ts +1 -0
- package/dist/types/components/giftback-form/giftback-form.d.ts +32 -0
- package/dist/types/components/giftback-form/subcomponents/giftback-info/giftback-info.d.ts +15 -0
- package/dist/types/components/giftback-form/subcomponents/giftback-message/giftback-massage.d.ts +3 -0
- package/dist/types/components/giftback-form/subcomponents/phone-form/phone-form.d.ts +8 -0
- package/dist/types/components/giftback-form/subcomponents/pin-form/pin-form.d.ts +19 -0
- package/dist/types/components/note/crm-bonus-note.d.ts +4 -0
- package/dist/types/components/phone/phone-input-mask.d.ts +2 -0
- package/dist/types/components.d.ts +118 -0
- package/dist/types/contants/index.d.ts +3 -1
- package/dist/types/helpers/info.config.helper.d.ts +6 -0
- package/dist/types/i18n/i18n.d.ts +2 -0
- package/dist/types/services/crmbonus.service.d.ts +1 -0
- package/package.json +3 -2
- package/dist/cjs/app-modal_4.cjs.entry.js +0 -157
- package/dist/cjs/app-modal_4.cjs.entry.js.map +0 -1
- package/dist/cjs/crmbonus.service-e375ebfe.js.map +0 -1
- package/dist/cjs/index-52d8a075.js.map +0 -1
- package/dist/cjs/index-861e0cbe.js.map +0 -1
- package/dist/components/p-03c2447c.js +0 -170
- package/dist/components/p-03c2447c.js.map +0 -1
- package/dist/components/p-0e99f907.js.map +0 -1
- package/dist/components/p-1dbb0f43.js +0 -43
- package/dist/components/p-1dbb0f43.js.map +0 -1
- package/dist/components/p-3c29c6ad.js +0 -62
- package/dist/components/p-3c29c6ad.js.map +0 -1
- package/dist/components/p-41d42a66.js +0 -52
- package/dist/components/p-41d42a66.js.map +0 -1
- package/dist/components/p-6c553ee7.js +0 -52
- package/dist/components/p-6c553ee7.js.map +0 -1
- package/dist/components/p-878c694e.js.map +0 -1
- package/dist/components/p-e2727638.js.map +0 -1
- package/dist/components/p-faf7103e.js.map +0 -1
- package/dist/crmbonus-component-wake/p-002f2417.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-002f2417.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-2636f2f0.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-2636f2f0.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-3582baf8.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-3582baf8.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-5febaa3c.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-5febaa3c.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-61df4eb6.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-61df4eb6.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-72510682.js +0 -3
- package/dist/crmbonus-component-wake/p-72510682.js.map +0 -1
- package/dist/crmbonus-component-wake/p-878c694e.js.map +0 -1
- package/dist/crmbonus-component-wake/p-9b967605.js +0 -2
- package/dist/crmbonus-component-wake/p-9b967605.js.map +0 -1
- package/dist/esm/app-modal_4.entry.js +0 -150
- package/dist/esm/app-modal_4.entry.js.map +0 -1
- package/dist/esm/crmbonus.service-4ee773c8.js.map +0 -1
- package/dist/esm/index-9f7bde48.js.map +0 -1
- package/dist/esm/index-ea02697e.js.map +0 -1
- /package/dist/crmbonus-component-wake/{p-a01c57ab.entry.js.map → p-3beb5158.entry.js.map} +0 -0
- /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":"
|
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,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,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
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "crmbonus-component-wake",
|
3
|
-
"version": "
|
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
|