crmbonus-component-wake 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/crmbonus-component-wake/app-modal.entry.js +23 -0
- package/dist/crmbonus-component-wake/app-modal.entry.js.map +1 -0
- package/dist/{esm/app-modal_2.entry.js → crmbonus-component-wake/crm-bonus-form.entry.js} +13 -26
- package/dist/crmbonus-component-wake/crm-bonus-form.entry.js.map +1 -0
- package/dist/{esm → crmbonus-component-wake}/crm-bonus.entry.js +16 -8
- package/dist/crmbonus-component-wake/crm-bonus.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +48 -1
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
- package/dist/{cjs/crmbonus.service-a626c034.js → crmbonus-component-wake/crmbonus.service-5e579e1c.js} +165 -92
- package/dist/crmbonus-component-wake/crmbonus.service-5e579e1c.js.map +1 -0
- package/dist/{components/p-629fcb5b.js → crmbonus-component-wake/crmbonus.service-72c64bc3.js} +166 -91
- package/dist/crmbonus-component-wake/crmbonus.service-72c64bc3.js.map +1 -0
- package/dist/crmbonus-component-wake/crmbonus.service-a0dea046.js +3868 -0
- package/dist/crmbonus-component-wake/crmbonus.service-a0dea046.js.map +1 -0
- package/dist/{esm/crmbonus.service-83f67708.js → crmbonus-component-wake/crmbonus.service-ce105f62.js} +165 -90
- package/dist/crmbonus-component-wake/crmbonus.service-ce105f62.js.map +1 -0
- package/dist/crmbonus-component-wake/giftback-finish.entry.js +19 -0
- package/dist/crmbonus-component-wake/giftback-finish.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/giftback-pin.entry.js +44 -0
- package/dist/crmbonus-component-wake/giftback-pin.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/giftback-progress.entry.js +40 -0
- package/dist/crmbonus-component-wake/giftback-progress.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/index-f557ce7c.js +3039 -0
- package/dist/crmbonus-component-wake/index-f557ce7c.js.map +1 -0
- package/dist/crmbonus-component-wake/index.esm.js +16 -1
- package/dist/crmbonus-component-wake/index.esm.js.map +1 -1
- package/dist/{esm → crmbonus-component-wake}/loading-spinner.entry.js +3 -4
- package/dist/crmbonus-component-wake/loading-spinner.entry.js.map +1 -0
- package/dist/{esm → crmbonus-component-wake}/pedido-finalizado.entry.js +3 -3
- package/dist/crmbonus-component-wake/pedido-finalizado.entry.js.map +1 -0
- package/dist/{components/p-2dbfb2c7.js → crmbonus-component-wake/phone-input-mask.entry.js} +9 -30
- package/dist/crmbonus-component-wake/phone-input-mask.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/phone-input.entry.js +21 -0
- package/dist/crmbonus-component-wake/phone-input.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/shadow-css-7ad5caf8.js +334 -0
- package/dist/crmbonus-component-wake/shadow-css-7ad5caf8.js.map +1 -0
- package/dist/types/components/crm-bonus/crm-bonus.d.ts +1 -0
- package/dist/types/components/crm-bonus-form/crm-bonus-form.d.ts +2 -0
- package/dist/types/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.d.ts +1 -0
- package/dist/types/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.d.ts +1 -0
- package/dist/types/components.d.ts +6 -0
- package/package.json +1 -1
- package/dist/cjs/app-globals-3a1e7e63.js +0 -7
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/app-modal_2.cjs.entry.js +0 -127
- package/dist/cjs/app-modal_2.cjs.entry.js.map +0 -1
- package/dist/cjs/crm-bonus.cjs.entry.js +0 -46
- package/dist/cjs/crm-bonus.cjs.entry.js.map +0 -1
- package/dist/cjs/crmbonus-component-wake.cjs.js +0 -27
- package/dist/cjs/crmbonus-component-wake.cjs.js.map +0 -1
- package/dist/cjs/crmbonus.service-a626c034.js.map +0 -1
- package/dist/cjs/giftback-finish_5.cjs.entry.js +0 -153
- package/dist/cjs/giftback-finish_5.cjs.entry.js.map +0 -1
- package/dist/cjs/index-52d8a075.js +0 -1248
- package/dist/cjs/index-52d8a075.js.map +0 -1
- package/dist/cjs/index.cjs.js +0 -11
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js +0 -17
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/loading-spinner.cjs.entry.js +0 -24
- package/dist/cjs/loading-spinner.cjs.entry.js.map +0 -1
- package/dist/cjs/pedido-finalizado.cjs.entry.js +0 -28
- package/dist/cjs/pedido-finalizado.cjs.entry.js.map +0 -1
- package/dist/collection/collection-manifest.json +0 -21
- package/dist/collection/components/crm-bonus/assets/logo.svg +0 -18
- package/dist/collection/components/crm-bonus/assets/success-svgrepo-com.svg +0 -8
- package/dist/collection/components/crm-bonus/assets/svg/logo.svg +0 -18
- package/dist/collection/components/crm-bonus/assets/svg/success-svgrepo-com.svg +0 -8
- package/dist/collection/components/crm-bonus/crm-bonus.css +0 -20
- package/dist/collection/components/crm-bonus/crm-bonus.js +0 -123
- package/dist/collection/components/crm-bonus/crm-bonus.js.map +0 -1
- package/dist/collection/components/crm-bonus-form/crm-bonus-form.css +0 -32
- package/dist/collection/components/crm-bonus-form/crm-bonus-form.js +0 -194
- package/dist/collection/components/crm-bonus-form/crm-bonus-form.js.map +0 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.css +0 -10
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js +0 -20
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js.map +0 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.css +0 -54
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js +0 -111
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js.map +0 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.css +0 -95
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js +0 -111
- package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js.map +0 -1
- package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js +0 -75
- package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js.map +0 -1
- package/dist/collection/components/loading-spinner/loading-spinner.css +0 -17
- package/dist/collection/components/loading-spinner/loading-spinner.js +0 -63
- package/dist/collection/components/loading-spinner/loading-spinner.js.map +0 -1
- package/dist/collection/components/modal/app-modal.css +0 -45
- package/dist/collection/components/modal/app-modal.js +0 -83
- package/dist/collection/components/modal/app-modal.js.map +0 -1
- package/dist/collection/components/pedido/pedido.js +0 -58
- package/dist/collection/components/pedido/pedido.js.map +0 -1
- package/dist/collection/components/phone/phone-input-mask.css +0 -47
- package/dist/collection/components/phone/phone-input-mask.js +0 -90
- package/dist/collection/components/phone/phone-input-mask.js.map +0 -1
- package/dist/collection/contants/index.js +0 -8
- package/dist/collection/contants/index.js.map +0 -1
- package/dist/collection/contants/mocks.js +0 -28
- package/dist/collection/contants/mocks.js.map +0 -1
- package/dist/collection/dto/pin.sent.js +0 -2
- package/dist/collection/dto/pin.sent.js.map +0 -1
- package/dist/collection/dto/validate.pin.bonus.js +0 -2
- package/dist/collection/dto/validate.pin.bonus.js.map +0 -1
- package/dist/collection/index.js +0 -11
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/services/crmbonus.service.js +0 -39
- package/dist/collection/services/crmbonus.service.js.map +0 -1
- package/dist/collection/utils/utils.js +0 -4
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/app-modal.js +0 -8
- package/dist/components/app-modal.js.map +0 -1
- package/dist/components/crm-bonus-form.js +0 -8
- package/dist/components/crm-bonus-form.js.map +0 -1
- package/dist/components/crm-bonus.js +0 -117
- package/dist/components/crm-bonus.js.map +0 -1
- package/dist/components/giftback-finish.js +0 -8
- package/dist/components/giftback-finish.js.map +0 -1
- package/dist/components/giftback-pin.js +0 -8
- package/dist/components/giftback-pin.js.map +0 -1
- package/dist/components/giftback-progress.js +0 -8
- package/dist/components/giftback-progress.js.map +0 -1
- package/dist/components/index.js +0 -9
- package/dist/components/index.js.map +0 -1
- package/dist/components/loading-spinner.js +0 -8
- package/dist/components/loading-spinner.js.map +0 -1
- package/dist/components/p-17ee9996.js +0 -52
- package/dist/components/p-17ee9996.js.map +0 -1
- package/dist/components/p-2dbfb2c7.js.map +0 -1
- package/dist/components/p-563ea4c5.js +0 -166
- package/dist/components/p-563ea4c5.js.map +0 -1
- package/dist/components/p-629fcb5b.js.map +0 -1
- package/dist/components/p-7294e43f.js +0 -36
- package/dist/components/p-7294e43f.js.map +0 -1
- package/dist/components/p-78529eea.js +0 -39
- package/dist/components/p-78529eea.js.map +0 -1
- package/dist/components/p-8e0ed8dd.js +0 -43
- package/dist/components/p-8e0ed8dd.js.map +0 -1
- package/dist/components/p-a1781d03.js +0 -72
- package/dist/components/p-a1781d03.js.map +0 -1
- package/dist/components/p-a88bc337.js +0 -67
- package/dist/components/p-a88bc337.js.map +0 -1
- package/dist/components/p-faf7103e.js +0 -1064
- package/dist/components/p-faf7103e.js.map +0 -1
- package/dist/components/pedido-finalizado.js +0 -45
- package/dist/components/pedido-finalizado.js.map +0 -1
- package/dist/components/phone-input-mask.js +0 -8
- package/dist/components/phone-input-mask.js.map +0 -1
- package/dist/components/phone-input.js +0 -8
- package/dist/components/phone-input.js.map +0 -1
- package/dist/crmbonus-component-wake/p-54e51298.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-54e51298.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-629fcb5b.js +0 -2
- package/dist/crmbonus-component-wake/p-629fcb5b.js.map +0 -1
- package/dist/crmbonus-component-wake/p-6b075110.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-6b075110.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-ba53f0f3.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-ba53f0f3.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-bf4b486e.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-bf4b486e.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-e1255160.js +0 -2
- package/dist/crmbonus-component-wake/p-e1255160.js.map +0 -1
- package/dist/crmbonus-component-wake/p-f0d68c31.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-f0d68c31.entry.js.map +0 -1
- package/dist/env.js +0 -5
- package/dist/env.js.map +0 -1
- package/dist/esm/app-modal_2.entry.js.map +0 -1
- package/dist/esm/crm-bonus.entry.js.map +0 -1
- package/dist/esm/crmbonus-component-wake.js +0 -22
- package/dist/esm/crmbonus-component-wake.js.map +0 -1
- package/dist/esm/crmbonus.service-83f67708.js.map +0 -1
- package/dist/esm/giftback-finish_5.entry.js +0 -145
- package/dist/esm/giftback-finish_5.entry.js.map +0 -1
- package/dist/esm/index-9f7bde48.js +0 -1220
- package/dist/esm/index-9f7bde48.js.map +0 -1
- package/dist/esm/index.js +0 -7
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js +0 -13
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/loading-spinner.entry.js.map +0 -1
- package/dist/esm/pedido-finalizado.entry.js.map +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- /package/dist/{esm → crmbonus-component-wake}/app-globals-0f993ce5.js +0 -0
- /package/dist/{esm → crmbonus-component-wake}/app-globals-0f993ce5.js.map +0 -0
@@ -1,90 +0,0 @@
|
|
1
|
-
import { h } from "@stencil/core";
|
2
|
-
export class PhoneInputMask {
|
3
|
-
constructor() {
|
4
|
-
this.phone = '';
|
5
|
-
this.initialValue = undefined;
|
6
|
-
}
|
7
|
-
componentWillLoad() {
|
8
|
-
this.phone = this.initialValue;
|
9
|
-
}
|
10
|
-
formatPhone(value) {
|
11
|
-
const cleaned = value.replace(/\D/g, ''); // Remove tudo que não for número
|
12
|
-
const match = cleaned.match(/^(\d{0,2})(\d{0,5})(\d{0,4})$/);
|
13
|
-
if (!match)
|
14
|
-
return value;
|
15
|
-
const part1 = match[1] ? `(${match[1]}` : '';
|
16
|
-
const part2 = match[2] ? `) ${match[2]}` : '';
|
17
|
-
const part3 = match[3] ? `-${match[3]}` : '';
|
18
|
-
return `${part1}${part2}${part3}`;
|
19
|
-
}
|
20
|
-
handleInput(event) {
|
21
|
-
const input = event.target;
|
22
|
-
this.phone = this.formatPhone(input.value);
|
23
|
-
}
|
24
|
-
async getPhone() {
|
25
|
-
return this.phone;
|
26
|
-
}
|
27
|
-
render() {
|
28
|
-
return (h("input", { key: 'af9b2988d3866d22465821bcd16be45f3cd12ae4', id: "phone", type: "tel", class: "phone", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(12) 94567-8910" }));
|
29
|
-
}
|
30
|
-
static get is() { return "phone-input-mask"; }
|
31
|
-
static get encapsulation() { return "shadow"; }
|
32
|
-
static get originalStyleUrls() {
|
33
|
-
return {
|
34
|
-
"$": ["phone-input-mask.css"]
|
35
|
-
};
|
36
|
-
}
|
37
|
-
static get styleUrls() {
|
38
|
-
return {
|
39
|
-
"$": ["phone-input-mask.css"]
|
40
|
-
};
|
41
|
-
}
|
42
|
-
static get properties() {
|
43
|
-
return {
|
44
|
-
"initialValue": {
|
45
|
-
"type": "string",
|
46
|
-
"mutable": false,
|
47
|
-
"complexType": {
|
48
|
-
"original": "string",
|
49
|
-
"resolved": "string",
|
50
|
-
"references": {}
|
51
|
-
},
|
52
|
-
"required": false,
|
53
|
-
"optional": false,
|
54
|
-
"docs": {
|
55
|
-
"tags": [],
|
56
|
-
"text": ""
|
57
|
-
},
|
58
|
-
"attribute": "initial-value",
|
59
|
-
"reflect": false
|
60
|
-
}
|
61
|
-
};
|
62
|
-
}
|
63
|
-
static get states() {
|
64
|
-
return {
|
65
|
-
"phone": {}
|
66
|
-
};
|
67
|
-
}
|
68
|
-
static get methods() {
|
69
|
-
return {
|
70
|
-
"getPhone": {
|
71
|
-
"complexType": {
|
72
|
-
"signature": "() => Promise<string>",
|
73
|
-
"parameters": [],
|
74
|
-
"references": {
|
75
|
-
"Promise": {
|
76
|
-
"location": "global",
|
77
|
-
"id": "global::Promise"
|
78
|
-
}
|
79
|
-
},
|
80
|
-
"return": "Promise<string>"
|
81
|
-
},
|
82
|
-
"docs": {
|
83
|
-
"text": "",
|
84
|
-
"tags": []
|
85
|
-
}
|
86
|
-
}
|
87
|
-
};
|
88
|
-
}
|
89
|
-
}
|
90
|
-
//# sourceMappingURL=phone-input-mask.js.map
|
@@ -1 +0,0 @@
|
|
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;;;IAG3B,iBAAiB;QACb,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;IACnC,CAAC;IAGO,WAAW,CAAC,KAAa;QAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,iCAAiC;QAC3E,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;QAC7D,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QAEzB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAE7C,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC;IACtC,CAAC;IAEO,WAAW,CAAC,KAAY;QAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IAGM,KAAK,CAAC,QAAQ;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,MAAM;QACF,OAAO,CACH,8DACI,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\n componentWillLoad() {\n this.phone = this.initialValue; \n }\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 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,8 +0,0 @@
|
|
1
|
-
export var StepFormEnum;
|
2
|
-
(function (StepFormEnum) {
|
3
|
-
StepFormEnum[StepFormEnum["STEP_PHONE"] = 1] = "STEP_PHONE";
|
4
|
-
StepFormEnum[StepFormEnum["STEP_PIN"] = 2] = "STEP_PIN";
|
5
|
-
StepFormEnum[StepFormEnum["STEP_RESERVE"] = 3] = "STEP_RESERVE";
|
6
|
-
StepFormEnum[StepFormEnum["STEP_APPLY"] = 4] = "STEP_APPLY";
|
7
|
-
})(StepFormEnum || (StepFormEnum = {}));
|
8
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contants/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACpB,2DAAc,CAAA;IACd,uDAAY,CAAA;IACZ,+DAAgB,CAAA;IAChB,2DAAc,CAAA;AAClB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB","sourcesContent":["export enum StepFormEnum {\n STEP_PHONE = 1,\n STEP_PIN = 2,\n STEP_RESERVE = 3,\n STEP_APPLY = 4\n}"]}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
export const RESPONSE_CONSULTA_BONUS = {
|
2
|
-
data: {
|
3
|
-
"hasBonus": true,
|
4
|
-
"bonusBalance": 9.89,
|
5
|
-
"totalBonus": 9.89,
|
6
|
-
"minimumPurchase": 39.56,
|
7
|
-
"bonusIds": "848785416",
|
8
|
-
"history": [
|
9
|
-
{
|
10
|
-
"validityStart": "2024-11-12 00:00:00",
|
11
|
-
"validityEnd": "2024-12-12 23:59:59",
|
12
|
-
"value": 0
|
13
|
-
},
|
14
|
-
{
|
15
|
-
"validityStart": "2024-11-20 00:00:00",
|
16
|
-
"validityEnd": "2024-12-20 23:59:59",
|
17
|
-
"value": 9.89
|
18
|
-
}
|
19
|
-
],
|
20
|
-
"storeId": 100932,
|
21
|
-
"userId": 27047371,
|
22
|
-
"cartId": "7be29cd3-f602-4cb8-bdb8-02f7cdef6fee",
|
23
|
-
"calculatedValue": 2200,
|
24
|
-
"totalValue": 2200,
|
25
|
-
firstValidityDate: "2024-11-20 00:00:00",
|
26
|
-
}
|
27
|
-
};
|
28
|
-
//# sourceMappingURL=mocks.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mocks.js","sourceRoot":"","sources":["../../../src/contants/mocks.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACnC,IAAI,EAAG;QACH,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,IAAI;QACpB,YAAY,EAAE,IAAI;QAClB,iBAAiB,EAAE,KAAK;QACxB,UAAU,EAAE,WAAW;QACvB,SAAS,EAAE;YACP;gBACI,eAAe,EAAE,qBAAqB;gBACtC,aAAa,EAAE,qBAAqB;gBACpC,OAAO,EAAE,CAAC;aACb;YACD;gBACI,eAAe,EAAE,qBAAqB;gBACtC,aAAa,EAAE,qBAAqB;gBACpC,OAAO,EAAE,IAAI;aAChB;SACJ;QACD,SAAS,EAAE,MAAM;QACjB,QAAQ,EAAE,QAAQ;QAClB,QAAQ,EAAE,sCAAsC;QAChD,iBAAiB,EAAE,IAAI;QACvB,YAAY,EAAE,IAAI;QAClB,iBAAiB,EAAE,qBAAqB;KACjC;CACd,CAAA","sourcesContent":["import { IBonus } from \"../components\";\n\nexport const RESPONSE_CONSULTA_BONUS = {\n data: {\n \"hasBonus\": true,\n \"bonusBalance\": 9.89,\n \"totalBonus\": 9.89,\n \"minimumPurchase\": 39.56,\n \"bonusIds\": \"848785416\",\n \"history\": [\n {\n \"validityStart\": \"2024-11-12 00:00:00\",\n \"validityEnd\": \"2024-12-12 23:59:59\",\n \"value\": 0\n },\n {\n \"validityStart\": \"2024-11-20 00:00:00\",\n \"validityEnd\": \"2024-12-20 23:59:59\",\n \"value\": 9.89\n }\n ],\n \"storeId\": 100932,\n \"userId\": 27047371,\n \"cartId\": \"7be29cd3-f602-4cb8-bdb8-02f7cdef6fee\",\n \"calculatedValue\": 2200,\n \"totalValue\": 2200,\n firstValidityDate: \"2024-11-20 00:00:00\",\n } as IBonus\n}"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"pin.sent.js","sourceRoot":"","sources":["../../../src/dto/pin.sent.ts"],"names":[],"mappings":"","sourcesContent":["export interface IPinSent {\n storeId: number;\n userId: number;\n}"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"validate.pin.bonus.js","sourceRoot":"","sources":["../../../src/dto/validate.pin.bonus.ts"],"names":[],"mappings":"","sourcesContent":["export interface IProduct {\n variantId: number;\n sku: string;\n value: number;\n qtd: number;\n}\n\nexport interface IProductWake {\n ProdutoVarianteId: number;\n SKU: string;\n PrecoPor: number;\n Quantidade: number;\n}\n\nexport interface ICustomer {\n birthDate: string;\n document: string;\n name: string;\n phone: string;\n}\n\nexport interface IProccesPinBonusDto {\n cartId: string;\n products: Array<IProduct>;\n loja_id: number;\n user_id: number;\n cellphone: string;\n pin: string;\n\n}\n\nexport interface IBonus {\n hasBonus: boolean;\n bonusBalance: number;\n totalBonus: number;\n minimumPurchase: number;\n bonusIds: string;\n firstValidityDate: string\n history: [\n {\n validityStart: string;\n validityEnd: string;\n value: number\n },\n {\n validityStart: string;\n validityEnd: string\n value: number\n }\n ]\n storeId: number;\n userId: number;\n cartId: string\n calculatedValue: number;\n totalValue: number\n}\n\n\nexport interface IReserveDTO {\n cart_id: string,\n gross_value: number,\n redeemed_bonus: number,\n ticket: string\n}"]}
|
package/dist/collection/index.js
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @fileoverview entry point for your component library
|
3
|
-
*
|
4
|
-
* This is the entry point for your component library. Use this file to export utilities,
|
5
|
-
* constants or data structure that accompany your components.
|
6
|
-
*
|
7
|
-
* DO NOT use this file to export your components. Instead, use the recommended approaches
|
8
|
-
* to consume components of this package as outlined in the `README.md`.
|
9
|
-
*/
|
10
|
-
export { format } from './utils/utils';
|
11
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC","sourcesContent":["/**\n * @fileoverview entry point for your component library\n *\n * This is the entry point for your component library. Use this file to export utilities,\n * constants or data structure that accompany your components.\n *\n * DO NOT use this file to export your components. Instead, use the recommended approaches\n * to consume components of this package as outlined in the `README.md`.\n */\n\nexport { format } from './utils/utils';\nexport type * from './components.d.ts';\n"]}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
import axios from "axios";
|
2
|
-
import { CRM_BONUS_API_URL } from "../../env";
|
3
|
-
export class CrmBonusService {
|
4
|
-
constructor() {
|
5
|
-
this.axiosInstance = axios.create({
|
6
|
-
baseURL: CRM_BONUS_API_URL,
|
7
|
-
headers: {
|
8
|
-
'Content-Type': 'application/json',
|
9
|
-
'accept': 'application/json',
|
10
|
-
},
|
11
|
-
});
|
12
|
-
}
|
13
|
-
async getCustomer(userId, store) {
|
14
|
-
const response = await this.axiosInstance.get(`/api/wake/store/${store}/customer/${userId}`, { headers: { 'Content-Type': 'application/json' } });
|
15
|
-
console.log('response.data', response.data);
|
16
|
-
return response.data;
|
17
|
-
}
|
18
|
-
async updateOrder(cartId, orderId) {
|
19
|
-
const response = await this.axiosInstance.post("/api/crm-bonus/teste", { cartId, orderId }, { headers: { 'Content-Type': 'application/json' } });
|
20
|
-
console.log('response', response.data);
|
21
|
-
}
|
22
|
-
async sendPin(phone, store) {
|
23
|
-
const response = await this.axiosInstance.post("/api/crm-bonus/send-pin", { celular: phone, nome: "giftback" }, { headers: { store } });
|
24
|
-
return {
|
25
|
-
storeId: response.data.store_id,
|
26
|
-
userId: response.data.user_id
|
27
|
-
};
|
28
|
-
}
|
29
|
-
async validatePinBonus(payload, store) {
|
30
|
-
console.log('[validatePinBonus]', payload);
|
31
|
-
const response = await this.axiosInstance.post("/api/crm-bonus/process-pin-bonus", payload, { headers: { store } });
|
32
|
-
return response.data;
|
33
|
-
}
|
34
|
-
async reserve(payload, store) {
|
35
|
-
const response = await this.axiosInstance.post("/api/crm-bonus/redeem-bonus", payload, { headers: { store } });
|
36
|
-
return response.data;
|
37
|
-
}
|
38
|
-
}
|
39
|
-
//# sourceMappingURL=crmbonus.service.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"crmbonus.service.js","sourceRoot":"","sources":["../../../src/services/crmbonus.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAI7C,MAAM,OAAO,eAAe;IAGxB;QACI,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC;YAC9B,OAAO,EAAE,iBAAiB;YAC1B,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,QAAQ,EAAE,kBAAkB;aAC7B;SACF,CAAC,CAAC;IACT,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,MAAc,EAAE,KAAa;QAC3C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,mBAAmB,KAAK,aAAa,MAAM,EAAE,EAAG,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAA;QAClJ,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;QAC3C,OAAO,QAAQ,CAAC,IAAI,CAAA;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OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;CACJ","sourcesContent":["import axios, { AxiosInstance } from 'axios';\nimport { CRM_BONUS_API_URL } from '../../env'\nimport { IPinSent } from '../dto/pin.sent';\nimport { IBonus, IProccesPinBonusDto, IReserveDTO } from '../dto/validate.pin.bonus';\n\nexport class CrmBonusService {\n private axiosInstance: AxiosInstance;\n\n constructor() {\n this.axiosInstance = axios.create({\n baseURL: CRM_BONUS_API_URL,\n headers: {\n 'Content-Type': 'application/json',\n 'accept': 'application/json',\n },\n });\n }\n\n async getCustomer(userId: number, store: string) {\n const response = await this.axiosInstance.get(`/api/wake/store/${store}/customer/${userId}`, { headers: { 'Content-Type': 'application/json' } })\n console.log('response.data', response.data)\n return response.data\n }\n\n async updateOrder(cartId: string, orderId: number){\n const response = await this.axiosInstance.post(\"/api/crm-bonus/teste\", { cartId, orderId }, { headers: { 'Content-Type': 'application/json' } })\n\n console.log('response', response.data)\n \n }\n\n async sendPin(phone: number, store: string): Promise<IPinSent> {\n const response = await this.axiosInstance.post(\"/api/crm-bonus/send-pin\", { celular: phone, nome: \"giftback\" }, { headers: { store } });\n return {\n storeId: response.data.store_id,\n userId: response.data.user_id\n }\n }\n\n async validatePinBonus(payload: IProccesPinBonusDto, store: string): Promise<IBonus> {\n console.log('[validatePinBonus]', payload);\n\n const response = await this.axiosInstance.post(\"/api/crm-bonus/process-pin-bonus\", payload, { headers: { store } })\n\n return response.data;\n }\n\n async reserve(payload: IReserveDTO, store: string) {\n const response = await this.axiosInstance.post(\"/api/crm-bonus/redeem-bonus\", payload, { headers: { store } });\n return response.data;\n }\n}"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,MAAe,EAAE,IAAa;IACnE,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACjF,CAAC","sourcesContent":["export function format(first?: string, middle?: string, last?: string): string {\n return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');\n}\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"app-modal.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { C as CrmBonusForm$1, d as defineCustomElement$1 } from './p-563ea4c5.js';
|
2
|
-
|
3
|
-
const CrmBonusForm = CrmBonusForm$1;
|
4
|
-
const defineCustomElement = defineCustomElement$1;
|
5
|
-
|
6
|
-
export { CrmBonusForm, defineCustomElement };
|
7
|
-
|
8
|
-
//# sourceMappingURL=crm-bonus-form.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"crm-bonus-form.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
@@ -1,117 +0,0 @@
|
|
1
|
-
import { p as proxyCustomElement, H, h } from './p-faf7103e.js';
|
2
|
-
import { C as CrmBonusService } from './p-629fcb5b.js';
|
3
|
-
import { d as defineCustomElement$9 } from './p-8e0ed8dd.js';
|
4
|
-
import { d as defineCustomElement$8 } from './p-563ea4c5.js';
|
5
|
-
import { d as defineCustomElement$7 } from './p-7294e43f.js';
|
6
|
-
import { d as defineCustomElement$6 } from './p-a1781d03.js';
|
7
|
-
import { d as defineCustomElement$5 } from './p-a88bc337.js';
|
8
|
-
import { d as defineCustomElement$4 } from './p-78529eea.js';
|
9
|
-
import { d as defineCustomElement$3 } from './p-17ee9996.js';
|
10
|
-
import { d as defineCustomElement$2 } from './p-2dbfb2c7.js';
|
11
|
-
|
12
|
-
const logoSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaH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NDQuMDAwMiA1OTAuNSA0NC4wMDAyQzU4MiA0NC4wMDAyIDU3Ny4zIDQ3LjEwMDIgNTc3LjMgNTEuODAwMkM1NzcuMyA1NS4zMDAyIDU3OS45IDU4LjgwMDIgNTg3LjcgNjAuMDAwMkw2MDAuMiA2Mi4wMDAyQzYxMC4zIDYzLjgwMDIgNjIwLjIgNjguMjAwMiA2MjAuMiA4MS4yMDAyQzYyMC4yIDk1LjMwMDIgNjA3LjkgMTAyLjUgNTkxLjEgMTAyLjVDNTc1LjMgMTAyLjUgNTYxLjkgOTYuMzAwMiA1NjAuMiA3OC43MDAyTDU3My44IDc4LjgwMDJDNTc1LjMgODcuMDAwMiA1ODEuNCA5MC41MDAyIDU5MS41IDkwLjUwMDJaIiBmaWxsPSJjdXJyZW50Q29sb3IiPjwvcGF0aD4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xNjI5XzE4OCIgeDE9IjYzNi44MzMiIHkxPSI5Ny44MjYxIiB4Mj0iNzEzLjQ2IiB5Mj0iMjYuNjU4MiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjRjdBODMwIj48L3N0b3A+CjxzdG9wIG9mZnNldD0iMC42MzUzIiBzdG9wLWNvbG9yPSIjRjA4MzM2Ij48L3N0b3A+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0VBNTM0NiI+PC9zdG9wPgo8L2xpbmVhckdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPg==';
|
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}";
|
15
|
-
const CrmBonusStyle0 = crmBonusCss;
|
16
|
-
|
17
|
-
const CrmBonus$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonus extends H {
|
18
|
-
constructor() {
|
19
|
-
super();
|
20
|
-
this.__registerHost();
|
21
|
-
this.__attachShadow();
|
22
|
-
this.crmBonusService = new CrmBonusService();
|
23
|
-
this.showModal = false;
|
24
|
-
this.userId = undefined;
|
25
|
-
this.storeName = undefined;
|
26
|
-
this.productsInString = undefined;
|
27
|
-
this.cartId = undefined;
|
28
|
-
this.products = undefined;
|
29
|
-
this.customer = undefined;
|
30
|
-
}
|
31
|
-
async componentWillLoad() {
|
32
|
-
await this.handleLoad();
|
33
|
-
}
|
34
|
-
async handleLoad() {
|
35
|
-
const customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);
|
36
|
-
console.log('user', customer);
|
37
|
-
this.products = JSON.parse(this.productsInString);
|
38
|
-
this.customer = customer;
|
39
|
-
}
|
40
|
-
buildProducts() {
|
41
|
-
return this.products.map(product => ({ sku: product.SKU, value: (product.PrecoPor * product.Quantidade), variantId: product.ProdutoVarianteId, qtd: product.Quantidade }));
|
42
|
-
}
|
43
|
-
render() {
|
44
|
-
return (h("div", { key: 'a2152a6359b8c1edf88ff80129cd357d3fd267da', class: "section-crm" }, h("div", { key: '8c8e6059d262ff2995faf20dcbb6f9d76c102cfc', class: "container-button" }, h("img", { key: '6055ae7f6714b661f0a895192ca1d12091a7d297', src: logoSvg, onClick: () => (this.showModal = true) })), h("app-modal", { key: '466d282b87fe9a3e2078930607b652b1e43efc3e', isOpen: this.showModal, modalTitle: `Giftback`, onModalClosed: () => (this.showModal = false) }, h("crm-bonus-form", { key: '7e7f3d64f81f9b41aa55296c871697917b668c61', storeName: this.storeName, products: this.buildProducts(), cartId: this.cartId, customer: this.customer }))));
|
45
|
-
}
|
46
|
-
static get assetsDirs() { return ["assets"]; }
|
47
|
-
static get style() { return CrmBonusStyle0; }
|
48
|
-
}, [1, "crm-bonus", {
|
49
|
-
"userId": [2, "userid"],
|
50
|
-
"storeName": [8, "storename"],
|
51
|
-
"productsInString": [1, "products"],
|
52
|
-
"cartId": [8, "cartid"],
|
53
|
-
"showModal": [32],
|
54
|
-
"products": [32],
|
55
|
-
"customer": [32]
|
56
|
-
}]);
|
57
|
-
function defineCustomElement$1() {
|
58
|
-
if (typeof customElements === "undefined") {
|
59
|
-
return;
|
60
|
-
}
|
61
|
-
const components = ["crm-bonus", "app-modal", "crm-bonus-form", "giftback-finish", "giftback-pin", "giftback-progress", "loading-spinner", "phone-input", "phone-input-mask"];
|
62
|
-
components.forEach(tagName => { switch (tagName) {
|
63
|
-
case "crm-bonus":
|
64
|
-
if (!customElements.get(tagName)) {
|
65
|
-
customElements.define(tagName, CrmBonus$1);
|
66
|
-
}
|
67
|
-
break;
|
68
|
-
case "app-modal":
|
69
|
-
if (!customElements.get(tagName)) {
|
70
|
-
defineCustomElement$9();
|
71
|
-
}
|
72
|
-
break;
|
73
|
-
case "crm-bonus-form":
|
74
|
-
if (!customElements.get(tagName)) {
|
75
|
-
defineCustomElement$8();
|
76
|
-
}
|
77
|
-
break;
|
78
|
-
case "giftback-finish":
|
79
|
-
if (!customElements.get(tagName)) {
|
80
|
-
defineCustomElement$7();
|
81
|
-
}
|
82
|
-
break;
|
83
|
-
case "giftback-pin":
|
84
|
-
if (!customElements.get(tagName)) {
|
85
|
-
defineCustomElement$6();
|
86
|
-
}
|
87
|
-
break;
|
88
|
-
case "giftback-progress":
|
89
|
-
if (!customElements.get(tagName)) {
|
90
|
-
defineCustomElement$5();
|
91
|
-
}
|
92
|
-
break;
|
93
|
-
case "loading-spinner":
|
94
|
-
if (!customElements.get(tagName)) {
|
95
|
-
defineCustomElement$4();
|
96
|
-
}
|
97
|
-
break;
|
98
|
-
case "phone-input":
|
99
|
-
if (!customElements.get(tagName)) {
|
100
|
-
defineCustomElement$3();
|
101
|
-
}
|
102
|
-
break;
|
103
|
-
case "phone-input-mask":
|
104
|
-
if (!customElements.get(tagName)) {
|
105
|
-
defineCustomElement$2();
|
106
|
-
}
|
107
|
-
break;
|
108
|
-
} });
|
109
|
-
}
|
110
|
-
defineCustomElement$1();
|
111
|
-
|
112
|
-
const CrmBonus = CrmBonus$1;
|
113
|
-
const defineCustomElement = defineCustomElement$1;
|
114
|
-
|
115
|
-
export { CrmBonus, defineCustomElement };
|
116
|
-
|
117
|
-
//# sourceMappingURL=crm-bonus.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"crm-bonus.js","mappings":";;;;;;;;;;;AAAA,MAAM,OAAO,GAAG,w9JAAw9J;;ACAx+J,MAAM,WAAW,GAAG,mJAAmJ,CAAC;AACxK,uBAAe,WAAW;;MCUbA,UAAQ;;;;;QAEX,oBAAe,GAAoB,IAAI,eAAe,EAAE,CAAC;yBAEnC,KAAK;;;;;;;;IASnC,MAAM,iBAAiB;QACrB,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;KACzB;IAED,MAAM,UAAU;QACd,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAErF,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;KAC1B;IAED,aAAa;QACX,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,KAAK,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,iBAAiB,EAAE,GAAG,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAA;KAC3K;IAED,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,aAAa,IACtB,4DAAK,KAAK,EAAC,kBAAkB,IAC3B,4DAAK,GAAG,EAAEC,OAAI,EAAE,OAAO,EAAE,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAI,CACtD,EACN,kEACE,MAAM,EAAE,IAAI,CAAC,SAAS,EACtB,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,OAAO,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAE7C,uEAAgB,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAG,CAChH,CACR,EACP;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CrmBonus","logo"],"sources":["src/components/crm-bonus/assets/svg/logo.svg","src/components/crm-bonus/crm-bonus.css?tag=crm-bonus&encapsulation=shadow","src/components/crm-bonus/crm-bonus.tsx"],"sourcesContent":["<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 703 103\" fill=\"none\" preserveAspectRatio=\"xMidYMid meet\" aria-hidden=\"true\" role=\"img\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M689.2 57.5004L647.1 99.6004L637.3 89.8004L679.4 47.7004H636V33.9004H695C696.9 33.9004 698.5 34.5004 699.7 35.5004C700 35.7004 700.2 35.9004 700.4 36.1004C700.6 36.3004 700.8 36.5004 700.9 36.7004V36.8004V36.9004C702 38.1004 702.7 39.8004 702.7 41.8004V43.6004V67.0004V100.7H688.9V80.8004V57.5004H689.2Z\" fill=\"url(#paint0_linear_1629_188)\"></path>\n<path d=\"M52.7 76.4998H67.7C65.3 91.7998 51.9 102.5 35.2 102.5C15.2 102.5 0 87.2998 0 67.3998C0 47.6998 15.2 32.2998 35.2 32.2998C51.9 32.2998 65.3 42.8998 67.7 58.2998H52.7C50.9 50.7998 44.2 45.6998 35.2 45.6998C22.9 45.6998 14.8 55.3998 14.8 67.3998C14.8 79.4998 22.9 89.0998 35.2 89.0998C44.2 89.1998 50.9 84.0998 52.7 76.4998Z\" fill=\"currentColor\"></path>\n<path d=\"M117.2 32.7002V46.6002C106.6 47.0002 98.5002 51.0002 92.5002 58.8002V100.8H77.7002V34.1002H92.5002V43.2002C98.6002 36.5002 107 32.7002 117.2 32.7002Z\" fill=\"currentColor\"></path>\n<path d=\"M237.4 62.5997V100.8H222.8V62.5997C222.8 50.7997 216.6 45.6997 207 45.6997C200.5 45.6997 194.2 48.0997 189.3 54.7997C189.7 56.8997 189.9 59.2997 189.9 61.7997V100.8H175.2V61.7997C175.2 49.9997 169 45.7997 160.3 45.7997C153.3 45.7997 147.1 48.5997 142.3 55.2997V100.9H127.5V34.1997H142.3V39.8997C147.3 35.3997 153.2 32.4997 162 32.4997C171.5 32.4997 179.2 35.7997 184.1 42.1997C190.6 35.7997 198.2 32.4997 207.9 32.4997C225.5 32.3997 237.4 42.8997 237.4 62.5997Z\" fill=\"currentColor\"></path>\n<path d=\"M320 67.3C320 86.9 304.8 102.5 286.1 102.5C277.6 102.5 270.3 99.9 264.8 95.5V100.8H250V0H264.8V39.2C270.3 34.9 277.6 32.4 286.1 32.4C304.8 32.4 320 48 320 67.3ZM305.2 67.3C305.2 55.5 296.3 45.7 283.9 45.7C276.5 45.7 269.7 48.1 264.7 55.1V79.7C269.7 86.7 276.5 89.2 283.9 89.2C296.3 89.2 305.2 79.2 305.2 67.3Z\" fill=\"currentColor\"></path>\n<path d=\"M399.2 67.5004C399.2 87.9004 384.4 102.6 363.7 102.6C343 102.6 328.2 87.9004 328.2 67.5004C328.2 47.1004 343 32.4004 363.7 32.4004C384.4 32.4004 399.2 47.0004 399.2 67.5004ZM384.4 67.5004C384.4 54.9004 375.7 45.8004 363.7 45.8004C351.7 45.8004 343 54.9004 343 67.5004C343 80.0004 351.7 89.2004 363.7 89.2004C375.7 89.2004 384.4 79.9004 384.4 67.5004Z\" fill=\"currentColor\"></path>\n<path d=\"M474.3 63.5997V100.8H459.5V64.4996C459.5 52.2996 453 45.7997 442.2 45.7997C435.8 45.7997 428.9 49.2996 423.6 55.8996V100.9H408.8V34.1996H423.6V40.1996C429.4 35.1996 436.7 32.4996 445.2 32.4996C462.5 32.3996 474.3 44.2997 474.3 63.5997Z\" fill=\"currentColor\"></path>\n<path d=\"M550.4 34.0996V100.8H535.8V94.2996C530 99.5996 522.7 102.5 514.1 102.5C496.8 102.5 485.1 90.1996 485.1 70.9996V34.0996H499.7V70.1996C499.7 82.3996 506.4 89.1996 517 89.1996C523.5 89.1996 530.3 85.4996 535.7 78.6996V34.0996H550.4Z\" fill=\"currentColor\"></path>\n<path d=\"M591.5 90.5002C600.2 90.5002 606.1 87.7002 606.1 82.4002C606.1 78.4002 602.8 75.6002 597.2 74.6002L582.4 72.0002C572.2 70.3002 562.7 65.2002 562.7 53.1002C562.7 40.2002 573.9 32.2002 590.5 32.2002C603.4 32.2002 618.3 36.6002 619.7 54.1002H606.1C605.4 46.9002 599 44.0002 590.5 44.0002C582 44.0002 577.3 47.1002 577.3 51.8002C577.3 55.3002 579.9 58.8002 587.7 60.0002L600.2 62.0002C610.3 63.8002 620.2 68.2002 620.2 81.2002C620.2 95.3002 607.9 102.5 591.1 102.5C575.3 102.5 561.9 96.3002 560.2 78.7002L573.8 78.8002C575.3 87.0002 581.4 90.5002 591.5 90.5002Z\" fill=\"currentColor\"></path>\n<defs>\n<linearGradient id=\"paint0_linear_1629_188\" x1=\"636.833\" y1=\"97.8261\" x2=\"713.46\" y2=\"26.6582\" gradientUnits=\"userSpaceOnUse\">\n<stop stop-color=\"#F7A830\"></stop>\n<stop offset=\"0.6353\" stop-color=\"#F08336\"></stop>\n<stop offset=\"1\" stop-color=\"#EA5346\"></stop>\n</linearGradient>\n</defs>\n</svg>","/* :host {\n display: block;\n} */\n\n.container-button {\n max-width: 136px;\n cursor: pointer;\n padding: 10px;\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}","import { Component, Prop, State, h } from '@stencil/core';\nimport logo from './assets/svg/logo.svg';\nimport { IProduct, IProductWake, ICustomer } from '../../dto/validate.pin.bonus';\nimport { CrmBonusService } from '../../services/crmbonus.service';\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 @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\n async componentWillLoad() {\n await this.handleLoad();\n }\n\n async handleLoad() {\n const customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);\n\n console.log('user', customer);\n this.products = JSON.parse(this.productsInString);\n this.customer = customer;\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 render() {\n return (\n <div class=\"section-crm\">\n <div class=\"container-button\">\n <img src={logo} onClick={() => (this.showModal = true)} />\n </div>\n <app-modal\n isOpen={this.showModal}\n modalTitle={`Giftback`}\n onModalClosed={() => (this.showModal = false)}\n >\n <crm-bonus-form storeName={this.storeName} products={this.buildProducts()} cartId={this.cartId} customer={this.customer}/>\n </app-modal>\n </div>\n )\n }\n}\n"],"version":3}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { G as GiftbackFinish$1, d as defineCustomElement$1 } from './p-7294e43f.js';
|
2
|
-
|
3
|
-
const GiftbackFinish = GiftbackFinish$1;
|
4
|
-
const defineCustomElement = defineCustomElement$1;
|
5
|
-
|
6
|
-
export { GiftbackFinish, defineCustomElement };
|
7
|
-
|
8
|
-
//# sourceMappingURL=giftback-finish.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"giftback-finish.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { G as GiftbackPin$1, d as defineCustomElement$1 } from './p-a1781d03.js';
|
2
|
-
|
3
|
-
const GiftbackPin = GiftbackPin$1;
|
4
|
-
const defineCustomElement = defineCustomElement$1;
|
5
|
-
|
6
|
-
export { GiftbackPin, defineCustomElement };
|
7
|
-
|
8
|
-
//# sourceMappingURL=giftback-pin.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"giftback-pin.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { G as GiftbackProgress$1, d as defineCustomElement$1 } from './p-a88bc337.js';
|
2
|
-
|
3
|
-
const GiftbackProgress = GiftbackProgress$1;
|
4
|
-
const defineCustomElement = defineCustomElement$1;
|
5
|
-
|
6
|
-
export { GiftbackProgress, defineCustomElement };
|
7
|
-
|
8
|
-
//# sourceMappingURL=giftback-progress.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"giftback-progress.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
package/dist/components/index.js
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
export { g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-faf7103e.js';
|
2
|
-
|
3
|
-
function format(first, middle, last) {
|
4
|
-
return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
|
5
|
-
}
|
6
|
-
|
7
|
-
export { format };
|
8
|
-
|
9
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"index.js","mappings":";;SAAgB,MAAM,CAAC,KAAc,EAAE,MAAe,EAAE,IAAa;IACnE,OAAO,CAAC,KAAK,IAAI,EAAE,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,GAAG,IAAI,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;AACjF;;;;","names":[],"sources":["src/utils/utils.ts"],"sourcesContent":["export function format(first?: string, middle?: string, last?: string): string {\n return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');\n}\n"],"version":3}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { L as LoadingSpinner$1, d as defineCustomElement$1 } from './p-78529eea.js';
|
2
|
-
|
3
|
-
const LoadingSpinner = LoadingSpinner$1;
|
4
|
-
const defineCustomElement = defineCustomElement$1;
|
5
|
-
|
6
|
-
export { LoadingSpinner, defineCustomElement };
|
7
|
-
|
8
|
-
//# sourceMappingURL=loading-spinner.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"loading-spinner.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
@@ -1,52 +0,0 @@
|
|
1
|
-
import { p as proxyCustomElement, H, h } from './p-faf7103e.js';
|
2
|
-
import { d as defineCustomElement$2 } from './p-78529eea.js';
|
3
|
-
import { d as defineCustomElement$1 } from './p-2dbfb2c7.js';
|
4
|
-
|
5
|
-
const PhoneInput = /*@__PURE__*/ proxyCustomElement(class PhoneInput extends H {
|
6
|
-
constructor() {
|
7
|
-
super();
|
8
|
-
this.__registerHost();
|
9
|
-
this.sendPin = undefined;
|
10
|
-
this.loading = undefined;
|
11
|
-
this.value = undefined;
|
12
|
-
}
|
13
|
-
async validatePhone() {
|
14
|
-
const phone = await this.phoneInputMask.getPhone();
|
15
|
-
await this.sendPin(phone);
|
16
|
-
}
|
17
|
-
render() {
|
18
|
-
return (h("div", { key: 'e61b8c94eadb746b3bb163b58f2eb0d6edb5da2b', class: "form-container" }, h("phone-input-mask", { key: 'bdbf45fc9484c60d0178b3ced6194e8f2b7622a5', initialValue: this.value, ref: ref => this.phoneInputMask = ref }), h("button", { key: '757ab72b47a673bcd27236ef9a50b201a6e75477', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "validar" : h("loading-spinner", { size: "25px", color: "#fff" }))));
|
19
|
-
}
|
20
|
-
}, [0, "phone-input", {
|
21
|
-
"sendPin": [16],
|
22
|
-
"loading": [4],
|
23
|
-
"value": [1]
|
24
|
-
}]);
|
25
|
-
function defineCustomElement() {
|
26
|
-
if (typeof customElements === "undefined") {
|
27
|
-
return;
|
28
|
-
}
|
29
|
-
const components = ["phone-input", "loading-spinner", "phone-input-mask"];
|
30
|
-
components.forEach(tagName => { switch (tagName) {
|
31
|
-
case "phone-input":
|
32
|
-
if (!customElements.get(tagName)) {
|
33
|
-
customElements.define(tagName, PhoneInput);
|
34
|
-
}
|
35
|
-
break;
|
36
|
-
case "loading-spinner":
|
37
|
-
if (!customElements.get(tagName)) {
|
38
|
-
defineCustomElement$2();
|
39
|
-
}
|
40
|
-
break;
|
41
|
-
case "phone-input-mask":
|
42
|
-
if (!customElements.get(tagName)) {
|
43
|
-
defineCustomElement$1();
|
44
|
-
}
|
45
|
-
break;
|
46
|
-
} });
|
47
|
-
}
|
48
|
-
defineCustomElement();
|
49
|
-
|
50
|
-
export { PhoneInput as P, defineCustomElement as d };
|
51
|
-
|
52
|
-
//# sourceMappingURL=p-17ee9996.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"p-17ee9996.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,UAAU,IAAI,CAAC,OAAO,GAAG,UAAU,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,IAE/G,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={`button ${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 +0,0 @@
|
|
1
|
-
{"file":"p-2dbfb2c7.js","mappings":";;AAAA,MAAM,iBAAiB,GAAG,+zBAA+zB,CAAC;AAC11B,6BAAe,iBAAiB;;MCMnB,cAAc;;;;;qBACE,EAAE;;;IAG3B,iBAAiB;QACb,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;KAClC;IAGO,WAAW,CAAC,KAAa;QAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACzC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;QAC7D,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QAEzB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAC7C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QAE7C,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC;KACrC;IAEO,WAAW,CAAC,KAAY;QAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KAC9C;IAGM,MAAM,QAAQ;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC;KACrB;IAED,MAAM;QACF,QACI,8DACI,EAAE,EAAC,OAAO,EACV,IAAI,EAAC,KAAK,EACV,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAC3C,WAAW,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 width: 300px;\n height: 50px;\n font-size: 18px;\n padding: 10px;\n color: grey;\n border: 1px solid #d3c6c6;\n outline: none;\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\n componentWillLoad() {\n this.phone = this.initialValue; \n }\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 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}
|