crmbonus-component-wake 2.1.11-homolog → 2.1.12-homolog
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 +2 -2
- package/dist/cjs/app-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/{cart.helper-06bdd52b.js → cart.helper-06f44f70.js} +2 -2
- package/dist/cjs/{cart.helper-06bdd52b.js.map → cart.helper-06f44f70.js.map} +1 -1
- package/dist/cjs/{countdown-timer_2.cjs.entry.js → countdown-timer.cjs.entry.js} +3 -20
- package/dist/cjs/countdown-timer.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-bonus-form.cjs.entry.js +5 -5
- package/dist/cjs/crm-bonus-form.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-bonus-note.cjs.entry.js +11 -9
- package/dist/cjs/crm-bonus-note.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-bonus.cjs.entry.js +18 -20
- package/dist/cjs/crm-bonus.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-button.cjs.entry.js +25 -0
- package/dist/cjs/crm-button.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-giftback-form_2.cjs.entry.js +14 -12
- package/dist/cjs/crm-giftback-form_2.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-tooltip_4.cjs.entry.js +16 -14
- package/dist/cjs/crm-tooltip_4.cjs.entry.js.map +1 -1
- package/dist/cjs/crmbonus-component-wake.cjs.js +2 -2
- package/dist/cjs/{crmbonus.service-8ea699de.js → crmbonus.service-f0301a29.js} +6 -4
- package/dist/cjs/crmbonus.service-f0301a29.js.map +1 -0
- package/dist/cjs/giftback-finish_4.cjs.entry.js +9 -9
- package/dist/cjs/giftback-finish_4.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-6054ed44.js → index-7a7d7882.js} +3 -1
- package/dist/cjs/index-7a7d7882.js.map +1 -0
- package/dist/cjs/{index-d11684bd.js → index-a7537457.js} +2 -37
- package/dist/cjs/index-a7537457.js.map +1 -0
- package/dist/cjs/{info.config.helper-c5d9f781.js → info.config.helper-e35e6e20.js} +3 -2
- package/dist/cjs/info.config.helper-e35e6e20.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/pedido-finalizado.cjs.entry.js +4 -4
- package/dist/cjs/phone-cancel-input.cjs.entry.js +2 -2
- package/dist/cjs/phone-cancel-input.cjs.entry.js.map +1 -1
- package/dist/cjs/phone-input-mask.cjs.entry.js +4 -4
- package/dist/cjs/phone-input-mask.cjs.entry.js.map +1 -1
- package/dist/cjs/phone-input.cjs.entry.js +2 -2
- package/dist/cjs/phone-input.cjs.entry.js.map +1 -1
- package/dist/collection/collection-manifest.json +7 -7
- package/dist/collection/components/{crm-bonus-form → _crm-bonus-form}/crm-bonus-form.css +1 -2
- package/dist/collection/components/{crm-bonus-form → _crm-bonus-form}/crm-bonus-form.js +1 -1
- package/dist/collection/components/_crm-bonus-form/crm-bonus-form.js.map +1 -0
- package/dist/collection/components/{crm-bonus-form → _crm-bonus-form}/subcomponents/giftback-finish/giftback-finish.css +1 -2
- package/dist/collection/components/{crm-bonus-form → _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 -0
- package/dist/collection/components/{crm-bonus-form → _crm-bonus-form}/subcomponents/giftback-pin/giftback-pin.css +3 -4
- package/dist/collection/components/{crm-bonus-form → _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 -0
- package/dist/collection/components/{crm-bonus-form → _crm-bonus-form}/subcomponents/giftback-progress/giftback-progress.css +8 -9
- package/dist/collection/components/{crm-bonus-form → _crm-bonus-form}/subcomponents/giftback-progress/giftback-progress.js +1 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js.map +1 -0
- package/dist/collection/components/{crm-bonus-form → _crm-bonus-form}/subcomponents/name-input/name-input.css +4 -4
- package/dist/collection/components/{crm-bonus-form → _crm-bonus-form}/subcomponents/name-input/name-input.js +2 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/name-input/name-input.js.map +1 -0
- package/dist/collection/components/{crm-bonus-form → _crm-bonus-form}/subcomponents/phone/phone.input.js +2 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/phone/phone.input.js.map +1 -0
- package/dist/collection/components/{crm-bonus-form → _crm-bonus-form}/subcomponents/phone-cancel/phone.cancel.input.js +2 -1
- package/dist/collection/components/_crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js.map +1 -0
- package/dist/collection/components/button/crm-button.css +1 -1
- package/dist/collection/components/button/index.js +1 -1
- package/dist/collection/components/countdown-timer/countdown-timer.js +1 -1
- package/dist/collection/components/crm-bonus/crm-bonus.css +2 -3
- package/dist/collection/components/crm-bonus/crm-bonus.js +17 -18
- package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
- package/dist/collection/components/giftback-form/giftback-form.css +6 -6
- package/dist/collection/components/giftback-form/giftback-form.js +26 -7
- package/dist/collection/components/giftback-form/giftback-form.js.map +1 -1
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.css +9 -9
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js +9 -7
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.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 +5 -5
- package/dist/collection/components/modal/app-modal.css +1 -1
- package/dist/collection/components/note/crm-bonus-note.css +3 -5
- package/dist/collection/components/note/crm-bonus-note.js +8 -5
- package/dist/collection/components/note/crm-bonus-note.js.map +1 -1
- package/dist/collection/components/pedido/pedido.js +1 -1
- package/dist/collection/components/phone/phone-input-mask.css +3 -3
- package/dist/collection/components/phone/phone-input-mask.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/collection/contants/index.js +1 -0
- package/dist/collection/contants/index.js.map +1 -1
- package/dist/collection/helpers/info.config.helper.js +2 -1
- package/dist/collection/helpers/info.config.helper.js.map +1 -1
- package/dist/collection/services/crmbonus.service.js +3 -3
- package/dist/collection/services/crmbonus.service.js.map +1 -1
- package/dist/components/app-modal.js +2 -2
- package/dist/components/app-modal.js.map +1 -1
- package/dist/components/countdown-timer.js +1 -1
- package/dist/components/crm-bonus-form.js +10 -10
- package/dist/components/crm-bonus-form.js.map +1 -1
- package/dist/components/crm-bonus-note.js +14 -23
- package/dist/components/crm-bonus-note.js.map +1 -1
- package/dist/components/crm-bonus.js +31 -31
- 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/index.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-75ba7b9a.js → p-1b441909.js} +3 -2
- package/dist/components/p-1b441909.js.map +1 -0
- package/dist/components/{p-35cbb4b1.js → p-20621444.js} +2 -2
- package/dist/components/{p-35cbb4b1.js.map → p-20621444.js.map} +1 -1
- package/dist/components/p-220754a5.js +69 -0
- package/dist/components/p-220754a5.js.map +1 -0
- package/dist/components/{p-83a12a8f.js → p-2600073a.js} +7 -7
- package/dist/components/p-2600073a.js.map +1 -0
- package/dist/components/{p-97683d21.js → p-292a2414.js} +6 -4
- package/dist/components/p-292a2414.js.map +1 -0
- package/dist/components/{p-6186ddcc.js → p-34803421.js} +5 -5
- package/dist/components/p-34803421.js.map +1 -0
- package/dist/components/{p-b79c86a8.js → p-3cd7a20f.js} +4 -4
- package/dist/components/p-3cd7a20f.js.map +1 -0
- package/dist/components/p-3fc8de8a.js +65 -0
- package/dist/components/p-3fc8de8a.js.map +1 -0
- package/dist/components/{p-2671d669.js → p-57e02602.js} +14 -12
- package/dist/components/p-57e02602.js.map +1 -0
- package/dist/components/{p-2b3b8d6b.js → p-5a1ccb18.js} +3 -3
- package/dist/components/{p-2b3b8d6b.js.map → p-5a1ccb18.js.map} +1 -1
- package/dist/components/{p-fe9c3966.js → p-82ea12ff.js} +2 -2
- package/dist/components/{p-fe9c3966.js.map → p-82ea12ff.js.map} +1 -1
- package/dist/components/p-83249636.js +63 -0
- package/dist/components/p-83249636.js.map +1 -0
- package/dist/components/{p-47f9da55.js → p-8f1485e7.js} +5 -5
- package/dist/components/p-8f1485e7.js.map +1 -0
- package/dist/components/{p-3e84f78c.js → p-9d950d25.js} +2 -37
- package/dist/components/p-9d950d25.js.map +1 -0
- package/dist/components/{p-58b97429.js → p-b42db369.js} +3 -3
- package/dist/components/{p-58b97429.js.map → p-b42db369.js.map} +1 -1
- package/dist/components/{p-11085d9b.js → p-c6153eb6.js} +5 -5
- package/dist/components/p-c6153eb6.js.map +1 -0
- package/dist/components/{p-e73ce112.js → p-d0319a24.js} +24 -21
- package/dist/components/p-d0319a24.js.map +1 -0
- package/dist/{esm/index-5b567099.js → components/p-ecc51430.js} +3 -2
- package/dist/components/p-ecc51430.js.map +1 -0
- package/dist/components/{p-cc1ea33f.js → p-fc6f781f.js} +2 -2
- package/dist/components/{p-cc1ea33f.js.map → p-fc6f781f.js.map} +1 -1
- package/dist/components/pedido-finalizado.js +4 -4
- package/dist/components/phone-cancel-input.js +6 -5
- 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 +6 -5
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/pin-form.js +1 -1
- package/dist/crmbonus-component-wake/crmbonus-component-wake.css +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-0e9fa1f3.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-0e9fa1f3.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-136d44bb.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-136d44bb.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-1b0969ff.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-1b0969ff.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-1b441909.js +2 -0
- package/dist/crmbonus-component-wake/p-1b441909.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-35cbb4b1.js → p-20621444.js} +2 -2
- package/dist/crmbonus-component-wake/{p-97683d21.js → p-292a2414.js} +2 -2
- package/dist/crmbonus-component-wake/{p-97683d21.js.map → p-292a2414.js.map} +1 -1
- package/dist/crmbonus-component-wake/p-2b493ec3.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-2b493ec3.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-402ead13.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-402ead13.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-53b6a7e8.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-53b6a7e8.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-9b2aad6a.entry.js → p-7a45fdab.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-8c362346.js +3 -0
- package/dist/crmbonus-component-wake/p-8c362346.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-be3ddacc.entry.js → p-a6a4a314.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-bcb65b4e.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-bcb65b4e.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c3d14637.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-c3d14637.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c7376a47.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-c7376a47.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c8e7a79f.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-c8e7a79f.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-cc754208.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-cc754208.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-d3ed9573.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-d3ed9573.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-ecc51430.js +2 -0
- package/dist/crmbonus-component-wake/p-ecc51430.js.map +1 -0
- package/dist/env.js +1 -1
- 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/{cart.helper-5dbde6e9.js → cart.helper-06aa7d0a.js} +2 -2
- package/dist/esm/{cart.helper-5dbde6e9.js.map → cart.helper-06aa7d0a.js.map} +1 -1
- package/dist/esm/countdown-timer.entry.js +42 -0
- package/dist/esm/countdown-timer.entry.js.map +1 -0
- package/dist/esm/crm-bonus-form.entry.js +5 -5
- package/dist/esm/crm-bonus-form.entry.js.map +1 -1
- package/dist/esm/crm-bonus-note.entry.js +11 -9
- package/dist/esm/crm-bonus-note.entry.js.map +1 -1
- package/dist/esm/crm-bonus.entry.js +18 -20
- package/dist/esm/crm-bonus.entry.js.map +1 -1
- package/dist/esm/crm-button.entry.js +21 -0
- package/dist/esm/crm-button.entry.js.map +1 -0
- package/dist/esm/crm-giftback-form_2.entry.js +14 -12
- package/dist/esm/crm-giftback-form_2.entry.js.map +1 -1
- package/dist/esm/crm-tooltip_4.entry.js +16 -14
- package/dist/esm/crm-tooltip_4.entry.js.map +1 -1
- package/dist/esm/crmbonus-component-wake.js +3 -3
- package/dist/esm/{crmbonus.service-5f574d43.js → crmbonus.service-930edf47.js} +6 -4
- package/dist/esm/crmbonus.service-930edf47.js.map +1 -0
- package/dist/esm/giftback-finish_4.entry.js +9 -9
- package/dist/esm/giftback-finish_4.entry.js.map +1 -1
- package/dist/esm/{index-e8724c8f.js → index-bdb70d5a.js} +2 -37
- package/dist/esm/index-bdb70d5a.js.map +1 -0
- package/dist/{components/p-7cfea8fe.js → esm/index-dc3ebdf0.js} +3 -2
- package/dist/esm/index-dc3ebdf0.js.map +1 -0
- package/dist/esm/{info.config.helper-42d9ddf9.js → info.config.helper-7cad7a9c.js} +3 -2
- package/dist/esm/info.config.helper-7cad7a9c.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loading-spinner.entry.js +1 -1
- package/dist/esm/pedido-finalizado.entry.js +4 -4
- package/dist/esm/phone-cancel-input.entry.js +2 -2
- package/dist/esm/phone-cancel-input.entry.js.map +1 -1
- package/dist/esm/phone-input-mask.entry.js +4 -4
- package/dist/esm/phone-input-mask.entry.js.map +1 -1
- package/dist/esm/phone-input.entry.js +2 -2
- package/dist/esm/phone-input.entry.js.map +1 -1
- package/dist/types/components/crm-bonus/crm-bonus.d.ts +4 -0
- package/dist/types/components/giftback-form/giftback-form.d.ts +1 -0
- package/dist/types/components/giftback-form/subcomponents/giftback-info/giftback-info.d.ts +1 -0
- package/dist/types/components/note/crm-bonus-note.d.ts +4 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/contants/index.d.ts +4 -0
- package/dist/types/helpers/info.config.helper.d.ts +1 -0
- package/dist/types/home/darlison/Projects/Bycoders/crmbonus/crmbonus-component/.stencil/env.d.ts +1 -1
- package/dist/types/services/crmbonus.service.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/countdown-timer_2.cjs.entry.js.map +0 -1
- package/dist/cjs/crmbonus.service-8ea699de.js.map +0 -1
- package/dist/cjs/index-6054ed44.js.map +0 -1
- package/dist/cjs/index-d11684bd.js.map +0 -1
- package/dist/cjs/info.config.helper-c5d9f781.js.map +0 -1
- 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.js.map +0 -1
- 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.js.map +0 -1
- 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.map +0 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js.map +0 -1
- package/dist/components/p-11085d9b.js.map +0 -1
- package/dist/components/p-246a3e9d.js +0 -62
- package/dist/components/p-246a3e9d.js.map +0 -1
- package/dist/components/p-2671d669.js.map +0 -1
- package/dist/components/p-3e84f78c.js.map +0 -1
- package/dist/components/p-47f9da55.js.map +0 -1
- package/dist/components/p-6186ddcc.js.map +0 -1
- package/dist/components/p-6c546e48.js +0 -65
- package/dist/components/p-6c546e48.js.map +0 -1
- package/dist/components/p-75ba7b9a.js.map +0 -1
- package/dist/components/p-7c744cca.js +0 -69
- package/dist/components/p-7c744cca.js.map +0 -1
- package/dist/components/p-7cfea8fe.js.map +0 -1
- package/dist/components/p-83a12a8f.js.map +0 -1
- package/dist/components/p-97683d21.js.map +0 -1
- package/dist/components/p-b79c86a8.js.map +0 -1
- package/dist/components/p-e73ce112.js.map +0 -1
- package/dist/crmbonus-component-wake/p-03b77c41.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-03b77c41.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-14fc092e.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-14fc092e.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-3d6152b1.js +0 -3
- package/dist/crmbonus-component-wake/p-3d6152b1.js.map +0 -1
- package/dist/crmbonus-component-wake/p-467c8154.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-467c8154.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-56f0296c.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-56f0296c.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-620ec1a3.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-620ec1a3.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-74206c91.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-74206c91.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-75ba7b9a.js +0 -2
- package/dist/crmbonus-component-wake/p-75ba7b9a.js.map +0 -1
- package/dist/crmbonus-component-wake/p-7b7fb354.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-7b7fb354.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-7cfea8fe.js +0 -2
- package/dist/crmbonus-component-wake/p-7cfea8fe.js.map +0 -1
- package/dist/crmbonus-component-wake/p-885fc30e.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-885fc30e.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-90716188.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-90716188.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-988b57cf.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-988b57cf.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-b7a8f915.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-b7a8f915.entry.js.map +0 -1
- package/dist/esm/countdown-timer_2.entry.js +0 -58
- package/dist/esm/countdown-timer_2.entry.js.map +0 -1
- package/dist/esm/crmbonus.service-5f574d43.js.map +0 -1
- package/dist/esm/index-5b567099.js.map +0 -1
- package/dist/esm/index-e8724c8f.js.map +0 -1
- package/dist/esm/info.config.helper-42d9ddf9.js.map +0 -1
- /package/dist/crmbonus-component-wake/{p-35cbb4b1.js.map → p-20621444.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-9b2aad6a.entry.js.map → p-7a45fdab.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-be3ddacc.entry.js.map → p-a6a4a314.entry.js.map} +0 -0
- /package/dist/types/components/{crm-bonus-form → _crm-bonus-form}/crm-bonus-form.d.ts +0 -0
- /package/dist/types/components/{crm-bonus-form → _crm-bonus-form}/subcomponents/giftback-finish/giftback-finish.d.ts +0 -0
- /package/dist/types/components/{crm-bonus-form → _crm-bonus-form}/subcomponents/giftback-pin/giftback-pin.d.ts +0 -0
- /package/dist/types/components/{crm-bonus-form → _crm-bonus-form}/subcomponents/giftback-progress/giftback-progress.d.ts +0 -0
- /package/dist/types/components/{crm-bonus-form → _crm-bonus-form}/subcomponents/name-input/name-input.d.ts +0 -0
- /package/dist/types/components/{crm-bonus-form → _crm-bonus-form}/subcomponents/phone/phone.input.d.ts +0 -0
- /package/dist/types/components/{crm-bonus-form → _crm-bonus-form}/subcomponents/phone-cancel/phone.cancel.input.d.ts +0 -0
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
6
|
-
const index$1 = require('./index-
|
5
|
+
const index = require('./index-a7537457.js');
|
6
|
+
const index$1 = require('./index-7a7d7882.js');
|
7
7
|
|
8
|
-
const phoneInputMaskCss = "*{margin:0;padding:0;box-sizing:border-box}.phone{display:block;width:100%;height:24px;padding:6px 12px;
|
8
|
+
const phoneInputMaskCss = "*{margin:0;padding:0;box-sizing:border-box}.phone{display:block;width:100%;height:24px;padding:6px 12px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:0px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);-webkit-transition:border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s}.phone-input-form{width:100%;height:48px;padding:13px 16px 13px 16px;border:1px solid #CCCCCC;}.crm-erro-msg{color:#E11D48;font-weight:500;margin-top:11px}";
|
9
9
|
const PhoneInputMaskStyle0 = phoneInputMaskCss;
|
10
10
|
|
11
11
|
const PhoneInputMask = class {
|
@@ -51,7 +51,7 @@ const PhoneInputMask = class {
|
|
51
51
|
return this.phone;
|
52
52
|
}
|
53
53
|
render() {
|
54
|
-
return (index.h("div", { key: '
|
54
|
+
return (index.h("div", { key: 'c80098f2bcedaa085d136be5fdaa9f60400f85a5' }, index.h("input", { key: '4ee5f1b3e227777315b059f3f8da7614dcfb694e', disabled: this.disabled, id: "phone", type: "text", class: "phone-input-form", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(99) 99999 9999" }), index.h("p", { key: '943427f82918af1ade76a22afa860d105ce3ae1e', class: "crm-erro-msg" }, this.message)));
|
55
55
|
}
|
56
56
|
};
|
57
57
|
PhoneInputMask.style = PhoneInputMaskStyle0;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"phone-input-mask.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,iBAAiB,GAAG,
|
1
|
+
{"file":"phone-input-mask.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,iBAAiB,GAAG,ssBAAssB,CAAC;AACjuB,6BAAe,iBAAiB;;MCOnB,cAAc;;;qBACE,EAAE;uBACA,EAAE;;;;IAK7B,iBAAiB;QACb,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;KAClC;IAEO,WAAW,CAAC,KAAa;QAE7B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACzC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;QAE7D,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QAEzB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,KAA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AAC,WAAW,CAAC,KAAK,CAAC,EAC3C,WAAW,EAAC,iBAAiB,GAC/B,EACFA,gEAAG,KAAK,EAAC,cAAc,IAAE,IAAI,CAAC,OAAO,CAAK,CACxC,EAER;KACL;;;;;;","names":["MESSAGE_ERROR_INVALID_NUMBER","h"],"sources":["src/components/phone/phone-input-mask.css?tag=phone-input-mask&encapsulation=shadow","src/components/phone/phone-input-mask.tsx"],"sourcesContent":["* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\n.phone {\n display: block;\n width: 100%;\n height: 24px;\n padding: 6px 12px;\n /* font-size: 14px; */\n line-height: 1.42857143;\n color: #555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 0px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n\n\n.phone-input-form {\n width: 100%;\n height: 48px;\n padding: 13px 16px 13px 16px;\n border: 1px solid #CCCCCC;\n /* font-size: 14px; */\n}\n\n.crm-erro-msg {\n color: #E11D48;\n /* font-size: 12px; */\n font-weight: 500;\n margin-top: 11px;\n}\n","import { Component, h, Method, Prop, State } from '@stencil/core';\nimport { MESSAGE_ERROR_INVALID_NUMBER } from '../../contants';\n\n@Component({\n tag: 'phone-input-mask',\n styleUrl: 'phone-input-mask.css',\n shadow: true,\n})\nexport class PhoneInputMask {\n @State() phone: string = '';\n @State() message: string = \"\";\n\n @Prop() initialValue: string;\n @Prop() disabled: boolean;\n\n componentWillLoad() {\n this.phone = this.initialValue;\n }\n\n private formatPhone(value: string): string {\n\n const cleaned = value.replace(/\\D/g, ''); // Remove tudo que não for número\n const match = cleaned.match(/^(\\d{0,2})(\\d{0,5})(\\d{0,4})$/);\n\n if (!match) return value;\n\n const part1 = match[1] ? `(${match[1]}` : '';\n const part2 = match[2] ? `) ${match[2]}` : '';\n const part3 = match[3] ? ` ${match[3]}` : '';\n\n return `${part1}${part2}${part3}`;\n }\n\n private handleInput(event: Event): void {\n const input = event.target as HTMLInputElement;\n this.phone = this.formatPhone(input.value);\n\n if(!this.validatePhoneNumber(input.value)) {\n this.message = MESSAGE_ERROR_INVALID_NUMBER\n } else {\n this.message = \"\"\n }\n\n console.log('phone', this.phone)\n }\n\n validatePhoneNumber(phone: string): boolean {\n if(phone.length < 15) {\n return true\n }\n const phoneRegex = /^\\(\\d{2}\\) \\d{5} \\d{4}$/; // Valida formato (99) 99999-9999\n return phoneRegex.test(phone);\n }\n\n @Method()\n public async getPhone() {\n return this.phone;\n }\n\n render() {\n return (\n <div>\n <input\n disabled={this.disabled}\n id=\"phone\"\n type=\"text\"\n class=\"phone-input-form\"\n value={this.phone}\n onInput={(event) => this.handleInput(event)}\n placeholder=\"(99) 99999 9999\"\n />\n <p class=\"crm-erro-msg\">{this.message}</p>\n </div>\n\n );\n }\n}\n"],"version":3}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-a7537457.js');
|
6
6
|
|
7
7
|
const PhoneInput = class {
|
8
8
|
constructor(hostRef) {
|
@@ -16,7 +16,7 @@ const PhoneInput = class {
|
|
16
16
|
await this.sendPin(phone);
|
17
17
|
}
|
18
18
|
render() {
|
19
|
-
return (index.h("div", { key: '
|
19
|
+
return (index.h("div", { key: '4b2f63715915ccb6f93280e58a3ff4cc7e33565f', class: "form-container" }, index.h("phone-input-mask", { key: '674a74515ad83198f23e969c21f8f19f2c359054', initialValue: this.value, ref: ref => this.phoneInputMask = ref }), index.h("button", { key: 'd5149879044c72b5a06780eb9a9aea05b0ad966a', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "validar" : index.h("loading-spinner", { size: "11px", color: "#fff" }))));
|
20
20
|
}
|
21
21
|
};
|
22
22
|
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"phone-input.entry.cjs.js","mappings":";;;;;;
|
1
|
+
{"file":"phone-input.entry.cjs.js","mappings":";;;;;;MAMa,UAAU;;;;;;;IAQnB,MAAM,aAAa;QACf,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;QACnD,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KAC7B;IAED,MAAM;QACF,QACIA,kEAAK,KAAK,EAAC,gBAAgB,IACvBA,+EAAkB,YAAY,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,cAAc,GAAG,GAAG,GAAI,EACrFA,qEAAQ,KAAK,EAAE,0BAA0B,IAAI,CAAC,OAAO,GAAG,UAAU,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,IAE/H,CAAC,IAAI,CAAC,OAAO,GAAG,SAAS,GAAGA,6BAAiB,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,GAAG,CAEvE,CACP,EACT;KACJ;;;;;","names":["h"],"sources":["src/components/_crm-bonus-form/subcomponents/phone/phone.input.tsx"],"sourcesContent":["import { Component, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: 'phone-input',\n shadow: true\n})\nexport class PhoneInput {\n\n private phoneInputMask: HTMLPhoneInputMaskElement;\n\n @Prop() sendPin: Function;\n @Prop() loading: boolean;\n @Prop() value: string;\n\n async validatePhone() {\n const phone = await this.phoneInputMask.getPhone();\n await this.sendPin(phone);\n }\n\n render() {\n return (\n <div class=\"form-container\">\n <phone-input-mask initialValue={this.value} ref={ref => this.phoneInputMask = ref} />\n <button class={`btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `} disabled={this.loading} onClick={() => this.validatePhone()}>\n {\n !this.loading ? \"validar\" : <loading-spinner size=\"11px\" color=\"#fff\" />\n }\n </button>\n </div>\n )\n }\n}"],"version":3}
|
@@ -1,15 +1,15 @@
|
|
1
1
|
{
|
2
2
|
"entries": [
|
3
|
+
"components/_crm-bonus-form/crm-bonus-form.js",
|
4
|
+
"components/_crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js",
|
5
|
+
"components/_crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js",
|
6
|
+
"components/_crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js",
|
7
|
+
"components/_crm-bonus-form/subcomponents/name-input/name-input.js",
|
8
|
+
"components/_crm-bonus-form/subcomponents/phone/phone.input.js",
|
9
|
+
"components/_crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js",
|
3
10
|
"components/button/index.js",
|
4
11
|
"components/countdown-timer/countdown-timer.js",
|
5
12
|
"components/crm-bonus/crm-bonus.js",
|
6
|
-
"components/crm-bonus-form/crm-bonus-form.js",
|
7
|
-
"components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js",
|
8
|
-
"components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js",
|
9
|
-
"components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js",
|
10
|
-
"components/crm-bonus-form/subcomponents/name-input/name-input.js",
|
11
|
-
"components/crm-bonus-form/subcomponents/phone/phone.input.js",
|
12
|
-
"components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js",
|
13
13
|
"components/giftback-form/giftback-form.js",
|
14
14
|
"components/giftback-form/subcomponents/giftback-info/giftback-info.js",
|
15
15
|
"components/giftback-form/subcomponents/phone-form/phone-form.js",
|
@@ -84,7 +84,7 @@ export class CrmBonusForm {
|
|
84
84
|
this.cancel();
|
85
85
|
}
|
86
86
|
render() {
|
87
|
-
return (h(Host, { key: '
|
87
|
+
return (h(Host, { key: '93feea259818973d94c00a629f1b612ac0bc299a' }, this.step == StepFormEnum.STEP_NAME && h("name-input", { key: '67e8685decb70895b443c2f34228a5cf46aa17e1', loading: this.loadingModal, value: this.customer.name, applyName: (name) => this.handleCustomerName(name) }), this.step === StepFormEnum.STEP_PIN && h("giftback-pin", { key: '299c0dcfd440db91d2d0a9ae4de9ae97f0c97957', cancel: () => this.handleCancel(), sent: this.sent, validate: (data) => this.validateBonus(data), loading: this.loading }), this.step === StepFormEnum.STEP_RESERVE && h("giftback-progress", { key: 'df3171885efde2f78fbae3e7db9710da0e7fb07e', loading: this.loading, cancel: () => this.handleCancel(), bonus: this.bonus, reserve: (amountRedeemed) => this.reserveApply(amountRedeemed) }), this.step === StepFormEnum.STEP_APPLY && h("giftback-finish", { key: '08849374d7020641b49aa053f3120b941bd66cce' }), h("p", { key: 'b1e225469564d7c885d47d1f8f95dc66822c6dae', class: "message-error" }, this.message)));
|
88
88
|
}
|
89
89
|
static get is() { return "crm-bonus-form"; }
|
90
90
|
static get encapsulation() { return "shadow"; }
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"crm-bonus-form.js","sourceRoot":"","sources":["../../../../src/components/_crm-bonus-form/crm-bonus-form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9C,MAAM,OAAO,YAAY;;QAEb,oBAAe,GAAoB,eAAe,CAAC,WAAW,EAAE,CAAC;;;;wBAK3C;YAC1B,KAAK,EAAE,EAAE;YACT,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,EAAE;SACX;;;;;;;;uBAY2B,KAAK;oBAET,YAAY,CAAC,SAAS;;;;IAO9C,KAAK,CAAC,OAAO,C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AAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,GAAI;YAEhL,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,YAAY,IAAI,0EAAmB,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,cAAsB,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,GAAI;YACrN,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,UAAU,IAAI,yEAAmB;YAC7D,0DAAG,KAAK,EAAC,eAAe,IAAE,IAAI,CAAC,OAAO,CAAK,CACxC,CACV,CAAA;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Host, Method, Prop, State, h } from \"@stencil/core\";\nimport { CrmBonusService } from \"../../services/crmbonus.service\";\nimport { IBonus, ICustomer, IProccesPinBonusDto, IProduct } from \"../../dto/validate.pin.bonus\";\nimport { StepFormEnum } from \"../../contants\";\nimport { IPinSent } from '../../dto/pin.sent';\n\n@Component({\n tag: 'crm-bonus-form',\n styleUrl: 'crm-bonus-form.css',\n shadow: true\n})\nexport class CrmBonusForm {\n\n private crmBonusService: CrmBonusService = CrmBonusService.getInstance();\n\n @Prop({ attribute: 'storename' }) storeName;\n @Prop() cartId;\n @Prop() products: Array<IProduct>;\n @Prop() customer: ICustomer = {\n phone: \"\",\n birthDate: \"\",\n document: \"\",\n name: \"\"\n };\n @Prop() sent: IPinSent;\n @Prop() stepNext: StepFormEnum;\n @Prop() phone: number;\n @Prop() loadingModal: boolean;\n\n @Prop() saveStore: (amount: number) => void;\n\n @Prop() cancel: () => void;\n\n @Prop() handleCustomerName: (name: string) => void;\n\n @State() loading: boolean = false;\n\n @State() step: number = StepFormEnum.STEP_NAME;\n\n @State() message: string;\n\n @State() bonus: IBonus;\n\n @Method()\n async setStep(step: StepFormEnum) {\n this.step = step\n }\n\n public async validateBonus(pin: string) {\n this.loading = true;\n this.message = \"\";\n const payload: IProccesPinBonusDto = {\n pin: pin,\n cellphone: parseInt(this.phone.toString()),\n storeId: this.sent.storeId.toString(),\n userId: this.sent.userId.toString(),\n checkoutId: this.cartId,\n checkoutProducts: this.products,\n name: null,\n storeName: this.storeName\n }\n\n try {\n this.bonus = await this.crmBonusService.validatePinBonus(payload);\n\n this.step = StepFormEnum.STEP_RESERVE;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false;\n }\n }\n\n public async reserveApply(amount: number) {\n this.loading = true;\n this.message = \"\";\n try {\n await this.reserve(amount);\n\n this.step = StepFormEnum.STEP_APPLY;\n\n this.saveStore(amount);\n } catch (error) {\n this.message = \"ocorreu um error ao solicitar a aplicação do bonus! tente novamente\"\n } finally {\n this.loading = false;\n }\n }\n\n public async reserve(amount: number) {\n await this.crmBonusService.reserve({\n redeemedBonus: amount,\n cartId: this.cartId,\n ticket: this.cartId,\n grossValue: Number(this.bonus.totalValue),\n storeName: this.storeName,\n storeId: this.bonus.storeId.toString(),\n userId: this.bonus.userId\n });\n }\n\n public handleCancel() {\n this.step = StepFormEnum.STEP_PHONE;\n this.cancel()\n }\n\n render() {\n return (\n <Host>\n {/* {this.step === StepFormEnum.STEP_PHONE && <phone-input value={this.customer.phone} sendPin={(phone) => this.sendPin(phone)} loading={this.loading} />} */}\n \n {this.step == StepFormEnum.STEP_NAME && <name-input loading={this.loadingModal} value={this.customer.name} applyName={(name) => this.handleCustomerName(name)} />}\n {this.step === StepFormEnum.STEP_PIN && <giftback-pin cancel={() => this.handleCancel()} sent={this.sent} validate={(data) => this.validateBonus(data)} loading={this.loading} />}\n\n {this.step === StepFormEnum.STEP_RESERVE && <giftback-progress loading={this.loading} cancel={() => this.handleCancel()} bonus={this.bonus} reserve={(amountRedeemed: number) => this.reserveApply(amountRedeemed)} />}\n {this.step === StepFormEnum.STEP_APPLY && <giftback-finish />}\n <p class=\"message-error\">{this.message}</p>\n </Host>\n )\n }\n}"]}
|
@@ -2,7 +2,7 @@ import { h } from "@stencil/core";
|
|
2
2
|
import success from "../../../crm-bonus/assets/svg/success-svgrepo-com.svg";
|
3
3
|
export class GiftbackFinish {
|
4
4
|
render() {
|
5
|
-
return (h("div", { key: '
|
5
|
+
return (h("div", { key: 'b50de7b8b640743412c0e60f9f5188942658ba6a', class: "message-finish" }, h("img", { key: 'fd7e019d408ae5cac8970b8e66b13ff73edd3e7f', src: success, width: 80 }), h("p", { key: '272db70f766f0cd9cdb06c006040f8899c423cb3' }, "Legal! O B\u00F4nus ser\u00E1 aplicado na sua compra.")));
|
6
6
|
}
|
7
7
|
static get is() { return "giftback-finish"; }
|
8
8
|
static get encapsulation() { return "shadow"; }
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"giftback-finish.js","sourceRoot":"","sources":["../../../../../../src/components/_crm-bonus-form/subcomponents/giftback-finish/giftback-finish.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,OAAO,MAAM,uDAAuD,CAAA;AAO3E,MAAM,OAAO,cAAc;IACvB,MAAM;QACF,OAAO,CACH,4DAAK,KAAK,EAAC,gBAAgB;YACvB,4DAAK,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,GAAI;YAChC,oHAAkD,CAChD,CACT,CAAA;IACL,CAAC;;;;;;;;;CACJ","sourcesContent":["import { Component, h } from \"@stencil/core\";\nimport success from '../../../crm-bonus/assets/svg/success-svgrepo-com.svg'\n\n@Component({\n tag: 'giftback-finish',\n styleUrl: 'giftback-finish.css',\n shadow: true\n})\nexport class GiftbackFinish {\n render() {\n return (\n <div class=\"message-finish\">\n <img src={success} width={80} />\n <p>Legal! O Bônus será aplicado na sua compra.</p>\n </div>\n )\n }\n}"]}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
:host {
|
2
2
|
display: block;
|
3
|
-
font-family: Arial, sans-serif;
|
4
3
|
}
|
5
4
|
|
6
5
|
.form-container-pin {
|
@@ -18,7 +17,7 @@
|
|
18
17
|
input {
|
19
18
|
width: 58px;
|
20
19
|
height: 40px;
|
21
|
-
font-size: 18px;
|
20
|
+
/* font-size: 18px; */
|
22
21
|
text-align: center;
|
23
22
|
border: 1px solid #ccc;
|
24
23
|
border-radius: 5px;
|
@@ -46,7 +45,7 @@ button {
|
|
46
45
|
padding: 15px;
|
47
46
|
min-height: 30px;
|
48
47
|
min-width: 120px;
|
49
|
-
font-size: 20px;
|
48
|
+
/* font-size: 20px; */
|
50
49
|
cursor: pointer;
|
51
50
|
}
|
52
51
|
|
@@ -59,7 +58,7 @@ button {
|
|
59
58
|
padding: 10px;
|
60
59
|
min-height: 30px;
|
61
60
|
min-width: 120px;
|
62
|
-
font-size: 19px;
|
61
|
+
/* font-size: 19px; */
|
63
62
|
cursor: pointer;
|
64
63
|
}
|
65
64
|
|
@@ -29,7 +29,7 @@ export class GiftbackPin {
|
|
29
29
|
}
|
30
30
|
}
|
31
31
|
render() {
|
32
|
-
return (h("div", { key: '
|
32
|
+
return (h("div", { key: '7486082912679fff55785889a17106fc6671fad5', class: "form-container-pin" }, h("div", { key: '3934dba774e30d5e3b118bc1c54de76484889b98' }, h("p", { key: 'c9cebcbf7fb2b2b378b9b3b0afcccb6839a403b6' }, "Insira o PIN de 4 d\u00EDgitos enviado por SMS."), h("div", { key: 'ebf9c9aaea23c88e4bd3a09897bef8545bd4b74f', class: "pin-container" }, this.pin.map((_, index) => (h("input", { type: "text", maxLength: 1, value: this.pin[index], onInput: (event) => this.handleInput(event, index) }))))), h("div", { key: 'bcf8955d5b946959e5500aecf7b1e3eb582cd41a', class: "footer-button" }, h("button", { key: 'a542d17e8d462400711be2a49a509c37811e962e', class: "button-cancel", disabled: this.loading, onClick: () => this.cancel() }, "Cancelar"), h("button", { key: '7f134440710b8f21f21665e880ec8094babf2a6b', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePin() }, !this.loading ? "Enviar" : h("loading-spinner", { size: "15px", color: "#fff" })))));
|
33
33
|
}
|
34
34
|
static get is() { return "giftback-pin"; }
|
35
35
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/_crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"giftback-pin.js","sourceRoot":"","sources":["../../../../../../src/components/_crm-bonus-form/subcomponents/giftback-pin/giftback-pin.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQ1D,MAAM,OAAO,WAAW;;;;;mBAMK,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;0BACV,KAAK;uBAET,KAAK;;IAEhC,WAAW,CAAC,KAAY,EAAE,KAAa;QACnC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;QAC/C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,4BAA4B;QACnE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QAExB,sCAAsC;QACtC,IAAI,KAAK,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,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,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,IAE7G,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,uBAAiB,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,GAAG,CAEtE,CACP,CAGJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop, State } from '@stencil/core';\nimport { IPinSent } from '../../../../dto/pin.sent';\n\n@Component({\n tag: 'giftback-pin',\n styleUrl: 'giftback-pin.css',\n shadow: true,\n})\nexport class GiftbackPin {\n\n @Prop() sent: IPinSent;\n @Prop() validate: (pin: string) => void;\n @Prop() cancel: () => void;\n\n @State() pin: string[] = ['', '', '', ''];\n @State() isVerified: boolean = false;\n\n @Prop() loading: boolean = 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 validatePin() {\n this.validate(this.pin.join(\"\"))\n }\n\n verifyPin() {\n const pinCode = this.pin.join('');\n if (pinCode === '9999') {\n this.isVerified = true;\n }\n }\n\n render() {\n return (\n <div class=\"form-container-pin\">\n <div >\n <p>Insira o PIN de 4 dígitos enviado por SMS.</p>\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 </div>\n\n <div class=\"footer-button\">\n <button class=\"button-cancel\" disabled={this.loading} onClick={() => this.cancel()}>\n Cancelar\n </button>\n <button class={`button ${this.loading ? 'disabled' : ''} `} disabled={this.loading} onClick={() => this.validatePin()}>\n {\n !this.loading ? \"Enviar\" : <loading-spinner size=\"15px\" color=\"#fff\" />\n }\n </button>\n </div>\n {/* <button onClick={() => this.verifyPin()}>Enviar</button>\n {this.isVerified && <p class=\"success\">Código verificado com sucesso!</p>} */}\n </div>\n );\n }\n}\n"]}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
:host {
|
2
2
|
display: flex;
|
3
|
-
font-family: Arial, sans-serif;
|
4
3
|
/* background-color: #f8f4eb; */
|
5
4
|
border-radius: 10px;
|
6
5
|
padding: 16px;
|
@@ -15,23 +14,23 @@
|
|
15
14
|
}
|
16
15
|
|
17
16
|
.giftback-container p {
|
18
|
-
font-size: medium;
|
17
|
+
/* font-size: medium; */
|
19
18
|
}
|
20
19
|
|
21
20
|
|
22
21
|
h3 {
|
23
22
|
margin: 0 0 10px;
|
24
|
-
font-size: 18px;
|
23
|
+
/* font-size: 18px; */
|
25
24
|
}
|
26
25
|
|
27
26
|
p {
|
28
27
|
margin: 5px 0;
|
29
|
-
font-size: 14px;
|
28
|
+
/* font-size: 14px; */
|
30
29
|
align-self: start;
|
31
30
|
}
|
32
31
|
|
33
32
|
.validity {
|
34
|
-
font-size: 12px;
|
33
|
+
/* font-size: 12px; */
|
35
34
|
color: #888;
|
36
35
|
}
|
37
36
|
|
@@ -42,7 +41,7 @@ p {
|
|
42
41
|
}
|
43
42
|
|
44
43
|
progress-container span {
|
45
|
-
font-size: 12px;
|
44
|
+
/* font-size: 12px; */
|
46
45
|
color: #666;
|
47
46
|
}
|
48
47
|
|
@@ -68,7 +67,7 @@ input[type='range']::-webkit-slider-thumb {
|
|
68
67
|
|
69
68
|
.remaining {
|
70
69
|
font-weight: bold;
|
71
|
-
font-size: 14px;
|
70
|
+
/* font-size: 14px; */
|
72
71
|
color: #333;
|
73
72
|
}
|
74
73
|
|
@@ -81,7 +80,7 @@ input[type='range']::-webkit-slider-thumb {
|
|
81
80
|
padding: 10px;
|
82
81
|
min-height: 30px;
|
83
82
|
min-width: 120px;
|
84
|
-
font-size: 19px;
|
83
|
+
/* font-size: 19px; */
|
85
84
|
cursor: pointer;
|
86
85
|
}
|
87
86
|
|
@@ -94,7 +93,7 @@ input[type='range']::-webkit-slider-thumb {
|
|
94
93
|
padding: 10px;
|
95
94
|
min-height: 30px;
|
96
95
|
min-width: 120px;
|
97
|
-
font-size: 19px;
|
96
|
+
/* font-size: 19px; */
|
98
97
|
cursor: pointer;
|
99
98
|
}
|
100
99
|
|
@@ -26,7 +26,7 @@ export class GiftbackProgress {
|
|
26
26
|
}
|
27
27
|
render() {
|
28
28
|
const remainingGiftback = this.bonus.minimumPurchase - this.bonus.totalValue;
|
29
|
-
return (h("div", { key: '
|
29
|
+
return (h("div", { key: 'c1680dc6ea2d0c11e850bf9d6d17154463012f2e', class: "giftback-container" }, h("p", { key: '6ec6b57b186af3e62ebd4cd3a4064c971533f573' }, "Voc\u00EA possui at\u00E9 ", h("strong", { key: 'e53a6abaf90459c8be4adf32a835f61abf283737' }, "R$ ", this.bonus.totalBonus.toFixed(2)), " de Giftback nessa compra!"), h("p", { key: '3fd4f5ea5f5a1938cf98b9d5aa998bd38c9bcf71', class: "validity" }, "V\u00E1lido at\u00E9: ", new Date(this.bonus.firstValidityDate).toLocaleDateString('pt-Br')), h("p", { key: 'c27d0b1880d1508006a62ceed34a1b4e49191622' }, "Voc\u00EA est\u00E1 utilizando ", h("strong", { key: '88bd223bf1e426cb15c2c79e1c01b1cdb0a087d7' }, "R$ ", this.usedValue.toFixed(2)), " nessa compra"), h("div", { key: 'c64d835dd75fce0cde17c56d79e5acc8c863a4c8', class: "progress-container" }, h("span", { key: 'f172eec3888deb302476d673dff783de8dbc9d9e' }, "R$ 0"), h("input", { key: '91f44e02cb55a9ea0754607e2c81304470d44129', disabled: true, type: "range", min: "0", step: "0.01", max: this.bonus.totalBonus, value: this.usedValue, onInput: (event) => this.handleSliderChange(event) }), h("span", { key: '39c34000013b29ee2a5ced46c87e75acd8f0ccb2' }, "R$ ", this.bonus.totalBonus.toFixed(2))), h("p", { key: '027d3d6d7cb51a5b3ac6779273fc4e922e67ac6b', class: "remaining" }, "Faltam ", h("strong", { key: '979b7e9fdcfe1b3220f5fa6e76bc2daaa662c59c' }, "R$ ", remainingGiftback > 0 ? remainingGiftback.toFixed(2) : Number(0).toFixed(2)), " para utilizar o valor total do Giftback."), h("div", { key: 'dc966024c72ff82b941ac70483fb93aec926049c', class: "footer-button-giftback" }, h("button", { key: 'f68f1f00a82bb9bed9a7b3419d04056cee02244c', class: "button-cancel", disabled: this.loading, onClick: () => this.cancel() }, "Cancelar"), h("button", { key: 'e4218c2baec40e7799391a53795465f58be263e6', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.handleReserve(this.usedValue) }, !this.loading ? "Aplicar" : h("loading-spinner", { size: "10px", color: "#fff" })))));
|
30
30
|
}
|
31
31
|
static get is() { return "giftback-progress"; }
|
32
32
|
static get encapsulation() { return "shadow"; }
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"giftback-progress.js","sourceRoot":"","sources":["../../../../../../src/components/_crm-bonus-form/subcomponents/giftback-progress/giftback-progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAQ1D,MAAM,OAAO,gBAAgB;;yBACI,CAAC;uBAEH,KAAK;qBAEC;YAC7B,UAAU,EAAE,CAAC;YACb,MAAM,EAAE,EAAE;YACV,eAAe,EAAE,CAAC;YAClB,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,CAAC;YAClB,iBAAiB,EAAE,EAAE;SACxB;;;;IAKD,iBAAiB;QACb,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,k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AAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAU;4DACxG;YAEJ,4DAAK,KAAK,EAAC,wBAAwB;gBAE/B,+DAAQ,KAAK,EAAC,eAAe,EAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,eAEzE;gBAET,+DAAQ,KAAK,EAAE,UAAU,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,IAE7H,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,uBAAiB,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,GAAG,CAEvE,CACP,CACJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, State, Prop } from '@stencil/core';\nimport { IBonus } from '../../../../dto/validate.pin.bonus';\n\n@Component({\n tag: 'giftback-progress',\n styleUrl: 'giftback-progress.css',\n shadow: true,\n})\nexport class GiftbackProgress {\n @State() usedValue: number = 0;\n\n @Prop() loading: boolean = false;\n\n @Prop() bonus: Partial<IBonus> = {\n totalBonus: 0,\n cartId: \"\",\n minimumPurchase: 0,\n bonusBalance: 0,\n calculatedValue: 0,\n firstValidityDate: \"\"\n };\n\n @Prop() reserve: (amountRedeemed: number) => void;\n @Prop() cancel: () => void;\n\n componentWillLoad() {\n this.usedValue = parseFloat(this.bonus.bonusBalance.toString());\n }\n\n handleSliderChange(event: Event) {\n const input = event.target as HTMLInputElement;\n this.usedValue = parseFloat(input.value);\n }\n\n async handleReserve(value: number) {\n this.reserve(value);\n }\n\n render() {\n const remainingGiftback = this.bonus.minimumPurchase - this.bonus.totalValue;\n\n return (\n <div class=\"giftback-container\">\n <p>\n Você possui até <strong>R$ {this.bonus.totalBonus.toFixed(2)}</strong> de Giftback nessa compra!\n </p>\n <p class=\"validity\">Válido até: {new Date(this.bonus.firstValidityDate).toLocaleDateString('pt-Br')}</p>\n\n <p>Você está utilizando <strong>R$ {this.usedValue.toFixed(2)}</strong> nessa compra</p>\n\n <div class=\"progress-container\">\n <span>R$ 0</span>\n <input\n disabled\n type=\"range\"\n min=\"0\"\n step=\"0.01\"\n max={this.bonus.totalBonus}\n value={this.usedValue}\n onInput={(event) => this.handleSliderChange(event)}\n />\n <span>R$ {this.bonus.totalBonus.toFixed(2)}</span>\n </div>\n\n <p class=\"remaining\">\n Faltam <strong>R$ {remainingGiftback > 0 ? remainingGiftback.toFixed(2) : Number(0).toFixed(2)}</strong> para utilizar o valor total do Giftback.\n </p>\n\n <div class=\"footer-button-giftback\">\n\n <button class=\"button-cancel\" disabled={this.loading} onClick={() => this.cancel()} >\n Cancelar\n </button>\n\n <button class={`button ${this.loading ? 'disabled' : ''} `} disabled={this.loading} onClick={() => this.handleReserve(this.usedValue)}>\n {\n !this.loading ? \"Aplicar\" : <loading-spinner size=\"10px\" color=\"#fff\" />\n }\n </button>\n </div>\n </div>\n );\n }\n}\n"]}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
width: 90%;
|
4
4
|
height: 24px;
|
5
5
|
padding: 7px 18px;
|
6
|
-
font-size: 14px;
|
6
|
+
/* font-size: 14px; */
|
7
7
|
line-height: 1.42857143;
|
8
8
|
color: #555;
|
9
9
|
background-color: #fff;
|
@@ -21,7 +21,7 @@
|
|
21
21
|
display: inline-block;
|
22
22
|
padding: 6px 12px;
|
23
23
|
margin-bottom: 0;
|
24
|
-
font-size: 14px;
|
24
|
+
/* font-size: 14px; */
|
25
25
|
font-weight: 400;
|
26
26
|
line-height: 1.42857143;
|
27
27
|
text-align: center;
|
@@ -83,7 +83,7 @@ button:hover {
|
|
83
83
|
border-radius: 10px;
|
84
84
|
padding: 11px;
|
85
85
|
min-width: 120px;
|
86
|
-
font-size: 20px;
|
86
|
+
/* font-size: 20px; */
|
87
87
|
cursor: pointer;
|
88
88
|
}
|
89
89
|
|
@@ -96,7 +96,7 @@ button:hover {
|
|
96
96
|
padding: 10px;
|
97
97
|
min-height: 30px;
|
98
98
|
min-width: 120px;
|
99
|
-
font-size: 19px;
|
99
|
+
/* font-size: 19px; */
|
100
100
|
cursor: pointer;
|
101
101
|
}
|
102
102
|
|
@@ -19,9 +19,10 @@ export class NameInput {
|
|
19
19
|
this.applyName(name);
|
20
20
|
}
|
21
21
|
render() {
|
22
|
-
return (h("div", { key: '
|
22
|
+
return (h("div", { key: 'e7340de629d6b39389a55b1b93e85ff9481fe635', class: "name-container" }, h("p", { key: '1b8306842614d144b9776956053828f23adfa3ab' }, "Seu Nome:"), h("input", { key: 'eb92740ed0fc8f56f4dc2d6af0fc47c083bb1368', class: "bc-form-control", type: "text", value: this.value, onChange: (event) => this.handleChangeName(event) }), h("p", { key: 'c184767bc91444cb357e3103a909186fa8223d56' }, this.message), h("div", { key: '80b817a03faa730519ddd3d1e61a227ead8a90cf', class: "footer-button" }, h("button", { key: '4863eed4addae2d3dee9ee415e8797cabf7b054c', class: "button-cancel", disabled: this.loading, onClick: () => this.cancel() }, "Cancelar"), h("button", { key: 'b50b5919b0db45d13abc7d968baba4e8616e9ed5', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.handleSetName(this.newValue) }, !this.loading ? "Continua" : h("loading-spinner", { size: "15px", color: "#fff" })))));
|
23
23
|
}
|
24
24
|
static get is() { return "name-input"; }
|
25
|
+
static get encapsulation() { return "shadow"; }
|
25
26
|
static get originalStyleUrls() {
|
26
27
|
return {
|
27
28
|
"$": ["name-input.css"]
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"name-input.js","sourceRoot":"","sources":["../../../../../../src/components/_crm-bonus-form/subcomponents/name-input/name-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAO1D,MAAM,OAAO,SAAS;;;;;;;;;IAWlB,gBAAgB,CAAC,KAAU;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;IACvC,CAAC;IAGD,aAAa,CAAC,IAAY;QACtB,IAAG,CAAC,IAAI,EAAE,CAAC;YACP,IAAI,CAAC,OAAO,GAAG,kBAAkB,CAAC;YAClC,OAAM;QACV,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAED,MAAM;QACF,OAAO,CACH,4DAAK,KAAK,EAAC,gBAAgB;YACvB,wEAAgB;YAChB,8DAAO,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAI;YAEnH,4DAAK,IAAI,CAAC,OAAO,CAAM;YAMvB,4DAAK,KAAK,EAAC,eAAe;gBACtB,+DAAQ,KAAK,EAAC,eAAe,EAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,eAEzE;gBACT,+DAAQ,KAAK,EAAE,UAAU,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,IAE5H,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,uBAAiB,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,GAAG,CAExE,CACP,CACJ,CACT,CAAA;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Prop, State, h } from \"@stencil/core\";\n\n@Component({\n tag: 'name-input',\n styleUrl: 'name-input.css',\n shadow: true\n})\nexport class NameInput {\n\n @Prop() value: string;\n\n @Prop() loading: boolean;\n @Prop() applyName: (value: string) => void;\n @Prop() cancel: () => void;\n \n @State() newValue: string;\n @State() message: string;\n\n handleChangeName(event: any) {\n this.newValue = event.target.value;\n }\n\n\n handleSetName(name: string) {\n if(!name) {\n this.message = \"Informe seu nome\";\n return\n }\n\n this.applyName(name);\n }\n\n render() {\n return (\n <div class=\"name-container\">\n <p>Seu Nome:</p>\n <input class=\"bc-form-control\" type=\"text\" value={this.value} onChange={(event) => this.handleChangeName(event)} />\n\n <p>{ this.message }</p>\n\n {/* <div class=\"bc-footer-btn\">\n <button class=\"bc-btn bc-btn-process\" onClick={() => this.applyName(this.newValue)} >Prosseguir</button>\n </div> */}\n\n <div class=\"footer-button\">\n <button class=\"button-cancel\" disabled={this.loading} onClick={() => this.cancel()}>\n Cancelar\n </button>\n <button class={`button ${this.loading ? 'disabled' : ''} `} disabled={this.loading} onClick={() => this.handleSetName(this.newValue)}>\n {\n !this.loading ? \"Continua\" : <loading-spinner size=\"15px\" color=\"#fff\" />\n }\n </button>\n </div>\n </div>\n )\n }\n}"]}
|
@@ -10,9 +10,10 @@ export class PhoneInput {
|
|
10
10
|
await this.sendPin(phone);
|
11
11
|
}
|
12
12
|
render() {
|
13
|
-
return (h("div", { key: '
|
13
|
+
return (h("div", { key: '4b2f63715915ccb6f93280e58a3ff4cc7e33565f', class: "form-container" }, h("phone-input-mask", { key: '674a74515ad83198f23e969c21f8f19f2c359054', initialValue: this.value, ref: ref => this.phoneInputMask = ref }), h("button", { key: 'd5149879044c72b5a06780eb9a9aea05b0ad966a', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "validar" : h("loading-spinner", { size: "11px", color: "#fff" }))));
|
14
14
|
}
|
15
15
|
static get is() { return "phone-input"; }
|
16
|
+
static get encapsulation() { return "shadow"; }
|
16
17
|
static get properties() {
|
17
18
|
return {
|
18
19
|
"sendPin": {
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"phone.input.js","sourceRoot":"","sources":["../../../../../../src/components/_crm-bonus-form/subcomponents/phone/phone.input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAMnD,MAAM,OAAO,UAAU;;;;;;IAQnB,KAAK,CAAC,aAAa;QACf,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;QACnD,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM;QACF,OAAO,CACH,4DAAK,KAAK,EAAC,gBAAgB;YACvB,yEAAkB,YAAY,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,GAAG,GAAG,GAAI;YACrF,+DAAQ,KAAK,EAAE,0BAA0B,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,IAE/H,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,uBAAiB,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,GAAG,CAEvE,CACP,CACT,CAAA;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: 'phone-input',\n shadow: true\n})\nexport class PhoneInput {\n\n private phoneInputMask: HTMLPhoneInputMaskElement;\n\n @Prop() sendPin: Function;\n @Prop() loading: boolean;\n @Prop() value: string;\n\n async validatePhone() {\n const phone = await this.phoneInputMask.getPhone();\n await this.sendPin(phone);\n }\n\n render() {\n return (\n <div class=\"form-container\">\n <phone-input-mask initialValue={this.value} ref={ref => this.phoneInputMask = ref} />\n <button class={`btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `} disabled={this.loading} onClick={() => this.validatePhone()}>\n {\n !this.loading ? \"validar\" : <loading-spinner size=\"11px\" color=\"#fff\" />\n }\n </button>\n </div>\n )\n }\n}"]}
|
@@ -10,9 +10,10 @@ export class PhoneCancelInput {
|
|
10
10
|
await this.sendPin(phone);
|
11
11
|
}
|
12
12
|
render() {
|
13
|
-
return (h("div", { key: '
|
13
|
+
return (h("div", { key: 'f7193a1738d8703d87a22a05247fbd98e1056c3e', class: "form-container" }, h("phone-input-mask", { key: '1fff9798c93f258b83be39b827565ab1c81ed41e', initialValue: `Valor aplicado R$ ${this.value}`, ref: ref => this.phoneInputMask = ref, disabled: true }), h("button", { key: 'ab8e0245f18b81531a2def44f69f6b4ddde8eb2a', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "Cancelar" : h("loading-spinner", { size: "11px", color: "#fff" }))));
|
14
14
|
}
|
15
15
|
static get is() { return "phone-cancel-input"; }
|
16
|
+
static get encapsulation() { return "shadow"; }
|
16
17
|
static get properties() {
|
17
18
|
return {
|
18
19
|
"sendPin": {
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"phone.cancel.input.js","sourceRoot":"","sources":["../../../../../../src/components/_crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAMnD,MAAM,OAAO,gBAAgB;;;;;;IAQzB,KAAK,CAAC,aAAa;QACf,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;QACnD,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM;QACF,OAAO,CACH,4DAAK,KAAK,EAAC,gBAAgB;YACvB,yEAAkB,YAAY,EAAE,qBAAqB,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,GAAG,GAAG,EAAE,QAAQ,EAAE,IAAI,GAAI;YAC5H,+DAAQ,KAAK,EAAE,0BAA0B,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,IAE/H,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,uBAAiB,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,GAAG,CAExE,CACP,CACT,CAAA;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: 'phone-cancel-input',\n shadow: true\n})\nexport class PhoneCancelInput {\n\n private phoneInputMask: HTMLPhoneInputMaskElement;\n\n @Prop() sendPin: Function;\n @Prop() loading: boolean;\n @Prop() value: string;\n\n async validatePhone() {\n const phone = await this.phoneInputMask.getPhone();\n await this.sendPin(phone);\n }\n\n render() {\n return (\n <div class=\"form-container\">\n <phone-input-mask initialValue={`Valor aplicado R$ ${this.value}`} ref={ref => this.phoneInputMask = ref} disabled={true} />\n <button class={`btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `} disabled={this.loading} onClick={() => this.validatePhone()}>\n {\n !this.loading ? \"Cancelar\" : <loading-spinner size=\"11px\" color=\"#fff\" />\n }\n </button>\n </div>\n )\n }\n}"]}
|
@@ -6,7 +6,7 @@ export class Button {
|
|
6
6
|
this.handleClick = undefined;
|
7
7
|
}
|
8
8
|
render() {
|
9
|
-
return (h("div", { key: '
|
9
|
+
return (h("div", { key: '6fce890879cd807d0893166b22de304739e6dcd7', class: "crm-contaner-button" }, h("button", { key: '843f7745bf183fb7ad88e70a60f25ac462de4e84', class: "crm-button", onClick: () => this.handleClick() }, !this.loading ? this.txtBtn : h("loading-spinner", { size: "15px", color: "#fff" }))));
|
10
10
|
}
|
11
11
|
static get is() { return "crm-button"; }
|
12
12
|
static get originalStyleUrls() {
|
@@ -31,7 +31,7 @@ export class CountdownTimer {
|
|
31
31
|
return `${parseInt(minutes.toString())}m ${seconds}s`;
|
32
32
|
}
|
33
33
|
render() {
|
34
|
-
return (h("label", { key: '
|
34
|
+
return (h("label", { key: '2417e834fbc3bf47fe47873c6713ada3b1b1e835' }, this.padLeft()));
|
35
35
|
}
|
36
36
|
static get is() { return "countdown-timer"; }
|
37
37
|
static get encapsulation() { return "shadow"; }
|
@@ -35,7 +35,7 @@ margin-bottom: 20px; */
|
|
35
35
|
padding: 15px;
|
36
36
|
min-height: 30px;
|
37
37
|
min-width: 120px;
|
38
|
-
font-size: 20px;
|
38
|
+
/* font-size: 20px; */
|
39
39
|
cursor: pointer;
|
40
40
|
margin-left: 10px;
|
41
41
|
height: 70px;
|
@@ -52,7 +52,7 @@ margin-bottom: 20px; */
|
|
52
52
|
display: inline-block;
|
53
53
|
padding: 6px 12px;
|
54
54
|
margin-bottom: 0;
|
55
|
-
font-size: 14px;
|
55
|
+
/* font-size: 14px; */
|
56
56
|
font-weight: 400;
|
57
57
|
line-height: 1.42857143;
|
58
58
|
text-align: center;
|
@@ -78,7 +78,6 @@ margin-bottom: 20px; */
|
|
78
78
|
}
|
79
79
|
|
80
80
|
.message-alert {
|
81
|
-
font-family: sans-serif;
|
82
81
|
color: #df4d4d;
|
83
82
|
margin-top: 5px;
|
84
83
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { h } from "@stencil/core";
|
2
2
|
import { CrmBonusService } from "../../services/crmbonus.service";
|
3
|
-
import { StepFormEnum } from "../../contants";
|
3
|
+
import { defaultStyles, StepFormEnum } from "../../contants";
|
4
4
|
import i18next from "../../i18n/i18n";
|
5
5
|
import { buildProductsByWake } from "../../helpers/build.payload.helper";
|
6
6
|
import { getCart } from "../../helpers/cart.helper";
|
@@ -26,6 +26,7 @@ export class CrmBonus {
|
|
26
26
|
this.sent = undefined;
|
27
27
|
this.session = undefined;
|
28
28
|
this.loading_reprocess = false;
|
29
|
+
this.styles = defaultStyles;
|
29
30
|
}
|
30
31
|
async resetBonus() {
|
31
32
|
console.log('[START RESET BONUS]!!!!!');
|
@@ -46,6 +47,7 @@ export class CrmBonus {
|
|
46
47
|
this.loading_reprocess = !this.loading_reprocess;
|
47
48
|
}
|
48
49
|
async reprocess() {
|
50
|
+
console.log("[CRMBONUS] - reprocess");
|
49
51
|
this.loading_reprocess = true;
|
50
52
|
try {
|
51
53
|
const isUse = localStorage.getItem(USED_KEY);
|
@@ -61,30 +63,27 @@ export class CrmBonus {
|
|
61
63
|
this.loading_reprocess = false;
|
62
64
|
}
|
63
65
|
}
|
64
|
-
// @Watch("productsInString")
|
65
|
-
// async watchProducts(newValue: string) {
|
66
|
-
// try {
|
67
|
-
// console.log('[update products list]');
|
68
|
-
// this.productsInString = newValue;
|
69
|
-
// await this.handleLoad();
|
70
|
-
// await this.resetBonus();
|
71
|
-
// } catch (err) {
|
72
|
-
// console.debug('[watchProducts]', err.message);
|
73
|
-
// }
|
74
|
-
// }
|
75
66
|
async componentWillLoad() {
|
67
|
+
window.addEventListener('productRemovedFromCart', async () => {
|
68
|
+
await this.reprocess();
|
69
|
+
});
|
70
|
+
window.addEventListener('productAddedToCart', async () => {
|
71
|
+
await this.reprocess();
|
72
|
+
});
|
76
73
|
i18next.changeLanguage(i18next.language);
|
77
74
|
await this.handleLoad();
|
78
75
|
await this.loadSession();
|
79
76
|
await this.loadConfigStore();
|
80
77
|
}
|
81
78
|
async loadConfigStore() {
|
82
|
-
await this.crmBonusService.getCustomization(this.cartWake.store.name);
|
79
|
+
const customization = await this.crmBonusService.getCustomization(this.cartWake.store.name);
|
80
|
+
if (!customization.keepStoreFrontStyle) {
|
81
|
+
this.styles = null;
|
82
|
+
}
|
83
83
|
}
|
84
84
|
async handleLoad() {
|
85
85
|
try {
|
86
86
|
this.cartWake = this.cart ? new CartWake(JSON.parse(this.cart)) : await getCart();
|
87
|
-
console.log('[handleLoad]', this.cartWake);
|
88
87
|
if (this.cartWake.user.id) {
|
89
88
|
this.customer = await this.crmBonusService.getCustomer(this.cartWake.user.id, this.cartWake.store.name);
|
90
89
|
console.log('customer', this.customer);
|
@@ -107,7 +106,6 @@ export class CrmBonus {
|
|
107
106
|
}, 1500000);
|
108
107
|
}
|
109
108
|
async buildAndGetProducts(productsWake) {
|
110
|
-
console.log('productsWake', productsWake);
|
111
109
|
const key = `bc-products:${this.cartWake.id}`;
|
112
110
|
const productsString = JSON.stringify(productsWake);
|
113
111
|
localStorage.setItem(key, productsString);
|
@@ -203,10 +201,10 @@ export class CrmBonus {
|
|
203
201
|
this.showModal = true;
|
204
202
|
}
|
205
203
|
render() {
|
206
|
-
return (h("loading-container", { key: '
|
204
|
+
return (h("loading-container", { key: 'e251ca8b57678398c50215adf084aa191c5a94f7', loading: this.loading_reprocess }, h("crm-giftback-form", { key: 'b08583a79649660383aae5a276816ce3656059bc', customStyles: this.styles, style: { position: "relative" }, ref: ref => this.crmBonusRef = ref, storeName: this.cartWake.store.name, products: this.buildProducts(), cartId: this.cartWake.id, customer: this.customer, loadProducts: () => this.buildProducts(), loadAll: () => this.handleLoad() })));
|
207
205
|
}
|
208
206
|
static get is() { return "crm-bonus"; }
|
209
|
-
static get encapsulation() { return "
|
207
|
+
static get encapsulation() { return "shadow"; }
|
210
208
|
static get originalStyleUrls() {
|
211
209
|
return {
|
212
210
|
"$": ["crm-bonus.css"]
|
@@ -251,7 +249,8 @@ export class CrmBonus {
|
|
251
249
|
"amountCancel": {},
|
252
250
|
"sent": {},
|
253
251
|
"session": {},
|
254
|
-
"loading_reprocess": {}
|
252
|
+
"loading_reprocess": {},
|
253
|
+
"styles": {}
|
255
254
|
};
|
256
255
|
}
|
257
256
|
static get methods() {
|