crmbonus-component-wake 2.0.59 → 2.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-modal.cjs.entry.js +1 -1
- package/dist/cjs/countdown-timer_4.cjs.entry.js +1 -1
- package/dist/cjs/crm-bonus-form.cjs.entry.js +1 -1
- package/dist/cjs/crm-bonus-note.cjs.entry.js +1 -1
- package/dist/cjs/crm-bonus.cjs.entry.js +6 -3
- package/dist/cjs/crm-bonus.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-button.cjs.entry.js +1 -1
- package/dist/cjs/crm-giftback-form.cjs.entry.js +1 -1
- package/dist/cjs/crmbonus-component-wake.cjs.js +2 -2
- package/dist/cjs/giftback-finish_4.cjs.entry.js +1 -1
- package/dist/cjs/{index-b7babd3d.js → index-e3122e18.js} +41 -6
- package/dist/cjs/index-e3122e18.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/pedido-finalizado.cjs.entry.js +1 -1
- package/dist/cjs/phone-cancel-input.cjs.entry.js +1 -1
- package/dist/cjs/phone-input-mask.cjs.entry.js +1 -1
- package/dist/cjs/phone-input.cjs.entry.js +1 -1
- package/dist/collection/components/crm-bonus/crm-bonus.js +26 -2
- package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
- package/dist/components/app-modal.js +1 -1
- package/dist/components/countdown-timer.js +1 -1
- package/dist/components/crm-bonus-form.js +6 -6
- package/dist/components/crm-bonus-note.js +1 -1
- package/dist/components/crm-bonus.js +17 -14
- package/dist/components/crm-bonus.js.map +1 -1
- package/dist/components/crm-button.js +1 -1
- package/dist/components/crm-giftback-form.js +1 -1
- package/dist/components/giftback-finish.js +1 -1
- package/dist/components/giftback-info.js +1 -1
- package/dist/components/giftback-pin.js +1 -1
- package/dist/components/giftback-progress.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/loading-spinner.js +1 -1
- package/dist/components/name-input.js +1 -1
- package/dist/components/{p-39096a16.js → p-0ca4e1f6.js} +9 -9
- package/dist/components/{p-39096a16.js.map → p-0ca4e1f6.js.map} +1 -1
- package/dist/components/{p-a662c21e.js → p-24d29b6b.js} +2 -2
- package/dist/components/{p-a662c21e.js.map → p-24d29b6b.js.map} +1 -1
- package/dist/components/{p-b4a3a6b1.js → p-2a4df0a2.js} +3 -3
- package/dist/components/{p-b4a3a6b1.js.map → p-2a4df0a2.js.map} +1 -1
- package/dist/components/{p-42b3ecdf.js → p-2db8985c.js} +3 -3
- package/dist/components/{p-42b3ecdf.js.map → p-2db8985c.js.map} +1 -1
- package/dist/components/{p-289746ae.js → p-5f330088.js} +3 -3
- package/dist/components/{p-289746ae.js.map → p-5f330088.js.map} +1 -1
- package/dist/components/{p-9451863e.js → p-8bc69d9b.js} +2 -2
- package/dist/components/{p-9451863e.js.map → p-8bc69d9b.js.map} +1 -1
- package/dist/components/{p-d980defa.js → p-b289b82d.js} +41 -6
- package/dist/components/p-b289b82d.js.map +1 -0
- package/dist/components/{p-697ad499.js → p-bfe98629.js} +2 -2
- package/dist/components/{p-697ad499.js.map → p-bfe98629.js.map} +1 -1
- package/dist/components/{p-9a1a1346.js → p-c1d19bba.js} +5 -5
- package/dist/components/{p-9a1a1346.js.map → p-c1d19bba.js.map} +1 -1
- package/dist/components/{p-4b8c0f24.js → p-c2358b51.js} +3 -3
- package/dist/components/{p-4b8c0f24.js.map → p-c2358b51.js.map} +1 -1
- package/dist/components/{p-2f1ab7c1.js → p-c933623f.js} +2 -2
- package/dist/components/{p-2f1ab7c1.js.map → p-c933623f.js.map} +1 -1
- package/dist/components/{p-fcded764.js → p-c95d6c01.js} +2 -2
- package/dist/components/{p-fcded764.js.map → p-c95d6c01.js.map} +1 -1
- package/dist/components/{p-d36f79db.js → p-e957883c.js} +5 -5
- package/dist/components/{p-d36f79db.js.map → p-e957883c.js.map} +1 -1
- package/dist/components/pedido-finalizado.js +1 -1
- package/dist/components/phone-cancel-input.js +3 -3
- package/dist/components/phone-form.js +1 -1
- package/dist/components/phone-input-mask.js +1 -1
- package/dist/components/phone-input.js +3 -3
- package/dist/components/pin-form.js +1 -1
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -1
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
- package/dist/crmbonus-component-wake/{p-ccedd998.entry.js → p-0152eebc.entry.js} +2 -2
- package/dist/crmbonus-component-wake/{p-1b576638.entry.js → p-3e01eee6.entry.js} +2 -2
- package/dist/crmbonus-component-wake/{p-b76bc8b0.entry.js → p-450423b5.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-45c0296c.js +3 -0
- package/dist/{components/p-d980defa.js.map → crmbonus-component-wake/p-45c0296c.js.map} +1 -1
- package/dist/crmbonus-component-wake/{p-5cc2263b.entry.js → p-5d209c28.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-6a281930.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-6a281930.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-1a8fa499.entry.js → p-9901d9e2.entry.js} +2 -2
- package/dist/crmbonus-component-wake/{p-dc393e47.entry.js → p-a950d747.entry.js} +2 -2
- package/dist/crmbonus-component-wake/{p-3e961e9f.entry.js → p-b7103956.entry.js} +2 -2
- package/dist/crmbonus-component-wake/{p-16b4ec37.entry.js → p-c00e02a8.entry.js} +2 -2
- package/dist/crmbonus-component-wake/{p-7db39512.entry.js → p-d44969be.entry.js} +2 -2
- package/dist/crmbonus-component-wake/{p-db613cd0.entry.js → p-d6314a45.entry.js} +2 -2
- package/dist/crmbonus-component-wake/{p-5f8da192.entry.js → p-d95bd37f.entry.js} +2 -2
- package/dist/crmbonus-component-wake/{p-b8d492f5.entry.js → p-da97c793.entry.js} +2 -2
- package/dist/esm/app-modal.entry.js +1 -1
- package/dist/esm/countdown-timer_4.entry.js +1 -1
- package/dist/esm/crm-bonus-form.entry.js +1 -1
- package/dist/esm/crm-bonus-note.entry.js +1 -1
- package/dist/esm/crm-bonus.entry.js +6 -3
- package/dist/esm/crm-bonus.entry.js.map +1 -1
- package/dist/esm/crm-button.entry.js +1 -1
- package/dist/esm/crm-giftback-form.entry.js +1 -1
- package/dist/esm/crmbonus-component-wake.js +3 -3
- package/dist/esm/giftback-finish_4.entry.js +1 -1
- package/dist/esm/{index-5010d0a3.js → index-c477a8b3.js} +41 -6
- package/dist/esm/index-c477a8b3.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loading-spinner.entry.js +1 -1
- package/dist/esm/pedido-finalizado.entry.js +1 -1
- package/dist/esm/phone-cancel-input.entry.js +1 -1
- package/dist/esm/phone-input-mask.entry.js +1 -1
- package/dist/esm/phone-input.entry.js +1 -1
- package/dist/types/components/crm-bonus/crm-bonus.d.ts +1 -0
- package/dist/types/components.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/index-b7babd3d.js.map +0 -1
- package/dist/crmbonus-component-wake/p-4a7c3241.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-4a7c3241.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-a19d8144.js +0 -3
- package/dist/crmbonus-component-wake/p-a19d8144.js.map +0 -1
- package/dist/esm/index-5010d0a3.js.map +0 -1
- /package/dist/crmbonus-component-wake/{p-ccedd998.entry.js.map → p-0152eebc.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-1b576638.entry.js.map → p-3e01eee6.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-b76bc8b0.entry.js.map → p-450423b5.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-5cc2263b.entry.js.map → p-5d209c28.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-1a8fa499.entry.js.map → p-9901d9e2.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-dc393e47.entry.js.map → p-a950d747.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-3e961e9f.entry.js.map → p-b7103956.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-16b4ec37.entry.js.map → p-c00e02a8.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-7db39512.entry.js.map → p-d44969be.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-db613cd0.entry.js.map → p-d6314a45.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-5f8da192.entry.js.map → p-d95bd37f.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-b8d492f5.entry.js.map → p-da97c793.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,h as i}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,h as i}from"./p-45c0296c.js";const t="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBVcGxvYWRlZCB0bzogU1ZHIFJlcG8sIHd3dy5zdmdyZXBvLmNvbSwgR2VuZXJhdG9yOiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiANCgkgdmlld0JveD0iMCAwIDUwIDUwIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxjaXJjbGUgc3R5bGU9ImZpbGw6IzI1QUU4ODsiIGN4PSIyNSIgY3k9IjI1IiByPSIyNSIvPg0KPHBvbHlsaW5lIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiNGRkZGRkY7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwOyIgcG9pbnRzPSINCgkzOCwxNSAyMiwzMyAxMiwyNSAiLz4NCjwvc3ZnPg==";const n=".message-finish{align-content:center;text-align:center}.message-finish p{color:#777676;font-size:xx-large;font-family:sans-serif}";const o=n;const a=class{constructor(i){e(this,i)}render(){return i("div",{key:"b2db01665e3e19659c35a8c912742352bca4a1ae",class:"message-finish"},i("img",{key:"0cb6d72a9bb696cf16ee38255cb2d5d6170e5ff1",src:t,width:80}),i("p",{key:"489dd5b09d20ff2140be375c1e234d5bf9671622"},"Legal! O Bônus será aplicado na sua compra."))}};a.style=o;const c=":host{display:block;font-family:Arial, sans-serif}.form-container-pin{display:flex;flex-direction:column;align-items:center}.pin-container{display:flex;gap:10px;margin:26px 0}input{width:58px;height:40px;font-size:18px;text-align:center;border:1px solid #ccc;border-radius:5px}button{padding:10px 20px;border:none;border-radius:5px;cursor:pointer}.success{color:green;margin-top:10px}.button{top:50%;background-color:#6c6c7e;color:#fff;border:none;border-radius:10px;padding:15px;min-height:30px;min-width:120px;font-size:20px;cursor:pointer}.button-cancel{top:50%;background-color:#ffffff;color:#1e1c1c;border:1px solid gray;border-radius:10px;padding:10px;min-height:30px;min-width:120px;font-size:19px;cursor:pointer}.footer-button{display:flex;justify-content:space-between;width:100%}";const s=c;const d=class{constructor(i){e(this,i);this.sent=undefined;this.validate=undefined;this.cancel=undefined;this.pin=["","","",""];this.isVerified=false;this.loading=false}handleInput(e,i){const t=e.target;const n=t.value.slice(0,1);this.pin[i]=n;if(n&&i<this.pin.length-1){const e=t.nextElementSibling;e===null||e===void 0?void 0:e.focus()}this.pin=[...this.pin]}validatePin(){this.validate(this.pin.join(""))}verifyPin(){const e=this.pin.join("");if(e==="9999"){this.isVerified=true}}render(){return i("div",{key:"6a91db0c8c2d522fcd7c0c3a9249711cedea8263",class:"form-container-pin"},i("div",{key:"9a894eda70decb59549c0b0418e38b8cc64c3e91"},i("p",{key:"0eea92e1f7a121cf7435fb8855d74da71b3a8435"},"Insira o PIN de 4 dígitos enviado por SMS."),i("div",{key:"c574ba350400555e6bfc16f995b5c122bc3b7cd5",class:"pin-container"},this.pin.map(((e,t)=>i("input",{type:"text",maxLength:1,value:this.pin[t],onInput:e=>this.handleInput(e,t)}))))),i("div",{key:"b904758b7a26c79a1fb87e9b93f3c986c98ec318",class:"footer-button"},i("button",{key:"31a4f91fca0c3d5a47c4eedb7d2a47ee8184b882",class:"button-cancel",disabled:this.loading,onClick:()=>this.cancel()},"Cancelar"),i("button",{key:"d5a1a344d7cd6ae8c113ea43f35512b75d6c01c9",class:`button ${this.loading?"disabled":""} `,disabled:this.loading,onClick:()=>this.validatePin()},!this.loading?"Enviar":i("loading-spinner",{size:"15px",color:"#fff"}))))}};d.style=s;const r=":host{display:flex;font-family:Arial, sans-serif;border-radius:10px;padding:16px;max-width:100%;flex-direction:column}.giftback-container{display:flex;flex-direction:column}.giftback-container p{font-size:medium}h3{margin:0 0 10px;font-size:18px}p{margin:5px 0;font-size:14px;align-self:start}.validity{font-size:12px;color:#888}.progress-container{display:flex;align-items:center;margin:10px 0}progress-container span{font-size:12px;color:#666}input[type='range']{flex:1;margin:0 10px;appearance:none;background-color:#ccc;height:6px;border-radius:3px;outline:none;cursor:pointer}input[type='range']::-webkit-slider-thumb{appearance:none;width:14px;height:14px;border-radius:50%;background-color:#555;cursor:pointer}.remaining{font-weight:bold;font-size:14px;color:#333}.button{top:50%;background-color:#6c6c7e;color:#fff;border:none;border-radius:10px;padding:10px;min-height:30px;min-width:120px;font-size:19px;cursor:pointer}.button-cancel{top:50%;background-color:#ffffff;color:#1e1c1c;border:1px solid gray;border-radius:10px;padding:10px;min-height:30px;min-width:120px;font-size:19px;cursor:pointer}.disabled{opacity:0.6;cursor:not-allowed}.footer-button-giftback{display:flex;justify-content:space-between;margin-top:14px}";const b=r;const l=class{constructor(i){e(this,i);this.usedValue=0;this.loading=false;this.bonus={totalBonus:0,cartId:"",minimumPurchase:0,bonusBalance:0,calculatedValue:0,firstValidityDate:""};this.reserve=undefined;this.cancel=undefined}componentWillLoad(){this.usedValue=parseFloat(this.bonus.bonusBalance.toString())}handleSliderChange(e){const i=e.target;this.usedValue=parseFloat(i.value)}async handleReserve(e){this.reserve(e)}render(){const e=this.bonus.minimumPurchase-this.bonus.totalValue;return i("div",{key:"a5e02f60ab5e081341582ea0b1cfaa05583a22c2",class:"giftback-container"},i("p",{key:"12eddb011e6a6beda91a1bc937fcacdb891b12a5"},"Você possui até ",i("strong",{key:"eb6018fe44106dd2a9928d4efe77dbd17180e3d3"},"R$ ",this.bonus.totalBonus.toFixed(2))," de Giftback nessa compra!"),i("p",{key:"065028af79e33d565c82bd55ea2245e3562617e8",class:"validity"},"Válido até: ",new Date(this.bonus.firstValidityDate).toLocaleDateString("pt-Br")),i("p",{key:"1ed8896f6301c2c70fb7232190a2c68bc82e5f07"},"Você está utilizando ",i("strong",{key:"e2019caa7c7697f73021416632ca884097e21abe"},"R$ ",this.usedValue.toFixed(2))," nessa compra"),i("div",{key:"b0257ef4d99c4009f23a4d9fae52b42d2ef41209",class:"progress-container"},i("span",{key:"bb0d1abe791dfcab30e87fea8eb025a9f3787be0"},"R$ 0"),i("input",{key:"a4220c65f24d68b56ccf522a46c0bd3d007c9ed6",disabled:true,type:"range",min:"0",step:"0.01",max:this.bonus.totalBonus,value:this.usedValue,onInput:e=>this.handleSliderChange(e)}),i("span",{key:"c216b57ffdd2a3613f05db327aad395f1f2e1285"},"R$ ",this.bonus.totalBonus.toFixed(2))),i("p",{key:"7a5dc6a68801da2c09a33f3cdb6cf82e521be581",class:"remaining"},"Faltam ",i("strong",{key:"9c20b260d4a95887844aa038e0f74180fff5c1eb"},"R$ ",e>0?e.toFixed(2):Number(0).toFixed(2))," para utilizar o valor total do Giftback."),i("div",{key:"d99639afcac1ea180ad414ca923391f99f3d5296",class:"footer-button-giftback"},i("button",{key:"4c1bdd2ea2ecd5037d1c29b6af31c3163fffe84a",class:"button-cancel",disabled:this.loading,onClick:()=>this.cancel()},"Cancelar"),i("button",{key:"77fc073d28272334d51ab7073e34654509c0ac26",class:`button ${this.loading?"disabled":""} `,disabled:this.loading,onClick:()=>this.handleReserve(this.usedValue)},!this.loading?"Aplicar":i("loading-spinner",{size:"10px",color:"#fff"}))))}};l.style=b;const f=".bc-form-control{display:block;width:90%;height:24px;padding:7px 18px;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}.bc-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}.bc-btn-process{background:#00162e;border-color:#00162e;width:30%;color:#fff}.bc-footer-btn{display:flex;justify-content:end;margin:11px}.name-container{font-weight:bold;color:#494545}button{padding:10px 20px;background-color:#ddd;border:none;border-radius:5px;cursor:pointer}button:hover{background-color:#bbb}.success{color:green;margin-top:10px}.button{top:50%;background-color:#6c6c7e;color:#fff;border:none;border-radius:10px;padding:11px;min-width:120px;font-size:20px;cursor:pointer}.button-cancel{top:50%;background-color:#ffffff;color:#1e1c1c;border:1px solid gray;border-radius:10px;padding:10px;min-height:30px;min-width:120px;font-size:19px;cursor:pointer}.footer-button{display:flex;justify-content:space-between;width:97%;margin-top:14px}";const p=f;const u=class{constructor(i){e(this,i);this.value=undefined;this.loading=undefined;this.applyName=undefined;this.cancel=undefined;this.newValue=undefined;this.message=undefined}handleChangeName(e){this.newValue=e.target.value}handleSetName(e){if(!e){this.message="Informe seu nome";return}this.applyName(e)}render(){return i("div",{key:"dc6b958c6cfb83af8275cf4ff47b1ece5f8f6d93",class:"name-container"},i("p",{key:"d9c1105b6aab09acbd970a001735b58eb5104d9b"},"Seu Nome:"),i("input",{key:"f562d5e2b1b626245abb5260ad1e197fd9a60e43",class:"bc-form-control",type:"text",value:this.value,onChange:e=>this.handleChangeName(e)}),i("p",{key:"980d915607979ee8ae8873a2fe17998c46d1ae64"},this.message),i("div",{key:"b4e75bbb6ee5c6f53e27722ffad3c6e1b9ae6d7f",class:"footer-button"},i("button",{key:"c421fbbe0d0bcf38e057afeb86f864ebb39f9fc8",class:"button-cancel",disabled:this.loading,onClick:()=>this.cancel()},"Cancelar"),i("button",{key:"17d357d3de919698efab46febb5c1ad97c398c77",class:`button ${this.loading?"disabled":""} `,disabled:this.loading,onClick:()=>this.handleSetName(this.newValue)},!this.loading?"Continua":i("loading-spinner",{size:"15px",color:"#fff"}))))}};u.style=p;export{a as giftback_finish,d as giftback_pin,l as giftback_progress,u as name_input};
|
2
|
+
//# sourceMappingURL=p-5d209c28.entry.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as t,h as s}from"./p-45c0296c.js";import{C as i}from"./p-8655e19b.js";import{S as e}from"./p-a561251a.js";import{i as n}from"./p-fb505488.js";const o=".container-button.sc-crm-bonus{cursor:pointer;padding:5px 5px 5px 14px}.section-crm.sc-crm-bonus{border:1px solid #dbd4d4;text-align:-webkit-center;margin-bottom:20px}.section-cart-crm.sc-crm-bonus{margin-top:10px}.section-cart-crm.sc-crm-bonus p.sc-crm-bonus{padding:0;margin:0px 0px 0px 15px}.button.sc-crm-bonus{top:50%;background-color:#6c6c7e;color:#fff;border:none;padding:15px;min-height:30px;min-width:120px;font-size:20px;cursor:pointer;margin-left:10px;height:70px}.form-container.sc-crm-bonus{width:97%;display:flex;justify-content:space-around}.btn.sc-crm-bonus{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:0px}.form-container.sc-crm-bonus .btnCrm.sc-crm-bonus{background:#00162e;border-color:#00162e;width:30%;color:#fff}.message-alert.sc-crm-bonus{font-family:sans-serif;color:#df4d4d;margin-top:5px}";const a=o;const r=class{constructor(s){t(this,s);this.crmBonusService=i.getInstance();this.showModal=false;this.userId=undefined;this.storeName=undefined;this.productsInString=undefined;this.cartId=undefined;this.products=undefined;this.customer={birthDate:"",document:"",name:"",phone:""};this.loading=false;this.message=undefined;this.phone=undefined;this.canCancel=false;this.amountCancel=undefined;this.sent=undefined;this.session=undefined}async resetBonus(){console.log("[BONUS RESETADO]!!!!!")}watchProducts(t,s){console.log("[NEW VALUE PRODUCTS]",t);console.log("[OLD VALUE PRODUCTS]",s)}async componentWillLoad(){n.changeLanguage(n.language);await this.loadSession();await this.loadConfigStore();await this.handleLoad()}async loadConfigStore(){await this.crmBonusService.getCustomization(this.storeName)}async handleLoad(){try{if(this.userId){this.customer=await this.crmBonusService.getCustomer(this.userId,this.storeName)}const t=localStorage.getItem(this.cartId);if(t){this.canCancel=true;this.amountCancel=t}}catch(t){console.log("info customer")}this.buildAndGetProducts()}async loadSession(){this.session=await this.crmBonusService.getToken(this.storeName);setTimeout((()=>{this.loadSession()}),15e5)}async buildAndGetProducts(){const t=`bc-products:${this.cartId}`;const s=localStorage.getItem(t);if(!s){localStorage.setItem(t,this.productsInString)}const i=JSON.parse(this.productsInString);const e=JSON.parse(localStorage.getItem(t));const n=[];for(const t of i){const[s]=e.filter((s=>s.ProdutoVarianteId==t.ProdutoVarianteId));if(s){n.push(Object.assign(Object.assign({},t),{PrecoPor:s.PrecoPor}))}else{n.push(t)}}this.products=n}async sendPin(t){var s,i;this.loading=true;this.message="";try{const s=t.replace(/\D/g,"");this.phone=Number(s);this.sent=await this.crmBonusService.sendPin(this.phone,this.customer.name,this.storeName);await this.crmBonusRef.setStep(e.STEP_PIN);this.showModal=true}catch(t){this.message=(i=(s=t===null||t===void 0?void 0:t.response)===null||s===void 0?void 0:s.data)===null||i===void 0?void 0:i.message}finally{this.loading=false}}async sendPinName(t){var s,i;this.loading=true;this.message="";try{this.customer.name=t;this.sent=await this.crmBonusService.sendPin(this.phone,this.customer.name,this.storeName);await this.crmBonusRef.setStep(e.STEP_PIN);this.showModal=true}catch(t){this.message=(i=(s=t===null||t===void 0?void 0:t.response)===null||s===void 0?void 0:s.data)===null||i===void 0?void 0:i.message}finally{this.loading=false}}buildProducts(){return this.products.map((t=>({sku:t.SKU,value:t.PrecoPor*t.Quantidade,productVariantId:t.ProdutoVarianteId.toString(),quantity:t.Quantidade})))}handleCloseModal(){this.showModal=false}save(t){localStorage.setItem(this.cartId,t.toString());this.canCancel=true;this.amountCancel=t.toString()}async cancel(){this.message="";this.loading=true;try{await this.crmBonusService.cancel(this.cartId);this.canCancel=false;localStorage.removeItem(this.cartId)}catch(t){this.message="Não consegui cancelar o bônus, tente novamente!"}finally{this.loading=false}}async handleSendPin(t){this.message="";if(!t){this.message="Informe seu telefone";return}this.customer.phone=t;const s=t.replace(/\D/g,"");this.phone=Number(s);if(this.customer.name){return this.sendPin(t)}await this.crmBonusRef.setStep(e.STEP_NAME);this.showModal=true}render(){return s("crm-giftback-form",{key:"e130940e3f6484fb715139063ee0f0aa001197ef",storeName:this.storeName,products:this.buildProducts(),cartId:this.cartId,customer:this.customer})}static get assetsDirs(){return["assets"]}static get watchers(){return{productsInString:["watchProducts"]}}};r.style=a;export{r as crm_bonus};
|
2
|
+
//# sourceMappingURL=p-6a281930.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["crmBonusCss","CrmBonusStyle0","CrmBonus","this","crmBonusService","CrmBonusService","getInstance","birthDate","document","name","phone","resetBonus","console","log","watchProducts","newValue","oldValue","componentWillLoad","i18next","changeLanguage","language","loadSession","loadConfigStore","handleLoad","getCustomization","storeName","userId","customer","getCustomer","amount","localStorage","getItem","cartId","canCancel","amountCancel","error","buildAndGetProducts","session","getToken","setTimeout","key","cache_products","setItem","productsInString","productsInCart","JSON","parse","products_in_cache","products","product_cart","pro","filter","p","ProdutoVarianteId","push","Object","assign","PrecoPor","sendPin","loading","message","_phone","replace","Number","sent","crmBonusRef","setStep","StepFormEnum","STEP_PIN","showModal","_b","_a","response","data","sendPinName","customerName","buildProducts","map","product","sku","SKU","value","Quantidade","productVariantId","toString","quantity","handleCloseModal","save","cancel","removeItem","handleSendPin","STEP_NAME","render","h"],"sources":["src/components/crm-bonus/crm-bonus.css?tag=crm-bonus&encapsulation=scoped","src/components/crm-bonus/crm-bonus.tsx"],"sourcesContent":["\n.container-button {\n /* max-width: 100%; */\n cursor: pointer;\n padding: 5px 5px 5px 14px;\n /* display: flex; */\n}\n\n/* padding: 0 15px 15px;\nborder: 1px solid #ddd;\nmargin-bottom: 20px; */\n\n.section-crm {\n border: 1px solid #dbd4d4;\n /* min-height: 50px; */\n text-align: -webkit-center;\n margin-bottom: 20px;\n}\n\n.section-cart-crm {\n margin-top: 10px;\n}\n\n.section-cart-crm p {\n padding: 0;\n margin: 0px 0px 0px 15px;\n}\n\n.button {\n top: 50%;\n background-color: #6c6c7e;\n color: #fff;\n border: none;\n /* border-radius: 10px; */\n padding: 15px;\n min-height: 30px;\n min-width: 120px;\n font-size: 20px;\n cursor: pointer;\n margin-left: 10px;\n height: 70px;\n}\n\n.form-container {\n width: 97%;\n display: flex;\n justify-content: space-around;\n}\n\n\n.btn {\n display: inline-block;\n padding: 6px 12px;\n margin-bottom: 0;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.42857143;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 0px;\n}\n\n.form-container .btnCrm {\n background: #00162e;\n border-color: #00162e;\n width: 30%;\n color: #fff;\n}\n\n.message-alert {\n font-family: sans-serif;\n color: #df4d4d;\n margin-top: 5px;\n}","import { Component, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { IProduct, IProductWake, ICustomer } from '../../dto/validate.pin.bonus';\nimport { CrmBonusService } from '../../services/crmbonus.service';\nimport { IPinSent } from '../../components';\nimport { StepFormEnum } from '../../contants';\n\nimport i18next from '../../i18n/i18n'\n\n@Component({\n tag: 'crm-bonus',\n styleUrl: 'crm-bonus.css',\n scoped: true,\n assetsDirs: ['assets']\n})\nexport class CrmBonus {\n\n private crmBonusService: CrmBonusService = CrmBonusService.getInstance();\n\n private crmBonusRef: 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() amountCancel: string;\n @State() sent: IPinSent;\n\n @State() session: string;\n\n @Method()\n async resetBonus() {\n console.log('[BONUS RESETADO]!!!!!');\n }\n\n\n @Watch(\"productsInString\")\n watchProducts(newValue: string, oldValue: string) {\n\n console.log('[NEW VALUE PRODUCTS]', newValue);\n console.log('[OLD VALUE PRODUCTS]', oldValue);\n\n }\n\n async componentWillLoad() {\n i18next.changeLanguage(i18next.language);\n\n await this.loadSession();\n await this.loadConfigStore()\n await this.handleLoad();\n }\n\n async loadConfigStore() {\n await this.crmBonusService.getCustomization(this.storeName);\n }\n\n async handleLoad() {\n try {\n if (this.userId) {\n this.customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);\n // this.phone = Number(this.customer.phone)\n }\n\n const amount = localStorage.getItem(this.cartId);\n\n if (amount) {\n this.canCancel = true;\n this.amountCancel = amount;\n }\n\n } catch (error) {\n console.log('info customer')\n }\n \n this.buildAndGetProducts();\n }\n\n\n async loadSession() {\n this.session = await this.crmBonusService.getToken(this.storeName);\n\n setTimeout(() => {\n this.loadSession()\n }, 1500000)\n\n }\n\n async buildAndGetProducts() {\n const key = `bc-products:${this.cartId}`;\n const cache_products = localStorage.getItem(key)\n\n if (!cache_products) {\n localStorage.setItem(key, this.productsInString);\n }\n\n const productsInCart = JSON.parse(this.productsInString);\n const products_in_cache = JSON.parse(localStorage.getItem(key));\n\n const products: Array<IProductWake> = []\n\n for (const product_cart of productsInCart) {\n\n const [pro] = products_in_cache.filter(p => p.ProdutoVarianteId == product_cart.ProdutoVarianteId)\n\n if (pro) {\n products.push({\n ...product_cart,\n PrecoPor: pro.PrecoPor\n })\n } else {\n products.push(product_cart)\n }\n \n }\n\n this.products = products; //cache_products ? JSON.parse(cache_products) : JSON.parse(this.productsInString);\n\n }\n\n public async sendPin(phone: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n\n this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.storeName);;\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n public async sendPinName(customerName: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n this.customer.name = customerName;\n\n this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.storeName);;\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n buildProducts(): IProduct[] {\n return this.products.map(product => ({ sku: product.SKU, value: (product.PrecoPor * product.Quantidade), productVariantId: product.ProdutoVarianteId.toString(), quantity: product.Quantidade }))\n }\n\n handleCloseModal() {\n this.showModal = false;\n }\n\n save(amount: number) {\n localStorage.setItem(this.cartId, amount.toString());\n this.canCancel = true;\n this.amountCancel = amount.toString()\n }\n\n async cancel() {\n this.message = \"\";\n this.loading = true;\n try {\n await this.crmBonusService.cancel(this.cartId);\n this.canCancel = false;\n\n localStorage.removeItem(this.cartId);\n } catch (error) {\n this.message = \"Não consegui cancelar o bônus, tente novamente!\"\n } finally {\n this.loading = false;\n }\n }\n\n async handleSendPin(phone: string) {\n this.message = \"\"\n if (!phone) {\n this.message = \"Informe seu telefone\";\n return;\n }\n\n this.customer.phone = phone;\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n\n if (this.customer.name) {\n return this.sendPin(phone)\n }\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_NAME);\n this.showModal = true;\n }\n\n render() {\n\n return (\n <crm-giftback-form \n storeName={this.storeName}\n products={this.buildProducts()}\n cartId={this.cartId}\n customer={this.customer}\n />\n // <div class=\"section-cart-crm\">\n // <p class=\"text-left fbits-responsive-carrinho-desconto-texto\">Giftback</p>\n // <div class=\"container-button\">\n // {/* <img src={logo} onClick={() => (this.showModal = true)} /> */}\n // {\n // this.canCancel ? <phone-cancel-input value={this.amountCancel} sendPin={() => { this.cancel() }} loading={this.loading} />\n // : <phone-input value={this.customer.phone} sendPin={(phone) => { this.handleSendPin(phone) }} loading={this.loading} />\n // }\n // </div>\n // <p class=\"message-alert\" >{this.message}</p>\n // <app-modal\n // isOpen={this.showModal}\n // modalTitle={`Giftback`}\n // onModalClosed={() => (this.showModal = false)}\n // >\n // <crm-bonus-form\n // loadingModal={this.loading}\n // saveStore={(amount: number) => this.save(amount)}\n // ref={ref => this.crmBonusRef = ref}\n // sent={this.sent}\n // phone={this.phone}\n // cancel={() => this.handleCloseModal()}\n // storeName={this.storeName}\n // products={this.buildProducts()}\n // cartId={this.cartId} customer={this.customer}\n // handleCustomerName={(name: string) => this.sendPinName(name)}\n // />\n // </app-modal>\n // </div>\n )\n }\n}\n"],"mappings":"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E,IAAKC,MAAQH,EAAQrB,SAAWqB,EAAQI,WAAaC,iBAAkBL,EAAQzB,kBAAkB+B,WAAYC,SAAUP,EAAQI,c,CAGrL,gBAAAI,GACEnF,KAAKkE,UAAY,K,CAGnB,IAAAkB,CAAK1D,GACHC,aAAaY,QAAQvC,KAAK6B,OAAQH,EAAOuD,YACzCjF,KAAK8B,UAAY,KACjB9B,KAAK+B,aAAeL,EAAOuD,U,CAG7B,YAAMI,GACJrF,KAAKyD,QAAU,GACfzD,KAAKwD,QAAU,KACf,UACQxD,KAAKC,gBAAgBoF,OAAOrF,KAAK6B,QACvC7B,KAAK8B,UAAY,MAEjBH,aAAa2D,WAAWtF,KAAK6B,O,CAC7B,MAAOG,GACPhC,KAAKyD,QAAU,iD,SAEfzD,KAAKwD,QAAU,K,EAInB,mBAAM+B,CAAchF,GAClBP,KAAKyD,QAAU,GACf,IAAKlD,EAAO,CACVP,KAAKyD,QAAU,uBACf,M,CAGFzD,KAAKwB,SAASjB,MAAQA,EACtB,MAAMmD,EAASnD,EAAMoD,QAAQ,MAAO,IACpC3D,KAAKO,MAAQqD,OAAOF,GAEpB,GAAI1D,KAAKwB,SAASlB,KAAM,CACtB,OAAON,KAAKuD,QAAQhD,E,OAGhBP,KAAK8D,YAAYC,QAAQC,EAAawB,WAC5CxF,KAAKkE,UAAY,I,CAGnB,MAAAuB,GAEE,OACEC,EAAA,qBAAArD,IAAA,2CACEf,UAAWtB,KAAKsB,UAChBuB,SAAU7C,KAAKyE,gBACf5C,OAAQ7B,KAAK6B,OACbL,SAAUxB,KAAKwB,U","ignoreList":[]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,h as t}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,h as t}from"./p-45c0296c.js";import{g as i}from"./p-75ba7b9a.js";import{C as a}from"./p-8655e19b.js";const o="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIFVwbG9hZGVkIHRvOiBTVkcgUmVwbywgd3d3LnN2Z3JlcG8uY29tLCBHZW5lcmF0b3I6IFNWRyBSZXBvIE1peGVyIFRvb2xzIC0tPg0KPHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS13aWR0aD0iMiIvPg0KPHBhdGggZD0iTTE1IDkuOTQ3MjhDMTQuNSA5LjMgMTMuOCA4LjUgMTIgOC41QzEwLjIgOC41IDkgOS41MTM5MyA5IDkuOTQ3MjhDOSAxMC4zODA2IDkuMDY3ODYgMTAuOTI3NyAxMCAxMS41QzEwLjc1MjIgMTEuOTYxOCAxMi42Njg0IDEyLjA0MzkgMTMuNSAxMi41QzE0LjY3OSAxMy4xNDY3IDE0Ljg0OTcgMTMuODIwMiAxNC44NDk3IDE0LjA1MjJDMTQuODQ5NyAxNC42ODM3IDEzLjQxNzUgMTUuNDg1MiAxMiAxNS41QzEwLjUzNiAxNS41MTUzIDkuNSAxNC43IDkgMTQuMDUyMiIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPg0KPHBhdGggZD0iTTEyIDdWMTciIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPg0KPC9zdmc+";const n=".note-container{border:1px solid #dddddd;padding:0 15px 15px;margin:0 0 26px 0px}.note-container hr{border:1px solid #CCC}.note-container .back-cart{display:flex;text-align:center}.note-header{display:flex;align-items:baseline;justify-content:space-between}.note-title{font-weight:700;text-align:left;display:flex;gap:6px;align-items:center;margin-top:11px;color:#000}.note-description{font-family:Arial;color:#6d6d5f;padding:0;margin:0 auto}.back-cart{font-size:.9em;color:#27272A;text-decoration:none;cursor:pointer;margin-top:11px}.note-description-2{color:var(--crm-scheme-fg-main-inverse, #262626);font-family:Roboto;font-size:var(--crm-font-size-body-lg, 16px);font-style:normal;font-weight:var(--crm-font-weight-body-bold, 400);line-height:var(--crm-line-height-body-md, 20px);letter-spacing:var(--crm-letter-spacing-title-md, 0px);margin-top:11px;color:#000}.note-description-not{font-size:16px}";const d=n;const c=class{constructor(t){e(this,t);this.cartId=undefined;this.storename=undefined;this.url=undefined;this.config=undefined}componentWillLoad(){this.upadateCheckToFreteAndGetUrl()}upadateCheckToFreteAndGetUrl(){this.config=i(this.storename);const e=document.getElementsByName("forma-envio");e.forEach((e=>{e.checked=false}));this.url=window.location.origin}handleHide(){const e=localStorage.getItem(this.cartId);return!!e}getAmount(){const e=localStorage.getItem(this.cartId);console.log("amount",e);return Number(e).toFixed(2).replace(".",",")||"0,00"}async handleCancel(){await a.getInstance().cancelBonus(this.cartId,this.storename);window.location.href=this.url}render(){return t("div",{key:"df9c70a5a069bfed7fcbef3882c1079c78019e78"},t("div",{key:"eaa13fccbcabf194da631436d0e7234d9e4ae06c",class:"note-container"},t("div",{key:"145f6d3bba36e423064a46169bba209f74f484d4",class:"note-header"},t("p",{key:"e76de748da7e54f26510de70899720ba7df58cf1",class:"note-title"},t("img",{key:"7960d99a6637b0617f79ccc9de2345269dfb9ee3",src:o,width:23}),this.config.giftbackTitle),this.handleHide()&&t("p",{key:"35edb4072af1f0d7ba304527bff18833c7170d71",class:"back-cart",onClick:()=>this.handleCancel()},"Editar")),t("hr",{key:"0bc7dd65524c3a40f25a18b291a976f44050b848"}),this.handleHide()&&t("p",{key:"2bbd572fac93b989655b0a500575fb52e3cf0fb6",class:"note-description-2"},this.config.giftbackTitle||"Giftback"," aplicado ao pedido: ",t("strong",{key:"9fde20de64bd6a73d47d62d6162c7268d18c9f47"},"R$ ",this.getAmount())),!this.handleHide()&&t("p",{key:"99460d211c0a37480f87a4937540883a43928bbf",class:"note-description-not"},"Não há ",this.config.giftbackTitle||"Giftback"," disponível para essa compra")))}};c.style=d;export{c as crm_bonus_note};
|
2
|
+
//# sourceMappingURL=p-9901d9e2.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,c as d,h as a}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,c as d,h as a}from"./p-45c0296c.js";const o=".modal-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);display:none;justify-content:center;align-items:center;z-index:1000}.modal-backdrop.visible{display:flex}.modal{background:white;border-radius:8px;padding:1rem;max-width:500px;width:90%;box-shadow:0 2px 10px rgba(0, 0, 0, 0.3)}.modal-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;margin-bottom:1rem}.close-button{background:none;border:none;font-size:1.5rem;cursor:pointer}.modal-body{}";const s=o;const t=class{constructor(a){e(this,a);this.modalClosed=d(this,"modalClosed",7);this.isOpen=false;this.modalTitle=undefined}closeModal(){this.modalClosed.emit()}render(){return a("div",{key:"9ed1b6a6f09b9127119d661abbd447e047c49efb",class:`modal-backdrop ${this.isOpen?"visible":""}`},a("div",{key:"dd4f515ea7949d5a470655234a9c0b48194bba1b",class:"modal"},a("div",{key:"387a930782a4a00073eda969acc86bed39fc8151",class:"modal-header"},a("h3",{key:"38f041a1e3483490a4de85f1c0a223c47c664517"},this.modalTitle),a("button",{key:"98998678ec65fd96ad6284d8602ccdf5fd723e26",class:"close-button",onClick:()=>this.closeModal()},"×")),a("div",{key:"845f631054557e79b4ef0521b6eefd41eda93eeb",class:"modal-body"},a("slot",{key:"2d5539938e7c4175eede394bddeb841e371912fa"}))))}};t.style=s;export{t as app_modal};
|
2
|
+
//# sourceMappingURL=p-a950d747.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as o,h as t}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as o,h as t}from"./p-45c0296c.js";import{M as e}from"./p-a561251a.js";const s="*{margin:0;padding:0;box-sizing:border-box}.phone{display:block;width:100%;height:24px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:0px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);-webkit-transition:border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s}.phone-input-form{width:246px;height:48px;padding:13px 16px 13px 16px;border:1px solid #CCCCCC}.crm-erro-msg{color:#E11D48;font-size:12px;font-weight:500;margin-top:11px}";const i=s;const n=class{constructor(t){o(this,t);this.phone="";this.message="";this.initialValue=undefined;this.disabled=undefined}componentWillLoad(){this.phone=this.initialValue}formatPhone(o){const t=o.replace(/\D/g,"");const e=t.match(/^(\d{0,2})(\d{0,5})(\d{0,4})$/);if(!e)return o;const s=e[1]?`(${e[1]}`:"";const i=e[2]?`) ${e[2]}`:"";const n=e[3]?` ${e[3]}`:"";return`${s}${i}${n}`}handleInput(o){const t=o.target;this.phone=this.formatPhone(t.value);if(!this.validatePhoneNumber(t.value)){this.message=e}else{this.message=""}}validatePhoneNumber(o){if(o.length<15){return true}const t=/^\(\d{2}\) \d{5} \d{4}$/;return t.test(o)}async getPhone(){return this.phone}render(){return t("div",{key:"a01b0eda3879ca00258fa9bc739155aa8a57741c"},t("input",{key:"6b134121f4990b8e46c4efa88c4f801764832f04",disabled:this.disabled,id:"phone",type:"text",class:"phone-input-form",value:this.phone,onInput:o=>this.handleInput(o),placeholder:"(12) 94567 8910"}),t("p",{key:"b193d31cf07633a05459f0e356755153afaa8534",class:"crm-erro-msg"},this.message))}};n.style=i;export{n as phone_input_mask};
|
2
|
+
//# sourceMappingURL=p-b7103956.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as t,h as i}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as t,h as i}from"./p-45c0296c.js";import{C as s,g as e}from"./p-8655e19b.js";import{S as o}from"./p-a561251a.js";import{g as n}from"./p-75ba7b9a.js";import{i as a}from"./p-fb505488.js";const h="*{margin:0;padding:0;box-sizing:border-box}:host{--crmfont-sizebodymd:14px;--crmline-heightbodymd:20px;--crmletter-spacingtitle-md:0px}.container-message{font-family:Roboto;font-size:var(--crmfont-sizebodymd);font-weight:400;line-height:var(--crmline-heightbodymd);letter-spacing:var(--crmletter-spacingtitle-md);text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none}.crm-container-form{display:flex;flex-direction:column;justify-content:space-around;height:auto;padding:20px 24px 20px 24px;border:1px solid #CCCC;writing-mode:horizontal-tb;gap:16px;border-top:1px solid #ccc !important;border-bottom:1px solid #ccc !important}.crm-phone-form{display:flex;flex-direction:column;height:100%;gap:16px}.crm-subtitle{font-size:14px;color:var(--crm-btn)}.crm-title{font-weight:700;line-height:20px;color:#262626;font-size:16px}.crm-message-info{color:#619013;font-weight:500;font-size:12px}.crm-message-error{color:#E11D48;font-weight:500;font-size:12px}";const r=h;const c=class{constructor(i){t(this,i);this.crmBonusService=s.getInstance();this.storeName=undefined;this.cartId=undefined;this.products=undefined;this.customer=undefined;this.value=undefined;this.loading=false;this.message=undefined;this.phone=undefined;this.pinInfo=undefined;this.step=o.STEP_PHONE;this.bonus=undefined;this.sucess="";this.error="";this.config=undefined;this.hasApplyBonus=false}async handleSendPin(t){this.message="";if(!t){this.message="Informe seu telefone";return}this.phone=t;this.sendPin()}componentWillLoad(){this.sucess="";this.error="";this.config=n(this.storeName);this.handleApply()}handleApply(){const t=localStorage.getItem(e(this.cartId));if(t){this.bonus=JSON.parse(t);this.step=o.STEP_RESERVE}}convertStringToNumber(){const t=this.phone.replace(/\D/g,"");return Number(t)}async sendPin(){var t,i;this.loading=true;this.message="";this.sucess="";this.error="";try{const t=this.convertStringToNumber();this.pinInfo=await this.crmBonusService.sendPin(t,"",this.storeName);this.step=o.STEP_PIN}catch(s){this.message=(i=(t=s===null||s===void 0?void 0:s.response)===null||t===void 0?void 0:t.data)===null||i===void 0?void 0:i.message}finally{this.loading=false}}changePhone(){this.sucess="";this.error="";this.step=o.STEP_PHONE}async validateBonus(t){var i,s;if(this.sucess){this.step=o.STEP_RESERVE;return}this.loading=true;this.sucess="";this.error="";const e={pin:t,cellphone:this.phone.toString(),storeId:this.pinInfo.storeId.toString(),userId:this.pinInfo.userId.toString(),checkoutId:this.cartId,checkoutProducts:this.products,name:null,storeName:this.storeName};try{this.bonus=await this.crmBonusService.validatePinBonus(e);if(!this.bonus.hasBonus){this.loading=false;this.step=o.STEP_NO_BONUS;return}this.sucess="Código validado com sucesso!"}catch(t){const e=(s=(i=t===null||t===void 0?void 0:t.response)===null||i===void 0?void 0:i.data)===null||s===void 0?void 0:s.message;if(e.includes("Pin")){this.error="Código inválido!"}else{this.error=e;this.step=o.STEP_NO_BONUS}}finally{this.loading=false}}handleCancel(){this.cancel()}async cancel(){this.message="";this.loading=true;try{await this.crmBonusService.cancel(this.cartId);this.save(0)}catch(t){this.message="Não consegui cancelar o bônus, tente novamente!"}finally{this.loading=false}}async reserveApply(t){this.loading=true;this.message="";try{await this.reserve(t);this.save(t);localStorage.setItem(e(this.cartId),JSON.stringify(this.bonus))}catch(t){this.message="ocorreu um error ao solicitar a aplicação do bonus! tente novamente";this.step=o.STEP_NO_BONUS;localStorage.removeItem(this.cartId)}finally{this.loading=false}}save(t){localStorage.setItem(this.cartId,t.toString())}async reserve(t){await this.crmBonusService.reserve({redeemedBonus:t,cartId:this.cartId,ticket:this.cartId,grossValue:Number(this.bonus.totalValue),storeName:this.storeName,storeId:this.bonus.storeId.toString(),userId:this.bonus.userId})}render(){return i("div",{key:"6e1606eaec511132df6a1d7aba66103182eac58b",class:"crm-container-form fbits-responsive-carrinho-desconto"},i("label",{key:"a246f11b8e9aa1eeb2147f1178d17e0912b0d751",class:"crm-title"},this.config.giftbackTitle),this.step===o.STEP_PHONE&&i("phone-form",{key:"15bd1a8b01675711cc2fec08620555e207796586",value:this.customer.phone,config:this.config,loading:this.loading,handlerSubmit:t=>this.handleSendPin(t)}),this.step===o.STEP_PIN&&i("pin-form",{key:"5bc81c0dd0473da58c760c95c046ecdd915ae74a",config:this.config,phone:this.phone,cancel:()=>this.changePhone(),resend:()=>this.sendPin(),validate:t=>this.validateBonus(t),loading:this.loading},this.sucess&&i("p",{key:"07c778c2c9a69deb51f4b33db1e0c806d2bd8d19",class:"crm-message-info"},this.sucess),this.error&&i("p",{key:"84fad905cfc281915a3534f52a09a284eab2fd89",class:"crm-message-error"},this.error)),this.step===o.STEP_RESERVE&&i("giftback-info",{key:"2f76ecd6109afd43259835bb18d6a934fafabed7",loading:this.loading,cancel:()=>this.handleCancel(),bonus:this.bonus,reserve:t=>this.reserveApply(t)}),this.step===o.STEP_NO_BONUS&&i("div",{key:"1bc84ded4f32d6ad8a9a0658f4be120e16126a47",class:"container-message"},a.t("noGiftback",{storename:this.config.giftbackTitle})))}};c.style=r;export{c as crm_giftback_form};
|
2
|
+
//# sourceMappingURL=p-c00e02a8.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as t,h as e,H as s}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as t,h as e,H as s}from"./p-45c0296c.js";import{C as i}from"./p-8655e19b.js";import{S as a}from"./p-a561251a.js";const n=".form-container{width:100%;display:flex;justify-content:center;justify-content:space-around}.disabled{opacity:0.6;cursor:not-allowed}.message-error{color:#d11111;font-weight:bold;font-family:Arial;font-size:small;margin-left:16px}";const h=n;const d=class{constructor(e){t(this,e);this.crmBonusService=i.getInstance();this.storeName=undefined;this.cartId=undefined;this.products=undefined;this.customer={phone:"",birthDate:"",document:"",name:""};this.sent=undefined;this.stepNext=undefined;this.phone=undefined;this.loadingModal=undefined;this.saveStore=undefined;this.cancel=undefined;this.handleCustomerName=undefined;this.loading=false;this.step=a.STEP_NAME;this.message=undefined;this.bonus=undefined}async setStep(t){this.step=t}async validateBonus(t){var e,s;this.loading=true;this.message="";const i={pin:t,cellphone:this.phone.toString(),storeId:this.sent.storeId.toString(),userId:this.sent.userId.toString(),checkoutId:this.cartId,checkoutProducts:this.products,name:null,storeName:this.storeName};try{this.bonus=await this.crmBonusService.validatePinBonus(i);this.step=a.STEP_RESERVE}catch(t){this.message=(s=(e=t===null||t===void 0?void 0:t.response)===null||e===void 0?void 0:e.data)===null||s===void 0?void 0:s.message}finally{this.loading=false}}async reserveApply(t){this.loading=true;this.message="";try{await this.reserve(t);this.step=a.STEP_APPLY;this.saveStore(t)}catch(t){this.message="ocorreu um error ao solicitar a aplicação do bonus! tente novamente"}finally{this.loading=false}}async reserve(t){await this.crmBonusService.reserve({redeemedBonus:t,cartId:this.cartId,ticket:this.cartId,grossValue:Number(this.bonus.totalValue),storeName:this.storeName,storeId:this.bonus.storeId.toString(),userId:this.bonus.userId})}handleCancel(){this.step=a.STEP_PHONE;this.cancel()}render(){return e(s,{key:"56bef07243aafe1abb78fdfd38922801b84c269b"},this.step==a.STEP_NAME&&e("name-input",{key:"685df95ea0cd693f9a62893798464834524f5168",loading:this.loadingModal,value:this.customer.name,applyName:t=>this.handleCustomerName(t)}),this.step===a.STEP_PIN&&e("giftback-pin",{key:"af82b751ed04382498e25614276ac08d5cade07a",cancel:()=>this.handleCancel(),sent:this.sent,validate:t=>this.validateBonus(t),loading:this.loading}),this.step===a.STEP_RESERVE&&e("giftback-progress",{key:"1b493c06bf11bc7596d672fcec789a9f93573751",loading:this.loading,cancel:()=>this.handleCancel(),bonus:this.bonus,reserve:t=>this.reserveApply(t)}),this.step===a.STEP_APPLY&&e("giftback-finish",{key:"272438aa4dbc8bb1ef9fdb45d3c2cc657d41ef4a"}),e("p",{key:"a3a0e8a1be44d65b1edd34e28956d1b34b732fef",class:"message-error"},this.message))}};d.style=h;export{d as crm_bonus_form};
|
2
|
+
//# sourceMappingURL=p-d44969be.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,h as t,H as i}from"./p-a19d8144.js";import{i as o}from"./p-fb505488.js";const a=class{constructor(t){e(this,t);this.downtime=undefined;this.counter=30}componentWillLoad(){this.intervalId=setInterval((()=>{if(this.counter>0){this.counter--}else{clearInterval(this.intervalId);this.downtime()}}),1e3)}disconnectedCallback(){clearInterval(this.intervalId)}render(){return t("label",{key:"6313656b73bec34e3e4e5099c2bd7633e025588e"},this.counter,"s")}};const n=":host{--text-color:#6D6D5F}.giftback-container{display:flex;flex-direction:column;gap:14px}h3{font-size:1.2rem;margin-bottom:8px;color:#333}.container-description p{font-size:14px;font-weight:400}p{font-size:12px;color:#000}.value-display h2{color:#6D6D5F;font-size:1.6rem;margin:16px 0}input[type='range']{width:100%;margin:12px 0;-webkit-appearance:none;background:#ddd;height:4px;border-radius:4px;outline:none;padding:3px}input[type='range']::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;background:var(--text-color);border-radius:50%;cursor:pointer}.options{margin:0px 0;display:flex;gap:10px;flex-direction:column}.options label{display:block;margin:0px 0;font-size:0.9rem;color:#333}.options input[type='radio']{margin-right:8px;height:16px;width:16px}.options input[type='radio']{appearance:none;-webkit-appearance:none;margin-right:8px;width:16px;height:16px;border:2px solid #ddd;border-radius:50%;background-color:#fff;cursor:pointer;transition:all 0.3s;padding:0px}.options input[type='radio']:checked{border-color:#000;background-color:#FAFAFA;border:4px solid #000}.info-box{background-color:#f9f9f9;border:1px solid #e0e0e0;border-radius:4px;padding:8px;font-size:14px;color:#262626;line-height:20px}.info-icon{font-size:0.9rem;cursor:pointer;color:#888}h3{font-size:1.2rem;margin-bottom:8px;color:#333}.slider-wrapper{position:relative;margin:21px 0px 0px 0px}.slider{width:100%;-webkit-appearance:none;background:#ddd;height:4px;border-radius:2px;outline:none}.slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;background:var(--text-color);border-radius:50%;cursor:pointer}.slider-value{position:absolute;top:-30px;font-size:16px;font-weight:700;color:var(--text-color);transform:translateX(-50%);white-space:nowrap;margin-left:23px}";const r=n;const s=class{constructor(t){e(this,t);this.usedValue=0;this.selectedOption="none";this.loading=false;this.bonus={totalBonus:52,cartId:"",minimumPurchase:6e3,bonusBalance:25,calculatedValue:25,firstValidityDate:"",totalValue:200};this.reserve=undefined;this.cancel=undefined;this.sliderPosition=50}componentWillLoad(){this.usedValue=parseFloat(this.bonus.bonusBalance.toString());this.buildPositionSlider(0,this.bonus.totalBonus);this.selectedOption=localStorage.getItem("bc:used")}handleSliderChange(e){const t=e.target;this.usedValue=parseFloat(t.value);this.buildPositionSlider(parseFloat(t.min),parseFloat(t.max))}buildPositionSlider(e,t){const i=(this.usedValue-e)/(t-e)*100;this.sliderPosition=i}async handleOptionChange(e){this.selectedOption=e;localStorage.setItem("bc:used",e);switch(this.selectedOption){case"use":await this.reserve(this.usedValue);break;case"dontUse":await this.cancel();break}}render(){const e=this.bonus.minimumPurchase-this.bonus.totalValue;const i=o.t("giftDescription",{amount:`${this.bonus.totalBonus.toFixed(2).replace(".",",")}`,custom_name:"Giftback"});return t("div",{key:"aa5d49a4086181b9dbef64b8c518a02032f78589",class:"giftback-container"},t("div",{key:"4472776339ccd19bf069680b234bfd5a2f1a1c06",class:"container-description"},t("p",{key:"a423fdad390f3fe982401ad77d3eb4e1d50b8c31",innerHTML:i})),t("div",{key:"786d40a55dbe607e3861f22540f372e59804791e",class:"slider-wrapper"},t("div",{key:"228464696ff66eda5e6d41c06a6c6d1819fd89a9",class:"slider-value",style:{left:`calc(${this.sliderPosition}% - 20px)`}},"R$ ",this.usedValue.toFixed(2).replace(".",",")),t("input",{key:"9af42bf35195868281069976b11d576e1336efab",disabled:true,type:"range",min:"0",max:this.bonus.totalBonus,value:this.usedValue,class:"slider",step:"0.01",onInput:e=>this.handleSliderChange(e),style:{background:`linear-gradient(to right, #6D6D5F ${this.sliderPosition}%, #ddd ${this.sliderPosition}%)`}})),t("p",{key:"b14d9b6ce990f697bdd870008def3fb1cb283925"},"Adicione ",t("strong",{key:"94a17d86c483a22c621b4e1ee8a64694e742f8ab"},"R$ ",e<0?"0,00":e.toFixed(2).replace(".",","))," ao carrinho para atingir o valor máximo!"),t("div",{key:"6cf5ac9fb9b3472c184350d493c7066d870760b2",class:"options"},t("label",{key:"eaf67ab7de4ebe9c861dfc0f565935ac26d2a381"},t("input",{key:"83145e475de7657510bc1ebe2afeaa39b388824a",type:"radio",name:"giftbackOption",value:"use",checked:this.selectedOption==="use",onChange:()=>this.handleOptionChange("use")}),"Usar o meu Giftback"),t("label",{key:"1aab34dc451aaedd5f61d90e73d8ff1b22ca561a"},t("input",{key:"99cdc43abba27433a0abda7083c54718381fd890",type:"radio",name:"giftbackOption",value:"dontUse",checked:this.selectedOption==="dontUse",onChange:()=>this.handleOptionChange("dontUse")}),"Não usar o meu Giftback")),t("div",{key:"6af6b2c739411adfac20cdae80f0f6e9c98ca472",class:"info-box"},"O Giftback será aplicado na próxima etapa."))}};s.style=r;const c="*{margin:0;padding:0;box-sizing:border-box}:host{--crmfont-sizebodymd:14px;--crmline-heightbodymd:20px;--crmletter-spacingtitle-md:0px}.container-message{font-family:Roboto;font-size:var(--crmfont-sizebodymd);font-weight:400;line-height:var(--crmline-heightbodymd);letter-spacing:var(--crmletter-spacingtitle-md);text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none}.crm-container-form{display:flex;flex-direction:column;justify-content:space-around;height:auto;padding:20px 24px 20px 24px;border:1px solid #CCCC;writing-mode:horizontal-tb;gap:16px;border-top:1px solid #ccc !important;border-bottom:1px solid #ccc !important}.crm-phone-form{display:flex;flex-direction:column;height:100%;gap:16px}.crm-subtitle{font-size:14px;color:var(--crm-btn)}.crm-title{font-weight:700;line-height:20px;color:#262626;font-size:16px}.crm-message-info{color:#619013;font-weight:500;font-size:12px}.crm-message-error{color:#E11D48;font-weight:500;font-size:12px}";const d=c;const p=class{constructor(t){e(this,t);this.value=undefined;this.loading=undefined;this.handlerSubmit=undefined;this.config=undefined}async handlePhone(){const e=await this.phoneInputMask.getPhone();await this.handlerSubmit(e)}render(){var e;return t(i,{key:"a1fa8f1b45d663be5a434ac12af569100ad05f99",class:"crm-phone-form"},t("label",{key:"b374c22ba75e76f482379a7bfc1d1c202e72d9a9",class:"crm-subtitle"},"Digite o seu celular para verificar se há desconto disponível nessa compra"),t("phone-input-mask",{key:"f0816190a397e74a9afb6fc3fe90ee3b00eab3be",initialValue:this.value,ref:e=>this.phoneInputMask=e}),t("crm-button",{key:"864a2c0365f1695fb88a2ccdee75b5341ab634f7",txtBtn:((e=this.config)===null||e===void 0?void 0:e.btnApplyBonusLabel)||"Avançar",loading:this.loading,handleClick:()=>this.handlePhone()}))}};p.style=d;const l=":host{display:block;font-family:Arial, sans-serif}.form-container-pin{display:flex;flex-direction:column;align-items:center}.pin-container{display:flex;justify-content:start;gap:10px}input{width:40px;height:48px;font-size:14px;text-align:center;border:1px solid #ccc;border-radius:5px}button{padding:10px 20px;background-color:#ddd;border:none;border-radius:5px;cursor:pointer}.success{color:green;margin-top:10px}.button{top:50%;background-color:#6c6c7e;color:#fff;border:none;border-radius:10px;padding:15px;min-height:30px;min-width:120px;font-size:20px;cursor:pointer}.button-cancel{top:50%;background-color:#ffffff;color:#1e1c1c;border:1px solid gray;border-radius:10px;padding:10px;min-height:30px;min-width:120px;font-size:19px;cursor:pointer}.crm-description{font-size:14px;width:100%;display:flex;gap:9px}.crm-description a{font-weight:bold;cursor:pointer;text-decoration:underline}.crm-description div{display:flex;gap:5px}";const f=l;const h="*{margin:0;padding:0;box-sizing:border-box}:host{--crmfont-sizebodymd:14px;--crmline-heightbodymd:20px;--crmletter-spacingtitle-md:0px}.container-message{font-family:Roboto;font-size:var(--crmfont-sizebodymd);font-weight:400;line-height:var(--crmline-heightbodymd);letter-spacing:var(--crmletter-spacingtitle-md);text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none}.crm-container-form{display:flex;flex-direction:column;justify-content:space-around;height:auto;padding:20px 24px 20px 24px;border:1px solid #CCCC;writing-mode:horizontal-tb;gap:16px;border-top:1px solid #ccc !important;border-bottom:1px solid #ccc !important}.crm-phone-form{display:flex;flex-direction:column;height:100%;gap:16px}.crm-subtitle{font-size:14px;color:var(--crm-btn)}.crm-title{font-weight:700;line-height:20px;color:#262626;font-size:16px}.crm-message-info{color:#619013;font-weight:500;font-size:12px}.crm-message-error{color:#E11D48;font-weight:500;font-size:12px}";const b=h;const m=class{constructor(t){e(this,t);this.validate=undefined;this.cancel=undefined;this.resend=undefined;this.sent=undefined;this.loading=false;this.phone=undefined;this.config=undefined;this.pin=["","","",""];this.isVerified=false;this.canResend=false}componentWillLoad(){this.canResend=false}handleInput(e,t){const i=e.target;const o=i.value.slice(0,1);this.pin[t]=o;if(o&&t<this.pin.length-1){const e=i.nextElementSibling;e===null||e===void 0?void 0:e.focus()}this.pin=[...this.pin]}validatePin(){this.validate(this.pin.join(""))}verifyPin(){const e=this.pin.join("");if(e==="9999"){this.isVerified=true}}handleTimeout(){this.canResend=true}async handleResend(){await this.resend();this.canResend=false;this.pin=["","","",""]}render(){var e;return t("div",{key:"eafa00ec4ec2e33aa0941b5610945c40aefdff20",class:"crm-phone-form"},t("label",{key:"f41c3d596d49b0d4beab6202f98c85dce4fa9dfa",class:"crm-subtitle"},o.t("pin-sutitle")," ",t("strong",{key:"1e8fe82b99200bb74b3148fd3bd2e6f3d6a9f71b"},"+55 ",this.phone)),t("div",{key:"a847274eb88b0e8a740a54a32ec5bd6026b3a83d",class:"pin-container"},this.pin.map(((e,i)=>t("input",{type:"text",maxLength:1,value:this.pin[i],onInput:e=>this.handleInput(e,i)})))),t("slot",{key:"6b2ab8941fc6c2c0e596744be76ad4060d090d4f"}),t("p",{key:"f81fe581fdfac99298ec7edcebbc0808142647aa",class:"crm-description"}," Não recebeu?",!this.canResend&&t("label",{key:"c818707aec856895a92c640170b45bcb0911261a"}," Reenviar em ",t("countdown-timer",{key:"9b32c89194a419eb86d2ffe36a370c5961a0a1e1",downtime:()=>this.handleTimeout()})," "),this.canResend&&t("div",{key:"a070efe17ff6a7f6f8b2c696e67f17d1f5c8058d"},t("a",{key:"6ed4cf4abe25b38eaa5844049b6161f18adf332f",onClick:()=>this.handleResend()},"Reenviar"),t("a",{key:"f0179af1cace207e8c6e06de9d977e0ea5062dfe",onClick:()=>this.cancel()},"Trocar número"))),t("crm-button",{key:"3352c222bc9b15b5b3e3fd6bfeedf01e1e0b0e76",txtBtn:((e=this.config)===null||e===void 0?void 0:e.btnApplyBonusLabel)||"Avançar",loading:this.loading,handleClick:()=>this.validatePin()}))}};m.style=f+b;export{a as countdown_timer,s as giftback_info,p as phone_form,m as pin_form};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,h as t,H as i}from"./p-45c0296c.js";import{i as o}from"./p-fb505488.js";const a=class{constructor(t){e(this,t);this.downtime=undefined;this.counter=30}componentWillLoad(){this.intervalId=setInterval((()=>{if(this.counter>0){this.counter--}else{clearInterval(this.intervalId);this.downtime()}}),1e3)}disconnectedCallback(){clearInterval(this.intervalId)}render(){return t("label",{key:"6313656b73bec34e3e4e5099c2bd7633e025588e"},this.counter,"s")}};const n=":host{--text-color:#6D6D5F}.giftback-container{display:flex;flex-direction:column;gap:14px}h3{font-size:1.2rem;margin-bottom:8px;color:#333}.container-description p{font-size:14px;font-weight:400}p{font-size:12px;color:#000}.value-display h2{color:#6D6D5F;font-size:1.6rem;margin:16px 0}input[type='range']{width:100%;margin:12px 0;-webkit-appearance:none;background:#ddd;height:4px;border-radius:4px;outline:none;padding:3px}input[type='range']::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;background:var(--text-color);border-radius:50%;cursor:pointer}.options{margin:0px 0;display:flex;gap:10px;flex-direction:column}.options label{display:block;margin:0px 0;font-size:0.9rem;color:#333}.options input[type='radio']{margin-right:8px;height:16px;width:16px}.options input[type='radio']{appearance:none;-webkit-appearance:none;margin-right:8px;width:16px;height:16px;border:2px solid #ddd;border-radius:50%;background-color:#fff;cursor:pointer;transition:all 0.3s;padding:0px}.options input[type='radio']:checked{border-color:#000;background-color:#FAFAFA;border:4px solid #000}.info-box{background-color:#f9f9f9;border:1px solid #e0e0e0;border-radius:4px;padding:8px;font-size:14px;color:#262626;line-height:20px}.info-icon{font-size:0.9rem;cursor:pointer;color:#888}h3{font-size:1.2rem;margin-bottom:8px;color:#333}.slider-wrapper{position:relative;margin:21px 0px 0px 0px}.slider{width:100%;-webkit-appearance:none;background:#ddd;height:4px;border-radius:2px;outline:none}.slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;background:var(--text-color);border-radius:50%;cursor:pointer}.slider-value{position:absolute;top:-30px;font-size:16px;font-weight:700;color:var(--text-color);transform:translateX(-50%);white-space:nowrap;margin-left:23px}";const r=n;const s=class{constructor(t){e(this,t);this.usedValue=0;this.selectedOption="none";this.loading=false;this.bonus={totalBonus:52,cartId:"",minimumPurchase:6e3,bonusBalance:25,calculatedValue:25,firstValidityDate:"",totalValue:200};this.reserve=undefined;this.cancel=undefined;this.sliderPosition=50}componentWillLoad(){this.usedValue=parseFloat(this.bonus.bonusBalance.toString());this.buildPositionSlider(0,this.bonus.totalBonus);this.selectedOption=localStorage.getItem("bc:used")}handleSliderChange(e){const t=e.target;this.usedValue=parseFloat(t.value);this.buildPositionSlider(parseFloat(t.min),parseFloat(t.max))}buildPositionSlider(e,t){const i=(this.usedValue-e)/(t-e)*100;this.sliderPosition=i}async handleOptionChange(e){this.selectedOption=e;localStorage.setItem("bc:used",e);switch(this.selectedOption){case"use":await this.reserve(this.usedValue);break;case"dontUse":await this.cancel();break}}render(){const e=this.bonus.minimumPurchase-this.bonus.totalValue;const i=o.t("giftDescription",{amount:`${this.bonus.totalBonus.toFixed(2).replace(".",",")}`,custom_name:"Giftback"});return t("div",{key:"aa5d49a4086181b9dbef64b8c518a02032f78589",class:"giftback-container"},t("div",{key:"4472776339ccd19bf069680b234bfd5a2f1a1c06",class:"container-description"},t("p",{key:"a423fdad390f3fe982401ad77d3eb4e1d50b8c31",innerHTML:i})),t("div",{key:"786d40a55dbe607e3861f22540f372e59804791e",class:"slider-wrapper"},t("div",{key:"228464696ff66eda5e6d41c06a6c6d1819fd89a9",class:"slider-value",style:{left:`calc(${this.sliderPosition}% - 20px)`}},"R$ ",this.usedValue.toFixed(2).replace(".",",")),t("input",{key:"9af42bf35195868281069976b11d576e1336efab",disabled:true,type:"range",min:"0",max:this.bonus.totalBonus,value:this.usedValue,class:"slider",step:"0.01",onInput:e=>this.handleSliderChange(e),style:{background:`linear-gradient(to right, #6D6D5F ${this.sliderPosition}%, #ddd ${this.sliderPosition}%)`}})),t("p",{key:"b14d9b6ce990f697bdd870008def3fb1cb283925"},"Adicione ",t("strong",{key:"94a17d86c483a22c621b4e1ee8a64694e742f8ab"},"R$ ",e<0?"0,00":e.toFixed(2).replace(".",","))," ao carrinho para atingir o valor máximo!"),t("div",{key:"6cf5ac9fb9b3472c184350d493c7066d870760b2",class:"options"},t("label",{key:"eaf67ab7de4ebe9c861dfc0f565935ac26d2a381"},t("input",{key:"83145e475de7657510bc1ebe2afeaa39b388824a",type:"radio",name:"giftbackOption",value:"use",checked:this.selectedOption==="use",onChange:()=>this.handleOptionChange("use")}),"Usar o meu Giftback"),t("label",{key:"1aab34dc451aaedd5f61d90e73d8ff1b22ca561a"},t("input",{key:"99cdc43abba27433a0abda7083c54718381fd890",type:"radio",name:"giftbackOption",value:"dontUse",checked:this.selectedOption==="dontUse",onChange:()=>this.handleOptionChange("dontUse")}),"Não usar o meu Giftback")),t("div",{key:"6af6b2c739411adfac20cdae80f0f6e9c98ca472",class:"info-box"},"O Giftback será aplicado na próxima etapa."))}};s.style=r;const c="*{margin:0;padding:0;box-sizing:border-box}:host{--crmfont-sizebodymd:14px;--crmline-heightbodymd:20px;--crmletter-spacingtitle-md:0px}.container-message{font-family:Roboto;font-size:var(--crmfont-sizebodymd);font-weight:400;line-height:var(--crmline-heightbodymd);letter-spacing:var(--crmletter-spacingtitle-md);text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none}.crm-container-form{display:flex;flex-direction:column;justify-content:space-around;height:auto;padding:20px 24px 20px 24px;border:1px solid #CCCC;writing-mode:horizontal-tb;gap:16px;border-top:1px solid #ccc !important;border-bottom:1px solid #ccc !important}.crm-phone-form{display:flex;flex-direction:column;height:100%;gap:16px}.crm-subtitle{font-size:14px;color:var(--crm-btn)}.crm-title{font-weight:700;line-height:20px;color:#262626;font-size:16px}.crm-message-info{color:#619013;font-weight:500;font-size:12px}.crm-message-error{color:#E11D48;font-weight:500;font-size:12px}";const d=c;const p=class{constructor(t){e(this,t);this.value=undefined;this.loading=undefined;this.handlerSubmit=undefined;this.config=undefined}async handlePhone(){const e=await this.phoneInputMask.getPhone();await this.handlerSubmit(e)}render(){var e;return t(i,{key:"a1fa8f1b45d663be5a434ac12af569100ad05f99",class:"crm-phone-form"},t("label",{key:"b374c22ba75e76f482379a7bfc1d1c202e72d9a9",class:"crm-subtitle"},"Digite o seu celular para verificar se há desconto disponível nessa compra"),t("phone-input-mask",{key:"f0816190a397e74a9afb6fc3fe90ee3b00eab3be",initialValue:this.value,ref:e=>this.phoneInputMask=e}),t("crm-button",{key:"864a2c0365f1695fb88a2ccdee75b5341ab634f7",txtBtn:((e=this.config)===null||e===void 0?void 0:e.btnApplyBonusLabel)||"Avançar",loading:this.loading,handleClick:()=>this.handlePhone()}))}};p.style=d;const l=":host{display:block;font-family:Arial, sans-serif}.form-container-pin{display:flex;flex-direction:column;align-items:center}.pin-container{display:flex;justify-content:start;gap:10px}input{width:40px;height:48px;font-size:14px;text-align:center;border:1px solid #ccc;border-radius:5px}button{padding:10px 20px;background-color:#ddd;border:none;border-radius:5px;cursor:pointer}.success{color:green;margin-top:10px}.button{top:50%;background-color:#6c6c7e;color:#fff;border:none;border-radius:10px;padding:15px;min-height:30px;min-width:120px;font-size:20px;cursor:pointer}.button-cancel{top:50%;background-color:#ffffff;color:#1e1c1c;border:1px solid gray;border-radius:10px;padding:10px;min-height:30px;min-width:120px;font-size:19px;cursor:pointer}.crm-description{font-size:14px;width:100%;display:flex;gap:9px}.crm-description a{font-weight:bold;cursor:pointer;text-decoration:underline}.crm-description div{display:flex;gap:5px}";const f=l;const h="*{margin:0;padding:0;box-sizing:border-box}:host{--crmfont-sizebodymd:14px;--crmline-heightbodymd:20px;--crmletter-spacingtitle-md:0px}.container-message{font-family:Roboto;font-size:var(--crmfont-sizebodymd);font-weight:400;line-height:var(--crmline-heightbodymd);letter-spacing:var(--crmletter-spacingtitle-md);text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none}.crm-container-form{display:flex;flex-direction:column;justify-content:space-around;height:auto;padding:20px 24px 20px 24px;border:1px solid #CCCC;writing-mode:horizontal-tb;gap:16px;border-top:1px solid #ccc !important;border-bottom:1px solid #ccc !important}.crm-phone-form{display:flex;flex-direction:column;height:100%;gap:16px}.crm-subtitle{font-size:14px;color:var(--crm-btn)}.crm-title{font-weight:700;line-height:20px;color:#262626;font-size:16px}.crm-message-info{color:#619013;font-weight:500;font-size:12px}.crm-message-error{color:#E11D48;font-weight:500;font-size:12px}";const b=h;const m=class{constructor(t){e(this,t);this.validate=undefined;this.cancel=undefined;this.resend=undefined;this.sent=undefined;this.loading=false;this.phone=undefined;this.config=undefined;this.pin=["","","",""];this.isVerified=false;this.canResend=false}componentWillLoad(){this.canResend=false}handleInput(e,t){const i=e.target;const o=i.value.slice(0,1);this.pin[t]=o;if(o&&t<this.pin.length-1){const e=i.nextElementSibling;e===null||e===void 0?void 0:e.focus()}this.pin=[...this.pin]}validatePin(){this.validate(this.pin.join(""))}verifyPin(){const e=this.pin.join("");if(e==="9999"){this.isVerified=true}}handleTimeout(){this.canResend=true}async handleResend(){await this.resend();this.canResend=false;this.pin=["","","",""]}render(){var e;return t("div",{key:"eafa00ec4ec2e33aa0941b5610945c40aefdff20",class:"crm-phone-form"},t("label",{key:"f41c3d596d49b0d4beab6202f98c85dce4fa9dfa",class:"crm-subtitle"},o.t("pin-sutitle")," ",t("strong",{key:"1e8fe82b99200bb74b3148fd3bd2e6f3d6a9f71b"},"+55 ",this.phone)),t("div",{key:"a847274eb88b0e8a740a54a32ec5bd6026b3a83d",class:"pin-container"},this.pin.map(((e,i)=>t("input",{type:"text",maxLength:1,value:this.pin[i],onInput:e=>this.handleInput(e,i)})))),t("slot",{key:"6b2ab8941fc6c2c0e596744be76ad4060d090d4f"}),t("p",{key:"f81fe581fdfac99298ec7edcebbc0808142647aa",class:"crm-description"}," Não recebeu?",!this.canResend&&t("label",{key:"c818707aec856895a92c640170b45bcb0911261a"}," Reenviar em ",t("countdown-timer",{key:"9b32c89194a419eb86d2ffe36a370c5961a0a1e1",downtime:()=>this.handleTimeout()})," "),this.canResend&&t("div",{key:"a070efe17ff6a7f6f8b2c696e67f17d1f5c8058d"},t("a",{key:"6ed4cf4abe25b38eaa5844049b6161f18adf332f",onClick:()=>this.handleResend()},"Reenviar"),t("a",{key:"f0179af1cace207e8c6e06de9d977e0ea5062dfe",onClick:()=>this.cancel()},"Trocar número"))),t("crm-button",{key:"3352c222bc9b15b5b3e3fd6bfeedf01e1e0b0e76",txtBtn:((e=this.config)===null||e===void 0?void 0:e.btnApplyBonusLabel)||"Avançar",loading:this.loading,handleClick:()=>this.validatePin()}))}};m.style=f+b;export{a as countdown_timer,s as giftback_info,p as phone_form,m as pin_form};
|
2
|
+
//# sourceMappingURL=p-d6314a45.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as a,h as e}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as a,h as e}from"./p-45c0296c.js";const i=class{constructor(e){a(this,e);this.sendPin=undefined;this.loading=undefined;this.value=undefined}async validatePhone(){const a=await this.phoneInputMask.getPhone();await this.sendPin(a)}render(){return e("div",{key:"04c879b5671b42602a36a9a88734604fcfa1d1da",class:"form-container"},e("phone-input-mask",{key:"a0ced8d74da25026383eac206bbf45f6fa9482e7",initialValue:`Valor aplicado R$ ${this.value}`,ref:a=>this.phoneInputMask=a,disabled:true}),e("button",{key:"89b08e7af3145068a449fb8e375372c280da7b7a",class:`btn btn-success btnCrm ${this.loading?"disabled":""} `,disabled:this.loading,onClick:()=>this.validatePhone()},!this.loading?"Cancelar":e("loading-spinner",{size:"11px",color:"#fff"})))}};export{i as phone_cancel_input};
|
2
|
+
//# sourceMappingURL=p-d95bd37f.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r,h as s}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r,h as s}from"./p-45c0296c.js";const t=".spinner{display:inline-block;border:4px solid transparent;border-radius:50%;border-top-color:var(--color, #0078d7);animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";const n=t;const e=class{constructor(s){r(this,s);this.size="50px";this.color="#0078d7"}render(){return s("div",{key:"5d3cd866b3ab7f4898ad1142fb39b89c572867d7",class:"spinner",style:{width:this.size,height:this.size,borderColor:`${this.color} transparent transparent transparent`}})}};e.style=n;export{e as loading_spinner};
|
2
|
+
//# sourceMappingURL=p-da97c793.entry.js.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-c477a8b3.js';
|
2
2
|
|
3
3
|
const appModalCss = ".modal-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);display:none;justify-content:center;align-items:center;z-index:1000}.modal-backdrop.visible{display:flex}.modal{background:white;border-radius:8px;padding:1rem;max-width:500px;width:90%;box-shadow:0 2px 10px rgba(0, 0, 0, 0.3)}.modal-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ddd;margin-bottom:1rem}.close-button{background:none;border:none;font-size:1.5rem;cursor:pointer}.modal-body{}";
|
4
4
|
const AppModalStyle0 = appModalCss;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-c477a8b3.js';
|
2
2
|
import { C as CrmBonusService } from './crmbonus.service-5a5e8f29.js';
|
3
3
|
import { S as StepFormEnum } from './index-3c6d4feb.js';
|
4
4
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-c477a8b3.js';
|
2
2
|
import { g as getInfoCustomization } from './info.config.helper-42d9ddf9.js';
|
3
3
|
import { C as CrmBonusService } from './crmbonus.service-5a5e8f29.js';
|
4
4
|
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-c477a8b3.js';
|
2
2
|
import { C as CrmBonusService } from './crmbonus.service-5a5e8f29.js';
|
3
3
|
import { S as StepFormEnum } from './index-3c6d4feb.js';
|
4
4
|
import { i as instance } from './i18n-887a3ef8.js';
|
5
5
|
|
6
|
-
const crmBonusCss = ".container-button{cursor:pointer;padding:5px 5px 5px 14px
|
6
|
+
const crmBonusCss = ".container-button.sc-crm-bonus{cursor:pointer;padding:5px 5px 5px 14px}.section-crm.sc-crm-bonus{border:1px solid #dbd4d4;text-align:-webkit-center;margin-bottom:20px}.section-cart-crm.sc-crm-bonus{margin-top:10px}.section-cart-crm.sc-crm-bonus p.sc-crm-bonus{padding:0;margin:0px 0px 0px 15px}.button.sc-crm-bonus{top:50%;background-color:#6c6c7e;color:#fff;border:none;padding:15px;min-height:30px;min-width:120px;font-size:20px;cursor:pointer;margin-left:10px;height:70px}.form-container.sc-crm-bonus{width:97%;display:flex;justify-content:space-around}.btn.sc-crm-bonus{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:0px}.form-container.sc-crm-bonus .btnCrm.sc-crm-bonus{background:#00162e;border-color:#00162e;width:30%;color:#fff}.message-alert.sc-crm-bonus{font-family:sans-serif;color:#df4d4d;margin-top:5px}";
|
7
7
|
const CrmBonusStyle0 = crmBonusCss;
|
8
8
|
|
9
9
|
const CrmBonus = class {
|
@@ -30,6 +30,9 @@ const CrmBonus = class {
|
|
30
30
|
this.sent = undefined;
|
31
31
|
this.session = undefined;
|
32
32
|
}
|
33
|
+
async resetBonus() {
|
34
|
+
console.log('[BONUS RESETADO]!!!!!');
|
35
|
+
}
|
33
36
|
watchProducts(newValue, oldValue) {
|
34
37
|
console.log('[NEW VALUE PRODUCTS]', newValue);
|
35
38
|
console.log('[OLD VALUE PRODUCTS]', oldValue);
|
@@ -163,7 +166,7 @@ const CrmBonus = class {
|
|
163
166
|
this.showModal = true;
|
164
167
|
}
|
165
168
|
render() {
|
166
|
-
return (h("crm-giftback-form", { key: '
|
169
|
+
return (h("crm-giftback-form", { key: 'e130940e3f6484fb715139063ee0f0aa001197ef', storeName: this.storeName, products: this.buildProducts(), cartId: this.cartId, customer: this.customer })
|
167
170
|
// <div class="section-cart-crm">
|
168
171
|
// <p class="text-left fbits-responsive-carrinho-desconto-texto">Giftback</p>
|
169
172
|
// <div class="container-button">
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"crm-bonus.entry.js","mappings":";;;;;AAAA,MAAM,WAAW,GAAG,y/BAAy/B,CAAC;AAC9gC,uBAAe,WAAW;;MCab,QAAQ;;;QAEX,oBAAe,GAAoB,eAAe,CAAC,WAAW,EAAE,CAAC;yBAI3C,KAAK;;;;;;wBAOJ;YAC7B,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,EAAE;YACR,KAAK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CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAE5B,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;YACtB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;SAC3B;QAED,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QACvD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;KACvB;IAED,MAAM;QAEJ,QACE,0EACE,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,EAC9B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA8BH;KACF;;;;;;;;;;","names":["i18next"],"sources":["src/components/crm-bonus/crm-bonus.css?tag=crm-bonus&encapsulation=shadow","src/components/crm-bonus/crm-bonus.tsx"],"sourcesContent":["\n.container-button {\n /* max-width: 100%; */\n cursor: pointer;\n padding: 5px 5px 5px 14px;\n /* display: flex; */\n}\n\n/* padding: 0 15px 15px;\nborder: 1px solid #ddd;\nmargin-bottom: 20px; */\n\n.section-crm {\n border: 1px solid #dbd4d4;\n /* min-height: 50px; */\n text-align: -webkit-center;\n margin-bottom: 20px;\n}\n\n.section-cart-crm {\n margin-top: 10px;\n}\n\n.section-cart-crm p {\n padding: 0;\n margin: 0px 0px 0px 15px;\n}\n\n.button {\n top: 50%;\n background-color: #6c6c7e;\n color: #fff;\n border: none;\n /* border-radius: 10px; */\n padding: 15px;\n min-height: 30px;\n min-width: 120px;\n font-size: 20px;\n cursor: pointer;\n margin-left: 10px;\n height: 70px;\n}\n\n.form-container {\n width: 97%;\n display: flex;\n justify-content: space-around;\n}\n\n\n.btn {\n display: inline-block;\n padding: 6px 12px;\n margin-bottom: 0;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.42857143;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 0px;\n}\n\n.form-container .btnCrm {\n background: #00162e;\n border-color: #00162e;\n width: 30%;\n color: #fff;\n}\n\n.message-alert {\n font-family: sans-serif;\n color: #df4d4d;\n margin-top: 5px;\n}","import { Component, Prop, State, Watch, h } from '@stencil/core';\nimport { IProduct, IProductWake, ICustomer } from '../../dto/validate.pin.bonus';\nimport { CrmBonusService } from '../../services/crmbonus.service';\nimport { IPinSent } from '../../components';\nimport { StepFormEnum } from '../../contants';\n\nimport i18next from '../../i18n/i18n'\n\n@Component({\n tag: 'crm-bonus',\n styleUrl: 'crm-bonus.css',\n shadow: true,\n assetsDirs: ['assets']\n})\nexport class CrmBonus {\n\n private crmBonusService: CrmBonusService = CrmBonusService.getInstance();\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() amountCancel: string;\n @State() sent: IPinSent;\n\n @State() session: string;\n\n\n @Watch(\"productsInString\")\n watchProducts(newValue: string, oldValue: string) {\n\n console.log('[NEW VALUE PRODUCTS]', newValue);\n console.log('[OLD VALUE PRODUCTS]', oldValue);\n\n }\n\n async componentWillLoad() {\n i18next.changeLanguage(i18next.language);\n\n await this.loadSession();\n await this.loadConfigStore()\n await this.handleLoad();\n }\n\n async loadConfigStore() {\n await this.crmBonusService.getCustomization(this.storeName);\n }\n\n async handleLoad() {\n try {\n if (this.userId) {\n this.customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);\n // this.phone = Number(this.customer.phone)\n }\n\n const amount = localStorage.getItem(this.cartId);\n\n if (amount) {\n this.canCancel = true;\n this.amountCancel = amount;\n }\n\n } catch (error) {\n console.log('info customer')\n }\n \n this.buildAndGetProducts();\n }\n\n\n async loadSession() {\n this.session = await this.crmBonusService.getToken(this.storeName);\n\n setTimeout(() => {\n this.loadSession()\n }, 1500000)\n\n }\n\n async buildAndGetProducts() {\n const key = `bc-products:${this.cartId}`;\n const cache_products = localStorage.getItem(key)\n\n if (!cache_products) {\n localStorage.setItem(key, this.productsInString);\n }\n\n const productsInCart = JSON.parse(this.productsInString);\n const products_in_cache = JSON.parse(localStorage.getItem(key));\n\n const products: Array<IProductWake> = []\n\n for (const product_cart of productsInCart) {\n\n const [pro] = products_in_cache.filter(p => p.ProdutoVarianteId == product_cart.ProdutoVarianteId)\n\n if (pro) {\n products.push({\n ...product_cart,\n PrecoPor: pro.PrecoPor\n })\n } else {\n products.push(product_cart)\n }\n \n }\n\n this.products = products; //cache_products ? JSON.parse(cache_products) : JSON.parse(this.productsInString);\n\n }\n\n public async sendPin(phone: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n\n this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.storeName);;\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n public async sendPinName(customerName: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n this.customer.name = customerName;\n\n this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.storeName);;\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n buildProducts(): IProduct[] {\n return this.products.map(product => ({ sku: product.SKU, value: (product.PrecoPor * product.Quantidade), productVariantId: product.ProdutoVarianteId.toString(), quantity: product.Quantidade }))\n }\n\n handleCloseModal() {\n this.showModal = false;\n }\n\n save(amount: number) {\n localStorage.setItem(this.cartId, amount.toString());\n this.canCancel = true;\n this.amountCancel = amount.toString()\n }\n\n async cancel() {\n this.message = \"\";\n this.loading = true;\n try {\n await this.crmBonusService.cancel(this.cartId);\n this.canCancel = false;\n\n localStorage.removeItem(this.cartId);\n } catch (error) {\n this.message = \"Não consegui cancelar o bônus, tente novamente!\"\n } finally {\n this.loading = false;\n }\n }\n\n async handleSendPin(phone: string) {\n this.message = \"\"\n if (!phone) {\n this.message = \"Informe seu telefone\";\n return;\n }\n\n this.customer.phone = phone;\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n\n if (this.customer.name) {\n return this.sendPin(phone)\n }\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_NAME);\n this.showModal = true;\n }\n\n render() {\n\n return (\n <crm-giftback-form \n storeName={this.storeName}\n products={this.buildProducts()}\n cartId={this.cartId}\n customer={this.customer}\n />\n // <div class=\"section-cart-crm\">\n // <p class=\"text-left fbits-responsive-carrinho-desconto-texto\">Giftback</p>\n // <div class=\"container-button\">\n // {/* <img src={logo} onClick={() => (this.showModal = true)} /> */}\n // {\n // this.canCancel ? <phone-cancel-input value={this.amountCancel} sendPin={() => { this.cancel() }} loading={this.loading} />\n // : <phone-input value={this.customer.phone} sendPin={(phone) => { this.handleSendPin(phone) }} loading={this.loading} />\n // }\n // </div>\n // <p class=\"message-alert\" >{this.message}</p>\n // <app-modal\n // isOpen={this.showModal}\n // modalTitle={`Giftback`}\n // onModalClosed={() => (this.showModal = false)}\n // >\n // <crm-bonus-form\n // loadingModal={this.loading}\n // saveStore={(amount: number) => this.save(amount)}\n // ref={ref => this.crmBonusRef = ref}\n // sent={this.sent}\n // phone={this.phone}\n // cancel={() => this.handleCloseModal()}\n // storeName={this.storeName}\n // products={this.buildProducts()}\n // cartId={this.cartId} customer={this.customer}\n // handleCustomerName={(name: string) => this.sendPinName(name)}\n // />\n // </app-modal>\n // </div>\n )\n }\n}\n"],"version":3}
|
1
|
+
{"file":"crm-bonus.entry.js","mappings":";;;;;AAAA,MAAM,WAAW,GAAG,uoCAAuoC,CAAC;AAC5pC,uBAAe,WAAW;;MCab,QAAQ;;;QAEX,oBAAe,GAAoB,eAAe,CAAC,WAAW,EAAE,CAAC;yBAI3C,KAAK;;;;;;wBAOJ;YAC7B,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,EAAE;YACR,KAAK,EAAE,EAAE;SACV;uBAE2B,KAAK;;;yBAGH,KAAK;;;;;IAOnC,MAAM,UAAU;QACd,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;KACtC;IAID,aAAa,CAAC,QAAgB,EAAE,QAAgB;QAE9C,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC;KAE/C;IAED,MAAM,iBAAiB;QACrBA,QAAO,CAAC,cAAc,CAACA,QAAO,CAAC,QAAQ,CAAC,CAAC;QAEzC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QACzB,MAAM,IAAI,CAAC,eAAe,EAAE,CAAA;QAC5B,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;KACzB;IAED,MAAM,eAAe;QACnB,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KAC7D;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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C,SAAS,GAAG,KAAK,CAAC;YAEvB,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACtC;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,OAAO,GAAG,iDAAiD,CAAA;SACjE;gBAAS;YACR,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;SACtB;KACF;IAED,MAAM,aAAa,CAAC,KAAa;QAC/B,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;QACjB,IAAI,CAAC,KAAK,EAAE;YACV,IAAI,CAAC,OAAO,GAAG,sBAAsB,CAAC;YACtC,OAAO;SACR;QAED,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;QAC5B,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAE5B,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;YACtB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;SAC3B;QAED,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QACvD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;KACvB;IAED,MAAM;QAEJ,QACE,0EACE,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,EAC9B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA8BH;KACF;;;;;;;;;;","names":["i18next"],"sources":["src/components/crm-bonus/crm-bonus.css?tag=crm-bonus&encapsulation=scoped","src/components/crm-bonus/crm-bonus.tsx"],"sourcesContent":["\n.container-button {\n /* max-width: 100%; */\n cursor: pointer;\n padding: 5px 5px 5px 14px;\n /* display: flex; */\n}\n\n/* padding: 0 15px 15px;\nborder: 1px solid #ddd;\nmargin-bottom: 20px; */\n\n.section-crm {\n border: 1px solid #dbd4d4;\n /* min-height: 50px; */\n text-align: -webkit-center;\n margin-bottom: 20px;\n}\n\n.section-cart-crm {\n margin-top: 10px;\n}\n\n.section-cart-crm p {\n padding: 0;\n margin: 0px 0px 0px 15px;\n}\n\n.button {\n top: 50%;\n background-color: #6c6c7e;\n color: #fff;\n border: none;\n /* border-radius: 10px; */\n padding: 15px;\n min-height: 30px;\n min-width: 120px;\n font-size: 20px;\n cursor: pointer;\n margin-left: 10px;\n height: 70px;\n}\n\n.form-container {\n width: 97%;\n display: flex;\n justify-content: space-around;\n}\n\n\n.btn {\n display: inline-block;\n padding: 6px 12px;\n margin-bottom: 0;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.42857143;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 0px;\n}\n\n.form-container .btnCrm {\n background: #00162e;\n border-color: #00162e;\n width: 30%;\n color: #fff;\n}\n\n.message-alert {\n font-family: sans-serif;\n color: #df4d4d;\n margin-top: 5px;\n}","import { Component, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { IProduct, IProductWake, ICustomer } from '../../dto/validate.pin.bonus';\nimport { CrmBonusService } from '../../services/crmbonus.service';\nimport { IPinSent } from '../../components';\nimport { StepFormEnum } from '../../contants';\n\nimport i18next from '../../i18n/i18n'\n\n@Component({\n tag: 'crm-bonus',\n styleUrl: 'crm-bonus.css',\n scoped: true,\n assetsDirs: ['assets']\n})\nexport class CrmBonus {\n\n private crmBonusService: CrmBonusService = CrmBonusService.getInstance();\n\n private crmBonusRef: 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() amountCancel: string;\n @State() sent: IPinSent;\n\n @State() session: string;\n\n @Method()\n async resetBonus() {\n console.log('[BONUS RESETADO]!!!!!');\n }\n\n\n @Watch(\"productsInString\")\n watchProducts(newValue: string, oldValue: string) {\n\n console.log('[NEW VALUE PRODUCTS]', newValue);\n console.log('[OLD VALUE PRODUCTS]', oldValue);\n\n }\n\n async componentWillLoad() {\n i18next.changeLanguage(i18next.language);\n\n await this.loadSession();\n await this.loadConfigStore()\n await this.handleLoad();\n }\n\n async loadConfigStore() {\n await this.crmBonusService.getCustomization(this.storeName);\n }\n\n async handleLoad() {\n try {\n if (this.userId) {\n this.customer = await this.crmBonusService.getCustomer(this.userId, this.storeName);\n // this.phone = Number(this.customer.phone)\n }\n\n const amount = localStorage.getItem(this.cartId);\n\n if (amount) {\n this.canCancel = true;\n this.amountCancel = amount;\n }\n\n } catch (error) {\n console.log('info customer')\n }\n \n this.buildAndGetProducts();\n }\n\n\n async loadSession() {\n this.session = await this.crmBonusService.getToken(this.storeName);\n\n setTimeout(() => {\n this.loadSession()\n }, 1500000)\n\n }\n\n async buildAndGetProducts() {\n const key = `bc-products:${this.cartId}`;\n const cache_products = localStorage.getItem(key)\n\n if (!cache_products) {\n localStorage.setItem(key, this.productsInString);\n }\n\n const productsInCart = JSON.parse(this.productsInString);\n const products_in_cache = JSON.parse(localStorage.getItem(key));\n\n const products: Array<IProductWake> = []\n\n for (const product_cart of productsInCart) {\n\n const [pro] = products_in_cache.filter(p => p.ProdutoVarianteId == product_cart.ProdutoVarianteId)\n\n if (pro) {\n products.push({\n ...product_cart,\n PrecoPor: pro.PrecoPor\n })\n } else {\n products.push(product_cart)\n }\n \n }\n\n this.products = products; //cache_products ? JSON.parse(cache_products) : JSON.parse(this.productsInString);\n\n }\n\n public async sendPin(phone: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n\n this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.storeName);;\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n public async sendPinName(customerName: string) {\n this.loading = true;\n this.message = \"\";\n\n try {\n this.customer.name = customerName;\n\n this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.storeName);;\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_PIN);\n\n this.showModal = true;\n } catch (error) {\n this.message = error?.response?.data?.message\n } finally {\n this.loading = false\n }\n }\n\n buildProducts(): IProduct[] {\n return this.products.map(product => ({ sku: product.SKU, value: (product.PrecoPor * product.Quantidade), productVariantId: product.ProdutoVarianteId.toString(), quantity: product.Quantidade }))\n }\n\n handleCloseModal() {\n this.showModal = false;\n }\n\n save(amount: number) {\n localStorage.setItem(this.cartId, amount.toString());\n this.canCancel = true;\n this.amountCancel = amount.toString()\n }\n\n async cancel() {\n this.message = \"\";\n this.loading = true;\n try {\n await this.crmBonusService.cancel(this.cartId);\n this.canCancel = false;\n\n localStorage.removeItem(this.cartId);\n } catch (error) {\n this.message = \"Não consegui cancelar o bônus, tente novamente!\"\n } finally {\n this.loading = false;\n }\n }\n\n async handleSendPin(phone: string) {\n this.message = \"\"\n if (!phone) {\n this.message = \"Informe seu telefone\";\n return;\n }\n\n this.customer.phone = phone;\n const _phone = phone.replace(/\\D/g, '');\n this.phone = Number(_phone);\n\n if (this.customer.name) {\n return this.sendPin(phone)\n }\n\n await this.crmBonusRef.setStep(StepFormEnum.STEP_NAME);\n this.showModal = true;\n }\n\n render() {\n\n return (\n <crm-giftback-form \n storeName={this.storeName}\n products={this.buildProducts()}\n cartId={this.cartId}\n customer={this.customer}\n />\n // <div class=\"section-cart-crm\">\n // <p class=\"text-left fbits-responsive-carrinho-desconto-texto\">Giftback</p>\n // <div class=\"container-button\">\n // {/* <img src={logo} onClick={() => (this.showModal = true)} /> */}\n // {\n // this.canCancel ? <phone-cancel-input value={this.amountCancel} sendPin={() => { this.cancel() }} loading={this.loading} />\n // : <phone-input value={this.customer.phone} sendPin={(phone) => { this.handleSendPin(phone) }} loading={this.loading} />\n // }\n // </div>\n // <p class=\"message-alert\" >{this.message}</p>\n // <app-modal\n // isOpen={this.showModal}\n // modalTitle={`Giftback`}\n // onModalClosed={() => (this.showModal = false)}\n // >\n // <crm-bonus-form\n // loadingModal={this.loading}\n // saveStore={(amount: number) => this.save(amount)}\n // ref={ref => this.crmBonusRef = ref}\n // sent={this.sent}\n // phone={this.phone}\n // cancel={() => this.handleCloseModal()}\n // storeName={this.storeName}\n // products={this.buildProducts()}\n // cartId={this.cartId} customer={this.customer}\n // handleCustomerName={(name: string) => this.sendPinName(name)}\n // />\n // </app-modal>\n // </div>\n )\n }\n}\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-c477a8b3.js';
|
2
2
|
|
3
3
|
const crmButtonCss = "input,button{margin:0;padding:10px;}.crm-contaner-button{height:auto;width:auto}.crm-button{height:48px;width:246px;border:1px solid #000;padding:14px 20px;background-color:#000;color:#fff;font-size:14px;line-height:20px;font-weight:500;cursor:pointer}";
|
4
4
|
const CrmButtonStyle0 = crmButtonCss;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-c477a8b3.js';
|
2
2
|
import { C as CrmBonusService, g as getKeyReserveByCartId } from './crmbonus.service-5a5e8f29.js';
|
3
3
|
import { S as StepFormEnum } from './index-3c6d4feb.js';
|
4
4
|
import { g as getInfoCustomization } from './info.config.helper-42d9ddf9.js';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
2
|
-
export { s as setNonce } from './index-
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-c477a8b3.js';
|
2
|
+
export { s as setNonce } from './index-c477a8b3.js';
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
4
4
|
|
5
5
|
/*
|
@@ -16,7 +16,7 @@ var patchBrowser = () => {
|
|
16
16
|
|
17
17
|
patchBrowser().then(async (options) => {
|
18
18
|
await globalScripts();
|
19
|
-
return bootstrapLazy([["crm-bonus",[[
|
19
|
+
return bootstrapLazy([["crm-bonus",[[2,"crm-bonus",{"userId":[2,"userid"],"storeName":[8,"storename"],"productsInString":[1,"products"],"cartId":[8,"cartid"],"showModal":[32],"products":[32],"customer":[32],"loading":[32],"message":[32],"phone":[32],"canCancel":[32],"amountCancel":[32],"sent":[32],"session":[32],"resetBonus":[64]},null,{"productsInString":["watchProducts"]}]]],["crm-bonus-form",[[1,"crm-bonus-form",{"storeName":[8,"storename"],"cartId":[8,"cart-id"],"products":[16],"customer":[16],"sent":[16],"stepNext":[2,"step-next"],"phone":[2],"loadingModal":[4,"loading-modal"],"saveStore":[16],"cancel":[16],"handleCustomerName":[16],"loading":[32],"step":[32],"message":[32],"bonus":[32],"setStep":[64]}]]],["phone-cancel-input",[[0,"phone-cancel-input",{"sendPin":[16],"loading":[4],"value":[1]}]]],["phone-input",[[0,"phone-input",{"sendPin":[16],"loading":[4],"value":[1]}]]],["app-modal",[[1,"app-modal",{"isOpen":[516,"is-open"],"modalTitle":[1,"modal-title"]}]]],["crm-bonus-note",[[0,"crm-bonus-note",{"cartId":[8,"cartid"],"storename":[8],"url":[32],"config":[32]}]]],["pedido-finalizado",[[0,"pedido-finalizado",{"cartId":[1,"cartid"],"orderId":[2,"orderid"],"metadadoString":[1,"metadado"]}]]],["crm-button",[[0,"crm-button",{"txtBtn":[1,"txt-btn"],"loading":[4],"handleClick":[16]}]]],["phone-input-mask",[[1,"phone-input-mask",{"initialValue":[1,"initial-value"],"disabled":[4],"phone":[32],"message":[32],"getPhone":[64]}]]],["loading-spinner",[[1,"loading-spinner",{"size":[1],"color":[1]}]]],["countdown-timer_4",[[0,"phone-form",{"value":[1],"loading":[4],"handlerSubmit":[16],"config":[16]}],[1,"pin-form",{"validate":[16],"cancel":[16],"resend":[16],"sent":[16],"loading":[4],"phone":[1],"config":[16],"pin":[32],"isVerified":[32],"canResend":[32]}],[0,"giftback-info",{"loading":[4],"bonus":[16],"reserve":[16],"cancel":[16],"usedValue":[32],"selectedOption":[32],"sliderPosition":[32]}],[1,"countdown-timer",{"downtime":[16],"counter":[32]}]]],["crm-giftback-form",[[0,"crm-giftback-form",{"storeName":[8,"storename"],"cartId":[8,"cart-id"],"products":[16],"customer":[16],"value":[32],"loading":[32],"message":[32],"phone":[32],"pinInfo":[32],"step":[32],"bonus":[32],"sucess":[32],"error":[32],"config":[32],"hasApplyBonus":[32]}]]],["giftback-finish_4",[[1,"giftback-pin",{"sent":[16],"validate":[16],"cancel":[16],"loading":[4],"pin":[32],"isVerified":[32]}],[1,"giftback-progress",{"loading":[4],"bonus":[16],"reserve":[16],"cancel":[16],"usedValue":[32]}],[0,"name-input",{"value":[1],"loading":[4],"applyName":[16],"cancel":[16],"newValue":[32],"message":[32]}],[1,"giftback-finish"]]]], options);
|
20
20
|
});
|
21
21
|
|
22
22
|
//# sourceMappingURL=crmbonus-component-wake.js.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
1
|
+
import { r as registerInstance, h } from './index-c477a8b3.js';
|
2
2
|
|
3
3
|
const successSvgrepoComSvg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBVcGxvYWRlZCB0bzogU1ZHIFJlcG8sIHd3dy5zdmdyZXBvLmNvbSwgR2VuZXJhdG9yOiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiANCgkgdmlld0JveD0iMCAwIDUwIDUwIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxjaXJjbGUgc3R5bGU9ImZpbGw6IzI1QUU4ODsiIGN4PSIyNSIgY3k9IjI1IiByPSIyNSIvPg0KPHBvbHlsaW5lIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiNGRkZGRkY7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwOyIgcG9pbnRzPSINCgkzOCwxNSAyMiwzMyAxMiwyNSAiLz4NCjwvc3ZnPg==';
|
4
4
|
|