crmbonus-component-wake 1.0.29 → 1.0.31

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 (79) hide show
  1. package/dist/cjs/app-modal_4.cjs.entry.js +4 -4
  2. package/dist/cjs/crm-bonus.cjs.entry.js +3 -3
  3. package/dist/cjs/crm-bonus.cjs.entry.js.map +1 -1
  4. package/dist/cjs/giftback-finish_3.cjs.entry.js +3 -3
  5. package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
  6. package/dist/cjs/pedido-finalizado.cjs.entry.js +1 -1
  7. package/dist/cjs/phone-input-mask.cjs.entry.js +2 -2
  8. package/dist/cjs/phone-input-mask.cjs.entry.js.map +1 -1
  9. package/dist/collection/components/crm-bonus/crm-bonus.css +7 -10
  10. package/dist/collection/components/crm-bonus/crm-bonus.js +2 -2
  11. package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
  12. package/dist/collection/components/crm-bonus-form/crm-bonus-form.js +1 -1
  13. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-finish/giftback-finish.js +1 -1
  14. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-pin/giftback-pin.js +1 -1
  15. package/dist/collection/components/crm-bonus-form/subcomponents/giftback-progress/giftback-progress.js +1 -1
  16. package/dist/collection/components/crm-bonus-form/subcomponents/phone/phone.input.js +1 -1
  17. package/dist/collection/components/crm-bonus-form/subcomponents/phone-cancel/phone.cancel.input.js +1 -1
  18. package/dist/collection/components/loading-spinner/loading-spinner.js +1 -1
  19. package/dist/collection/components/modal/app-modal.js +1 -1
  20. package/dist/collection/components/pedido/pedido.js +1 -1
  21. package/dist/collection/components/phone/phone-input-mask.css +7 -3
  22. package/dist/collection/components/phone/phone-input-mask.js +1 -1
  23. package/dist/components/app-modal.js +1 -1
  24. package/dist/components/crm-bonus-form.js +1 -1
  25. package/dist/components/crm-bonus.js +12 -12
  26. package/dist/components/crm-bonus.js.map +1 -1
  27. package/dist/components/giftback-finish.js +1 -1
  28. package/dist/components/giftback-pin.js +1 -1
  29. package/dist/components/giftback-progress.js +1 -1
  30. package/dist/components/loading-spinner.js +1 -1
  31. package/dist/components/{p-f6396f4c.js → p-09bc92e2.js} +2 -2
  32. package/dist/components/{p-f6396f4c.js.map → p-09bc92e2.js.map} +1 -1
  33. package/dist/components/{p-3e80a758.js → p-13b9e80b.js} +3 -3
  34. package/dist/components/{p-3e80a758.js.map → p-13b9e80b.js.map} +1 -1
  35. package/dist/components/{p-9a106722.js → p-19a2f475.js} +4 -4
  36. package/dist/components/{p-9a106722.js.map → p-19a2f475.js.map} +1 -1
  37. package/dist/components/{p-b4c3e6bf.js → p-2e9efe46.js} +6 -6
  38. package/dist/components/{p-b4c3e6bf.js.map → p-2e9efe46.js.map} +1 -1
  39. package/dist/components/{p-2667d525.js → p-5753850f.js} +2 -2
  40. package/dist/components/{p-2667d525.js.map → p-5753850f.js.map} +1 -1
  41. package/dist/components/{p-0c79c309.js → p-7aff1ad5.js} +3 -3
  42. package/dist/components/p-7aff1ad5.js.map +1 -0
  43. package/dist/components/{p-c5913818.js → p-bad9f0ec.js} +3 -3
  44. package/dist/components/{p-c5913818.js.map → p-bad9f0ec.js.map} +1 -1
  45. package/dist/components/{p-b49d0f97.js → p-d67754e0.js} +4 -4
  46. package/dist/components/{p-b49d0f97.js.map → p-d67754e0.js.map} +1 -1
  47. package/dist/components/{p-03918b34.js → p-db0aa2d4.js} +2 -2
  48. package/dist/components/{p-03918b34.js.map → p-db0aa2d4.js.map} +1 -1
  49. package/dist/components/pedido-finalizado.js +1 -1
  50. package/dist/components/phone-cancel-input.js +1 -1
  51. package/dist/components/phone-input-mask.js +1 -1
  52. package/dist/components/phone-input.js +1 -1
  53. package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -1
  54. package/dist/crmbonus-component-wake/{p-ef75ecd5.entry.js → p-3024dc0b.entry.js} +2 -2
  55. package/dist/crmbonus-component-wake/{p-9209d95a.entry.js → p-36107050.entry.js} +2 -2
  56. package/dist/crmbonus-component-wake/{p-a603a26e.entry.js → p-3f336c1d.entry.js} +2 -2
  57. package/dist/crmbonus-component-wake/p-6aa00d0b.entry.js +2 -0
  58. package/dist/crmbonus-component-wake/p-6aa00d0b.entry.js.map +1 -0
  59. package/dist/crmbonus-component-wake/{p-e9c2ed46.entry.js → p-8a5448aa.entry.js} +2 -2
  60. package/dist/crmbonus-component-wake/p-9399d79f.entry.js +2 -0
  61. package/dist/crmbonus-component-wake/p-9399d79f.entry.js.map +1 -0
  62. package/dist/esm/app-modal_4.entry.js +4 -4
  63. package/dist/esm/crm-bonus.entry.js +3 -3
  64. package/dist/esm/crm-bonus.entry.js.map +1 -1
  65. package/dist/esm/giftback-finish_3.entry.js +3 -3
  66. package/dist/esm/loading-spinner.entry.js +1 -1
  67. package/dist/esm/pedido-finalizado.entry.js +1 -1
  68. package/dist/esm/phone-input-mask.entry.js +2 -2
  69. package/dist/esm/phone-input-mask.entry.js.map +1 -1
  70. package/package.json +1 -1
  71. package/dist/components/p-0c79c309.js.map +0 -1
  72. package/dist/crmbonus-component-wake/p-63791d65.entry.js +0 -2
  73. package/dist/crmbonus-component-wake/p-63791d65.entry.js.map +0 -1
  74. package/dist/crmbonus-component-wake/p-b31d29c2.entry.js +0 -2
  75. package/dist/crmbonus-component-wake/p-b31d29c2.entry.js.map +0 -1
  76. /package/dist/crmbonus-component-wake/{p-ef75ecd5.entry.js.map → p-3024dc0b.entry.js.map} +0 -0
  77. /package/dist/crmbonus-component-wake/{p-9209d95a.entry.js.map → p-36107050.entry.js.map} +0 -0
  78. /package/dist/crmbonus-component-wake/{p-a603a26e.entry.js.map → p-3f336c1d.entry.js.map} +0 -0
  79. /package/dist/crmbonus-component-wake/{p-e9c2ed46.entry.js.map → p-8a5448aa.entry.js.map} +0 -0
@@ -20,7 +20,7 @@ const AppModal = class {
20
20
  this.modalClosed.emit();
21
21
  }
22
22
  render() {
23
- return (index.h("div", { key: '8dab3bfa7301dbd20a783917037c26451cdab5a8', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, index.h("div", { key: '2846620c39106abde226cd19b2cc0a58b7a88a11', class: "modal" }, index.h("div", { key: '46b63f75e09aec5d2b9255334733b2813156a5e6', class: "modal-header" }, index.h("h3", { key: '6a7baae6fc8430ec9cbbcf959f75842ddac253ac' }, this.modalTitle), index.h("button", { key: 'c6b76e2c862db06657c5ce91fb2bba56fa89e04d', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), index.h("div", { key: '7caebe8e0fab2569e3e4e33cc512133bc691b331', class: "modal-body" }, index.h("slot", { key: 'aa5bd4a5ff5810e1d74727b01121b97ec7b54d51' })))));
23
+ return (index.h("div", { key: 'bfca82abe376ae6a2128f9930477efefd580e127', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, index.h("div", { key: '18d4b5dc82c30ac4d68fc803a538df4925035a48', class: "modal" }, index.h("div", { key: '65fd1a61314f39d68225ae05db4b463f1c2f1c23', class: "modal-header" }, index.h("h3", { key: '936cb2d5c1d0b6b06f64ceff1875b24e7cdb9a9c' }, this.modalTitle), index.h("button", { key: '06945aa82f350dd02a712da527dffd2a148fcc32', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), index.h("div", { key: '9ee81e14f8dfe84eb0e0ceaee403d6389ebbbc35', class: "modal-body" }, index.h("slot", { key: '0b1d305653505e35ae39ea7ffc6bdfc74dc97e59' })))));
24
24
  }
25
25
  };
26
26
  AppModal.style = AppModalStyle0;
@@ -107,7 +107,7 @@ const CrmBonusForm = class {
107
107
  this.cancel();
108
108
  }
109
109
  render() {
110
- return (index.h(index.Host, { key: '3e21a03b8cb534556026804922838f6162df9e30' }, this.step === index$1.StepFormEnum.STEP_PIN && index.h("giftback-pin", { key: '31b04dde37001453cbf2595505dd9c2520b2252c', cancel: () => this.handleCancel(), sent: this.sent, validate: (data) => this.validateBonus(data), loading: this.loading }), this.step === index$1.StepFormEnum.STEP_RESERVE && index.h("giftback-progress", { key: 'c85dbb4ac66a094d0b5a28b152104c6b202984cf', loading: this.loading, cancel: () => this.handleCancel(), bonus: this.bonus, reserve: (amountRedeemed) => this.reserveApply(amountRedeemed) }), this.step === index$1.StepFormEnum.STEP_APPLY && index.h("giftback-finish", { key: '4efa471bb962b48cae34b1c5ebfed518afd3ac31' }), index.h("p", { key: '5cce361016e738b76353e16a0d61f08b4abe22fc', class: "message-error" }, this.message)));
110
+ return (index.h(index.Host, { key: '47aae084607a882caa95c0ea06582a604143db5f' }, this.step === index$1.StepFormEnum.STEP_PIN && index.h("giftback-pin", { key: '1a92fc7bb7bc7f56001da7418e30ea7e7eca41ea', cancel: () => this.handleCancel(), sent: this.sent, validate: (data) => this.validateBonus(data), loading: this.loading }), this.step === index$1.StepFormEnum.STEP_RESERVE && index.h("giftback-progress", { key: 'c358d67060b5f82a52edd5237c6518e24270341c', loading: this.loading, cancel: () => this.handleCancel(), bonus: this.bonus, reserve: (amountRedeemed) => this.reserveApply(amountRedeemed) }), this.step === index$1.StepFormEnum.STEP_APPLY && index.h("giftback-finish", { key: 'fa904cc9de693b9e723e4c86104e63209b159779' }), index.h("p", { key: 'e1797f9e91013e386c5f8b151e4c692e5d8cd3f3', class: "message-error" }, this.message)));
111
111
  }
112
112
  };
113
113
  CrmBonusForm.style = CrmBonusFormStyle0;
@@ -124,7 +124,7 @@ const PhoneCancelInput = class {
124
124
  await this.sendPin(phone);
125
125
  }
126
126
  render() {
127
- return (index.h("div", { key: '9e5524ba40c38bcc04325a8b786ea1b29d92e233', class: "form-container" }, index.h("phone-input-mask", { key: 'a6625e16e686ffd1738989c29245172ebeee13cf', initialValue: "Valor aplicado R$ 100", ref: ref => this.phoneInputMask = ref, disabled: true }), index.h("button", { key: '0196f47d5c490d8ed0670212dc8f1690b160a968', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "Cancelar" : index.h("loading-spinner", { size: "20px", color: "#fff" }))));
127
+ return (index.h("div", { key: 'e4190bd5e37d38631bf7a3a60dcb851d36d26ad8', class: "form-container" }, index.h("phone-input-mask", { key: '5c189523ffe6e67304363411c2afeac03c212a1c', initialValue: "Valor aplicado R$ 100", ref: ref => this.phoneInputMask = ref, disabled: true }), index.h("button", { key: 'b563f7345e86637372e81eb8968affa35d9ce179', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "Cancelar" : index.h("loading-spinner", { size: "20px", color: "#fff" }))));
128
128
  }
129
129
  };
130
130
 
@@ -140,7 +140,7 @@ const PhoneInput = class {
140
140
  await this.sendPin(phone);
141
141
  }
142
142
  render() {
143
- return (index.h("div", { key: 'f24f14d158d9565b17aa024837d4e62e6b64c7a3', class: "form-container" }, index.h("phone-input-mask", { key: '88bf98c7f35b4a4211354a826fa16c922838d228', initialValue: this.value, ref: ref => this.phoneInputMask = ref }), index.h("button", { key: 'e5b277ae100e962d51ed1f1ddb2bc0d3ab9b07cd', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "validar" : index.h("loading-spinner", { size: "20px", color: "#fff" }))));
143
+ return (index.h("div", { key: 'e2731761e6c8c1f596a1030d64a9fa26d00ac4b8', class: "form-container" }, index.h("phone-input-mask", { key: 'b8a30be9c709dd493aab34faf8acfe25ceea050b', initialValue: this.value, ref: ref => this.phoneInputMask = ref }), index.h("button", { key: '9f73fb884b4f8c31f31da644a20d560622cfd984', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "validar" : index.h("loading-spinner", { size: "20px", color: "#fff" }))));
144
144
  }
145
145
  };
146
146
 
@@ -6,7 +6,7 @@ const index = require('./index-52d8a075.js');
6
6
  const crmbonus_service = require('./crmbonus.service-8412ddbf.js');
7
7
  const index$1 = require('./index-296f70bf.js');
8
8
 
9
- const crmBonusCss = ".container-button{max-width:100%;cursor:pointer;padding:10px;display:flex}.section-crm{border:1px solid #dbd4d4;text-align:-webkit-center;margin-bottom:20px}.section-cart-crm{text-align:-webkit-center;margin-bottom:20px}.button{top:50%;background-color:#6c6c7e;color:#fff;border:none;padding:15px;min-height:30px;min-width:120px;font-size:20px;cursor:pointer;margin-left:10px;height:70px}.form-container{width:100%;display:flex;justify-content:center;justify-content:space-around}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.form-container .btnCrm{background:#00162e;border-color:#00162e;width:30%;color:#fff}";
9
+ const crmBonusCss = ".container-button{cursor:pointer;padding:10px;}.section-crm{border:1px solid #dbd4d4;text-align:-webkit-center;margin-bottom:20px}.section-cart-crm p{padding:0;margin:0 0 0 10px}.button{top:50%;background-color:#6c6c7e;color:#fff;border:none;padding:15px;min-height:30px;min-width:120px;font-size:20px;cursor:pointer;margin-left:10px;height:70px}.form-container{width:97%;display:flex;justify-content:space-around}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:0px}.form-container .btnCrm{background:#00162e;border-color:#00162e;width:30%;color:#fff}";
10
10
  const CrmBonusStyle0 = crmBonusCss;
11
11
 
12
12
  const CrmBonus = class {
@@ -74,8 +74,8 @@ const CrmBonus = class {
74
74
  localStorage.setItem('@BYCODERS', this.cartId);
75
75
  }
76
76
  render() {
77
- return (index.h("div", { key: '881de45f9b1d135bcf29f0bb64acba9dd6db2625', class: "section-cart-crm" }, index.h("div", { key: '7cc8a215a2c1bf5a9fbaeeb04c1c8743feabb209', class: "container-button" }, this.canCancel ? index.h("phone-cancel-input", { value: this.customer.phone, sendPin: () => { }, loading: this.loading })
78
- : index.h("phone-input", { value: this.customer.phone, sendPin: (phone) => { this.sendPin(phone); }, loading: this.loading })), index.h("app-modal", { key: '3306e64dbc19f4c8ddc9610c0167034423c103ba', isOpen: this.showModal, modalTitle: `Giftback`, onModalClosed: () => (this.showModal = false) }, index.h("crm-bonus-form", { key: '26c41f2ba814ce5460c1f3723917e5a1c7ea734d', saveStore: () => this.save(), ref: ref => this.crmBonusRef = ref, sent: this.sent, phone: this.phone, cancel: () => this.handleCloseModal(), storeName: this.storeName, products: this.buildProducts(), cartId: this.cartId, customer: this.customer }))));
77
+ return (index.h("div", { key: '881de45f9b1d135bcf29f0bb64acba9dd6db2625', class: "section-cart-crm" }, index.h("p", { key: '220974c8e1b717514a83a739e912aa7f08589506', class: "text-left fbits-responsive-carrinho-desconto-texto" }, "Giftback"), index.h("div", { key: '7a33ec85d3a3acbc5b1f7c35967bd07ec4fc883a', class: "container-button" }, this.canCancel ? index.h("phone-cancel-input", { value: this.customer.phone, sendPin: () => { }, loading: this.loading })
78
+ : index.h("phone-input", { value: this.customer.phone, sendPin: (phone) => { this.sendPin(phone); }, loading: this.loading })), index.h("app-modal", { key: '98c78ae810b68e0396dce2928c2116d2e4d20fa8', isOpen: this.showModal, modalTitle: `Giftback`, onModalClosed: () => (this.showModal = false) }, index.h("crm-bonus-form", { key: '2a22c6a17a4646f7631943fb6017f53372814724', saveStore: () => this.save(), ref: ref => this.crmBonusRef = ref, sent: this.sent, phone: this.phone, cancel: () => this.handleCloseModal(), storeName: this.storeName, products: this.buildProducts(), cartId: this.cartId, customer: this.customer }))));
79
79
  }
80
80
  static get assetsDirs() { return ["assets"]; }
81
81
  };
@@ -1 +1 @@
1
- {"file":"crm-bonus.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,WAAW,GAAG,o8BAAo8B,CAAC;AACz9B,uBAAe,WAAW;;M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EAAgB,SAAS,EAAE,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,WAAW,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAI,CAC9P,CACR,EACP;KACF;;;;;;;","names":["CrmBonusService","StepFormEnum","h"],"sources":["src/components/crm-bonus/crm-bonus.css?tag=crm-bonus&encapsulation=shadow","src/components/crm-bonus/crm-bonus.tsx"],"sourcesContent":["/* :host {\n display: block;\n} */\n\n.container-button {\n max-width: 100%;\n cursor: pointer;\n padding: 10px;\n display: flex;\n}\n\n/* padding: 0 15px 15px;\nborder: 1px solid #ddd;\nmargin-bottom: 20px; */\n\n.section-crm {\n border: 1px solid #dbd4d4;\n /* min-height: 50px; */\n text-align: -webkit-center;\n margin-bottom: 20px;\n}\n\n.section-cart-crm {\n /* border: 1px solid #dbd4d4; */\n /* min-height: 50px; */\n text-align: -webkit-center;\n margin-bottom: 20px;\n}\n\n.button {\n top: 50%;\n background-color: #6c6c7e;\n color: #fff;\n border: none;\n /* border-radius: 10px; */\n padding: 15px;\n min-height: 30px;\n min-width: 120px;\n font-size: 20px;\n cursor: pointer;\n margin-left: 10px;\n height: 70px;\n}\n\n.form-container {\n width: 100%;\n display: flex;\n justify-content: center;\n justify-content: space-around;\n}\n\n\n.btn {\n display: inline-block;\n padding: 6px 12px;\n margin-bottom: 0;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.42857143;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n\n.form-container .btnCrm {\n background: #00162e;\n border-color: #00162e;\n width: 30%;\n color: #fff;\n}","import { Component, Prop, State, h } from '@stencil/core';\nimport { IProduct, IProductWake, ICustomer } from '../../dto/validate.pin.bonus';\nimport { CrmBonusService } from '../../services/crmbonus.service';\nimport { IPinSent } from '../../components';\nimport { StepFormEnum } from '../../contants';\n\n@Component({\n tag: 'crm-bonus',\n styleUrl: 'crm-bonus.css',\n shadow: true,\n assetsDirs: ['assets']\n})\nexport class CrmBonus {\n\n private crmBonusService: CrmBonusService = new CrmBonusService();\n\n private crmBonusRef: HTMLCrmBonusFormElement;\n\n @State() showModal: boolean = false;\n @Prop({ attribute: 'userid' }) userId: number;\n @Prop({ attribute: 'storename' }) storeName;\n @Prop({ attribute: 'products' }) productsInString: string;\n @Prop({ attribute: 'cartid' }) cartId;\n\n @State() products: Array<IProductWake>;\n @State() customer: ICustomer = {\n birthDate: \"\",\n document: \"\",\n name: \"\",\n phone: \"\"\n };\n\n @State() loading: boolean = false;\n @State() message: string;\n @State() phone: number;\n @State() canCancel: boolean = false;\n @State() sent: IPinSent;\n\n async componentWillLoad() {\n await this.handleLoad();\n }\n\n async handleLoad() {\n try {\n if (this.userId) {\n this.customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);\n console.log('user', this.customer);\n }\n } catch (error) {\n console.log('info customer')\n }\n this.products = JSON.parse(this.productsInString);\n }\n\n public async sendPin(phone: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n this.sent = await this.crmBonusService.sendPin(this.phone, this.storeName);;\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n buildProducts(): IProduct[] {\n return this.products.map(product => ({ sku: product.SKU, value: (product.PrecoPor * product.Quantidade), variantId: product.ProdutoVarianteId, qtd: product.Quantidade }))\n }\n\n handleCloseModal() {\n this.showModal = false;\n }\n\n save() {\n localStorage.setItem('@BYCODERS', this.cartId)\n }\n\n render() {\n return (\n <div class=\"section-cart-crm\">\n <div class=\"container-button\">\n {/* <img src={logo} onClick={() => (this.showModal = true)} /> */}\n {\n this.canCancel ? <phone-cancel-input value={this.customer.phone} sendPin={() => { }} loading={this.loading} /> \n : <phone-input value={this.customer.phone} sendPin={(phone) => { this.sendPin(phone) }} loading={this.loading} />\n }\n \n </div>\n <app-modal\n isOpen={this.showModal}\n modalTitle={`Giftback`}\n onModalClosed={() => (this.showModal = false)}\n >\n <crm-bonus-form saveStore={() => this.save()} ref={ref => this.crmBonusRef = ref} sent={this.sent} phone={this.phone} cancel={() => this.handleCloseModal()} storeName={this.storeName} products={this.buildProducts()} cartId={this.cartId} customer={this.customer} />\n </app-modal>\n </div>\n )\n }\n}\n"],"version":3}
1
+ {"file":"crm-bonus.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,WAAW,GAAG,k4BAAk4B,CAAC;AACv5B,uBAAe,WAAW;;MCWb,QAAQ;;;QAEX,oBAAe,GAAoB,IAAIA,gCAAe,EAAE,CAAC;yBAInC,KAAK;;;;;;wBAOJ;YAC7B,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,EAAE;YACR,KAAK,EAAE,EAAE;SACV;uBAE2B,KAAK;;;yBAGH,KAAK;;;IAGnC,MAAM,iBAAiB;QACrB,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;KACzB;IAED,MAAM,UAAU;QACd,IAAI;YACF,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;gBACpF,OAAO,CAAC,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crm-bonus/crm-bonus.css?tag=crm-bonus&encapsulation=shadow","src/components/crm-bonus/crm-bonus.tsx"],"sourcesContent":["/* :host {\n display: block;\n} */\n\n.container-button {\n /* max-width: 100%; */\n cursor: pointer;\n padding: 10px;\n /* display: flex; */\n}\n\n/* padding: 0 15px 15px;\nborder: 1px solid #ddd;\nmargin-bottom: 20px; */\n\n.section-crm {\n border: 1px solid #dbd4d4;\n /* min-height: 50px; */\n text-align: -webkit-center;\n margin-bottom: 20px;\n}\n\n.section-cart-crm p {\n padding: 0;\n margin: 0 0 0 10px;\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}","import { Component, Prop, State, h } from '@stencil/core';\nimport { IProduct, IProductWake, ICustomer } from '../../dto/validate.pin.bonus';\nimport { CrmBonusService } from '../../services/crmbonus.service';\nimport { IPinSent } from '../../components';\nimport { StepFormEnum } from '../../contants';\n\n@Component({\n tag: 'crm-bonus',\n styleUrl: 'crm-bonus.css',\n shadow: true,\n assetsDirs: ['assets']\n})\nexport class CrmBonus {\n\n private crmBonusService: CrmBonusService = new CrmBonusService();\n\n private crmBonusRef: HTMLCrmBonusFormElement;\n\n @State() showModal: boolean = false;\n @Prop({ attribute: 'userid' }) userId: number;\n @Prop({ attribute: 'storename' }) storeName;\n @Prop({ attribute: 'products' }) productsInString: string;\n @Prop({ attribute: 'cartid' }) cartId;\n\n @State() products: Array<IProductWake>;\n @State() customer: ICustomer = {\n birthDate: \"\",\n document: \"\",\n name: \"\",\n phone: \"\"\n };\n\n @State() loading: boolean = false;\n @State() message: string;\n @State() phone: number;\n @State() canCancel: boolean = false;\n @State() sent: IPinSent;\n\n async componentWillLoad() {\n await this.handleLoad();\n }\n\n async handleLoad() {\n try {\n if (this.userId) {\n this.customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);\n console.log('user', this.customer);\n }\n } catch (error) {\n console.log('info customer')\n }\n this.products = JSON.parse(this.productsInString);\n }\n\n public async sendPin(phone: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n this.sent = await this.crmBonusService.sendPin(this.phone, this.storeName);;\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n buildProducts(): IProduct[] {\n return this.products.map(product => ({ sku: product.SKU, value: (product.PrecoPor * product.Quantidade), variantId: product.ProdutoVarianteId, qtd: product.Quantidade }))\n }\n\n handleCloseModal() {\n this.showModal = false;\n }\n\n save() {\n localStorage.setItem('@BYCODERS', this.cartId)\n }\n\n render() {\n return (\n <div class=\"section-cart-crm\">\n <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.customer.phone} sendPin={() => { }} loading={this.loading} /> \n : <phone-input value={this.customer.phone} sendPin={(phone) => { this.sendPin(phone) }} loading={this.loading} />\n }\n \n </div>\n <app-modal\n isOpen={this.showModal}\n modalTitle={`Giftback`}\n onModalClosed={() => (this.showModal = false)}\n >\n <crm-bonus-form saveStore={() => this.save()} ref={ref => this.crmBonusRef = ref} sent={this.sent} phone={this.phone} cancel={() => this.handleCloseModal()} storeName={this.storeName} products={this.buildProducts()} cartId={this.cartId} customer={this.customer} />\n </app-modal>\n </div>\n )\n }\n}\n"],"version":3}
@@ -14,7 +14,7 @@ const GiftbackFinish = class {
14
14
  index.registerInstance(this, hostRef);
15
15
  }
16
16
  render() {
17
- return (index.h("div", { key: '4fd9a7731194fbe8e9dbe0e2fc9d4241f0baf733', class: "message-finish" }, index.h("img", { key: 'ba423d92f1672f14be34334fd0495f38f1f70f4a', src: successSvgrepoComSvg, width: 80 }), index.h("p", { key: '75d6b9648c1357ced70ad43cb94091da73224179' }, "Legal! O B\u00F4nus ser\u00E1 aplicado na sua compra.")));
17
+ return (index.h("div", { key: 'b2db01665e3e19659c35a8c912742352bca4a1ae', class: "message-finish" }, index.h("img", { key: '0cb6d72a9bb696cf16ee38255cb2d5d6170e5ff1', src: successSvgrepoComSvg, width: 80 }), index.h("p", { key: '489dd5b09d20ff2140be375c1e234d5bf9671622' }, "Legal! O B\u00F4nus ser\u00E1 aplicado na sua compra.")));
18
18
  }
19
19
  };
20
20
  GiftbackFinish.style = GiftbackFinishStyle0;
@@ -54,7 +54,7 @@ const GiftbackPin = class {
54
54
  }
55
55
  }
56
56
  render() {
57
- return (index.h("div", { key: 'eb95118bcc7de8cf50c3ffa97656e5635a9b72de', class: "form-container-pin" }, index.h("div", { key: 'cc149d68ccf12e688fe477079c15931ce0ea6536' }, index.h("p", { key: 'fbcbb77d526981fca9129e2a1acbc55eba5c9d33' }, "Insira o PIN de 4 d\u00EDgitos enviado por SMS."), index.h("div", { key: 'ac9887bbc7ef732fd95c890b459b8962652c6fef', class: "pin-container" }, this.pin.map((_, index$1) => (index.h("input", { type: "text", maxLength: 1, value: this.pin[index$1], onInput: (event) => this.handleInput(event, index$1) }))))), index.h("div", { key: 'ca835c16a8aa1177c80cc37f43faaa2f1a7af025', class: "footer-button" }, index.h("button", { key: '6eabe644de6085a1780bec151503c09aa123e459', class: "button-cancel", disabled: this.loading, onClick: () => this.cancel() }, "Cancelar"), index.h("button", { key: '2b6dd05d209e86ce5dc0d1113b38b16d541e107f', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePin() }, !this.loading ? "Enviar" : index.h("loading-spinner", { size: "15px", color: "#fff" })))));
57
+ return (index.h("div", { key: '73bbb31f65a9ad70d9749139036f367c5f983be7', class: "form-container-pin" }, index.h("div", { key: '30a4e1cb8cbec97af32e4535237ddd45b073d47c' }, index.h("p", { key: '4c5946125ee6cfd8ed00a845df15a65074c482e4' }, "Insira o PIN de 4 d\u00EDgitos enviado por SMS."), index.h("div", { key: '4d6b00888b126dc0cd786bd0c5bc20ed0a5ad354', class: "pin-container" }, this.pin.map((_, index$1) => (index.h("input", { type: "text", maxLength: 1, value: this.pin[index$1], onInput: (event) => this.handleInput(event, index$1) }))))), index.h("div", { key: '759369b39be6716fad568f51107db83d2f39f8c3', class: "footer-button" }, index.h("button", { key: '4b3e1f2cd4649e4d70ac42eb6eb41c001a159ca8', class: "button-cancel", disabled: this.loading, onClick: () => this.cancel() }, "Cancelar"), index.h("button", { key: '4872ba1598b806babaff1041ab08a86b3d1e92ef', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePin() }, !this.loading ? "Enviar" : index.h("loading-spinner", { size: "15px", color: "#fff" })))));
58
58
  }
59
59
  };
60
60
  GiftbackPin.style = GiftbackPinStyle0;
@@ -90,7 +90,7 @@ const GiftbackProgress = class {
90
90
  }
91
91
  render() {
92
92
  const remainingGiftback = this.bonus.minimumPurchase - this.bonus.totalValue;
93
- return (index.h("div", { key: 'e6f36ce0f31f70d5402cf89f20b54b7d4f4de7f6', class: "giftback-container" }, index.h("p", { key: '6075406b5eaefb21357161f6980bf6a0e709b98c' }, "Voc\u00EA possui at\u00E9 ", index.h("strong", { key: 'f80192384fe4b189469fb7ee16de266270a8e30c' }, "R$ ", this.bonus.totalBonus.toFixed(2)), " de Giftback nessa compra!"), index.h("p", { key: '453c0a71fe2f8cb2ebf9a6e6b8b55397ee3a9d5b', class: "validity" }, "V\u00E1lido at\u00E9: ", new Date(this.bonus.firstValidityDate).toLocaleDateString('pt-Br')), index.h("p", { key: 'ae7d8bbdb67801ff3b336ce9bcafb381a52c41e1' }, "Voc\u00EA est\u00E1 utilizando ", index.h("strong", { key: '7aa9370121720872deddd9596edbf841ccb4119b' }, "R$ ", this.usedValue.toFixed(2)), " nessa compra"), index.h("div", { key: '010aac89dd4192cc992d342fc334f6719620663e', class: "progress-container" }, index.h("span", { key: 'b2d0ee511ef6e32cdefeadcb0d740682c6da5124' }, "R$ 0"), index.h("input", { key: '3b659919ff940fa353c819fbc395c5fd15ad386b', disabled: true, type: "range", min: "0", step: "0.01", max: this.bonus.totalBonus, value: this.usedValue, onInput: (event) => this.handleSliderChange(event) }), index.h("span", { key: '60e99bf9891b4172f68f8abfbcdf18175a0cc6b0' }, "R$ ", this.bonus.totalBonus.toFixed(2))), index.h("p", { key: '07d1bd092cf438bb2e6b1ca0838d4215e73c4ef0', class: "remaining" }, "Faltam ", index.h("strong", { key: '180966167d48f8ea247ea785a4d35d37c6b5944b' }, "R$ ", remainingGiftback > 0 ? remainingGiftback.toFixed(2) : Number(0).toFixed(2)), " para utilizar o valor total do Giftback."), index.h("div", { key: '277aed85f840f66a517fa23849dadacddda43f5a', class: "footer-button-giftback" }, index.h("button", { key: '30c0779c496b54b86e0c4025528aa1e348f69c1c', class: "button-cancel", disabled: this.loading, onClick: () => this.cancel() }, "Cancelar"), index.h("button", { key: 'ec7e9d6982c5910b8c6fc9fef7310072a07d00c1', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.handleReserve(this.usedValue) }, !this.loading ? "Aplicar" : index.h("loading-spinner", { size: "10px", color: "#fff" })))));
93
+ return (index.h("div", { key: 'a5e02f60ab5e081341582ea0b1cfaa05583a22c2', class: "giftback-container" }, index.h("p", { key: '12eddb011e6a6beda91a1bc937fcacdb891b12a5' }, "Voc\u00EA possui at\u00E9 ", index.h("strong", { key: 'eb6018fe44106dd2a9928d4efe77dbd17180e3d3' }, "R$ ", this.bonus.totalBonus.toFixed(2)), " de Giftback nessa compra!"), index.h("p", { key: '065028af79e33d565c82bd55ea2245e3562617e8', class: "validity" }, "V\u00E1lido at\u00E9: ", new Date(this.bonus.firstValidityDate).toLocaleDateString('pt-Br')), index.h("p", { key: '1ed8896f6301c2c70fb7232190a2c68bc82e5f07' }, "Voc\u00EA est\u00E1 utilizando ", index.h("strong", { key: 'e2019caa7c7697f73021416632ca884097e21abe' }, "R$ ", this.usedValue.toFixed(2)), " nessa compra"), index.h("div", { key: 'b0257ef4d99c4009f23a4d9fae52b42d2ef41209', class: "progress-container" }, index.h("span", { key: 'bb0d1abe791dfcab30e87fea8eb025a9f3787be0' }, "R$ 0"), index.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) }), index.h("span", { key: 'c216b57ffdd2a3613f05db327aad395f1f2e1285' }, "R$ ", this.bonus.totalBonus.toFixed(2))), index.h("p", { key: '7a5dc6a68801da2c09a33f3cdb6cf82e521be581', class: "remaining" }, "Faltam ", index.h("strong", { key: '9c20b260d4a95887844aa038e0f74180fff5c1eb' }, "R$ ", remainingGiftback > 0 ? remainingGiftback.toFixed(2) : Number(0).toFixed(2)), " para utilizar o valor total do Giftback."), index.h("div", { key: 'd99639afcac1ea180ad414ca923391f99f3d5296', class: "footer-button-giftback" }, index.h("button", { key: '4c1bdd2ea2ecd5037d1c29b6af31c3163fffe84a', class: "button-cancel", disabled: this.loading, onClick: () => this.cancel() }, "Cancelar"), index.h("button", { key: '77fc073d28272334d51ab7073e34654509c0ac26', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.handleReserve(this.usedValue) }, !this.loading ? "Aplicar" : index.h("loading-spinner", { size: "10px", color: "#fff" })))));
94
94
  }
95
95
  };
96
96
  GiftbackProgress.style = GiftbackProgressStyle0;
@@ -14,7 +14,7 @@ const LoadingSpinner = class {
14
14
  this.color = '#0078d7';
15
15
  }
16
16
  render() {
17
- return (index.h("div", { key: '78b8ba44c23dcf2fe6b86d343242ff696592bacd', class: "spinner", style: { width: this.size, height: this.size, borderColor: `${this.color} transparent transparent transparent` } }));
17
+ return (index.h("div", { key: 'd6dba36c8a62aba0fb4274d541d007977e662bd6', class: "spinner", style: { width: this.size, height: this.size, borderColor: `${this.color} transparent transparent transparent` } }));
18
18
  }
19
19
  };
20
20
  LoadingSpinner.style = LoadingSpinnerStyle0;
@@ -27,7 +27,7 @@ const Pedido = class {
27
27
  }
28
28
  }
29
29
  render() {
30
- return (index.h("div", { key: '693b9e4927b433cd01e555d33e0430c40d80c91a' }));
30
+ return (index.h("div", { key: 'd9388bff1243e9118edee15533701401353ede5b' }));
31
31
  }
32
32
  };
33
33
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-52d8a075.js');
6
6
 
7
- const phoneInputMaskCss = ".inline-text-field-container{display:flex;flex-direction:column}@supports (top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports (top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined{height:55px;overflow:visible}.phone{display:block;width:84%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);-webkit-transition:border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity, transform, color}";
7
+ const phoneInputMaskCss = ":host{width:100%}.inline-text-field-container{display:flex;flex-direction:column}@supports (top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports (top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined{height:55px;overflow:visible}.phone{display:block;width:100%;height: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}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity, transform, color}";
8
8
  const PhoneInputMaskStyle0 = phoneInputMaskCss;
9
9
 
10
10
  const PhoneInputMask = class {
@@ -35,7 +35,7 @@ const PhoneInputMask = class {
35
35
  return this.phone;
36
36
  }
37
37
  render() {
38
- return (index.h("input", { key: '67f707c85624ebb9ae25f11021df00db1cf237ce', disabled: this.disabled, id: "phone", type: "tel", class: "phone", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(12) 94567-8910" }));
38
+ return (index.h("input", { key: '623357066b9052b9d3a5a853f03058639653d3e0', disabled: this.disabled, id: "phone", type: "tel", class: "phone", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(12) 94567-8910" }));
39
39
  }
40
40
  };
41
41
  PhoneInputMask.style = PhoneInputMaskStyle0;
@@ -1 +1 @@
1
- {"file":"phone-input-mask.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,iBAAiB,GAAG,+tCAA+tC,CAAC;AAC1vC,6BAAe,iBAAiB;;MCMnB,cAAc;;;qBACE,EAAE;;;;IAI3B,iBAAiB;QACb,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;KAClC;IAEO,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,QACIA,oEACI,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAC,OAAO,EACV,IAAI,EAAC,KAAK,EACV,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAC3C,WAAW,EAAC,iBAAiB,GAC/B,EACJ;KACL;;;;;;","names":["h"],"sources":["src/components/phone/phone-input-mask.css?tag=phone-input-mask&encapsulation=shadow","src/components/phone/phone-input-mask.tsx"],"sourcesContent":[".inline-text-field-container {\n display: flex;\n flex-direction: column;\n}\n\n@supports (top: max(0%)) {\n .mdc-text-field--outlined {\n padding-right: max(16px, var(--mdc-shape-small, 4px));\n }\n}\n\n@supports (top: max(0%)) {\n .mdc-text-field--outlined {\n padding-left: max(16px, calc(var(--mdc-shape-small, 4px) + 4px));\n }\n}\n\n.mdc-text-field--outlined {\n height: 55px;\n overflow: visible;\n}\n\n.phone {\n display: block;\n width: 84%;\n height: 34px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n\n.mdc-text-field {\n border-top-left-radius: 4px;\n border-top-left-radius: var(--mdc-shape-small, 4px);\n border-top-right-radius: 4px;\n border-top-right-radius: var(--mdc-shape-small, 4px);\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n display: inline-flex;\n align-items: baseline;\n padding: 0 16px;\n position: relative;\n box-sizing: border-box;\n overflow: hidden;\n will-change: opacity, transform, color;\n}","import { Component, h, Method, Prop, State } from '@stencil/core';\n\n@Component({\n tag: 'phone-input-mask',\n styleUrl: 'phone-input-mask.css',\n shadow: true,\n})\nexport class PhoneInputMask {\n @State() phone: string = '';\n @Prop() initialValue: string;\n @Prop() disabled: boolean;\n\n componentWillLoad() {\n this.phone = this.initialValue; \n }\n\n private formatPhone(value: string): string {\n const cleaned = value.replace(/\\D/g, ''); // Remove tudo que não for número\n const match = cleaned.match(/^(\\d{0,2})(\\d{0,5})(\\d{0,4})$/);\n if (!match) return value;\n\n const part1 = match[1] ? `(${match[1]}` : '';\n const part2 = match[2] ? `) ${match[2]}` : '';\n const part3 = match[3] ? `-${match[3]}` : '';\n\n return `${part1}${part2}${part3}`;\n }\n\n private handleInput(event: Event): void {\n const input = event.target as HTMLInputElement;\n this.phone = this.formatPhone(input.value);\n }\n\n @Method()\n public async getPhone() {\n return this.phone;\n }\n\n render() {\n return (\n <input\n disabled={this.disabled}\n id=\"phone\"\n type=\"tel\"\n class=\"phone\"\n value={this.phone}\n onInput={(event) => this.handleInput(event)}\n placeholder=\"(12) 94567-8910\"\n />\n );\n }\n}\n"],"version":3}
1
+ {"file":"phone-input-mask.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,iBAAiB,GAAG,ivCAAivC,CAAC;AAC5wC,6BAAe,iBAAiB;;MCMnB,cAAc;;;qBACE,EAAE;;;;IAI3B,iBAAiB;QACb,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;KAClC;IAEO,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,QACIA,oEACI,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,EAAE,EAAC,OAAO,EACV,IAAI,EAAC,KAAK,EACV,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAC3C,WAAW,EAAC,iBAAiB,GAC/B,EACJ;KACL;;;;;;","names":["h"],"sources":["src/components/phone/phone-input-mask.css?tag=phone-input-mask&encapsulation=shadow","src/components/phone/phone-input-mask.tsx"],"sourcesContent":[":host {\n width: 100%;\n}\n\n.inline-text-field-container {\n display: flex;\n flex-direction: column;\n}\n\n@supports (top: max(0%)) {\n .mdc-text-field--outlined {\n padding-right: max(16px, var(--mdc-shape-small, 4px));\n }\n}\n\n@supports (top: max(0%)) {\n .mdc-text-field--outlined {\n padding-left: max(16px, calc(var(--mdc-shape-small, 4px) + 4px));\n }\n}\n\n.mdc-text-field--outlined {\n height: 55px;\n overflow: visible;\n}\n\n.phone {\n display: block;\n width: 100%;\n height: 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.mdc-text-field {\n border-top-left-radius: 4px;\n border-top-left-radius: var(--mdc-shape-small, 4px);\n border-top-right-radius: 4px;\n border-top-right-radius: var(--mdc-shape-small, 4px);\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n display: inline-flex;\n align-items: baseline;\n padding: 0 16px;\n position: relative;\n box-sizing: border-box;\n overflow: hidden;\n will-change: opacity, transform, color;\n}","import { Component, h, Method, Prop, State } from '@stencil/core';\n\n@Component({\n tag: 'phone-input-mask',\n styleUrl: 'phone-input-mask.css',\n shadow: true,\n})\nexport class PhoneInputMask {\n @State() phone: string = '';\n @Prop() initialValue: string;\n @Prop() disabled: boolean;\n\n componentWillLoad() {\n this.phone = this.initialValue; \n }\n\n private formatPhone(value: string): string {\n const cleaned = value.replace(/\\D/g, ''); // Remove tudo que não for número\n const match = cleaned.match(/^(\\d{0,2})(\\d{0,5})(\\d{0,4})$/);\n if (!match) return value;\n\n const part1 = match[1] ? `(${match[1]}` : '';\n const part2 = match[2] ? `) ${match[2]}` : '';\n const part3 = match[3] ? `-${match[3]}` : '';\n\n return `${part1}${part2}${part3}`;\n }\n\n private handleInput(event: Event): void {\n const input = event.target as HTMLInputElement;\n this.phone = this.formatPhone(input.value);\n }\n\n @Method()\n public async getPhone() {\n return this.phone;\n }\n\n render() {\n return (\n <input\n disabled={this.disabled}\n id=\"phone\"\n type=\"tel\"\n class=\"phone\"\n value={this.phone}\n onInput={(event) => this.handleInput(event)}\n placeholder=\"(12) 94567-8910\"\n />\n );\n }\n}\n"],"version":3}
@@ -3,10 +3,10 @@
3
3
  } */
4
4
 
5
5
  .container-button {
6
- max-width: 100%;
6
+ /* max-width: 100%; */
7
7
  cursor: pointer;
8
8
  padding: 10px;
9
- display: flex;
9
+ /* display: flex; */
10
10
  }
11
11
 
12
12
  /* padding: 0 15px 15px;
@@ -20,11 +20,9 @@ margin-bottom: 20px; */
20
20
  margin-bottom: 20px;
21
21
  }
22
22
 
23
- .section-cart-crm {
24
- /* border: 1px solid #dbd4d4; */
25
- /* min-height: 50px; */
26
- text-align: -webkit-center;
27
- margin-bottom: 20px;
23
+ .section-cart-crm p {
24
+ padding: 0;
25
+ margin: 0 0 0 10px;
28
26
  }
29
27
 
30
28
  .button {
@@ -43,9 +41,8 @@ margin-bottom: 20px; */
43
41
  }
44
42
 
45
43
  .form-container {
46
- width: 100%;
44
+ width: 97%;
47
45
  display: flex;
48
- justify-content: center;
49
46
  justify-content: space-around;
50
47
  }
51
48
 
@@ -69,7 +66,7 @@ margin-bottom: 20px; */
69
66
  user-select: none;
70
67
  background-image: none;
71
68
  border: 1px solid transparent;
72
- border-radius: 4px;
69
+ border-radius: 0px;
73
70
  }
74
71
 
75
72
  .form-container .btnCrm {
@@ -66,8 +66,8 @@ export class CrmBonus {
66
66
  localStorage.setItem('@BYCODERS', this.cartId);
67
67
  }
68
68
  render() {
69
- return (h("div", { key: '881de45f9b1d135bcf29f0bb64acba9dd6db2625', class: "section-cart-crm" }, h("div", { key: '7cc8a215a2c1bf5a9fbaeeb04c1c8743feabb209', class: "container-button" }, this.canCancel ? h("phone-cancel-input", { value: this.customer.phone, sendPin: () => { }, loading: this.loading })
70
- : h("phone-input", { value: this.customer.phone, sendPin: (phone) => { this.sendPin(phone); }, loading: this.loading })), h("app-modal", { key: '3306e64dbc19f4c8ddc9610c0167034423c103ba', isOpen: this.showModal, modalTitle: `Giftback`, onModalClosed: () => (this.showModal = false) }, h("crm-bonus-form", { key: '26c41f2ba814ce5460c1f3723917e5a1c7ea734d', saveStore: () => this.save(), ref: ref => this.crmBonusRef = ref, sent: this.sent, phone: this.phone, cancel: () => this.handleCloseModal(), storeName: this.storeName, products: this.buildProducts(), cartId: this.cartId, customer: this.customer }))));
69
+ return (h("div", { key: '881de45f9b1d135bcf29f0bb64acba9dd6db2625', class: "section-cart-crm" }, h("p", { key: '220974c8e1b717514a83a739e912aa7f08589506', class: "text-left fbits-responsive-carrinho-desconto-texto" }, "Giftback"), h("div", { key: '7a33ec85d3a3acbc5b1f7c35967bd07ec4fc883a', class: "container-button" }, this.canCancel ? h("phone-cancel-input", { value: this.customer.phone, sendPin: () => { }, loading: this.loading })
70
+ : h("phone-input", { value: this.customer.phone, sendPin: (phone) => { this.sendPin(phone); }, loading: this.loading })), h("app-modal", { key: '98c78ae810b68e0396dce2928c2116d2e4d20fa8', isOpen: this.showModal, modalTitle: `Giftback`, onModalClosed: () => (this.showModal = false) }, h("crm-bonus-form", { key: '2a22c6a17a4646f7631943fb6017f53372814724', saveStore: () => this.save(), ref: ref => this.crmBonusRef = ref, sent: this.sent, phone: this.phone, cancel: () => this.handleCloseModal(), storeName: this.storeName, products: this.buildProducts(), cartId: this.cartId, customer: this.customer }))));
71
71
  }
72
72
  static get is() { return "crm-bonus"; }
73
73
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"crm-bonus.js","sourceRoot":"","sources":["../../../../src/components/crm-bonus/crm-bonus.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9C,MAAM,OAAO,QAAQ;;QAEX,oBAAe,GAAoB,IAAI,eAAe,EAAE,CAAC;yBAInC,KAAK;;;;;;wBAO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/G;YACN,kEACE,MAAM,EAAE,IAAI,CAAC,SAAS,EACtB,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;gBAE7C,uEAAgB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAI,CAC9P,CACR,CACP,CAAA;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, State, h } from '@stencil/core';\nimport { IProduct, IProductWake, ICustomer } from '../../dto/validate.pin.bonus';\nimport { CrmBonusService } from '../../services/crmbonus.service';\nimport { IPinSent } from '../../components';\nimport { StepFormEnum } from '../../contants';\n\n@Component({\n tag: 'crm-bonus',\n styleUrl: 'crm-bonus.css',\n shadow: true,\n assetsDirs: ['assets']\n})\nexport class CrmBonus {\n\n private crmBonusService: CrmBonusService = new CrmBonusService();\n\n private crmBonusRef: HTMLCrmBonusFormElement;\n\n @State() showModal: boolean = false;\n @Prop({ attribute: 'userid' }) userId: number;\n @Prop({ attribute: 'storename' }) storeName;\n @Prop({ attribute: 'products' }) productsInString: string;\n @Prop({ attribute: 'cartid' }) cartId;\n\n @State() products: Array<IProductWake>;\n @State() customer: ICustomer = {\n birthDate: \"\",\n document: \"\",\n name: \"\",\n phone: \"\"\n };\n\n @State() loading: boolean = false;\n @State() message: string;\n @State() phone: number;\n @State() canCancel: boolean = false;\n @State() sent: IPinSent;\n\n async componentWillLoad() {\n await this.handleLoad();\n }\n\n async handleLoad() {\n try {\n if (this.userId) {\n this.customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);\n console.log('user', this.customer);\n }\n } catch (error) {\n console.log('info customer')\n }\n this.products = JSON.parse(this.productsInString);\n }\n\n public async sendPin(phone: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n this.sent = await this.crmBonusService.sendPin(this.phone, this.storeName);;\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n buildProducts(): IProduct[] {\n return this.products.map(product => ({ sku: product.SKU, value: (product.PrecoPor * product.Quantidade), variantId: product.ProdutoVarianteId, qtd: product.Quantidade }))\n }\n\n handleCloseModal() {\n this.showModal = false;\n }\n\n save() {\n localStorage.setItem('@BYCODERS', this.cartId)\n }\n\n render() {\n return (\n <div class=\"section-cart-crm\">\n <div class=\"container-button\">\n {/* <img src={logo} onClick={() => (this.showModal = true)} /> */}\n {\n this.canCancel ? <phone-cancel-input value={this.customer.phone} sendPin={() => { }} loading={this.loading} /> \n : <phone-input value={this.customer.phone} sendPin={(phone) => { this.sendPin(phone) }} loading={this.loading} />\n }\n \n </div>\n <app-modal\n isOpen={this.showModal}\n modalTitle={`Giftback`}\n onModalClosed={() => (this.showModal = false)}\n >\n <crm-bonus-form saveStore={() => this.save()} ref={ref => this.crmBonusRef = ref} sent={this.sent} phone={this.phone} cancel={() => this.handleCloseModal()} storeName={this.storeName} products={this.buildProducts()} cartId={this.cartId} customer={this.customer} />\n </app-modal>\n </div>\n )\n }\n}\n"]}
1
+ {"version":3,"file":"crm-bonus.js","sourceRoot":"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AS,CAAC,CAAC,CAAC,0BAAoB,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,GAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,GAAI;gBAC/G,CAAC,CAAC,mBAAa,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,GAAI,CAG/G;YACN,kEACE,MAAM,EAAE,IAAI,CAAC,SAAS,EACtB,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;gBAE7C,uEAAgB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAI,CAC9P,CACR,CACP,CAAA;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, State, h } from '@stencil/core';\nimport { IProduct, IProductWake, ICustomer } from '../../dto/validate.pin.bonus';\nimport { CrmBonusService } from '../../services/crmbonus.service';\nimport { IPinSent } from '../../components';\nimport { StepFormEnum } from '../../contants';\n\n@Component({\n tag: 'crm-bonus',\n styleUrl: 'crm-bonus.css',\n shadow: true,\n assetsDirs: ['assets']\n})\nexport class CrmBonus {\n\n private crmBonusService: CrmBonusService = new CrmBonusService();\n\n private crmBonusRef: HTMLCrmBonusFormElement;\n\n @State() showModal: boolean = false;\n @Prop({ attribute: 'userid' }) userId: number;\n @Prop({ attribute: 'storename' }) storeName;\n @Prop({ attribute: 'products' }) productsInString: string;\n @Prop({ attribute: 'cartid' }) cartId;\n\n @State() products: Array<IProductWake>;\n @State() customer: ICustomer = {\n birthDate: \"\",\n document: \"\",\n name: \"\",\n phone: \"\"\n };\n\n @State() loading: boolean = false;\n @State() message: string;\n @State() phone: number;\n @State() canCancel: boolean = false;\n @State() sent: IPinSent;\n\n async componentWillLoad() {\n await this.handleLoad();\n }\n\n async handleLoad() {\n try {\n if (this.userId) {\n this.customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);\n console.log('user', this.customer);\n }\n } catch (error) {\n console.log('info customer')\n }\n this.products = JSON.parse(this.productsInString);\n }\n\n public async sendPin(phone: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n this.sent = await this.crmBonusService.sendPin(this.phone, this.storeName);;\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n buildProducts(): IProduct[] {\n return this.products.map(product => ({ sku: product.SKU, value: (product.PrecoPor * product.Quantidade), variantId: product.ProdutoVarianteId, qtd: product.Quantidade }))\n }\n\n handleCloseModal() {\n this.showModal = false;\n }\n\n save() {\n localStorage.setItem('@BYCODERS', this.cartId)\n }\n\n render() {\n return (\n <div class=\"section-cart-crm\">\n <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.customer.phone} sendPin={() => { }} loading={this.loading} /> \n : <phone-input value={this.customer.phone} sendPin={(phone) => { this.sendPin(phone) }} loading={this.loading} />\n }\n \n </div>\n <app-modal\n isOpen={this.showModal}\n modalTitle={`Giftback`}\n onModalClosed={() => (this.showModal = false)}\n >\n <crm-bonus-form saveStore={() => this.save()} ref={ref => this.crmBonusRef = ref} sent={this.sent} phone={this.phone} cancel={() => this.handleCloseModal()} storeName={this.storeName} products={this.buildProducts()} cartId={this.cartId} customer={this.customer} />\n </app-modal>\n </div>\n )\n }\n}\n"]}
@@ -79,7 +79,7 @@ export class CrmBonusForm {
79
79
  this.cancel();
80
80
  }
81
81
  render() {
82
- return (h(Host, { key: '3e21a03b8cb534556026804922838f6162df9e30' }, this.step === StepFormEnum.STEP_PIN && h("giftback-pin", { key: '31b04dde37001453cbf2595505dd9c2520b2252c', cancel: () => this.handleCancel(), sent: this.sent, validate: (data) => this.validateBonus(data), loading: this.loading }), this.step === StepFormEnum.STEP_RESERVE && h("giftback-progress", { key: 'c85dbb4ac66a094d0b5a28b152104c6b202984cf', loading: this.loading, cancel: () => this.handleCancel(), bonus: this.bonus, reserve: (amountRedeemed) => this.reserveApply(amountRedeemed) }), this.step === StepFormEnum.STEP_APPLY && h("giftback-finish", { key: '4efa471bb962b48cae34b1c5ebfed518afd3ac31' }), h("p", { key: '5cce361016e738b76353e16a0d61f08b4abe22fc', class: "message-error" }, this.message)));
82
+ return (h(Host, { key: '47aae084607a882caa95c0ea06582a604143db5f' }, this.step === StepFormEnum.STEP_PIN && h("giftback-pin", { key: '1a92fc7bb7bc7f56001da7418e30ea7e7eca41ea', cancel: () => this.handleCancel(), sent: this.sent, validate: (data) => this.validateBonus(data), loading: this.loading }), this.step === StepFormEnum.STEP_RESERVE && h("giftback-progress", { key: 'c358d67060b5f82a52edd5237c6518e24270341c', loading: this.loading, cancel: () => this.handleCancel(), bonus: this.bonus, reserve: (amountRedeemed) => this.reserveApply(amountRedeemed) }), this.step === StepFormEnum.STEP_APPLY && h("giftback-finish", { key: 'fa904cc9de693b9e723e4c86104e63209b159779' }), h("p", { key: 'e1797f9e91013e386c5f8b151e4c692e5d8cd3f3', class: "message-error" }, this.message)));
83
83
  }
84
84
  static get is() { return "crm-bonus-form"; }
85
85
  static get encapsulation() { return "shadow"; }
@@ -2,7 +2,7 @@ import { h } from "@stencil/core";
2
2
  import success from "../../../crm-bonus/assets/svg/success-svgrepo-com.svg";
3
3
  export class GiftbackFinish {
4
4
  render() {
5
- return (h("div", { key: '4fd9a7731194fbe8e9dbe0e2fc9d4241f0baf733', class: "message-finish" }, h("img", { key: 'ba423d92f1672f14be34334fd0495f38f1f70f4a', src: success, width: 80 }), h("p", { key: '75d6b9648c1357ced70ad43cb94091da73224179' }, "Legal! O B\u00F4nus ser\u00E1 aplicado na sua compra.")));
5
+ return (h("div", { key: 'b2db01665e3e19659c35a8c912742352bca4a1ae', class: "message-finish" }, h("img", { key: '0cb6d72a9bb696cf16ee38255cb2d5d6170e5ff1', src: success, width: 80 }), h("p", { key: '489dd5b09d20ff2140be375c1e234d5bf9671622' }, "Legal! O B\u00F4nus ser\u00E1 aplicado na sua compra.")));
6
6
  }
7
7
  static get is() { return "giftback-finish"; }
8
8
  static get encapsulation() { return "shadow"; }
@@ -30,7 +30,7 @@ export class GiftbackPin {
30
30
  }
31
31
  }
32
32
  render() {
33
- return (h("div", { key: 'eb95118bcc7de8cf50c3ffa97656e5635a9b72de', class: "form-container-pin" }, h("div", { key: 'cc149d68ccf12e688fe477079c15931ce0ea6536' }, h("p", { key: 'fbcbb77d526981fca9129e2a1acbc55eba5c9d33' }, "Insira o PIN de 4 d\u00EDgitos enviado por SMS."), h("div", { key: 'ac9887bbc7ef732fd95c890b459b8962652c6fef', class: "pin-container" }, this.pin.map((_, index) => (h("input", { type: "text", maxLength: 1, value: this.pin[index], onInput: (event) => this.handleInput(event, index) }))))), h("div", { key: 'ca835c16a8aa1177c80cc37f43faaa2f1a7af025', class: "footer-button" }, h("button", { key: '6eabe644de6085a1780bec151503c09aa123e459', class: "button-cancel", disabled: this.loading, onClick: () => this.cancel() }, "Cancelar"), h("button", { key: '2b6dd05d209e86ce5dc0d1113b38b16d541e107f', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePin() }, !this.loading ? "Enviar" : h("loading-spinner", { size: "15px", color: "#fff" })))));
33
+ return (h("div", { key: '73bbb31f65a9ad70d9749139036f367c5f983be7', class: "form-container-pin" }, h("div", { key: '30a4e1cb8cbec97af32e4535237ddd45b073d47c' }, h("p", { key: '4c5946125ee6cfd8ed00a845df15a65074c482e4' }, "Insira o PIN de 4 d\u00EDgitos enviado por SMS."), h("div", { key: '4d6b00888b126dc0cd786bd0c5bc20ed0a5ad354', class: "pin-container" }, this.pin.map((_, index) => (h("input", { type: "text", maxLength: 1, value: this.pin[index], onInput: (event) => this.handleInput(event, index) }))))), h("div", { key: '759369b39be6716fad568f51107db83d2f39f8c3', class: "footer-button" }, h("button", { key: '4b3e1f2cd4649e4d70ac42eb6eb41c001a159ca8', class: "button-cancel", disabled: this.loading, onClick: () => this.cancel() }, "Cancelar"), h("button", { key: '4872ba1598b806babaff1041ab08a86b3d1e92ef', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePin() }, !this.loading ? "Enviar" : h("loading-spinner", { size: "15px", color: "#fff" })))));
34
34
  }
35
35
  static get is() { return "giftback-pin"; }
36
36
  static get encapsulation() { return "shadow"; }
@@ -26,7 +26,7 @@ export class GiftbackProgress {
26
26
  }
27
27
  render() {
28
28
  const remainingGiftback = this.bonus.minimumPurchase - this.bonus.totalValue;
29
- return (h("div", { key: 'e6f36ce0f31f70d5402cf89f20b54b7d4f4de7f6', class: "giftback-container" }, h("p", { key: '6075406b5eaefb21357161f6980bf6a0e709b98c' }, "Voc\u00EA possui at\u00E9 ", h("strong", { key: 'f80192384fe4b189469fb7ee16de266270a8e30c' }, "R$ ", this.bonus.totalBonus.toFixed(2)), " de Giftback nessa compra!"), h("p", { key: '453c0a71fe2f8cb2ebf9a6e6b8b55397ee3a9d5b', class: "validity" }, "V\u00E1lido at\u00E9: ", new Date(this.bonus.firstValidityDate).toLocaleDateString('pt-Br')), h("p", { key: 'ae7d8bbdb67801ff3b336ce9bcafb381a52c41e1' }, "Voc\u00EA est\u00E1 utilizando ", h("strong", { key: '7aa9370121720872deddd9596edbf841ccb4119b' }, "R$ ", this.usedValue.toFixed(2)), " nessa compra"), h("div", { key: '010aac89dd4192cc992d342fc334f6719620663e', class: "progress-container" }, h("span", { key: 'b2d0ee511ef6e32cdefeadcb0d740682c6da5124' }, "R$ 0"), h("input", { key: '3b659919ff940fa353c819fbc395c5fd15ad386b', disabled: true, type: "range", min: "0", step: "0.01", max: this.bonus.totalBonus, value: this.usedValue, onInput: (event) => this.handleSliderChange(event) }), h("span", { key: '60e99bf9891b4172f68f8abfbcdf18175a0cc6b0' }, "R$ ", this.bonus.totalBonus.toFixed(2))), h("p", { key: '07d1bd092cf438bb2e6b1ca0838d4215e73c4ef0', class: "remaining" }, "Faltam ", h("strong", { key: '180966167d48f8ea247ea785a4d35d37c6b5944b' }, "R$ ", remainingGiftback > 0 ? remainingGiftback.toFixed(2) : Number(0).toFixed(2)), " para utilizar o valor total do Giftback."), h("div", { key: '277aed85f840f66a517fa23849dadacddda43f5a', class: "footer-button-giftback" }, h("button", { key: '30c0779c496b54b86e0c4025528aa1e348f69c1c', class: "button-cancel", disabled: this.loading, onClick: () => this.cancel() }, "Cancelar"), h("button", { key: 'ec7e9d6982c5910b8c6fc9fef7310072a07d00c1', class: `button ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.handleReserve(this.usedValue) }, !this.loading ? "Aplicar" : h("loading-spinner", { size: "10px", color: "#fff" })))));
29
+ 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" })))));
30
30
  }
31
31
  static get is() { return "giftback-progress"; }
32
32
  static get encapsulation() { return "shadow"; }
@@ -10,7 +10,7 @@ export class PhoneInput {
10
10
  await this.sendPin(phone);
11
11
  }
12
12
  render() {
13
- return (h("div", { key: 'f24f14d158d9565b17aa024837d4e62e6b64c7a3', class: "form-container" }, h("phone-input-mask", { key: '88bf98c7f35b4a4211354a826fa16c922838d228', initialValue: this.value, ref: ref => this.phoneInputMask = ref }), h("button", { key: 'e5b277ae100e962d51ed1f1ddb2bc0d3ab9b07cd', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "validar" : h("loading-spinner", { size: "20px", color: "#fff" }))));
13
+ return (h("div", { key: 'e2731761e6c8c1f596a1030d64a9fa26d00ac4b8', class: "form-container" }, h("phone-input-mask", { key: 'b8a30be9c709dd493aab34faf8acfe25ceea050b', initialValue: this.value, ref: ref => this.phoneInputMask = ref }), h("button", { key: '9f73fb884b4f8c31f31da644a20d560622cfd984', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "validar" : h("loading-spinner", { size: "20px", color: "#fff" }))));
14
14
  }
15
15
  static get is() { return "phone-input"; }
16
16
  static get properties() {
@@ -10,7 +10,7 @@ export class PhoneCancelInput {
10
10
  await this.sendPin(phone);
11
11
  }
12
12
  render() {
13
- return (h("div", { key: '9e5524ba40c38bcc04325a8b786ea1b29d92e233', class: "form-container" }, h("phone-input-mask", { key: 'a6625e16e686ffd1738989c29245172ebeee13cf', initialValue: "Valor aplicado R$ 100", ref: ref => this.phoneInputMask = ref, disabled: true }), h("button", { key: '0196f47d5c490d8ed0670212dc8f1690b160a968', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "Cancelar" : h("loading-spinner", { size: "20px", color: "#fff" }))));
13
+ return (h("div", { key: 'e4190bd5e37d38631bf7a3a60dcb851d36d26ad8', class: "form-container" }, h("phone-input-mask", { key: '5c189523ffe6e67304363411c2afeac03c212a1c', initialValue: "Valor aplicado R$ 100", ref: ref => this.phoneInputMask = ref, disabled: true }), h("button", { key: 'b563f7345e86637372e81eb8968affa35d9ce179', class: `btn btn-success btnCrm ${this.loading ? 'disabled' : ''} `, disabled: this.loading, onClick: () => this.validatePhone() }, !this.loading ? "Cancelar" : h("loading-spinner", { size: "20px", color: "#fff" }))));
14
14
  }
15
15
  static get is() { return "phone-cancel-input"; }
16
16
  static get properties() {
@@ -5,7 +5,7 @@ export class LoadingSpinner {
5
5
  this.color = '#0078d7';
6
6
  }
7
7
  render() {
8
- return (h("div", { key: '78b8ba44c23dcf2fe6b86d343242ff696592bacd', class: "spinner", style: { width: this.size, height: this.size, borderColor: `${this.color} transparent transparent transparent` } }));
8
+ return (h("div", { key: 'd6dba36c8a62aba0fb4274d541d007977e662bd6', 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: '8dab3bfa7301dbd20a783917037c26451cdab5a8', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, h("div", { key: '2846620c39106abde226cd19b2cc0a58b7a88a11', class: "modal" }, h("div", { key: '46b63f75e09aec5d2b9255334733b2813156a5e6', class: "modal-header" }, h("h3", { key: '6a7baae6fc8430ec9cbbcf959f75842ddac253ac' }, this.modalTitle), h("button", { key: 'c6b76e2c862db06657c5ce91fb2bba56fa89e04d', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), h("div", { key: '7caebe8e0fab2569e3e4e33cc512133bc691b331', class: "modal-body" }, h("slot", { key: 'aa5bd4a5ff5810e1d74727b01121b97ec7b54d51' })))));
11
+ return (h("div", { key: 'bfca82abe376ae6a2128f9930477efefd580e127', class: `modal-backdrop ${this.isOpen ? 'visible' : ''}` }, h("div", { key: '18d4b5dc82c30ac4d68fc803a538df4925035a48', class: "modal" }, h("div", { key: '65fd1a61314f39d68225ae05db4b463f1c2f1c23', class: "modal-header" }, h("h3", { key: '936cb2d5c1d0b6b06f64ceff1875b24e7cdb9a9c' }, this.modalTitle), h("button", { key: '06945aa82f350dd02a712da527dffd2a148fcc32', class: "close-button", onClick: () => this.closeModal() }, "\u00D7")), h("div", { key: '9ee81e14f8dfe84eb0e0ceaee403d6389ebbbc35', class: "modal-body" }, h("slot", { key: '0b1d305653505e35ae39ea7ffc6bdfc74dc97e59' })))));
12
12
  }
13
13
  static get is() { return "app-modal"; }
14
14
  static get encapsulation() { return "shadow"; }
@@ -21,7 +21,7 @@ export class Pedido {
21
21
  }
22
22
  }
23
23
  render() {
24
- return (h("div", { key: '693b9e4927b433cd01e555d33e0430c40d80c91a' }));
24
+ return (h("div", { key: 'd9388bff1243e9118edee15533701401353ede5b' }));
25
25
  }
26
26
  static get is() { return "pedido-finalizado"; }
27
27
  static get properties() {
@@ -1,3 +1,7 @@
1
+ :host {
2
+ width: 100%;
3
+ }
4
+
1
5
  .inline-text-field-container {
2
6
  display: flex;
3
7
  flex-direction: column;
@@ -22,8 +26,8 @@
22
26
 
23
27
  .phone {
24
28
  display: block;
25
- width: 84%;
26
- height: 34px;
29
+ width: 100%;
30
+ height: 24px;
27
31
  padding: 6px 12px;
28
32
  font-size: 14px;
29
33
  line-height: 1.42857143;
@@ -31,7 +35,7 @@
31
35
  background-color: #fff;
32
36
  background-image: none;
33
37
  border: 1px solid #ccc;
34
- border-radius: 4px;
38
+ border-radius: 0px;
35
39
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
36
40
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
37
41
  -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
@@ -26,7 +26,7 @@ export class PhoneInputMask {
26
26
  return this.phone;
27
27
  }
28
28
  render() {
29
- return (h("input", { key: '67f707c85624ebb9ae25f11021df00db1cf237ce', disabled: this.disabled, id: "phone", type: "tel", class: "phone", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(12) 94567-8910" }));
29
+ return (h("input", { key: '623357066b9052b9d3a5a853f03058639653d3e0', disabled: this.disabled, id: "phone", type: "tel", class: "phone", value: this.phone, onInput: (event) => this.handleInput(event), placeholder: "(12) 94567-8910" }));
30
30
  }
31
31
  static get is() { return "phone-input-mask"; }
32
32
  static get encapsulation() { return "shadow"; }
@@ -1,4 +1,4 @@
1
- import { A as AppModal$1, d as defineCustomElement$1 } from './p-f6396f4c.js';
1
+ import { A as AppModal$1, d as defineCustomElement$1 } from './p-09bc92e2.js';
2
2
 
3
3
  const AppModal = AppModal$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { C as CrmBonusForm$1, d as defineCustomElement$1 } from './p-b4c3e6bf.js';
1
+ import { C as CrmBonusForm$1, d as defineCustomElement$1 } from './p-2e9efe46.js';
2
2
 
3
3
  const CrmBonusForm = CrmBonusForm$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,16 +1,16 @@
1
1
  import { p as proxyCustomElement, H, h } from './p-faf7103e.js';
2
2
  import { C as CrmBonusService } from './p-374de9ae.js';
3
- import { d as defineCustomElement$9, S as StepFormEnum } from './p-b4c3e6bf.js';
4
- import { d as defineCustomElement$a } from './p-f6396f4c.js';
5
- import { d as defineCustomElement$8 } from './p-2667d525.js';
6
- import { d as defineCustomElement$7 } from './p-3e80a758.js';
7
- import { d as defineCustomElement$6 } from './p-c5913818.js';
8
- import { d as defineCustomElement$5 } from './p-03918b34.js';
9
- import { d as defineCustomElement$4 } from './p-9a106722.js';
10
- import { d as defineCustomElement$3 } from './p-b49d0f97.js';
11
- import { d as defineCustomElement$2 } from './p-0c79c309.js';
3
+ import { d as defineCustomElement$9, S as StepFormEnum } from './p-2e9efe46.js';
4
+ import { d as defineCustomElement$a } from './p-09bc92e2.js';
5
+ import { d as defineCustomElement$8 } from './p-5753850f.js';
6
+ import { d as defineCustomElement$7 } from './p-13b9e80b.js';
7
+ import { d as defineCustomElement$6 } from './p-bad9f0ec.js';
8
+ import { d as defineCustomElement$5 } from './p-db0aa2d4.js';
9
+ import { d as defineCustomElement$4 } from './p-19a2f475.js';
10
+ import { d as defineCustomElement$3 } from './p-d67754e0.js';
11
+ import { d as defineCustomElement$2 } from './p-7aff1ad5.js';
12
12
 
13
- const crmBonusCss = ".container-button{max-width:100%;cursor:pointer;padding:10px;display:flex}.section-crm{border:1px solid #dbd4d4;text-align:-webkit-center;margin-bottom:20px}.section-cart-crm{text-align:-webkit-center;margin-bottom:20px}.button{top:50%;background-color:#6c6c7e;color:#fff;border:none;padding:15px;min-height:30px;min-width:120px;font-size:20px;cursor:pointer;margin-left:10px;height:70px}.form-container{width:100%;display:flex;justify-content:center;justify-content:space-around}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.form-container .btnCrm{background:#00162e;border-color:#00162e;width:30%;color:#fff}";
13
+ const crmBonusCss = ".container-button{cursor:pointer;padding:10px;}.section-crm{border:1px solid #dbd4d4;text-align:-webkit-center;margin-bottom:20px}.section-cart-crm p{padding:0;margin:0 0 0 10px}.button{top:50%;background-color:#6c6c7e;color:#fff;border:none;padding:15px;min-height:30px;min-width:120px;font-size:20px;cursor:pointer;margin-left:10px;height:70px}.form-container{width:97%;display:flex;justify-content:space-around}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:0px}.form-container .btnCrm{background:#00162e;border-color:#00162e;width:30%;color:#fff}";
14
14
  const CrmBonusStyle0 = crmBonusCss;
15
15
 
16
16
  const CrmBonus$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonus extends H {
@@ -80,8 +80,8 @@ const CrmBonus$1 = /*@__PURE__*/ proxyCustomElement(class CrmBonus extends H {
80
80
  localStorage.setItem('@BYCODERS', this.cartId);
81
81
  }
82
82
  render() {
83
- return (h("div", { key: '881de45f9b1d135bcf29f0bb64acba9dd6db2625', class: "section-cart-crm" }, h("div", { key: '7cc8a215a2c1bf5a9fbaeeb04c1c8743feabb209', class: "container-button" }, this.canCancel ? h("phone-cancel-input", { value: this.customer.phone, sendPin: () => { }, loading: this.loading })
84
- : h("phone-input", { value: this.customer.phone, sendPin: (phone) => { this.sendPin(phone); }, loading: this.loading })), h("app-modal", { key: '3306e64dbc19f4c8ddc9610c0167034423c103ba', isOpen: this.showModal, modalTitle: `Giftback`, onModalClosed: () => (this.showModal = false) }, h("crm-bonus-form", { key: '26c41f2ba814ce5460c1f3723917e5a1c7ea734d', saveStore: () => this.save(), ref: ref => this.crmBonusRef = ref, sent: this.sent, phone: this.phone, cancel: () => this.handleCloseModal(), storeName: this.storeName, products: this.buildProducts(), cartId: this.cartId, customer: this.customer }))));
83
+ return (h("div", { key: '881de45f9b1d135bcf29f0bb64acba9dd6db2625', class: "section-cart-crm" }, h("p", { key: '220974c8e1b717514a83a739e912aa7f08589506', class: "text-left fbits-responsive-carrinho-desconto-texto" }, "Giftback"), h("div", { key: '7a33ec85d3a3acbc5b1f7c35967bd07ec4fc883a', class: "container-button" }, this.canCancel ? h("phone-cancel-input", { value: this.customer.phone, sendPin: () => { }, loading: this.loading })
84
+ : h("phone-input", { value: this.customer.phone, sendPin: (phone) => { this.sendPin(phone); }, loading: this.loading })), h("app-modal", { key: '98c78ae810b68e0396dce2928c2116d2e4d20fa8', isOpen: this.showModal, modalTitle: `Giftback`, onModalClosed: () => (this.showModal = false) }, h("crm-bonus-form", { key: '2a22c6a17a4646f7631943fb6017f53372814724', saveStore: () => this.save(), ref: ref => this.crmBonusRef = ref, sent: this.sent, phone: this.phone, cancel: () => this.handleCloseModal(), storeName: this.storeName, products: this.buildProducts(), cartId: this.cartId, customer: this.customer }))));
85
85
  }
86
86
  static get assetsDirs() { return ["assets"]; }
87
87
  static get style() { return CrmBonusStyle0; }
@@ -1 +1 @@
1
- {"file":"crm-bonus.js","mappings":";;;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,o8BAAo8B,CAAC;AACz9B,uBAAe,WAAW;;MCWbA,UAAQ;;;;;QAEX,oBAAe,GAAoB,IAAI,eAAe,EAAE,CAAC;yBAInC,KAAK;;;;;;wBAOJ;YAC7B,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,EAAE;YACR,KAAK,EAAE,EAAE;SACV;uBAE2B,KAAK;;;yBAGH,KAAK;;;IAGnC,MAAM,iBAAiB;QACrB,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;KACzB;IAED,MAAM,UAAU;QACd,IAAI;YACF,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;gBACpF,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;aACpC;SACF;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;SAC7B;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;KACnD;IAEM,MAAM,OAAO,CAAC,KAAa;;QAChC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC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AK,EAAE,OAAO,EAAE,SAAU,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,GAAI;cAC7G,mBAAa,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,GAAI,CAG/G,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,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,WAAW,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAI,CAC9P,CACR,EACP;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CrmBonus"],"sources":["src/components/crm-bonus/crm-bonus.css?tag=crm-bonus&encapsulation=shadow","src/components/crm-bonus/crm-bonus.tsx"],"sourcesContent":["/* :host {\n display: block;\n} */\n\n.container-button {\n max-width: 100%;\n cursor: pointer;\n padding: 10px;\n display: flex;\n}\n\n/* padding: 0 15px 15px;\nborder: 1px solid #ddd;\nmargin-bottom: 20px; */\n\n.section-crm {\n border: 1px solid #dbd4d4;\n /* min-height: 50px; */\n text-align: -webkit-center;\n margin-bottom: 20px;\n}\n\n.section-cart-crm {\n /* border: 1px solid #dbd4d4; */\n /* min-height: 50px; */\n text-align: -webkit-center;\n margin-bottom: 20px;\n}\n\n.button {\n top: 50%;\n background-color: #6c6c7e;\n color: #fff;\n border: none;\n /* border-radius: 10px; */\n padding: 15px;\n min-height: 30px;\n min-width: 120px;\n font-size: 20px;\n cursor: pointer;\n margin-left: 10px;\n height: 70px;\n}\n\n.form-container {\n width: 100%;\n display: flex;\n justify-content: center;\n justify-content: space-around;\n}\n\n\n.btn {\n display: inline-block;\n padding: 6px 12px;\n margin-bottom: 0;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.42857143;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n\n.form-container .btnCrm {\n background: #00162e;\n border-color: #00162e;\n width: 30%;\n color: #fff;\n}","import { Component, Prop, State, h } from '@stencil/core';\nimport { IProduct, IProductWake, ICustomer } from '../../dto/validate.pin.bonus';\nimport { CrmBonusService } from '../../services/crmbonus.service';\nimport { IPinSent } from '../../components';\nimport { StepFormEnum } from '../../contants';\n\n@Component({\n tag: 'crm-bonus',\n styleUrl: 'crm-bonus.css',\n shadow: true,\n assetsDirs: ['assets']\n})\nexport class CrmBonus {\n\n private crmBonusService: CrmBonusService = new CrmBonusService();\n\n private crmBonusRef: HTMLCrmBonusFormElement;\n\n @State() showModal: boolean = false;\n @Prop({ attribute: 'userid' }) userId: number;\n @Prop({ attribute: 'storename' }) storeName;\n @Prop({ attribute: 'products' }) productsInString: string;\n @Prop({ attribute: 'cartid' }) cartId;\n\n @State() products: Array<IProductWake>;\n @State() customer: ICustomer = {\n birthDate: \"\",\n document: \"\",\n name: \"\",\n phone: \"\"\n };\n\n @State() loading: boolean = false;\n @State() message: string;\n @State() phone: number;\n @State() canCancel: boolean = false;\n @State() sent: IPinSent;\n\n async componentWillLoad() {\n await this.handleLoad();\n }\n\n async handleLoad() {\n try {\n if (this.userId) {\n this.customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);\n console.log('user', this.customer);\n }\n } catch (error) {\n console.log('info customer')\n }\n this.products = JSON.parse(this.productsInString);\n }\n\n public async sendPin(phone: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n this.sent = await this.crmBonusService.sendPin(this.phone, this.storeName);;\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n buildProducts(): IProduct[] {\n return this.products.map(product => ({ sku: product.SKU, value: (product.PrecoPor * product.Quantidade), variantId: product.ProdutoVarianteId, qtd: product.Quantidade }))\n }\n\n handleCloseModal() {\n this.showModal = false;\n }\n\n save() {\n localStorage.setItem('@BYCODERS', this.cartId)\n }\n\n render() {\n return (\n <div class=\"section-cart-crm\">\n <div class=\"container-button\">\n {/* <img src={logo} onClick={() => (this.showModal = true)} /> */}\n {\n this.canCancel ? <phone-cancel-input value={this.customer.phone} sendPin={() => { }} loading={this.loading} /> \n : <phone-input value={this.customer.phone} sendPin={(phone) => { this.sendPin(phone) }} loading={this.loading} />\n }\n \n </div>\n <app-modal\n isOpen={this.showModal}\n modalTitle={`Giftback`}\n onModalClosed={() => (this.showModal = false)}\n >\n <crm-bonus-form saveStore={() => this.save()} ref={ref => this.crmBonusRef = ref} sent={this.sent} phone={this.phone} cancel={() => this.handleCloseModal()} storeName={this.storeName} products={this.buildProducts()} cartId={this.cartId} customer={this.customer} />\n </app-modal>\n </div>\n )\n }\n}\n"],"version":3}
1
+ {"file":"crm-bonus.js","mappings":";;;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,k4BAAk4B,CAAC;AACv5B,uBAAe,WAAW;;MCWbA,UAAQ;;;;;QAEX,oBAAe,GA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EAAgB,SAAS,EAAE,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,WAAW,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAI,CAC9P,CACR,EACP;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CrmBonus"],"sources":["src/components/crm-bonus/crm-bonus.css?tag=crm-bonus&encapsulation=shadow","src/components/crm-bonus/crm-bonus.tsx"],"sourcesContent":["/* :host {\n display: block;\n} */\n\n.container-button {\n /* max-width: 100%; */\n cursor: pointer;\n padding: 10px;\n /* display: flex; */\n}\n\n/* padding: 0 15px 15px;\nborder: 1px solid #ddd;\nmargin-bottom: 20px; */\n\n.section-crm {\n border: 1px solid #dbd4d4;\n /* min-height: 50px; */\n text-align: -webkit-center;\n margin-bottom: 20px;\n}\n\n.section-cart-crm p {\n padding: 0;\n margin: 0 0 0 10px;\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}","import { Component, Prop, State, h } from '@stencil/core';\nimport { IProduct, IProductWake, ICustomer } from '../../dto/validate.pin.bonus';\nimport { CrmBonusService } from '../../services/crmbonus.service';\nimport { IPinSent } from '../../components';\nimport { StepFormEnum } from '../../contants';\n\n@Component({\n tag: 'crm-bonus',\n styleUrl: 'crm-bonus.css',\n shadow: true,\n assetsDirs: ['assets']\n})\nexport class CrmBonus {\n\n private crmBonusService: CrmBonusService = new CrmBonusService();\n\n private crmBonusRef: HTMLCrmBonusFormElement;\n\n @State() showModal: boolean = false;\n @Prop({ attribute: 'userid' }) userId: number;\n @Prop({ attribute: 'storename' }) storeName;\n @Prop({ attribute: 'products' }) productsInString: string;\n @Prop({ attribute: 'cartid' }) cartId;\n\n @State() products: Array<IProductWake>;\n @State() customer: ICustomer = {\n birthDate: \"\",\n document: \"\",\n name: \"\",\n phone: \"\"\n };\n\n @State() loading: boolean = false;\n @State() message: string;\n @State() phone: number;\n @State() canCancel: boolean = false;\n @State() sent: IPinSent;\n\n async componentWillLoad() {\n await this.handleLoad();\n }\n\n async handleLoad() {\n try {\n if (this.userId) {\n this.customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);\n console.log('user', this.customer);\n }\n } catch (error) {\n console.log('info customer')\n }\n this.products = JSON.parse(this.productsInString);\n }\n\n public async sendPin(phone: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n this.sent = await this.crmBonusService.sendPin(this.phone, this.storeName);;\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n buildProducts(): IProduct[] {\n return this.products.map(product => ({ sku: product.SKU, value: (product.PrecoPor * product.Quantidade), variantId: product.ProdutoVarianteId, qtd: product.Quantidade }))\n }\n\n handleCloseModal() {\n this.showModal = false;\n }\n\n save() {\n localStorage.setItem('@BYCODERS', this.cartId)\n }\n\n render() {\n return (\n <div class=\"section-cart-crm\">\n <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.customer.phone} sendPin={() => { }} loading={this.loading} /> \n : <phone-input value={this.customer.phone} sendPin={(phone) => { this.sendPin(phone) }} loading={this.loading} />\n }\n \n </div>\n <app-modal\n isOpen={this.showModal}\n modalTitle={`Giftback`}\n onModalClosed={() => (this.showModal = false)}\n >\n <crm-bonus-form saveStore={() => this.save()} ref={ref => this.crmBonusRef = ref} sent={this.sent} phone={this.phone} cancel={() => this.handleCloseModal()} storeName={this.storeName} products={this.buildProducts()} cartId={this.cartId} customer={this.customer} />\n </app-modal>\n </div>\n )\n }\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
- import { G as GiftbackFinish$1, d as defineCustomElement$1 } from './p-2667d525.js';
1
+ import { G as GiftbackFinish$1, d as defineCustomElement$1 } from './p-5753850f.js';
2
2
 
3
3
  const GiftbackFinish = GiftbackFinish$1;
4
4
  const defineCustomElement = defineCustomElement$1;