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,150 +0,0 @@
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-9f7bde48.js';
|
2
|
-
import { C as CrmBonusService } from './crmbonus.service-4ee773c8.js';
|
3
|
-
import { S as StepFormEnum } from './index-ea02697e.js';
|
4
|
-
|
5
|
-
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{}";
|
6
|
-
const AppModalStyle0 = appModalCss;
|
7
|
-
|
8
|
-
const AppModal = class {
|
9
|
-
constructor(hostRef) {
|
10
|
-
registerInstance(this, hostRef);
|
11
|
-
this.modalClosed = createEvent(this, "modalClosed", 7);
|
12
|
-
this.isOpen = false;
|
13
|
-
this.modalTitle = undefined;
|
14
|
-
}
|
15
|
-
closeModal() {
|
16
|
-
this.modalClosed.emit();
|
17
|
-
}
|
18
|
-
render() {
|
19
|
-
return (h("div", { key: 'c6da9ce70d919346c641a5aa372ba17305c0d670', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, h("div", { key: '807ac561f4825f3ba470529d80135b7e2024a149', class: "modal" }, h("div", { key: '57de6ce754a7ad665b7bac3bcfc561e0baa694b4', class: "modal-header" }, h("h3", { key: 'a716a0c910ba51cf3700b4812924e8e75505b6ac' }, this.modalTitle), h("button", { key: '295e0b32f08233d48c376287496717a4edfeae6d', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), h("div", { key: 'b1abe2d5c073ba9a7bd329c47a631e5cff51e0ea', class: "modal-body" }, h("slot", { key: '135950e8e07a6eb1dc8c3eb2326c182617143893' })))));
|
20
|
-
}
|
21
|
-
};
|
22
|
-
AppModal.style = AppModalStyle0;
|
23
|
-
|
24
|
-
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}";
|
25
|
-
const CrmBonusFormStyle0 = crmBonusFormCss;
|
26
|
-
|
27
|
-
const CrmBonusForm = class {
|
28
|
-
constructor(hostRef) {
|
29
|
-
registerInstance(this, hostRef);
|
30
|
-
this.crmBonusService = CrmBonusService.getInstance();
|
31
|
-
this.storeName = undefined;
|
32
|
-
this.cartId = undefined;
|
33
|
-
this.products = undefined;
|
34
|
-
this.customer = {
|
35
|
-
phone: "",
|
36
|
-
birthDate: "",
|
37
|
-
document: "",
|
38
|
-
name: ""
|
39
|
-
};
|
40
|
-
this.sent = undefined;
|
41
|
-
this.stepNext = undefined;
|
42
|
-
this.phone = undefined;
|
43
|
-
this.loadingModal = undefined;
|
44
|
-
this.saveStore = undefined;
|
45
|
-
this.cancel = undefined;
|
46
|
-
this.handleCustomerName = undefined;
|
47
|
-
this.loading = false;
|
48
|
-
this.step = StepFormEnum.STEP_NAME;
|
49
|
-
this.message = undefined;
|
50
|
-
this.bonus = undefined;
|
51
|
-
}
|
52
|
-
async setStep(step) {
|
53
|
-
this.step = step;
|
54
|
-
}
|
55
|
-
async validateBonus(pin) {
|
56
|
-
var _a, _b;
|
57
|
-
this.loading = true;
|
58
|
-
this.message = "";
|
59
|
-
const payload = {
|
60
|
-
pin: pin,
|
61
|
-
cellphone: this.phone.toString(),
|
62
|
-
storeId: this.sent.storeId.toString(),
|
63
|
-
userId: this.sent.userId.toString(),
|
64
|
-
checkoutId: this.cartId,
|
65
|
-
checkoutProducts: this.products,
|
66
|
-
name: null,
|
67
|
-
storeName: this.storeName
|
68
|
-
};
|
69
|
-
try {
|
70
|
-
this.bonus = await this.crmBonusService.validatePinBonus(payload);
|
71
|
-
this.step = StepFormEnum.STEP_RESERVE;
|
72
|
-
}
|
73
|
-
catch (error) {
|
74
|
-
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;
|
75
|
-
}
|
76
|
-
finally {
|
77
|
-
this.loading = false;
|
78
|
-
}
|
79
|
-
}
|
80
|
-
async reserveApply(amount) {
|
81
|
-
this.loading = true;
|
82
|
-
this.message = "";
|
83
|
-
try {
|
84
|
-
await this.reserve(amount);
|
85
|
-
this.step = StepFormEnum.STEP_APPLY;
|
86
|
-
this.saveStore(amount);
|
87
|
-
}
|
88
|
-
catch (error) {
|
89
|
-
this.message = "ocorreu um error ao solicitar a aplicação do bonus! tente novamente";
|
90
|
-
}
|
91
|
-
finally {
|
92
|
-
this.loading = false;
|
93
|
-
}
|
94
|
-
}
|
95
|
-
async reserve(amount) {
|
96
|
-
await this.crmBonusService.reserve({
|
97
|
-
redeemedBonus: amount,
|
98
|
-
cartId: this.cartId,
|
99
|
-
ticket: this.cartId,
|
100
|
-
grossValue: Number(this.bonus.totalValue),
|
101
|
-
storeName: this.storeName,
|
102
|
-
storeId: this.bonus.storeId.toString(),
|
103
|
-
userId: this.bonus.userId
|
104
|
-
});
|
105
|
-
}
|
106
|
-
handleCancel() {
|
107
|
-
this.step = StepFormEnum.STEP_PHONE;
|
108
|
-
this.cancel();
|
109
|
-
}
|
110
|
-
render() {
|
111
|
-
return (h(Host, { key: '6e71114a1e7b254f5f3a1fa907c96bb2c2f36171' }, this.step == StepFormEnum.STEP_NAME && h("name-input", { key: 'd44a3757015d8af2062f98d2cc0271dd2d9e79af', loading: this.loadingModal, value: this.customer.name, applyName: (name) => this.handleCustomerName(name) }), this.step === StepFormEnum.STEP_PIN && h("giftback-pin", { key: '74e74078485e3f75d053f54300acb5e99c84533a', cancel: () => this.handleCancel(), sent: this.sent, validate: (data) => this.validateBonus(data), loading: this.loading }), this.step === StepFormEnum.STEP_RESERVE && h("giftback-progress", { key: '2b9c3cd91e20af1efca4590b6f94e694b2f4c03f', loading: this.loading, cancel: () => this.handleCancel(), bonus: this.bonus, reserve: (amountRedeemed) => this.reserveApply(amountRedeemed) }), this.step === StepFormEnum.STEP_APPLY && h("giftback-finish", { key: 'f66d8c5da16a1a48a1b1be8b48a61a62676fa753' }), h("p", { key: 'c68f26529c21ce047819449f0414538f5e9771f8', class: "message-error" }, this.message)));
|
112
|
-
}
|
113
|
-
};
|
114
|
-
CrmBonusForm.style = CrmBonusFormStyle0;
|
115
|
-
|
116
|
-
const PhoneCancelInput = class {
|
117
|
-
constructor(hostRef) {
|
118
|
-
registerInstance(this, hostRef);
|
119
|
-
this.sendPin = undefined;
|
120
|
-
this.loading = undefined;
|
121
|
-
this.value = undefined;
|
122
|
-
}
|
123
|
-
async validatePhone() {
|
124
|
-
const phone = await this.phoneInputMask.getPhone();
|
125
|
-
await this.sendPin(phone);
|
126
|
-
}
|
127
|
-
render() {
|
128
|
-
return (h("div", { key: '7d3f18239fdd1c87fda497e8940629664a3ea177', class: "form-container" }, h("phone-input-mask", { key: '83227ee73df037e32c2923a5bcdcb1a97f8adf4b', initialValue: `Valor aplicado R$ ${this.value}`, ref: ref => this.phoneInputMask = ref, disabled: true }), h("button", { key: '03e84e9279aaae1a02c581c233367b175bdc8a88', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "Cancelar" : h("loading-spinner", { size: "11px", color: "#fff" }))));
|
129
|
-
}
|
130
|
-
};
|
131
|
-
|
132
|
-
const PhoneInput = class {
|
133
|
-
constructor(hostRef) {
|
134
|
-
registerInstance(this, hostRef);
|
135
|
-
this.sendPin = undefined;
|
136
|
-
this.loading = undefined;
|
137
|
-
this.value = undefined;
|
138
|
-
}
|
139
|
-
async validatePhone() {
|
140
|
-
const phone = await this.phoneInputMask.getPhone();
|
141
|
-
await this.sendPin(phone);
|
142
|
-
}
|
143
|
-
render() {
|
144
|
-
return (h("div", { key: '32725cc609ea28dced36cc25ad20e0458446eee6', class: "form-container" }, h("phone-input-mask", { key: '60ec6db64dbee3896f14b149853fbe541d0aa0d9', initialValue: this.value, ref: ref => this.phoneInputMask = ref }), h("button", { key: '893acc63121be36c0a56fdff99e07d4bc0801412', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "validar" : h("loading-spinner", { size: "11px", color: "#fff" }))));
|
145
|
-
}
|
146
|
-
};
|
147
|
-
|
148
|
-
export { AppModal as app_modal, CrmBonusForm as crm_bonus_form, PhoneCancelInput as phone_cancel_input, PhoneInput as phone_input };
|
149
|
-
|
150
|
-
//# sourceMappingURL=app-modal_4.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"app-modal.crm-bonus-form.phone-cancel-input.phone-input.entry.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,+hBAA+hB,CAAC;AACpjB,uBAAe,WAAW;;MCMb,QAAQ;;;;sBAG0B,KAAK;;;IAQxC,UAAU;QACd,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;KAC3B;IAED,MAAM;QACF,QACI,4DAAK,KAAK,EAAE,kBAAkB,IAAI,CAAC,MAAM,GAAG,SAAS,GAAG,EAAE,EAAE,IACxD,4DAAK,KAAK,EAAC,OAAO,IACd,4DAAK,KAAK,EAAC,cAAc,IACrB,6DAAK,IAAI,CAAC,UAAU,CAAM,EAC1B,+DAAQ,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,aAEpD,CACP,EACN,4DAAK,KAAK,EAAC,YAAY,IACnB,8DAAQ,CACN,CACJ,CACJ,EACT;KACJ;;;;ACtCL,MAAM,eAAe,GAAG,wOAAwO,CAAC;AACjQ,2BAAe,eAAe;;MCUjB,YAAY;;;QAEb,oBAAe,GAAoB,eAAe,CAAC,WAAW,EAAE,CAAC;;;;wBAK3C;YAC1B,KAAK,EAAE,EAAE;YACT,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,EAAE;SACX;;;;;;;;uBAY2B,KAAK;oBAET,YAAY,CAAC,SAAS;;;;IAO9C,MAAM,OAAO,CAAC,IAAkB;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;KACnB;IAEM,MAAM,aAAa,CAAC,GAAW;;QAClC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,M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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/modal/app-modal.css?tag=app-modal&encapsulation=shadow","src/components/modal/app-modal.tsx","src/components/crm-bonus-form/crm-bonus-form.css?tag=crm-bonus-form&encapsulation=shadow","src/components/crm-bonus-form/crm-bonus-form.tsx","src/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.tsx","src/components/crm-bonus-form/subcomponents/phone/phone.input.tsx"],"sourcesContent":[".modal-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n display: none;\n justify-content: center;\n align-items: center;\n z-index: 1000;\n }\n \n .modal-backdrop.visible {\n display: flex;\n }\n \n .modal {\n background: white;\n border-radius: 8px;\n padding: 1rem;\n max-width: 500px;\n width: 90%;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);\n }\n \n .modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid #ddd;\n margin-bottom: 1rem;\n }\n \n .close-button {\n background: none;\n border: none;\n font-size: 1.5rem;\n cursor: pointer;\n }\n \n .modal-body {\n /* padding: 1rem 0; */\n }\n ","import { Component, Event, EventEmitter, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: 'app-modal',\n styleUrl: 'app-modal.css',\n shadow: true,\n})\nexport class AppModal {\n\n // Controle da visibilidade do modal\n @Prop({ reflect: true }) isOpen: boolean = false;\n\n // Título do modal\n @Prop() modalTitle: string;\n\n // Evento emitido ao fechar o modal\n @Event() modalClosed: EventEmitter<void>;\n\n private closeModal() {\n this.modalClosed.emit();\n }\n\n render() {\n return (\n <div class={`modal-backdrop ${this.isOpen ? 'visible' : ''}`}>\n <div class=\"modal\">\n <div class=\"modal-header\">\n <h3>{this.modalTitle}</h3>\n <button class=\"close-button\" onClick={() => this.closeModal()}>\n ×\n </button>\n </div>\n <div class=\"modal-body\">\n <slot />\n </div>\n </div>\n </div>\n )\n }\n}",".form-container {\n width: 100%;\n display: flex;\n justify-content: center;\n justify-content: space-around;\n}\n\n.disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.message-error {\n color: #d11111;\n font-weight: bold;\n font-family: Arial;\n font-size: small;\n margin-left: 16px;\n}","import { Component, Host, Method, Prop, State, h } from \"@stencil/core\";\nimport { CrmBonusService } from \"../../services/crmbonus.service\";\nimport { IBonus, ICustomer, IProccesPinBonusDto, IProduct } from \"../../dto/validate.pin.bonus\";\nimport { StepFormEnum } from \"../../contants\";\nimport { IPinSent } from '../../dto/pin.sent';\n\n@Component({\n tag: 'crm-bonus-form',\n styleUrl: 'crm-bonus-form.css',\n shadow: true\n})\nexport class CrmBonusForm {\n\n private crmBonusService: CrmBonusService = CrmBonusService.getInstance();\n\n @Prop({ attribute: 'storename' }) storeName;\n @Prop() cartId;\n @Prop() products: Array<IProduct>;\n @Prop() customer: ICustomer = {\n phone: \"\",\n birthDate: \"\",\n document: \"\",\n name: \"\"\n };\n @Prop() sent: IPinSent;\n @Prop() stepNext: StepFormEnum;\n @Prop() phone: number;\n @Prop() loadingModal: boolean;\n\n @Prop() saveStore: (amount: number) => void;\n\n @Prop() cancel: () => void;\n\n @Prop() handleCustomerName: (name: string) => void;\n\n @State() loading: boolean = false;\n\n @State() step: number = StepFormEnum.STEP_NAME;\n\n @State() message: string;\n\n @State() bonus: IBonus;\n\n @Method()\n async setStep(step: StepFormEnum) {\n this.step = step\n }\n\n public async validateBonus(pin: string) {\n this.loading = true;\n this.message = \"\";\n const payload: IProccesPinBonusDto = {\n pin: pin,\n cellphone: this.phone.toString(),\n storeId: this.sent.storeId.toString(),\n userId: this.sent.userId.toString(),\n checkoutId: this.cartId,\n checkoutProducts: this.products,\n name: null,\n storeName: this.storeName\n }\n\n try {\n this.bonus = await this.crmBonusService.validatePinBonus(payload);\n\n this.step = StepFormEnum.STEP_RESERVE;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false;\n }\n }\n\n public async reserveApply(amount: number) {\n this.loading = true;\n this.message = \"\";\n try {\n await this.reserve(amount);\n\n this.step = StepFormEnum.STEP_APPLY;\n\n this.saveStore(amount);\n } catch (error) {\n this.message = \"ocorreu um error ao solicitar a aplicação do bonus! tente novamente\"\n } finally {\n this.loading = false;\n }\n }\n\n public async reserve(amount: number) {\n await this.crmBonusService.reserve({\n redeemedBonus: amount,\n cartId: this.cartId,\n ticket: this.cartId,\n grossValue: Number(this.bonus.totalValue),\n storeName: this.storeName,\n storeId: this.bonus.storeId.toString(),\n userId: this.bonus.userId\n });\n }\n\n public handleCancel() {\n this.step = StepFormEnum.STEP_PHONE;\n this.cancel()\n }\n\n render() {\n return (\n <Host>\n {/* {this.step === StepFormEnum.STEP_PHONE && <phone-input value={this.customer.phone} sendPin={(phone) => this.sendPin(phone)} loading={this.loading} />} */}\n \n {this.step == StepFormEnum.STEP_NAME && <name-input loading={this.loadingModal} value={this.customer.name} applyName={(name) => this.handleCustomerName(name)} />}\n {this.step === StepFormEnum.STEP_PIN && <giftback-pin cancel={() => this.handleCancel()} sent={this.sent} validate={(data) => this.validateBonus(data)} loading={this.loading} />}\n\n {this.step === StepFormEnum.STEP_RESERVE && <giftback-progress loading={this.loading} cancel={() => this.handleCancel()} bonus={this.bonus} reserve={(amountRedeemed: number) => this.reserveApply(amountRedeemed)} />}\n {this.step === StepFormEnum.STEP_APPLY && <giftback-finish />}\n <p class=\"message-error\">{this.message}</p>\n </Host>\n )\n }\n}","import { Component, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: 'phone-cancel-input'\n})\nexport class PhoneCancelInput {\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={`Valor aplicado R$ ${this.value}`} ref={ref => this.phoneInputMask = ref} disabled={true} />\n <button class={`btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `} disabled={this.loading} onClick={() => this.validatePhone()}>\n {\n !this.loading ? \"Cancelar\" : <loading-spinner size=\"11px\" color=\"#fff\" />\n }\n </button>\n </div>\n )\n }\n}","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}
|