crmbonus-component-wake 0.0.27 → 1.0.28
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_4.cjs.entry.js +152 -0
- package/dist/cjs/app-modal_4.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-bonus.cjs.entry.js +37 -6
- package/dist/cjs/crm-bonus.cjs.entry.js.map +1 -1
- package/dist/cjs/crmbonus-component-wake.cjs.js +1 -1
- package/dist/cjs/{giftback-finish_5.cjs.entry.js → giftback-finish_3.cjs.entry.js} +6 -59
- package/dist/cjs/giftback-finish_3.cjs.entry.js.map +1 -0
- package/dist/cjs/index-296f70bf.js +11 -0
- package/dist/cjs/index-296f70bf.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/pedido-finalizado.cjs.entry.js +1 -1
- package/dist/cjs/phone-input-mask.cjs.entry.js +45 -0
- package/dist/cjs/phone-input-mask.cjs.entry.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/crm-bonus/crm-bonus.css +54 -1
- package/dist/collection/components/crm-bonus/crm-bonus.js +43 -5
- package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
- package/dist/collection/components/crm-bonus-form/crm-bonus-form.css +0 -13
- package/dist/collection/components/crm-bonus-form/crm-bonus-form.js +125 -30
- package/dist/collection/components/crm-bonus-form/crm-bonus-form.js.map +1 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js +1 -1
- 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.js +3 -3
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js.map +1 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js +1 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js.map +1 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js +75 -0
- package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.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/pedido/pedido.js +1 -1
- package/dist/collection/components/phone/phone-input-mask.css +16 -7
- package/dist/collection/components/phone/phone-input-mask.js +19 -1
- package/dist/collection/components/phone/phone-input-mask.js.map +1 -1
- package/dist/components/app-modal.js +1 -1
- package/dist/components/crm-bonus-form.js +1 -1
- package/dist/components/crm-bonus.js +62 -21
- package/dist/components/crm-bonus.js.map +1 -1
- package/dist/components/giftback-finish.js +1 -1
- package/dist/components/giftback-pin.js +1 -1
- package/dist/components/giftback-progress.js +1 -1
- package/dist/components/loading-spinner.js +1 -1
- package/dist/components/{p-cb5a1fdf.js → p-03918b34.js} +2 -2
- package/dist/components/{p-cb5a1fdf.js.map → p-03918b34.js.map} +1 -1
- package/dist/components/{p-cbade307.js → p-2667d525.js} +2 -2
- package/dist/components/{p-cbade307.js.map → p-2667d525.js.map} +1 -1
- package/dist/components/{p-8fcf8924.js → p-3d431add.js} +4 -4
- package/dist/components/{p-8fcf8924.js.map → p-3d431add.js.map} +1 -1
- package/dist/components/{p-e40cf14d.js → p-3d7c9042.js} +5 -3
- package/dist/components/p-3d7c9042.js.map +1 -0
- package/dist/components/{p-6442ffce.js → p-3e80a758.js} +3 -3
- package/dist/components/{p-6442ffce.js.map → p-3e80a758.js.map} +1 -1
- package/dist/components/p-a7c9d0d8.js +52 -0
- package/dist/components/p-a7c9d0d8.js.map +1 -0
- package/dist/components/{p-878ce0aa.js → p-b4c3e6bf.js} +36 -54
- package/dist/components/p-b4c3e6bf.js.map +1 -0
- package/dist/components/{p-462c12d8.js → p-c5913818.js} +5 -5
- package/dist/components/p-c5913818.js.map +1 -0
- package/dist/components/{p-e816fb90.js → p-f6396f4c.js} +2 -2
- package/dist/components/{p-e816fb90.js.map → p-f6396f4c.js.map} +1 -1
- package/dist/components/pedido-finalizado.js +1 -1
- package/dist/components/phone-cancel-input.d.ts +11 -0
- package/dist/components/phone-cancel-input.js +8 -0
- package/dist/components/phone-cancel-input.js.map +1 -0
- package/dist/components/phone-input-mask.js +1 -1
- package/dist/components/phone-input.js +1 -1
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -1
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
- package/dist/crmbonus-component-wake/p-562a34f1.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-562a34f1.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-8e6cdd1e.js +2 -0
- package/dist/crmbonus-component-wake/p-8e6cdd1e.js.map +1 -0
- package/dist/crmbonus-component-wake/p-9163a847.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-9163a847.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-f74e4a71.entry.js → p-a603a26e.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-e9c2ed46.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-e9c2ed46.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-4306a717.entry.js → p-ef75ecd5.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-fafb8311.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-fafb8311.entry.js.map +1 -0
- package/dist/esm/app-modal_4.entry.js +145 -0
- package/dist/esm/app-modal_4.entry.js.map +1 -0
- package/dist/esm/crm-bonus.entry.js +37 -6
- package/dist/esm/crm-bonus.entry.js.map +1 -1
- package/dist/esm/crmbonus-component-wake.js +1 -1
- package/dist/esm/{giftback-finish_5.entry.js → giftback-finish_3.entry.js} +7 -58
- package/dist/esm/giftback-finish_3.entry.js.map +1 -0
- package/dist/esm/index-2bfaba2b.js +11 -0
- package/dist/esm/index-2bfaba2b.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-spinner.entry.js +1 -1
- package/dist/esm/pedido-finalizado.entry.js +1 -1
- package/dist/esm/phone-input-mask.entry.js +41 -0
- package/dist/esm/phone-input-mask.entry.js.map +1 -0
- package/dist/types/components/crm-bonus/crm-bonus.d.ts +9 -0
- package/dist/types/components/crm-bonus-form/crm-bonus-form.d.ts +8 -4
- package/dist/types/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.d.ts +1 -1
- package/dist/types/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.d.ts +8 -0
- package/dist/types/components/phone/phone-input-mask.d.ts +1 -0
- package/dist/types/components.d.ts +32 -0
- package/package.json +1 -1
- package/dist/cjs/app-modal_2.cjs.entry.js +0 -134
- package/dist/cjs/app-modal_2.cjs.entry.js.map +0 -1
- package/dist/cjs/giftback-finish_5.cjs.entry.js.map +0 -1
- package/dist/components/p-462c12d8.js.map +0 -1
- package/dist/components/p-878ce0aa.js.map +0 -1
- package/dist/components/p-e40cf14d.js.map +0 -1
- package/dist/crmbonus-component-wake/p-9985f639.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-9985f639.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-be1a56de.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-be1a56de.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-e2f165e8.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-e2f165e8.entry.js.map +0 -1
- package/dist/esm/app-modal_2.entry.js +0 -129
- package/dist/esm/app-modal_2.entry.js.map +0 -1
- package/dist/esm/giftback-finish_5.entry.js.map +0 -1
- /package/dist/crmbonus-component-wake/{p-f74e4a71.entry.js.map → p-a603a26e.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-4306a717.entry.js.map → p-ef75ecd5.entry.js.map} +0 -0
package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
import { h } from "@stencil/core";
|
2
|
+
export class PhoneCancelInput {
|
3
|
+
constructor() {
|
4
|
+
this.sendPin = undefined;
|
5
|
+
this.loading = undefined;
|
6
|
+
this.value = undefined;
|
7
|
+
}
|
8
|
+
async validatePhone() {
|
9
|
+
const phone = await this.phoneInputMask.getPhone();
|
10
|
+
await this.sendPin(phone);
|
11
|
+
}
|
12
|
+
render() {
|
13
|
+
return (h("div", { key: '9e5524ba40c38bcc04325a8b786ea1b29d92e233', class: "form-container" }, h("phone-input-mask", { key: 'a6625e16e686ffd1738989c29245172ebeee13cf', initialValue: "Valor aplicado R$ 100", ref: ref => this.phoneInputMask = ref, disabled: true }), h("button", { key: '8fa99770b94c72058dd779b2309c5563b398d644', class: `btn ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "Cancelar" : h("loading-spinner", { size: "25px", color: "#fff" }))));
|
14
|
+
}
|
15
|
+
static get is() { return "phone-cancel-input"; }
|
16
|
+
static get properties() {
|
17
|
+
return {
|
18
|
+
"sendPin": {
|
19
|
+
"type": "unknown",
|
20
|
+
"mutable": false,
|
21
|
+
"complexType": {
|
22
|
+
"original": "Function",
|
23
|
+
"resolved": "Function",
|
24
|
+
"references": {
|
25
|
+
"Function": {
|
26
|
+
"location": "global",
|
27
|
+
"id": "global::Function"
|
28
|
+
}
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"required": false,
|
32
|
+
"optional": false,
|
33
|
+
"docs": {
|
34
|
+
"tags": [],
|
35
|
+
"text": ""
|
36
|
+
}
|
37
|
+
},
|
38
|
+
"loading": {
|
39
|
+
"type": "boolean",
|
40
|
+
"mutable": false,
|
41
|
+
"complexType": {
|
42
|
+
"original": "boolean",
|
43
|
+
"resolved": "boolean",
|
44
|
+
"references": {}
|
45
|
+
},
|
46
|
+
"required": false,
|
47
|
+
"optional": false,
|
48
|
+
"docs": {
|
49
|
+
"tags": [],
|
50
|
+
"text": ""
|
51
|
+
},
|
52
|
+
"attribute": "loading",
|
53
|
+
"reflect": false
|
54
|
+
},
|
55
|
+
"value": {
|
56
|
+
"type": "string",
|
57
|
+
"mutable": false,
|
58
|
+
"complexType": {
|
59
|
+
"original": "string",
|
60
|
+
"resolved": "string",
|
61
|
+
"references": {}
|
62
|
+
},
|
63
|
+
"required": false,
|
64
|
+
"optional": false,
|
65
|
+
"docs": {
|
66
|
+
"tags": [],
|
67
|
+
"text": ""
|
68
|
+
},
|
69
|
+
"attribute": "value",
|
70
|
+
"reflect": false
|
71
|
+
}
|
72
|
+
};
|
73
|
+
}
|
74
|
+
}
|
75
|
+
//# sourceMappingURL=phone.cancel.input.js.map
|
@@ -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;AAKnD,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,uBAAuB,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,GAAG,GAAG,EAAE,QAAQ,EAAE,IAAI,GAAI;YAClH,+DAAQ,KAAK,EAAE,OAAO,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,IAE5G,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})\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$ 100\"} ref={ref => this.phoneInputMask = ref} disabled={true} />\n <button class={`btn ${this.loading ? 'disabled' : ''} `} disabled={this.loading} onClick={() => this.validatePhone()}>\n {\n !this.loading ? \"Cancelar\" : <loading-spinner size=\"25px\" color=\"#fff\" />\n }\n </button>\n </div>\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: '78b8ba44c23dcf2fe6b86d343242ff696592bacd', 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: '8dab3bfa7301dbd20a783917037c26451cdab5a8', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, h("div", { key: '2846620c39106abde226cd19b2cc0a58b7a88a11', class: "modal" }, h("div", { key: '46b63f75e09aec5d2b9255334733b2813156a5e6', class: "modal-header" }, h("h3", { key: '6a7baae6fc8430ec9cbbcf959f75842ddac253ac' }, this.modalTitle), h("button", { key: 'c6b76e2c862db06657c5ce91fb2bba56fa89e04d', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), h("div", { key: '7caebe8e0fab2569e3e4e33cc512133bc691b331', class: "modal-body" }, h("slot", { key: 'aa5bd4a5ff5810e1d74727b01121b97ec7b54d51' })))));
|
12
12
|
}
|
13
13
|
static get is() { return "app-modal"; }
|
14
14
|
static get encapsulation() { return "shadow"; }
|
@@ -21,7 +21,7 @@ export class Pedido {
|
|
21
21
|
}
|
22
22
|
}
|
23
23
|
render() {
|
24
|
-
return (h("div", { key: '
|
24
|
+
return (h("div", { key: '693b9e4927b433cd01e555d33e0430c40d80c91a' }));
|
25
25
|
}
|
26
26
|
static get is() { return "pedido-finalizado"; }
|
27
27
|
static get properties() {
|
@@ -21,13 +21,22 @@
|
|
21
21
|
}
|
22
22
|
|
23
23
|
.phone {
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
padding:
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
display: block;
|
25
|
+
width: 100%;
|
26
|
+
height: 34px;
|
27
|
+
padding: 6px 12px;
|
28
|
+
font-size: 14px;
|
29
|
+
line-height: 1.42857143;
|
30
|
+
color: #555;
|
31
|
+
background-color: #fff;
|
32
|
+
background-image: none;
|
33
|
+
border: 1px solid #ccc;
|
34
|
+
border-radius: 4px;
|
35
|
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
|
36
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
|
37
|
+
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
|
38
|
+
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
39
|
+
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
31
40
|
}
|
32
41
|
|
33
42
|
.mdc-text-field {
|
@@ -3,6 +3,7 @@ export class PhoneInputMask {
|
|
3
3
|
constructor() {
|
4
4
|
this.phone = '';
|
5
5
|
this.initialValue = undefined;
|
6
|
+
this.disabled = undefined;
|
6
7
|
}
|
7
8
|
componentWillLoad() {
|
8
9
|
this.phone = this.initialValue;
|
@@ -25,7 +26,7 @@ export class PhoneInputMask {
|
|
25
26
|
return this.phone;
|
26
27
|
}
|
27
28
|
render() {
|
28
|
-
return (h("input", { key: '
|
29
|
+
return (h("input", { key: '67f707c85624ebb9ae25f11021df00db1cf237ce', disabled: this.disabled, id: "phone", type: "tel", class: "phone", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(12) 94567-8910" }));
|
29
30
|
}
|
30
31
|
static get is() { return "phone-input-mask"; }
|
31
32
|
static get encapsulation() { return "shadow"; }
|
@@ -57,6 +58,23 @@ export class PhoneInputMask {
|
|
57
58
|
},
|
58
59
|
"attribute": "initial-value",
|
59
60
|
"reflect": false
|
61
|
+
},
|
62
|
+
"disabled": {
|
63
|
+
"type": "boolean",
|
64
|
+
"mutable": false,
|
65
|
+
"complexType": {
|
66
|
+
"original": "boolean",
|
67
|
+
"resolved": "boolean",
|
68
|
+
"references": {}
|
69
|
+
},
|
70
|
+
"required": false,
|
71
|
+
"optional": false,
|
72
|
+
"docs": {
|
73
|
+
"tags": [],
|
74
|
+
"text": ""
|
75
|
+
},
|
76
|
+
"attribute": "disabled",
|
77
|
+
"reflect": false
|
60
78
|
}
|
61
79
|
};
|
62
80
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"phone-input-mask.js","sourceRoot":"","sources":["../../../../src/components/phone/phone-input-mask.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOlE,MAAM,OAAO,cAAc;;qBACE,EAAE
|
1
|
+
{"version":3,"file":"phone-input-mask.js","sourceR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ED,MAAM;QACF,OAAO,CACH,8DACI,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAC,OAAO,EACV,IAAI,EAAC,KAAK,EACV,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAC3C,WAAW,EAAC,iBAAiB,GAC/B,CACL,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Method, Prop, State } from '@stencil/core';\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 @Prop() initialValue: string;\n @Prop() disabled: boolean;\n\n componentWillLoad() {\n this.phone = this.initialValue; \n }\n\n private formatPhone(value: string): string {\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 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\n @Method()\n public async getPhone() {\n return this.phone;\n }\n\n render() {\n return (\n <input\n disabled={this.disabled}\n id=\"phone\"\n type=\"tel\"\n class=\"phone\"\n value={this.phone}\n onInput={(event) => this.handleInput(event)}\n placeholder=\"(12) 94567-8910\"\n />\n );\n }\n}\n"]}
|
@@ -1,17 +1,16 @@
|
|
1
1
|
import { p as proxyCustomElement, H, h } from './p-faf7103e.js';
|
2
2
|
import { C as CrmBonusService } from './p-374de9ae.js';
|
3
|
-
import { d as defineCustomElement$9 } from './p-
|
4
|
-
import { d as defineCustomElement$
|
5
|
-
import { d as defineCustomElement$
|
6
|
-
import { d as defineCustomElement$
|
7
|
-
import { d as defineCustomElement$
|
8
|
-
import { d as defineCustomElement$
|
9
|
-
import { d as defineCustomElement$
|
10
|
-
import { d as defineCustomElement$
|
3
|
+
import { d as defineCustomElement$9, S as StepFormEnum } from './p-b4c3e6bf.js';
|
4
|
+
import { d as defineCustomElement$a } from './p-f6396f4c.js';
|
5
|
+
import { d as defineCustomElement$8 } from './p-2667d525.js';
|
6
|
+
import { d as defineCustomElement$7 } from './p-3e80a758.js';
|
7
|
+
import { d as defineCustomElement$6 } from './p-c5913818.js';
|
8
|
+
import { d as defineCustomElement$5 } from './p-03918b34.js';
|
9
|
+
import { d as defineCustomElement$4 } from './p-a7c9d0d8.js';
|
10
|
+
import { d as defineCustomElement$3 } from './p-3d431add.js';
|
11
|
+
import { d as defineCustomElement$2 } from './p-3d7c9042.js';
|
11
12
|
|
12
|
-
const
|
13
|
-
|
14
|
-
const crmBonusCss = ".container-button{max-width:136px;cursor:pointer;padding:10px}.section-crm{border:1px solid #dbd4d4;text-align:-webkit-center;margin-bottom:20px}";
|
13
|
+
const crmBonusCss = ".container-button{max-width:100%;cursor:pointer;padding:10px;display:flex}.section-crm{border:1px solid #dbd4d4;text-align:-webkit-center;margin-bottom:20px}.section-cart-crm{text-align:-webkit-center;margin-bottom:20px}.button{top:50%;background-color:#6c6c7e;color:#fff;border:none;padding:15px;min-height:30px;min-width:120px;font-size:20px;cursor:pointer;margin-left:10px;height:70px}.form-container{width:100%;display:flex;justify-content:center;justify-content:space-around}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}";
|
15
14
|
const CrmBonusStyle0 = crmBonusCss;
|
16
15
|
|
17
16
|
const CrmBonus$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonus extends H {
|
@@ -26,7 +25,17 @@ const CrmBonus$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonus extends H {
|
|
26
25
|
this.productsInString = undefined;
|
27
26
|
this.cartId = undefined;
|
28
27
|
this.products = undefined;
|
29
|
-
this.customer =
|
28
|
+
this.customer = {
|
29
|
+
birthDate: "",
|
30
|
+
document: "",
|
31
|
+
name: "",
|
32
|
+
phone: ""
|
33
|
+
};
|
34
|
+
this.loading = false;
|
35
|
+
this.message = undefined;
|
36
|
+
this.phone = undefined;
|
37
|
+
this.canCancel = false;
|
38
|
+
this.sent = undefined;
|
30
39
|
}
|
31
40
|
async componentWillLoad() {
|
32
41
|
await this.handleLoad();
|
@@ -34,7 +43,7 @@ const CrmBonus$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonus extends H {
|
|
34
43
|
async handleLoad() {
|
35
44
|
try {
|
36
45
|
if (this.userId) {
|
37
|
-
this.customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);
|
46
|
+
// this.customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);
|
38
47
|
console.log('user', this.customer);
|
39
48
|
}
|
40
49
|
}
|
@@ -43,14 +52,36 @@ const CrmBonus$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonus extends H {
|
|
43
52
|
}
|
44
53
|
this.products = JSON.parse(this.productsInString);
|
45
54
|
}
|
55
|
+
async sendPin(phone) {
|
56
|
+
var _a, _b;
|
57
|
+
this.loading = true;
|
58
|
+
this.message = "";
|
59
|
+
try {
|
60
|
+
const _phone = phone.replace(/\D/g, '');
|
61
|
+
this.phone = Number(_phone);
|
62
|
+
this.sent = await this.crmBonusService.sendPin(this.phone, this.storeName);
|
63
|
+
await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);
|
64
|
+
this.showModal = true;
|
65
|
+
}
|
66
|
+
catch (error) {
|
67
|
+
this.message = (_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message;
|
68
|
+
}
|
69
|
+
finally {
|
70
|
+
this.loading = false;
|
71
|
+
}
|
72
|
+
}
|
46
73
|
buildProducts() {
|
47
74
|
return this.products.map(product => ({ sku: product.SKU, value: (product.PrecoPor * product.Quantidade), variantId: product.ProdutoVarianteId, qtd: product.Quantidade }));
|
48
75
|
}
|
49
76
|
handleCloseModal() {
|
50
77
|
this.showModal = false;
|
51
78
|
}
|
79
|
+
save() {
|
80
|
+
localStorage.setItem('@BYCODERS', this.cartId);
|
81
|
+
}
|
52
82
|
render() {
|
53
|
-
return (h("div", { key: '
|
83
|
+
return (h("div", { key: '18d08a3d03ae5106cf01a426751db8300847f95c', class: "section-cart-crm" }, h("div", { key: 'dd9e939b78616cea4ea0b77ac32fe15afe63c9f9', class: "container-button" }, this.canCancel ? h("phone-cancel-input", { value: this.customer.phone, sendPin: () => { }, loading: this.loading })
|
84
|
+
: h("phone-input", { value: this.customer.phone, sendPin: (phone) => { this.sendPin(phone); }, loading: this.loading })), h("app-modal", { key: '1ea4bbfc4725c76a93f29494b1fa75a5cddc01c2', isOpen: this.showModal, modalTitle: `Giftback`, onModalClosed: () => (this.showModal = false) }, h("crm-bonus-form", { key: '791172ad0eedeb3d2a0da2e965e1298a9bc1003d', saveStore: () => this.save(), ref: ref => this.crmBonusRef = ref, sent: this.sent, phone: this.phone, cancel: () => this.handleCloseModal(), storeName: this.storeName, products: this.buildProducts(), cartId: this.cartId, customer: this.customer }))));
|
54
85
|
}
|
55
86
|
static get assetsDirs() { return ["assets"]; }
|
56
87
|
static get style() { return CrmBonusStyle0; }
|
@@ -61,13 +92,18 @@ const CrmBonus$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonus extends H {
|
|
61
92
|
"cartId": [8, "cartid"],
|
62
93
|
"showModal": [32],
|
63
94
|
"products": [32],
|
64
|
-
"customer": [32]
|
95
|
+
"customer": [32],
|
96
|
+
"loading": [32],
|
97
|
+
"message": [32],
|
98
|
+
"phone": [32],
|
99
|
+
"canCancel": [32],
|
100
|
+
"sent": [32]
|
65
101
|
}]);
|
66
102
|
function defineCustomElement$1() {
|
67
103
|
if (typeof customElements === "undefined") {
|
68
104
|
return;
|
69
105
|
}
|
70
|
-
const components = ["crm-bonus", "app-modal", "crm-bonus-form", "giftback-finish", "giftback-pin", "giftback-progress", "loading-spinner", "phone-input", "phone-input-mask"];
|
106
|
+
const components = ["crm-bonus", "app-modal", "crm-bonus-form", "giftback-finish", "giftback-pin", "giftback-progress", "loading-spinner", "phone-cancel-input", "phone-input", "phone-input-mask"];
|
71
107
|
components.forEach(tagName => { switch (tagName) {
|
72
108
|
case "crm-bonus":
|
73
109
|
if (!customElements.get(tagName)) {
|
@@ -76,30 +112,35 @@ function defineCustomElement$1() {
|
|
76
112
|
break;
|
77
113
|
case "app-modal":
|
78
114
|
if (!customElements.get(tagName)) {
|
79
|
-
defineCustomElement$
|
115
|
+
defineCustomElement$a();
|
80
116
|
}
|
81
117
|
break;
|
82
118
|
case "crm-bonus-form":
|
83
119
|
if (!customElements.get(tagName)) {
|
84
|
-
defineCustomElement$
|
120
|
+
defineCustomElement$9();
|
85
121
|
}
|
86
122
|
break;
|
87
123
|
case "giftback-finish":
|
88
124
|
if (!customElements.get(tagName)) {
|
89
|
-
defineCustomElement$
|
125
|
+
defineCustomElement$8();
|
90
126
|
}
|
91
127
|
break;
|
92
128
|
case "giftback-pin":
|
93
129
|
if (!customElements.get(tagName)) {
|
94
|
-
defineCustomElement$
|
130
|
+
defineCustomElement$7();
|
95
131
|
}
|
96
132
|
break;
|
97
133
|
case "giftback-progress":
|
98
134
|
if (!customElements.get(tagName)) {
|
99
|
-
defineCustomElement$
|
135
|
+
defineCustomElement$6();
|
100
136
|
}
|
101
137
|
break;
|
102
138
|
case "loading-spinner":
|
139
|
+
if (!customElements.get(tagName)) {
|
140
|
+
defineCustomElement$5();
|
141
|
+
}
|
142
|
+
break;
|
143
|
+
case "phone-cancel-input":
|
103
144
|
if (!customElements.get(tagName)) {
|
104
145
|
defineCustomElement$4();
|
105
146
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"crm-bonus.js","mappings":"
|
1
|
+
{"file":"crm-bonus.js","mappings":";;;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,+2BAA+2B,CAAC;AACp4B,uBAAe,WAAW;;MCWbA,UAAQ;;;;;QAEX,oBAAe,GAAoB,IAAI,eAAe,EAAE,CAAC;yBAInC,KAAK;;;;;;wBAOJ;YAC7B,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,EAAE;YACR,KAAK,EAAE,EAAE;SACV;uBAE2B,KAAK;;;yBAGH,KAAK;;;IAGnC,MAAM,iBAAiB;QACrB,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;KACzB;IAED,MAAM,UAAU;QACd,IAAI;YACF,IAAI,IAAI,CAAC,MAAM,EAAE;;gBAEf,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;aACpC;SACF;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;SAC7B;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;KACnD;IAEM,MAAM,OAAO,CAAC,KAAa;;QAChC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAElB,IAAI;YACF,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACxC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;YAC5B,IAAI,CAAC,IAAI,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,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kEACE,MAAM,EAAE,IAAI,CAAC,SAAS,EACtB,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,OAAO,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAE7C,uEAAgB,SAAS,EAAE,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,WAAW,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAI,CAC9P,CACR,EACP;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CrmBonus"],"sources":["src/components/crm-bonus/crm-bonus.css?tag=crm-bonus&encapsulation=shadow","src/components/crm-bonus/crm-bonus.tsx"],"sourcesContent":["/* :host {\n display: block;\n} */\n\n.container-button {\n max-width: 100%;\n cursor: pointer;\n padding: 10px;\n display: flex;\n}\n\n/* padding: 0 15px 15px;\nborder: 1px solid #ddd;\nmargin-bottom: 20px; */\n\n.section-crm {\n border: 1px solid #dbd4d4;\n /* min-height: 50px; */\n text-align: -webkit-center;\n margin-bottom: 20px;\n}\n\n.section-cart-crm {\n /* border: 1px solid #dbd4d4; */\n /* min-height: 50px; */\n text-align: -webkit-center;\n margin-bottom: 20px;\n}\n\n.button {\n top: 50%;\n background-color: #6c6c7e;\n color: #fff;\n border: none;\n /* border-radius: 10px; */\n padding: 15px;\n min-height: 30px;\n min-width: 120px;\n font-size: 20px;\n cursor: pointer;\n margin-left: 10px;\n height: 70px;\n}\n\n.form-container {\n width: 100%;\n display: flex;\n justify-content: center;\n justify-content: space-around;\n}\n\n\n.btn {\n display: inline-block;\n padding: 6px 12px;\n margin-bottom: 0;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.42857143;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}","import { Component, Prop, State, h } from '@stencil/core';\nimport { IProduct, IProductWake, ICustomer } from '../../dto/validate.pin.bonus';\nimport { CrmBonusService } from '../../services/crmbonus.service';\nimport { IPinSent } from '../../components';\nimport { StepFormEnum } from '../../contants';\n\n@Component({\n tag: 'crm-bonus',\n styleUrl: 'crm-bonus.css',\n shadow: true,\n assetsDirs: ['assets']\n})\nexport class CrmBonus {\n\n private crmBonusService: CrmBonusService = new CrmBonusService();\n\n private crmBonusRef: HTMLCrmBonusFormElement;\n\n @State() showModal: boolean = false;\n @Prop({ attribute: 'userid' }) userId: number;\n @Prop({ attribute: 'storename' }) storeName;\n @Prop({ attribute: 'products' }) productsInString: string;\n @Prop({ attribute: 'cartid' }) cartId;\n\n @State() products: Array<IProductWake>;\n @State() customer: ICustomer = {\n birthDate: \"\",\n document: \"\",\n name: \"\",\n phone: \"\"\n };\n\n @State() loading: boolean = false;\n @State() message: string;\n @State() phone: number;\n @State() canCancel: boolean = false;\n @State() sent: IPinSent;\n\n async componentWillLoad() {\n await this.handleLoad();\n }\n\n async handleLoad() {\n try {\n if (this.userId) {\n // this.customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);\n console.log('user', this.customer);\n }\n } catch (error) {\n console.log('info customer')\n }\n this.products = JSON.parse(this.productsInString);\n }\n\n public async sendPin(phone: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n this.sent = await this.crmBonusService.sendPin(this.phone, this.storeName);;\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n buildProducts(): IProduct[] {\n return this.products.map(product => ({ sku: product.SKU, value: (product.PrecoPor * product.Quantidade), variantId: product.ProdutoVarianteId, qtd: product.Quantidade }))\n }\n\n handleCloseModal() {\n this.showModal = false;\n }\n\n save() {\n localStorage.setItem('@BYCODERS', this.cartId)\n }\n\n render() {\n return (\n <div class=\"section-cart-crm\">\n <div class=\"container-button\">\n {/* <img src={logo} onClick={() => (this.showModal = true)} /> */}\n {\n this.canCancel ? <phone-cancel-input value={this.customer.phone} sendPin={() => { }} loading={this.loading} /> \n : <phone-input value={this.customer.phone} sendPin={(phone) => { this.sendPin(phone) }} loading={this.loading} />\n }\n \n </div>\n <app-modal\n isOpen={this.showModal}\n modalTitle={`Giftback`}\n onModalClosed={() => (this.showModal = false)}\n >\n <crm-bonus-form saveStore={() => this.save()} ref={ref => this.crmBonusRef = ref} sent={this.sent} phone={this.phone} cancel={() => this.handleCloseModal()} storeName={this.storeName} products={this.buildProducts()} cartId={this.cartId} customer={this.customer} />\n </app-modal>\n </div>\n )\n }\n}\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { G as GiftbackProgress$1, d as defineCustomElement$1 } from './p-
|
1
|
+
import { G as GiftbackProgress$1, d as defineCustomElement$1 } from './p-c5913818.js';
|
2
2
|
|
3
3
|
const GiftbackProgress = GiftbackProgress$1;
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
@@ -12,7 +12,7 @@ const LoadingSpinner = /*@__PURE__*/ proxyCustomElement(class LoadingSpinner ext
|
|
12
12
|
this.color = '#0078d7';
|
13
13
|
}
|
14
14
|
render() {
|
15
|
-
return (h("div", { key: '
|
15
|
+
return (h("div", { key: '78b8ba44c23dcf2fe6b86d343242ff696592bacd', class: "spinner", style: { width: this.size, height: this.size, borderColor: `${this.color} transparent transparent transparent` } }));
|
16
16
|
}
|
17
17
|
static get style() { return LoadingSpinnerStyle0; }
|
18
18
|
}, [1, "loading-spinner", {
|
@@ -36,4 +36,4 @@ defineCustomElement();
|
|
36
36
|
|
37
37
|
export { LoadingSpinner as L, defineCustomElement as d };
|
38
38
|
|
39
|
-
//# sourceMappingURL=p-
|
39
|
+
//# sourceMappingURL=p-03918b34.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"p-
|
1
|
+
{"file":"p-03918b34.js","mappings":";;AAAA,MAAM,iBAAiB,GAAG,iOAAiO,CAAC;AAC5P,6BAAe,iBAAiB;;MCMnB,cAAc;;;;;oBACA,MAAM;qBACL,SAAS;;IAEjC,MAAM;QACF,QACI,4DAAK,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,sCAAsC,EAAE,GAAQ,EAC/I;KACL;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/loading-spinner/loading-spinner.css?tag=loading-spinner&encapsulation=shadow","src/components/loading-spinner/loading-spinner.tsx"],"sourcesContent":[".spinner {\n display: inline-block;\n border: 4px solid transparent;\n border-radius: 50%;\n border-top-color: var(--color, #0078d7);\n animation: spin 1s linear infinite;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}","import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'loading-spinner',\n styleUrl: 'loading-spinner.css',\n shadow: true,\n})\nexport class LoadingSpinner {\n @Prop() size: string = '50px'; // Tamanho do spinner (padrão 50px)\n @Prop() color: string = '#0078d7'; // Cor do spinner (padrão azul)\n\n render() {\n return (\n <div class=\"spinner\" style={{ width: this.size, height: this.size, borderColor: `${this.color} transparent transparent transparent` }}></div>\n );\n }\n}\n"],"version":3}
|
@@ -12,7 +12,7 @@ const GiftbackFinish = /*@__PURE__*/ proxyCustomElement(class GiftbackFinish ext
|
|
12
12
|
this.__attachShadow();
|
13
13
|
}
|
14
14
|
render() {
|
15
|
-
return (h("div", { key: '
|
15
|
+
return (h("div", { key: '4fd9a7731194fbe8e9dbe0e2fc9d4241f0baf733', class: "message-finish" }, h("img", { key: 'ba423d92f1672f14be34334fd0495f38f1f70f4a', src: successSvgrepoComSvg, width: 80 }), h("p", { key: '75d6b9648c1357ced70ad43cb94091da73224179' }, "Legal! O B\u00F4nus ser\u00E1 aplicado na sua compra.")));
|
16
16
|
}
|
17
17
|
static get style() { return GiftbackFinishStyle0; }
|
18
18
|
}, [1, "giftback-finish"]);
|
@@ -33,4 +33,4 @@ defineCustomElement();
|
|
33
33
|
|
34
34
|
export { GiftbackFinish as G, defineCustomElement as d };
|
35
35
|
|
36
|
-
//# sourceMappingURL=p-
|
36
|
+
//# sourceMappingURL=p-2667d525.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"p-
|
1
|
+
{"file":"p-2667d525.js","mappings":";;AAAA,MAAM,oBAAoB,GAAG,4rBAA4rB;;ACAztB,MAAM,iBAAiB,GAAG,mIAAmI,CAAC;AAC9J,6BAAe,iBAAiB;;MCOnB,cAAc;;;;;;IACvB,MAAM;QACF,QACI,4DAAK,KAAK,EAAC,gBAAgB,IACvB,4DAAK,GAAG,EAAEA,oBAAO,EAAE,KAAK,EAAE,EAAE,GAAI,EAChC,oHAAkD,CAChD,EACT;KACJ;;;;;;;;;;;;;;;;;;;;","names":["success"],"sources":["src/components/crm-bonus/assets/svg/success-svgrepo-com.svg","src/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.css?tag=giftback-finish&encapsulation=shadow","src/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.tsx"],"sourcesContent":["<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\r\n<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->\r\n<svg version=\"1.1\" id=\"Capa_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" \r\n\t viewBox=\"0 0 50 50\" xml:space=\"preserve\">\r\n<circle style=\"fill:#25AE88;\" cx=\"25\" cy=\"25\" r=\"25\"/>\r\n<polyline style=\"fill:none;stroke:#FFFFFF;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;\" points=\"\r\n\t38,15 22,33 12,25 \"/>\r\n</svg>",".message-finish {\n align-content: center;\n text-align: center;\n}\n\n.message-finish p {\n color: #777676;\n font-size: xx-large;\n font-family: sans-serif;\n}","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}"],"version":3}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { p as proxyCustomElement, H, h } from './p-faf7103e.js';
|
2
|
-
import { d as defineCustomElement$2 } from './p-
|
3
|
-
import { d as defineCustomElement$1 } from './p-
|
2
|
+
import { d as defineCustomElement$2 } from './p-03918b34.js';
|
3
|
+
import { d as defineCustomElement$1 } from './p-3d7c9042.js';
|
4
4
|
|
5
5
|
const PhoneInput = /*@__PURE__*/ proxyCustomElement(class PhoneInput extends H {
|
6
6
|
constructor() {
|
@@ -15,7 +15,7 @@ const PhoneInput = /*@__PURE__*/ proxyCustomElement(class PhoneInput extends H {
|
|
15
15
|
await this.sendPin(phone);
|
16
16
|
}
|
17
17
|
render() {
|
18
|
-
return (h("div", { key: '
|
18
|
+
return (h("div", { key: 'f24f14d158d9565b17aa024837d4e62e6b64c7a3', class: "form-container" }, h("phone-input-mask", { key: '88bf98c7f35b4a4211354a826fa16c922838d228', initialValue: this.value, ref: ref => this.phoneInputMask = ref }), h("button", { key: 'e822c98fb3a1c347f6d97a3008837ac79d55569f', class: `btn ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "validar" : h("loading-spinner", { size: "25px", color: "#fff" }))));
|
19
19
|
}
|
20
20
|
}, [0, "phone-input", {
|
21
21
|
"sendPin": [16],
|
@@ -49,4 +49,4 @@ defineCustomElement();
|
|
49
49
|
|
50
50
|
export { PhoneInput as P, defineCustomElement as d };
|
51
51
|
|
52
|
-
//# sourceMappingURL=p-
|
52
|
+
//# sourceMappingURL=p-3d431add.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"p-
|
1
|
+
{"file":"p-3d431add.js","mappings":";;;;MAKa,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,QACI,4DAAK,KAAK,EAAC,gBAAgB,IACvB,yEAAkB,YAAY,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,cAAc,GAAG,GAAG,GAAI,EACrF,+DAAQ,KAAK,EAAE,OAAO,IAAI,CAAC,OAAO,GAAG,UAAU,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,IAE5G,CAAC,IAAI,CAAC,OAAO,GAAG,SAAS,GAAG,uBAAiB,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,GAAG,CAEvE,CACP,EACT;KACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"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})\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 ${this.loading ? 'disabled' : ''} `} disabled={this.loading} onClick={() => this.validatePhone()}>\n {\n !this.loading ? \"validar\" : <loading-spinner size=\"25px\" color=\"#fff\" />\n }\n </button>\n </div>\n )\n }\n}"],"version":3}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { p as proxyCustomElement, H, h } from './p-faf7103e.js';
|
2
2
|
|
3
|
-
const phoneInputMaskCss = ".inline-text-field-container{display:flex;flex-direction:column}@supports (top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports (top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined{height:55px;overflow:visible}.phone{width:
|
3
|
+
const phoneInputMaskCss = ".inline-text-field-container{display:flex;flex-direction:column}@supports (top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports (top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined{height:55px;overflow:visible}.phone{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-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}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity, transform, color}";
|
4
4
|
const PhoneInputMaskStyle0 = phoneInputMaskCss;
|
5
5
|
|
6
6
|
const PhoneInputMask = /*@__PURE__*/ proxyCustomElement(class PhoneInputMask extends H {
|
@@ -10,6 +10,7 @@ const PhoneInputMask = /*@__PURE__*/ proxyCustomElement(class PhoneInputMask ext
|
|
10
10
|
this.__attachShadow();
|
11
11
|
this.phone = '';
|
12
12
|
this.initialValue = undefined;
|
13
|
+
this.disabled = undefined;
|
13
14
|
}
|
14
15
|
componentWillLoad() {
|
15
16
|
this.phone = this.initialValue;
|
@@ -32,11 +33,12 @@ const PhoneInputMask = /*@__PURE__*/ proxyCustomElement(class PhoneInputMask ext
|
|
32
33
|
return this.phone;
|
33
34
|
}
|
34
35
|
render() {
|
35
|
-
return (h("input", { key: '
|
36
|
+
return (h("input", { key: '67f707c85624ebb9ae25f11021df00db1cf237ce', disabled: this.disabled, id: "phone", type: "tel", class: "phone", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(12) 94567-8910" }));
|
36
37
|
}
|
37
38
|
static get style() { return PhoneInputMaskStyle0; }
|
38
39
|
}, [1, "phone-input-mask", {
|
39
40
|
"initialValue": [1, "initial-value"],
|
41
|
+
"disabled": [4],
|
40
42
|
"phone": [32],
|
41
43
|
"getPhone": [64]
|
42
44
|
}]);
|
@@ -57,4 +59,4 @@ defineCustomElement();
|
|
57
59
|
|
58
60
|
export { PhoneInputMask as P, defineCustomElement as d };
|
59
61
|
|
60
|
-
//# sourceMappingURL=p-
|
62
|
+
//# sourceMappingURL=p-3d7c9042.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"file":"p-3d7c9042.js","mappings":";;AAAA,MAAM,iBAAiB,GAAG,guCAAgu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AAW,EAAC,iBAAiB,GAC/B,EACJ;KACL;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/phone/phone-input-mask.css?tag=phone-input-mask&encapsulation=shadow","src/components/phone/phone-input-mask.tsx"],"sourcesContent":[".inline-text-field-container {\n display: flex;\n flex-direction: column;\n}\n\n@supports (top: max(0%)) {\n .mdc-text-field--outlined {\n padding-right: max(16px, var(--mdc-shape-small, 4px));\n }\n}\n\n@supports (top: max(0%)) {\n .mdc-text-field--outlined {\n padding-left: max(16px, calc(var(--mdc-shape-small, 4px) + 4px));\n }\n}\n\n.mdc-text-field--outlined {\n height: 55px;\n overflow: visible;\n}\n\n.phone {\n display: block;\n width: 100%;\n height: 34px;\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: 4px;\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.mdc-text-field {\n border-top-left-radius: 4px;\n border-top-left-radius: var(--mdc-shape-small, 4px);\n border-top-right-radius: 4px;\n border-top-right-radius: var(--mdc-shape-small, 4px);\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n display: inline-flex;\n align-items: baseline;\n padding: 0 16px;\n position: relative;\n box-sizing: border-box;\n overflow: hidden;\n will-change: opacity, transform, color;\n}","import { Component, h, Method, Prop, State } from '@stencil/core';\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 @Prop() initialValue: string;\n @Prop() disabled: boolean;\n\n componentWillLoad() {\n this.phone = this.initialValue; \n }\n\n private formatPhone(value: string): string {\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 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\n @Method()\n public async getPhone() {\n return this.phone;\n }\n\n render() {\n return (\n <input\n disabled={this.disabled}\n id=\"phone\"\n type=\"tel\"\n class=\"phone\"\n value={this.phone}\n onInput={(event) => this.handleInput(event)}\n placeholder=\"(12) 94567-8910\"\n />\n );\n }\n}\n"],"version":3}
|