crmbonus-component-wake 2.0.51 → 2.0.52
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-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- 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 +181 -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 +53 -0
- package/dist/{crmbonus-component-wake/crm-bonus-note.entry.js.map → cjs/crm-bonus-note.cjs.entry.js.map} +1 -1
- package/dist/cjs/crm-bonus.cjs.entry.js +204 -0
- package/dist/cjs/crm-bonus.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-button.cjs.entry.js +25 -0
- package/dist/cjs/crm-button.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-giftback-form.cjs.entry.js +173 -0
- package/dist/cjs/crm-giftback-form.cjs.entry.js.map +1 -0
- package/dist/cjs/crmbonus-component-wake.cjs.js +27 -0
- package/dist/cjs/crmbonus-component-wake.cjs.js.map +1 -0
- package/dist/cjs/crmbonus.service-3c4ebbdf.js +3852 -0
- package/dist/cjs/crmbonus.service-3c4ebbdf.js.map +1 -0
- package/dist/cjs/giftback-finish_4.cjs.entry.js +132 -0
- package/dist/cjs/giftback-finish_4.cjs.entry.js.map +1 -0
- package/dist/cjs/i18n-efd790a3.js +2209 -0
- package/dist/cjs/i18n-efd790a3.js.map +1 -0
- package/dist/cjs/index-80419303.js +1253 -0
- package/dist/cjs/index-80419303.js.map +1 -0
- package/dist/cjs/index-96a8951f.js +16 -0
- package/dist/cjs/index-96a8951f.js.map +1 -0
- package/dist/cjs/index.cjs.js +11 -0
- package/dist/cjs/index.cjs.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 +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/loading-spinner.cjs.entry.js +24 -0
- package/dist/cjs/loading-spinner.cjs.entry.js.map +1 -0
- package/dist/cjs/pedido-finalizado.cjs.entry.js +36 -0
- package/dist/cjs/pedido-finalizado.cjs.entry.js.map +1 -0
- 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 +61 -0
- package/dist/cjs/phone-input-mask.cjs.entry.js.map +1 -0
- package/dist/cjs/phone-input.cjs.entry.js +25 -0
- package/dist/cjs/phone-input.cjs.entry.js.map +1 -0
- package/dist/collection/assets/svg/money-dollars-svgrepo-com.svg +6 -0
- package/dist/collection/collection-manifest.json +30 -0
- package/dist/collection/components/button/crm-button.css +22 -0
- package/dist/collection/components/button/index.js +76 -0
- package/dist/collection/components/button/index.js.map +1 -0
- 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/assets/logo.svg +18 -0
- package/dist/collection/components/crm-bonus/assets/success-svgrepo-com.svg +8 -0
- package/dist/collection/components/crm-bonus/assets/svg/logo.svg +18 -0
- package/dist/collection/components/crm-bonus/assets/svg/success-svgrepo-com.svg +8 -0
- package/dist/collection/components/crm-bonus/crm-bonus.css +84 -0
- package/dist/collection/components/crm-bonus/crm-bonus.js +291 -0
- package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -0
- package/dist/collection/components/crm-bonus-form/crm-bonus-form.css +19 -0
- package/dist/collection/components/crm-bonus-form/crm-bonus-form.js +348 -0
- package/dist/collection/components/crm-bonus-form/crm-bonus-form.js.map +1 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.css +10 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js +20 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js.map +1 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.css +70 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js +127 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js.map +1 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.css +110 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js +127 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js.map +1 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/name-input/name-input.css +108 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/name-input/name-input.js +110 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/name-input/name-input.js.map +1 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js +75 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js.map +1 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js +75 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js.map +1 -0
- package/dist/collection/components/giftback-form/giftback-form.css +74 -0
- package/dist/collection/components/giftback-form/giftback-form.js +248 -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 +103 -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 +198 -0
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js.map +1 -0
- package/dist/collection/components/loading-spinner/loading-spinner.css +17 -0
- package/dist/collection/components/loading-spinner/loading-spinner.js +63 -0
- package/dist/collection/components/loading-spinner/loading-spinner.js.map +1 -0
- package/dist/collection/components/modal/app-modal.css +45 -0
- package/dist/collection/components/modal/app-modal.js +83 -0
- package/dist/collection/components/modal/app-modal.js.map +1 -0
- package/dist/collection/components/note/crm-bonus-note.css +54 -0
- package/dist/collection/components/note/crm-bonus-note.js +94 -0
- package/dist/collection/components/note/crm-bonus-note.js.map +1 -0
- package/dist/collection/components/pedido/pedido.js +83 -0
- package/dist/collection/components/pedido/pedido.js.map +1 -0
- package/dist/collection/components/phone/phone-input-mask.css +39 -0
- package/dist/collection/components/phone/phone-input-mask.js +125 -0
- package/dist/collection/components/phone/phone-input-mask.js.map +1 -0
- package/dist/collection/contants/index.js +11 -0
- package/dist/collection/contants/index.js.map +1 -0
- package/dist/collection/contants/mocks.js +28 -0
- package/dist/collection/contants/mocks.js.map +1 -0
- package/dist/collection/dto/pin.sent.js +2 -0
- package/dist/collection/dto/pin.sent.js.map +1 -0
- package/dist/collection/dto/update.order.dto.js +2 -0
- package/dist/collection/dto/update.order.dto.js.map +1 -0
- package/dist/collection/dto/validate.pin.bonus.js +2 -0
- package/dist/collection/dto/validate.pin.bonus.js.map +1 -0
- 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/index.js +11 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/services/crmbonus.service.js +96 -0
- package/dist/collection/services/crmbonus.service.js.map +1 -0
- package/dist/collection/utils/utils.js +4 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/components/app-modal.js +46 -0
- package/dist/components/app-modal.js.map +1 -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 +165 -0
- package/dist/components/crm-bonus-form.js.map +1 -0
- package/dist/components/crm-bonus-note.js +72 -0
- package/dist/components/crm-bonus-note.js.map +1 -0
- package/dist/components/crm-bonus.js +282 -0
- package/dist/components/crm-bonus.js.map +1 -0
- package/dist/components/crm-button.js +8 -0
- package/dist/components/crm-button.js.map +1 -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 +8 -0
- package/dist/components/giftback-finish.js.map +1 -0
- package/dist/components/giftback-info.js +8 -0
- package/dist/components/giftback-info.js.map +1 -0
- package/dist/components/giftback-pin.js +8 -0
- package/dist/components/giftback-pin.js.map +1 -0
- package/dist/components/giftback-progress.js +8 -0
- package/dist/components/giftback-progress.js.map +1 -0
- package/dist/components/index.js +9 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/loading-spinner.js +8 -0
- package/dist/components/loading-spinner.js.map +1 -0
- package/dist/components/name-input.js +8 -0
- package/dist/components/name-input.js.map +1 -0
- package/dist/components/p-2f266d73.js +1068 -0
- package/dist/components/p-2f266d73.js.map +1 -0
- package/dist/components/p-39d680b6.js +49 -0
- package/dist/components/p-39d680b6.js.map +1 -0
- package/dist/{crmbonus-component-wake/giftback-pin.entry.js → components/p-4f18f4c0.js} +39 -9
- package/dist/components/p-4f18f4c0.js.map +1 -0
- package/dist/components/p-57ec707e.js +79 -0
- package/dist/components/p-57ec707e.js.map +1 -0
- package/dist/components/p-5c3fe5a8.js +39 -0
- package/dist/components/p-5c3fe5a8.js.map +1 -0
- package/dist/components/p-73e75b43.js +240 -0
- package/dist/components/p-73e75b43.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-9f68d2a1.js +65 -0
- package/dist/components/p-9f68d2a1.js.map +1 -0
- package/dist/{crmbonus-component-wake/name-input.entry.js → components/p-a30bd6b1.js} +38 -9
- package/dist/components/p-a30bd6b1.js.map +1 -0
- package/dist/components/p-a561251a.js +14 -0
- package/dist/components/p-a561251a.js.map +1 -0
- package/dist/{crmbonus-component-wake/crmbonus.service-98a7bcf0.js → components/p-dd6f6ab7.js} +90 -165
- package/dist/components/p-dd6f6ab7.js.map +1 -0
- package/dist/components/p-e4ac17bf.js +46 -0
- package/dist/components/p-e4ac17bf.js.map +1 -0
- package/dist/components/p-f168d5f6.js +69 -0
- package/dist/components/p-f168d5f6.js.map +1 -0
- package/dist/{crmbonus-component-wake/pin-form.entry.js → components/p-f4244087.js} +57 -10
- package/dist/components/p-f4244087.js.map +1 -0
- package/dist/{crmbonus-component-wake/giftback-info.entry.js → components/p-f579d773.js} +36 -13
- package/dist/components/p-f579d773.js.map +1 -0
- package/dist/components/p-f5fcff75.js +36 -0
- package/dist/components/p-f5fcff75.js.map +1 -0
- package/dist/{crmbonus-component-wake/i18n-a17a0837.js → components/p-fb505488.js} +1 -16
- package/dist/components/p-fb505488.js.map +1 -0
- package/dist/components/pedido-finalizado.js +54 -0
- package/dist/components/pedido-finalizado.js.map +1 -0
- package/dist/components/phone-cancel-input.js +55 -0
- package/dist/components/phone-cancel-input.js.map +1 -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 +8 -0
- package/dist/components/phone-input-mask.js.map +1 -0
- package/dist/components/phone-input.js +55 -0
- package/dist/components/phone-input.js.map +1 -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 -7
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -48
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
- package/dist/crmbonus-component-wake/index.esm.js +1 -16
- package/dist/crmbonus-component-wake/index.esm.js.map +1 -1
- package/dist/crmbonus-component-wake/p-118fc099.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-118fc099.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-298d8fff.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-298d8fff.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-312caf3f.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-312caf3f.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-3522a3e3.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-3522a3e3.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-3beb5158.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-3beb5158.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-8b9a1aec.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-8b9a1aec.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-9acd4f81.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-9acd4f81.entry.js.map +1 -0
- 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-c4cc29a0.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-c4cc29a0.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c8054eaf.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-c8054eaf.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c86583a2.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-c86583a2.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-dd6f6ab7.js +2 -0
- package/dist/crmbonus-component-wake/p-dd6f6ab7.js.map +1 -0
- package/dist/crmbonus-component-wake/p-e1255160.js +2 -0
- package/dist/crmbonus-component-wake/p-e1255160.js.map +1 -0
- package/dist/crmbonus-component-wake/p-fb505488.js +2 -0
- package/dist/crmbonus-component-wake/p-fb505488.js.map +1 -0
- package/dist/env.js +5 -0
- package/dist/env.js.map +1 -0
- package/dist/{crmbonus-component-wake → esm}/app-modal.entry.js +4 -3
- package/dist/esm/app-modal.entry.js.map +1 -0
- package/dist/esm/countdown-timer_4.entry.js +174 -0
- package/dist/esm/countdown-timer_4.entry.js.map +1 -0
- package/dist/{crmbonus-component-wake → esm}/crm-bonus-form.entry.js +5 -4
- package/dist/esm/crm-bonus-form.entry.js.map +1 -0
- package/dist/{crmbonus-component-wake → esm}/crm-bonus-note.entry.js +6 -5
- package/dist/esm/crm-bonus-note.entry.js.map +1 -0
- package/dist/{crmbonus-component-wake → esm}/crm-bonus.entry.js +6 -7
- package/dist/esm/crm-bonus.entry.js.map +1 -0
- package/dist/{crmbonus-component-wake → esm}/crm-button.entry.js +4 -3
- package/dist/esm/crm-button.entry.js.map +1 -0
- package/dist/{crmbonus-component-wake → esm}/crm-giftback-form.entry.js +11 -10
- package/dist/esm/crm-giftback-form.entry.js.map +1 -0
- package/dist/esm/crmbonus-component-wake.js +22 -0
- package/dist/esm/crmbonus-component-wake.js.map +1 -0
- package/dist/{crmbonus-component-wake/crmbonus.service-0e166281.js → esm/crmbonus.service-9cba7b49.js} +92 -167
- package/dist/esm/crmbonus.service-9cba7b49.js.map +1 -0
- package/dist/esm/giftback-finish_4.entry.js +125 -0
- package/dist/esm/giftback-finish_4.entry.js.map +1 -0
- package/dist/esm/i18n-887a3ef8.js +2207 -0
- package/dist/{crmbonus-component-wake/i18n-a17a0837.js.map → esm/i18n-887a3ef8.js.map} +1 -1
- package/dist/esm/index-a4c14fca.js +1225 -0
- package/dist/esm/index-a4c14fca.js.map +1 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/{crmbonus-component-wake → esm}/loading-spinner.entry.js +4 -3
- package/dist/esm/loading-spinner.entry.js.map +1 -0
- package/dist/{crmbonus-component-wake → esm}/pedido-finalizado.entry.js +3 -3
- package/dist/esm/pedido-finalizado.entry.js.map +1 -0
- package/dist/{crmbonus-component-wake → esm}/phone-cancel-input.entry.js +2 -2
- package/dist/esm/phone-cancel-input.entry.js.map +1 -0
- package/dist/{crmbonus-component-wake → esm}/phone-input-mask.entry.js +4 -3
- package/dist/esm/phone-input-mask.entry.js.map +1 -0
- package/dist/{crmbonus-component-wake → esm}/phone-input.entry.js +2 -2
- package/dist/esm/phone-input.entry.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/dist/crmbonus-component-wake/app-modal.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/countdown-timer.entry.js +0 -30
- package/dist/crmbonus-component-wake/countdown-timer.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/crm-bonus-form.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/crm-bonus.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/crm-button.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/crm-giftback-form.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/crmbonus.service-0e166281.js.map +0 -1
- package/dist/crmbonus-component-wake/crmbonus.service-98a7bcf0.js.map +0 -1
- package/dist/crmbonus-component-wake/giftback-finish.entry.js +0 -19
- package/dist/crmbonus-component-wake/giftback-finish.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/giftback-info.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/giftback-pin.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/giftback-progress.entry.js +0 -40
- package/dist/crmbonus-component-wake/giftback-progress.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/index-bdc90e13.js +0 -3039
- package/dist/crmbonus-component-wake/index-bdc90e13.js.map +0 -1
- package/dist/crmbonus-component-wake/loading-spinner.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/name-input.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/pedido-finalizado.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/phone-cancel-input.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/phone-form.entry.js +0 -26
- package/dist/crmbonus-component-wake/phone-form.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/phone-input-mask.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/phone-input.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/pin-form.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/shadow-css-7ad5caf8.js +0 -334
- package/dist/crmbonus-component-wake/shadow-css-7ad5caf8.js.map +0 -1
- /package/dist/{crmbonus-component-wake → esm}/app-globals-0f993ce5.js +0 -0
- /package/dist/{crmbonus-component-wake → esm}/app-globals-0f993ce5.js.map +0 -0
- /package/dist/{crmbonus-component-wake → esm}/index-3c6d4feb.js +0 -0
- /package/dist/{crmbonus-component-wake → esm}/index-3c6d4feb.js.map +0 -0
- /package/dist/{crmbonus-component-wake → esm}/info.config.helper-42d9ddf9.js +0 -0
- /package/dist/{crmbonus-component-wake → esm}/info.config.helper-42d9ddf9.js.map +0 -0
@@ -0,0 +1,198 @@
|
|
1
|
+
import { h } from "@stencil/core";
|
2
|
+
import i18next from "../../../../i18n/i18n";
|
3
|
+
export class GiftbackPin {
|
4
|
+
constructor() {
|
5
|
+
this.validate = undefined;
|
6
|
+
this.cancel = undefined;
|
7
|
+
this.resend = undefined;
|
8
|
+
this.sent = undefined;
|
9
|
+
this.loading = false;
|
10
|
+
this.phone = undefined;
|
11
|
+
this.config = undefined;
|
12
|
+
this.pin = ['', '', '', ''];
|
13
|
+
this.isVerified = false;
|
14
|
+
this.canResend = false;
|
15
|
+
}
|
16
|
+
componentWillLoad() {
|
17
|
+
this.canResend = false;
|
18
|
+
}
|
19
|
+
handleInput(event, index) {
|
20
|
+
const input = event.target;
|
21
|
+
const value = input.value.slice(0, 1); // Limitar a um único dígito
|
22
|
+
this.pin[index] = value;
|
23
|
+
// Focar no próximo campo, se possível
|
24
|
+
if (value && index < this.pin.length - 1) {
|
25
|
+
const nextInput = input.nextElementSibling;
|
26
|
+
nextInput === null || nextInput === void 0 ? void 0 : nextInput.focus();
|
27
|
+
}
|
28
|
+
this.pin = [...this.pin];
|
29
|
+
}
|
30
|
+
validatePin() {
|
31
|
+
console.log('this.pin', this.pin);
|
32
|
+
this.validate(this.pin.join(""));
|
33
|
+
}
|
34
|
+
verifyPin() {
|
35
|
+
const pinCode = this.pin.join('');
|
36
|
+
if (pinCode === '9999') {
|
37
|
+
this.isVerified = true;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
handleTimeout() {
|
41
|
+
this.canResend = true;
|
42
|
+
}
|
43
|
+
async handleResend() {
|
44
|
+
await this.resend();
|
45
|
+
this.canResend = false;
|
46
|
+
this.pin = ['', '', '', ''];
|
47
|
+
}
|
48
|
+
render() {
|
49
|
+
var _a;
|
50
|
+
return (h("div", { key: '998ec39d1aae365a622a1c2de6d9c78adb28d621', class: "crm-phone-form" }, h("label", { key: 'bc8b39132d253503de993362e080ffb15fb9362b', class: "crm-subtitle" }, i18next.t('pin-sutitle'), " ", h("strong", { key: '928058a0505cce2e9b7490c9151b4f926db9c64e' }, "+55 ", this.phone)), h("div", { key: '97a6647406e52b5a4c3db6e70bb552ed7cfdda5c', class: "pin-container" }, this.pin.map((_, index) => (h("input", { type: "text", maxLength: 1, value: this.pin[index], onInput: (event) => this.handleInput(event, index) })))), h("slot", { key: '77bd50657e59648da9449a59cfbbd18ba39f018e' }), h("p", { key: '9b49ceb611d8fcb3c2b8361bb503b0332d635b82', class: "crm-description" }, " N\u00E3o recebeu?", !this.canResend && h("label", { key: '61c9b46b7092fd7a4ea15a2421bb2030b69c89a7' }, " Reenviar em ", h("countdown-timer", { key: 'f1026038327db799c24ff6f3cedfa9d3fea8c629', downtime: () => this.handleTimeout() }), " "), this.canResend && (h("div", { key: '4633dfa126b22ad34e15d6bd28522aa905f8853f' }, h("a", { key: 'ee126e579307073a878c5264b8235bc44f9a629d', onClick: () => this.handleResend() }, "Reenviar"), h("a", { key: 'f439e9617851002dd9d3d1c71d4985abd0eaeb93', onClick: () => this.cancel() }, "Trocar n\u00FAmero")))), h("crm-button", { key: 'f924b571680a3e38975ae504edbfd003b900201f', txtBtn: ((_a = this.config) === null || _a === void 0 ? void 0 : _a.btnApplyBonusLabel) || "Avançar", loading: this.loading, handleClick: () => this.validatePin() })));
|
51
|
+
}
|
52
|
+
static get is() { return "pin-form"; }
|
53
|
+
static get encapsulation() { return "shadow"; }
|
54
|
+
static get originalStyleUrls() {
|
55
|
+
return {
|
56
|
+
"$": ["pin-form.css", "../../giftback-form.css"]
|
57
|
+
};
|
58
|
+
}
|
59
|
+
static get styleUrls() {
|
60
|
+
return {
|
61
|
+
"$": ["pin-form.css", "../../giftback-form.css"]
|
62
|
+
};
|
63
|
+
}
|
64
|
+
static get properties() {
|
65
|
+
return {
|
66
|
+
"validate": {
|
67
|
+
"type": "unknown",
|
68
|
+
"mutable": false,
|
69
|
+
"complexType": {
|
70
|
+
"original": "(pin: string) => void",
|
71
|
+
"resolved": "(pin: string) => void",
|
72
|
+
"references": {}
|
73
|
+
},
|
74
|
+
"required": false,
|
75
|
+
"optional": false,
|
76
|
+
"docs": {
|
77
|
+
"tags": [],
|
78
|
+
"text": ""
|
79
|
+
}
|
80
|
+
},
|
81
|
+
"cancel": {
|
82
|
+
"type": "unknown",
|
83
|
+
"mutable": false,
|
84
|
+
"complexType": {
|
85
|
+
"original": "() => void",
|
86
|
+
"resolved": "() => void",
|
87
|
+
"references": {}
|
88
|
+
},
|
89
|
+
"required": false,
|
90
|
+
"optional": false,
|
91
|
+
"docs": {
|
92
|
+
"tags": [],
|
93
|
+
"text": ""
|
94
|
+
}
|
95
|
+
},
|
96
|
+
"resend": {
|
97
|
+
"type": "unknown",
|
98
|
+
"mutable": false,
|
99
|
+
"complexType": {
|
100
|
+
"original": "() => void",
|
101
|
+
"resolved": "() => void",
|
102
|
+
"references": {}
|
103
|
+
},
|
104
|
+
"required": false,
|
105
|
+
"optional": false,
|
106
|
+
"docs": {
|
107
|
+
"tags": [],
|
108
|
+
"text": ""
|
109
|
+
}
|
110
|
+
},
|
111
|
+
"sent": {
|
112
|
+
"type": "unknown",
|
113
|
+
"mutable": false,
|
114
|
+
"complexType": {
|
115
|
+
"original": "IPinSent",
|
116
|
+
"resolved": "IPinSent",
|
117
|
+
"references": {
|
118
|
+
"IPinSent": {
|
119
|
+
"location": "import",
|
120
|
+
"path": "../../../../dto/pin.sent",
|
121
|
+
"id": "src/dto/pin.sent.ts::IPinSent"
|
122
|
+
}
|
123
|
+
}
|
124
|
+
},
|
125
|
+
"required": false,
|
126
|
+
"optional": false,
|
127
|
+
"docs": {
|
128
|
+
"tags": [],
|
129
|
+
"text": ""
|
130
|
+
}
|
131
|
+
},
|
132
|
+
"loading": {
|
133
|
+
"type": "boolean",
|
134
|
+
"mutable": false,
|
135
|
+
"complexType": {
|
136
|
+
"original": "boolean",
|
137
|
+
"resolved": "boolean",
|
138
|
+
"references": {}
|
139
|
+
},
|
140
|
+
"required": false,
|
141
|
+
"optional": false,
|
142
|
+
"docs": {
|
143
|
+
"tags": [],
|
144
|
+
"text": ""
|
145
|
+
},
|
146
|
+
"attribute": "loading",
|
147
|
+
"reflect": false,
|
148
|
+
"defaultValue": "false"
|
149
|
+
},
|
150
|
+
"phone": {
|
151
|
+
"type": "string",
|
152
|
+
"mutable": false,
|
153
|
+
"complexType": {
|
154
|
+
"original": "string",
|
155
|
+
"resolved": "string",
|
156
|
+
"references": {}
|
157
|
+
},
|
158
|
+
"required": false,
|
159
|
+
"optional": false,
|
160
|
+
"docs": {
|
161
|
+
"tags": [],
|
162
|
+
"text": ""
|
163
|
+
},
|
164
|
+
"attribute": "phone",
|
165
|
+
"reflect": false
|
166
|
+
},
|
167
|
+
"config": {
|
168
|
+
"type": "unknown",
|
169
|
+
"mutable": false,
|
170
|
+
"complexType": {
|
171
|
+
"original": "IInfoStore",
|
172
|
+
"resolved": "IInfoStore",
|
173
|
+
"references": {
|
174
|
+
"IInfoStore": {
|
175
|
+
"location": "import",
|
176
|
+
"path": "../../../../helpers/info.config.helper",
|
177
|
+
"id": "src/helpers/info.config.helper.ts::IInfoStore"
|
178
|
+
}
|
179
|
+
}
|
180
|
+
},
|
181
|
+
"required": false,
|
182
|
+
"optional": false,
|
183
|
+
"docs": {
|
184
|
+
"tags": [],
|
185
|
+
"text": ""
|
186
|
+
}
|
187
|
+
}
|
188
|
+
};
|
189
|
+
}
|
190
|
+
static get states() {
|
191
|
+
return {
|
192
|
+
"pin": {},
|
193
|
+
"isVerified": {},
|
194
|
+
"canResend": {}
|
195
|
+
};
|
196
|
+
}
|
197
|
+
}
|
198
|
+
//# sourceMappingURL=pin-form.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pin-form.js","sourceRoot":"","sources":["../../../../../../src/components/giftback-form/subcomponents/pin-form/pin-form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,OAAO,MAAM,uBAAuB,CAAA;AAQ3C,MAAM,OAAO,WA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WAAW,EAAE,GAAI,CAe/H,CACV,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop, State } from '@stencil/core';\nimport { IPinSent } from '../../../../dto/pin.sent';\nimport i18next from '../../../../i18n/i18n'\nimport { IInfoStore } from '../../../../helpers/info.config.helper';\n\n@Component({\n tag: 'pin-form',\n styleUrls: ['pin-form.css', '../../giftback-form.css'],\n shadow: true,\n})\nexport class GiftbackPin {\n\n @Prop() validate: (pin: string) => void;\n @Prop() cancel: () => void;\n @Prop() resend: () => void;\n\n @Prop() sent: IPinSent;\n @Prop() loading: boolean = false;\n @Prop() phone: string;\n @Prop() config: IInfoStore;\n\n @State() pin: string[] = ['', '', '', ''];\n @State() isVerified: boolean = false;\n @State() canResend: boolean = false;\n\n componentWillLoad() {\n this.canResend = false;\n }\n\n handleInput(event: Event, index: number) {\n const input = event.target as HTMLInputElement;\n const value = input.value.slice(0, 1); // Limitar a um único dígito\n this.pin[index] = value;\n\n // Focar no próximo campo, se possível\n if (value && index < this.pin.length - 1) {\n const nextInput = input.nextElementSibling as HTMLInputElement;\n nextInput?.focus();\n }\n\n this.pin = [...this.pin];\n }\n\n validatePin() {\n console.log('this.pin', this.pin);\n this.validate(this.pin.join(\"\"))\n }\n\n verifyPin() {\n const pinCode = this.pin.join('');\n if (pinCode === '9999') {\n this.isVerified = true;\n }\n }\n\n handleTimeout() {\n this.canResend = true;\n }\n\n async handleResend() {\n await this.resend();\n\n this.canResend = false;\n this.pin = ['', '', '', '']\n }\n\n render() {\n return (\n <div class=\"crm-phone-form\">\n <label class=\"crm-subtitle\" >{i18next.t('pin-sutitle')} <strong>+55 {this.phone}</strong></label>\n <div class=\"pin-container\">\n {this.pin.map((_, index) => (\n <input\n type=\"text\"\n maxLength={1}\n value={this.pin[index]}\n onInput={(event) => this.handleInput(event, index)}\n />\n ))}\n </div>\n\n <slot></slot>\n\n <p class=\"crm-description\"> Não recebeu?\n {\n !this.canResend && <label> Reenviar em <countdown-timer downtime={() => this.handleTimeout()} /> </label>\n }\n {\n this.canResend && (\n <div >\n <a onClick={() => this.handleResend()}>Reenviar</a>\n <a onClick={() => this.cancel()}>Trocar número</a>\n </div>\n )\n }\n </p>\n <crm-button txtBtn={this.config?.btnApplyBonusLabel || \"Avançar\"} loading={this.loading} handleClick={() => this.validatePin()} />\n\n\n {/* <div class=\"footer-button\">\n <button class=\"button-cancel\" disabled={this.loading} onClick={() => this.cancel()}>\n Cancelar\n </button>\n <button class={`button ${this.loading ? 'disabled' : ''} `} disabled={this.loading} onClick={() => this.validatePin()}>\n {\n !this.loading ? \"Enviar\" : <loading-spinner size=\"15px\" color=\"#fff\" />\n }\n </button>\n </div> */}\n {/* <button onClick={() => this.verifyPin()}>Enviar</button>\n {this.isVerified && <p class=\"success\">Código verificado com sucesso!</p>} */}\n </div >\n );\n }\n}\n"]}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
.spinner {
|
2
|
+
display: inline-block;
|
3
|
+
border: 4px solid transparent;
|
4
|
+
border-radius: 50%;
|
5
|
+
border-top-color: var(--color, #0078d7);
|
6
|
+
animation: spin 1s linear infinite;
|
7
|
+
}
|
8
|
+
|
9
|
+
@keyframes spin {
|
10
|
+
0% {
|
11
|
+
transform: rotate(0deg);
|
12
|
+
}
|
13
|
+
|
14
|
+
100% {
|
15
|
+
transform: rotate(360deg);
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import { h } from "@stencil/core";
|
2
|
+
export class LoadingSpinner {
|
3
|
+
constructor() {
|
4
|
+
this.size = '50px';
|
5
|
+
this.color = '#0078d7';
|
6
|
+
}
|
7
|
+
render() {
|
8
|
+
return (h("div", { key: '5d3cd866b3ab7f4898ad1142fb39b89c572867d7', class: "spinner", style: { width: this.size, height: this.size, borderColor: `${this.color} transparent transparent transparent` } }));
|
9
|
+
}
|
10
|
+
static get is() { return "loading-spinner"; }
|
11
|
+
static get encapsulation() { return "shadow"; }
|
12
|
+
static get originalStyleUrls() {
|
13
|
+
return {
|
14
|
+
"$": ["loading-spinner.css"]
|
15
|
+
};
|
16
|
+
}
|
17
|
+
static get styleUrls() {
|
18
|
+
return {
|
19
|
+
"$": ["loading-spinner.css"]
|
20
|
+
};
|
21
|
+
}
|
22
|
+
static get properties() {
|
23
|
+
return {
|
24
|
+
"size": {
|
25
|
+
"type": "string",
|
26
|
+
"mutable": false,
|
27
|
+
"complexType": {
|
28
|
+
"original": "string",
|
29
|
+
"resolved": "string",
|
30
|
+
"references": {}
|
31
|
+
},
|
32
|
+
"required": false,
|
33
|
+
"optional": false,
|
34
|
+
"docs": {
|
35
|
+
"tags": [],
|
36
|
+
"text": ""
|
37
|
+
},
|
38
|
+
"attribute": "size",
|
39
|
+
"reflect": false,
|
40
|
+
"defaultValue": "'50px'"
|
41
|
+
},
|
42
|
+
"color": {
|
43
|
+
"type": "string",
|
44
|
+
"mutable": false,
|
45
|
+
"complexType": {
|
46
|
+
"original": "string",
|
47
|
+
"resolved": "string",
|
48
|
+
"references": {}
|
49
|
+
},
|
50
|
+
"required": false,
|
51
|
+
"optional": false,
|
52
|
+
"docs": {
|
53
|
+
"tags": [],
|
54
|
+
"text": ""
|
55
|
+
},
|
56
|
+
"attribute": "color",
|
57
|
+
"reflect": false,
|
58
|
+
"defaultValue": "'#0078d7'"
|
59
|
+
}
|
60
|
+
};
|
61
|
+
}
|
62
|
+
}
|
63
|
+
//# sourceMappingURL=loading-spinner.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"loading-spinner.js","sourceRoot":"","sources":["../../../../src/components/loading-spinner/loading-spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOnD,MAAM,OAAO,cAAc;;oBACA,MAAM;qBACL,SAAS;;IAEjC,MAAM;QACF,OAAO,CACH,4DAAK,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,sCAAsC,EAAE,GAAQ,CAChJ,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'loading-spinner',\n styleUrl: 'loading-spinner.css',\n shadow: true,\n})\nexport class LoadingSpinner {\n @Prop() size: string = '50px'; // Tamanho do spinner (padrão 50px)\n @Prop() color: string = '#0078d7'; // Cor do spinner (padrão azul)\n\n render() {\n return (\n <div class=\"spinner\" style={{ width: this.size, height: this.size, borderColor: `${this.color} transparent transparent transparent` }}></div>\n );\n }\n}\n"]}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
.modal-backdrop {
|
2
|
+
position: fixed;
|
3
|
+
top: 0;
|
4
|
+
left: 0;
|
5
|
+
width: 100%;
|
6
|
+
height: 100%;
|
7
|
+
background-color: rgba(0, 0, 0, 0.5);
|
8
|
+
display: none;
|
9
|
+
justify-content: center;
|
10
|
+
align-items: center;
|
11
|
+
z-index: 1000;
|
12
|
+
}
|
13
|
+
|
14
|
+
.modal-backdrop.visible {
|
15
|
+
display: flex;
|
16
|
+
}
|
17
|
+
|
18
|
+
.modal {
|
19
|
+
background: white;
|
20
|
+
border-radius: 8px;
|
21
|
+
padding: 1rem;
|
22
|
+
max-width: 500px;
|
23
|
+
width: 90%;
|
24
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
|
25
|
+
}
|
26
|
+
|
27
|
+
.modal-header {
|
28
|
+
display: flex;
|
29
|
+
justify-content: space-between;
|
30
|
+
align-items: center;
|
31
|
+
border-bottom: 1px solid #ddd;
|
32
|
+
margin-bottom: 1rem;
|
33
|
+
}
|
34
|
+
|
35
|
+
.close-button {
|
36
|
+
background: none;
|
37
|
+
border: none;
|
38
|
+
font-size: 1.5rem;
|
39
|
+
cursor: pointer;
|
40
|
+
}
|
41
|
+
|
42
|
+
.modal-body {
|
43
|
+
/* padding: 1rem 0; */
|
44
|
+
}
|
45
|
+
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { h } from "@stencil/core";
|
2
|
+
export class AppModal {
|
3
|
+
constructor() {
|
4
|
+
this.isOpen = false;
|
5
|
+
this.modalTitle = undefined;
|
6
|
+
}
|
7
|
+
closeModal() {
|
8
|
+
this.modalClosed.emit();
|
9
|
+
}
|
10
|
+
render() {
|
11
|
+
return (h("div", { key: '9ed1b6a6f09b9127119d661abbd447e047c49efb', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, h("div", { key: 'dd4f515ea7949d5a470655234a9c0b48194bba1b', class: "modal" }, h("div", { key: '387a930782a4a00073eda969acc86bed39fc8151', class: "modal-header" }, h("h3", { key: '38f041a1e3483490a4de85f1c0a223c47c664517' }, this.modalTitle), h("button", { key: '98998678ec65fd96ad6284d8602ccdf5fd723e26', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), h("div", { key: '845f631054557e79b4ef0521b6eefd41eda93eeb', class: "modal-body" }, h("slot", { key: '2d5539938e7c4175eede394bddeb841e371912fa' })))));
|
12
|
+
}
|
13
|
+
static get is() { return "app-modal"; }
|
14
|
+
static get encapsulation() { return "shadow"; }
|
15
|
+
static get originalStyleUrls() {
|
16
|
+
return {
|
17
|
+
"$": ["app-modal.css"]
|
18
|
+
};
|
19
|
+
}
|
20
|
+
static get styleUrls() {
|
21
|
+
return {
|
22
|
+
"$": ["app-modal.css"]
|
23
|
+
};
|
24
|
+
}
|
25
|
+
static get properties() {
|
26
|
+
return {
|
27
|
+
"isOpen": {
|
28
|
+
"type": "boolean",
|
29
|
+
"mutable": false,
|
30
|
+
"complexType": {
|
31
|
+
"original": "boolean",
|
32
|
+
"resolved": "boolean",
|
33
|
+
"references": {}
|
34
|
+
},
|
35
|
+
"required": false,
|
36
|
+
"optional": false,
|
37
|
+
"docs": {
|
38
|
+
"tags": [],
|
39
|
+
"text": ""
|
40
|
+
},
|
41
|
+
"attribute": "is-open",
|
42
|
+
"reflect": true,
|
43
|
+
"defaultValue": "false"
|
44
|
+
},
|
45
|
+
"modalTitle": {
|
46
|
+
"type": "string",
|
47
|
+
"mutable": false,
|
48
|
+
"complexType": {
|
49
|
+
"original": "string",
|
50
|
+
"resolved": "string",
|
51
|
+
"references": {}
|
52
|
+
},
|
53
|
+
"required": false,
|
54
|
+
"optional": false,
|
55
|
+
"docs": {
|
56
|
+
"tags": [],
|
57
|
+
"text": ""
|
58
|
+
},
|
59
|
+
"attribute": "modal-title",
|
60
|
+
"reflect": false
|
61
|
+
}
|
62
|
+
};
|
63
|
+
}
|
64
|
+
static get events() {
|
65
|
+
return [{
|
66
|
+
"method": "modalClosed",
|
67
|
+
"name": "modalClosed",
|
68
|
+
"bubbles": true,
|
69
|
+
"cancelable": true,
|
70
|
+
"composed": true,
|
71
|
+
"docs": {
|
72
|
+
"tags": [],
|
73
|
+
"text": ""
|
74
|
+
},
|
75
|
+
"complexType": {
|
76
|
+
"original": "void",
|
77
|
+
"resolved": "void",
|
78
|
+
"references": {}
|
79
|
+
}
|
80
|
+
}];
|
81
|
+
}
|
82
|
+
}
|
83
|
+
//# sourceMappingURL=app-modal.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"app-modal.js","sourceRoot":"","sources":["../../../../src/components/modal/app-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOxE,MAAM,OAAO,QAAQ;;sBAG0B,KAAK;;;IAQxC,UAAU;QACd,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;IAED,MAAM;QACF,OAAO,CACH,4DAAK,KAAK,EAAE,kBAAkB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;YACxD,4DAAK,KAAK,EAAC,OAAO;gBACd,4DAAK,KAAK,EAAC,cAAc;oBACrB,6DAAK,IAAI,CAAC,UAAU,CAAM;oBAC1B,+DAAQ,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,aAEpD,CACP;gBACN,4DAAK,KAAK,EAAC,YAAY;oBACnB,8DAAQ,CACN,CACJ,CACJ,CACT,CAAA;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["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}"]}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
.note-container {
|
2
|
+
border: 1px solid #dddddd;
|
3
|
+
padding: 0 15px 15px;
|
4
|
+
margin: 0 0 26px 0px;
|
5
|
+
}
|
6
|
+
|
7
|
+
.note-container hr {
|
8
|
+
border: 1px solid #CCC;
|
9
|
+
}
|
10
|
+
|
11
|
+
.note-container .back-cart {
|
12
|
+
display: flex;
|
13
|
+
text-align: center;
|
14
|
+
}
|
15
|
+
|
16
|
+
.note-header {
|
17
|
+
display: flex;
|
18
|
+
align-items: baseline;
|
19
|
+
justify-content: space-between;
|
20
|
+
}
|
21
|
+
|
22
|
+
.note-title {
|
23
|
+
font-weight: 700;
|
24
|
+
text-align: left;
|
25
|
+
display: flex;
|
26
|
+
gap: 6px;
|
27
|
+
align-items: center;
|
28
|
+
}
|
29
|
+
|
30
|
+
.note-description {
|
31
|
+
font-family: Arial;
|
32
|
+
color: #6d6d5f;
|
33
|
+
padding: 0;
|
34
|
+
margin: 0 auto;
|
35
|
+
}
|
36
|
+
|
37
|
+
.back-cart {
|
38
|
+
font-size: .9em;
|
39
|
+
color: #27272A;
|
40
|
+
text-decoration: none;
|
41
|
+
cursor: pointer;
|
42
|
+
margin-top: 11px;
|
43
|
+
}
|
44
|
+
|
45
|
+
|
46
|
+
.note-description-2 {
|
47
|
+
color: var(--crm-scheme-fg-main-inverse, #262626);
|
48
|
+
font-family: Roboto;
|
49
|
+
font-size: var(--crm-font-size-body-lg, 16px);
|
50
|
+
font-style: normal;
|
51
|
+
font-weight: var(--crm-font-weight-body-bold, 400);
|
52
|
+
line-height: var(--crm-line-height-body-md, 20px);
|
53
|
+
letter-spacing: var(--crm-letter-spacing-title-md, 0px);
|
54
|
+
}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
import { h } from "@stencil/core";
|
2
|
+
import { getInfoCustomization } from "../../helpers/info.config.helper";
|
3
|
+
import money from "../../assets/svg/money-dollars-svgrepo-com.svg";
|
4
|
+
export class CrmBonusNote {
|
5
|
+
constructor() {
|
6
|
+
this.cartId = undefined;
|
7
|
+
this.storename = undefined;
|
8
|
+
this.url = undefined;
|
9
|
+
this.config = undefined;
|
10
|
+
}
|
11
|
+
componentWillLoad() {
|
12
|
+
this.upadateCheckToFreteAndGetUrl();
|
13
|
+
}
|
14
|
+
upadateCheckToFreteAndGetUrl() {
|
15
|
+
this.config = getInfoCustomization(this.storename);
|
16
|
+
console.log('this.config', this.config);
|
17
|
+
const envios = document.getElementsByName('forma-envio');
|
18
|
+
console.log('envios', envios.length);
|
19
|
+
envios.forEach((envio) => {
|
20
|
+
envio.checked = false;
|
21
|
+
});
|
22
|
+
this.url = window.location.origin;
|
23
|
+
}
|
24
|
+
handleHide() {
|
25
|
+
const amount = localStorage.getItem(this.cartId);
|
26
|
+
return !!amount;
|
27
|
+
}
|
28
|
+
getAmount() {
|
29
|
+
console.log("this.cartId", this.cartId);
|
30
|
+
const amount = localStorage.getItem(this.cartId);
|
31
|
+
return Number(amount).toFixed(2).replace(".", ",") || "0,00";
|
32
|
+
}
|
33
|
+
render() {
|
34
|
+
return (h("div", { key: '4996a99825bb06e75efbd57fc79e130ebcb8a587' }, h("div", { key: 'b8b3b10441580cfd0bb6376ca4f0172dad49d418', class: "note-container" }, h("div", { key: '77dfb07e5aaaa186f0f841d83d0c39f0bfda61da', class: "note-header" }, h("p", { key: '2aa33670787826779af793835d5324cae29fd37b', class: "note-title" }, h("img", { key: 'f019843e36291049e4aca9146fd1b1a95a7d8cac', src: money, width: 23 }), this.config.giftbackTitle), this.handleHide() && (h("a", { key: '34b05fdd4cef623227d63a93e41a84566452de7c', class: "back-cart", href: this.url }, "Editar"))), h("hr", { key: '477840ea440db0659eb462ac0e6d1633c41015f5' }), this.handleHide() &&
|
35
|
+
(h("p", { key: '26cb21c8f3eb7aca6b99fe08d197b180c4dd1c05', class: "note-description-2" }, this.config.giftbackTitle || "Giftback", " aplicado ao pedido: ", h("strong", { key: '3269c80c593282a306ad2a5fc7dc24476e9ddb91' }, "R$ ", this.getAmount()))), !this.handleHide() &&
|
36
|
+
(h("p", { key: '268698552db89d22c452cb487c3a99257204fccb', class: "note-description-2" }, "N\u00E3o h\u00E1 ", this.config.giftbackTitle || "Giftback", " dispon\u00EDvel para essa compra")))));
|
37
|
+
}
|
38
|
+
static get is() { return "crm-bonus-note"; }
|
39
|
+
static get originalStyleUrls() {
|
40
|
+
return {
|
41
|
+
"$": ["crm-bonus-note.css"]
|
42
|
+
};
|
43
|
+
}
|
44
|
+
static get styleUrls() {
|
45
|
+
return {
|
46
|
+
"$": ["crm-bonus-note.css"]
|
47
|
+
};
|
48
|
+
}
|
49
|
+
static get properties() {
|
50
|
+
return {
|
51
|
+
"cartId": {
|
52
|
+
"type": "any",
|
53
|
+
"mutable": false,
|
54
|
+
"complexType": {
|
55
|
+
"original": "any",
|
56
|
+
"resolved": "any",
|
57
|
+
"references": {}
|
58
|
+
},
|
59
|
+
"required": false,
|
60
|
+
"optional": false,
|
61
|
+
"docs": {
|
62
|
+
"tags": [],
|
63
|
+
"text": ""
|
64
|
+
},
|
65
|
+
"attribute": "cartid",
|
66
|
+
"reflect": false
|
67
|
+
},
|
68
|
+
"storename": {
|
69
|
+
"type": "any",
|
70
|
+
"mutable": false,
|
71
|
+
"complexType": {
|
72
|
+
"original": "any",
|
73
|
+
"resolved": "any",
|
74
|
+
"references": {}
|
75
|
+
},
|
76
|
+
"required": false,
|
77
|
+
"optional": false,
|
78
|
+
"docs": {
|
79
|
+
"tags": [],
|
80
|
+
"text": ""
|
81
|
+
},
|
82
|
+
"attribute": "storename",
|
83
|
+
"reflect": false
|
84
|
+
}
|
85
|
+
};
|
86
|
+
}
|
87
|
+
static get states() {
|
88
|
+
return {
|
89
|
+
"url": {},
|
90
|
+
"config": {}
|
91
|
+
};
|
92
|
+
}
|
93
|
+
}
|
94
|
+
//# sourceMappingURL=crm-bonus-note.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"crm-bonus-note.js","sourceRoot":"","sources":["../../../../src/components/note/crm-bonus-note.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAc,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAEpF,OAAO,KAAK,MAAM,gDAAgD,CAAA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BAC7B,IAAI,CAAC,MAAM,CAAC,aAAa,CAC1B;oBAGA,IAAI,CAAC,UAAU,EAAE,IAAI,CACjB,0DAAG,KAAK,EAAC,WAAW,EAAC,IAAI,EAAE,IAAI,CAAC,GAAG,aAE/B,CACP,CAGH;gBAEN,4DAAM;gBAEF,IAAI,CAAC,UAAU,EAAE;oBACjB,CACI,0DAAG,KAAK,EAAC,oBAAoB;wBACxB,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,UAAU;;wBAAsB;;4BAAY,IAAI,CAAC,SAAS,EAAE,CAAU,CACpG,CACP;gBAID,CAAC,IAAI,CAAC,UAAU,EAAE;oBAClB,CACI,0DAAG,KAAK,EAAC,oBAAoB;;wBACjB,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,UAAU;4DAC/C,CACP,CAOH,CACJ,CACT,CAAA;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Prop, State, h } from \"@stencil/core\";\nimport { IInfoStore, getInfoCustomization } from \"../../helpers/info.config.helper\";\n\nimport money from '../../assets/svg/money-dollars-svgrepo-com.svg'\n\n@Component({\n tag: 'crm-bonus-note',\n styleUrl: 'crm-bonus-note.css'\n})\nexport class CrmBonusNote {\n\n @Prop({ attribute: 'cartid' }) cartId;\n @Prop({ attribute: \"storename\" }) storename;\n\n @State() url: string;\n @State() config: IInfoStore;\n\n componentWillLoad() {\n this.upadateCheckToFreteAndGetUrl()\n }\n\n upadateCheckToFreteAndGetUrl() {\n\n this.config = getInfoCustomization(this.storename);\n\n console.log('this.config', this.config);\n\n const envios = document.getElementsByName('forma-envio');\n\n console.log('envios', envios.length);\n\n envios.forEach((envio: any) => {\n envio.checked = false;\n });\n\n this.url = window.location.origin;\n }\n\n handleHide() {\n const amount = localStorage.getItem(this.cartId);\n return !!amount;\n }\n\n getAmount() {\n console.log(\"this.cartId\", this.cartId)\n const amount = localStorage.getItem(this.cartId);\n\n return Number(amount).toFixed(2).replace(\".\", \",\") || \"0,00\"\n }\n\n render() {\n\n return (\n <div>\n <div class=\"note-container\">\n <div class=\"note-header\">\n\n <p class=\"note-title\">\n <img src={money} width={23} />\n {this.config.giftbackTitle}\n </p>\n\n {\n this.handleHide() && (\n <a class=\"back-cart\" href={this.url}>\n Editar\n </a>\n )\n }\n\n </div>\n\n <hr />\n {\n this.handleHide() &&\n (\n <p class=\"note-description-2\">\n {this.config.giftbackTitle || \"Giftback\"} aplicado ao pedido: <strong>R$ {this.getAmount()}</strong>\n </p>\n )\n }\n\n {\n !this.handleHide() &&\n (\n <p class=\"note-description-2\">\n Não há {this.config.giftbackTitle || \"Giftback\"} disponível para essa compra\n </p>\n )\n }\n\n\n {/* <a class=\"back-cart\" href={this.url}>\n Voltar ao carrinho\n </a> */}\n </div>\n </div>\n )\n }\n}"]}
|