crmbonus-component-wake 2.1.30-ngrok → 2.1.31-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/dist/cjs/app-modal.cjs.entry.js +1 -1
- package/dist/cjs/{build.payload.helper-c35bd233.js → build.payload.helper-b93f7ea5.js} +13 -13
- package/dist/cjs/build.payload.helper-b93f7ea5.js.map +1 -0
- package/dist/{esm/crmbonus.service-4c05689c.js → cjs/cart.helper-b08a12b2.js} +123 -3
- package/dist/cjs/cart.helper-b08a12b2.js.map +1 -0
- package/dist/cjs/countdown-timer-v2.cjs.entry.js +1 -1
- package/dist/cjs/countdown-timer_2.cjs.entry.js +2 -2
- package/dist/cjs/crm-bonus-2.cjs.entry.js +284 -0
- package/dist/cjs/crm-bonus-2.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-bonus-note.cjs.entry.js +8 -10
- 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.cjs.entry.js +8 -257
- package/dist/cjs/crm-bonus.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-giftback-form.cjs.entry.js +24 -26
- package/dist/cjs/crm-giftback-form.cjs.entry.js.map +1 -1
- package/dist/cjs/{crm-tooltip_4.cjs.entry.js → crm-tooltip_5.cjs.entry.js} +65 -14
- package/dist/cjs/crm-tooltip_5.cjs.entry.js.map +1 -0
- package/dist/cjs/crmbonus-component-wake.cjs.js +1 -1
- package/dist/{esm/i18n-b9d8b0cc.js → cjs/i18n-1ce6cb94.js} +23 -2
- package/dist/cjs/i18n-1ce6cb94.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-container.cjs.entry.js +1 -1
- package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/pedido-finalizado.cjs.entry.js +3 -4
- package/dist/cjs/pedido-finalizado.cjs.entry.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -7
- package/dist/collection/components/button/index.js +1 -1
- package/dist/collection/components/countdown-timer/countdown-timer.js +1 -1
- package/dist/collection/components/countdown-timer/countdown-timer.v2.js +1 -1
- package/dist/collection/components/crm-bonus/crm-bonus.js +7 -3
- package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
- package/dist/collection/components/crm-bonus/crmbonus.js +38 -0
- package/dist/collection/components/crm-bonus/crmbonus.js.map +1 -0
- package/dist/collection/components/giftback-form/giftback-form.js +5 -5
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js +5 -5
- package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js +1 -1
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js +1 -1
- package/dist/collection/components/loading-container/loading-container.js +1 -1
- package/dist/collection/components/loading-spinner/loading-spinner.js +1 -1
- package/dist/collection/components/modal/app-modal.js +1 -1
- package/dist/collection/components/note/crm-bonus-note.js +1 -1
- package/dist/collection/components/pedido/pedido.js +1 -1
- package/dist/collection/components/phone/phone-input-mask.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/collection/dto/reserved-info.dto.js.map +1 -1
- package/dist/collection/helpers/build.payload.helper.js +12 -12
- package/dist/collection/helpers/build.payload.helper.js.map +1 -1
- package/dist/collection/objectvalues/cart.wake.js +23 -23
- package/dist/collection/objectvalues/cart.wake.js.map +1 -1
- package/dist/collection/tray-ecommerce/crm-bonus-tray.js +1 -1
- package/dist/components/app-modal.js +1 -1
- package/dist/components/countdown-timer-v2.js +1 -1
- package/dist/components/countdown-timer.js +1 -1
- package/dist/components/{name-input.d.ts → crm-bonus-2.d.ts} +4 -4
- package/dist/components/crm-bonus-2.js +379 -0
- package/dist/components/crm-bonus-2.js.map +1 -0
- package/dist/components/crm-bonus-note.js +4 -5
- package/dist/components/crm-bonus-note.js.map +1 -1
- package/dist/components/crm-bonus-tray.js +1 -1
- package/dist/components/crm-bonus.js +11 -330
- 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/loading-container.js +1 -1
- package/dist/components/loading-spinner.js +1 -1
- package/dist/components/{p-1ea9924f.js → p-0a5e4aca.js} +123 -11
- package/dist/components/p-0a5e4aca.js.map +1 -0
- package/dist/components/{p-eb1f4328.js → p-11520f0f.js} +2 -2
- package/dist/components/{p-eb1f4328.js.map → p-11520f0f.js.map} +1 -1
- package/dist/components/{p-a3f4244f.js → p-4c7e066c.js} +13 -13
- package/dist/components/p-4c7e066c.js.map +1 -0
- package/dist/components/{p-53037d16.js → p-78fbe33d.js} +15 -16
- package/dist/components/p-78fbe33d.js.map +1 -0
- package/dist/components/{p-285d0caf.js → p-890dc5d5.js} +2 -2
- package/dist/components/{p-285d0caf.js.map → p-890dc5d5.js.map} +1 -1
- package/dist/components/{p-86dfe7ca.js → p-8fda6382.js} +5 -5
- package/dist/components/{p-86dfe7ca.js.map → p-8fda6382.js.map} +1 -1
- package/dist/components/{p-b86c93cc.js → p-bc930dfe.js} +3 -3
- package/dist/components/{p-b86c93cc.js.map → p-bc930dfe.js.map} +1 -1
- package/dist/components/{p-6b1f5521.js → p-c5be72a0.js} +2 -2
- package/dist/components/{p-6b1f5521.js.map → p-c5be72a0.js.map} +1 -1
- package/dist/components/{p-09048b73.js → p-ce77a841.js} +2 -2
- package/dist/components/{p-09048b73.js.map → p-ce77a841.js.map} +1 -1
- package/dist/components/{p-5210a82f.js → p-ee1c025b.js} +5 -5
- package/dist/components/{p-5210a82f.js.map → p-ee1c025b.js.map} +1 -1
- package/dist/components/{p-e31b6c28.js → p-f1823a52.js} +2 -2
- package/dist/components/{p-e31b6c28.js.map → p-f1823a52.js.map} +1 -1
- package/dist/components/{p-96e16ba5.js → p-fedabc25.js} +9 -10
- package/dist/components/p-fedabc25.js.map +1 -0
- package/dist/components/pedido-finalizado.js +2 -3
- 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/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-3e87e176.entry.js +2 -0
- package/dist/crmbonus-component-wake/{p-d1468887.entry.js.map → p-3e87e176.entry.js.map} +1 -1
- package/dist/crmbonus-component-wake/p-4c7e066c.js +2 -0
- package/dist/crmbonus-component-wake/p-4c7e066c.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-e5d8700b.entry.js → p-54b8f32b.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-558202ef.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-558202ef.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-61ea41c9.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-6532623f.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-702d5a6f.js +2 -0
- package/dist/crmbonus-component-wake/p-702d5a6f.js.map +1 -0
- package/dist/crmbonus-component-wake/p-9b7bd1e1.entry.js +2 -0
- package/dist/crmbonus-component-wake/{p-2eb4e832.entry.js.map → p-9b7bd1e1.entry.js.map} +1 -1
- package/dist/crmbonus-component-wake/{p-427c86db.entry.js → p-9d926857.entry.js} +2 -2
- package/dist/crmbonus-component-wake/{p-39abc114.entry.js → p-ac027576.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-b928333a.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-b928333a.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c54d706c.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-c54d706c.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-1ea9924f.js → p-c74567c6.js} +2 -2
- package/dist/crmbonus-component-wake/p-c74567c6.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-9a32f685.entry.js → p-ce2819cc.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-f37f3f3f.entry.js +2 -0
- package/dist/crmbonus-component-wake/{p-f4c65b63.entry.js.map → p-f37f3f3f.entry.js.map} +1 -1
- package/dist/env.js +2 -1
- package/dist/env.js.map +1 -1
- package/dist/esm/app-modal.entry.js +1 -1
- package/dist/esm/{build.payload.helper-c425c0cc.js → build.payload.helper-caf0a82b.js} +13 -13
- package/dist/esm/build.payload.helper-caf0a82b.js.map +1 -0
- package/dist/{cjs/crmbonus.service-4b03eaf1.js → esm/cart.helper-7101c047.js} +115 -8
- package/dist/esm/cart.helper-7101c047.js.map +1 -0
- package/dist/esm/countdown-timer-v2.entry.js +1 -1
- package/dist/esm/countdown-timer_2.entry.js +2 -2
- package/dist/esm/crm-bonus-2.entry.js +280 -0
- package/dist/esm/crm-bonus-2.entry.js.map +1 -0
- package/dist/esm/crm-bonus-note.entry.js +4 -6
- 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.entry.js +8 -257
- package/dist/esm/crm-bonus.entry.js.map +1 -1
- package/dist/esm/crm-giftback-form.entry.js +7 -9
- package/dist/esm/crm-giftback-form.entry.js.map +1 -1
- package/dist/esm/{crm-tooltip_4.entry.js → crm-tooltip_5.entry.js} +63 -13
- package/dist/esm/crm-tooltip_5.entry.js.map +1 -0
- package/dist/esm/crmbonus-component-wake.js +1 -1
- package/dist/{cjs/i18n-defaa4f8.js → esm/i18n-7938fb86.js} +18 -3
- package/dist/esm/i18n-7938fb86.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-container.entry.js +1 -1
- package/dist/esm/loading-spinner.entry.js +1 -1
- package/dist/esm/pedido-finalizado.entry.js +2 -3
- package/dist/esm/pedido-finalizado.entry.js.map +1 -1
- package/dist/types/Users/Darlison/Projects/Bycoders/crmbonus/crmbonus-component/.stencil/env.d.ts +1 -1
- package/dist/types/components/crm-bonus/crm-bonus.d.ts +1 -0
- package/dist/types/components/crm-bonus/crmbonus.d.ts +8 -0
- package/dist/types/components.d.ts +15 -152
- package/dist/types/objectvalues/cart.wake.d.ts +0 -2
- package/package.json +1 -1
- package/dist/cjs/build.payload.helper-c35bd233.js.map +0 -1
- package/dist/cjs/cart.helper-19c17c95.js +0 -120
- package/dist/cjs/cart.helper-19c17c95.js.map +0 -1
- package/dist/cjs/crm-bonus-form.cjs.entry.js +0 -103
- package/dist/cjs/crm-bonus-form.cjs.entry.js.map +0 -1
- package/dist/cjs/crm-tooltip_4.cjs.entry.js.map +0 -1
- package/dist/cjs/crmbonus.service-4b03eaf1.js.map +0 -1
- package/dist/cjs/giftback-finish_4.cjs.entry.js +0 -131
- package/dist/cjs/giftback-finish_4.cjs.entry.js.map +0 -1
- package/dist/cjs/i18n-defaa4f8.js.map +0 -1
- package/dist/cjs/index-7a7d7882.js +0 -23
- package/dist/cjs/index-7a7d7882.js.map +0 -1
- package/dist/cjs/phone-cancel-input.cjs.entry.js +0 -25
- package/dist/cjs/phone-cancel-input.cjs.entry.js.map +0 -1
- package/dist/cjs/phone-input-mask.cjs.entry.js +0 -61
- package/dist/cjs/phone-input-mask.cjs.entry.js.map +0 -1
- package/dist/cjs/phone-input.cjs.entry.js +0 -25
- package/dist/cjs/phone-input.cjs.entry.js.map +0 -1
- package/dist/collection/components/_crm-bonus-form/crm-bonus-form.css +0 -18
- package/dist/collection/components/_crm-bonus-form/crm-bonus-form.js +0 -348
- package/dist/collection/components/_crm-bonus-form/crm-bonus-form.js.map +0 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-finish/giftback-finish.css +0 -9
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js +0 -20
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js.map +0 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-pin/giftback-pin.css +0 -69
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js +0 -126
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js.map +0 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-progress/giftback-progress.css +0 -109
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js +0 -127
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js.map +0 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/name-input/name-input.css +0 -108
- package/dist/collection/components/_crm-bonus-form/subcomponents/name-input/name-input.js +0 -111
- package/dist/collection/components/_crm-bonus-form/subcomponents/name-input/name-input.js.map +0 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/phone/phone.input.js +0 -76
- package/dist/collection/components/_crm-bonus-form/subcomponents/phone/phone.input.js.map +0 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js +0 -76
- package/dist/collection/components/_crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js.map +0 -1
- package/dist/components/crm-bonus-form.d.ts +0 -11
- package/dist/components/crm-bonus-form.js +0 -165
- package/dist/components/crm-bonus-form.js.map +0 -1
- package/dist/components/giftback-finish.d.ts +0 -11
- package/dist/components/giftback-finish.js +0 -8
- package/dist/components/giftback-finish.js.map +0 -1
- package/dist/components/giftback-pin.d.ts +0 -11
- package/dist/components/giftback-pin.js +0 -8
- package/dist/components/giftback-pin.js.map +0 -1
- package/dist/components/giftback-progress.d.ts +0 -11
- package/dist/components/giftback-progress.js +0 -8
- package/dist/components/giftback-progress.js.map +0 -1
- package/dist/components/name-input.js +0 -8
- package/dist/components/name-input.js.map +0 -1
- package/dist/components/p-1ea9924f.js.map +0 -1
- package/dist/components/p-234f35c4.js +0 -69
- package/dist/components/p-234f35c4.js.map +0 -1
- package/dist/components/p-53037d16.js.map +0 -1
- package/dist/components/p-56455824.js +0 -115
- package/dist/components/p-56455824.js.map +0 -1
- package/dist/components/p-6ff4aa18.js +0 -73
- package/dist/components/p-6ff4aa18.js.map +0 -1
- package/dist/components/p-8e6146ae.js +0 -63
- package/dist/components/p-8e6146ae.js.map +0 -1
- package/dist/components/p-96e16ba5.js.map +0 -1
- package/dist/components/p-a3f4244f.js.map +0 -1
- package/dist/components/p-f09b7364.js +0 -36
- package/dist/components/p-f09b7364.js.map +0 -1
- package/dist/components/phone-cancel-input.d.ts +0 -11
- package/dist/components/phone-cancel-input.js +0 -56
- package/dist/components/phone-cancel-input.js.map +0 -1
- package/dist/components/phone-input.d.ts +0 -11
- package/dist/components/phone-input.js +0 -56
- package/dist/components/phone-input.js.map +0 -1
- package/dist/crmbonus-component-wake/p-1ea9924f.js.map +0 -1
- package/dist/crmbonus-component-wake/p-2bd29eae.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-2eb4e832.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-56455824.js +0 -2
- package/dist/crmbonus-component-wake/p-56455824.js.map +0 -1
- package/dist/crmbonus-component-wake/p-6d5bd437.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-6d5bd437.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-6e06f860.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-6e06f860.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-74335744.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-74335744.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-a3f4244f.js +0 -2
- package/dist/crmbonus-component-wake/p-a3f4244f.js.map +0 -1
- package/dist/crmbonus-component-wake/p-a4bf9fe7.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-b9580758.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-b9580758.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-b9baad26.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-b9baad26.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-c1f5759a.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-c1f5759a.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-c53241bf.js +0 -2
- package/dist/crmbonus-component-wake/p-c53241bf.js.map +0 -1
- package/dist/crmbonus-component-wake/p-d1468887.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-ecc51430.js +0 -2
- package/dist/crmbonus-component-wake/p-ecc51430.js.map +0 -1
- package/dist/crmbonus-component-wake/p-f4c65b63.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-f9d8175f.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-f9d8175f.entry.js.map +0 -1
- package/dist/esm/build.payload.helper-c425c0cc.js.map +0 -1
- package/dist/esm/cart.helper-8a2086c0.js +0 -115
- package/dist/esm/cart.helper-8a2086c0.js.map +0 -1
- package/dist/esm/crm-bonus-form.entry.js +0 -99
- package/dist/esm/crm-bonus-form.entry.js.map +0 -1
- package/dist/esm/crm-tooltip_4.entry.js.map +0 -1
- package/dist/esm/crmbonus.service-4c05689c.js.map +0 -1
- package/dist/esm/giftback-finish_4.entry.js +0 -124
- package/dist/esm/giftback-finish_4.entry.js.map +0 -1
- package/dist/esm/i18n-b9d8b0cc.js.map +0 -1
- package/dist/esm/index-dc3ebdf0.js +0 -20
- package/dist/esm/index-dc3ebdf0.js.map +0 -1
- package/dist/esm/phone-cancel-input.entry.js +0 -21
- package/dist/esm/phone-cancel-input.entry.js.map +0 -1
- package/dist/esm/phone-input-mask.entry.js +0 -57
- package/dist/esm/phone-input-mask.entry.js.map +0 -1
- package/dist/esm/phone-input.entry.js +0 -21
- package/dist/esm/phone-input.entry.js.map +0 -1
- package/dist/types/components/_crm-bonus-form/crm-bonus-form.d.ts +0 -27
- package/dist/types/components/_crm-bonus-form/subcomponents/giftback-finish/giftback-finish.d.ts +0 -3
- package/dist/types/components/_crm-bonus-form/subcomponents/giftback-pin/giftback-pin.d.ts +0 -13
- package/dist/types/components/_crm-bonus-form/subcomponents/giftback-progress/giftback-progress.d.ts +0 -12
- package/dist/types/components/_crm-bonus-form/subcomponents/name-input/name-input.d.ts +0 -11
- package/dist/types/components/_crm-bonus-form/subcomponents/phone/phone.input.d.ts +0 -8
- package/dist/types/components/_crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.d.ts +0 -8
- /package/dist/crmbonus-component-wake/{p-e5d8700b.entry.js.map → p-54b8f32b.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-2bd29eae.entry.js.map → p-61ea41c9.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-a4bf9fe7.entry.js.map → p-6532623f.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-427c86db.entry.js.map → p-9d926857.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-39abc114.entry.js.map → p-ac027576.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-9a32f685.entry.js.map → p-ce2819cc.entry.js.map} +0 -0
@@ -18,7 +18,7 @@ const AppModal = class {
|
|
18
18
|
this.modalClosed.emit();
|
19
19
|
}
|
20
20
|
render() {
|
21
|
-
return (index.h("div", { key: '
|
21
|
+
return (index.h("div", { key: '5c119f8716d525598e694d44a941d10bf1dc1701', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, index.h("div", { key: '21e1229565f588386c2e85802d859d7afdc987d1', class: "modal" }, index.h("div", { key: '5e644801f1e28f16ce9cf6181a5aaab0081fc0fb', class: "modal-header" }, index.h("h3", { key: 'e5d090478678f118a15a98c1ff6a6879851ba899' }, this.modalTitle), index.h("button", { key: '9581c4f7f13907aa9a8144111ab8e7a1810f5b3f', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), index.h("div", { key: 'd814b39f03c3b6f95b380f5d79aba4d087959e19', class: "modal-body" }, index.h("slot", { key: '3beabf8b851288e7ac0a43e00059d3dc1c23fe26' })))));
|
22
22
|
}
|
23
23
|
};
|
24
24
|
AppModal.style = AppModalStyle0;
|
@@ -12,8 +12,8 @@ function buildProductsByWake(productsWake = []) {
|
|
12
12
|
const products = [];
|
13
13
|
for (const pw of productsWake) {
|
14
14
|
let discounts = getDiscount(pw.Ajustes);
|
15
|
-
let discounts_formula = getDiscountFormula(pw.Ajustes);
|
16
|
-
var value = (pw.
|
15
|
+
// let discounts_formula = getDiscountFormula(pw.Ajustes);
|
16
|
+
var value = (pw.PrecoDe * pw.Quantidade);
|
17
17
|
var originalValue = (pw.PrecoDe * pw.Quantidade);
|
18
18
|
var discounts_value = (discounts * -1);
|
19
19
|
products.push({
|
@@ -30,22 +30,22 @@ function buildProductsByWake(productsWake = []) {
|
|
30
30
|
function getDiscount(ajustes = []) {
|
31
31
|
let discounts = 0;
|
32
32
|
for (const discount of ajustes) {
|
33
|
-
if ([AjustesTipoEnum.P, AjustesTipoEnum.CC].includes(discount.Tipo)) {
|
33
|
+
if ([AjustesTipoEnum.P, AjustesTipoEnum.CC, AjustesTipoEnum.PP].includes(discount.Tipo)) {
|
34
34
|
discounts += discount.Valor;
|
35
35
|
}
|
36
36
|
}
|
37
37
|
return discounts;
|
38
38
|
}
|
39
|
-
function getDiscountFormula(ajustes = []) {
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
}
|
39
|
+
// function getDiscountFormula(ajustes: IAjustes[] = []) {
|
40
|
+
// let discounts = 0;
|
41
|
+
// for(const discount of ajustes) {
|
42
|
+
// if([AjustesTipoEnum.F].includes(discount.Tipo)) {
|
43
|
+
// discounts += (discount.Valor * -1);
|
44
|
+
// }
|
45
|
+
// }
|
46
|
+
// return discounts;
|
47
|
+
// }
|
48
48
|
|
49
49
|
exports.buildProductsByWake = buildProductsByWake;
|
50
50
|
|
51
|
-
//# sourceMappingURL=build.payload.helper-
|
51
|
+
//# sourceMappingURL=build.payload.helper-b93f7ea5.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"build.payload.helper-b93f7ea5.js","mappings":";;AASA,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,iCAAc,CAAA;IACd,uCAAoB,CAAA;IACpB,yCAAsB,CAAA;IACtB,gCAAa,CAAA;AACjB,CAAC,EALW,eAAe,KAAf,eAAe;;SCPX,mBAAmB,CAAC,eAAoC,EAAE;IAEtE,MAAM,QAAQ,GAAoB,EAAE,CAAC;IAErC,KAAM,MAAM,EAAE,IAAI,YAAY,EAAG;QAC7B,IAAI,SAAS,GAAG,WAAW,CAAC,EAAE,CAAC,OAAO,CAAC,CAAA;;QAGvC,IAAI,KAAK,IAAI,EAAE,CAAC,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC;QACzC,IAAI,aAAa,IAAI,EAAE,CAAC,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC;QAEjD,IAAI,eAAe,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC,CAAA;QAEtC,QAAQ,CAAC,IAAI,CACT;YACI,GAAG,EAAE,EAAE,CAAC,GAAG;YACX,KAAK,EAAE,KAAK;YACZ,aAAa,EAAE,aAAa;YAC5B,gBAAgB,EAAE,EAAE,CAAC,iBAAiB,CAAC,QAAQ,EAAE;YACjD,QAAQ,EAAE,EAAE,CAAC,UAAU;YACvB,QAAQ,EAAE,KAAK,GAAG,eAAe,GAAG,KAAK,GAAG,eAAe;SAC9D,CACJ,CAAA;KACJ;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED,SAAS,WAAW,CAAC,UAAsB,EAAE;IAEzC,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,KAAI,MAAM,QAAQ,IAAI,OAAO,EAAE;QAC3B,IAAG,CAAC,eAAe,CAAC,CAAC,EAAE,eAAe,CAAC,EAAE,EAAE,eAAe,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YACpF,SAAS,IAAI,QAAQ,CAAC,KAAK,CAAC;SAC/B;KACJ;IAED,OAAO,SAAS,CAAC;AACrB,CAAC;AAED;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;;;;","names":[],"sources":["src/dto/validate.pin.bonus.ts","src/helpers/build.payload.helper.ts"],"sourcesContent":["export interface IProduct {\r\n productVariantId: string;\r\n sku: string;\r\n value: number;\r\n originalValue: number;\r\n quantity: number;\r\n discount: number;\r\n}\r\n\r\nexport enum AjustesTipoEnum {\r\n P = \"Promocao\",\r\n CC = \"ContaCorrente\",\r\n PP = \"PromocaoProduto\",\r\n F = \"Formula\"\r\n}\r\n\r\nexport interface IAjustes {\r\n Tipo: AjustesTipoEnum;\r\n Valor: number;\r\n}\r\n\r\nexport interface IUser {\r\n id: number;\r\n}\r\n\r\nexport interface IStore {\r\n name: string;\r\n}\r\n\r\nexport interface IProductWake {\r\n ProdutoVarianteId: number;\r\n SKU: string;\r\n PrecoPor: number;\r\n PrecoDe: number;\r\n Quantidade: number;\r\n Ajustes: IAjustes[];\r\n}\r\n\r\nexport interface ICustomer {\r\n birthDate: string;\r\n document: string;\r\n name: string;\r\n phone: string;\r\n}\r\n\r\nexport interface IProccesPinBonusDto {\r\n storeName: string;\r\n name: string;\r\n checkoutId: string;\r\n checkoutProducts: Array<IProduct>;\r\n storeId: string;\r\n userId: string;\r\n cellphone: number;\r\n pin: string;\r\n\r\n}\r\n\r\nexport interface IBonus {\r\n hasBonus: boolean;\r\n bonusBalance: number;\r\n totalBonus: number;\r\n minimumPurchase: number;\r\n bonusIds: string;\r\n firstValidityDate: string\r\n history: [\r\n {\r\n validityStart: string;\r\n validityEnd: string;\r\n value: number\r\n },\r\n {\r\n validityStart: string;\r\n validityEnd: string\r\n value: number\r\n }\r\n ]\r\n storeId: number;\r\n userId: number;\r\n cartId: string\r\n calculatedValue: number;\r\n totalValue: number\r\n}\r\n\r\n\r\nexport interface IReserveDTO {\r\n storeName: string;\r\n cartId: string;\r\n grossValue: number;\r\n redeemedBonus: number;\r\n ticket: string;\r\n storeId: string;\r\n userId: number;\r\n}","import { AjustesTipoEnum, IAjustes, IProduct, IProductWake } from \"../dto/validate.pin.bonus\";\r\n\r\nexport function buildProductsByWake(productsWake: Array<IProductWake> = []): Array<IProduct> {\r\n\r\n const products: Array<IProduct> = [];\r\n\r\n for ( const pw of productsWake ) {\r\n let discounts = getDiscount(pw.Ajustes)\r\n // let discounts_formula = getDiscountFormula(pw.Ajustes);\r\n\r\n var value = (pw.PrecoDe * pw.Quantidade);\r\n var originalValue = (pw.PrecoDe * pw.Quantidade);\r\n\r\n var discounts_value = (discounts * -1)\r\n\r\n products.push(\r\n {\r\n sku: pw.SKU,\r\n value: value,\r\n originalValue: originalValue,\r\n productVariantId: pw.ProdutoVarianteId.toString(),\r\n quantity: pw.Quantidade,\r\n discount: value < discounts_value ? value : discounts_value,\r\n }\r\n )\r\n }\r\n\r\n return products;\r\n}\r\n\r\nfunction getDiscount(ajustes: IAjustes[] = []) {\r\n \r\n let discounts = 0;\r\n \r\n for(const discount of ajustes) {\r\n if([AjustesTipoEnum.P, AjustesTipoEnum.CC, AjustesTipoEnum.PP].includes(discount.Tipo)) {\r\n discounts += discount.Valor;\r\n }\r\n }\r\n\r\n return discounts;\r\n}\r\n\r\n// function getDiscountFormula(ajustes: IAjustes[] = []) {\r\n \r\n// let discounts = 0;\r\n \r\n// for(const discount of ajustes) {\r\n// if([AjustesTipoEnum.F].includes(discount.Tipo)) {\r\n// discounts += (discount.Valor * -1);\r\n// }\r\n// }\r\n\r\n// return discounts;\r\n// }"],"version":3}
|
@@ -1,3 +1,5 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
1
3
|
function bind(fn, thisArg) {
|
2
4
|
return function wrap() {
|
3
5
|
return fn.apply(thisArg, arguments);
|
@@ -3749,7 +3751,8 @@ axios.default = axios;
|
|
3749
3751
|
// this module should only have a default export
|
3750
3752
|
const axios$1 = axios;
|
3751
3753
|
|
3752
|
-
const CRM_BONUS_API_URL = "
|
3754
|
+
// 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";
|
3755
|
+
const CRM_BONUS_API_URL = "https://typically-workable-perch.ngrok-free.app/api";
|
3753
3756
|
const CHECKOUT_CART_WAKE = "http://localhost:3001";
|
3754
3757
|
|
3755
3758
|
const getKeyReserveByCartId = (cartId) => {
|
@@ -3903,6 +3906,123 @@ class CrmBonusService {
|
|
3903
3906
|
}
|
3904
3907
|
CrmBonusService._instance = null;
|
3905
3908
|
|
3906
|
-
|
3909
|
+
class CartWake {
|
3910
|
+
constructor(cart) {
|
3911
|
+
var _a;
|
3912
|
+
this.products = [];
|
3913
|
+
this.id = cart.Metadados.id || cart.Id;
|
3914
|
+
this.middlewareId = (_a = cart.Metadados) === null || _a === void 0 ? void 0 : _a.id;
|
3915
|
+
this.orderId = cart.PedidoId;
|
3916
|
+
this.buildUserInfo(cart);
|
3917
|
+
this.buildStoreInfo(cart);
|
3918
|
+
this.products = cart.Produtos; // this.buildStoreCart( cart.Produtos);
|
3919
|
+
}
|
3920
|
+
// private buildStoreCart(newProducts = []) {
|
3921
|
+
// const cache = localStorage.getItem("bc:cart");
|
3922
|
+
// if(!cache) {
|
3923
|
+
// return this.saveStore(newProducts)
|
3924
|
+
// }
|
3925
|
+
// const cacheProducts:IProductWake[] = newProducts //JSON.parse(cache);
|
3926
|
+
// if(newProducts.length !== cacheProducts.length) {
|
3927
|
+
// return this.saveStore(newProducts);
|
3928
|
+
// }
|
3929
|
+
// for (const p of newProducts) {
|
3930
|
+
// const [cp] = cacheProducts.filter(cpp => cpp.ProdutoVarianteId == p.ProdutoVarianteId);
|
3931
|
+
// if(cp) {
|
3932
|
+
// cp.Quantidade != p.Quantidade;
|
3933
|
+
// return newProducts;
|
3934
|
+
// }
|
3935
|
+
// }
|
3936
|
+
// return cacheProducts;
|
3937
|
+
// }
|
3938
|
+
// private saveStore(newProducts) {
|
3939
|
+
// localStorage.setItem("bc:cart", JSON.stringify(newProducts));
|
3940
|
+
// return newProducts;
|
3941
|
+
// }
|
3942
|
+
buildUserInfo(cart) {
|
3943
|
+
this.user = {
|
3944
|
+
id: cart.Usuario ? cart.Usuario.Id : null
|
3945
|
+
};
|
3946
|
+
}
|
3947
|
+
buildStoreInfo(cart) {
|
3948
|
+
var _a;
|
3949
|
+
this.store = {
|
3950
|
+
name: (_a = cart.Loja) === null || _a === void 0 ? void 0 : _a.Nome
|
3951
|
+
};
|
3952
|
+
}
|
3953
|
+
}
|
3954
|
+
|
3955
|
+
class ReservedInfoDTO {
|
3956
|
+
static of(payload) {
|
3957
|
+
const info = new ReservedInfoDTO();
|
3958
|
+
info.bonusBalance = payload.bonusBalance;
|
3959
|
+
info.bonusIds = payload.bonusIds;
|
3960
|
+
info.calculatedValue = payload.calculatedValue;
|
3961
|
+
info.cartId = payload.cartId;
|
3962
|
+
info.metadata = payload.metadata;
|
3963
|
+
info.orderId = payload.orderId;
|
3964
|
+
info.status = payload.status;
|
3965
|
+
info.totalDiscount = payload.totalDiscount;
|
3966
|
+
info.totalValue = payload.totalValue;
|
3967
|
+
info.isBonusProcessed = payload.isBonusProcessed;
|
3968
|
+
return info;
|
3969
|
+
}
|
3970
|
+
isExpired() {
|
3971
|
+
var _a;
|
3972
|
+
const createdAt = (_a = this === null || this === void 0 ? void 0 : this.metadata) === null || _a === void 0 ? void 0 : _a.createdAt;
|
3973
|
+
if (!createdAt)
|
3974
|
+
return true;
|
3975
|
+
const current = Date.now();
|
3976
|
+
const diffms = current - createdAt;
|
3977
|
+
const diffMinutes = diffms / (1000 * 60);
|
3978
|
+
console.log('diffMinutes', diffMinutes);
|
3979
|
+
return diffMinutes > 6;
|
3980
|
+
}
|
3981
|
+
}
|
3982
|
+
|
3983
|
+
const crmBonusService = CrmBonusService.getInstance();
|
3984
|
+
const getCart = async () => {
|
3985
|
+
const baseUrl = buildUrlBase(); // window.location.origin; //"https://bycoders.fbits.store" //window.location.origin;
|
3986
|
+
console.log('[URL STORE]: ', baseUrl);
|
3987
|
+
const cart = await crmBonusService.getInfoCart(baseUrl);
|
3988
|
+
return new CartWake(cart);
|
3989
|
+
};
|
3990
|
+
const getInfoBonusByCartIdAndStoreName = async (cartId, storeName) => {
|
3991
|
+
const info = await crmBonusService.getInfoBonus(cartId, storeName);
|
3992
|
+
return ReservedInfoDTO.of(info);
|
3993
|
+
};
|
3994
|
+
const persisteMetadata = async (storeName, cartId, metadata = {}) => {
|
3995
|
+
console.log('[bc:salvando metadados]');
|
3996
|
+
await crmBonusService.patchInfoBonus({
|
3997
|
+
storeName,
|
3998
|
+
cartId,
|
3999
|
+
metadata
|
4000
|
+
});
|
4001
|
+
console.log('[bc:salvo metadados]');
|
4002
|
+
};
|
4003
|
+
const buildUrlBase = () => {
|
4004
|
+
const url = window.location.origin; //"https://bycoders.checkout.fbits.store" //
|
4005
|
+
if (url.includes('localhost')) {
|
4006
|
+
return CHECKOUT_CART_WAKE;
|
4007
|
+
}
|
4008
|
+
if (url.includes('checkout')) {
|
4009
|
+
return url;
|
4010
|
+
}
|
4011
|
+
if (url.includes('fbits')) {
|
4012
|
+
return url;
|
4013
|
+
}
|
4014
|
+
if (url.includes("www.")) {
|
4015
|
+
return url.replace("www", "checkout");
|
4016
|
+
}
|
4017
|
+
return `${window.location.protocol}//checkout.${window.location.host}`;
|
4018
|
+
};
|
4019
|
+
|
4020
|
+
exports.CartWake = CartWake;
|
4021
|
+
exports.CrmBonusService = CrmBonusService;
|
4022
|
+
exports.USED_KEY = USED_KEY;
|
4023
|
+
exports.getCart = getCart;
|
4024
|
+
exports.getInfoBonusByCartIdAndStoreName = getInfoBonusByCartIdAndStoreName;
|
4025
|
+
exports.getKeyReserveByCartId = getKeyReserveByCartId;
|
4026
|
+
exports.persisteMetadata = persisteMetadata;
|
3907
4027
|
|
3908
|
-
//# sourceMappingURL=
|
4028
|
+
//# sourceMappingURL=cart.helper-b08a12b2.js.map
|