crmbonus-component-wake 1.0.47 → 2.0.48
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 +28 -0
- package/dist/cjs/app-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/countdown-timer_4.cjs.entry.js +176 -0
- package/dist/cjs/countdown-timer_4.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-bonus-form.cjs.entry.js +103 -0
- package/dist/cjs/crm-bonus-form.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-bonus-note.cjs.entry.js +16 -6
- package/dist/cjs/crm-bonus-note.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-bonus.cjs.entry.js +41 -5
- package/dist/cjs/crm-bonus.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-button.cjs.entry.js +24 -0
- package/dist/cjs/crm-button.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-giftback-form.cjs.entry.js +171 -0
- package/dist/cjs/crm-giftback-form.cjs.entry.js.map +1 -0
- package/dist/cjs/crmbonus-component-wake.cjs.js +2 -2
- package/dist/cjs/{crmbonus.service-e375ebfe.js → crmbonus.service-7991795d.js} +10 -2
- package/dist/cjs/crmbonus.service-7991795d.js.map +1 -0
- package/dist/cjs/giftback-finish_4.cjs.entry.js +6 -6
- package/dist/cjs/giftback-finish_4.cjs.entry.js.map +1 -1
- package/dist/cjs/i18n-818275e6.js +2209 -0
- package/dist/cjs/i18n-818275e6.js.map +1 -0
- package/dist/cjs/{index-52d8a075.js → index-80419303.js} +9 -4
- package/dist/cjs/index-80419303.js.map +1 -0
- package/dist/cjs/{index-861e0cbe.js → index-96a8951f.js} +5 -1
- package/dist/cjs/index-96a8951f.js.map +1 -0
- package/dist/cjs/info.config.helper-c5d9f781.js +16 -0
- package/dist/cjs/info.config.helper-c5d9f781.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loading-spinner.cjs.entry.js +2 -2
- package/dist/cjs/pedido-finalizado.cjs.entry.js +3 -3
- package/dist/cjs/phone-cancel-input.cjs.entry.js +25 -0
- package/dist/cjs/phone-cancel-input.cjs.entry.js.map +1 -0
- package/dist/cjs/phone-input-mask.cjs.entry.js +17 -4
- package/dist/cjs/phone-input-mask.cjs.entry.js.map +1 -1
- package/dist/cjs/phone-input.cjs.entry.js +25 -0
- package/dist/cjs/phone-input.cjs.entry.js.map +1 -0
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/button/crm-button.css +22 -0
- package/dist/collection/components/button/index.js +59 -0
- package/dist/collection/components/button/index.js.map +1 -1
- package/dist/collection/components/countdown-timer/countdown-timer.js +51 -0
- package/dist/collection/components/countdown-timer/countdown-timer.js.map +1 -0
- package/dist/collection/components/crm-bonus/crm-bonus.css +0 -3
- package/dist/collection/components/crm-bonus/crm-bonus.js +38 -2
- package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
- package/dist/collection/components/crm-bonus-form/crm-bonus-form.js +2 -2
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js +1 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.css +1 -5
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js +1 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.css +1 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js +1 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/name-input/name-input.js +1 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js +1 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js +1 -1
- package/dist/collection/components/giftback-form/giftback-form.css +74 -0
- package/dist/collection/components/giftback-form/giftback-form.js +246 -0
- package/dist/collection/components/giftback-form/giftback-form.js.map +1 -0
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.css +154 -0
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js +156 -0
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js.map +1 -0
- package/dist/collection/components/giftback-form/subcomponents/giftback-message/giftback-massage.js +11 -0
- package/dist/collection/components/giftback-form/subcomponents/giftback-message/giftback-massage.js.map +1 -0
- package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js +80 -0
- package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js.map +1 -0
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.css +84 -0
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js +174 -0
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js.map +1 -0
- 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.css +23 -7
- package/dist/collection/components/note/crm-bonus-note.js +33 -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 +18 -39
- package/dist/collection/components/phone/phone-input-mask.js +17 -3
- package/dist/collection/components/phone/phone-input-mask.js.map +1 -1
- package/dist/collection/contants/index.js +2 -0
- package/dist/collection/contants/index.js.map +1 -1
- package/dist/collection/helpers/info.config.helper.js +11 -0
- package/dist/collection/helpers/info.config.helper.js.map +1 -0
- package/dist/collection/i18n/i18n.js +25 -0
- package/dist/collection/i18n/i18n.js.map +1 -0
- package/dist/collection/services/crmbonus.service.js +8 -0
- package/dist/collection/services/crmbonus.service.js.map +1 -1
- package/dist/components/app-modal.js +39 -1
- package/dist/components/app-modal.js.map +1 -1
- package/dist/components/countdown-timer.d.ts +11 -0
- package/dist/components/countdown-timer.js +8 -0
- package/dist/components/countdown-timer.js.map +1 -0
- package/dist/components/crm-bonus-form.js +158 -1
- package/dist/components/crm-bonus-form.js.map +1 -1
- package/dist/components/crm-bonus-note.js +19 -7
- package/dist/components/crm-bonus-note.js.map +1 -1
- package/dist/components/crm-bonus.js +58 -33
- package/dist/components/crm-bonus.js.map +1 -1
- package/dist/components/crm-button.d.ts +11 -0
- package/dist/components/crm-button.js +8 -0
- package/dist/components/crm-button.js.map +1 -0
- package/dist/components/crm-giftback-form.d.ts +11 -0
- package/dist/components/crm-giftback-form.js +8 -0
- package/dist/components/crm-giftback-form.js.map +1 -0
- package/dist/components/giftback-finish.js +1 -1
- package/dist/components/giftback-info.d.ts +11 -0
- package/dist/components/giftback-info.js +8 -0
- package/dist/components/giftback-info.js.map +1 -0
- 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-spinner.js +1 -1
- package/dist/components/name-input.js +1 -1
- package/dist/components/p-0a57e57f.js +91 -0
- package/dist/components/p-0a57e57f.js.map +1 -0
- package/dist/components/p-1d5eeac0.js +2207 -0
- package/dist/components/p-1d5eeac0.js.map +1 -0
- package/dist/components/{p-faf7103e.js → p-2f266d73.js} +6 -2
- package/dist/components/p-2f266d73.js.map +1 -0
- package/dist/{esm/crmbonus.service-4ee773c8.js → components/p-384fabf7.js} +10 -2
- package/dist/components/p-384fabf7.js.map +1 -0
- package/dist/components/p-39d680b6.js +49 -0
- package/dist/components/p-39d680b6.js.map +1 -0
- package/dist/components/p-46578efa.js +44 -0
- package/dist/components/p-46578efa.js.map +1 -0
- package/dist/components/{p-0e99f907.js → p-4f18f4c0.js} +5 -5
- package/dist/components/p-4f18f4c0.js.map +1 -0
- package/dist/components/{p-ddc0ac71.js → p-5c3fe5a8.js} +3 -3
- package/dist/components/{p-ddc0ac71.js.map → p-5c3fe5a8.js.map} +1 -1
- package/dist/components/p-5f0003a4.js +62 -0
- package/dist/components/p-5f0003a4.js.map +1 -0
- package/dist/components/p-6703fdff.js +106 -0
- package/dist/components/p-6703fdff.js.map +1 -0
- package/dist/components/p-6a95cc63.js +238 -0
- package/dist/components/p-6a95cc63.js.map +1 -0
- package/dist/components/p-75ba7b9a.js +14 -0
- package/dist/components/p-75ba7b9a.js.map +1 -0
- package/dist/components/{p-19b83423.js → p-a30bd6b1.js} +4 -4
- package/dist/components/{p-19b83423.js.map → p-a30bd6b1.js.map} +1 -1
- package/dist/{esm/index-ea02697e.js → components/p-a561251a.js} +4 -2
- package/dist/components/p-a561251a.js.map +1 -0
- package/dist/components/p-be365312.js +76 -0
- package/dist/components/p-be365312.js.map +1 -0
- package/dist/components/{p-e2727638.js → p-f168d5f6.js} +4 -4
- package/dist/components/p-f168d5f6.js.map +1 -0
- package/dist/components/{p-530006e6.js → p-f5fcff75.js} +3 -3
- package/dist/components/{p-530006e6.js.map → p-f5fcff75.js.map} +1 -1
- package/dist/components/pedido-finalizado.js +3 -3
- package/dist/components/phone-cancel-input.js +48 -1
- package/dist/components/phone-cancel-input.js.map +1 -1
- package/dist/components/phone-form.d.ts +11 -0
- package/dist/components/phone-form.js +8 -0
- package/dist/components/phone-form.js.map +1 -0
- package/dist/components/phone-input-mask.js +1 -1
- package/dist/components/phone-input.js +48 -1
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/pin-form.d.ts +11 -0
- package/dist/components/pin-form.js +8 -0
- package/dist/components/pin-form.js.map +1 -0
- package/dist/crmbonus-component-wake/crmbonus-component-wake.css +1 -0
- 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-1d5eeac0.js +2 -0
- package/dist/crmbonus-component-wake/p-1d5eeac0.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-878c694e.js → p-384fabf7.js} +2 -2
- package/dist/crmbonus-component-wake/p-384fabf7.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-a01c57ab.entry.js → p-3beb5158.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-5a8fa5b9.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-5a8fa5b9.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-5ede3b10.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-5ede3b10.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-66f41fd0.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-66f41fd0.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-6e6bf96e.js +3 -0
- package/dist/crmbonus-component-wake/p-6e6bf96e.js.map +1 -0
- package/dist/crmbonus-component-wake/p-75ba7b9a.js +2 -0
- package/dist/crmbonus-component-wake/p-75ba7b9a.js.map +1 -0
- package/dist/crmbonus-component-wake/p-830b5bdc.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-830b5bdc.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-8944b009.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-8944b009.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-8b9a1aec.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-8b9a1aec.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-001e3e2b.entry.js → p-9514339e.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-a561251a.js +2 -0
- package/dist/crmbonus-component-wake/p-a561251a.js.map +1 -0
- package/dist/crmbonus-component-wake/p-adb37e26.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-adb37e26.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-c72a11ba.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-c72a11ba.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-cc452df3.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-cc452df3.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-d0349daf.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-d0349daf.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-e9cc180e.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-e9cc180e.entry.js.map +1 -0
- package/dist/env.js +1 -1
- package/dist/env.js.map +1 -1
- package/dist/esm/app-modal.entry.js +24 -0
- package/dist/esm/app-modal.entry.js.map +1 -0
- package/dist/esm/countdown-timer_4.entry.js +169 -0
- package/dist/esm/countdown-timer_4.entry.js.map +1 -0
- package/dist/esm/crm-bonus-form.entry.js +99 -0
- package/dist/esm/crm-bonus-form.entry.js.map +1 -0
- package/dist/esm/crm-bonus-note.entry.js +16 -6
- package/dist/esm/crm-bonus-note.entry.js.map +1 -1
- package/dist/esm/crm-bonus.entry.js +41 -5
- package/dist/esm/crm-bonus.entry.js.map +1 -1
- package/dist/esm/crm-button.entry.js +20 -0
- package/dist/esm/crm-button.entry.js.map +1 -0
- package/dist/esm/crm-giftback-form.entry.js +167 -0
- package/dist/esm/crm-giftback-form.entry.js.map +1 -0
- package/dist/esm/crmbonus-component-wake.js +3 -3
- package/dist/{components/p-878c694e.js → esm/crmbonus.service-a846150c.js} +10 -2
- package/dist/esm/crmbonus.service-a846150c.js.map +1 -0
- package/dist/esm/giftback-finish_4.entry.js +6 -6
- package/dist/esm/giftback-finish_4.entry.js.map +1 -1
- package/dist/esm/i18n-853fedb3.js +2207 -0
- package/dist/esm/i18n-853fedb3.js.map +1 -0
- package/dist/esm/index-3c6d4feb.js +14 -0
- package/dist/esm/index-3c6d4feb.js.map +1 -0
- package/dist/esm/{index-9f7bde48.js → index-a4c14fca.js} +9 -4
- package/dist/esm/index-a4c14fca.js.map +1 -0
- package/dist/esm/info.config.helper-42d9ddf9.js +14 -0
- package/dist/esm/info.config.helper-42d9ddf9.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loading-spinner.entry.js +2 -2
- package/dist/esm/pedido-finalizado.entry.js +3 -3
- package/dist/esm/phone-cancel-input.entry.js +21 -0
- package/dist/esm/phone-cancel-input.entry.js.map +1 -0
- package/dist/esm/phone-input-mask.entry.js +17 -4
- package/dist/esm/phone-input-mask.entry.js.map +1 -1
- package/dist/esm/phone-input.entry.js +21 -0
- package/dist/esm/phone-input.entry.js.map +1 -0
- package/dist/types/components/button/index.d.ts +5 -0
- package/dist/types/components/countdown-timer/countdown-timer.d.ts +8 -0
- package/dist/types/components/crm-bonus/crm-bonus.d.ts +1 -0
- package/dist/types/components/giftback-form/giftback-form.d.ts +32 -0
- package/dist/types/components/giftback-form/subcomponents/giftback-info/giftback-info.d.ts +15 -0
- package/dist/types/components/giftback-form/subcomponents/giftback-message/giftback-massage.d.ts +3 -0
- package/dist/types/components/giftback-form/subcomponents/phone-form/phone-form.d.ts +8 -0
- package/dist/types/components/giftback-form/subcomponents/pin-form/pin-form.d.ts +19 -0
- package/dist/types/components/note/crm-bonus-note.d.ts +4 -0
- package/dist/types/components/phone/phone-input-mask.d.ts +2 -0
- package/dist/types/components.d.ts +118 -0
- package/dist/types/contants/index.d.ts +3 -1
- package/dist/types/helpers/info.config.helper.d.ts +6 -0
- package/dist/types/i18n/i18n.d.ts +2 -0
- package/dist/types/services/crmbonus.service.d.ts +1 -0
- package/package.json +3 -2
- package/dist/cjs/app-modal_4.cjs.entry.js +0 -157
- package/dist/cjs/app-modal_4.cjs.entry.js.map +0 -1
- package/dist/cjs/crmbonus.service-e375ebfe.js.map +0 -1
- package/dist/cjs/index-52d8a075.js.map +0 -1
- package/dist/cjs/index-861e0cbe.js.map +0 -1
- package/dist/components/p-03c2447c.js +0 -170
- package/dist/components/p-03c2447c.js.map +0 -1
- package/dist/components/p-0e99f907.js.map +0 -1
- package/dist/components/p-1dbb0f43.js +0 -43
- package/dist/components/p-1dbb0f43.js.map +0 -1
- package/dist/components/p-3c29c6ad.js +0 -62
- package/dist/components/p-3c29c6ad.js.map +0 -1
- package/dist/components/p-41d42a66.js +0 -52
- package/dist/components/p-41d42a66.js.map +0 -1
- package/dist/components/p-6c553ee7.js +0 -52
- package/dist/components/p-6c553ee7.js.map +0 -1
- package/dist/components/p-878c694e.js.map +0 -1
- package/dist/components/p-e2727638.js.map +0 -1
- package/dist/components/p-faf7103e.js.map +0 -1
- package/dist/crmbonus-component-wake/p-002f2417.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-002f2417.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-2636f2f0.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-2636f2f0.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-3582baf8.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-3582baf8.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-5febaa3c.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-5febaa3c.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-61df4eb6.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-61df4eb6.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-72510682.js +0 -3
- package/dist/crmbonus-component-wake/p-72510682.js.map +0 -1
- package/dist/crmbonus-component-wake/p-878c694e.js.map +0 -1
- package/dist/crmbonus-component-wake/p-9b967605.js +0 -2
- package/dist/crmbonus-component-wake/p-9b967605.js.map +0 -1
- package/dist/esm/app-modal_4.entry.js +0 -150
- package/dist/esm/app-modal_4.entry.js.map +0 -1
- package/dist/esm/crmbonus.service-4ee773c8.js.map +0 -1
- package/dist/esm/index-9f7bde48.js.map +0 -1
- package/dist/esm/index-ea02697e.js.map +0 -1
- /package/dist/crmbonus-component-wake/{p-a01c57ab.entry.js.map → p-3beb5158.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-001e3e2b.entry.js.map → p-9514339e.entry.js.map} +0 -0
package/dist/collection/components/giftback-form/subcomponents/giftback-message/giftback-massage.js
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Component, Host, h } from "@stencil/core";
|
2
|
+
Component({
|
3
|
+
tag: 'giftback-message',
|
4
|
+
styleUrls: ['giftback-message.css']
|
5
|
+
});
|
6
|
+
export class GiftbackMessage {
|
7
|
+
render() {
|
8
|
+
return (h(Host, { class: "container-message" }, h("h1", null, "Voc\u00EA n\u00E3o possui Giftback dispon\u00EDvel para essa compra.")));
|
9
|
+
}
|
10
|
+
}
|
11
|
+
//# sourceMappingURL=giftback-massage.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"giftback-massage.js","sourceRoot":"","sources":["../../../../../../src/components/giftback-form/subcomponents/giftback-message/giftback-massage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;AAElD,SAAS,CAAC;IACN,GAAG,EAAE,kBAAkB;IACvB,SAAS,EAAE,CAAC,sBAAsB,CAAC;CACtC,CAAC,CAAA;AACF,MAAM,OAAO,eAAe;IACxB,MAAM;QACF,OAAO,CACH,EAAC,IAAI,IAAC,KAAK,EAAC,mBAAmB;YAC3B,qFAA8D,CAC3D,CACV,CAAA;IACL,CAAC;CACJ","sourcesContent":["import { Component, Host, h } from \"@stencil/core\"\n\nComponent({\n tag: 'giftback-message',\n styleUrls: ['giftback-message.css']\n})\nexport class GiftbackMessage {\n render() {\n return (\n <Host class=\"container-message\">\n <h1>Você não possui Giftback disponível para essa compra.</h1>\n </Host>\n )\n }\n}"]}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
2
|
+
export class PhoneForm {
|
3
|
+
constructor() {
|
4
|
+
this.value = undefined;
|
5
|
+
this.loading = undefined;
|
6
|
+
this.handlerSubmit = undefined;
|
7
|
+
}
|
8
|
+
async handlePhone() {
|
9
|
+
const phone = await this.phoneInputMask.getPhone();
|
10
|
+
await this.handlerSubmit(phone);
|
11
|
+
}
|
12
|
+
render() {
|
13
|
+
return (h(Host, { key: 'b821fd54424ae29b93d637e0faa0004ccb3ff6f5', class: "crm-phone-form" }, h("label", { key: '6fcb0fce2596f14d102b79162c217b1b0a92cccb', class: "crm-subtitle" }, "Digite o seu celular para verificar se h\u00E1 desconto dispon\u00EDvel nessa compra"), h("phone-input-mask", { key: 'a878fcb73215cbbdcd1572ddc0277884f83fb3e6', initialValue: this.value, ref: ref => this.phoneInputMask = ref }), h("crm-button", { key: '6caa785cf17898c745d67554935bd3959f42ff26', txtBtn: "Avan\u00E7ar", loading: this.loading, onClick: () => this.handlePhone() })));
|
14
|
+
}
|
15
|
+
static get is() { return "phone-form"; }
|
16
|
+
static get originalStyleUrls() {
|
17
|
+
return {
|
18
|
+
"$": ["../../giftback-form.css"]
|
19
|
+
};
|
20
|
+
}
|
21
|
+
static get styleUrls() {
|
22
|
+
return {
|
23
|
+
"$": ["../../giftback-form.css"]
|
24
|
+
};
|
25
|
+
}
|
26
|
+
static get properties() {
|
27
|
+
return {
|
28
|
+
"value": {
|
29
|
+
"type": "string",
|
30
|
+
"mutable": false,
|
31
|
+
"complexType": {
|
32
|
+
"original": "string",
|
33
|
+
"resolved": "string",
|
34
|
+
"references": {}
|
35
|
+
},
|
36
|
+
"required": false,
|
37
|
+
"optional": false,
|
38
|
+
"docs": {
|
39
|
+
"tags": [],
|
40
|
+
"text": ""
|
41
|
+
},
|
42
|
+
"attribute": "value",
|
43
|
+
"reflect": false
|
44
|
+
},
|
45
|
+
"loading": {
|
46
|
+
"type": "boolean",
|
47
|
+
"mutable": false,
|
48
|
+
"complexType": {
|
49
|
+
"original": "boolean",
|
50
|
+
"resolved": "boolean",
|
51
|
+
"references": {}
|
52
|
+
},
|
53
|
+
"required": false,
|
54
|
+
"optional": false,
|
55
|
+
"docs": {
|
56
|
+
"tags": [],
|
57
|
+
"text": ""
|
58
|
+
},
|
59
|
+
"attribute": "loading",
|
60
|
+
"reflect": false
|
61
|
+
},
|
62
|
+
"handlerSubmit": {
|
63
|
+
"type": "unknown",
|
64
|
+
"mutable": false,
|
65
|
+
"complexType": {
|
66
|
+
"original": "(phone: string) => void",
|
67
|
+
"resolved": "(phone: string) => void",
|
68
|
+
"references": {}
|
69
|
+
},
|
70
|
+
"required": false,
|
71
|
+
"optional": false,
|
72
|
+
"docs": {
|
73
|
+
"tags": [],
|
74
|
+
"text": ""
|
75
|
+
}
|
76
|
+
}
|
77
|
+
};
|
78
|
+
}
|
79
|
+
}
|
80
|
+
//# sourceMappingURL=phone-form.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"phone-form.js","sourceRoot":"","sources":["../../../../../../src/components/giftback-form/subcomponents/phone-form/phone-form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAMzD,MAAM,OAAO,SAAS;;;;;;IASlB,KAAK,CAAC,WAAW;QAEb,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAA;QAElD,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAGD,MAAM;QACF,OAAO,CACH,EAAC,IAAI,qDAAC,KAAK,EAAC,gBAAgB;YACxB,8DAAO,KAAK,EAAC,cAAc,2FAAoF;YAC/G,yEAAkB,YAAY,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,GAAG,GAAG,GAAI;YAErF,mEAAY,MAAM,EAAC,cAAS,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,GAAK,CACvF,CACV,CAAA;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Host, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: 'phone-form',\n styleUrl: '../../giftback-form.css'\n})\nexport class PhoneForm {\n\n private phoneInputMask: HTMLPhoneInputMaskElement;\n\n @Prop() value: string;\n @Prop() loading: boolean;\n @Prop() handlerSubmit: (phone: string) => void;\n\n\n async handlePhone() {\n\n const phone = await this.phoneInputMask.getPhone()\n\n await this.handlerSubmit(phone);\n }\n\n\n render() {\n return (\n <Host class=\"crm-phone-form\">\n <label class=\"crm-subtitle\" >Digite o seu celular para verificar se há desconto disponível nessa compra</label>\n <phone-input-mask initialValue={this.value} ref={ref => this.phoneInputMask = ref} />\n\n <crm-button txtBtn=\"Avançar\" loading={this.loading} onClick={() => this.handlePhone() } />\n </Host>\n )\n }\n}"]}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
:host {
|
2
|
+
display: block;
|
3
|
+
font-family: Arial, sans-serif;
|
4
|
+
}
|
5
|
+
|
6
|
+
.form-container-pin {
|
7
|
+
display: flex;
|
8
|
+
flex-direction: column;
|
9
|
+
align-items: center;
|
10
|
+
}
|
11
|
+
|
12
|
+
.pin-container {
|
13
|
+
display: flex;
|
14
|
+
/* margin: 26px 0; */
|
15
|
+
justify-content: start;
|
16
|
+
gap: 10px;
|
17
|
+
}
|
18
|
+
|
19
|
+
input {
|
20
|
+
width: 40px;
|
21
|
+
height: 48px;
|
22
|
+
font-size: 14px;
|
23
|
+
text-align: center;
|
24
|
+
border: 1px solid #ccc;
|
25
|
+
border-radius: 5px;
|
26
|
+
}
|
27
|
+
|
28
|
+
button {
|
29
|
+
padding: 10px 20px;
|
30
|
+
background-color: #ddd;
|
31
|
+
border: none;
|
32
|
+
border-radius: 5px;
|
33
|
+
cursor: pointer;
|
34
|
+
}
|
35
|
+
|
36
|
+
|
37
|
+
.success {
|
38
|
+
color: green;
|
39
|
+
margin-top: 10px;
|
40
|
+
}
|
41
|
+
|
42
|
+
.button {
|
43
|
+
top: 50%;
|
44
|
+
background-color: #6c6c7e;
|
45
|
+
color: #fff;
|
46
|
+
border: none;
|
47
|
+
border-radius: 10px;
|
48
|
+
padding: 15px;
|
49
|
+
min-height: 30px;
|
50
|
+
min-width: 120px;
|
51
|
+
font-size: 20px;
|
52
|
+
cursor: pointer;
|
53
|
+
}
|
54
|
+
|
55
|
+
.button-cancel {
|
56
|
+
top: 50%;
|
57
|
+
background-color: #ffffff;
|
58
|
+
color: #1e1c1c;
|
59
|
+
border: 1px solid gray;
|
60
|
+
border-radius: 10px;
|
61
|
+
padding: 10px;
|
62
|
+
min-height: 30px;
|
63
|
+
min-width: 120px;
|
64
|
+
font-size: 19px;
|
65
|
+
cursor: pointer;
|
66
|
+
}
|
67
|
+
|
68
|
+
.crm-description {
|
69
|
+
font-size: 14px;
|
70
|
+
width: 100%;
|
71
|
+
display: flex;
|
72
|
+
gap: 9px;
|
73
|
+
}
|
74
|
+
|
75
|
+
.crm-description a {
|
76
|
+
font-weight: bold;
|
77
|
+
cursor: pointer;
|
78
|
+
text-decoration: underline;
|
79
|
+
}
|
80
|
+
|
81
|
+
.crm-description div {
|
82
|
+
display: flex;
|
83
|
+
gap: 5px;
|
84
|
+
}
|
@@ -0,0 +1,174 @@
|
|
1
|
+
import { h } from "@stencil/core";
|
2
|
+
import i18next from "../../../../i18n/i18n";
|
3
|
+
export class GiftbackPin {
|
4
|
+
constructor() {
|
5
|
+
this.validate = undefined;
|
6
|
+
this.cancel = undefined;
|
7
|
+
this.resend = undefined;
|
8
|
+
this.sent = undefined;
|
9
|
+
this.loading = false;
|
10
|
+
this.phone = undefined;
|
11
|
+
this.pin = ['', '', '', ''];
|
12
|
+
this.isVerified = false;
|
13
|
+
this.canResend = false;
|
14
|
+
}
|
15
|
+
componentWillLoad() {
|
16
|
+
this.canResend = false;
|
17
|
+
}
|
18
|
+
handleInput(event, index) {
|
19
|
+
const input = event.target;
|
20
|
+
const value = input.value.slice(0, 1); // Limitar a um único dígito
|
21
|
+
this.pin[index] = value;
|
22
|
+
// Focar no próximo campo, se possível
|
23
|
+
if (value && index < this.pin.length - 1) {
|
24
|
+
const nextInput = input.nextElementSibling;
|
25
|
+
nextInput === null || nextInput === void 0 ? void 0 : nextInput.focus();
|
26
|
+
}
|
27
|
+
this.pin = [...this.pin];
|
28
|
+
}
|
29
|
+
validatePin() {
|
30
|
+
console.log('this.pin', this.pin);
|
31
|
+
this.validate(this.pin.join(""));
|
32
|
+
}
|
33
|
+
verifyPin() {
|
34
|
+
const pinCode = this.pin.join('');
|
35
|
+
if (pinCode === '9999') {
|
36
|
+
this.isVerified = true;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
handleTimeout() {
|
40
|
+
this.canResend = true;
|
41
|
+
}
|
42
|
+
async handleResend() {
|
43
|
+
await this.resend();
|
44
|
+
this.canResend = false;
|
45
|
+
}
|
46
|
+
render() {
|
47
|
+
return (h("div", { key: '0dfe272b20cf9bc2a77b488006711b40a1182d7f', class: "crm-phone-form" }, h("label", { key: '5f845c3cbe8680f6070fcdce98dd5fc9bbeb7fc8', class: "crm-subtitle" }, i18next.t('pin-sutitle'), " ", h("strong", { key: '68a0a6c5d0c482f0c08f42134edcef2750dace38' }, "+55 ", this.phone)), h("div", { key: '3fc6e7cb1f0087c186ec8329e15b160778f4f6af', class: "pin-container" }, this.pin.map((_, index) => (h("input", { type: "text", maxLength: 1, value: this.pin[index], onInput: (event) => this.handleInput(event, index) })))), h("slot", { key: '3cc833de9c2197c5a78d9874c169a2ed1f9341cb' }), h("p", { key: 'b83fdd1cd0c12a73e5aa667c986a4cfcd9233c79', class: "crm-description" }, " N\u00E3o recebeu?", !this.canResend && h("label", { key: 'd624a07ff0792d893c8b2e9cd2c7cf4bfdb11110' }, " Reenviar em ", h("countdown-timer", { key: '0b71bf50a51924ffca57ab226cfa35022451b619', downtime: () => this.handleTimeout() }), " "), this.canResend && (h("div", { key: '1a8a8c03a428563bcb4813f24e6d0400525590d7' }, h("a", { key: '0b4292274a6c311f8343ddde81da336967f8edad', onClick: () => this.resend() }, "Reenviar"), h("a", { key: 'fdb89612995ee4c79afa83d3a428ba62afabd6f4', onClick: () => this.cancel() }, "Trocar n\u00FAmero")))), h("crm-button", { key: '3c94f9e8adf2d572d8e8fd24ec10e5c984971d11', txtBtn: "Avan\u00E7ar", loading: this.loading, onClick: () => this.validatePin() })));
|
48
|
+
}
|
49
|
+
static get is() { return "pin-form"; }
|
50
|
+
static get encapsulation() { return "shadow"; }
|
51
|
+
static get originalStyleUrls() {
|
52
|
+
return {
|
53
|
+
"$": ["pin-form.css", "../../giftback-form.css"]
|
54
|
+
};
|
55
|
+
}
|
56
|
+
static get styleUrls() {
|
57
|
+
return {
|
58
|
+
"$": ["pin-form.css", "../../giftback-form.css"]
|
59
|
+
};
|
60
|
+
}
|
61
|
+
static get properties() {
|
62
|
+
return {
|
63
|
+
"validate": {
|
64
|
+
"type": "unknown",
|
65
|
+
"mutable": false,
|
66
|
+
"complexType": {
|
67
|
+
"original": "(pin: string) => void",
|
68
|
+
"resolved": "(pin: string) => void",
|
69
|
+
"references": {}
|
70
|
+
},
|
71
|
+
"required": false,
|
72
|
+
"optional": false,
|
73
|
+
"docs": {
|
74
|
+
"tags": [],
|
75
|
+
"text": ""
|
76
|
+
}
|
77
|
+
},
|
78
|
+
"cancel": {
|
79
|
+
"type": "unknown",
|
80
|
+
"mutable": false,
|
81
|
+
"complexType": {
|
82
|
+
"original": "() => void",
|
83
|
+
"resolved": "() => void",
|
84
|
+
"references": {}
|
85
|
+
},
|
86
|
+
"required": false,
|
87
|
+
"optional": false,
|
88
|
+
"docs": {
|
89
|
+
"tags": [],
|
90
|
+
"text": ""
|
91
|
+
}
|
92
|
+
},
|
93
|
+
"resend": {
|
94
|
+
"type": "unknown",
|
95
|
+
"mutable": false,
|
96
|
+
"complexType": {
|
97
|
+
"original": "() => void",
|
98
|
+
"resolved": "() => void",
|
99
|
+
"references": {}
|
100
|
+
},
|
101
|
+
"required": false,
|
102
|
+
"optional": false,
|
103
|
+
"docs": {
|
104
|
+
"tags": [],
|
105
|
+
"text": ""
|
106
|
+
}
|
107
|
+
},
|
108
|
+
"sent": {
|
109
|
+
"type": "unknown",
|
110
|
+
"mutable": false,
|
111
|
+
"complexType": {
|
112
|
+
"original": "IPinSent",
|
113
|
+
"resolved": "IPinSent",
|
114
|
+
"references": {
|
115
|
+
"IPinSent": {
|
116
|
+
"location": "import",
|
117
|
+
"path": "../../../../dto/pin.sent",
|
118
|
+
"id": "src/dto/pin.sent.ts::IPinSent"
|
119
|
+
}
|
120
|
+
}
|
121
|
+
},
|
122
|
+
"required": false,
|
123
|
+
"optional": false,
|
124
|
+
"docs": {
|
125
|
+
"tags": [],
|
126
|
+
"text": ""
|
127
|
+
}
|
128
|
+
},
|
129
|
+
"loading": {
|
130
|
+
"type": "boolean",
|
131
|
+
"mutable": false,
|
132
|
+
"complexType": {
|
133
|
+
"original": "boolean",
|
134
|
+
"resolved": "boolean",
|
135
|
+
"references": {}
|
136
|
+
},
|
137
|
+
"required": false,
|
138
|
+
"optional": false,
|
139
|
+
"docs": {
|
140
|
+
"tags": [],
|
141
|
+
"text": ""
|
142
|
+
},
|
143
|
+
"attribute": "loading",
|
144
|
+
"reflect": false,
|
145
|
+
"defaultValue": "false"
|
146
|
+
},
|
147
|
+
"phone": {
|
148
|
+
"type": "string",
|
149
|
+
"mutable": false,
|
150
|
+
"complexType": {
|
151
|
+
"original": "string",
|
152
|
+
"resolved": "string",
|
153
|
+
"references": {}
|
154
|
+
},
|
155
|
+
"required": false,
|
156
|
+
"optional": false,
|
157
|
+
"docs": {
|
158
|
+
"tags": [],
|
159
|
+
"text": ""
|
160
|
+
},
|
161
|
+
"attribute": "phone",
|
162
|
+
"reflect": false
|
163
|
+
}
|
164
|
+
};
|
165
|
+
}
|
166
|
+
static get states() {
|
167
|
+
return {
|
168
|
+
"pin": {},
|
169
|
+
"isVerified": {},
|
170
|
+
"canResend": {}
|
171
|
+
};
|
172
|
+
}
|
173
|
+
}
|
174
|
+
//# sourceMappingURL=pin-form.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pin-form.js","sourceRoot":"","sources":["../../../../../../src/components/giftback-form/subcomponents/pin-form/pin-form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,OAAO,MAAM,uBAAuB,CAAA;AAO3C,MAAM,OAAO,WAAW;;;;;;uBAOO,KAAK;;mBAGP,CAA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;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop, State } from '@stencil/core';\nimport { IPinSent } from '../../../../dto/pin.sent';\nimport i18next from '../../../../i18n/i18n'\n\n@Component({\n tag: 'pin-form',\n styleUrls: ['pin-form.css', '../../giftback-form.css'],\n shadow: true,\n})\nexport class GiftbackPin {\n\n @Prop() validate: (pin: string) => void;\n @Prop() cancel: () => void;\n @Prop() resend: () => void;\n\n @Prop() sent: IPinSent;\n @Prop() loading: boolean = false;\n @Prop() phone: string;\n\n @State() pin: string[] = ['', '', '', ''];\n @State() isVerified: boolean = false;\n @State() canResend: boolean = false;\n\n componentWillLoad() {\n this.canResend = false;\n }\n\n handleInput(event: Event, index: number) {\n const input = event.target as HTMLInputElement;\n const value = input.value.slice(0, 1); // Limitar a um único dígito\n this.pin[index] = value;\n\n // Focar no próximo campo, se possível\n if (value && index < this.pin.length - 1) {\n const nextInput = input.nextElementSibling as HTMLInputElement;\n nextInput?.focus();\n }\n\n this.pin = [...this.pin];\n }\n\n validatePin() {\n console.log('this.pin', this.pin);\n this.validate(this.pin.join(\"\"))\n }\n\n verifyPin() {\n const pinCode = this.pin.join('');\n if (pinCode === '9999') {\n this.isVerified = true;\n }\n }\n\n handleTimeout() {\n this.canResend = true;\n }\n\n async handleResend() {\n await this.resend();\n\n this.canResend = false;\n }\n\n render() {\n return (\n <div class=\"crm-phone-form\">\n <label class=\"crm-subtitle\" >{i18next.t('pin-sutitle')} <strong>+55 {this.phone}</strong></label>\n <div class=\"pin-container\">\n {this.pin.map((_, index) => (\n <input\n type=\"text\"\n maxLength={1}\n value={this.pin[index]}\n onInput={(event) => this.handleInput(event, index)}\n />\n ))}\n </div>\n\n <slot></slot>\n\n <p class=\"crm-description\"> Não recebeu?\n {\n !this.canResend && <label> Reenviar em <countdown-timer downtime={() => this.handleTimeout()} /> </label>\n }\n {\n this.canResend && (\n <div >\n <a onClick={() => this.resend()}>Reenviar</a>\n <a onClick={() => this.cancel()}>Trocar número</a>\n </div>\n )\n }\n </p>\n <crm-button txtBtn=\"Avançar\" loading={this.loading} onClick={() => this.validatePin()} />\n\n\n {/* <div class=\"footer-button\">\n <button class=\"button-cancel\" disabled={this.loading} onClick={() => this.cancel()}>\n Cancelar\n </button>\n <button class={`button ${this.loading ? 'disabled' : ''} `} disabled={this.loading} onClick={() => this.validatePin()}>\n {\n !this.loading ? \"Enviar\" : <loading-spinner size=\"15px\" color=\"#fff\" />\n }\n </button>\n </div> */}\n {/* <button onClick={() => this.verifyPin()}>Enviar</button>\n {this.isVerified && <p class=\"success\">Código verificado com sucesso!</p>} */}\n </div >\n );\n }\n}\n"]}
|
@@ -5,7 +5,7 @@ export class LoadingSpinner {
|
|
5
5
|
this.color = '#0078d7';
|
6
6
|
}
|
7
7
|
render() {
|
8
|
-
return (h("div", { key: '
|
8
|
+
return (h("div", { key: '5d3cd866b3ab7f4898ad1142fb39b89c572867d7', class: "spinner", style: { width: this.size, height: this.size, borderColor: `${this.color} transparent transparent transparent` } }));
|
9
9
|
}
|
10
10
|
static get is() { return "loading-spinner"; }
|
11
11
|
static get encapsulation() { return "shadow"; }
|
@@ -8,7 +8,7 @@ export class AppModal {
|
|
8
8
|
this.modalClosed.emit();
|
9
9
|
}
|
10
10
|
render() {
|
11
|
-
return (h("div", { key: '
|
11
|
+
return (h("div", { key: '9ed1b6a6f09b9127119d661abbd447e047c49efb', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, h("div", { key: 'dd4f515ea7949d5a470655234a9c0b48194bba1b', class: "modal" }, h("div", { key: '387a930782a4a00073eda969acc86bed39fc8151', class: "modal-header" }, h("h3", { key: '38f041a1e3483490a4de85f1c0a223c47c664517' }, this.modalTitle), h("button", { key: '98998678ec65fd96ad6284d8602ccdf5fd723e26', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), h("div", { key: '845f631054557e79b4ef0521b6eefd41eda93eeb', class: "modal-body" }, h("slot", { key: '2d5539938e7c4175eede394bddeb841e371912fa' })))));
|
12
12
|
}
|
13
13
|
static get is() { return "app-modal"; }
|
14
14
|
static get encapsulation() { return "shadow"; }
|
@@ -4,19 +4,24 @@
|
|
4
4
|
margin: 0 0 26px 0px;
|
5
5
|
}
|
6
6
|
|
7
|
+
.note-container hr {
|
8
|
+
border: 1px solid #CCC;
|
9
|
+
}
|
10
|
+
|
7
11
|
.note-container .back-cart {
|
8
12
|
display: flex;
|
9
13
|
text-align: center;
|
10
|
-
}
|
14
|
+
}
|
15
|
+
|
16
|
+
.note-header {
|
17
|
+
display: flex;
|
18
|
+
align-items: baseline;
|
19
|
+
justify-content: space-between;
|
20
|
+
}
|
11
21
|
|
12
22
|
.note-title {
|
13
23
|
font-weight: 700;
|
14
|
-
height: 2em;
|
15
|
-
line-height: 2em;
|
16
24
|
text-align: left;
|
17
|
-
border-radius: 3px;
|
18
|
-
color: #333;
|
19
|
-
margin-bottom: 1.4em;
|
20
25
|
}
|
21
26
|
|
22
27
|
.note-description {
|
@@ -28,8 +33,19 @@
|
|
28
33
|
|
29
34
|
.back-cart {
|
30
35
|
font-size: .9em;
|
31
|
-
color: #
|
36
|
+
color: #27272A;
|
32
37
|
text-decoration: none;
|
33
38
|
cursor: pointer;
|
34
39
|
margin-top: 11px;
|
40
|
+
}
|
41
|
+
|
42
|
+
|
43
|
+
.note-description-2 {
|
44
|
+
color: var(--crm-scheme-fg-main-inverse, #262626);
|
45
|
+
font-family: Roboto;
|
46
|
+
font-size: var(--crm-font-size-body-lg, 16px);
|
47
|
+
font-style: normal;
|
48
|
+
font-weight: var(--crm-font-weight-body-bold, 400);
|
49
|
+
line-height: var(--crm-line-height-body-md, 20px);
|
50
|
+
letter-spacing: var(--crm-letter-spacing-title-md, 0px);
|
35
51
|
}
|
@@ -1,13 +1,18 @@
|
|
1
1
|
import { h } from "@stencil/core";
|
2
|
+
import { getInfoCustomization } from "../../helpers/info.config.helper";
|
2
3
|
export class CrmBonusNote {
|
3
4
|
constructor() {
|
4
5
|
this.cartId = undefined;
|
6
|
+
this.storename = undefined;
|
5
7
|
this.url = undefined;
|
8
|
+
this.config = undefined;
|
6
9
|
}
|
7
10
|
componentWillLoad() {
|
8
11
|
this.upadateCheckToFreteAndGetUrl();
|
9
12
|
}
|
10
13
|
upadateCheckToFreteAndGetUrl() {
|
14
|
+
this.config = getInfoCustomization(this.storename);
|
15
|
+
console.log('this.config', this.config);
|
11
16
|
const envios = document.getElementsByName('forma-envio');
|
12
17
|
console.log('envios', envios.length);
|
13
18
|
envios.forEach((envio) => {
|
@@ -19,11 +24,16 @@ export class CrmBonusNote {
|
|
19
24
|
const amount = localStorage.getItem(this.cartId);
|
20
25
|
return !!amount;
|
21
26
|
}
|
27
|
+
getAmount() {
|
28
|
+
console.log("this.cartId", this.cartId);
|
29
|
+
const amount = localStorage.getItem(this.cartId);
|
30
|
+
return Number(amount).toFixed(2).replace(".", ",") || "0,00";
|
31
|
+
}
|
22
32
|
render() {
|
23
|
-
if (this.handleHide()) {
|
24
|
-
|
25
|
-
}
|
26
|
-
return (h("div",
|
33
|
+
// if (this.handleHide()) {
|
34
|
+
// return (<div></div>)
|
35
|
+
// }
|
36
|
+
return (h("div", { key: '6f2f33e46e64b48d3357ed27cc3bf606461e19ba' }, h("div", { key: '10b62fadf683044f5859a7c4c4a849aede92f56d', class: "note-container" }, h("div", { key: '9a6bbb221b83f76c4e8fa5d8a60cf61ae6b6ea76', class: "note-header" }, h("p", { key: '505b57b35e88de1c657ccaa30a3e4d6ade98270e', class: "note-title" }, this.config.giftbackTitle), h("a", { key: '924c501db05a462009e50b91a57abde92eb38624', class: "back-cart", href: this.url }, "Editar")), h("hr", { key: '6169d4c9ff8c1ec406d18fcf0a21559fc0a806db' }), h("p", { key: '3ffe7ca6cec935defee10d237541c8126571f5b1', class: "note-description-2" }, this.config.giftbackTitle || "Giftback", " aplicado ao pedido: ", h("strong", { key: '167ea51e4d0ddba06fb04810331b71e64beaba80' }, "R$ ", this.getAmount())))));
|
27
37
|
}
|
28
38
|
static get is() { return "crm-bonus-note"; }
|
29
39
|
static get originalStyleUrls() {
|
@@ -54,12 +64,30 @@ export class CrmBonusNote {
|
|
54
64
|
},
|
55
65
|
"attribute": "cartid",
|
56
66
|
"reflect": false
|
67
|
+
},
|
68
|
+
"storename": {
|
69
|
+
"type": "any",
|
70
|
+
"mutable": false,
|
71
|
+
"complexType": {
|
72
|
+
"original": "any",
|
73
|
+
"resolved": "any",
|
74
|
+
"references": {}
|
75
|
+
},
|
76
|
+
"required": false,
|
77
|
+
"optional": false,
|
78
|
+
"docs": {
|
79
|
+
"tags": [],
|
80
|
+
"text": ""
|
81
|
+
},
|
82
|
+
"attribute": "storename",
|
83
|
+
"reflect": false
|
57
84
|
}
|
58
85
|
};
|
59
86
|
}
|
60
87
|
static get states() {
|
61
88
|
return {
|
62
|
-
"url": {}
|
89
|
+
"url": {},
|
90
|
+
"config": {}
|
63
91
|
};
|
64
92
|
}
|
65
93
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"crm-bonus-note.js","sourceRoot":"","sources":["../../../../src/components/note/crm-bonus-note.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;
|
1
|
+
{"version":3,"file":"crm-bonus-note.js","sourceRoot":"","sources":["../../../../src/components/note/crm-bonus-note.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAc,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAMpF,MAAM,OAAO,YAAY;;;;;;;IAQrB,iBAAiB;QACb,IAAI,CAAC,4BAA4B,EAAE,CAAA;IACvC,CAAC;IAED,4BAA4B;QAExB,IAAI,CAAC,MAAM,GAAG,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEnD,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC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ACpG,CAKF,CACJ,CACT,CAAA;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Prop, State, h } from \"@stencil/core\";\nimport { IInfoStore, getInfoCustomization } from \"../../helpers/info.config.helper\";\n\n@Component({\n tag: 'crm-bonus-note',\n styleUrl: 'crm-bonus-note.css'\n})\nexport class CrmBonusNote {\n\n @Prop({ attribute: 'cartid' }) cartId;\n @Prop({ attribute: \"storename\" }) storename;\n\n @State() url: string;\n @State() config: IInfoStore;\n\n componentWillLoad() {\n this.upadateCheckToFreteAndGetUrl()\n }\n\n upadateCheckToFreteAndGetUrl() {\n\n this.config = getInfoCustomization(this.storename);\n\n console.log('this.config', this.config);\n\n const envios = document.getElementsByName('forma-envio');\n\n console.log('envios', envios.length);\n\n envios.forEach((envio: any) => {\n envio.checked = false;\n });\n\n this.url = window.location.origin;\n }\n\n handleHide() {\n const amount = localStorage.getItem(this.cartId);\n return !!amount;\n }\n\n getAmount() {\n console.log(\"this.cartId\", this.cartId)\n const amount = localStorage.getItem(this.cartId);\n\n return Number(amount).toFixed(2).replace(\".\", \",\") || \"0,00\"\n }\n\n render() {\n\n // if (this.handleHide()) {\n // return (<div></div>)\n // }\n\n return (\n <div>\n <div class=\"note-container\">\n <div class=\"note-header\">\n <p class=\"note-title\">\n {this.config.giftbackTitle}\n </p>\n\n <a class=\"back-cart\" href={this.url}>\n Editar\n </a>\n </div>\n\n <hr />\n\n <p class=\"note-description-2\">\n {this.config.giftbackTitle || \"Giftback\"} aplicado ao pedido: <strong>R$ {this.getAmount()}</strong>\n </p>\n\n {/* <a class=\"back-cart\" href={this.url}>\n Voltar ao carrinho\n </a> */}\n </div>\n </div>\n )\n }\n}"]}
|
@@ -21,7 +21,7 @@ export class Pedido {
|
|
21
21
|
}
|
22
22
|
}
|
23
23
|
render() {
|
24
|
-
return (h("div", { key: '
|
24
|
+
return (h("div", { key: '084ea188e020b3994a676f4fa17b5f3523a5f611' }));
|
25
25
|
}
|
26
26
|
static get is() { return "pedido-finalizado"; }
|
27
27
|
static get properties() {
|
@@ -1,27 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
.inline-text-field-container {
|
6
|
-
display: flex;
|
7
|
-
flex-direction: column;
|
8
|
-
}
|
9
|
-
|
10
|
-
@supports (top: max(0%)) {
|
11
|
-
.mdc-text-field--outlined {
|
12
|
-
padding-right: max(16px, var(--mdc-shape-small, 4px));
|
13
|
-
}
|
14
|
-
}
|
15
|
-
|
16
|
-
@supports (top: max(0%)) {
|
17
|
-
.mdc-text-field--outlined {
|
18
|
-
padding-left: max(16px, calc(var(--mdc-shape-small, 4px) + 4px));
|
19
|
-
}
|
20
|
-
}
|
21
|
-
|
22
|
-
.mdc-text-field--outlined {
|
23
|
-
height: 55px;
|
24
|
-
overflow: visible;
|
1
|
+
* {
|
2
|
+
margin: 0;
|
3
|
+
padding: 0;
|
4
|
+
box-sizing: border-box;
|
25
5
|
}
|
26
6
|
|
27
7
|
.phone {
|
@@ -43,18 +23,17 @@
|
|
43
23
|
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
44
24
|
}
|
45
25
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
border
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
}
|
26
|
+
|
27
|
+
.phone-input-form {
|
28
|
+
width: 246px;
|
29
|
+
height: 48px;
|
30
|
+
padding: 13px 16px 13px 16px;
|
31
|
+
border: 1px solid #CCCCCC;
|
32
|
+
}
|
33
|
+
|
34
|
+
.crm-erro-msg {
|
35
|
+
color: #E11D48;
|
36
|
+
font-size: 12px;
|
37
|
+
font-weight: 500;
|
38
|
+
margin-top: 11px;
|
39
|
+
}
|