crmbonus-component-wake 2.1.21-homolog-tray → 2.1.22-ngrok
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/LICENSE +21 -21
- package/dist/cjs/app-modal.cjs.entry.js +1 -1
- package/dist/cjs/app-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/build.payload.helper-409e6cc9.js +49 -0
- package/dist/cjs/build.payload.helper-409e6cc9.js.map +1 -0
- package/dist/cjs/{cart.helper-0a401d80.js → cart.helper-18589347.js} +4 -2
- package/dist/cjs/cart.helper-18589347.js.map +1 -0
- package/dist/cjs/countdown-timer-v2.cjs.entry.js +1 -1
- package/dist/cjs/countdown-timer-v2.cjs.entry.js.map +1 -1
- package/dist/cjs/{countdown-timer.cjs.entry.js → countdown-timer_2.cjs.entry.js} +19 -2
- package/dist/cjs/countdown-timer_2.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-bonus-form.cjs.entry.js +2 -2
- package/dist/cjs/crm-bonus-form.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-bonus-note.cjs.entry.js +64 -15
- package/dist/cjs/crm-bonus-note.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-bonus-tray.cjs.entry.js +1 -1
- package/dist/cjs/crm-bonus-tray.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-bonus.cjs.entry.js +30 -37
- package/dist/cjs/crm-bonus.cjs.entry.js.map +1 -1
- package/dist/cjs/{crm-giftback-form_2.cjs.entry.js → crm-giftback-form.cjs.entry.js} +43 -37
- package/dist/cjs/crm-giftback-form.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-tooltip_4.cjs.entry.js +11 -11
- package/dist/cjs/crm-tooltip_4.cjs.entry.js.map +1 -1
- package/dist/cjs/crmbonus-component-wake.cjs.js +1 -1
- package/dist/cjs/{crmbonus.service-7a4f6786.js → crmbonus.service-36e689a4.js} +17 -12
- package/dist/cjs/crmbonus.service-36e689a4.js.map +1 -0
- package/dist/cjs/giftback-finish_4.cjs.entry.js +4 -4
- package/dist/cjs/giftback-finish_4.cjs.entry.js.map +1 -1
- package/dist/cjs/i18n-defaa4f8.js.map +1 -1
- package/dist/cjs/index-7a7d7882.js.map +1 -1
- package/dist/cjs/info.config.helper-e35e6e20.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-container.cjs.entry.js +23 -0
- package/dist/cjs/loading-container.cjs.entry.js.map +1 -0
- package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/loading-spinner.cjs.entry.js.map +1 -1
- package/dist/cjs/pedido-finalizado.cjs.entry.js +3 -3
- package/dist/cjs/pedido-finalizado.cjs.entry.js.map +1 -1
- package/dist/cjs/phone-cancel-input.cjs.entry.js +1 -1
- package/dist/cjs/phone-cancel-input.cjs.entry.js.map +1 -1
- package/dist/cjs/phone-input-mask.cjs.entry.js +1 -1
- package/dist/cjs/phone-input-mask.cjs.entry.js.map +1 -1
- package/dist/cjs/phone-input.cjs.entry.js +1 -1
- package/dist/cjs/phone-input.cjs.entry.js.map +1 -1
- package/dist/cjs/utils-5d59acb1.js.map +1 -1
- package/dist/collection/assets/svg/money-dollars-svgrepo-com.svg +5 -5
- package/dist/collection/components/_crm-bonus-form/crm-bonus-form.css +17 -17
- package/dist/collection/components/_crm-bonus-form/crm-bonus-form.js +2 -2
- package/dist/collection/components/_crm-bonus-form/crm-bonus-form.js.map +1 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-finish/giftback-finish.css +8 -8
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js +1 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js.map +1 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-pin/giftback-pin.css +68 -68
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js +1 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js.map +1 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-progress/giftback-progress.css +108 -108
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js +2 -2
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js.map +1 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/name-input/name-input.css +107 -107
- package/dist/collection/components/_crm-bonus-form/subcomponents/name-input/name-input.js +1 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/name-input/name-input.js.map +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/phone.input.js.map +1 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js +1 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js.map +1 -1
- package/dist/collection/components/button/crm-button.css +21 -21
- package/dist/collection/components/button/index.js +1 -1
- package/dist/collection/components/button/index.js.map +1 -1
- package/dist/collection/components/countdown-timer/countdown-timer.js +1 -1
- package/dist/collection/components/countdown-timer/countdown-timer.js.map +1 -1
- package/dist/collection/components/countdown-timer/countdown-timer.v2.js +2 -2
- package/dist/collection/components/countdown-timer/countdown-timer.v2.js.map +1 -1
- package/dist/collection/components/crm-bonus/assets/logo.svg +17 -17
- package/dist/collection/components/crm-bonus/assets/svg/logo.svg +17 -17
- package/dist/collection/components/crm-bonus/crm-bonus.css +82 -82
- package/dist/collection/components/crm-bonus/crm-bonus.js +44 -5
- package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
- package/dist/collection/components/giftback-form/giftback-form.css +74 -74
- package/dist/collection/components/giftback-form/giftback-form.js +42 -20
- package/dist/collection/components/giftback-form/giftback-form.js.map +1 -1
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.css +181 -181
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js +6 -6
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js.map +1 -1
- package/dist/collection/components/giftback-form/subcomponents/giftback-message/giftback-massage.js.map +1 -1
- package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js +1 -1
- package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js.map +1 -1
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.css +83 -83
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js +1 -1
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js.map +1 -1
- package/dist/collection/components/loading-container/loading-container.css +46 -46
- package/dist/collection/components/loading-container/loading-container.js +1 -1
- package/dist/collection/components/loading-container/loading-container.js.map +1 -1
- package/dist/collection/components/loading-spinner/loading-spinner.css +16 -16
- package/dist/collection/components/loading-spinner/loading-spinner.js +1 -1
- package/dist/collection/components/loading-spinner/loading-spinner.js.map +1 -1
- package/dist/collection/components/modal/app-modal.css +44 -44
- package/dist/collection/components/modal/app-modal.js +1 -1
- package/dist/collection/components/modal/app-modal.js.map +1 -1
- package/dist/collection/components/note/crm-bonus-note.css +68 -68
- package/dist/collection/components/note/crm-bonus-note.js +63 -11
- 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/pedido/pedido.js.map +1 -1
- package/dist/collection/components/phone/phone-input-mask.css +40 -40
- package/dist/collection/components/phone/phone-input-mask.js +1 -1
- package/dist/collection/components/phone/phone-input-mask.js.map +1 -1
- package/dist/collection/components/tooltip/crm-tooltip.css +48 -48
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js.map +1 -1
- package/dist/collection/contants/index.js.map +1 -1
- package/dist/collection/contants/mocks.js.map +1 -1
- package/dist/collection/dto/pin.sent.js.map +1 -1
- package/dist/collection/dto/reserved-info.dto.js.map +1 -1
- package/dist/collection/dto/update.order.dto.js.map +1 -1
- package/dist/collection/dto/validate.pin.bonus.js +3 -0
- package/dist/collection/dto/validate.pin.bonus.js.map +1 -1
- package/dist/collection/helpers/build.payload.helper.js +15 -3
- package/dist/collection/helpers/build.payload.helper.js.map +1 -1
- package/dist/collection/helpers/cart.helper.js +2 -0
- package/dist/collection/helpers/cart.helper.js.map +1 -1
- package/dist/collection/helpers/info.config.helper.js.map +1 -1
- package/dist/collection/helpers/payload.interface.js.map +1 -1
- package/dist/collection/helpers/time.helper.js.map +1 -1
- package/dist/collection/i18n/i18n.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/objectvalues/cart.wake.js.map +1 -1
- package/dist/collection/services/crmbonus.service.js +15 -10
- package/dist/collection/services/crmbonus.service.js.map +1 -1
- package/dist/collection/tray-ecommerce/crm-bonus-tray.js +1 -1
- package/dist/collection/tray-ecommerce/crm-bonus-tray.js.map +1 -1
- package/dist/collection/utils/keys.storage.js.map +1 -1
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/app-modal.js +1 -1
- package/dist/components/app-modal.js.map +1 -1
- package/dist/components/countdown-timer-v2.js +1 -1
- package/dist/components/countdown-timer-v2.js.map +1 -1
- package/dist/components/countdown-timer.js +1 -1
- package/dist/components/crm-bonus-form.js +7 -7
- package/dist/components/crm-bonus-form.js.map +1 -1
- package/dist/components/crm-bonus-note.js +69 -18
- package/dist/components/crm-bonus-note.js.map +1 -1
- package/dist/components/crm-bonus-tray.js +1 -1
- package/dist/components/crm-bonus-tray.js.map +1 -1
- package/dist/components/crm-bonus.js +40 -46
- package/dist/components/crm-bonus.js.map +1 -1
- package/dist/components/crm-button.js +1 -1
- package/dist/components/crm-giftback-form.js +1 -1
- package/dist/components/crm-tooltip.js +1 -1
- package/dist/components/giftback-finish.js +1 -1
- package/dist/components/giftback-info.js +1 -1
- package/dist/components/giftback-pin.js +1 -1
- package/dist/components/giftback-progress.js +1 -1
- package/dist/components/loading-container.js +1 -1
- package/dist/components/loading-spinner.js +1 -1
- package/dist/components/name-input.js +1 -1
- package/dist/components/{p-63ca9208.js → p-0a33e90f.js} +5 -5
- package/dist/components/p-0a33e90f.js.map +1 -0
- package/dist/components/{p-a428d5df.js → p-142e8246.js} +17 -12
- package/dist/components/p-142e8246.js.map +1 -0
- package/dist/components/p-1b441909.js.map +1 -1
- package/dist/components/p-1bc79b08.js +47 -0
- package/dist/components/p-1bc79b08.js.map +1 -0
- package/dist/components/{p-c4788672.js → p-234f35c4.js} +3 -3
- package/dist/components/p-234f35c4.js.map +1 -0
- package/dist/components/{p-cd108989.js → p-6b1f5521.js} +2 -2
- package/dist/components/p-6b1f5521.js.map +1 -0
- package/dist/components/{p-ec317fb9.js → p-6d61406c.js} +52 -30
- package/dist/components/p-6d61406c.js.map +1 -0
- package/dist/components/{p-dc1871cf.js → p-6ff4aa18.js} +3 -3
- package/dist/components/p-6ff4aa18.js.map +1 -0
- package/dist/{esm/cart.helper-c6fd0b36.js → components/p-7a92a786.js} +4 -2
- package/dist/components/p-7a92a786.js.map +1 -0
- package/dist/components/{p-4ac2b98e.js → p-86dfe7ca.js} +5 -5
- package/dist/components/p-86dfe7ca.js.map +1 -0
- package/dist/components/{p-e81cd527.js → p-8e6146ae.js} +3 -3
- package/dist/components/p-8e6146ae.js.map +1 -0
- package/dist/components/{p-a70a82a3.js → p-ab662b24.js} +3 -3
- package/dist/components/p-ab662b24.js.map +1 -0
- package/dist/components/p-af3ba015.js.map +1 -1
- package/dist/components/{p-39cc3ce4.js → p-b86c93cc.js} +3 -3
- package/dist/components/p-b86c93cc.js.map +1 -0
- package/dist/components/p-c53241bf.js.map +1 -1
- package/dist/components/{p-d8bd654a.js → p-dc0f6d66.js} +10 -10
- package/dist/components/p-dc0f6d66.js.map +1 -0
- package/dist/components/{p-5a7b0549.js → p-e068510c.js} +2 -2
- package/dist/components/p-e068510c.js.map +1 -0
- package/dist/components/{p-e25a1b64.js → p-e31b6c28.js} +2 -2
- package/dist/components/p-e31b6c28.js.map +1 -0
- package/dist/components/{p-86b95c83.js → p-eb1f4328.js} +2 -2
- package/dist/components/p-eb1f4328.js.map +1 -0
- package/dist/components/p-ecc51430.js.map +1 -1
- package/dist/components/{p-3cd7a20f.js → p-f09b7364.js} +2 -2
- package/dist/components/{p-3cd7a20f.js.map → p-f09b7364.js.map} +1 -1
- package/dist/components/pedido-finalizado.js +3 -3
- package/dist/components/pedido-finalizado.js.map +1 -1
- package/dist/components/phone-cancel-input.js +3 -3
- package/dist/components/phone-cancel-input.js.map +1 -1
- package/dist/components/phone-form.js +1 -1
- package/dist/components/phone-input-mask.js +1 -1
- package/dist/components/phone-input.js +3 -3
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/pin-form.js +1 -1
- package/dist/crmbonus-component-wake/assets/logo.svg +17 -17
- 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-a428d5df.js → p-142e8246.js} +2 -2
- package/dist/crmbonus-component-wake/p-142e8246.js.map +1 -0
- package/dist/crmbonus-component-wake/p-1b441909.js.map +1 -1
- package/dist/crmbonus-component-wake/p-1bc79b08.js +2 -0
- package/dist/crmbonus-component-wake/p-1bc79b08.js.map +1 -0
- package/dist/crmbonus-component-wake/p-2bd29eae.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-2bd29eae.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-0a40bcba.entry.js → p-39abc114.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-39abc114.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-427c86db.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-427c86db.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-568072fe.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-568072fe.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-6d5bd437.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-6d5bd437.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-74335744.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-74335744.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-7a92a786.js +2 -0
- package/dist/crmbonus-component-wake/p-7a92a786.js.map +1 -0
- package/dist/crmbonus-component-wake/p-7beb0b90.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-7beb0b90.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-7ee5c218.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-7ee5c218.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-85d2747a.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-85d2747a.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-8c4ae16d.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-8c4ae16d.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-77d8e96c.entry.js → p-9a32f685.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-9a32f685.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-a7f6ff4a.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-a7f6ff4a.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-af3ba015.js.map +1 -1
- package/dist/crmbonus-component-wake/{p-154b5318.entry.js → p-b5e9a5ea.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-b5e9a5ea.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-bcb65b4e.entry.js → p-b9baad26.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-b9baad26.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c53241bf.js.map +1 -1
- package/dist/crmbonus-component-wake/p-d2e98cc5.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-d2e98cc5.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-e5d8700b.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-e5d8700b.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-ecc51430.js.map +1 -1
- package/dist/env.js +1 -1
- package/dist/env.js.map +1 -1
- package/dist/esm/app-modal.entry.js +1 -1
- package/dist/esm/app-modal.entry.js.map +1 -1
- package/dist/esm/build.payload.helper-96f9c8b8.js +47 -0
- package/dist/esm/build.payload.helper-96f9c8b8.js.map +1 -0
- package/dist/{components/p-9ca28ea7.js → esm/cart.helper-107db11e.js} +4 -2
- package/dist/esm/cart.helper-107db11e.js.map +1 -0
- package/dist/esm/countdown-timer-v2.entry.js +1 -1
- package/dist/esm/countdown-timer-v2.entry.js.map +1 -1
- package/dist/esm/{countdown-timer.entry.js → countdown-timer_2.entry.js} +19 -3
- package/dist/esm/countdown-timer_2.entry.js.map +1 -0
- package/dist/esm/crm-bonus-form.entry.js +2 -2
- package/dist/esm/crm-bonus-form.entry.js.map +1 -1
- package/dist/esm/crm-bonus-note.entry.js +64 -15
- package/dist/esm/crm-bonus-note.entry.js.map +1 -1
- package/dist/esm/crm-bonus-tray.entry.js +1 -1
- package/dist/esm/crm-bonus-tray.entry.js.map +1 -1
- package/dist/esm/crm-bonus.entry.js +29 -36
- package/dist/esm/crm-bonus.entry.js.map +1 -1
- package/dist/esm/{crm-giftback-form_2.entry.js → crm-giftback-form.entry.js} +44 -37
- package/dist/esm/crm-giftback-form.entry.js.map +1 -0
- package/dist/esm/crm-tooltip_4.entry.js +11 -11
- package/dist/esm/crm-tooltip_4.entry.js.map +1 -1
- package/dist/esm/crmbonus-component-wake.js +1 -1
- package/dist/esm/{crmbonus.service-0bd0a5ac.js → crmbonus.service-652502f6.js} +17 -12
- package/dist/esm/crmbonus.service-652502f6.js.map +1 -0
- package/dist/esm/giftback-finish_4.entry.js +4 -4
- package/dist/esm/giftback-finish_4.entry.js.map +1 -1
- package/dist/esm/i18n-b9d8b0cc.js.map +1 -1
- package/dist/esm/index-dc3ebdf0.js.map +1 -1
- package/dist/esm/info.config.helper-7cad7a9c.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-container.entry.js +19 -0
- package/dist/esm/loading-container.entry.js.map +1 -0
- package/dist/esm/loading-spinner.entry.js +1 -1
- package/dist/esm/loading-spinner.entry.js.map +1 -1
- package/dist/esm/pedido-finalizado.entry.js +3 -3
- package/dist/esm/pedido-finalizado.entry.js.map +1 -1
- package/dist/esm/phone-cancel-input.entry.js +1 -1
- package/dist/esm/phone-cancel-input.entry.js.map +1 -1
- package/dist/esm/phone-input-mask.entry.js +1 -1
- package/dist/esm/phone-input-mask.entry.js.map +1 -1
- package/dist/esm/phone-input.entry.js +1 -1
- package/dist/esm/phone-input.entry.js.map +1 -1
- package/dist/esm/utils-dec6df66.js.map +1 -1
- package/dist/types/Users/Darlison/Projects/Bycoders/crmbonus/crmbonus-component/.stencil/env.d.ts +2 -0
- package/dist/types/components/crm-bonus/crm-bonus.d.ts +2 -0
- package/dist/types/components/giftback-form/giftback-form.d.ts +1 -0
- package/dist/types/components/note/crm-bonus-note.d.ts +8 -1
- package/dist/types/components.d.ts +2 -0
- package/dist/types/dto/reserved-info.dto.d.ts +3 -0
- package/dist/types/dto/validate.pin.bonus.d.ts +4 -1
- package/package.json +58 -58
- package/readme.md +114 -114
- package/dist/cjs/cart.helper-0a401d80.js.map +0 -1
- package/dist/cjs/countdown-timer.cjs.entry.js.map +0 -1
- package/dist/cjs/crm-button.cjs.entry.js +0 -25
- package/dist/cjs/crm-button.cjs.entry.js.map +0 -1
- package/dist/cjs/crm-giftback-form_2.cjs.entry.js.map +0 -1
- package/dist/cjs/crmbonus.service-7a4f6786.js.map +0 -1
- package/dist/components/p-39cc3ce4.js.map +0 -1
- package/dist/components/p-4ac2b98e.js.map +0 -1
- package/dist/components/p-5a7b0549.js.map +0 -1
- package/dist/components/p-63ca9208.js.map +0 -1
- package/dist/components/p-86b95c83.js.map +0 -1
- package/dist/components/p-9ca28ea7.js.map +0 -1
- package/dist/components/p-a428d5df.js.map +0 -1
- package/dist/components/p-a70a82a3.js.map +0 -1
- package/dist/components/p-c4788672.js.map +0 -1
- package/dist/components/p-cd108989.js.map +0 -1
- package/dist/components/p-d8bd654a.js.map +0 -1
- package/dist/components/p-dc1871cf.js.map +0 -1
- package/dist/components/p-e25a1b64.js.map +0 -1
- package/dist/components/p-e81cd527.js.map +0 -1
- package/dist/components/p-ec317fb9.js.map +0 -1
- package/dist/crmbonus-component-wake/p-0055876c.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-0055876c.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-0a40bcba.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-154b5318.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-1b0969ff.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-1b0969ff.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-35b95848.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-35b95848.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-4792c140.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-4792c140.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-53b6a7e8.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-53b6a7e8.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-5aa35e0f.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-5aa35e0f.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-77d8e96c.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-81ec64ff.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-81ec64ff.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-8e2d6659.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-8e2d6659.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-9ca28ea7.js +0 -2
- package/dist/crmbonus-component-wake/p-9ca28ea7.js.map +0 -1
- package/dist/crmbonus-component-wake/p-a428d5df.js.map +0 -1
- package/dist/crmbonus-component-wake/p-b2941d60.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-b2941d60.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-bcb65b4e.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-cc754208.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-cc754208.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-e4aae2ed.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-e4aae2ed.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-ed22d88f.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-ed22d88f.entry.js.map +0 -1
- package/dist/esm/cart.helper-c6fd0b36.js.map +0 -1
- package/dist/esm/countdown-timer.entry.js.map +0 -1
- package/dist/esm/crm-button.entry.js +0 -21
- package/dist/esm/crm-button.entry.js.map +0 -1
- package/dist/esm/crm-giftback-form_2.entry.js.map +0 -1
- package/dist/esm/crmbonus.service-0bd0a5ac.js.map +0 -1
- package/dist/types/home/darlison/Projects/Bycoders/crmbonus/crmbonus-component/.stencil/env.d.ts +0 -2
package/readme.md
CHANGED
@@ -1,115 +1,115 @@
|
|
1
|
-
[](https://stenciljs.com)
|
2
|
-
|
3
|
-
# Stencil Component Starter
|
4
|
-
|
5
|
-
This is a starter project for building a standalone Web Component using Stencil.
|
6
|
-
|
7
|
-
Stencil is also great for building entire apps. For that, use the [stencil-app-starter](https://github.com/ionic-team/stencil-app-starter) instead.
|
8
|
-
|
9
|
-
# Stencil
|
10
|
-
|
11
|
-
Stencil is a compiler for building fast web apps using Web Components.
|
12
|
-
|
13
|
-
Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than runtime tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
|
14
|
-
|
15
|
-
Stencil components are just Web Components, so they work in any major framework or with no framework at all.
|
16
|
-
|
17
|
-
## Getting Started
|
18
|
-
|
19
|
-
To start building a new web component using Stencil, clone this repo to a new directory:
|
20
|
-
|
21
|
-
```bash
|
22
|
-
git clone https://github.com/ionic-team/stencil-component-starter.git my-component
|
23
|
-
cd my-component
|
24
|
-
git remote rm origin
|
25
|
-
```
|
26
|
-
|
27
|
-
and run:
|
28
|
-
|
29
|
-
```bash
|
30
|
-
npm install
|
31
|
-
npm start
|
32
|
-
```
|
33
|
-
|
34
|
-
To build the component for production, run:
|
35
|
-
|
36
|
-
```bash
|
37
|
-
npm run build
|
38
|
-
```
|
39
|
-
|
40
|
-
To run the unit tests for the components, run:
|
41
|
-
|
42
|
-
```bash
|
43
|
-
npm test
|
44
|
-
```
|
45
|
-
|
46
|
-
Need help? Check out our docs [here](https://stenciljs.com/docs/my-first-component).
|
47
|
-
|
48
|
-
## Naming Components
|
49
|
-
|
50
|
-
When creating new component tags, we recommend _not_ using `stencil` in the component name (ex: `<stencil-datepicker>`). This is because the generated component has little to nothing to do with Stencil; it's just a web component!
|
51
|
-
|
52
|
-
Instead, use a prefix that fits your company or any name for a group of related components. For example, all of the Ionic-generated web components use the prefix `ion`.
|
53
|
-
|
54
|
-
## Using this component
|
55
|
-
|
56
|
-
There are two strategies we recommend for using web components built with Stencil.
|
57
|
-
|
58
|
-
The first step for all two of these strategies is to [publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages).
|
59
|
-
|
60
|
-
You can read more about these different approaches in the [Stencil docs](https://stenciljs.com/docs/publishing).
|
61
|
-
|
62
|
-
### Lazy Loading
|
63
|
-
|
64
|
-
If your Stencil project is built with the [`dist`](https://stenciljs.com/docs/distribution) output target, you can import a small bootstrap script that registers all components and allows you to load individual component scripts lazily.
|
65
|
-
|
66
|
-
For example, given your Stencil project namespace is called `my-design-system`, to use `my-component` on any website, inject this into your HTML:
|
67
|
-
|
68
|
-
```html
|
69
|
-
<script type="module" src="https://unpkg.com/my-design-system"></script>
|
70
|
-
<!--
|
71
|
-
To avoid unpkg.com redirects to the actual file, you can also directly import:
|
72
|
-
https://unpkg.com/foobar-design-system@0.0.1/dist/foobar-design-system/foobar-design-system.esm.js
|
73
|
-
-->
|
74
|
-
<my-component first="Stencil" middle="'Don't call me a framework'" last="JS"></my-component>
|
75
|
-
```
|
76
|
-
|
77
|
-
This will only load the necessary scripts needed to render `<my-component />`. Once more components of this package are used, they will automatically be loaded lazily.
|
78
|
-
|
79
|
-
You can also import the script as part of your `node_modules` in your applications entry file:
|
80
|
-
|
81
|
-
```tsx
|
82
|
-
import 'foobar-design-system/dist/foobar-design-system/foobar-design-system.esm.js';
|
83
|
-
```
|
84
|
-
|
85
|
-
Check out this [Live Demo](https://stackblitz.com/edit/vitejs-vite-y6v26a?file=src%2Fmain.tsx).
|
86
|
-
|
87
|
-
### Standalone
|
88
|
-
|
89
|
-
If you are using a Stencil component library with `dist-custom-elements`, we recommend importing Stencil components individually in those files where they are needed.
|
90
|
-
|
91
|
-
To export Stencil components as standalone components make sure you have the [`dist-custom-elements`](https://stenciljs.com/docs/custom-elements) output target defined in your `stencil.config.ts`.
|
92
|
-
|
93
|
-
For example, given you'd like to use `<my-component />` as part of a React component, you can import the component directly via:
|
94
|
-
|
95
|
-
```tsx
|
96
|
-
import 'foobar-design-system/my-component';
|
97
|
-
|
98
|
-
function App() {
|
99
|
-
return (
|
100
|
-
<>
|
101
|
-
<div>
|
102
|
-
<my-component
|
103
|
-
first="Stencil"
|
104
|
-
middle="'Don't call me a framework'"
|
105
|
-
last="JS"
|
106
|
-
></my-component>
|
107
|
-
</div>
|
108
|
-
</>
|
109
|
-
);
|
110
|
-
}
|
111
|
-
|
112
|
-
export default App;
|
113
|
-
```
|
114
|
-
|
1
|
+
[](https://stenciljs.com)
|
2
|
+
|
3
|
+
# Stencil Component Starter
|
4
|
+
|
5
|
+
This is a starter project for building a standalone Web Component using Stencil.
|
6
|
+
|
7
|
+
Stencil is also great for building entire apps. For that, use the [stencil-app-starter](https://github.com/ionic-team/stencil-app-starter) instead.
|
8
|
+
|
9
|
+
# Stencil
|
10
|
+
|
11
|
+
Stencil is a compiler for building fast web apps using Web Components.
|
12
|
+
|
13
|
+
Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than runtime tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
|
14
|
+
|
15
|
+
Stencil components are just Web Components, so they work in any major framework or with no framework at all.
|
16
|
+
|
17
|
+
## Getting Started
|
18
|
+
|
19
|
+
To start building a new web component using Stencil, clone this repo to a new directory:
|
20
|
+
|
21
|
+
```bash
|
22
|
+
git clone https://github.com/ionic-team/stencil-component-starter.git my-component
|
23
|
+
cd my-component
|
24
|
+
git remote rm origin
|
25
|
+
```
|
26
|
+
|
27
|
+
and run:
|
28
|
+
|
29
|
+
```bash
|
30
|
+
npm install
|
31
|
+
npm start
|
32
|
+
```
|
33
|
+
|
34
|
+
To build the component for production, run:
|
35
|
+
|
36
|
+
```bash
|
37
|
+
npm run build
|
38
|
+
```
|
39
|
+
|
40
|
+
To run the unit tests for the components, run:
|
41
|
+
|
42
|
+
```bash
|
43
|
+
npm test
|
44
|
+
```
|
45
|
+
|
46
|
+
Need help? Check out our docs [here](https://stenciljs.com/docs/my-first-component).
|
47
|
+
|
48
|
+
## Naming Components
|
49
|
+
|
50
|
+
When creating new component tags, we recommend _not_ using `stencil` in the component name (ex: `<stencil-datepicker>`). This is because the generated component has little to nothing to do with Stencil; it's just a web component!
|
51
|
+
|
52
|
+
Instead, use a prefix that fits your company or any name for a group of related components. For example, all of the Ionic-generated web components use the prefix `ion`.
|
53
|
+
|
54
|
+
## Using this component
|
55
|
+
|
56
|
+
There are two strategies we recommend for using web components built with Stencil.
|
57
|
+
|
58
|
+
The first step for all two of these strategies is to [publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages).
|
59
|
+
|
60
|
+
You can read more about these different approaches in the [Stencil docs](https://stenciljs.com/docs/publishing).
|
61
|
+
|
62
|
+
### Lazy Loading
|
63
|
+
|
64
|
+
If your Stencil project is built with the [`dist`](https://stenciljs.com/docs/distribution) output target, you can import a small bootstrap script that registers all components and allows you to load individual component scripts lazily.
|
65
|
+
|
66
|
+
For example, given your Stencil project namespace is called `my-design-system`, to use `my-component` on any website, inject this into your HTML:
|
67
|
+
|
68
|
+
```html
|
69
|
+
<script type="module" src="https://unpkg.com/my-design-system"></script>
|
70
|
+
<!--
|
71
|
+
To avoid unpkg.com redirects to the actual file, you can also directly import:
|
72
|
+
https://unpkg.com/foobar-design-system@0.0.1/dist/foobar-design-system/foobar-design-system.esm.js
|
73
|
+
-->
|
74
|
+
<my-component first="Stencil" middle="'Don't call me a framework'" last="JS"></my-component>
|
75
|
+
```
|
76
|
+
|
77
|
+
This will only load the necessary scripts needed to render `<my-component />`. Once more components of this package are used, they will automatically be loaded lazily.
|
78
|
+
|
79
|
+
You can also import the script as part of your `node_modules` in your applications entry file:
|
80
|
+
|
81
|
+
```tsx
|
82
|
+
import 'foobar-design-system/dist/foobar-design-system/foobar-design-system.esm.js';
|
83
|
+
```
|
84
|
+
|
85
|
+
Check out this [Live Demo](https://stackblitz.com/edit/vitejs-vite-y6v26a?file=src%2Fmain.tsx).
|
86
|
+
|
87
|
+
### Standalone
|
88
|
+
|
89
|
+
If you are using a Stencil component library with `dist-custom-elements`, we recommend importing Stencil components individually in those files where they are needed.
|
90
|
+
|
91
|
+
To export Stencil components as standalone components make sure you have the [`dist-custom-elements`](https://stenciljs.com/docs/custom-elements) output target defined in your `stencil.config.ts`.
|
92
|
+
|
93
|
+
For example, given you'd like to use `<my-component />` as part of a React component, you can import the component directly via:
|
94
|
+
|
95
|
+
```tsx
|
96
|
+
import 'foobar-design-system/my-component';
|
97
|
+
|
98
|
+
function App() {
|
99
|
+
return (
|
100
|
+
<>
|
101
|
+
<div>
|
102
|
+
<my-component
|
103
|
+
first="Stencil"
|
104
|
+
middle="'Don't call me a framework'"
|
105
|
+
last="JS"
|
106
|
+
></my-component>
|
107
|
+
</div>
|
108
|
+
</>
|
109
|
+
);
|
110
|
+
}
|
111
|
+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AC;KAC7B;IAED,IAAG,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;QACzB,OAAO,GAAG,CAAC;KACd;IAED,IAAG,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;QACtB,OAAO,GAAG,CAAC;KACd;IAED,IAAG,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QACrB,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,CAAA;KACxC;IAED,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,cAAc,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;AAE3E,CAAC;;;;;;;","names":["CrmBonusService","CHECKOUT_CART_WAKE"],"sources":["src/objectvalues/cart.wake.ts","src/dto/reserved-info.dto.ts","src/helpers/cart.helper.ts"],"sourcesContent":["import { IProductWake, IStore, IUser } from \"../dto/validate.pin.bonus\";\n\nexport class CartWake {\n id: string;\n middlewareId: string;\n orderId: number;\n products: IProductWake[] = [];\n user: IUser;\n store: IStore;\n\n constructor(cart) {\n this.id = cart.Metadados.id || cart.Id;\n this.middlewareId = cart.Metadados?.id;\n this.orderId = cart.PedidoId;\n this.buildUserInfo(cart);\n this.buildStoreInfo(cart);\n this.products = this.buildStoreCart( cart.Produtos);\n }\n\n private buildStoreCart(newProducts = []) {\n const cache = localStorage.getItem(\"bc:cart\");\n\n if(!cache) {\n return this.saveStore(newProducts)\n \n }\n \n const cacheProducts:IProductWake[] = JSON.parse(cache);\n\n if(newProducts.length !== cacheProducts.length) {\n return this.saveStore(newProducts);\n }\n\n for (const p of newProducts) {\n const [cp] = cacheProducts.filter(cpp => cpp.ProdutoVarianteId == p.ProdutoVarianteId);\n\n if(cp) {\n cp.Quantidade != p.Quantidade;\n\n return newProducts;\n }\n }\n\n return cacheProducts;\n\n }\n\n\n private saveStore(newProducts) {\n localStorage.setItem(\"bc:cart\", JSON.stringify(newProducts));\n\n return newProducts;\n }\n\n private buildUserInfo(cart) {\n this.user = {\n id: cart.Usuario ? cart.Usuario.Id : null\n }\n }\n\n private buildStoreInfo(cart) {\n this.store = {\n name: cart.Loja?.Nome\n }\n }\n}","export class ReservedInfoDTO {\n bonusBalance: string;\n bonusIds: string;\n calculatedValue: string;\n cartId: string;\n metadata: {\n url: string,\n createdAt: number\n }\n orderId: string;\n status: number;\n totalDiscount: string;\n totalValue: string;\n isBonusProcessed?: boolean;\n\n\n public static of(payload: any) {\n const info = new ReservedInfoDTO();\n info.bonusBalance = payload.bonusBalance;\n info.bonusIds = payload.bonusIds;\n info.calculatedValue = payload.calculatedValue;\n info.cartId = payload.cartId;\n info.metadata = payload.metadata;\n info.orderId = payload.orderId;\n info.status = payload.status;\n info.totalDiscount = payload.totalDiscount;\n info.totalValue = payload.totalValue;\n info.isBonusProcessed = payload.isBonusProcessed;\n return info;\n }\n\n public isExpired(): boolean {\n const createdAt = this?.metadata?.createdAt;\n if(!createdAt) return true; \n \n const current = Date.now();\n\n const diffms = current - createdAt;\n\n const diffMinutes = diffms / (1000 * 60);\n\n console.log('diffMinutes', diffMinutes);\n\n return diffMinutes > 6;\n\n }\n\n}","import { CHECKOUT_CART_WAKE } from \"../../env\";\nimport { CartWake } from \"../objectvalues/cart.wake\";\nimport { CrmBonusService } from \"../services/crmbonus.service\";\nimport { ReservedInfoDTO } from '../dto/reserved-info.dto'\n\nconst crmBonusService: CrmBonusService = CrmBonusService.getInstance();\n\nexport const getCart = async (): Promise<CartWake> => {\n const baseUrl = buildUrlBase(); // window.location.origin; //\"https://bycoders.fbits.store\" //window.location.origin;\n \n console.log('[URL STORE]: ', baseUrl)\n\n const cart = await crmBonusService.getInfoCart(baseUrl);\n\n return new CartWake(cart);\n}\n\nexport const getInfoBonusByCartIdAndStoreName = async (cartId, storeName) => {\n const info = await crmBonusService.getInfoBonus(cartId, storeName)\n\n return ReservedInfoDTO.of(info);\n}\n\nexport const persisteMetadata = async (storeName: string, cartId: string, metadata = {}) => {\n await crmBonusService.patchInfoBonus({\n storeName,\n cartId,\n metadata\n })\n}\n\nconst buildUrlBase = () => {\n\n const url = window.location.origin; //\"https://bycoders.checkout.fbits.store\" //\n\n if(url.includes('localhost')) {\n return CHECKOUT_CART_WAKE;\n }\n\n if(url.includes('checkout')) {\n return url;\n }\n\n if(url.includes('fbits')) {\n return url;\n }\n\n if(url.includes(\"www.\")) {\n return url.replace(\"www\", \"checkout\")\n }\n\n return `${window.location.protocol}//checkout.${window.location.host}`;\n\n}"],"version":3}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"countdown-timer.entry.cjs.js","mappings":";;;;;;MAKa,cAAc;;;;;uBAIG,CAAC;wBACA,EAAE;;;IAM7B,iBAAiB;QACb,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACvD,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACxC,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;QACzB,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAEtD,IAAI,YAAY,IAAI,UAAU,EAAE;YAC5B,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;YACvB,IAAI,CAAC,eAAe,EAAE,CAAC;SAC1B;aAAM;YACH,IAAI,CAAC,aAAa,GAAG,UAAU,GAAG,YAAY,CAAC;YAC/C,IAAI,CAAC,cAAc,EAAE,CAAC;SACzB;KACJ;IAED,oBAAoB;QAChB,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KAClC;IAED,cAAc;QACV,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC;YAC1B,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC;YAC3B,IAAI,IAAI,CAAC,aAAa,IAAI,CAAC,EAAE;gBACzB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;gBACvB,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC/B,IAAI,CAAC,eAAe,EAAE,CAAC;aAC1B;SACJ,EAAE,IAAI,CAAC,CAAC;KACZ;IAED,eAAe;QACX,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,EAAE,CAAA;KAClB;IAED,MAAM;QACF,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;QACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,aAAa,GAAG,KAAK,IAAI,IAAI,CAAC,CAAC;QACjE,MAAM,cAAc,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;QAElG,QACIA,2EAAS,cAAc,CAAS,EAClC;KACL;;;;;","names":["h"],"sources":["src/components/countdown-timer/countdown-timer.tsx"],"sourcesContent":["import { Component, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'countdown-timer',\n})\nexport class CountdownTimer {\n\n @Prop() downtime: () => void;\n @Prop() dataCriacao: string;\n @Prop() minutos: number = 6;\n @Prop() segundos: number = 60;\n\n @State() tempoRestante: number; // em milissegundos\n\n private intervalId: any;\n\n componentWillLoad() {\n const tempoTotal = this.minutos * this.segundos * 1000;\n const data = new Date(this.dataCriacao);\n const agora = new Date();\n const tempoPassado = agora.getTime() - data.getTime();\n\n if (tempoPassado >= tempoTotal) {\n this.tempoRestante = 0;\n this.onTempoEsgotado();\n } else {\n this.tempoRestante = tempoTotal - tempoPassado;\n this.startCountdown();\n }\n }\n\n disconnectedCallback() {\n clearInterval(this.intervalId);\n }\n\n startCountdown() {\n this.intervalId = setInterval(() => {\n this.tempoRestante -= 1000;\n if (this.tempoRestante <= 0) {\n this.tempoRestante = 0;\n clearInterval(this.intervalId);\n this.onTempoEsgotado();\n }\n }, 1000);\n }\n\n onTempoEsgotado() {\n console.log('Tempo esgotado! Executando ação...');\n this.downtime()\n }\n\n render() {\n const minutos = Math.floor(this.tempoRestante / 60000);\n const segundos = Math.floor((this.tempoRestante % 60000) / 1000);\n const tempoFormatado = `${String(minutos).padStart(2, '0')}:${String(segundos).padStart(2, '0')}`;\n\n return (\n <label> {tempoFormatado}</label>\n );\n }\n}\n"],"version":3}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
const index = require('./index-a7537457.js');
|
6
|
-
|
7
|
-
const crmButtonCss = "input,button{margin:0;padding:10px;}.crm-contaner-button{height:auto;width:auto}.crm-button{height:48px;width:100%;border:1px solid #000;padding:14px 20px;background-color:#000;color:#fff;line-height:20px;font-weight:500;cursor:pointer}";
|
8
|
-
const CrmButtonStyle0 = crmButtonCss;
|
9
|
-
|
10
|
-
const Button = class {
|
11
|
-
constructor(hostRef) {
|
12
|
-
index.registerInstance(this, hostRef);
|
13
|
-
this.txtBtn = undefined;
|
14
|
-
this.loading = undefined;
|
15
|
-
this.handleClick = undefined;
|
16
|
-
}
|
17
|
-
render() {
|
18
|
-
return (index.h("div", { key: '6fce890879cd807d0893166b22de304739e6dcd7', class: "crm-contaner-button" }, index.h("button", { key: '843f7745bf183fb7ad88e70a60f25ac462de4e84', class: "crm-button", onClick: () => this.handleClick() }, !this.loading ? this.txtBtn : index.h("loading-spinner", { size: "15px", color: "#fff" }))));
|
19
|
-
}
|
20
|
-
};
|
21
|
-
Button.style = CrmButtonStyle0;
|
22
|
-
|
23
|
-
exports.crm_button = Button;
|
24
|
-
|
25
|
-
//# sourceMappingURL=crm-button.cjs.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"crm-button.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,8OAA8O,CAAC;AACpQ,wBAAe,YAAY;;MCKd,MAAM;;;;;;;IAOf,MAAM;QACF,QACIA,kEAAK,KAAK,EAAC,qBAAqB,IAC5BA,qEAAQ,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,IAEpD,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,GAAGA,6BAAiB,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,GAAG,CAEzE,CACP,EACT;KACJ;;;;;;","names":["h"],"sources":["src/components/button/crm-button.css?tag=crm-button","src/components/button/index.tsx"],"sourcesContent":["input, button {\n margin: 0;\n padding: 10px; /* Ajuste o valor conforme necessário */\n}\n\n.crm-contaner-button {\n height: auto;\n width: auto;\n}\n\n.crm-button {\n height: 48px;\n width: 100%;\n border: 1px solid #000;\n padding: 14px 20px;\n background-color: #000;\n color: #fff;\n /* font-size: 14px; */\n line-height: 20px;\n font-weight: 500;\n cursor: pointer;\n}","import { Component, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: 'crm-button',\n styleUrl: 'crm-button.css'\n})\nexport class Button {\n\n @Prop() txtBtn: string;\n @Prop() loading: boolean;\n\n @Prop() handleClick: () => void;\n\n render() {\n return (\n <div class=\"crm-contaner-button\">\n <button class=\"crm-button\" onClick={() => this.handleClick()}>\n {\n !this.loading ? this.txtBtn : <loading-spinner size=\"15px\" color=\"#fff\" />\n }\n </button>\n </div>\n )\n }\n}"],"version":3}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"crm-giftback-form.loading-container.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,k3BAAk3B,CAAC;AAC34B,8BAAe,eAAe;;MCgBjB,QAAQ;;;;QAGX,oBAAe,GAAoBA,gCAAe,CAAC,WAAW,EAAE,CAAC;;;;;;;;;;uBAa7C,KAAK;;;;oBAIHC,oBAAY,CAAC,YAAY;;sBAG7B,EAAE;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K,EAC5D,IAAI,CAAC,KAAK,IAAIA,gEAAG,KAAK,EAAC,mBAAmB,IAAE,IAAI,CAAC,KAAK,CAAK,CAEnD,EAIX,IAAI,CAAC,IAAI,KAAKL,oBAAY,CAAC,YAAY;YACvCK,4EACE,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,IAAI,CAAC,YAAY,EAC5B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EACjC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAClC,MAAM,EAAE,IAAI,CAAC,MAAM,GACnB,EAIF,IAAI,CAAC,IAAI,KAAKL,oBAAY,CAAC,aAAa;aAEtCK,kEAAK,KAAK,EAAC,mBAAmB,IAC3BC,aAAO,CAAC,CAAC,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAC9D,CACP,CAGC,EACP;KACF;;;;AC1WH,MAAM,mBAAmB,GAAG,8bAA8b,CAAC;AAC3d,+BAAe,mBAAmB;;MCKrB,gBAAgB;;;uBAEE,IAAI;;IAE/B,MAAM;QACF,QACID,kEAAK,KAAK,EAAC,aAAa,IAEhB,IAAI,CAAC,OAAO,KACRA,kEAAK,KAAK,EAAC,mBAAmB,IAC1BA,kEAAK,KAAK,EAAC,iBAAiB,GAEtB,CAEJ,CACT,EAELA,oEAAa,CACX,EACT;KACJ;;;;;;;","names":["CrmBonusService","StepFormEnum","getKeyReserveByCartId","getInfoCustomization","USED_KEY","persisteMetadata","h","i18next"],"sources":["src/components/giftback-form/giftback-form.css?tag=crm-giftback-form","src/components/giftback-form/giftback-form.tsx","src/components/loading-container/loading-container.css?tag=loading-container","src/components/loading-container/loading-container.tsx"],"sourcesContent":["* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\n:host {\n --crmfont-sizebodymd: 14px;\n --crmline-heightbodymd: 20px;\n --crmletter-spacingtitle-md: 0px\n}\n\n.container-message {\n /* font-size: var(--crmfont-sizebodymd); */\n font-weight: 400;\n line-height: var(--crmline-heightbodymd);\n letter-spacing: var(--crmletter-spacingtitle-md);\n text-align: left;\n text-underline-position: from-font;\n text-decoration-skip-ink: none;\n}\n\n.crm-container-form {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n height: auto;\n padding: 20px 24px 20px 24px;\n border: 1px solid #CCCC;\n writing-mode: horizontal-tb;\n gap: 16px;\n border-top: 1px solid #ccc !important;\n border-bottom: 1px solid #ccc !important;\n}\n\n/* .fbits-responsive-carrinho-desconto {\n overflow: hidden;\n border: 1px solid #ccc;\n border-top: 0;\n border-bottom: 0;\n} */\n\n.crm-phone-form {\n display: flex;\n flex-direction: column;\n height: 100%;\n /* justify-content: space-around; */\n gap: 16px;\n}\n\n.crm-subtitle {\n /* font-size: 14px; */\n font-size: .875rem;\n line-height: 1.25rem;\n \n}\n\n.crm-title {\n font-weight: 700;\n line-height: 20px;\n color: #262626;\n /* font-size: 16px; */\n}\n\n.crm-message-info {\n color: #619013;\n font-weight: 500;\n /* font-size: 12px; */\n}\n\n.crm-message-error {\n color: #E11D48;\n font-weight: 500;\n /* font-size: 12px; */\n}","import { Component, Method, Prop, State, h } from \"@stencil/core\";\nimport { CrmBonusService } from \"../../services/crmbonus.service\";\nimport { StepFormEnum } from \"../../contants\";\nimport { IPinSent } from '../../dto/pin.sent'\nimport { IBonus, ICustomer, IProccesPinBonusDto, IProduct } from \"../../dto/validate.pin.bonus\";\nimport { IInfoStore, getInfoCustomization } from \"../../helpers/info.config.helper\";\n\nimport i18next from \"../../i18n/i18n\"\nimport { USED_KEY, getKeyReserveByCartId } from \"../../utils/keys.storage\";\nimport { persisteMetadata } from \"../../helpers/cart.helper\";\nimport { ReservedInfoDTO } from \"../../dto/reserved-info.dto\";\n\n@Component({\n tag: 'crm-giftback-form',\n styleUrl: 'giftback-form.css',\n shadow: false\n})\nexport class CrmBonus {\n // private phoneInputMask: HTMLPhoneFormElement;\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 @Prop() loadProducts: () => void;\n @Prop() loadAll: () => void;\n\n @Prop() customStyles;\n @Prop() reservedInfo: ReservedInfoDTO;\n\n @State() value: string;\n @State() loading: boolean = false;\n @State() message: string;\n @State() phone: string;\n @State() pinInfo: IPinSent;\n @State() step: StepFormEnum = StepFormEnum.STEP_RESERVE;\n @State() bonus: IBonus;\n\n @State() sucess: string = \"\";\n @State() error: string = \"\";\n @State() config: IInfoStore;\n @State() hasApplyBonus = false;\n\n @Method()\n async setStep(step: StepFormEnum) {\n this.step = step\n }\n\n @Method()\n async processBonus(products: IProduct[] = [], hasNewProduct = false) {\n await this.loadProducts();\n this.sucess = \"\";\n\n console.log('processBonus', [])\n if (hasNewProduct) {\n this.products = products;\n }\n\n const _bonus = localStorage.getItem(getKeyReserveByCartId(this.cartId));\n\n if (_bonus) {\n\n const bonus = JSON.parse(_bonus)\n\n this.bonus = bonus;\n\n this.phone = bonus.phone;\n this.pinInfo = {\n storeId: bonus.storeId,\n userId: bonus.userId\n }\n\n \n\n await this.validateBonus(\"2018\");\n //this.step = StepFormEnum.STEP_RESERVE;\n\n }\n }\n\n async handleSendPin(phone: string) {\n await this.loadAll()\n this.message = \"\"\n if (!phone) {\n this.message = \"Informe seu telefone\";\n return;\n }\n\n this.phone = phone;\n\n this.sendPin();\n }\n\n async componentWillLoad() {\n this.sucess = \"\";\n this.error = \"\"\n this.config = getInfoCustomization(this.storeName);\n\n const phoneAgain = this.getPhoneNumberAgain();\n\n if (phoneAgain) {\n this.step = StepFormEnum.STEP_PHONE;\n return\n }\n\n await this.processBonus();\n\n }\n\n getPhoneNumberAgain() {\n const consulta_bonus = localStorage.getItem(getKeyReserveByCartId(this.cartId));\n\n if (!consulta_bonus) return true;\n\n const bonus = JSON.parse(consulta_bonus);\n\n return !bonus.hasBonus;\n }\n\n private convertStringToNumber(): number {\n const _phone = this.phone.replace(/\\D/g, '');\n return Number(_phone);\n }\n\n public async sendPin() {\n this.loading = true;\n this.message = \"\";\n this.sucess = \"\";\n this.error = \"\"\n\n try {\n\n const _phone = this.convertStringToNumber();\n const pinInfoCache = localStorage.getItem(`bc:${this.phone}`);\n\n if (!pinInfoCache) {\n this.pinInfo = await this.crmBonusService.sendPin(_phone, this.customer?.name, this.storeName);\n }\n\n if (pinInfoCache) {\n\n const bonus = JSON.parse(pinInfoCache);\n\n this.pinInfo = {\n storeId: bonus.storeId,\n userId: bonus.userId\n }\n\n await this.validateBonus(\"2018\");\n this.step = StepFormEnum.STEP_RESERVE;\n } else {\n this.step = StepFormEnum.STEP_PIN;\n }\n\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n changePhone() {\n this.sucess = \"\";\n this.error = \"\"\n this.step = StepFormEnum.STEP_PHONE;\n }\n\n public async validateBonus(pin: string) {\n\n await this.loadProducts();\n\n const used_or_no = localStorage.getItem(USED_KEY);\n\n if (used_or_no == \"dontUse\") {\n this.step = StepFormEnum.STEP_RESERVE;\n return\n }\n\n this.loading = true;\n this.sucess = \"\";\n this.error = \"\";\n const payload: IProccesPinBonusDto = {\n pin: pin,\n cellphone: this.convertStringToNumber(),\n storeId: this.pinInfo.storeId.toString(),\n userId: this.pinInfo.userId.toString(),\n checkoutId: this.cartId,\n checkoutProducts: this.products,\n name: this.customer?.name,\n storeName: this.storeName\n }\n\n try {\n this.bonus = await this.crmBonusService.validatePinBonus(payload);\n\n if (!this.bonus.hasBonus) {\n\n localStorage.setItem(getKeyReserveByCartId(this.cartId), JSON.stringify({ ...this.bonus, phone: this.phone }));\n\n this.loading = false;\n this.step = StepFormEnum.STEP_NO_BONUS;\n return\n }\n\n this.sucess = \"Código validado com sucesso!\";\n localStorage.setItem(getKeyReserveByCartId(this.cartId), JSON.stringify({ ...this.bonus, phone: this.phone }));\n localStorage.setItem(`bc:${this.phone}`, JSON.stringify(this.bonus));\n\n localStorage.setItem(USED_KEY, \"use\");\n localStorage.setItem(this.cartId, this.bonus.bonusBalance.toString());\n\n await this.updateMetadata();\n\n this.step = StepFormEnum.STEP_RESERVE;\n\n } catch (error) {\n const _error: string = error?.response?.data?.response;\n\n if (_error && _error.includes(\"Pin\")) {\n this.error = \"Código inválido!\"\n } else {\n this.error = _error;\n this.step = StepFormEnum.STEP_NO_BONUS;\n }\n } finally {\n this.loading = false;\n }\n }\n\n private async updateMetadata() {\n try {\n\n if(!this.reservedInfo.isBonusProcessed) return;\n\n if (this.reservedInfo.isExpired()) {\n console.log('[CRM:updateMetadata]')\n await persisteMetadata(this.storeName, this.cartId, {\n createdAt: Date.now(),\n url: window.location.href\n });\n\n localStorage.removeItem(\"bc:time\");\n }\n } catch (error) {\n console.error('[CRMBONUS:updateMetadata]: ', error);\n }\n }\n\n public handleCancel() {\n // this.step = StepFormEnum.STEP_PHONE;\n this.cancel()\n }\n\n async cancel() {\n this.message = \"\";\n this.loading = true;\n try {\n await this.crmBonusService.cancel(this.cartId);\n\n localStorage.setItem(USED_KEY, \"dontUse\");\n this.save(0)\n await this.updateMetadata();\n } catch (error) {\n this.message = \"Não consegui cancelar o bônus, tente novamente!\"\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 this.save(amount);\n\n } catch (error) {\n this.message = \"ocorreu um error ao solicitar a aplicação do bonus! tente novamente\"\n\n this.step = StepFormEnum.STEP_NO_BONUS;\n localStorage.removeItem(this.cartId);\n } finally {\n this.loading = false;\n }\n }\n\n save(amount: number) {\n localStorage.setItem(this.cartId, amount.toString());\n }\n\n public async reserve(amount: number) {\n\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 render() {\n console.log(\"cartId\", this.cartId)\n return (\n <div class=\"crm-container-form fbits-responsive-carrinho-desconto\" style={this.customStyles} >\n\n {/* <loading-container /> */}\n\n <label class=\"crm-title\">{this.config.giftbackTitle}</label>\n\n {this.step === StepFormEnum.STEP_PHONE &&\n <phone-form\n value={this.customer.phone}\n config={this.config}\n loading={this.loading}\n handlerSubmit={(phone) => this.handleSendPin(phone)}\n />}\n {\n this.step === StepFormEnum.STEP_PIN &&\n <pin-form\n config={this.config}\n phone={this.phone}\n cancel={() => this.changePhone()}\n resend={() => this.sendPin()}\n validate={(data) => this.validateBonus(data)}\n loading={this.loading}\n >\n {this.sucess && <p class=\"crm-message-info\">{this.sucess}</p>}\n {this.error && <p class=\"crm-message-error\">{this.error}</p>}\n\n </pin-form>\n }\n\n {\n this.step === StepFormEnum.STEP_RESERVE &&\n <giftback-info\n storeName={this.storeName}\n infoBonus={this.reservedInfo}\n config={this.config}\n loading={this.loading}\n cancel={() => this.handleCancel()}\n bonus={this.bonus}\n reserve={() => this.processBonus()}\n cartId={this.cartId}\n />\n }\n\n {\n this.step === StepFormEnum.STEP_NO_BONUS &&\n (\n <div class=\"container-message\">\n {i18next.t(\"noGiftback\", { storename: this.config.giftbackTitle })}\n </div>\n )\n\n }\n </div>\n )\n }\n}","/* Estilo para centralizar o container do loading */\n.loading-container {\n position: absolute;\n /* Fixa o loading na tela */\n top: 0;\n left: 0;\n width: 100%;\n /* Tamanho total da tela */\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n /* Fundo semitransparente */\n display: flex;\n /* Centraliza o conteúdo */\n justify-content: center;\n align-items: center;\n z-index: 1000;\n /* Coloca o loading acima de outros elementos */\n}\n\n/* Estilo do spinner (círculo giratório) */\n.loading-spinner {\n width: 50px;\n height: 50px;\n border: 5px solid rgba(255, 255, 255, 0.3);\n /* Borda semitransparente */\n border-top: 5px solid white;\n /* Borda que será animada */\n border-radius: 50%;\n /* Faz o círculo */\n animation: spin 1s linear infinite;\n /* Gira continuamente */\n}\n\n/* Keyframes para a animação de rotação */\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.relative-xy {\n position: relative;\n}","import { Component, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: 'loading-container',\n styleUrl: 'loading-container.css'\n})\nexport class LoadingContainer {\n\n @Prop() loading: boolean = true;\n\n render() {\n return (\n <div class=\"relative-xy\">\n {\n this.loading && (\n <div class=\"loading-container\">\n <div class=\"loading-spinner\">\n\n </div>\n \n </div>\n )\n }\n <slot></slot>\n </div>\n )\n }\n}"],"version":3}
|