crmbonus-component-wake 2.1.40-ngrok → 2.1.41-shoulder
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 +2 -2
- package/dist/cjs/app-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/bc-crmbonus.cjs.entry.js +28 -0
- package/dist/cjs/bc-crmbonus.cjs.entry.js.map +1 -0
- package/dist/cjs/bc-phone-form_2.cjs.entry.js +333 -0
- package/dist/cjs/bc-phone-form_2.cjs.entry.js.map +1 -0
- package/dist/cjs/bc-wake-crmbonus.cjs.entry.js +18 -0
- package/dist/cjs/bc-wake-crmbonus.cjs.entry.js.map +1 -0
- package/dist/cjs/cart.helper-d1f02660.js +201 -0
- package/dist/cjs/cart.helper-d1f02660.js.map +1 -0
- package/dist/cjs/container-empty.cjs.entry.js +2 -2
- package/dist/cjs/container-empty.cjs.entry.js.map +1 -1
- package/dist/cjs/countdown-timer-v2.cjs.entry.js +2 -2
- package/dist/cjs/countdown-timer-v2.cjs.entry.js.map +1 -1
- package/dist/cjs/countdown-timer_11.cjs.entry.js +66 -42
- package/dist/cjs/countdown-timer_11.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-bonus-note.cjs.entry.js +14 -12
- package/dist/cjs/crm-bonus-note.cjs.entry.js.map +1 -1
- package/dist/cjs/crmbonus-component-wake.cjs.js +2 -2
- package/dist/{components/p-0d09c221.js → cjs/crmbonus.service-ef8fe456.js} +30 -117
- package/dist/cjs/crmbonus.service-ef8fe456.js.map +1 -0
- package/dist/{esm/info.config.helper-e4b8c478.js → cjs/i18n-defaa4f8.js} +3 -30
- package/dist/cjs/i18n-defaa4f8.js.map +1 -0
- package/dist/cjs/{index-a7537457.js → index-e45b352e.js} +17 -1
- package/dist/cjs/index-e45b352e.js.map +1 -0
- package/dist/cjs/info.config.helper-52984ab9.js +36 -0
- package/dist/cjs/info.config.helper-52984ab9.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pedido-finalizado.cjs.entry.js +6 -5
- package/dist/cjs/pedido-finalizado.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/collection-manifest.json +5 -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 +86 -82
- package/dist/collection/components/crm-bonus/crm-bonus.js +27 -6
- package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
- package/dist/collection/components/crmbonus/crmbonus.js +26 -0
- package/dist/collection/components/crmbonus/crmbonus.js.map +1 -0
- package/dist/collection/components/crmbonus/subcomponents/phone-form/index.js +95 -0
- package/dist/collection/components/crmbonus/subcomponents/phone-form/index.js.map +1 -0
- package/dist/collection/components/crmbonus/subcomponents/phone-form/styles.scss +5 -0
- package/dist/collection/components/crmbonus/subcomponents/phone-validate/index.js +129 -0
- package/dist/collection/components/crmbonus/subcomponents/phone-validate/index.js.map +1 -0
- package/dist/collection/components/crmbonus/subcomponents/phone-validate/styles.scss +84 -0
- package/dist/collection/components/giftback-form/giftback-form.css +74 -74
- package/dist/collection/components/giftback-form/giftback-form.js +5 -5
- 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/container-empty.js +1 -1
- package/dist/collection/components/loading-container/container-empty.js.map +1 -1
- package/dist/collection/components/loading-container/loading-container.css +53 -53
- 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 +2 -2
- package/dist/collection/components/note/crm-bonus-note.js.map +1 -1
- package/dist/collection/components/pedido/pedido.js +2 -2
- 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/checkout.dto.js +2 -0
- package/dist/collection/dto/checkout.dto.js.map +1 -0
- 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.map +1 -1
- package/dist/collection/helpers/build.payload.helper.js +1 -0
- package/dist/collection/helpers/build.payload.helper.js.map +1 -1
- package/dist/collection/helpers/cart.helper.js +55 -1
- 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 +33 -8
- package/dist/collection/objectvalues/cart.wake.js.map +1 -1
- package/dist/collection/platforms/wake/index.js +8 -0
- package/dist/collection/platforms/wake/index.js.map +1 -0
- package/dist/collection/services/crmbonus.service.js +21 -2
- package/dist/collection/services/crmbonus.service.js.map +1 -1
- package/dist/collection/utils/keys.storage.js.map +1 -1
- package/dist/collection/utils/retry.utils.js.map +1 -1
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/app-modal.js +2 -2
- package/dist/components/app-modal.js.map +1 -1
- package/dist/components/bc-crmbonus.d.ts +11 -0
- package/dist/components/bc-crmbonus.js +8 -0
- package/dist/components/bc-crmbonus.js.map +1 -0
- package/dist/components/bc-phone-form.d.ts +11 -0
- package/dist/components/bc-phone-form.js +8 -0
- package/dist/components/bc-phone-form.js.map +1 -0
- package/dist/components/bc-phone-validate-pin-form.d.ts +11 -0
- package/dist/components/bc-phone-validate-pin-form.js +8 -0
- package/dist/components/bc-phone-validate-pin-form.js.map +1 -0
- package/dist/components/bc-wake-crmbonus.d.ts +11 -0
- package/dist/components/bc-wake-crmbonus.js +74 -0
- package/dist/components/bc-wake-crmbonus.js.map +1 -0
- package/dist/components/container-empty.js +2 -2
- package/dist/components/container-empty.js.map +1 -1
- package/dist/components/countdown-timer-v2.js +2 -2
- package/dist/components/countdown-timer-v2.js.map +1 -1
- package/dist/components/countdown-timer.js +1 -1
- package/dist/components/crm-bonus-note.js +8 -7
- package/dist/components/crm-bonus-note.js.map +1 -1
- package/dist/components/crm-bonus.js +41 -18
- 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-info.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/loading-container.js +1 -1
- package/dist/components/loading-spinner.js +1 -1
- package/dist/components/p-06d73541.js +80 -0
- package/dist/components/p-06d73541.js.map +1 -0
- package/dist/components/p-09f86f1d.js +106 -0
- package/dist/components/p-09f86f1d.js.map +1 -0
- package/dist/components/p-1b441909.js.map +1 -1
- package/dist/components/p-2362455d.js +195 -0
- package/dist/components/p-2362455d.js.map +1 -0
- package/dist/components/p-2fac7f5e.js +78 -0
- package/dist/components/p-2fac7f5e.js.map +1 -0
- package/dist/components/{p-786485b2.js → p-39bd2459.js} +3 -3
- package/dist/components/p-39bd2459.js.map +1 -0
- package/dist/components/{p-144c34f6.js → p-496bc4af.js} +17 -16
- package/dist/components/p-496bc4af.js.map +1 -0
- package/dist/{esm/cart.helper-8c8d4a0a.js → components/p-60787be2.js} +25 -117
- package/dist/components/p-60787be2.js.map +1 -0
- package/dist/components/{p-0a7ccd8c.js → p-6aa17c2b.js} +6 -6
- package/dist/components/p-6aa17c2b.js.map +1 -0
- package/dist/components/{p-c250687d.js → p-80a69118.js} +4 -4
- package/dist/components/p-80a69118.js.map +1 -0
- package/dist/components/p-81e4e697.js +1298 -0
- package/dist/components/p-81e4e697.js.map +1 -0
- package/dist/components/{p-2cece106.js → p-8f45d088.js} +3 -3
- package/dist/components/p-8f45d088.js.map +1 -0
- package/dist/components/{p-9b5c07d8.js → p-9231dc5e.js} +4 -4
- package/dist/components/p-9231dc5e.js.map +1 -0
- package/dist/components/{p-3c8ae82e.js → p-ade5e41e.js} +11 -10
- package/dist/components/p-ade5e41e.js.map +1 -0
- package/dist/components/p-af3ba015.js.map +1 -1
- package/dist/components/{p-e6863cf5.js → p-bf1d624e.js} +6 -6
- package/dist/components/p-bf1d624e.js.map +1 -0
- package/dist/components/{p-8274e2c4.js → p-c1522ad8.js} +3 -3
- package/dist/components/p-c1522ad8.js.map +1 -0
- package/dist/components/p-c53241bf.js.map +1 -1
- package/dist/components/{p-11520f0f.js → p-eabf185c.js} +3 -3
- package/dist/components/p-eabf185c.js.map +1 -0
- package/dist/components/p-ecc51430.js.map +1 -1
- package/dist/components/{p-9d950d25.js → p-f58c9cb2.js} +2 -2
- package/dist/components/p-f58c9cb2.js.map +1 -0
- package/dist/components/pedido-finalizado.js +5 -4
- package/dist/components/pedido-finalizado.js.map +1 -1
- package/dist/components/phone-form.js +1 -1
- package/dist/components/phone-input-mask.js +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-ac027576.entry.js → p-06d494c4.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-06d494c4.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-8c362346.js → p-19848de4.js} +2 -2
- package/dist/crmbonus-component-wake/p-19848de4.js.map +1 -0
- package/dist/crmbonus-component-wake/p-20d0467e.js +2 -0
- package/dist/crmbonus-component-wake/p-20d0467e.js.map +1 -0
- package/dist/crmbonus-component-wake/p-2362455d.js +2 -0
- package/dist/crmbonus-component-wake/p-2362455d.js.map +1 -0
- package/dist/crmbonus-component-wake/p-2dd97532.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-2dd97532.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-3e02757c.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-3e02757c.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-4cbebe64.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-4cbebe64.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-0d09c221.js → p-60787be2.js} +2 -2
- package/dist/crmbonus-component-wake/p-60787be2.js.map +1 -0
- package/dist/crmbonus-component-wake/p-6e7c09cd.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-6e7c09cd.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-9b556ee6.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-9b556ee6.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-af3ba015.js.map +1 -1
- package/dist/crmbonus-component-wake/p-b435da9a.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-b435da9a.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c53241bf.js +2 -0
- package/dist/crmbonus-component-wake/p-c53241bf.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c533ea8b.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-c533ea8b.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c7d03986.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-c7d03986.entry.js.map +1 -0
- package/dist/env.js +2 -2
- package/dist/env.js.map +1 -1
- package/dist/esm/app-modal.entry.js +2 -2
- package/dist/esm/app-modal.entry.js.map +1 -1
- package/dist/esm/bc-crmbonus.entry.js +24 -0
- package/dist/esm/bc-crmbonus.entry.js.map +1 -0
- package/dist/esm/bc-phone-form_2.entry.js +328 -0
- package/dist/esm/bc-phone-form_2.entry.js.map +1 -0
- package/dist/esm/bc-wake-crmbonus.entry.js +14 -0
- package/dist/esm/bc-wake-crmbonus.entry.js.map +1 -0
- package/dist/esm/cart.helper-22ecdec9.js +195 -0
- package/dist/esm/cart.helper-22ecdec9.js.map +1 -0
- package/dist/esm/container-empty.entry.js +2 -2
- package/dist/esm/container-empty.entry.js.map +1 -1
- package/dist/esm/countdown-timer-v2.entry.js +2 -2
- package/dist/esm/countdown-timer-v2.entry.js.map +1 -1
- package/dist/esm/countdown-timer_11.entry.js +52 -28
- package/dist/esm/countdown-timer_11.entry.js.map +1 -1
- package/dist/esm/crm-bonus-note.entry.js +9 -7
- package/dist/esm/crm-bonus-note.entry.js.map +1 -1
- package/dist/esm/crmbonus-component-wake.js +3 -3
- package/dist/{cjs/cart.helper-31ba8997.js → esm/crmbonus.service-d83e6bb6.js} +25 -125
- package/dist/esm/crmbonus.service-d83e6bb6.js.map +1 -0
- package/dist/{cjs/info.config.helper-d4b1291b.js → esm/i18n-b9d8b0cc.js} +2 -36
- package/dist/esm/i18n-b9d8b0cc.js.map +1 -0
- package/dist/esm/{index-bdb70d5a.js → index-09314622.js} +16 -2
- package/dist/esm/index-09314622.js.map +1 -0
- package/dist/esm/info.config.helper-156cb9b2.js +32 -0
- package/dist/esm/info.config.helper-156cb9b2.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pedido-finalizado.entry.js +5 -4
- package/dist/esm/pedido-finalizado.entry.js.map +1 -1
- package/dist/esm/utils-dec6df66.js.map +1 -1
- package/dist/store.js +25 -0
- package/dist/store.js.map +1 -0
- package/dist/types/components/crmbonus/crmbonus.d.ts +9 -0
- package/dist/types/components/crmbonus/subcomponents/phone-form/index.d.ts +13 -0
- package/dist/types/components/crmbonus/subcomponents/phone-validate/index.d.ts +17 -0
- package/dist/types/components.d.ts +76 -0
- package/dist/types/dto/checkout.dto.d.ts +8 -0
- package/dist/types/dto/pin.sent.d.ts +3 -0
- package/dist/types/dto/validate.pin.bonus.d.ts +9 -0
- package/dist/types/helpers/cart.helper.d.ts +1 -0
- package/dist/types/home/darlison/Projects/Bycoders/crmbonus/crmbonus-component/.stencil/env.d.ts +2 -0
- package/dist/types/home/darlison/Projects/Bycoders/crmbonus/crmbonus-component/.stencil/store.d.ts +11 -0
- package/dist/types/objectvalues/cart.wake.d.ts +2 -1
- package/dist/types/platforms/wake/index.d.ts +3 -0
- package/dist/types/services/crmbonus.service.d.ts +4 -2
- package/package.json +59 -58
- package/readme.md +114 -114
- package/dist/cjs/cart.helper-31ba8997.js.map +0 -1
- package/dist/cjs/index-a7537457.js.map +0 -1
- package/dist/cjs/info.config.helper-d4b1291b.js.map +0 -1
- package/dist/components/p-0a7ccd8c.js.map +0 -1
- package/dist/components/p-0d09c221.js.map +0 -1
- package/dist/components/p-11520f0f.js.map +0 -1
- package/dist/components/p-144c34f6.js.map +0 -1
- package/dist/components/p-2cece106.js.map +0 -1
- package/dist/components/p-3c8ae82e.js.map +0 -1
- package/dist/components/p-786485b2.js.map +0 -1
- package/dist/components/p-8274e2c4.js.map +0 -1
- package/dist/components/p-9b5c07d8.js.map +0 -1
- package/dist/components/p-9d950d25.js.map +0 -1
- package/dist/components/p-c250687d.js.map +0 -1
- package/dist/components/p-e6863cf5.js.map +0 -1
- package/dist/crmbonus-component-wake/p-0d09c221.js.map +0 -1
- package/dist/crmbonus-component-wake/p-1644deef.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-1644deef.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-3ceb1dad.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-3ceb1dad.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-7e52727e.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-7e52727e.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-8c362346.js.map +0 -1
- package/dist/crmbonus-component-wake/p-ac027576.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-ac1e7c32.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-ac1e7c32.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-b4f52f79.js +0 -2
- package/dist/crmbonus-component-wake/p-b4f52f79.js.map +0 -1
- package/dist/crmbonus-component-wake/p-df80d1b0.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-df80d1b0.entry.js.map +0 -1
- package/dist/esm/cart.helper-8c8d4a0a.js.map +0 -1
- package/dist/esm/index-bdb70d5a.js.map +0 -1
- package/dist/esm/info.config.helper-e4b8c478.js.map +0 -1
- package/dist/types/Users/Darlison/Projects/Bycoders/crmbonus/crmbonus-component/.stencil/env.d.ts +0 -2
package/dist/env.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../env.ts"],"names":[],"mappings":"AACA,mPAAmP;AACnP,MAAM,CAAC,MAAM,iBAAiB,GAAG,
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../env.ts"],"names":[],"mappings":"AACA,mPAAmP;AACnP,0FAA0F;AAC1F,MAAM,CAAC,MAAM,iBAAiB,GAAG,+BAA+B,CAAC,CAAC,+bAA+b;AACjgB,MAAM,CAAC,MAAM,kBAAkB,GAAG,uBAAuB,CAAA","sourcesContent":["\n// export const CRM_BONUS_API_URL = \"https://crmbonus-hub-staging-0ff7e3bf68ac.herokuapp.com/api\" //\"https://crmbonus-service-staging-d15ba5377115.herokuapp.com\"; //\"https://typically-workable-perch.ngrok-free.app\"; // \"http://localhost:3500\";\n// export const CRM_BONUS_API_URL = \"https://typically-workable-perch.ngrok-free.app/api\";\nexport const CRM_BONUS_API_URL = \"https://wake.crmbonus.com/api\"; //\"https://crmbonus-hub-staging-0ff7e3bf68ac.herokuapp.com/api\"// \"https://wake-middleware.crmbonus.com/api\"; //\"http://localhost:4000/api\";// \"https://wake-middleware.crmbonus.com/api\"; //\"https://wake-middleware.crmbonus.com/api\";// \"https://crmbonus-wake-hub-staging-5daedbc4e22b.herokuapp.com/api\" //\"https://crmbonus-service-staging-d15ba5377115.herokuapp.com\"; //\"https://typically-workable-perch.ngrok-free.app\"; // \"http://localhost:3500\";\nexport const CHECKOUT_CART_WAKE = \"http://localhost:3001\""]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-09314622.js';
|
2
2
|
|
3
3
|
const appModalCss = ".modal-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);display:none;justify-content:center;align-items:center;z-index:1000}.modal-backdrop.visible{display:flex}.modal{background:white;border-radius:8px;padding:1rem;max-width:500px;width:90%;box-shadow:0 2px 10px rgba(0, 0, 0, 0.3)}.modal-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;margin-bottom:1rem}.close-button{background:none;border:none;cursor:pointer}.modal-body{}";
|
4
4
|
const AppModalStyle0 = appModalCss;
|
@@ -14,7 +14,7 @@ const AppModal = class {
|
|
14
14
|
this.modalClosed.emit();
|
15
15
|
}
|
16
16
|
render() {
|
17
|
-
return (h("div", { key: '
|
17
|
+
return (h("div", { key: 'ca01fe665107339db0cbbd9d2304dcc962d23910', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, h("div", { key: '53a4a83cd2d734f674f298cf966d15d2218d1d88', class: "modal" }, h("div", { key: '63e41b5e61c2a5c962e71984af794c78b79aef60', class: "modal-header" }, h("h3", { key: '3b50ab8509e808135b12a9aea68b0aba64250501' }, this.modalTitle), h("button", { key: 'a213cb6387c66a2b0d012cef3c018aab90dae9af', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), h("div", { key: '907794b4afa37068bc2f2bdfd31d154a6f57859f', class: "modal-body" }, h("slot", { key: 'f20682d624021e33de0b484d2fbb2b675ae889a2' })))));
|
18
18
|
}
|
19
19
|
};
|
20
20
|
AppModal.style = AppModalStyle0;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"app-modal.entry.js","mappings":";;AAAA,MAAM,WAAW,GAAG,8gBAA8gB,CAAC;AACniB,uBAAe,WAAW;;MCMb,QAAQ;;;;sBAG0B,KAAK;;;IAQxC,UAAU;QACd,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;KAC3B;IAED,MAAM;QACF,QACI,4DAAK,KAAK,EAAE,kBAAkB,IAAI,CAAC,MAAM,GAAG,SAAS,GAAG,EAAE,EAAE,IACxD,4DAAK,KAAK,EAAC,OAAO,IACd,4DAAK,KAAK,EAAC,cAAc,IACrB,6DAAK,IAAI,CAAC,UAAU,CAAM,EAC1B,+DAAQ,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,aAEpD,CACP,EACN,4DAAK,KAAK,EAAC,YAAY,IACnB,8DAAQ,CACN,CACJ,CACJ,EACT;KACJ;;;;;;","names":[],"sources":["src/components/modal/app-modal.css?tag=app-modal&encapsulation=shadow","src/components/modal/app-modal.tsx"],"sourcesContent":[".modal-backdrop {\
|
1
|
+
{"file":"app-modal.entry.js","mappings":";;AAAA,MAAM,WAAW,GAAG,8gBAA8gB,CAAC;AACniB,uBAAe,WAAW;;MCMb,QAAQ;;;;sBAG0B,KAAK;;;IAQxC,UAAU;QACd,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;KAC3B;IAED,MAAM;QACF,QACI,4DAAK,KAAK,EAAE,kBAAkB,IAAI,CAAC,MAAM,GAAG,SAAS,GAAG,EAAE,EAAE,IACxD,4DAAK,KAAK,EAAC,OAAO,IACd,4DAAK,KAAK,EAAC,cAAc,IACrB,6DAAK,IAAI,CAAC,UAAU,CAAM,EAC1B,+DAAQ,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,aAEpD,CACP,EACN,4DAAK,KAAK,EAAC,YAAY,IACnB,8DAAQ,CACN,CACJ,CACJ,EACT;KACJ;;;;;;","names":[],"sources":["src/components/modal/app-modal.css?tag=app-modal&encapsulation=shadow","src/components/modal/app-modal.tsx"],"sourcesContent":[".modal-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n display: none;\n justify-content: center;\n align-items: center;\n z-index: 1000;\n }\n \n .modal-backdrop.visible {\n display: flex;\n }\n \n .modal {\n background: white;\n border-radius: 8px;\n padding: 1rem;\n max-width: 500px;\n width: 90%;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);\n }\n \n .modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid #ddd;\n margin-bottom: 1rem;\n }\n \n .close-button {\n background: none;\n border: none;\n /* font-size: 1.5rem; */\n cursor: pointer;\n }\n \n .modal-body {\n /* padding: 1rem 0; */\n }\n ","import { Component, Event, EventEmitter, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: 'app-modal',\n styleUrl: 'app-modal.css',\n shadow: true,\n})\nexport class AppModal {\n\n // Controle da visibilidade do modal\n @Prop({ reflect: true }) isOpen: boolean = false;\n\n // Título do modal\n @Prop() modalTitle: string;\n\n // Evento emitido ao fechar o modal\n @Event() modalClosed: EventEmitter<void>;\n\n private closeModal() {\n this.modalClosed.emit();\n }\n\n render() {\n return (\n <div class={`modal-backdrop ${this.isOpen ? 'visible' : ''}`}>\n <div class=\"modal\">\n <div class=\"modal-header\">\n <h3>{this.modalTitle}</h3>\n <button class=\"close-button\" onClick={() => this.closeModal()}>\n ×\n </button>\n </div>\n <div class=\"modal-body\">\n <slot />\n </div>\n </div>\n </div>\n )\n }\n}"],"version":3}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { r as registerInstance, h } from './index-09314622.js';
|
2
|
+
import { C as CrmBonusService } from './crmbonus.service-d83e6bb6.js';
|
3
|
+
|
4
|
+
const CrmBonus = class {
|
5
|
+
constructor(hostRef) {
|
6
|
+
registerInstance(this, hostRef);
|
7
|
+
this.storeName = 'bycoders';
|
8
|
+
this.crmBonusService = CrmBonusService.getInstance();
|
9
|
+
this.checkout = {};
|
10
|
+
}
|
11
|
+
async handlerToken() {
|
12
|
+
await this.crmBonusService.getToken(this.storeName);
|
13
|
+
}
|
14
|
+
componentDidLoad() {
|
15
|
+
this.handlerToken();
|
16
|
+
}
|
17
|
+
render() {
|
18
|
+
return (h("div", { key: 'cefc590c81f4de1a44fd67cbd599c6a5366f2ee7' }, h("bc-phone-form", { key: '126d01e0c4da26d9c2b56c74580eb2988fbc58ad', storeName: this.storeName }), h("bc-phone-validate-pin-form", { key: 'c08a9c81a1394deb787e5ff7b353aea596985a22', storeName: this.storeName })));
|
19
|
+
}
|
20
|
+
};
|
21
|
+
|
22
|
+
export { CrmBonus as bc_crmbonus };
|
23
|
+
|
24
|
+
//# sourceMappingURL=bc-crmbonus.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"bc-crmbonus.entry.js","mappings":";;;MAQa,QAAQ;;;QAEjB,cAAS,GAAG,UAAU,CAAA;QAEd,oBAAe,GAAG,eAAe,CAAC,WAAW,EAAE,CAAC;wBAEb,EAAE;;IAE7C,MAAM,YAAY;QACd,MAAM,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KACvD;IAED,gBAAgB;QACZ,IAAI,CAAC,YAAY,EAAE,CAAC;KACvB;IAGD,MAAM;QACF,QACI,8DACI,sEAAe,SAAS,EAAE,IAAI,CAAC,SAAS,GAAI,EAE5C,mFAA4B,SAAS,EAAE,IAAI,CAAC,SAAS,GAAI,CACvD,EACT;KACJ;;;;;","names":[],"sources":["src/components/crmbonus/crmbonus.tsx"],"sourcesContent":["import { Component, h, State } from \"@stencil/core\";\nimport { CrmBonusService } from \"../../services/crmbonus.service\";\nimport { ICheckoutDTO } from \"../../dto/checkout.dto\";\n\n@Component({\n tag: 'bc-crmbonus',\n shadow: true\n})\nexport class CrmBonus {\n\n storeName = 'bycoders'\n\n private crmBonusService = CrmBonusService.getInstance();\n\n @State() checkout: Partial<ICheckoutDTO> = {}\n\n async handlerToken() {\n await this.crmBonusService.getToken(this.storeName);\n }\n\n componentDidLoad() {\n this.handlerToken();\n }\n\n\n render() {\n return (\n <div>\n <bc-phone-form storeName={this.storeName} />\n\n <bc-phone-validate-pin-form storeName={this.storeName} />\n </div>\n )\n }\n}"],"version":3}
|
@@ -0,0 +1,328 @@
|
|
1
|
+
import { g as getRenderingRef, f as forceUpdate, r as registerInstance, c as createEvent, h } from './index-09314622.js';
|
2
|
+
import { C as CrmBonusService } from './crmbonus.service-d83e6bb6.js';
|
3
|
+
import { i as instance } from './i18n-b9d8b0cc.js';
|
4
|
+
|
5
|
+
const appendToMap = (map, propName, value) => {
|
6
|
+
const items = map.get(propName);
|
7
|
+
if (!items) {
|
8
|
+
map.set(propName, [value]);
|
9
|
+
}
|
10
|
+
else if (!items.includes(value)) {
|
11
|
+
items.push(value);
|
12
|
+
}
|
13
|
+
};
|
14
|
+
const debounce = (fn, ms) => {
|
15
|
+
let timeoutId;
|
16
|
+
return (...args) => {
|
17
|
+
if (timeoutId) {
|
18
|
+
clearTimeout(timeoutId);
|
19
|
+
}
|
20
|
+
timeoutId = setTimeout(() => {
|
21
|
+
timeoutId = 0;
|
22
|
+
fn(...args);
|
23
|
+
}, ms);
|
24
|
+
};
|
25
|
+
};
|
26
|
+
|
27
|
+
/**
|
28
|
+
* Check if a possible element isConnected.
|
29
|
+
* The property might not be there, so we check for it.
|
30
|
+
*
|
31
|
+
* We want it to return true if isConnected is not a property,
|
32
|
+
* otherwise we would remove these elements and would not update.
|
33
|
+
*
|
34
|
+
* Better leak in Edge than to be useless.
|
35
|
+
*/
|
36
|
+
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
37
|
+
const cleanupElements = debounce((map) => {
|
38
|
+
for (let key of map.keys()) {
|
39
|
+
map.set(key, map.get(key).filter(isConnected));
|
40
|
+
}
|
41
|
+
}, 2_000);
|
42
|
+
const stencilSubscription = () => {
|
43
|
+
if (typeof getRenderingRef !== 'function') {
|
44
|
+
// If we are not in a stencil project, we do nothing.
|
45
|
+
// This function is not really exported by @stencil/core.
|
46
|
+
return {};
|
47
|
+
}
|
48
|
+
const elmsToUpdate = new Map();
|
49
|
+
return {
|
50
|
+
dispose: () => elmsToUpdate.clear(),
|
51
|
+
get: (propName) => {
|
52
|
+
const elm = getRenderingRef();
|
53
|
+
if (elm) {
|
54
|
+
appendToMap(elmsToUpdate, propName, elm);
|
55
|
+
}
|
56
|
+
},
|
57
|
+
set: (propName) => {
|
58
|
+
const elements = elmsToUpdate.get(propName);
|
59
|
+
if (elements) {
|
60
|
+
elmsToUpdate.set(propName, elements.filter(forceUpdate));
|
61
|
+
}
|
62
|
+
cleanupElements(elmsToUpdate);
|
63
|
+
},
|
64
|
+
reset: () => {
|
65
|
+
elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
|
66
|
+
cleanupElements(elmsToUpdate);
|
67
|
+
},
|
68
|
+
};
|
69
|
+
};
|
70
|
+
|
71
|
+
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
72
|
+
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
73
|
+
const unwrappedState = unwrap(defaultState);
|
74
|
+
let states = new Map(Object.entries(unwrappedState ?? {}));
|
75
|
+
const handlers = {
|
76
|
+
dispose: [],
|
77
|
+
get: [],
|
78
|
+
set: [],
|
79
|
+
reset: [],
|
80
|
+
};
|
81
|
+
// Track onChange listeners to enable removeListener functionality
|
82
|
+
const changeListeners = new Map();
|
83
|
+
const reset = () => {
|
84
|
+
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
85
|
+
// otherwise, the state won't be properly reset
|
86
|
+
states = new Map(Object.entries(unwrap(defaultState) ?? {}));
|
87
|
+
handlers.reset.forEach((cb) => cb());
|
88
|
+
};
|
89
|
+
const dispose = () => {
|
90
|
+
// Call first dispose as resetting the state would
|
91
|
+
// cause less updates ;)
|
92
|
+
handlers.dispose.forEach((cb) => cb());
|
93
|
+
reset();
|
94
|
+
};
|
95
|
+
const get = (propName) => {
|
96
|
+
handlers.get.forEach((cb) => cb(propName));
|
97
|
+
return states.get(propName);
|
98
|
+
};
|
99
|
+
const set = (propName, value) => {
|
100
|
+
const oldValue = states.get(propName);
|
101
|
+
if (shouldUpdate(value, oldValue, propName)) {
|
102
|
+
states.set(propName, value);
|
103
|
+
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
104
|
+
}
|
105
|
+
};
|
106
|
+
const state = (typeof Proxy === 'undefined'
|
107
|
+
? {}
|
108
|
+
: new Proxy(unwrappedState, {
|
109
|
+
get(_, propName) {
|
110
|
+
return get(propName);
|
111
|
+
},
|
112
|
+
ownKeys(_) {
|
113
|
+
return Array.from(states.keys());
|
114
|
+
},
|
115
|
+
getOwnPropertyDescriptor() {
|
116
|
+
return {
|
117
|
+
enumerable: true,
|
118
|
+
configurable: true,
|
119
|
+
};
|
120
|
+
},
|
121
|
+
has(_, propName) {
|
122
|
+
return states.has(propName);
|
123
|
+
},
|
124
|
+
set(_, propName, value) {
|
125
|
+
set(propName, value);
|
126
|
+
return true;
|
127
|
+
},
|
128
|
+
}));
|
129
|
+
const on = (eventName, callback) => {
|
130
|
+
handlers[eventName].push(callback);
|
131
|
+
return () => {
|
132
|
+
removeFromArray(handlers[eventName], callback);
|
133
|
+
};
|
134
|
+
};
|
135
|
+
const onChange = (propName, cb) => {
|
136
|
+
const setHandler = (key, newValue) => {
|
137
|
+
if (key === propName) {
|
138
|
+
cb(newValue);
|
139
|
+
}
|
140
|
+
};
|
141
|
+
const resetHandler = () => cb(unwrap(defaultState)[propName]);
|
142
|
+
// Register the handlers
|
143
|
+
const unSet = on('set', setHandler);
|
144
|
+
const unReset = on('reset', resetHandler);
|
145
|
+
// Track the relationship between the user callback and internal handlers
|
146
|
+
changeListeners.set(cb, { setHandler, resetHandler, propName });
|
147
|
+
return () => {
|
148
|
+
unSet();
|
149
|
+
unReset();
|
150
|
+
changeListeners.delete(cb);
|
151
|
+
};
|
152
|
+
};
|
153
|
+
const use = (...subscriptions) => {
|
154
|
+
const unsubs = subscriptions.reduce((unsubs, subscription) => {
|
155
|
+
if (subscription.set) {
|
156
|
+
unsubs.push(on('set', subscription.set));
|
157
|
+
}
|
158
|
+
if (subscription.get) {
|
159
|
+
unsubs.push(on('get', subscription.get));
|
160
|
+
}
|
161
|
+
if (subscription.reset) {
|
162
|
+
unsubs.push(on('reset', subscription.reset));
|
163
|
+
}
|
164
|
+
if (subscription.dispose) {
|
165
|
+
unsubs.push(on('dispose', subscription.dispose));
|
166
|
+
}
|
167
|
+
return unsubs;
|
168
|
+
}, []);
|
169
|
+
return () => unsubs.forEach((unsub) => unsub());
|
170
|
+
};
|
171
|
+
const forceUpdate = (key) => {
|
172
|
+
const oldValue = states.get(key);
|
173
|
+
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
174
|
+
};
|
175
|
+
const removeListener = (propName, listener) => {
|
176
|
+
const listenerInfo = changeListeners.get(listener);
|
177
|
+
if (listenerInfo && listenerInfo.propName === propName) {
|
178
|
+
// Remove the specific handlers that were created for this listener
|
179
|
+
removeFromArray(handlers.set, listenerInfo.setHandler);
|
180
|
+
removeFromArray(handlers.reset, listenerInfo.resetHandler);
|
181
|
+
changeListeners.delete(listener);
|
182
|
+
}
|
183
|
+
};
|
184
|
+
return {
|
185
|
+
state,
|
186
|
+
get,
|
187
|
+
set,
|
188
|
+
on,
|
189
|
+
onChange,
|
190
|
+
use,
|
191
|
+
dispose,
|
192
|
+
reset,
|
193
|
+
forceUpdate,
|
194
|
+
removeListener,
|
195
|
+
};
|
196
|
+
};
|
197
|
+
const removeFromArray = (array, item) => {
|
198
|
+
const index = array.indexOf(item);
|
199
|
+
if (index >= 0) {
|
200
|
+
array[index] = array[array.length - 1];
|
201
|
+
array.length--;
|
202
|
+
}
|
203
|
+
};
|
204
|
+
|
205
|
+
const createStore = (defaultState, shouldUpdate) => {
|
206
|
+
const map = createObservableMap(defaultState, shouldUpdate);
|
207
|
+
map.use(stencilSubscription());
|
208
|
+
return map;
|
209
|
+
};
|
210
|
+
|
211
|
+
const { state, onChange } = createStore({
|
212
|
+
storeConfig: {
|
213
|
+
btnApplyBonusLabel: 'Avançar',
|
214
|
+
confirmationMessage: '',
|
215
|
+
giftbackTitle: 'giftback',
|
216
|
+
keepStoreFrontStyle: false
|
217
|
+
},
|
218
|
+
checkout: {
|
219
|
+
cellphone: null,
|
220
|
+
checkoutId: '',
|
221
|
+
checkoutProducts: [],
|
222
|
+
crmbonuStoreId: null,
|
223
|
+
crmbonusUserId: null,
|
224
|
+
storeName: ''
|
225
|
+
},
|
226
|
+
clicks: 0,
|
227
|
+
seconds: 0,
|
228
|
+
squaredClicks: 0
|
229
|
+
});
|
230
|
+
onChange('clicks', value => {
|
231
|
+
state.squaredClicks = value ** 2;
|
232
|
+
});
|
233
|
+
|
234
|
+
const stylesScss$1 = ".phone-form{display:flex;flex-direction:column;gap:12px}";
|
235
|
+
const BcPhoneFormStyle0 = stylesScss$1;
|
236
|
+
|
237
|
+
const PhoneForm = class {
|
238
|
+
constructor(hostRef) {
|
239
|
+
registerInstance(this, hostRef);
|
240
|
+
this.actionError = createEvent(this, "actionError", 7);
|
241
|
+
this.crmbonusService = CrmBonusService.getInstance();
|
242
|
+
this.loading = false;
|
243
|
+
this.storeName = '';
|
244
|
+
}
|
245
|
+
async handlerPhone() {
|
246
|
+
this.loading = true;
|
247
|
+
try {
|
248
|
+
const phoneMask = await this.phoneInputMask.getPhone();
|
249
|
+
const phone = phoneMask.replace(/\D/g, '');
|
250
|
+
const send = await this.crmbonusService.sendPin(Number(phone), '', this.storeName);
|
251
|
+
state.checkout.cellphone = Number(phone);
|
252
|
+
state.checkout.crmbonuStoreId = send.storeId;
|
253
|
+
state.checkout.crmbonusUserId = send.userId;
|
254
|
+
}
|
255
|
+
catch (error) {
|
256
|
+
this.actionError.emit({
|
257
|
+
message: error.message
|
258
|
+
});
|
259
|
+
}
|
260
|
+
finally {
|
261
|
+
this.loading = false;
|
262
|
+
}
|
263
|
+
}
|
264
|
+
render() {
|
265
|
+
return (h("div", { key: 'b14641104823437a9ab8d358b9326163b86a1c2e', class: "phone-form" }, h("span", { key: '0c6aca3e25b12f651402086bff2405de112d47ca' }, "Digite o seu celular para verificar se h\u00E1 desconto dispon\u00EDvel nessa compra:"), h("phone-input-mask", { key: '3362b63ed0afcda46a2ec82784786ab3ce139969', ref: ref => this.phoneInputMask = ref }), h("crm-button", { key: '4dfc4e036d8689cbde15edce49b9f71ad73748c3', loading: this.loading, txtBtn: "Avan\u00E7ar", handleClick: () => this.handlerPhone() })));
|
266
|
+
}
|
267
|
+
};
|
268
|
+
PhoneForm.style = BcPhoneFormStyle0;
|
269
|
+
|
270
|
+
const stylesScss = ":host{display:block}.form-container-pin{display:flex;flex-direction:column;align-items:center}.pin-container{display:flex;justify-content:start;gap:10px}.pin-container input{width:100%;height:48px;text-align:center;border:1px solid #ccc;border-radius:5px}button{padding:10px 20px;background-color:#ddd;border:none;border-radius:5px;cursor:pointer}.success{color:green;margin-top:10px}.button{top:50%;background-color:#6c6c7e;color:#fff;border:none;border-radius:10px;padding:15px;min-height:30px;min-width:120px;cursor:pointer}.button-cancel{top:50%;background-color:#ffffff;color:#1e1c1c;border:1px solid gray;border-radius:10px;padding:10px;min-height:30px;min-width:120px;cursor:pointer}.crm-description{width:100%;display:flex;gap:9px;flex-wrap:wrap}.crm-description a{font-weight:bold;cursor:pointer;text-decoration:underline}.crm-description div{display:flex;gap:5px}";
|
271
|
+
const BcPhoneValidatePinFormStyle0 = stylesScss;
|
272
|
+
|
273
|
+
const PhoneValidatePinForm = class {
|
274
|
+
constructor(hostRef) {
|
275
|
+
registerInstance(this, hostRef);
|
276
|
+
this.crmbonusService = CrmBonusService.getInstance();
|
277
|
+
this.storeName = '';
|
278
|
+
this.phone = undefined;
|
279
|
+
this.cancel = undefined;
|
280
|
+
this.pin = ['', '', '', ''];
|
281
|
+
this.isVerified = false;
|
282
|
+
this.canResend = false;
|
283
|
+
this.loading = false;
|
284
|
+
}
|
285
|
+
handleInput(event, index) {
|
286
|
+
const input = event.target;
|
287
|
+
const value = input.value.slice(0, 1); // Limitar a um único dígito
|
288
|
+
this.pin[index] = value;
|
289
|
+
// Focar no próximo campo, se possível
|
290
|
+
if (value && index < this.pin.length - 1) {
|
291
|
+
const nextInput = input.nextElementSibling;
|
292
|
+
nextInput === null || nextInput === void 0 ? void 0 : nextInput.focus();
|
293
|
+
}
|
294
|
+
this.pin = [...this.pin];
|
295
|
+
}
|
296
|
+
async handleResend() {
|
297
|
+
// await this.resend();
|
298
|
+
this.canResend = false;
|
299
|
+
this.pin = ['', '', '', ''];
|
300
|
+
}
|
301
|
+
buildTime() {
|
302
|
+
const resendDate = localStorage.getItem("bc:resend");
|
303
|
+
if (resendDate) {
|
304
|
+
return resendDate;
|
305
|
+
}
|
306
|
+
const date = new Date();
|
307
|
+
date.setSeconds(date.getSeconds() + 30);
|
308
|
+
localStorage.setItem("bc:resend", date.toString());
|
309
|
+
return date.toString();
|
310
|
+
}
|
311
|
+
handleTimeout() {
|
312
|
+
localStorage.removeItem("bc:resend");
|
313
|
+
this.canResend = true;
|
314
|
+
}
|
315
|
+
validatePin() {
|
316
|
+
console.log('[x][STORE]', state.checkout);
|
317
|
+
// this.crmbonusService.validatePinBonus()
|
318
|
+
}
|
319
|
+
render() {
|
320
|
+
var _a;
|
321
|
+
return (h("div", { key: '0ba777997120acd11e83043f3450bf7288cb5665', class: "crm-phone-form" }, h("label", { key: '75d3ba7803982927d14da4f99c84a1e1cb4a827e', class: "crm-subtitle" }, instance.t('pin-sutitle'), " ", h("strong", { key: '04042da34bb9b90822187bc5f3d03dd309cc87d0' }, "+55 ", this.phone)), h("div", { key: '8250a29967cacc8eb0c9a00dab6e3e59280e5870', 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: 'df1e2e9cc3033ee760ae1bf607e311e0038743cb' }), h("p", { key: 'beeea228c5c108588f38f64052cffed424ff7539', class: "crm-description" }, " N\u00E3o recebeu?", !this.canResend && h("label", { key: 'b304f40425994ddfc905ab3b0c18db738b8a2d3b' }, " Reenviar em", h("countdown-timer", { key: '776f50ddc79cd0813aa49dfa236a955aa5994b7c', minutos: 0, segundos: 30, dataCriacao: this.buildTime(), downtime: () => this.handleTimeout() }), " "), this.canResend && (h("div", { key: '02a4d05b7c15097881cece7752a36671d29162db' }, h("a", { key: 'b6bd0961dc687b8c4f601c668b0ba2cdfa83a339', onClick: () => this.handleResend() }, "Reenviar"), h("a", { key: 'd348c9fe25a728b098b8ef2359a724c9b2956e98', onClick: () => this.cancel() }, "Trocar n\u00FAmero")))), h("crm-button", { key: '0382610ed7d6a7fda3f8851e30e3852320e2ff23', txtBtn: ((_a = state === null || state === void 0 ? void 0 : state.storeConfig) === null || _a === void 0 ? void 0 : _a.btnApplyBonusLabel) || "Avançar", loading: this.loading, handleClick: () => this.validatePin() })));
|
322
|
+
}
|
323
|
+
};
|
324
|
+
PhoneValidatePinForm.style = BcPhoneValidatePinFormStyle0;
|
325
|
+
|
326
|
+
export { PhoneForm as bc_phone_form, PhoneValidatePinForm as bc_phone_validate_pin_form };
|
327
|
+
|
328
|
+
//# sourceMappingURL=bc-phone-form_2.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"bc-phone-form.bc-phone-validate-pin-form.entry.js","mappings":";;;;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AACnC,KAAK;AACL,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1B,KAAK;AACL,CAAC,CAAC;AACF,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;AAC7B,IAAI,IAAI,SAAS,CAAC;AAClB,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK;AACxB,QAAQ,IAAI,SAAS,EAA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G7C;IAED,MAAM;;QACF,QACI,4DAAK,KAAK,EAAC,gBAAgB,IACvB,8DAAO,KAAK,EAAC,cAAc,IAAGC,QAAO,CAAC,CAAC,CAAC,aAAa,CAAC,OAAE,yEAAa,IAAI,CAAC,KAAK,CAAU,CAAQ,EACjG,4DAAK,KAAK,EAAC,eAAe,IACrB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,MACnB,aACI,IAAI,EAAC,MAAM,EACX,SAAS,EAAE,CAAC,EACZ,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EACtB,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,GACpD,CACL,CAAC,CACA,EAEN,8DAAa,EAEb,0DAAG,KAAK,EAAC,iBAAiB,0BAElB,CAAC,IAAI,CAAC,SAAS,IAAI,gFACf,wEAAiB,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,GAAI,MAAS,EAG/H,IAAI,CAAC,SAAS,KACV,8DACI,0DAAG,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,eAAc,EACnD,0DAAG,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,yBAAmB,CAChD,CACT,CAEL,EACJ,mEAAY,MAAM,EAAE,CAAA,MAAAD,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAE,WAAW,0CAAE,kBAAkB,KAAI,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,GAAI,CACtI,EACT;KACL;;;;;;","names":["stylesScss","store","i18next"],"sources":["node_modules/@stencil/store/dist/index.js","store.ts","src/components/crmbonus/subcomponents/phone-form/styles.scss?tag=bc-phone-form&encapsulation=shadow","src/components/crmbonus/subcomponents/phone-form/index.tsx","src/components/crmbonus/subcomponents/phone-validate/styles.scss?tag=bc-phone-validate-pin-form&encapsulation=shadow","src/components/crmbonus/subcomponents/phone-validate/index.tsx"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2_000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState ?? {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n // Track onChange listeners to enable removeListener functionality\n const changeListeners = new Map();\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(unwrap(defaultState) ?? {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const setHandler = (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n };\n const resetHandler = () => cb(unwrap(defaultState)[propName]);\n // Register the handlers\n const unSet = on('set', setHandler);\n const unReset = on('reset', resetHandler);\n // Track the relationship between the user callback and internal handlers\n changeListeners.set(cb, { setHandler, resetHandler, propName });\n return () => {\n unSet();\n unReset();\n changeListeners.delete(cb);\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n const removeListener = (propName, listener) => {\n const listenerInfo = changeListeners.get(listener);\n if (listenerInfo && listenerInfo.propName === propName) {\n // Remove the specific handlers that were created for this listener\n removeFromArray(handlers.set, listenerInfo.setHandler);\n removeFromArray(handlers.reset, listenerInfo.resetHandler);\n changeListeners.delete(listener);\n }\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n removeListener,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from \"@stencil/store\";\n\nimport { IInfoStore } from \"./src/helpers/info.config.helper\";\nimport { ICheckoutDTO } from \"./src/dto/checkout.dto\";\n\n\ninterface IStoreCheckout {\n clicks: number;\n squaredClicks: number;\n seconds: number;\n storeConfig: IInfoStore;\n checkout: ICheckoutDTO;\n}\n\nconst { state, onChange } = createStore<IStoreCheckout>({\n storeConfig: {\n btnApplyBonusLabel: 'Avançar',\n confirmationMessage: '',\n giftbackTitle: 'giftback',\n keepStoreFrontStyle: false\n },\n checkout: {\n cellphone: null,\n checkoutId: '',\n checkoutProducts: [],\n crmbonuStoreId: null,\n crmbonusUserId: null,\n storeName: ''\n },\n clicks: 0,\n seconds: 0,\n squaredClicks: 0\n});\n\nonChange('clicks', value => {\n state.squaredClicks = value ** 2;\n});\n\nexport default state;",".phone-form {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}","import { Component, Event, EventEmitter, h, Prop, State } from \"@stencil/core\";\nimport { CrmBonusService } from \"../../../../services/crmbonus.service\";\n\nimport store from '../../../../../store';\n\n@Component({\n tag: 'bc-phone-form',\n shadow: true,\n styleUrl: 'styles.scss'\n})\nexport class PhoneForm {\n\n private phoneInputMask: HTMLPhoneInputMaskElement;\n\n crmbonusService = CrmBonusService.getInstance();\n\n @State() loading = false;\n\n @Prop() storeName = '';\n\n @Event() actionError: EventEmitter<Partial<{ message: string }>>;\n\n async handlerPhone() {\n this.loading = true;\n try {\n const phoneMask = await this.phoneInputMask.getPhone();\n const phone = phoneMask.replace(/\\D/g, '');\n const send = await this.crmbonusService.sendPin(Number(phone), '', this.storeName);\n\n store.checkout.cellphone = Number(phone);\n store.checkout.crmbonuStoreId = send.storeId;\n store.checkout.crmbonusUserId = send.userId;\n\n } catch (error) {\n this.actionError.emit({\n message: error.message\n });\n } finally {\n this.loading = false;\n }\n }\n\n render() {\n return (\n <div class=\"phone-form\">\n <span>Digite o seu celular para verificar se há desconto disponível nessa compra:</span>\n <phone-input-mask ref={ref => this.phoneInputMask = ref} />\n <crm-button loading={this.loading} txtBtn=\"Avançar\" handleClick={() => this.handlerPhone()} />\n </div>\n )\n }\n}",":host {\n display: block;\n}\n\n.form-container-pin {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.pin-container {\n display: flex;\n /* margin: 26px 0; */\n justify-content: start;\n gap: 10px;\n}\n\n.pin-container input {\n width: 100%;\n height: 48px;\n /* font-size: 14px; */\n text-align: center;\n border: 1px solid #ccc;\n border-radius: 5px;\n}\n\nbutton {\n padding: 10px 20px;\n background-color: #ddd;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n}\n\n\n.success {\n color: green;\n margin-top: 10px;\n}\n\n.button {\n top: 50%;\n background-color: #6c6c7e;\n color: #fff;\n border: none;\n border-radius: 10px;\n padding: 15px;\n min-height: 30px;\n min-width: 120px;\n /* font-size: 20px; */\n cursor: pointer;\n}\n\n.button-cancel {\n top: 50%;\n background-color: #ffffff;\n color: #1e1c1c;\n border: 1px solid gray;\n border-radius: 10px;\n padding: 10px;\n min-height: 30px;\n min-width: 120px;\n /* font-size: 19px; */\n cursor: pointer;\n}\n\n.crm-description {\n /* font-size: 14px; */\n width: 100%;\n display: flex;\n gap: 9px;\n flex-wrap: wrap;\n}\n\n.crm-description a {\n font-weight: bold;\n cursor: pointer;\n text-decoration: underline;\n}\n\n.crm-description div {\n display: flex;\n gap: 5px;\n}","import { Component, h, Prop, State } from \"@stencil/core\";\n\nimport i18next from '../../../../i18n/i18n'\nimport store from '../../../../../store';\nimport { CrmBonusService } from \"../../../../services/crmbonus.service\";\n\n@Component({\n tag: 'bc-phone-validate-pin-form',\n shadow: true,\n styleUrl: 'styles.scss'\n})\nexport class PhoneValidatePinForm {\n\n crmbonusService = CrmBonusService.getInstance();\n\n @Prop() storeName: string = '';\n @Prop() phone: number;\n @Prop() cancel: () => void;\n\n @State() pin: string[] = ['', '', '', ''];\n @State() isVerified: boolean = false;\n @State() canResend: boolean = false;\n @State() loading = false;\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 async handleResend() {\n // await this.resend();\n\n this.canResend = false;\n this.pin = ['', '', '', ''];\n }\n\n buildTime() {\n const resendDate = localStorage.getItem(\"bc:resend\");\n\n if(resendDate) {\n return resendDate;\n }\n\n const date = new Date();\n date.setSeconds(date.getSeconds() + 30);\n localStorage.setItem(\"bc:resend\", date.toString());\n\n return date.toString();\n }\n\n handleTimeout() {\n localStorage.removeItem(\"bc:resend\")\n this.canResend = true;\n }\n\n validatePin() {\n console.log('[x][STORE]', store.checkout);\n\n // this.crmbonusService.validatePinBonus()\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\n <countdown-timer minutos={0} segundos={30} dataCriacao={this.buildTime()} 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={store?.storeConfig?.btnApplyBonusLabel || \"Avançar\"} loading={this.loading} handleClick={() => this.validatePin()} />\n </div >\n );\n }\n}"],"version":3}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { r as registerInstance, h } from './index-09314622.js';
|
2
|
+
|
3
|
+
const WakeCrmbonus = class {
|
4
|
+
constructor(hostRef) {
|
5
|
+
registerInstance(this, hostRef);
|
6
|
+
}
|
7
|
+
render() {
|
8
|
+
return (h("bc-crmbonus", { key: '06d56d19fbe0d101409c44517b70ad8281ce8edb' }));
|
9
|
+
}
|
10
|
+
};
|
11
|
+
|
12
|
+
export { WakeCrmbonus as bc_wake_crmbonus };
|
13
|
+
|
14
|
+
//# sourceMappingURL=bc-wake-crmbonus.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"bc-wake-crmbonus.entry.js","mappings":";;MAKa,YAAY;;;;IAErB,MAAM;QACF,QACI,qEAAe,EAClB;KACJ;;;;;","names":[],"sources":["src/platforms/wake/index.tsx"],"sourcesContent":["import { Component, h } from \"@stencil/core\";\n\n@Component({\n tag: 'bc-wake-crmbonus'\n})\nexport class WakeCrmbonus {\n\n render() {\n return (\n <bc-crmbonus />\n )\n }\n}"],"version":3}
|