crmbonus-component-wake 2.0.75 → 2.0.77

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.
Files changed (159) hide show
  1. package/dist/cjs/app-modal.cjs.entry.js +2 -2
  2. package/dist/cjs/countdown-timer_4.cjs.entry.js +6 -6
  3. package/dist/cjs/crm-bonus-form.cjs.entry.js +2 -2
  4. package/dist/cjs/crm-bonus-note.cjs.entry.js +4 -4
  5. package/dist/cjs/crm-bonus.cjs.entry.js +19 -2
  6. package/dist/cjs/crm-bonus.cjs.entry.js.map +1 -1
  7. package/dist/cjs/crm-button.cjs.entry.js +1 -1
  8. package/dist/cjs/{crm-giftback-form.cjs.entry.js → crm-giftback-form_2.cjs.entry.js} +22 -7
  9. package/dist/cjs/crm-giftback-form_2.cjs.entry.js.map +1 -0
  10. package/dist/cjs/crmbonus-component-wake.cjs.js +2 -2
  11. package/dist/cjs/giftback-finish_4.cjs.entry.js +5 -5
  12. package/dist/cjs/{index-e3122e18.js → index-8243a0e3.js} +286 -5
  13. package/dist/{esm/index-c477a8b3.js.map → cjs/index-8243a0e3.js.map} +1 -1
  14. package/dist/cjs/loader.cjs.js +2 -2
  15. package/dist/cjs/loading-spinner.cjs.entry.js +2 -2
  16. package/dist/cjs/pedido-finalizado.cjs.entry.js +2 -2
  17. package/dist/cjs/phone-cancel-input.cjs.entry.js +2 -2
  18. package/dist/cjs/phone-input-mask.cjs.entry.js +2 -2
  19. package/dist/cjs/phone-input.cjs.entry.js +2 -2
  20. package/dist/collection/collection-manifest.json +1 -0
  21. package/dist/collection/components/crm-bonus/crm-bonus.js +45 -2
  22. package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
  23. package/dist/collection/components/crm-bonus-form/crm-bonus-form.js +1 -1
  24. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js +1 -1
  25. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js +1 -1
  26. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js +1 -1
  27. package/dist/collection/components/crm-bonus-form/subcomponents/name-input/name-input.js +1 -1
  28. package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js +1 -1
  29. package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js +1 -1
  30. package/dist/collection/components/giftback-form/giftback-form.js +5 -5
  31. package/dist/collection/components/giftback-form/giftback-form.js.map +1 -1
  32. package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js +3 -3
  33. package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js +1 -1
  34. package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js +1 -1
  35. package/dist/collection/components/loading-container/loading-container.css +47 -0
  36. package/dist/collection/components/loading-container/loading-container.js +43 -0
  37. package/dist/collection/components/loading-container/loading-container.js.map +1 -0
  38. package/dist/collection/components/loading-spinner/loading-spinner.js +1 -1
  39. package/dist/collection/components/modal/app-modal.js +1 -1
  40. package/dist/collection/components/note/crm-bonus-note.js +3 -3
  41. package/dist/collection/components/pedido/pedido.js +1 -1
  42. package/dist/collection/components/phone/phone-input-mask.js +1 -1
  43. package/dist/components/app-modal.js +2 -2
  44. package/dist/components/countdown-timer.js +1 -1
  45. package/dist/components/crm-bonus-form.js +7 -7
  46. package/dist/components/crm-bonus-note.js +4 -4
  47. package/dist/components/crm-bonus.js +40 -15
  48. package/dist/components/crm-bonus.js.map +1 -1
  49. package/dist/components/crm-button.js +1 -1
  50. package/dist/components/crm-giftback-form.js +1 -1
  51. package/dist/components/giftback-finish.js +1 -1
  52. package/dist/components/giftback-info.js +1 -1
  53. package/dist/components/giftback-pin.js +1 -1
  54. package/dist/components/giftback-progress.js +1 -1
  55. package/dist/components/index.js +1 -1
  56. package/dist/components/loading-container.d.ts +11 -0
  57. package/dist/components/loading-container.js +8 -0
  58. package/dist/components/loading-container.js.map +1 -0
  59. package/dist/components/loading-spinner.js +1 -1
  60. package/dist/components/name-input.js +1 -1
  61. package/dist/components/{p-c933623f.js → p-0a29a684.js} +3 -3
  62. package/dist/components/{p-c933623f.js.map → p-0a29a684.js.map} +1 -1
  63. package/dist/components/{p-8bc69d9b.js → p-0ef696a9.js} +2 -2
  64. package/dist/components/{p-8bc69d9b.js.map → p-0ef696a9.js.map} +1 -1
  65. package/dist/components/{p-5f330088.js → p-27554f4e.js} +4 -4
  66. package/dist/components/{p-5f330088.js.map → p-27554f4e.js.map} +1 -1
  67. package/dist/components/{p-2db8985c.js → p-29622725.js} +3 -3
  68. package/dist/components/{p-2db8985c.js.map → p-29622725.js.map} +1 -1
  69. package/dist/components/{p-c1d19bba.js → p-56757e8d.js} +6 -6
  70. package/dist/components/{p-c1d19bba.js.map → p-56757e8d.js.map} +1 -1
  71. package/dist/components/{p-2a4df0a2.js → p-58ee9506.js} +4 -4
  72. package/dist/components/{p-2a4df0a2.js.map → p-58ee9506.js.map} +1 -1
  73. package/dist/components/{p-c2358b51.js → p-6592ce84.js} +4 -4
  74. package/dist/components/{p-c2358b51.js.map → p-6592ce84.js.map} +1 -1
  75. package/dist/components/{p-b289b82d.js → p-959f4cc8.js} +286 -5
  76. package/dist/{crmbonus-component-wake/p-45c0296c.js.map → components/p-959f4cc8.js.map} +1 -1
  77. package/dist/components/{p-d4cfdf80.js → p-998b6c7d.js} +5 -5
  78. package/dist/components/{p-d4cfdf80.js.map → p-998b6c7d.js.map} +1 -1
  79. package/dist/components/{p-984bc7d0.js → p-9ceca803.js} +14 -14
  80. package/dist/components/{p-984bc7d0.js.map → p-9ceca803.js.map} +1 -1
  81. package/dist/components/p-c7fc1cb6.js +36 -0
  82. package/dist/components/p-c7fc1cb6.js.map +1 -0
  83. package/dist/components/{p-e957883c.js → p-ca3d612c.js} +6 -6
  84. package/dist/components/{p-e957883c.js.map → p-ca3d612c.js.map} +1 -1
  85. package/dist/components/{p-bfe98629.js → p-f1639e26.js} +3 -3
  86. package/dist/components/{p-bfe98629.js.map → p-f1639e26.js.map} +1 -1
  87. package/dist/components/{p-24d29b6b.js → p-fbcbb1aa.js} +3 -3
  88. package/dist/components/{p-24d29b6b.js.map → p-fbcbb1aa.js.map} +1 -1
  89. package/dist/components/pedido-finalizado.js +2 -2
  90. package/dist/components/phone-cancel-input.js +4 -4
  91. package/dist/components/phone-form.js +1 -1
  92. package/dist/components/phone-input-mask.js +1 -1
  93. package/dist/components/phone-input.js +4 -4
  94. package/dist/components/pin-form.js +1 -1
  95. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -1
  96. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
  97. package/dist/crmbonus-component-wake/{p-0152eebc.entry.js → p-2086a755.entry.js} +2 -2
  98. package/dist/crmbonus-component-wake/p-24616d67.js +3 -0
  99. package/dist/crmbonus-component-wake/p-24616d67.js.map +1 -0
  100. package/dist/crmbonus-component-wake/{p-a465c900.entry.js → p-282b201b.entry.js} +2 -2
  101. package/dist/crmbonus-component-wake/p-304d3f89.entry.js +2 -0
  102. package/dist/crmbonus-component-wake/p-4d351ad2.entry.js +2 -0
  103. package/dist/crmbonus-component-wake/p-81d3a170.entry.js +2 -0
  104. package/dist/crmbonus-component-wake/p-81d3a170.entry.js.map +1 -0
  105. package/dist/crmbonus-component-wake/{p-b7103956.entry.js → p-8bd25376.entry.js} +2 -2
  106. package/dist/crmbonus-component-wake/p-92fe1963.entry.js +2 -0
  107. package/dist/crmbonus-component-wake/{p-5d209c28.entry.js → p-9ad0650e.entry.js} +2 -2
  108. package/dist/crmbonus-component-wake/{p-c121f6fc.entry.js → p-b7925fc7.entry.js} +2 -2
  109. package/dist/crmbonus-component-wake/{p-da97c793.entry.js → p-c8445f78.entry.js} +2 -2
  110. package/dist/crmbonus-component-wake/{p-0160f5f5.entry.js → p-cd95574b.entry.js} +2 -2
  111. package/dist/crmbonus-component-wake/{p-feadb94b.entry.js → p-d8e5a526.entry.js} +2 -2
  112. package/dist/crmbonus-component-wake/p-d8e5a526.entry.js.map +1 -0
  113. package/dist/crmbonus-component-wake/p-db4f04a8.entry.js +2 -0
  114. package/dist/esm/app-modal.entry.js +2 -2
  115. package/dist/esm/countdown-timer_4.entry.js +6 -6
  116. package/dist/esm/crm-bonus-form.entry.js +2 -2
  117. package/dist/esm/crm-bonus-note.entry.js +4 -4
  118. package/dist/esm/crm-bonus.entry.js +19 -2
  119. package/dist/esm/crm-bonus.entry.js.map +1 -1
  120. package/dist/esm/crm-button.entry.js +1 -1
  121. package/dist/esm/{crm-giftback-form.entry.js → crm-giftback-form_2.entry.js} +22 -8
  122. package/dist/esm/crm-giftback-form_2.entry.js.map +1 -0
  123. package/dist/esm/crmbonus-component-wake.js +3 -3
  124. package/dist/esm/giftback-finish_4.entry.js +5 -5
  125. package/dist/esm/{index-c477a8b3.js → index-84fba7ef.js} +286 -5
  126. package/dist/esm/index-84fba7ef.js.map +1 -0
  127. package/dist/esm/loader.js +3 -3
  128. package/dist/esm/loading-spinner.entry.js +2 -2
  129. package/dist/esm/pedido-finalizado.entry.js +2 -2
  130. package/dist/esm/phone-cancel-input.entry.js +2 -2
  131. package/dist/esm/phone-input-mask.entry.js +2 -2
  132. package/dist/esm/phone-input.entry.js +2 -2
  133. package/dist/types/components/crm-bonus/crm-bonus.d.ts +2 -0
  134. package/dist/types/components/loading-container/loading-container.d.ts +4 -0
  135. package/dist/types/components.d.ts +16 -0
  136. package/package.json +1 -1
  137. package/dist/cjs/crm-giftback-form.cjs.entry.js.map +0 -1
  138. package/dist/cjs/index-e3122e18.js.map +0 -1
  139. package/dist/components/p-b289b82d.js.map +0 -1
  140. package/dist/crmbonus-component-wake/p-450423b5.entry.js +0 -2
  141. package/dist/crmbonus-component-wake/p-45c0296c.js +0 -3
  142. package/dist/crmbonus-component-wake/p-5881e9d8.entry.js +0 -2
  143. package/dist/crmbonus-component-wake/p-5881e9d8.entry.js.map +0 -1
  144. package/dist/crmbonus-component-wake/p-64441d8f.entry.js +0 -2
  145. package/dist/crmbonus-component-wake/p-a950d747.entry.js +0 -2
  146. package/dist/crmbonus-component-wake/p-d95bd37f.entry.js +0 -2
  147. package/dist/crmbonus-component-wake/p-feadb94b.entry.js.map +0 -1
  148. package/dist/esm/crm-giftback-form.entry.js.map +0 -1
  149. /package/dist/crmbonus-component-wake/{p-0152eebc.entry.js.map → p-2086a755.entry.js.map} +0 -0
  150. /package/dist/crmbonus-component-wake/{p-a465c900.entry.js.map → p-282b201b.entry.js.map} +0 -0
  151. /package/dist/crmbonus-component-wake/{p-64441d8f.entry.js.map → p-304d3f89.entry.js.map} +0 -0
  152. /package/dist/crmbonus-component-wake/{p-a950d747.entry.js.map → p-4d351ad2.entry.js.map} +0 -0
  153. /package/dist/crmbonus-component-wake/{p-b7103956.entry.js.map → p-8bd25376.entry.js.map} +0 -0
  154. /package/dist/crmbonus-component-wake/{p-450423b5.entry.js.map → p-92fe1963.entry.js.map} +0 -0
  155. /package/dist/crmbonus-component-wake/{p-5d209c28.entry.js.map → p-9ad0650e.entry.js.map} +0 -0
  156. /package/dist/crmbonus-component-wake/{p-c121f6fc.entry.js.map → p-b7925fc7.entry.js.map} +0 -0
  157. /package/dist/crmbonus-component-wake/{p-da97c793.entry.js.map → p-c8445f78.entry.js.map} +0 -0
  158. /package/dist/crmbonus-component-wake/{p-0160f5f5.entry.js.map → p-cd95574b.entry.js.map} +0 -0
  159. /package/dist/crmbonus-component-wake/{p-d95bd37f.entry.js.map → p-db4f04a8.entry.js.map} +0 -0
@@ -0,0 +1,43 @@
1
+ import { h } from "@stencil/core";
2
+ export class LoadingContainer {
3
+ constructor() {
4
+ this.loading = true;
5
+ }
6
+ render() {
7
+ return (h("div", { key: '422b09da21c691f5eaeb4df9cb30531428409787', class: "relative-xy" }, this.loading && (h("div", { key: '4777be23c24bb0b3190d8992ba97a5206eded534', class: "loading-container" }, h("div", { key: '0f44c0f2d96890a604e60c2ae5163ef80f55b319', class: "loading-spinner" }))), h("slot", { key: 'a8f88a43a1fe8ea3348ecd0f5b6855102262f6c5' })));
8
+ }
9
+ static get is() { return "loading-container"; }
10
+ static get originalStyleUrls() {
11
+ return {
12
+ "$": ["loading-container.css"]
13
+ };
14
+ }
15
+ static get styleUrls() {
16
+ return {
17
+ "$": ["loading-container.css"]
18
+ };
19
+ }
20
+ static get properties() {
21
+ return {
22
+ "loading": {
23
+ "type": "boolean",
24
+ "mutable": false,
25
+ "complexType": {
26
+ "original": "boolean",
27
+ "resolved": "boolean",
28
+ "references": {}
29
+ },
30
+ "required": false,
31
+ "optional": false,
32
+ "docs": {
33
+ "tags": [],
34
+ "text": ""
35
+ },
36
+ "attribute": "loading",
37
+ "reflect": false,
38
+ "defaultValue": "true"
39
+ }
40
+ };
41
+ }
42
+ }
43
+ //# sourceMappingURL=loading-container.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loading-container.js","sourceRoot":"","sources":["../../../../src/components/loading-container/loading-container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAMnD,MAAM,OAAO,gBAAgB;;uBAEE,IAAI;;IAE/B,MAAM;QACF,OAAO,CACH,4DAAK,KAAK,EAAC,aAAa;YAEhB,IAAI,CAAC,OAAO,IAAI,CACZ,4DAAK,KAAK,EAAC,mBAAmB;gBAC1B,4DAAK,KAAK,EAAC,iBAAiB,GAEtB,CAEJ,CACT;YAEL,8DAAa,CACX,CACT,CAAA;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: 'loading-container',\n styleUrl: 'loading-container.css'\n})\nexport class LoadingContainer {\n\n @Prop() loading: boolean = true;\n\n render() {\n return (\n <div class=\"relative-xy\">\n {\n this.loading && (\n <div class=\"loading-container\">\n <div class=\"loading-spinner\">\n\n </div>\n \n </div>\n )\n }\n <slot></slot>\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: '5d3cd866b3ab7f4898ad1142fb39b89c572867d7', class: "spinner", style: { width: this.size, height: this.size, borderColor: `${this.color} transparent transparent transparent` } }));
8
+ return (h("div", { key: 'cc9e6d79f37b688cb4a3648343fe392c149d43cf', 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: '9ed1b6a6f09b9127119d661abbd447e047c49efb', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, h("div", { key: 'dd4f515ea7949d5a470655234a9c0b48194bba1b', class: "modal" }, h("div", { key: '387a930782a4a00073eda969acc86bed39fc8151', class: "modal-header" }, h("h3", { key: '38f041a1e3483490a4de85f1c0a223c47c664517' }, this.modalTitle), h("button", { key: '98998678ec65fd96ad6284d8602ccdf5fd723e26', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), h("div", { key: '845f631054557e79b4ef0521b6eefd41eda93eeb', class: "modal-body" }, h("slot", { key: '2d5539938e7c4175eede394bddeb841e371912fa' })))));
11
+ return (h("div", { key: '37c55ddb47bc0c333712da42f369851379c6c47d', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, h("div", { key: '79806824da9a4990ca6ba0cbf3c459431902e945', class: "modal" }, h("div", { key: 'cf60c5340f1171f2be3ebb23592d63c7ab0a086c', class: "modal-header" }, h("h3", { key: 'e5e4d66d4251c890319344c8c7ec66e66a44aa12' }, this.modalTitle), h("button", { key: '6eacc4be8e63e1511c3340ce460e618943d1ebbc', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), h("div", { key: '4dbec4e836cd3366a185581feeb1842a0b335f07', class: "modal-body" }, h("slot", { key: '38f4bb26dc576d6965f2ac184942cfdc8f4c4f07' })))));
12
12
  }
13
13
  static get is() { return "app-modal"; }
14
14
  static get encapsulation() { return "shadow"; }
@@ -36,9 +36,9 @@ export class CrmBonusNote {
36
36
  localStorage.removeItem(getKeyReserveByCartId(this.cartId));
37
37
  }
38
38
  render() {
39
- return (h("div", { key: 'd67dbfdc0777c5b5a96ff1342941af34ee920fe2' }, h("div", { key: 'db20487efa373bd03d0d1e86c33102aee0ba5a26', class: "note-container" }, h("div", { key: '932d9e67f2094aba7c11e486d10844237376850f', class: "note-header" }, h("p", { key: '96b9dd9410df330cafad41992b0a29a5cbdf6012', class: "note-title" }, h("img", { key: '537c4c8522cd367385938bb23638196d216e2884', src: money, width: 23 }), this.config.giftbackTitle), this.handleHide() && (h("p", { key: '88ebc962e810c269c93e0090da872d37dba2cf5a', class: "back-cart", onClick: () => this.handleCancel() }, "Editar"))), h("hr", { key: '545c55ef563cda8688398a16ca075a8c3027219f' }), this.handleHide() &&
40
- (h("p", { key: '9555594772123ffd1262313dee32646565ce8dc6', class: "note-description-2" }, this.config.giftbackTitle || "Giftback", " aplicado ao pedido: ", h("strong", { key: 'e0115de3a25f686fe0a3b668af370d0c35c4f865' }, "R$ ", this.getAmount()))), !this.handleHide() &&
41
- (h("p", { key: 'e17e72cf2bc5b4bf81730a4930dc9875576c94fd', class: "note-description-not" }, "N\u00E3o h\u00E1 ", this.config.giftbackTitle || "Giftback", " dispon\u00EDvel para essa compra")))));
39
+ return (h("div", { key: '75cafa0618e76798d63234ea6224eb5e081df101' }, h("div", { key: 'e372439c6656f4c08c22e0c810061150200fa528', class: "note-container" }, h("div", { key: '3498e7ca54efa4c07ea464551ed9d985436d0d8e', class: "note-header" }, h("p", { key: '4d018ad8567d68127a5c18a7c7957307ec33070c', class: "note-title" }, h("img", { key: '568fca49338aa74d459f59fa40a6e80b091f40e2', src: money, width: 23 }), this.config.giftbackTitle), this.handleHide() && (h("p", { key: '3615e06410efc6dcf2379cfb41ab94f56d5d30c7', class: "back-cart", onClick: () => this.handleCancel() }, "Editar"))), h("hr", { key: '739af06a409de815817978868a3b33bd0b194176' }), this.handleHide() &&
40
+ (h("p", { key: '280bc286979cc95d400e1686abe677252f80eb79', class: "note-description-2" }, this.config.giftbackTitle || "Giftback", " aplicado ao pedido: ", h("strong", { key: '00b1d1882d9a76dcd4a0d036b88d31a014c631f4' }, "R$ ", this.getAmount()))), !this.handleHide() &&
41
+ (h("p", { key: '7922f409d435f32841c40f355a1e364663e48eba', class: "note-description-not" }, "N\u00E3o h\u00E1 ", this.config.giftbackTitle || "Giftback", " dispon\u00EDvel para essa compra")))));
42
42
  }
43
43
  static get is() { return "crm-bonus-note"; }
44
44
  static get originalStyleUrls() {
@@ -20,7 +20,7 @@ export class Pedido {
20
20
  }
21
21
  }
22
22
  render() {
23
- return (h("div", { key: 'ac2fe6b25bdbe08f088de1a60e1020ddc3a7bd87' }));
23
+ return (h("div", { key: 'd930957c252694d11aade1aeaa2a823131b0e6c9' }));
24
24
  }
25
25
  static get is() { return "pedido-finalizado"; }
26
26
  static get properties() {
@@ -41,7 +41,7 @@ export class PhoneInputMask {
41
41
  return this.phone;
42
42
  }
43
43
  render() {
44
- return (h("div", { key: 'a01b0eda3879ca00258fa9bc739155aa8a57741c' }, h("input", { key: '6b134121f4990b8e46c4efa88c4f801764832f04', disabled: this.disabled, id: "phone", type: "text", class: "phone-input-form", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(12) 94567 8910" }), h("p", { key: 'b193d31cf07633a05459f0e356755153afaa8534', class: "crm-erro-msg" }, this.message)));
44
+ return (h("div", { key: 'da82e6c688cc88043ff18f935bba2d929b9bb5a4' }, h("input", { key: '805202fe1f963f524b461a7f1c92f0796a08c394', disabled: this.disabled, id: "phone", type: "text", class: "phone-input-form", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(12) 94567 8910" }), h("p", { key: '80a7288bd27e4d8d5d6220a78cbc016710e9dc95', class: "crm-erro-msg" }, this.message)));
45
45
  }
46
46
  static get is() { return "phone-input-mask"; }
47
47
  static get encapsulation() { return "shadow"; }
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, c as createEvent, h } from './p-b289b82d.js';
1
+ import { p as proxyCustomElement, H, c as createEvent, h } from './p-959f4cc8.js';
2
2
 
3
3
  const appModalCss = ".modal-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);display:none;justify-content:center;align-items:center;z-index:1000}.modal-backdrop.visible{display:flex}.modal{background:white;border-radius:8px;padding:1rem;max-width:500px;width:90%;box-shadow:0 2px 10px rgba(0, 0, 0, 0.3)}.modal-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;margin-bottom:1rem}.close-button{background:none;border:none;font-size:1.5rem;cursor:pointer}.modal-body{}";
4
4
  const AppModalStyle0 = appModalCss;
@@ -16,7 +16,7 @@ const AppModal$1 = /*@__PURE__*/ proxyCustomElement(class AppModal extends H {
16
16
  this.modalClosed.emit();
17
17
  }
18
18
  render() {
19
- return (h("div", { key: '9ed1b6a6f09b9127119d661abbd447e047c49efb', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, h("div", { key: 'dd4f515ea7949d5a470655234a9c0b48194bba1b', class: "modal" }, h("div", { key: '387a930782a4a00073eda969acc86bed39fc8151', class: "modal-header" }, h("h3", { key: '38f041a1e3483490a4de85f1c0a223c47c664517' }, this.modalTitle), h("button", { key: '98998678ec65fd96ad6284d8602ccdf5fd723e26', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), h("div", { key: '845f631054557e79b4ef0521b6eefd41eda93eeb', class: "modal-body" }, h("slot", { key: '2d5539938e7c4175eede394bddeb841e371912fa' })))));
19
+ return (h("div", { key: '37c55ddb47bc0c333712da42f369851379c6c47d', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, h("div", { key: '79806824da9a4990ca6ba0cbf3c459431902e945', class: "modal" }, h("div", { key: 'cf60c5340f1171f2be3ebb23592d63c7ab0a086c', class: "modal-header" }, h("h3", { key: 'e5e4d66d4251c890319344c8c7ec66e66a44aa12' }, this.modalTitle), h("button", { key: '6eacc4be8e63e1511c3340ce460e618943d1ebbc', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), h("div", { key: '4dbec4e836cd3366a185581feeb1842a0b335f07', class: "modal-body" }, h("slot", { key: '38f4bb26dc576d6965f2ac184942cfdc8f4c4f07' })))));
20
20
  }
21
21
  static get style() { return AppModalStyle0; }
22
22
  }, [1, "app-modal", {
@@ -1,4 +1,4 @@
1
- import { C as CountdownTimer$1, d as defineCustomElement$1 } from './p-8bc69d9b.js';
1
+ import { C as CountdownTimer$1, d as defineCustomElement$1 } from './p-0ef696a9.js';
2
2
 
3
3
  const CountdownTimer = CountdownTimer$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,11 +1,11 @@
1
- import { p as proxyCustomElement, H, h, d as Host } from './p-b289b82d.js';
1
+ import { p as proxyCustomElement, H, h, d as Host } from './p-959f4cc8.js';
2
2
  import { C as CrmBonusService } from './p-a7ddcab4.js';
3
3
  import { S as StepFormEnum } from './p-a561251a.js';
4
- import { d as defineCustomElement$6 } from './p-24d29b6b.js';
5
- import { d as defineCustomElement$5 } from './p-c2358b51.js';
6
- import { d as defineCustomElement$4 } from './p-5f330088.js';
7
- import { d as defineCustomElement$3 } from './p-bfe98629.js';
8
- import { d as defineCustomElement$2 } from './p-2a4df0a2.js';
4
+ import { d as defineCustomElement$6 } from './p-fbcbb1aa.js';
5
+ import { d as defineCustomElement$5 } from './p-6592ce84.js';
6
+ import { d as defineCustomElement$4 } from './p-27554f4e.js';
7
+ import { d as defineCustomElement$3 } from './p-f1639e26.js';
8
+ import { d as defineCustomElement$2 } from './p-58ee9506.js';
9
9
 
10
10
  const crmBonusFormCss = ".form-container{width:100%;display:flex;justify-content:center;justify-content:space-around}.disabled{opacity:0.6;cursor:not-allowed}.message-error{color:#d11111;font-weight:bold;font-family:Arial;font-size:small;margin-left:16px}";
11
11
  const CrmBonusFormStyle0 = crmBonusFormCss;
@@ -96,7 +96,7 @@ const CrmBonusForm$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonusForm exten
96
96
  this.cancel();
97
97
  }
98
98
  render() {
99
- return (h(Host, { key: '56bef07243aafe1abb78fdfd38922801b84c269b' }, this.step == StepFormEnum.STEP_NAME && h("name-input", { key: '685df95ea0cd693f9a62893798464834524f5168', loading: this.loadingModal, value: this.customer.name, applyName: (name) => this.handleCustomerName(name) }), this.step === StepFormEnum.STEP_PIN && h("giftback-pin", { key: 'af82b751ed04382498e25614276ac08d5cade07a', cancel: () => this.handleCancel(), sent: this.sent, validate: (data) => this.validateBonus(data), loading: this.loading }), this.step === StepFormEnum.STEP_RESERVE && h("giftback-progress", { key: '1b493c06bf11bc7596d672fcec789a9f93573751', loading: this.loading, cancel: () => this.handleCancel(), bonus: this.bonus, reserve: (amountRedeemed) => this.reserveApply(amountRedeemed) }), this.step === StepFormEnum.STEP_APPLY && h("giftback-finish", { key: '272438aa4dbc8bb1ef9fdb45d3c2cc657d41ef4a' }), h("p", { key: 'a3a0e8a1be44d65b1edd34e28956d1b34b732fef', class: "message-error" }, this.message)));
99
+ return (h(Host, { key: 'daffb2abf1353f42733a8983b675a32889a4858c' }, this.step == StepFormEnum.STEP_NAME && h("name-input", { key: '2602486632038c171b52be14a9625934a563de2b', loading: this.loadingModal, value: this.customer.name, applyName: (name) => this.handleCustomerName(name) }), this.step === StepFormEnum.STEP_PIN && h("giftback-pin", { key: 'c91c4b98a5dce2555c6c876d9f6cc2cb379ee940', cancel: () => this.handleCancel(), sent: this.sent, validate: (data) => this.validateBonus(data), loading: this.loading }), this.step === StepFormEnum.STEP_RESERVE && h("giftback-progress", { key: '972ae81b55992c46cee3584dbd0faf668831a531', loading: this.loading, cancel: () => this.handleCancel(), bonus: this.bonus, reserve: (amountRedeemed) => this.reserveApply(amountRedeemed) }), this.step === StepFormEnum.STEP_APPLY && h("giftback-finish", { key: '5119e52c28aad070073c12f1a277f6eb33ef5a7b' }), h("p", { key: '0c1cd4d8ff2405786603671a3a8ecdbf91382698', class: "message-error" }, this.message)));
100
100
  }
101
101
  static get style() { return CrmBonusFormStyle0; }
102
102
  }, [1, "crm-bonus-form", {
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, h } from './p-b289b82d.js';
1
+ import { p as proxyCustomElement, H, h } from './p-959f4cc8.js';
2
2
  import { g as getInfoCustomization } from './p-75ba7b9a.js';
3
3
  import { C as CrmBonusService, g as getKeyReserveByCartId } from './p-a7ddcab4.js';
4
4
 
@@ -42,9 +42,9 @@ const CrmBonusNote$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonusNote exten
42
42
  localStorage.removeItem(getKeyReserveByCartId(this.cartId));
43
43
  }
44
44
  render() {
45
- return (h("div", { key: 'd67dbfdc0777c5b5a96ff1342941af34ee920fe2' }, h("div", { key: 'db20487efa373bd03d0d1e86c33102aee0ba5a26', class: "note-container" }, h("div", { key: '932d9e67f2094aba7c11e486d10844237376850f', class: "note-header" }, h("p", { key: '96b9dd9410df330cafad41992b0a29a5cbdf6012', class: "note-title" }, h("img", { key: '537c4c8522cd367385938bb23638196d216e2884', src: moneyDollarsSvgrepoComSvg, width: 23 }), this.config.giftbackTitle), this.handleHide() && (h("p", { key: '88ebc962e810c269c93e0090da872d37dba2cf5a', class: "back-cart", onClick: () => this.handleCancel() }, "Editar"))), h("hr", { key: '545c55ef563cda8688398a16ca075a8c3027219f' }), this.handleHide() &&
46
- (h("p", { key: '9555594772123ffd1262313dee32646565ce8dc6', class: "note-description-2" }, this.config.giftbackTitle || "Giftback", " aplicado ao pedido: ", h("strong", { key: 'e0115de3a25f686fe0a3b668af370d0c35c4f865' }, "R$ ", this.getAmount()))), !this.handleHide() &&
47
- (h("p", { key: 'e17e72cf2bc5b4bf81730a4930dc9875576c94fd', class: "note-description-not" }, "N\u00E3o h\u00E1 ", this.config.giftbackTitle || "Giftback", " dispon\u00EDvel para essa compra")))));
45
+ return (h("div", { key: '75cafa0618e76798d63234ea6224eb5e081df101' }, h("div", { key: 'e372439c6656f4c08c22e0c810061150200fa528', class: "note-container" }, h("div", { key: '3498e7ca54efa4c07ea464551ed9d985436d0d8e', class: "note-header" }, h("p", { key: '4d018ad8567d68127a5c18a7c7957307ec33070c', class: "note-title" }, h("img", { key: '568fca49338aa74d459f59fa40a6e80b091f40e2', src: moneyDollarsSvgrepoComSvg, width: 23 }), this.config.giftbackTitle), this.handleHide() && (h("p", { key: '3615e06410efc6dcf2379cfb41ab94f56d5d30c7', class: "back-cart", onClick: () => this.handleCancel() }, "Editar"))), h("hr", { key: '739af06a409de815817978868a3b33bd0b194176' }), this.handleHide() &&
46
+ (h("p", { key: '280bc286979cc95d400e1686abe677252f80eb79', class: "note-description-2" }, this.config.giftbackTitle || "Giftback", " aplicado ao pedido: ", h("strong", { key: '00b1d1882d9a76dcd4a0d036b88d31a014c631f4' }, "R$ ", this.getAmount()))), !this.handleHide() &&
47
+ (h("p", { key: '7922f409d435f32841c40f355a1e364663e48eba', class: "note-description-not" }, "N\u00E3o h\u00E1 ", this.config.giftbackTitle || "Giftback", " dispon\u00EDvel para essa compra")))));
48
48
  }
49
49
  static get style() { return CrmBonusNoteStyle0; }
50
50
  }, [0, "crm-bonus-note", {
@@ -1,15 +1,16 @@
1
- import { p as proxyCustomElement, H, h } from './p-b289b82d.js';
1
+ import { p as proxyCustomElement, H, h } from './p-959f4cc8.js';
2
2
  import { C as CrmBonusService } from './p-a7ddcab4.js';
3
3
  import { S as StepFormEnum } from './p-a561251a.js';
4
4
  import { i as instance } from './p-fb505488.js';
5
- import { d as defineCustomElement$9 } from './p-8bc69d9b.js';
6
- import { d as defineCustomElement$8 } from './p-2db8985c.js';
7
- import { d as defineCustomElement$7 } from './p-984bc7d0.js';
8
- import { d as defineCustomElement$6 } from './p-d4cfdf80.js';
9
- import { d as defineCustomElement$5 } from './p-bfe98629.js';
10
- import { d as defineCustomElement$4 } from './p-e957883c.js';
11
- import { d as defineCustomElement$3 } from './p-c933623f.js';
12
- import { d as defineCustomElement$2 } from './p-c1d19bba.js';
5
+ import { d as defineCustomElement$a } from './p-0ef696a9.js';
6
+ import { d as defineCustomElement$9 } from './p-29622725.js';
7
+ import { d as defineCustomElement$8 } from './p-9ceca803.js';
8
+ import { d as defineCustomElement$7 } from './p-998b6c7d.js';
9
+ import { d as defineCustomElement$6 } from './p-c7fc1cb6.js';
10
+ import { d as defineCustomElement$5 } from './p-f1639e26.js';
11
+ import { d as defineCustomElement$4 } from './p-ca3d612c.js';
12
+ import { d as defineCustomElement$3 } from './p-0a29a684.js';
13
+ import { d as defineCustomElement$2 } from './p-56757e8d.js';
13
14
 
14
15
  const crmBonusCss = ".container-button.sc-crm-bonus{cursor:pointer;padding:5px 5px 5px 14px}.section-crm.sc-crm-bonus{border:1px solid #dbd4d4;text-align:-webkit-center;margin-bottom:20px}.section-cart-crm.sc-crm-bonus{margin-top:10px}.section-cart-crm.sc-crm-bonus p.sc-crm-bonus{padding:0;margin:0px 0px 0px 15px}.button.sc-crm-bonus{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.sc-crm-bonus{width:97%;display:flex;justify-content:space-around}.btn.sc-crm-bonus{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:0px}.form-container.sc-crm-bonus .btnCrm.sc-crm-bonus{background:#00162e;border-color:#00162e;width:30%;color:#fff}.message-alert.sc-crm-bonus{font-family:sans-serif;color:#df4d4d;margin-top:5px}";
15
16
  const CrmBonusStyle0 = crmBonusCss;
@@ -38,6 +39,7 @@ const CrmBonus$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonus extends H {
38
39
  this.amountCancel = undefined;
39
40
  this.sent = undefined;
40
41
  this.session = undefined;
42
+ this.loading_reprocess = false;
41
43
  }
42
44
  async resetBonus() {
43
45
  console.log('[START RESET BONUS]!!!!!');
@@ -58,6 +60,22 @@ const CrmBonus$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonus extends H {
58
60
  this.loading = false;
59
61
  }
60
62
  }
63
+ async reprocess(products) {
64
+ this.loading_reprocess = true;
65
+ console.log('[reprocess]');
66
+ try {
67
+ console.log('[update products list]');
68
+ this.productsInString = JSON.stringify(products);
69
+ await this.handleLoad();
70
+ await this.resetBonus();
71
+ }
72
+ catch (err) {
73
+ console.debug('[watchProducts]', err.message);
74
+ }
75
+ finally {
76
+ this.loading_reprocess = false;
77
+ }
78
+ }
61
79
  async watchProducts(newValue) {
62
80
  try {
63
81
  console.log('[update products list]');
@@ -195,7 +213,7 @@ const CrmBonus$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonus extends H {
195
213
  this.showModal = true;
196
214
  }
197
215
  render() {
198
- return (h("crm-giftback-form", { key: '0cba16a775789a465f453f2837155360d2cdf537', ref: ref => this.crmBonusRef = ref, storeName: this.storeName, products: this.buildProducts(), cartId: this.cartId, customer: this.customer })
216
+ return (h("loading-container", { key: '308c7f2a9b64fa854827e111a0cc7b131c1deefd', loading: this.loading_reprocess }, h("crm-giftback-form", { key: 'f8403814fa42e2748742890fbb70dd628474ee55', style: { position: "relative" }, ref: ref => this.crmBonusRef = ref, storeName: this.storeName, products: this.buildProducts(), cartId: this.cartId, customer: this.customer }))
199
217
  // <div class="section-cart-crm">
200
218
  // <p class="text-left fbits-responsive-carrinho-desconto-texto">Giftback</p>
201
219
  // <div class="container-button">
@@ -247,7 +265,9 @@ const CrmBonus$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonus extends H {
247
265
  "amountCancel": [32],
248
266
  "sent": [32],
249
267
  "session": [32],
250
- "resetBonus": [64]
268
+ "loading_reprocess": [32],
269
+ "resetBonus": [64],
270
+ "reprocess": [64]
251
271
  }, undefined, {
252
272
  "productsInString": ["watchProducts"]
253
273
  }]);
@@ -255,7 +275,7 @@ function defineCustomElement$1() {
255
275
  if (typeof customElements === "undefined") {
256
276
  return;
257
277
  }
258
- const components = ["crm-bonus", "countdown-timer", "crm-button", "crm-giftback-form", "giftback-info", "loading-spinner", "phone-form", "phone-input-mask", "pin-form"];
278
+ const components = ["crm-bonus", "countdown-timer", "crm-button", "crm-giftback-form", "giftback-info", "loading-container", "loading-spinner", "phone-form", "phone-input-mask", "pin-form"];
259
279
  components.forEach(tagName => { switch (tagName) {
260
280
  case "crm-bonus":
261
281
  if (!customElements.get(tagName)) {
@@ -264,20 +284,25 @@ function defineCustomElement$1() {
264
284
  break;
265
285
  case "countdown-timer":
266
286
  if (!customElements.get(tagName)) {
267
- defineCustomElement$9();
287
+ defineCustomElement$a();
268
288
  }
269
289
  break;
270
290
  case "crm-button":
271
291
  if (!customElements.get(tagName)) {
272
- defineCustomElement$8();
292
+ defineCustomElement$9();
273
293
  }
274
294
  break;
275
295
  case "crm-giftback-form":
276
296
  if (!customElements.get(tagName)) {
277
- defineCustomElement$7();
297
+ defineCustomElement$8();
278
298
  }
279
299
  break;
280
300
  case "giftback-info":
301
+ if (!customElements.get(tagName)) {
302
+ defineCustomElement$7();
303
+ }
304
+ break;
305
+ case "loading-container":
281
306
  if (!customElements.get(tagName)) {
282
307
  defineCustomElement$6();
283
308
  }
@@ -1 +1 @@
1
- {"file":"crm-bonus.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,uoCAAuoC,CAAC;AAC5pC,uBAAe,WAAW;;MCabA,UAAQ;;;;QAEX,oBAAe,GAAoB,eAAe,CAAC,WAAW,EAAE,CAAC;yBAI3C,KAAK;;;;;;wBAOJ;YAC7B,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,EAAE;YACR,KAAK,EAAE,EAAE;SACV;uBAE2B,KAAK;;;yBAGH,KAAK;;;;;IAOnC,MAAM,UAAU;QACd,OAAO,CAA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H;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CrmBonus","i18next"],"sources":["src/components/crm-bonus/crm-bonus.css?tag=crm-bonus&encapsulation=scoped","src/components/crm-bonus/crm-bonus.tsx"],"sourcesContent":["\n.container-button {\n /* max-width: 100%; */\n cursor: pointer;\n padding: 5px 5px 5px 14px;\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 margin-top: 10px;\n}\n\n.section-cart-crm p {\n padding: 0;\n margin: 0px 0px 0px 15px;\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: 97%;\n display: flex;\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: 0px;\n}\n\n.form-container .btnCrm {\n background: #00162e;\n border-color: #00162e;\n width: 30%;\n color: #fff;\n}\n\n.message-alert {\n font-family: sans-serif;\n color: #df4d4d;\n margin-top: 5px;\n}","import { Component, Method, Prop, State, Watch, 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\nimport i18next from '../../i18n/i18n'\n\n@Component({\n tag: 'crm-bonus',\n styleUrl: 'crm-bonus.css',\n scoped: true,\n assetsDirs: ['assets']\n})\nexport class CrmBonus {\n\n private crmBonusService: CrmBonusService = CrmBonusService.getInstance();\n\n private crmBonusRef: HTMLCrmGiftbackFormElement;\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() amountCancel: string;\n @State() sent: IPinSent;\n\n @State() session: string;\n\n @Method()\n async resetBonus() {\n console.log('[START RESET BONUS]!!!!!');\n const used = localStorage.getItem(\"bc:used\");\n\n if (used == \"use\") {\n await this.crmBonusService.cancelBonus(this.cartId, this.storeName);\n }\n\n try {\n await this.crmBonusRef.processBonus();\n console.log('[BONUS RESETADO]!!!!!');\n } catch (err) {\n\n this.loading = false;\n console.log('[error ao reprocessar bonous]');\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PHONE);\n } finally {\n this.loading = false;\n }\n }\n\n @Watch(\"productsInString\")\n async watchProducts(newValue: string) {\n try {\n console.log('[update products list]');\n this.productsInString = newValue;\n await this.handleLoad();\n\n await this.resetBonus();\n } catch (err) {\n console.debug('[watchProducts]', err.message);\n }\n }\n\n async componentWillLoad() {\n i18next.changeLanguage(i18next.language);\n\n await this.loadSession();\n await this.loadConfigStore()\n await this.handleLoad();\n }\n\n async loadConfigStore() {\n await this.crmBonusService.getCustomization(this.storeName);\n }\n\n async handleLoad() {\n try {\n if (this.userId) {\n this.customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);\n // this.phone = Number(this.customer.phone)\n }\n\n const amount = localStorage.getItem(this.cartId);\n\n if (amount) {\n this.canCancel = true;\n this.amountCancel = amount;\n }\n\n } catch (error) {\n console.log('info customer')\n }\n\n this.buildAndGetProducts();\n }\n\n\n async loadSession() {\n this.session = await this.crmBonusService.getToken(this.storeName);\n\n setTimeout(() => {\n this.loadSession()\n }, 1500000)\n\n }\n\n async buildAndGetProducts() {\n const key = `bc-products:${this.cartId}`;\n\n localStorage.setItem(key, this.productsInString);\n\n const productsInCart = JSON.parse(this.productsInString);\n const products_in_cache = JSON.parse(localStorage.getItem(key));\n\n const products: Array<IProductWake> = []\n\n for (const product_cart of productsInCart) {\n\n const [pro] = products_in_cache.filter(p => p.ProdutoVarianteId == product_cart.ProdutoVarianteId)\n\n if (pro) {\n products.push({\n ...product_cart,\n PrecoPor: pro.PrecoPor\n })\n } else {\n products.push(product_cart)\n }\n\n }\n\n this.products = products; //cache_products ? JSON.parse(cache_products) : JSON.parse(this.productsInString);\n\n }\n\n public async sendPin(phone: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n\n this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.storeName);;\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n public async sendPinName(customerName: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n this.customer.name = customerName;\n\n this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.storeName);;\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n\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), productVariantId: product.ProdutoVarianteId.toString(), quantity: product.Quantidade }))\n }\n\n handleCloseModal() {\n this.showModal = false;\n }\n\n save(amount: number) {\n localStorage.setItem(this.cartId, amount.toString());\n this.canCancel = true;\n this.amountCancel = amount.toString()\n }\n\n async cancel() {\n this.message = \"\";\n this.loading = true;\n try {\n await this.crmBonusService.cancel(this.cartId);\n this.canCancel = false;\n\n localStorage.removeItem(this.cartId);\n } catch (error) {\n this.message = \"Não consegui cancelar o bônus, tente novamente!\"\n } finally {\n this.loading = false;\n }\n }\n\n async handleSendPin(phone: string) {\n this.message = \"\"\n if (!phone) {\n this.message = \"Informe seu telefone\";\n return;\n }\n\n this.customer.phone = phone;\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n\n if (this.customer.name) {\n return this.sendPin(phone)\n }\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_NAME);\n this.showModal = true;\n }\n\n render() {\n\n return (\n <crm-giftback-form\n ref={ref => this.crmBonusRef = ref}\n storeName={this.storeName}\n products={this.buildProducts()}\n cartId={this.cartId}\n customer={this.customer}\n />\n // <div class=\"section-cart-crm\">\n // <p class=\"text-left fbits-responsive-carrinho-desconto-texto\">Giftback</p>\n // <div class=\"container-button\">\n // {/* <img src={logo} onClick={() => (this.showModal = true)} /> */}\n // {\n // this.canCancel ? <phone-cancel-input value={this.amountCancel} sendPin={() => { this.cancel() }} loading={this.loading} />\n // : <phone-input value={this.customer.phone} sendPin={(phone) => { this.handleSendPin(phone) }} loading={this.loading} />\n // }\n // </div>\n // <p class=\"message-alert\" >{this.message}</p>\n // <app-modal\n // isOpen={this.showModal}\n // modalTitle={`Giftback`}\n // onModalClosed={() => (this.showModal = false)}\n // >\n // <crm-bonus-form\n // loadingModal={this.loading}\n // saveStore={(amount: number) => this.save(amount)}\n // ref={ref => this.crmBonusRef = ref}\n // sent={this.sent}\n // phone={this.phone}\n // cancel={() => this.handleCloseModal()}\n // storeName={this.storeName}\n // products={this.buildProducts()}\n // cartId={this.cartId} customer={this.customer}\n // handleCustomerName={(name: string) => this.sendPinName(name)}\n // />\n //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sulation=scoped","src/components/crm-bonus/crm-bonus.tsx"],"sourcesContent":["\n.container-button {\n /* max-width: 100%; */\n cursor: pointer;\n padding: 5px 5px 5px 14px;\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 margin-top: 10px;\n}\n\n.section-cart-crm p {\n padding: 0;\n margin: 0px 0px 0px 15px;\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: 97%;\n display: flex;\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: 0px;\n}\n\n.form-container .btnCrm {\n background: #00162e;\n border-color: #00162e;\n width: 30%;\n color: #fff;\n}\n\n.message-alert {\n font-family: sans-serif;\n color: #df4d4d;\n margin-top: 5px;\n}","import { Component, Method, Prop, State, Watch, 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\nimport i18next from '../../i18n/i18n'\n\n@Component({\n tag: 'crm-bonus',\n styleUrl: 'crm-bonus.css',\n scoped: true,\n assetsDirs: ['assets']\n})\nexport class CrmBonus {\n\n private crmBonusService: CrmBonusService = CrmBonusService.getInstance();\n\n private crmBonusRef: HTMLCrmGiftbackFormElement;\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() amountCancel: string;\n @State() sent: IPinSent;\n\n @State() session: string;\n @State() loading_reprocess = false;\n\n @Method()\n async resetBonus() {\n console.log('[START RESET BONUS]!!!!!');\n const used = localStorage.getItem(\"bc:used\");\n\n if (used == \"use\") {\n await this.crmBonusService.cancelBonus(this.cartId, this.storeName);\n }\n\n try {\n await this.crmBonusRef.processBonus();\n console.log('[BONUS RESETADO]!!!!!');\n } catch (err) {\n\n this.loading = false;\n console.log('[error ao reprocessar bonous]');\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PHONE);\n } finally {\n this.loading = false;\n }\n }\n\n @Method()\n async reprocess(products: Array<any>) {\n this.loading_reprocess = true\n \n console.log('[reprocess]');\n try {\n console.log('[update products list]');\n this.productsInString = JSON.stringify(products);\n await this.handleLoad();\n\n await this.resetBonus();\n } catch (err) {\n console.debug('[watchProducts]', err.message);\n } finally {\n this.loading_reprocess = false\n }\n }\n\n @Watch(\"productsInString\")\n async watchProducts(newValue: string) {\n try {\n console.log('[update products list]');\n this.productsInString = newValue;\n await this.handleLoad();\n\n await this.resetBonus();\n } catch (err) {\n console.debug('[watchProducts]', err.message);\n }\n }\n\n async componentWillLoad() {\n i18next.changeLanguage(i18next.language);\n\n await this.loadSession();\n await this.loadConfigStore()\n await this.handleLoad();\n }\n\n async loadConfigStore() {\n await this.crmBonusService.getCustomization(this.storeName);\n }\n\n async handleLoad() {\n try {\n if (this.userId) {\n this.customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);\n // this.phone = Number(this.customer.phone)\n }\n\n const amount = localStorage.getItem(this.cartId);\n\n if (amount) {\n this.canCancel = true;\n this.amountCancel = amount;\n }\n\n } catch (error) {\n console.log('info customer')\n }\n\n this.buildAndGetProducts();\n }\n\n\n async loadSession() {\n this.session = await this.crmBonusService.getToken(this.storeName);\n\n setTimeout(() => {\n this.loadSession()\n }, 1500000)\n\n }\n\n async buildAndGetProducts() {\n const key = `bc-products:${this.cartId}`;\n\n localStorage.setItem(key, this.productsInString);\n\n const productsInCart = JSON.parse(this.productsInString);\n const products_in_cache = JSON.parse(localStorage.getItem(key));\n\n const products: Array<IProductWake> = []\n\n for (const product_cart of productsInCart) {\n\n const [pro] = products_in_cache.filter(p => p.ProdutoVarianteId == product_cart.ProdutoVarianteId)\n\n if (pro) {\n products.push({\n ...product_cart,\n PrecoPor: pro.PrecoPor\n })\n } else {\n products.push(product_cart)\n }\n\n }\n\n this.products = products; //cache_products ? JSON.parse(cache_products) : JSON.parse(this.productsInString);\n\n }\n\n public async sendPin(phone: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n\n this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.storeName);;\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n public async sendPinName(customerName: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n this.customer.name = customerName;\n\n this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.storeName);;\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n\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), productVariantId: product.ProdutoVarianteId.toString(), quantity: product.Quantidade }))\n }\n\n handleCloseModal() {\n this.showModal = false;\n }\n\n save(amount: number) {\n localStorage.setItem(this.cartId, amount.toString());\n this.canCancel = true;\n this.amountCancel = amount.toString()\n }\n\n async cancel() {\n this.message = \"\";\n this.loading = true;\n try {\n await this.crmBonusService.cancel(this.cartId);\n this.canCancel = false;\n\n localStorage.removeItem(this.cartId);\n } catch (error) {\n this.message = \"Não consegui cancelar o bônus, tente novamente!\"\n } finally {\n this.loading = false;\n }\n }\n\n async handleSendPin(phone: string) {\n this.message = \"\"\n if (!phone) {\n this.message = \"Informe seu telefone\";\n return;\n }\n\n this.customer.phone = phone;\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n\n if (this.customer.name) {\n return this.sendPin(phone)\n }\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_NAME);\n this.showModal = true;\n }\n\n render() {\n\n return (\n\n <loading-container loading={this.loading_reprocess} >\n <crm-giftback-form\n style={{ position: \"relative\" }}\n ref={ref => this.crmBonusRef = ref}\n storeName={this.storeName}\n products={this.buildProducts()}\n cartId={this.cartId}\n customer={this.customer}\n />\n </loading-container>\n // <div class=\"section-cart-crm\">\n // <p class=\"text-left fbits-responsive-carrinho-desconto-texto\">Giftback</p>\n // <div class=\"container-button\">\n // {/* <img src={logo} onClick={() => (this.showModal = true)} /> */}\n // {\n // this.canCancel ? <phone-cancel-input value={this.amountCancel} sendPin={() => { this.cancel() }} loading={this.loading} />\n // : <phone-input value={this.customer.phone} sendPin={(phone) => { this.handleSendPin(phone) }} loading={this.loading} />\n // }\n // </div>\n // <p class=\"message-alert\" >{this.message}</p>\n // <app-modal\n // isOpen={this.showModal}\n // modalTitle={`Giftback`}\n // onModalClosed={() => (this.showModal = false)}\n // >\n // <crm-bonus-form\n // loadingModal={this.loading}\n // saveStore={(amount: number) => this.save(amount)}\n // ref={ref => this.crmBonusRef = ref}\n // sent={this.sent}\n // phone={this.phone}\n // cancel={() => this.handleCloseModal()}\n // storeName={this.storeName}\n // products={this.buildProducts()}\n // cartId={this.cartId} customer={this.customer}\n // handleCustomerName={(name: string) => this.sendPinName(name)}\n // />\n // </app-modal>\n // </div>\n )\n }\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
- import { B as Button, d as defineCustomElement$1 } from './p-2db8985c.js';
1
+ import { B as Button, d as defineCustomElement$1 } from './p-29622725.js';
2
2
 
3
3
  const CrmButton = Button;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { C as CrmBonus, d as defineCustomElement$1 } from './p-984bc7d0.js';
1
+ import { C as CrmBonus, d as defineCustomElement$1 } from './p-9ceca803.js';
2
2
 
3
3
  const CrmGiftbackForm = CrmBonus;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { G as GiftbackFinish$1, d as defineCustomElement$1 } from './p-24d29b6b.js';
1
+ import { G as GiftbackFinish$1, d as defineCustomElement$1 } from './p-fbcbb1aa.js';
2
2
 
3
3
  const GiftbackFinish = GiftbackFinish$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { G as GiftbackInfo$1, d as defineCustomElement$1 } from './p-d4cfdf80.js';
1
+ import { G as GiftbackInfo$1, d as defineCustomElement$1 } from './p-998b6c7d.js';
2
2
 
3
3
  const GiftbackInfo = GiftbackInfo$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { G as GiftbackPin$1, d as defineCustomElement$1 } from './p-c2358b51.js';
1
+ import { G as GiftbackPin$1, d as defineCustomElement$1 } from './p-6592ce84.js';
2
2
 
3
3
  const GiftbackPin = GiftbackPin$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { G as GiftbackProgress$1, d as defineCustomElement$1 } from './p-5f330088.js';
1
+ import { G as GiftbackProgress$1, d as defineCustomElement$1 } from './p-27554f4e.js';
2
2
 
3
3
  const GiftbackProgress = GiftbackProgress$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- export { g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-b289b82d.js';
1
+ export { g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-959f4cc8.js';
2
2
 
3
3
  function format(first, middle, last) {
4
4
  return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface LoadingContainer extends Components.LoadingContainer, HTMLElement {}
4
+ export const LoadingContainer: {
5
+ prototype: LoadingContainer;
6
+ new (): LoadingContainer;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,8 @@
1
+ import { L as LoadingContainer$1, d as defineCustomElement$1 } from './p-c7fc1cb6.js';
2
+
3
+ const LoadingContainer = LoadingContainer$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { LoadingContainer, defineCustomElement };
7
+
8
+ //# sourceMappingURL=loading-container.js.map
@@ -0,0 +1 @@
1
+ {"file":"loading-container.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,4 +1,4 @@
1
- import { L as LoadingSpinner$1, d as defineCustomElement$1 } from './p-bfe98629.js';
1
+ import { L as LoadingSpinner$1, d as defineCustomElement$1 } from './p-f1639e26.js';
2
2
 
3
3
  const LoadingSpinner = LoadingSpinner$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { N as NameInput$1, d as defineCustomElement$1 } from './p-2a4df0a2.js';
1
+ import { N as NameInput$1, d as defineCustomElement$1 } from './p-58ee9506.js';
2
2
 
3
3
  const NameInput = NameInput$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, h } from './p-b289b82d.js';
1
+ import { p as proxyCustomElement, H, h } from './p-959f4cc8.js';
2
2
  import { M as MESSAGE_ERROR_INVALID_NUMBER } from './p-a561251a.js';
3
3
 
4
4
  const phoneInputMaskCss = "*{margin:0;padding:0;box-sizing:border-box}.phone{display:block;width:100%;height:24px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:0px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);-webkit-transition:border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s}.phone-input-form{width:246px;height:48px;padding:13px 16px 13px 16px;border:1px solid #CCCCCC}.crm-erro-msg{color:#E11D48;font-size:12px;font-weight:500;margin-top:11px}";
@@ -48,7 +48,7 @@ const PhoneInputMask = /*@__PURE__*/ proxyCustomElement(class PhoneInputMask ext
48
48
  return this.phone;
49
49
  }
50
50
  render() {
51
- return (h("div", { key: 'a01b0eda3879ca00258fa9bc739155aa8a57741c' }, h("input", { key: '6b134121f4990b8e46c4efa88c4f801764832f04', disabled: this.disabled, id: "phone", type: "text", class: "phone-input-form", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(12) 94567 8910" }), h("p", { key: 'b193d31cf07633a05459f0e356755153afaa8534', class: "crm-erro-msg" }, this.message)));
51
+ return (h("div", { key: 'da82e6c688cc88043ff18f935bba2d929b9bb5a4' }, h("input", { key: '805202fe1f963f524b461a7f1c92f0796a08c394', disabled: this.disabled, id: "phone", type: "text", class: "phone-input-form", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(12) 94567 8910" }), h("p", { key: '80a7288bd27e4d8d5d6220a78cbc016710e9dc95', class: "crm-erro-msg" }, this.message)));
52
52
  }
53
53
  static get style() { return PhoneInputMaskStyle0; }
54
54
  }, [1, "phone-input-mask", {
@@ -75,4 +75,4 @@ defineCustomElement();
75
75
 
76
76
  export { PhoneInputMask as P, defineCustomElement as d };
77
77
 
78
- //# sourceMappingURL=p-c933623f.js.map
78
+ //# sourceMappingURL=p-0a29a684.js.map
@@ -1 +1 @@
1
- {"file":"p-c933623f.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,ouBAAouB,CAAC;AAC/vB,6BAAe,iBAAiB;;MCOnB,cAAc;;;;;qBACE,EAAE;uBACA,EAAE;;;;IAK7B,iBAAiB;QACb,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;KAClC;IAEO,WAAW,CAAC,KAAa;QAE7B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACzC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;QAE7D,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QAEzB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,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;QAE3C,IAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;YACvC,IAAI,CAAC,OAAO,GAAG,4BAA4B,CAAA;SAC9C;aAAM;YACH,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;SACpB;KACJ;IAED,mBAAmB,CAAC,KAAa;QAC7B,IAAG,KAAK,CAAC,MAAM,GAAG,EAAE,EAAE;YAClB,OAAO,IAAI,CAAA;SACd;QACD,MAAM,UAAU,GAAG,yBAAyB,CAAC;QAC7C,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACjC;IAGM,MAAM,QAAQ;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC;KACrB;IAED,MAAM;QACF,QACI,8DACI,8DACI,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAC,OAAO,EACV,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,kBAAkB,EACxB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAC3C,WAAW,EAAC,iBAAiB,GAC/B,EACF,0DAAG,KAAK,EAAC,cAAc,IAAE,IAAI,CAAC,OAAO,CAAK,CACxC,EAER;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/phone/phone-input-mask.css?tag=phone-input-mask&encapsulation=shadow","src/components/phone/phone-input-mask.tsx"],"sourcesContent":["* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\n.phone {\n display: block;\n width: 100%;\n height: 24px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 0px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n\n\n.phone-input-form {\n width: 246px;\n height: 48px;\n padding: 13px 16px 13px 16px;\n border: 1px solid #CCCCCC;\n}\n\n.crm-erro-msg {\n color: #E11D48;\n font-size: 12px;\n font-weight: 500;\n margin-top: 11px;\n}\n","import { Component, h, Method, Prop, State } from '@stencil/core';\nimport { MESSAGE_ERROR_INVALID_NUMBER } from '../../contants';\n\n@Component({\n tag: 'phone-input-mask',\n styleUrl: 'phone-input-mask.css',\n shadow: true,\n})\nexport class PhoneInputMask {\n @State() phone: string = '';\n @State() message: string = \"\";\n\n @Prop() initialValue: string;\n @Prop() disabled: boolean;\n\n componentWillLoad() {\n this.phone = this.initialValue;\n }\n\n private formatPhone(value: string): string {\n\n const cleaned = value.replace(/\\D/g, ''); // Remove tudo que não for número\n const match = cleaned.match(/^(\\d{0,2})(\\d{0,5})(\\d{0,4})$/);\n\n if (!match) return value;\n\n const part1 = match[1] ? `(${match[1]}` : '';\n const part2 = match[2] ? `) ${match[2]}` : '';\n const part3 = match[3] ? ` ${match[3]}` : '';\n\n return `${part1}${part2}${part3}`;\n }\n\n private handleInput(event: Event): void {\n const input = event.target as HTMLInputElement;\n this.phone = this.formatPhone(input.value);\n\n if(!this.validatePhoneNumber(input.value)) {\n this.message = MESSAGE_ERROR_INVALID_NUMBER\n } else {\n this.message = \"\"\n }\n }\n\n validatePhoneNumber(phone: string): boolean {\n if(phone.length < 15) {\n return true\n }\n const phoneRegex = /^\\(\\d{2}\\) \\d{5} \\d{4}$/; // Valida formato (99) 99999-9999\n return phoneRegex.test(phone);\n }\n\n @Method()\n public async getPhone() {\n return this.phone;\n }\n\n render() {\n return (\n <div>\n <input\n disabled={this.disabled}\n id=\"phone\"\n type=\"text\"\n class=\"phone-input-form\"\n value={this.phone}\n onInput={(event) => this.handleInput(event)}\n placeholder=\"(12) 94567 8910\"\n />\n <p class=\"crm-erro-msg\">{this.message}</p>\n </div>\n\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-0a29a684.js","mappings":";;;AAAA,MAA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I,CAAA;SACd;QACD,MAAM,UAAU,GAAG,yBAAyB,CAAC;QAC7C,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACjC;IAGM,MAAM,QAAQ;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC;KACrB;IAED,MAAM;QACF,QACI,8DACI,8DACI,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAC,OAAO,EACV,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,kBAAkB,EACxB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAC3C,WAAW,EAAC,iBAAiB,GAC/B,EACF,0DAAG,KAAK,EAAC,cAAc,IAAE,IAAI,CAAC,OAAO,CAAK,CACxC,EAER;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/phone/phone-input-mask.css?tag=phone-input-mask&encapsulation=shadow","src/components/phone/phone-input-mask.tsx"],"sourcesContent":["* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\n.phone {\n display: block;\n width: 100%;\n height: 24px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 0px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n\n\n.phone-input-form {\n width: 246px;\n height: 48px;\n padding: 13px 16px 13px 16px;\n border: 1px solid #CCCCCC;\n}\n\n.crm-erro-msg {\n color: #E11D48;\n font-size: 12px;\n font-weight: 500;\n margin-top: 11px;\n}\n","import { Component, h, Method, Prop, State } from '@stencil/core';\nimport { MESSAGE_ERROR_INVALID_NUMBER } from '../../contants';\n\n@Component({\n tag: 'phone-input-mask',\n styleUrl: 'phone-input-mask.css',\n shadow: true,\n})\nexport class PhoneInputMask {\n @State() phone: string = '';\n @State() message: string = \"\";\n\n @Prop() initialValue: string;\n @Prop() disabled: boolean;\n\n componentWillLoad() {\n this.phone = this.initialValue;\n }\n\n private formatPhone(value: string): string {\n\n const cleaned = value.replace(/\\D/g, ''); // Remove tudo que não for número\n const match = cleaned.match(/^(\\d{0,2})(\\d{0,5})(\\d{0,4})$/);\n\n if (!match) return value;\n\n const part1 = match[1] ? `(${match[1]}` : '';\n const part2 = match[2] ? `) ${match[2]}` : '';\n const part3 = match[3] ? ` ${match[3]}` : '';\n\n return `${part1}${part2}${part3}`;\n }\n\n private handleInput(event: Event): void {\n const input = event.target as HTMLInputElement;\n this.phone = this.formatPhone(input.value);\n\n if(!this.validatePhoneNumber(input.value)) {\n this.message = MESSAGE_ERROR_INVALID_NUMBER\n } else {\n this.message = \"\"\n }\n }\n\n validatePhoneNumber(phone: string): boolean {\n if(phone.length < 15) {\n return true\n }\n const phoneRegex = /^\\(\\d{2}\\) \\d{5} \\d{4}$/; // Valida formato (99) 99999-9999\n return phoneRegex.test(phone);\n }\n\n @Method()\n public async getPhone() {\n return this.phone;\n }\n\n render() {\n return (\n <div>\n <input\n disabled={this.disabled}\n id=\"phone\"\n type=\"text\"\n class=\"phone-input-form\"\n value={this.phone}\n onInput={(event) => this.handleInput(event)}\n placeholder=\"(12) 94567 8910\"\n />\n <p class=\"crm-erro-msg\">{this.message}</p>\n </div>\n\n );\n }\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, h } from './p-b289b82d.js';
1
+ import { p as proxyCustomElement, H, h } from './p-959f4cc8.js';
2
2
 
3
3
  const CountdownTimer = /*@__PURE__*/ proxyCustomElement(class CountdownTimer extends H {
4
4
  constructor() {
@@ -46,4 +46,4 @@ defineCustomElement();
46
46
 
47
47
  export { CountdownTimer as C, defineCustomElement as d };
48
48
 
49
- //# sourceMappingURL=p-8bc69d9b.js.map
49
+ //# sourceMappingURL=p-0ef696a9.js.map
@@ -1 +1 @@
1
- {"file":"p-8bc69d9b.js","mappings":";;MAMa,cAAc;;;;;;uBAII,EAAE;;IAG7B,iBAAiB;QACb,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC;YAC1B,IAAI,IAAI,CAAC,OAAO,GAAG,CAAC,EAAE;gBAClB,IAAI,CAAC,OAAO,EAAE,CAAC;aAClB;iBAAM;gBACH,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAE/B,IAAI,CAAC,QAAQ,EAAE,CAAA;aAClB;SACJ,EAAE,IAAI,CAAC,CAAC;KACZ;IAED,oBAAoB;QAChB,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KAClC;IAED,MAAM;QACF,QACI,gEAAQ,IAAI,CAAC,OAAO,MAAU,EAChC;KACL;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/countdown-timer/countdown-timer.tsx"],"sourcesContent":["import { Component, h, Prop, State } from '@stencil/core';\n\n@Component({\n tag: 'countdown-timer',\n shadow: true,\n})\nexport class CountdownTimer {\n\n @Prop() downtime: () => void;\n\n @State() counter: number = 30;\n private intervalId: NodeJS.Timer;\n\n componentWillLoad() {\n this.intervalId = setInterval(() => {\n if (this.counter > 0) {\n this.counter--;\n } else {\n clearInterval(this.intervalId);\n\n this.downtime()\n }\n }, 1000); // Intervalo de 1 segundo\n }\n\n disconnectedCallback() {\n clearInterval(this.intervalId);\n }\n\n render() {\n return (\n <label>{this.counter}s</label>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-0ef696a9.js","mappings":";;MAMa,cAAc;;;;;;uBAII,EAAE;;IAG7B,iBAAiB;QACb,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC;YAC1B,IAAI,IAAI,CAAC,OAAO,GAAG,CAAC,EAAE;gBAClB,IAAI,CAAC,OAAO,EAAE,CAAC;aAClB;iBAAM;gBACH,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAE/B,IAAI,CAAC,QAAQ,EAAE,CAAA;aAClB;SACJ,EAAE,IAAI,CAAC,CAAC;KACZ;IAED,oBAAoB;QAChB,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KAClC;IAED,MAAM;QACF,QACI,gEAAQ,IAAI,CAAC,OAAO,MAAU,EAChC;KACL;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/countdown-timer/countdown-timer.tsx"],"sourcesContent":["import { Component, h, Prop, State } from '@stencil/core';\n\n@Component({\n tag: 'countdown-timer',\n shadow: true,\n})\nexport class CountdownTimer {\n\n @Prop() downtime: () => void;\n\n @State() counter: number = 30;\n private intervalId: NodeJS.Timer;\n\n componentWillLoad() {\n this.intervalId = setInterval(() => {\n if (this.counter > 0) {\n this.counter--;\n } else {\n clearInterval(this.intervalId);\n\n this.downtime()\n }\n }, 1000); // Intervalo de 1 segundo\n }\n\n disconnectedCallback() {\n clearInterval(this.intervalId);\n }\n\n render() {\n return (\n <label>{this.counter}s</label>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
- import { p as proxyCustomElement, H, h } from './p-b289b82d.js';
2
- import { d as defineCustomElement$1 } from './p-bfe98629.js';
1
+ import { p as proxyCustomElement, H, h } from './p-959f4cc8.js';
2
+ import { d as defineCustomElement$1 } from './p-f1639e26.js';
3
3
 
4
4
  const giftbackProgressCss = ":host{display:flex;font-family:Arial, sans-serif;border-radius:10px;padding:16px;max-width:100%;flex-direction:column}.giftback-container{display:flex;flex-direction:column}.giftback-container p{font-size:medium}h3{margin:0 0 10px;font-size:18px}p{margin:5px 0;font-size:14px;align-self:start}.validity{font-size:12px;color:#888}.progress-container{display:flex;align-items:center;margin:10px 0}progress-container span{font-size:12px;color:#666}input[type='range']{flex:1;margin:0 10px;appearance:none;background-color:#ccc;height:6px;border-radius:3px;outline:none;cursor:pointer}input[type='range']::-webkit-slider-thumb{appearance:none;width:14px;height:14px;border-radius:50%;background-color:#555;cursor:pointer}.remaining{font-weight:bold;font-size:14px;color:#333}.button{top:50%;background-color:#6c6c7e;color:#fff;border:none;border-radius:10px;padding:10px;min-height:30px;min-width:120px;font-size:19px;cursor:pointer}.button-cancel{top:50%;background-color:#ffffff;color:#1e1c1c;border:1px solid gray;border-radius:10px;padding:10px;min-height:30px;min-width:120px;font-size:19px;cursor:pointer}.disabled{opacity:0.6;cursor:not-allowed}.footer-button-giftback{display:flex;justify-content:space-between;margin-top:14px}";
5
5
  const GiftbackProgressStyle0 = giftbackProgressCss;
@@ -34,7 +34,7 @@ const GiftbackProgress = /*@__PURE__*/ proxyCustomElement(class GiftbackProgress
34
34
  }
35
35
  render() {
36
36
  const remainingGiftback = this.bonus.minimumPurchase - this.bonus.totalValue;
37
- return (h("div", { key: 'a5e02f60ab5e081341582ea0b1cfaa05583a22c2', class: "giftback-container" }, h("p", { key: '12eddb011e6a6beda91a1bc937fcacdb891b12a5' }, "Voc\u00EA possui at\u00E9 ", h("strong", { key: 'eb6018fe44106dd2a9928d4efe77dbd17180e3d3' }, "R$ ", this.bonus.totalBonus.toFixed(2)), " de Giftback nessa compra!"), h("p", { key: '065028af79e33d565c82bd55ea2245e3562617e8', class: "validity" }, "V\u00E1lido at\u00E9: ", new Date(this.bonus.firstValidityDate).toLocaleDateString('pt-Br')), h("p", { key: '1ed8896f6301c2c70fb7232190a2c68bc82e5f07' }, "Voc\u00EA est\u00E1 utilizando ", h("strong", { key: 'e2019caa7c7697f73021416632ca884097e21abe' }, "R$ ", this.usedValue.toFixed(2)), " nessa compra"), h("div", { key: 'b0257ef4d99c4009f23a4d9fae52b42d2ef41209', class: "progress-container" }, h("span", { key: 'bb0d1abe791dfcab30e87fea8eb025a9f3787be0' }, "R$ 0"), h("input", { key: 'a4220c65f24d68b56ccf522a46c0bd3d007c9ed6', disabled: true, type: "range", min: "0", step: "0.01", max: this.bonus.totalBonus, value: this.usedValue, onInput: (event) => this.handleSliderChange(event) }), h("span", { key: 'c216b57ffdd2a3613f05db327aad395f1f2e1285' }, "R$ ", this.bonus.totalBonus.toFixed(2))), h("p", { key: '7a5dc6a68801da2c09a33f3cdb6cf82e521be581', class: "remaining" }, "Faltam ", h("strong", { key: '9c20b260d4a95887844aa038e0f74180fff5c1eb' }, "R$ ", remainingGiftback > 0 ? remainingGiftback.toFixed(2) : Number(0).toFixed(2)), " para utilizar o valor total do Giftback."), h("div", { key: 'd99639afcac1ea180ad414ca923391f99f3d5296', class: "footer-button-giftback" }, h("button", { key: '4c1bdd2ea2ecd5037d1c29b6af31c3163fffe84a', class: "button-cancel", disabled: this.loading, onClick: () => this.cancel() }, "Cancelar"), h("button", { key: '77fc073d28272334d51ab7073e34654509c0ac26', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.handleReserve(this.usedValue) }, !this.loading ? "Aplicar" : h("loading-spinner", { size: "10px", color: "#fff" })))));
37
+ return (h("div", { key: 'c2fb3f6a887887e197b55e951dbf50054e27e77a', class: "giftback-container" }, h("p", { key: '1d08aaaa1d260f3938e472e95b1e194be50c3987' }, "Voc\u00EA possui at\u00E9 ", h("strong", { key: '99d39bc977a41c9d098c812b61ae41c25342f65c' }, "R$ ", this.bonus.totalBonus.toFixed(2)), " de Giftback nessa compra!"), h("p", { key: '68fc8504eabfdf6e9e873780bb6863521a683e58', class: "validity" }, "V\u00E1lido at\u00E9: ", new Date(this.bonus.firstValidityDate).toLocaleDateString('pt-Br')), h("p", { key: 'fe4c8804f8d577e530330050cfae9c33c2be36d7' }, "Voc\u00EA est\u00E1 utilizando ", h("strong", { key: 'd1d2a6ad0ca1da77e5a4ab9a595af74a11fb9862' }, "R$ ", this.usedValue.toFixed(2)), " nessa compra"), h("div", { key: 'b0eac608016c3136a344c03d456355d7ffcc8dfc', class: "progress-container" }, h("span", { key: 'a88626a3f0d0109fca8b593da05e76f54eb69e28' }, "R$ 0"), h("input", { key: '5d19e34becada60c728f9fce1fa67eede16b7844', disabled: true, type: "range", min: "0", step: "0.01", max: this.bonus.totalBonus, value: this.usedValue, onInput: (event) => this.handleSliderChange(event) }), h("span", { key: '31f0b18eff1ffbd2fb86941653beacad567514ca' }, "R$ ", this.bonus.totalBonus.toFixed(2))), h("p", { key: '5f278047d5bb21282890de0304bc2e8addf8ea43', class: "remaining" }, "Faltam ", h("strong", { key: 'fa220ca91d366eb5e5eec4bf7e94ace4584b0dbe' }, "R$ ", remainingGiftback > 0 ? remainingGiftback.toFixed(2) : Number(0).toFixed(2)), " para utilizar o valor total do Giftback."), h("div", { key: '248c3376e92b8daab0c821e79e083ef6f44bff9e', class: "footer-button-giftback" }, h("button", { key: 'fe612e24a59abed7ef27e6a0425d40efaad218c2', class: "button-cancel", disabled: this.loading, onClick: () => this.cancel() }, "Cancelar"), h("button", { key: '6f86a5b1eeedf01c9eabe9313fdf7b00dc264e96', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.handleReserve(this.usedValue) }, !this.loading ? "Aplicar" : h("loading-spinner", { size: "10px", color: "#fff" })))));
38
38
  }
39
39
  static get style() { return GiftbackProgressStyle0; }
40
40
  }, [1, "giftback-progress", {
@@ -66,4 +66,4 @@ defineCustomElement();
66
66
 
67
67
  export { GiftbackProgress as G, defineCustomElement as d };
68
68
 
69
- //# sourceMappingURL=p-5f330088.js.map
69
+ //# sourceMappingURL=p-27554f4e.js.map