crmbonus-component-wake 2.0.112 → 2.0.114
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/crm-bonus-note.cjs.entry.js +8 -4
- package/dist/cjs/crm-bonus-note.cjs.entry.js.map +1 -1
- package/dist/cjs/crm-tooltip_4.cjs.entry.js +6 -5
- package/dist/cjs/crm-tooltip_4.cjs.entry.js.map +1 -1
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js +6 -5
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js.map +1 -1
- package/dist/collection/components/note/crm-bonus-note.js +8 -4
- package/dist/collection/components/note/crm-bonus-note.js.map +1 -1
- package/dist/components/crm-bonus-note.js +8 -4
- package/dist/components/crm-bonus-note.js.map +1 -1
- package/dist/components/crm-bonus.js +2 -2
- package/dist/components/crm-giftback-form.js +1 -1
- package/dist/components/giftback-info.js +1 -1
- package/dist/components/{p-d3ee0c39.js → p-2671d669.js} +7 -6
- package/dist/components/p-2671d669.js.map +1 -0
- package/dist/components/{p-3951010f.js → p-27c0fd26.js} +2 -2
- package/dist/components/{p-3951010f.js.map → p-27c0fd26.js.map} +1 -1
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -1
- package/dist/crmbonus-component-wake/{p-35ea89d8.entry.js → p-7751b4be.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-7751b4be.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-7b7fb354.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-7b7fb354.entry.js.map +1 -0
- package/dist/esm/crm-bonus-note.entry.js +8 -4
- package/dist/esm/crm-bonus-note.entry.js.map +1 -1
- package/dist/esm/crm-tooltip_4.entry.js +6 -5
- package/dist/esm/crm-tooltip_4.entry.js.map +1 -1
- package/dist/types/components/note/crm-bonus-note.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/p-d3ee0c39.js.map +0 -1
- package/dist/crmbonus-component-wake/p-35ea89d8.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-48a8f372.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-48a8f372.entry.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"file":"crm-tooltip.giftback-info.phone-form.pin-form.entry.js","mappings":";;;;;AAAA,MAAM,uBAAuB,GAAG,wvCAAwvC;;ACAxxC,MAAM,aAAa,GAAG,y3BAAy3B,CAAC;AACh5B,yBAAe,aAAa;;MCOf,OAAO;;;;;;IAKhB,MAAM;QACF,QACI,4DAAK,KAAK,EAAC,mCAAmC,IAC1C,4DAAK,GAAG,EAAEA,uBAAI,GAAI,EAClB,6DAAM,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAC,aAAa,IAAE,IAAI,CAAC,IAAI,CAAQ,CAC7D,EACR;KACL;;;;ACpBL,MAAM,eAAe,GAAG,k7DAAk7D,CAAC;AAC38D,2BAAe,eAAe;;MCWjB,YAAY;;;yBACQ,CAAC;8BACI,MAAM;uBAEb,KAAK;qBACC;YAC7B,UAAU,EAAE,CAAC;YACb,MAAM,EAAE,EAAE;YACV,eAAe,EAAE,CAAC;YAClB,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,CAAC;YAClB,iBAAiB,EAAE,EAAE;YACrB,UAAU,EAAE,CAAC;SAChB;;;;8BAKiC,CAAC;mCACI,CAAC;2BAEjB,KAAK;;IAG5B,YAAY;QACR,IAAI,CAAC,WAAW,EAAE,CAAA;KACrB;IAEO,WAAW;QACf,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;KACtD;IAED,iBAAiB;QACb,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;KACxD;I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FormCss"],"sources":["src/assets/svg/info-circle-svgrepo-com.svg","src/components/tooltip/crm-tooltip.css?tag=crm-tooltip","src/components/tooltip/tooltip.tsx","src/components/giftback-form/subcomponents/giftback-info/giftback-info.css?tag=giftback-info","src/components/giftback-form/subcomponents/giftback-info/giftback-info.tsx","src/components/giftback-form/giftback-form.css?tag=phone-form","src/components/giftback-form/subcomponents/phone-form/phone-form.tsx","src/components/giftback-form/subcomponents/pin-form/pin-form.css?tag=pin-form&encapsulation=shadow","src/components/giftback-form/giftback-form.css?tag=pin-form&encapsulation=shadow","src/components/giftback-form/subcomponents/pin-form/pin-form.tsx"],"sourcesContent":["<?xml version=\"1.0\" encoding=\"utf-8\"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->\r\n<svg width=\"800px\" height=\"800px\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n<path d=\"M12 17.75C12.4142 17.75 12.75 17.4142 12.75 17V11C12.75 10.5858 12.4142 10.25 12 10.25C11.5858 10.25 11.25 10.5858 11.25 11V17C11.25 17.4142 11.5858 17.75 12 17.75Z\" fill=\"#1C274C\"/>\r\n<path d=\"M12 7C12.5523 7 13 7.44772 13 8C13 8.55228 12.5523 9 12 9C11.4477 9 11 8.55228 11 8C11 7.44772 11.4477 7 12 7Z\" fill=\"#1C274C\"/>\r\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12ZM12 2.75C6.89137 2.75 2.75 6.89137 2.75 12C2.75 17.1086 6.89137 21.25 12 21.25C17.1086 21.25 21.25 17.1086 21.25 12C21.25 6.89137 17.1086 2.75 12 2.75Z\" fill=\"#1C274C\"/>\r\n</svg>",".crm-tooltip-container {\n display: flex;\n\n & img {\n width: 16px;\n margin-left: 3px;\n position: relative;\n }\n}\n\n.crm-tooltip {\n position: relative;\n display: inline-block;\n}\n\n.crm-tooltip .tooltiptext {\n visibility: hidden;\n background-color: black;\n color: #fff;\n text-align: center;\n padding: 8px 12px;\n border-radius: 0px;\n position: absolute;\n z-index: 1;\n min-width: 271px;\n top: 100%;\n left: 50%;\n margin-left: -238px;\n}\n\n@container (max-width: 410px) {\n .crm-tooltip .tooltiptext {\n margin-left: -14px;\n }\n\n .crm-tooltip #crm-role-description {\n margin-left: -151px;\n }\n}\n\n@container (max-width: 250px) {\n .crm-tooltip .tooltiptext {\n margin-left: -201px;\n }\n}\n\n.crm-tooltip:hover .tooltiptext {\n visibility: visible;\n}","import { Component, h, Prop } from \"@stencil/core\";\nimport info from '../../assets/svg/info-circle-svgrepo-com.svg';\n\n\n@Component({\n tag: 'crm-tooltip',\n styleUrl: 'crm-tooltip.css'\n})\nexport class Tooltip {\n\n @Prop() text: string;\n @Prop() identity: string;\n\n render() {\n return (\n <div class=\"crm-tooltip-container crm-tooltip\">\n <img src={info} />\n <span id={this.identity} class=\"tooltiptext\">{this.text}</span>\n </div>\n );\n }\n}",":host {\n --text-color: #6D6D5F\n}\n\n.giftback-container {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\nh3 {\n font-size: 1.2rem;\n margin-bottom: 8px;\n color: #333;\n}\n\n.container-description {\n display: flex;\n align-items: center;\n gap: 5px;\n margin: 0 0 10px 0;\n}\n\n.container-description p {\n font-size: 14px;\n font-weight: 400;\n margin: 0px;\n}\n\n\np {\n font-size: 14px;\n color: #000;\n}\n\n.value-display h2 {\n color: #6D6D5F;\n /* Verde para o valor atual */\n font-size: 1.6rem;\n margin: 16px 0;\n}\n\ninput[type='range'] {\n width: 100%;\n margin: 12px 0;\n -webkit-appearance: none;\n background: #ddd;\n height: 4px;\n border-radius: 4px;\n outline: none;\n padding: 3px 0px 3px 3px;\n}\n\n/* input[type='range']::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 16px;\n height: 16px;\n background: var(--text-color);\n border-radius: 50%;\n cursor: pointer;\n} */\n\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 20px;\n height: 20px;\n background: rgb(109, 109, 95);\n /* Cor do botão */\n border-radius: 50%;\n cursor: pointer;\n}\n\n.options {\n margin: 0px 0;\n display: flex;\n gap: 10px;\n flex-direction: column;\n}\n\n.options label {\n display: flex;\n margin: 0px 0;\n font-size: 0.9rem;\n color: #333;\n align-items: center;\n}\n\n.options input[type='radio'] {\n margin-right: 8px;\n height: 16px;\n width: 16px;\n}\n\n.options input[type='radio'] {\n appearance: none;\n -webkit-appearance: none;\n margin-right: 8px;\n width: 16px;\n height: 16px;\n border: 2px solid #ddd;\n border-radius: 50%;\n background-color: #fff;\n cursor: pointer;\n transition: all 0.3s;\n padding: 0px;\n}\n\n.options input[type='radio']:checked {\n border-color: #000;\n background-color: #FAFAFA;\n border: 4px solid #000;\n}\n\n.info-box {\n background-color: #f9f9f9;\n border: 1px solid #e0e0e0;\n border-radius: 4px;\n padding: 8px;\n font-size: 14px;\n color: #262626;\n line-height: 20px;\n}\n\n.info-icon {\n font-size: 0.9rem;\n cursor: pointer;\n color: #888;\n}\n\nh3 {\n font-size: 1.2rem;\n margin-bottom: 8px;\n color: #333;\n}\n\n.slider-wrapper {\n position: relative;\n margin: 21px 0px 0px 0px;\n}\n\n.slider {\n width: 100%;\n -webkit-appearance: none;\n background: #ddd;\n height: 4px;\n border-radius: 2px;\n outline: none;\n}\n\n.slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 16px;\n height: 16px;\n background: var(--text-color);\n /* Azul para o slider */\n border-radius: 50%;\n cursor: pointer;\n}\n\n.slider-value {\n position: absolute;\n top: -30px;\n /* Posição acima do slider */\n font-size: 16px;\n font-weight: 700;\n color: var(--text-color);\n /* Verde para o texto */\n transform: translateX(-50%);\n white-space: nowrap;\n /* margin-left: 23px; */\n}\n\n.options-option {\n display: flex;\n}\n\n\n/* ########################################## */\n","import { Component, Prop, State, Watch, h } from \"@stencil/core\";\nimport { IBonus } from \"../../../../dto/validate.pin.bonus\";\n\nimport i18next from '../../../../i18n/i18n'\nimport { USED_KEY } from \"../../../../utils/keys.storage\";\nimport { defineLimit, formatDateToBr } from \"../../../../utils/utils\";\nimport { IInfoStore } from \"../../../../helpers/info.config.helper\";\n\n@Component({\n tag: 'giftback-info',\n styleUrls: ['giftback-info.css']\n})\nexport class GiftbackInfo {\n @State() usedValue: number = 0;\n @State() selectedOption: string = 'none';\n\n @Prop() loading: boolean = false;\n @Prop() bonus: Partial<IBonus> = {\n totalBonus: 0,\n cartId: \"\",\n minimumPurchase: 0,\n bonusBalance: 0,\n calculatedValue: 0,\n firstValidityDate: \"\",\n totalValue: 0\n };\n @Prop() reserve: (amountRedeemed: number) => void;\n @Prop() cancel: () => void;\n @Prop() config: IInfoStore;\n\n @State() sliderPosition: number = 0;\n @State() sliderValuePosition: number = 0;\n\n @State() loadingTime = false;\n\n @Watch(\"bonus\")\n changedBonus() {\n this.updateBonus()\n }\n\n private updateBonus() {\n this.usedValue = this.bonus.bonusBalance;\n this.buildPositionSlider(0, this.bonus.totalBonus);\n }\n\n componentWillLoad() {\n this.updateBonus();\n this.selectedOption = localStorage.getItem(USED_KEY);\n }\n\n handleSliderChange(event: Event) {\n const input = event.target as HTMLInputElement;\n this.usedValue = parseFloat(input.value);\n\n // Calculando a posição do texto com base no valor do slider\n // const percentage = ((this.usedValue - parseInt(input.min)) / (parseInt(input.max) - parseInt(input.min))) * 100;\n // this.sliderPosition = percentage;\n\n this.buildPositionSlider(parseFloat(input.min), parseFloat(input.max))\n }\n\n componentDidLoad() {\n const input: any = document.getElementById(\"position_value_id\")\n\n input.value = this.bonus.bonusBalance;\n }\n\n\n private buildPositionSlider(min: number, max: number) {\n\n const percentage_init = max * 0.1;\n\n // Calculando a posição do texto com base no valor do slider\n const percentage = ((this.usedValue - min) / (max - min)) * 100;\n\n this.sliderPosition = percentage;\n this.sliderValuePosition = percentage + (this.usedValue <= percentage_init ? 10 : 0);\n }\n\n async handleOptionChange(option: string) {\n this.selectedOption = option;\n\n localStorage.setItem(USED_KEY, option);\n\n switch (this.selectedOption) {\n case 'use':\n await this.reserve(this.usedValue);\n break;\n case 'dontUse':\n await this.cancel();\n break;\n default:\n }\n }\n\n showTime() {\n const time = localStorage.getItem(\"bc:time\");\n\n const allow = localStorage.getItem(\"bc:time-allow\");\n\n if(!allow) return false;\n\n return !!time;\n }\n\n getTime() {\n const time = localStorage.getItem(\"bc:time\");\n return Number(time) || 360;\n }\n\n render() {\n const remainingGiftback = this.bonus.minimumPurchase - this.bonus.totalValue;\n\n const translateDescription = i18next.t(\"giftDescription\", { amount: `${this.bonus.totalBonus.toFixed(2).replace(\".\", \",\")}`, custom_name: \"Giftback\" })\n\n const limit = defineLimit(remainingGiftback);\n\n return (\n\n <div class=\"giftback-container\">\n <div class=\"container-description\">\n <p innerHTML={translateDescription}></p>\n <crm-tooltip identity=\"crm-role-description\" text={i18next.t(\"labelUseGiftback\", { minimumPurchase: this.bonus.minimumPurchase, expírationDate: formatDateToBr(this.bonus.firstValidityDate) })} />\n </div>\n <div class=\"slider-wrapper\">\n <div\n class=\"slider-value\"\n style={{\n left: `calc(${this.sliderValuePosition}% - 20px)`, // Ajuste para centralizar o texto\n\n }}\n >\n R$ {this.usedValue.toFixed(2).replace(\".\", \",\")}\n </div>\n <input\n id=\"position_value_id\"\n disabled\n type=\"range\"\n min=\"0\"\n max={this.bonus.totalBonus}\n value={this.usedValue}\n class=\"slider\"\n step=\"0.01\"\n onInput={(event) => this.handleSliderChange(event)}\n style={{\n background: `linear-gradient(to right, #6D6D5F ${this.sliderPosition}%, #ddd ${this.sliderPosition}%)`,\n }}\n />\n </div>\n\n {\n limit.isComplete && (\n <p>\n {i18next.t(\"maxAmount\")}\n </p>\n )\n }\n\n {\n !limit.isComplete && (\n <div class=\"container-description\">\n <p>\n Adicione <strong>R$ {remainingGiftback < 0 ? \"0,00\" : remainingGiftback.toFixed(2).replace(\".\", \",\")}</strong> ao carrinho para atingir o valor\n máximo!\n </p>\n <crm-tooltip identity=\"crm-max-description\" text={i18next.t(\"labelamountPartial\")} />\n </div>\n )\n }\n\n\n <div class=\"options\">\n <div class=\"options-option\">\n <input\n disabled={this.showTime()}\n type=\"radio\"\n name=\"giftbackOption\"\n value=\"use\"\n checked={this.selectedOption === 'use'}\n onChange={() => this.handleOptionChange('use')}\n />\n <p>Usar o meu {this.config?.giftbackTitle}</p>\n </div>\n <div class=\"options-option\">\n <input\n disabled={this.showTime()}\n type=\"radio\"\n name=\"giftbackOption\"\n value=\"dontUse\"\n checked={this.selectedOption === 'dontUse'}\n onChange={() => this.handleOptionChange('dontUse')}\n />\n <p>Não usar o meu {this.config?.giftbackTitle}</p>\n </div>\n </div>\n\n {\n this.showTime() &&\n (\n <div class=\"info-box\">\n Após <countdown-timer initialValue={this.getTime()} downtime={() => { this.loadingTime = true }} />, você poderá alterar sua escolha de usar ou não o Giftback.\n </div>\n )\n }\n\n\n <div class=\"info-box\">\n O Giftback será aplicado na próxima etapa.\n </div>\n </div>\n );\n }\n}","* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\n:host {\n --crmfont-sizebodymd: 14px;\n --crmline-heightbodymd: 20px;\n --crmletter-spacingtitle-md: 0px\n}\n\n.container-message {\n font-family: Roboto;\n font-size: var(--crmfont-sizebodymd);\n font-weight: 400;\n line-height: var(--crmline-heightbodymd);\n letter-spacing: var(--crmletter-spacingtitle-md);\n text-align: left;\n text-underline-position: from-font;\n text-decoration-skip-ink: none;\n}\n\n.crm-container-form {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n height: auto;\n padding: 20px 24px 20px 24px;\n border: 1px solid #CCCC;\n writing-mode: horizontal-tb;\n gap: 16px;\n border-top: 1px solid #ccc !important;\n border-bottom: 1px solid #ccc !important;\n}\n\n/* .fbits-responsive-carrinho-desconto {\n overflow: hidden;\n border: 1px solid #ccc;\n border-top: 0;\n border-bottom: 0;\n} */\n\n.crm-phone-form {\n display: flex;\n flex-direction: column;\n height: 100%;\n /* justify-content: space-around; */\n gap: 16px;\n}\n\n.crm-subtitle {\n font-size: 14px;\n color: var(--crm-btn);\n font-weight: 100;\n}\n\n.crm-title {\n font-weight: 700;\n line-height: 20px;\n color: #262626;\n font-size: 16px;\n}\n\n.crm-message-info {\n color: #619013;\n font-weight: 500;\n font-size: 12px;\n}\n\n.crm-message-error {\n color: #E11D48;\n font-weight: 500;\n font-size: 12px;\n}","import { Component, Host, Prop, h } from \"@stencil/core\";\nimport { IInfoStore } from \"../../../../helpers/info.config.helper\";\n\n@Component({\n tag: 'phone-form',\n styleUrl: '../../giftback-form.css'\n})\nexport class PhoneForm {\n\n private phoneInputMask: HTMLPhoneInputMaskElement;\n\n @Prop() value: string;\n @Prop() loading: boolean;\n @Prop() handlerSubmit: (phone: string) => void;\n\n @Prop() config: IInfoStore;\n\n\n async handlePhone() {\n\n const phone = await this.phoneInputMask.getPhone()\n\n await this.handlerSubmit(phone);\n }\n\n\n render() {\n return (\n <Host class=\"crm-phone-form\">\n <label class=\"crm-subtitle\" >Digite o seu celular para verificar se há desconto disponível nessa compra:</label>\n <phone-input-mask initialValue={this.value} ref={ref => this.phoneInputMask = ref} />\n\n <crm-button txtBtn={this.config?.btnApplyBonusLabel || \"Avançar\"} loading={this.loading} handleClick={() => this.handlePhone() } />\n </Host>\n )\n }\n}",":host {\n display: block;\n font-family: Arial, sans-serif;\n}\n\n.form-container-pin {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.pin-container {\n display: flex;\n /* margin: 26px 0; */\n justify-content: start;\n gap: 10px;\n}\n\n.pin-container input {\n width: 100%;\n height: 48px;\n font-size: 14px;\n text-align: center;\n border: 1px solid #ccc;\n border-radius: 5px;\n}\n\nbutton {\n padding: 10px 20px;\n background-color: #ddd;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n}\n\n\n.success {\n color: green;\n margin-top: 10px;\n}\n\n.button {\n top: 50%;\n background-color: #6c6c7e;\n color: #fff;\n border: none;\n border-radius: 10px;\n padding: 15px;\n min-height: 30px;\n min-width: 120px;\n font-size: 20px;\n cursor: pointer;\n}\n\n.button-cancel {\n top: 50%;\n background-color: #ffffff;\n color: #1e1c1c;\n border: 1px solid gray;\n border-radius: 10px;\n padding: 10px;\n min-height: 30px;\n min-width: 120px;\n font-size: 19px;\n cursor: pointer;\n}\n\n.crm-description {\n font-size: 14px;\n width: 100%;\n display: flex;\n gap: 9px;\n}\n\n.crm-description a {\n font-weight: bold;\n cursor: pointer;\n text-decoration: underline;\n}\n\n.crm-description div {\n display: flex;\n gap: 5px;\n}","* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\n:host {\n --crmfont-sizebodymd: 14px;\n --crmline-heightbodymd: 20px;\n --crmletter-spacingtitle-md: 0px\n}\n\n.container-message {\n font-family: Roboto;\n font-size: var(--crmfont-sizebodymd);\n font-weight: 400;\n line-height: var(--crmline-heightbodymd);\n letter-spacing: var(--crmletter-spacingtitle-md);\n text-align: left;\n text-underline-position: from-font;\n text-decoration-skip-ink: none;\n}\n\n.crm-container-form {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n height: auto;\n padding: 20px 24px 20px 24px;\n border: 1px solid #CCCC;\n writing-mode: horizontal-tb;\n gap: 16px;\n border-top: 1px solid #ccc !important;\n border-bottom: 1px solid #ccc !important;\n}\n\n/* .fbits-responsive-carrinho-desconto {\n overflow: hidden;\n border: 1px solid #ccc;\n border-top: 0;\n border-bottom: 0;\n} */\n\n.crm-phone-form {\n display: flex;\n flex-direction: column;\n height: 100%;\n /* justify-content: space-around; */\n gap: 16px;\n}\n\n.crm-subtitle {\n font-size: 14px;\n color: var(--crm-btn);\n font-weight: 100;\n}\n\n.crm-title {\n font-weight: 700;\n line-height: 20px;\n color: #262626;\n font-size: 16px;\n}\n\n.crm-message-info {\n color: #619013;\n font-weight: 500;\n font-size: 12px;\n}\n\n.crm-message-error {\n color: #E11D48;\n font-weight: 500;\n font-size: 12px;\n}","import { Component, h, Prop, State } from '@stencil/core';\nimport { IPinSent } from '../../../../dto/pin.sent';\nimport i18next from '../../../../i18n/i18n'\nimport { IInfoStore } from '../../../../helpers/info.config.helper';\n\n@Component({\n tag: 'pin-form',\n styleUrls: ['pin-form.css', '../../giftback-form.css'],\n shadow: true,\n})\nexport class GiftbackPin {\n\n @Prop() validate: (pin: string) => void;\n @Prop() cancel: () => void;\n @Prop() resend: () => void;\n\n @Prop() sent: IPinSent;\n @Prop() loading: boolean = false;\n @Prop() phone: string;\n @Prop() config: IInfoStore;\n\n @State() pin: string[] = ['', '', '', ''];\n @State() isVerified: boolean = false;\n @State() canResend: boolean = false;\n\n componentWillLoad() {\n this.canResend = false;\n }\n\n handleInput(event: Event, index: number) {\n const input = event.target as HTMLInputElement;\n const value = input.value.slice(0, 1); // Limitar a um único dígito\n this.pin[index] = value;\n\n // Focar no próximo campo, se possível\n if (value && index < this.pin.length - 1) {\n const nextInput = input.nextElementSibling as HTMLInputElement;\n nextInput?.focus();\n }\n\n this.pin = [...this.pin];\n }\n\n validatePin() {\n this.validate(this.pin.join(\"\"))\n }\n\n verifyPin() {\n const pinCode = this.pin.join('');\n if (pinCode === '9999') {\n this.isVerified = true;\n }\n }\n\n handleTimeout() {\n this.canResend = true;\n }\n\n async handleResend() {\n await this.resend();\n\n this.canResend = false;\n this.pin = ['', '', '', '']\n }\n\n render() {\n return (\n <div class=\"crm-phone-form\">\n <label class=\"crm-subtitle\" >{i18next.t('pin-sutitle')} <strong>+55 {this.phone}</strong></label>\n <div class=\"pin-container\">\n {this.pin.map((_, index) => (\n <input\n type=\"text\"\n maxLength={1}\n value={this.pin[index]}\n onInput={(event) => this.handleInput(event, index)}\n />\n ))}\n </div>\n\n <slot></slot>\n\n <p class=\"crm-description\"> Não recebeu?\n {\n !this.canResend && <label> Reenviar em <countdown-timer initialValue={30} downtime={() => this.handleTimeout()} /> </label>\n }\n {\n this.canResend && (\n <div >\n <a onClick={() => this.handleResend()}>Reenviar</a>\n <a onClick={() => this.cancel()}>Trocar número</a>\n </div>\n )\n }\n </p>\n <crm-button txtBtn={this.config?.btnApplyBonusLabel || \"Avançar\"} loading={this.loading} handleClick={() => this.validatePin()} />\n </div >\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"crm-tooltip.giftback-info.phone-form.pin-form.entry.js","mappings":";;;;;AAAA,MAAM,uBAAuB,GAAG,wvCAAwvC;;ACAxxC,MAAM,aAAa,GAAG,y3BAAy3B,CAAC;AACh5B,yBAAe,aAAa;;MCOf,OAAO;;;;;;IAKhB,MAAM;QACF,QACI,4DAAK,KAAK,EAAC,mCAAmC,IAC1C,4DAAK,GAAG,EAAEA,uBAAI,GAAI,EAClB,6DAAM,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAC,aAAa,IAAE,IAAI,CAAC,IAAI,CAAQ,CAC7D,EACR;KACL;;;;ACpBL,MAAM,eAAe,GAAG,k7DAAk7D,CAAC;AAC38D,2BAAe,eAAe;;MCWjB,YAAY;;;yBACQ,CAAC;8BACI,MAAM;uBAEb,KAAK;qBACC;YAC7B,UAAU,EAAE,CAAC;YACb,MAAM,EAAE,EAAE;YACV,eAAe,EAAE,CAAC;YAClB,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,CAAC;YAClB,iBAAiB,EAAE,EAAE;YACrB,UAAU,EAAE,CAAC;SAChB;;;;8BAKiC,CAAC;mCACI,CAAC;2BAEjB,KAAK;;IAG5B,YAAY;QACR,IAAI,CAAC,WAAW,EAAE,CAAA;KACrB;IAEO,WAAW;QACf,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;KACtD;IAED,iBAAiB;QACb,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,cAAc,G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AC,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,GAAI,CAC/H,EACT;KACL;;;;;;","names":["info","i18next","giftbackFormCss"],"sources":["src/assets/svg/info-circle-svgrepo-com.svg","src/components/tooltip/crm-tooltip.css?tag=crm-tooltip","src/components/tooltip/tooltip.tsx","src/components/giftback-form/subcomponents/giftback-info/giftback-info.css?tag=giftback-info","src/components/giftback-form/subcomponents/giftback-info/giftback-info.tsx","src/components/giftback-form/giftback-form.css?tag=phone-form","src/components/giftback-form/subcomponents/phone-form/phone-form.tsx","src/components/giftback-form/subcomponents/pin-form/pin-form.css?tag=pin-form&encapsulation=shadow","src/components/giftback-form/giftback-form.css?tag=pin-form&encapsulation=shadow","src/components/giftback-form/subcomponents/pin-form/pin-form.tsx"],"sourcesContent":["<?xml version=\"1.0\" encoding=\"utf-8\"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->\r\n<svg width=\"800px\" height=\"800px\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n<path d=\"M12 17.75C12.4142 17.75 12.75 17.4142 12.75 17V11C12.75 10.5858 12.4142 10.25 12 10.25C11.5858 10.25 11.25 10.5858 11.25 11V17C11.25 17.4142 11.5858 17.75 12 17.75Z\" fill=\"#1C274C\"/>\r\n<path d=\"M12 7C12.5523 7 13 7.44772 13 8C13 8.55228 12.5523 9 12 9C11.4477 9 11 8.55228 11 8C11 7.44772 11.4477 7 12 7Z\" fill=\"#1C274C\"/>\r\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12ZM12 2.75C6.89137 2.75 2.75 6.89137 2.75 12C2.75 17.1086 6.89137 21.25 12 21.25C17.1086 21.25 21.25 17.1086 21.25 12C21.25 6.89137 17.1086 2.75 12 2.75Z\" fill=\"#1C274C\"/>\r\n</svg>",".crm-tooltip-container {\n display: flex;\n\n & img {\n width: 16px;\n margin-left: 3px;\n position: relative;\n }\n}\n\n.crm-tooltip {\n position: relative;\n display: inline-block;\n}\n\n.crm-tooltip .tooltiptext {\n visibility: hidden;\n background-color: black;\n color: #fff;\n text-align: center;\n padding: 8px 12px;\n border-radius: 0px;\n position: absolute;\n z-index: 1;\n min-width: 271px;\n top: 100%;\n left: 50%;\n margin-left: -238px;\n}\n\n@container (max-width: 410px) {\n .crm-tooltip .tooltiptext {\n margin-left: -14px;\n }\n\n .crm-tooltip #crm-role-description {\n margin-left: -151px;\n }\n}\n\n@container (max-width: 250px) {\n .crm-tooltip .tooltiptext {\n margin-left: -201px;\n }\n}\n\n.crm-tooltip:hover .tooltiptext {\n visibility: visible;\n}","import { Component, h, Prop } from \"@stencil/core\";\nimport info from '../../assets/svg/info-circle-svgrepo-com.svg';\n\n\n@Component({\n tag: 'crm-tooltip',\n styleUrl: 'crm-tooltip.css'\n})\nexport class Tooltip {\n\n @Prop() text: string;\n @Prop() identity: string;\n\n render() {\n return (\n <div class=\"crm-tooltip-container crm-tooltip\">\n <img src={info} />\n <span id={this.identity} class=\"tooltiptext\">{this.text}</span>\n </div>\n );\n }\n}",":host {\n --text-color: #6D6D5F\n}\n\n.giftback-container {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\nh3 {\n font-size: 1.2rem;\n margin-bottom: 8px;\n color: #333;\n}\n\n.container-description {\n display: flex;\n align-items: center;\n gap: 5px;\n margin: 0 0 10px 0;\n}\n\n.container-description p {\n font-size: 14px;\n font-weight: 400;\n margin: 0px;\n}\n\n\np {\n font-size: 14px;\n color: #000;\n}\n\n.value-display h2 {\n color: #6D6D5F;\n /* Verde para o valor atual */\n font-size: 1.6rem;\n margin: 16px 0;\n}\n\ninput[type='range'] {\n width: 100%;\n margin: 12px 0;\n -webkit-appearance: none;\n background: #ddd;\n height: 4px;\n border-radius: 4px;\n outline: none;\n padding: 3px 0px 3px 3px;\n}\n\n/* input[type='range']::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 16px;\n height: 16px;\n background: var(--text-color);\n border-radius: 50%;\n cursor: pointer;\n} */\n\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 20px;\n height: 20px;\n background: rgb(109, 109, 95);\n /* Cor do botão */\n border-radius: 50%;\n cursor: pointer;\n}\n\n.options {\n margin: 0px 0;\n display: flex;\n gap: 10px;\n flex-direction: column;\n}\n\n.options label {\n display: flex;\n margin: 0px 0;\n font-size: 0.9rem;\n color: #333;\n align-items: center;\n}\n\n.options input[type='radio'] {\n margin-right: 8px;\n height: 16px;\n width: 16px;\n}\n\n.options input[type='radio'] {\n appearance: none;\n -webkit-appearance: none;\n margin-right: 8px;\n width: 16px;\n height: 16px;\n border: 2px solid #ddd;\n border-radius: 50%;\n background-color: #fff;\n cursor: pointer;\n transition: all 0.3s;\n padding: 0px;\n}\n\n.options input[type='radio']:checked {\n border-color: #000;\n background-color: #FAFAFA;\n border: 4px solid #000;\n}\n\n.info-box {\n background-color: #f9f9f9;\n border: 1px solid #e0e0e0;\n border-radius: 4px;\n padding: 8px;\n font-size: 14px;\n color: #262626;\n line-height: 20px;\n}\n\n.info-icon {\n font-size: 0.9rem;\n cursor: pointer;\n color: #888;\n}\n\nh3 {\n font-size: 1.2rem;\n margin-bottom: 8px;\n color: #333;\n}\n\n.slider-wrapper {\n position: relative;\n margin: 21px 0px 0px 0px;\n}\n\n.slider {\n width: 100%;\n -webkit-appearance: none;\n background: #ddd;\n height: 4px;\n border-radius: 2px;\n outline: none;\n}\n\n.slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 16px;\n height: 16px;\n background: var(--text-color);\n /* Azul para o slider */\n border-radius: 50%;\n cursor: pointer;\n}\n\n.slider-value {\n position: absolute;\n top: -30px;\n /* Posição acima do slider */\n font-size: 16px;\n font-weight: 700;\n color: var(--text-color);\n /* Verde para o texto */\n transform: translateX(-50%);\n white-space: nowrap;\n /* margin-left: 23px; */\n}\n\n.options-option {\n display: flex;\n}\n\n\n/* ########################################## */\n","import { Component, Prop, State, Watch, h } from \"@stencil/core\";\nimport { IBonus } from \"../../../../dto/validate.pin.bonus\";\n\nimport i18next from '../../../../i18n/i18n'\nimport { USED_KEY } from \"../../../../utils/keys.storage\";\nimport { defineLimit, formatDateToBr } from \"../../../../utils/utils\";\nimport { IInfoStore } from \"../../../../helpers/info.config.helper\";\n\n@Component({\n tag: 'giftback-info',\n styleUrls: ['giftback-info.css']\n})\nexport class GiftbackInfo {\n @State() usedValue: number = 0;\n @State() selectedOption: string = 'none';\n\n @Prop() loading: boolean = false;\n @Prop() bonus: Partial<IBonus> = {\n totalBonus: 0,\n cartId: \"\",\n minimumPurchase: 0,\n bonusBalance: 0,\n calculatedValue: 0,\n firstValidityDate: \"\",\n totalValue: 0\n };\n @Prop() reserve: (amountRedeemed: number) => void;\n @Prop() cancel: () => void;\n @Prop() config: IInfoStore;\n\n @State() sliderPosition: number = 0;\n @State() sliderValuePosition: number = 0;\n\n @State() loadingTime = false;\n\n @Watch(\"bonus\")\n changedBonus() {\n this.updateBonus()\n }\n\n private updateBonus() {\n this.usedValue = this.bonus.bonusBalance;\n this.buildPositionSlider(0, this.bonus.totalBonus);\n }\n\n componentWillLoad() {\n this.updateBonus();\n this.selectedOption = localStorage.getItem(USED_KEY);\n }\n\n handleSliderChange(event: Event) {\n const input = event.target as HTMLInputElement;\n this.usedValue = parseFloat(input.value);\n\n // Calculando a posição do texto com base no valor do slider\n // const percentage = ((this.usedValue - parseInt(input.min)) / (parseInt(input.max) - parseInt(input.min))) * 100;\n // this.sliderPosition = percentage;\n\n this.buildPositionSlider(parseFloat(input.min), parseFloat(input.max))\n }\n\n componentDidLoad() {\n const input: any = document.getElementById(\"position_value_id\")\n\n input.value = this.bonus.bonusBalance;\n }\n\n\n private buildPositionSlider(min: number, max: number) {\n\n const percentage_init = max * 0.1;\n\n // Calculando a posição do texto com base no valor do slider\n const percentage = ((this.usedValue - min) / (max - min)) * 100;\n\n this.sliderPosition = percentage;\n this.sliderValuePosition = percentage + (this.usedValue <= percentage_init ? 10 : 0);\n }\n\n async handleOptionChange(option: string) {\n this.selectedOption = option;\n\n localStorage.setItem(USED_KEY, option);\n\n localStorage.removeItem(\"bc:time-allow\")\n\n switch (this.selectedOption) {\n case 'use':\n await this.reserve(this.usedValue);\n break;\n case 'dontUse':\n await this.cancel();\n break;\n default:\n }\n }\n\n showTime() {\n const time = localStorage.getItem(\"bc:time\");\n\n const allow = localStorage.getItem(\"bc:time-allow\");\n\n if(!allow) return false;\n\n return !!time;\n }\n\n getTime() {\n const time = localStorage.getItem(\"bc:time\");\n return Number(time) || 360;\n }\n\n render() {\n const remainingGiftback = this.bonus.minimumPurchase - this.bonus.totalValue;\n\n const translateDescription = i18next.t(\"giftDescription\", { amount: `${this.bonus.totalBonus.toFixed(2).replace(\".\", \",\")}`, custom_name: \"Giftback\" })\n\n const limit = defineLimit(remainingGiftback);\n\n return (\n\n <div class=\"giftback-container\">\n <div class=\"container-description\">\n <p innerHTML={translateDescription}></p>\n <crm-tooltip identity=\"crm-role-description\" text={i18next.t(\"labelUseGiftback\", { minimumPurchase: this.bonus.minimumPurchase, expírationDate: formatDateToBr(this.bonus.firstValidityDate) })} />\n </div>\n <div class=\"slider-wrapper\">\n <div\n class=\"slider-value\"\n style={{\n left: `calc(${this.sliderValuePosition}% - 20px)`, // Ajuste para centralizar o texto\n\n }}\n >\n R$ {this.usedValue.toFixed(2).replace(\".\", \",\")}\n </div>\n <input\n id=\"position_value_id\"\n disabled\n type=\"range\"\n min=\"0\"\n max={this.bonus.totalBonus}\n value={this.usedValue}\n class=\"slider\"\n step=\"0.01\"\n onInput={(event) => this.handleSliderChange(event)}\n style={{\n background: `linear-gradient(to right, #6D6D5F ${this.sliderPosition}%, #ddd ${this.sliderPosition}%)`,\n }}\n />\n </div>\n\n {\n limit.isComplete && (\n <p>\n {i18next.t(\"maxAmount\")}\n </p>\n )\n }\n\n {\n !limit.isComplete && (\n <div class=\"container-description\">\n <p>\n Adicione <strong>R$ {remainingGiftback < 0 ? \"0,00\" : remainingGiftback.toFixed(2).replace(\".\", \",\")}</strong> ao carrinho para atingir o valor\n máximo!\n </p>\n <crm-tooltip identity=\"crm-max-description\" text={i18next.t(\"labelamountPartial\")} />\n </div>\n )\n }\n\n\n <div class=\"options\">\n <div class=\"options-option\">\n <input\n disabled={this.showTime()}\n type=\"radio\"\n name=\"giftbackOption\"\n value=\"use\"\n checked={this.selectedOption === 'use'}\n onChange={() => this.handleOptionChange('use')}\n />\n <p>Usar o meu {this.config?.giftbackTitle}</p>\n </div>\n <div class=\"options-option\">\n <input\n disabled={this.showTime()}\n type=\"radio\"\n name=\"giftbackOption\"\n value=\"dontUse\"\n checked={this.selectedOption === 'dontUse'}\n onChange={() => this.handleOptionChange('dontUse')}\n />\n <p>Não usar o meu {this.config?.giftbackTitle}</p>\n </div>\n </div>\n\n {\n this.showTime() &&\n (\n <div class=\"info-box\">\n Após <countdown-timer initialValue={this.getTime()} downtime={() => { this.loadingTime = true }} />, você poderá alterar sua escolha de usar ou não o Giftback.\n </div>\n )\n }\n\n\n <div class=\"info-box\">\n O Giftback será aplicado na próxima etapa.\n </div>\n </div>\n );\n }\n}","* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\n:host {\n --crmfont-sizebodymd: 14px;\n --crmline-heightbodymd: 20px;\n --crmletter-spacingtitle-md: 0px\n}\n\n.container-message {\n font-family: Roboto;\n font-size: var(--crmfont-sizebodymd);\n font-weight: 400;\n line-height: var(--crmline-heightbodymd);\n letter-spacing: var(--crmletter-spacingtitle-md);\n text-align: left;\n text-underline-position: from-font;\n text-decoration-skip-ink: none;\n}\n\n.crm-container-form {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n height: auto;\n padding: 20px 24px 20px 24px;\n border: 1px solid #CCCC;\n writing-mode: horizontal-tb;\n gap: 16px;\n border-top: 1px solid #ccc !important;\n border-bottom: 1px solid #ccc !important;\n}\n\n/* .fbits-responsive-carrinho-desconto {\n overflow: hidden;\n border: 1px solid #ccc;\n border-top: 0;\n border-bottom: 0;\n} */\n\n.crm-phone-form {\n display: flex;\n flex-direction: column;\n height: 100%;\n /* justify-content: space-around; */\n gap: 16px;\n}\n\n.crm-subtitle {\n font-size: 14px;\n color: var(--crm-btn);\n font-weight: 100;\n}\n\n.crm-title {\n font-weight: 700;\n line-height: 20px;\n color: #262626;\n font-size: 16px;\n}\n\n.crm-message-info {\n color: #619013;\n font-weight: 500;\n font-size: 12px;\n}\n\n.crm-message-error {\n color: #E11D48;\n font-weight: 500;\n font-size: 12px;\n}","import { Component, Host, Prop, h } from \"@stencil/core\";\nimport { IInfoStore } from \"../../../../helpers/info.config.helper\";\n\n@Component({\n tag: 'phone-form',\n styleUrl: '../../giftback-form.css'\n})\nexport class PhoneForm {\n\n private phoneInputMask: HTMLPhoneInputMaskElement;\n\n @Prop() value: string;\n @Prop() loading: boolean;\n @Prop() handlerSubmit: (phone: string) => void;\n\n @Prop() config: IInfoStore;\n\n\n async handlePhone() {\n\n const phone = await this.phoneInputMask.getPhone()\n\n await this.handlerSubmit(phone);\n }\n\n\n render() {\n return (\n <Host class=\"crm-phone-form\">\n <label class=\"crm-subtitle\" >Digite o seu celular para verificar se há desconto disponível nessa compra:</label>\n <phone-input-mask initialValue={this.value} ref={ref => this.phoneInputMask = ref} />\n\n <crm-button txtBtn={this.config?.btnApplyBonusLabel || \"Avançar\"} loading={this.loading} handleClick={() => this.handlePhone() } />\n </Host>\n )\n }\n}",":host {\n display: block;\n font-family: Arial, sans-serif;\n}\n\n.form-container-pin {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.pin-container {\n display: flex;\n /* margin: 26px 0; */\n justify-content: start;\n gap: 10px;\n}\n\n.pin-container input {\n width: 100%;\n height: 48px;\n font-size: 14px;\n text-align: center;\n border: 1px solid #ccc;\n border-radius: 5px;\n}\n\nbutton {\n padding: 10px 20px;\n background-color: #ddd;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n}\n\n\n.success {\n color: green;\n margin-top: 10px;\n}\n\n.button {\n top: 50%;\n background-color: #6c6c7e;\n color: #fff;\n border: none;\n border-radius: 10px;\n padding: 15px;\n min-height: 30px;\n min-width: 120px;\n font-size: 20px;\n cursor: pointer;\n}\n\n.button-cancel {\n top: 50%;\n background-color: #ffffff;\n color: #1e1c1c;\n border: 1px solid gray;\n border-radius: 10px;\n padding: 10px;\n min-height: 30px;\n min-width: 120px;\n font-size: 19px;\n cursor: pointer;\n}\n\n.crm-description {\n font-size: 14px;\n width: 100%;\n display: flex;\n gap: 9px;\n}\n\n.crm-description a {\n font-weight: bold;\n cursor: pointer;\n text-decoration: underline;\n}\n\n.crm-description div {\n display: flex;\n gap: 5px;\n}","* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\n:host {\n --crmfont-sizebodymd: 14px;\n --crmline-heightbodymd: 20px;\n --crmletter-spacingtitle-md: 0px\n}\n\n.container-message {\n font-family: Roboto;\n font-size: var(--crmfont-sizebodymd);\n font-weight: 400;\n line-height: var(--crmline-heightbodymd);\n letter-spacing: var(--crmletter-spacingtitle-md);\n text-align: left;\n text-underline-position: from-font;\n text-decoration-skip-ink: none;\n}\n\n.crm-container-form {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n height: auto;\n padding: 20px 24px 20px 24px;\n border: 1px solid #CCCC;\n writing-mode: horizontal-tb;\n gap: 16px;\n border-top: 1px solid #ccc !important;\n border-bottom: 1px solid #ccc !important;\n}\n\n/* .fbits-responsive-carrinho-desconto {\n overflow: hidden;\n border: 1px solid #ccc;\n border-top: 0;\n border-bottom: 0;\n} */\n\n.crm-phone-form {\n display: flex;\n flex-direction: column;\n height: 100%;\n /* justify-content: space-around; */\n gap: 16px;\n}\n\n.crm-subtitle {\n font-size: 14px;\n color: var(--crm-btn);\n font-weight: 100;\n}\n\n.crm-title {\n font-weight: 700;\n line-height: 20px;\n color: #262626;\n font-size: 16px;\n}\n\n.crm-message-info {\n color: #619013;\n font-weight: 500;\n font-size: 12px;\n}\n\n.crm-message-error {\n color: #E11D48;\n font-weight: 500;\n font-size: 12px;\n}","import { Component, h, Prop, State } from '@stencil/core';\nimport { IPinSent } from '../../../../dto/pin.sent';\nimport i18next from '../../../../i18n/i18n'\nimport { IInfoStore } from '../../../../helpers/info.config.helper';\n\n@Component({\n tag: 'pin-form',\n styleUrls: ['pin-form.css', '../../giftback-form.css'],\n shadow: true,\n})\nexport class GiftbackPin {\n\n @Prop() validate: (pin: string) => void;\n @Prop() cancel: () => void;\n @Prop() resend: () => void;\n\n @Prop() sent: IPinSent;\n @Prop() loading: boolean = false;\n @Prop() phone: string;\n @Prop() config: IInfoStore;\n\n @State() pin: string[] = ['', '', '', ''];\n @State() isVerified: boolean = false;\n @State() canResend: boolean = false;\n\n componentWillLoad() {\n this.canResend = false;\n }\n\n handleInput(event: Event, index: number) {\n const input = event.target as HTMLInputElement;\n const value = input.value.slice(0, 1); // Limitar a um único dígito\n this.pin[index] = value;\n\n // Focar no próximo campo, se possível\n if (value && index < this.pin.length - 1) {\n const nextInput = input.nextElementSibling as HTMLInputElement;\n nextInput?.focus();\n }\n\n this.pin = [...this.pin];\n }\n\n validatePin() {\n this.validate(this.pin.join(\"\"))\n }\n\n verifyPin() {\n const pinCode = this.pin.join('');\n if (pinCode === '9999') {\n this.isVerified = true;\n }\n }\n\n handleTimeout() {\n this.canResend = true;\n }\n\n async handleResend() {\n await this.resend();\n\n this.canResend = false;\n this.pin = ['', '', '', '']\n }\n\n render() {\n return (\n <div class=\"crm-phone-form\">\n <label class=\"crm-subtitle\" >{i18next.t('pin-sutitle')} <strong>+55 {this.phone}</strong></label>\n <div class=\"pin-container\">\n {this.pin.map((_, index) => (\n <input\n type=\"text\"\n maxLength={1}\n value={this.pin[index]}\n onInput={(event) => this.handleInput(event, index)}\n />\n ))}\n </div>\n\n <slot></slot>\n\n <p class=\"crm-description\"> Não recebeu?\n {\n !this.canResend && <label> Reenviar em <countdown-timer initialValue={30} downtime={() => this.handleTimeout()} /> </label>\n }\n {\n this.canResend && (\n <div >\n <a onClick={() => this.handleResend()}>Reenviar</a>\n <a onClick={() => this.cancel()}>Trocar número</a>\n </div>\n )\n }\n </p>\n <crm-button txtBtn={this.config?.btnApplyBonusLabel || \"Avançar\"} loading={this.loading} handleClick={() => this.validatePin()} />\n </div >\n );\n }\n}\n"],"version":3}
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"p-d3ee0c39.js","mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,k7DAAk7D,CAAC;AAC38D,2BAAe,eAAe;;MCWjB,YAAY;;;;yBACQ,CAAC;8BACI,MAAM;uBAEb,KAAK;qBACC;YAC7B,UAAU,EAAE,CAAC;YACb,MAAM,EAAE,EAAE;YACV,eAAe,EAAE,CAAC;YAClB,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,CAAC;YAClB,iBAAiB,EAAE,EAAE;YACrB,UAAU,EAAE,CAAC;SAChB;;;;8BAKiC,CAAC;mCACI,CAAC;2BAEjB,KAAK;;IAG5B,YAAY;QACR,IAAI,CAAC,WAAW,EAAE,CAAA;KACrB;IAEO,WAAW;QACf,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;KACtD;IAED,iBAAiB;QACb,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;KACxD;IAED,kBAAkB,CAAC,KAAY;QAC3B,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;QAC/C,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,KAAK,CA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EACZ,IAAI,EAAC,gBAAgB,EACrB,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,IAAI,CAAC,cAAc,KAAK,SAAS,EAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,GACpD,EACF,oFAAmB,MAAA,IAAI,CAAC,MAAM;eAAE,aAAa,CAAK,CAChD,CACJ,EAGF,IAAI,CAAC,QAAQ,EAAE;aAEX,4DAAK,KAAK,EAAC,UAAU,kBACZ,wEAAiB,YAAY,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,QAAQ,IAAI,CAAC,WAAW,GAAG,IAAI,CAAA,EAAE,GAAI,gFACjG,CACT,EAIL,4DAAK,KAAK,EAAC,UAAU,2DAEf,CACJ,EACR;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["i18next"],"sources":["src/components/giftback-form/subcomponents/giftback-info/giftback-info.css?tag=giftback-info","src/components/giftback-form/subcomponents/giftback-info/giftback-info.tsx"],"sourcesContent":[":host {\n --text-color: #6D6D5F\n}\n\n.giftback-container {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\nh3 {\n font-size: 1.2rem;\n margin-bottom: 8px;\n color: #333;\n}\n\n.container-description {\n display: flex;\n align-items: center;\n gap: 5px;\n margin: 0 0 10px 0;\n}\n\n.container-description p {\n font-size: 14px;\n font-weight: 400;\n margin: 0px;\n}\n\n\np {\n font-size: 14px;\n color: #000;\n}\n\n.value-display h2 {\n color: #6D6D5F;\n /* Verde para o valor atual */\n font-size: 1.6rem;\n margin: 16px 0;\n}\n\ninput[type='range'] {\n width: 100%;\n margin: 12px 0;\n -webkit-appearance: none;\n background: #ddd;\n height: 4px;\n border-radius: 4px;\n outline: none;\n padding: 3px 0px 3px 3px;\n}\n\n/* input[type='range']::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 16px;\n height: 16px;\n background: var(--text-color);\n border-radius: 50%;\n cursor: pointer;\n} */\n\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 20px;\n height: 20px;\n background: rgb(109, 109, 95);\n /* Cor do botão */\n border-radius: 50%;\n cursor: pointer;\n}\n\n.options {\n margin: 0px 0;\n display: flex;\n gap: 10px;\n flex-direction: column;\n}\n\n.options label {\n display: flex;\n margin: 0px 0;\n font-size: 0.9rem;\n color: #333;\n align-items: center;\n}\n\n.options input[type='radio'] {\n margin-right: 8px;\n height: 16px;\n width: 16px;\n}\n\n.options input[type='radio'] {\n appearance: none;\n -webkit-appearance: none;\n margin-right: 8px;\n width: 16px;\n height: 16px;\n border: 2px solid #ddd;\n border-radius: 50%;\n background-color: #fff;\n cursor: pointer;\n transition: all 0.3s;\n padding: 0px;\n}\n\n.options input[type='radio']:checked {\n border-color: #000;\n background-color: #FAFAFA;\n border: 4px solid #000;\n}\n\n.info-box {\n background-color: #f9f9f9;\n border: 1px solid #e0e0e0;\n border-radius: 4px;\n padding: 8px;\n font-size: 14px;\n color: #262626;\n line-height: 20px;\n}\n\n.info-icon {\n font-size: 0.9rem;\n cursor: pointer;\n color: #888;\n}\n\nh3 {\n font-size: 1.2rem;\n margin-bottom: 8px;\n color: #333;\n}\n\n.slider-wrapper {\n position: relative;\n margin: 21px 0px 0px 0px;\n}\n\n.slider {\n width: 100%;\n -webkit-appearance: none;\n background: #ddd;\n height: 4px;\n border-radius: 2px;\n outline: none;\n}\n\n.slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 16px;\n height: 16px;\n background: var(--text-color);\n /* Azul para o slider */\n border-radius: 50%;\n cursor: pointer;\n}\n\n.slider-value {\n position: absolute;\n top: -30px;\n /* Posição acima do slider */\n font-size: 16px;\n font-weight: 700;\n color: var(--text-color);\n /* Verde para o texto */\n transform: translateX(-50%);\n white-space: nowrap;\n /* margin-left: 23px; */\n}\n\n.options-option {\n display: flex;\n}\n\n\n/* ########################################## */\n","import { Component, Prop, State, Watch, h } from \"@stencil/core\";\nimport { IBonus } from \"../../../../dto/validate.pin.bonus\";\n\nimport i18next from '../../../../i18n/i18n'\nimport { USED_KEY } from \"../../../../utils/keys.storage\";\nimport { defineLimit, formatDateToBr } from \"../../../../utils/utils\";\nimport { IInfoStore } from \"../../../../helpers/info.config.helper\";\n\n@Component({\n tag: 'giftback-info',\n styleUrls: ['giftback-info.css']\n})\nexport class GiftbackInfo {\n @State() usedValue: number = 0;\n @State() selectedOption: string = 'none';\n\n @Prop() loading: boolean = false;\n @Prop() bonus: Partial<IBonus> = {\n totalBonus: 0,\n cartId: \"\",\n minimumPurchase: 0,\n bonusBalance: 0,\n calculatedValue: 0,\n firstValidityDate: \"\",\n totalValue: 0\n };\n @Prop() reserve: (amountRedeemed: number) => void;\n @Prop() cancel: () => void;\n @Prop() config: IInfoStore;\n\n @State() sliderPosition: number = 0;\n @State() sliderValuePosition: number = 0;\n\n @State() loadingTime = false;\n\n @Watch(\"bonus\")\n changedBonus() {\n this.updateBonus()\n }\n\n private updateBonus() {\n this.usedValue = this.bonus.bonusBalance;\n this.buildPositionSlider(0, this.bonus.totalBonus);\n }\n\n componentWillLoad() {\n this.updateBonus();\n this.selectedOption = localStorage.getItem(USED_KEY);\n }\n\n handleSliderChange(event: Event) {\n const input = event.target as HTMLInputElement;\n this.usedValue = parseFloat(input.value);\n\n // Calculando a posição do texto com base no valor do slider\n // const percentage = ((this.usedValue - parseInt(input.min)) / (parseInt(input.max) - parseInt(input.min))) * 100;\n // this.sliderPosition = percentage;\n\n this.buildPositionSlider(parseFloat(input.min), parseFloat(input.max))\n }\n\n componentDidLoad() {\n const input: any = document.getElementById(\"position_value_id\")\n\n input.value = this.bonus.bonusBalance;\n }\n\n\n private buildPositionSlider(min: number, max: number) {\n\n const percentage_init = max * 0.1;\n\n // Calculando a posição do texto com base no valor do slider\n const percentage = ((this.usedValue - min) / (max - min)) * 100;\n\n this.sliderPosition = percentage;\n this.sliderValuePosition = percentage + (this.usedValue <= percentage_init ? 10 : 0);\n }\n\n async handleOptionChange(option: string) {\n this.selectedOption = option;\n\n localStorage.setItem(USED_KEY, option);\n\n switch (this.selectedOption) {\n case 'use':\n await this.reserve(this.usedValue);\n break;\n case 'dontUse':\n await this.cancel();\n break;\n default:\n }\n }\n\n showTime() {\n const time = localStorage.getItem(\"bc:time\");\n\n const allow = localStorage.getItem(\"bc:time-allow\");\n\n if(!allow) return false;\n\n return !!time;\n }\n\n getTime() {\n const time = localStorage.getItem(\"bc:time\");\n return Number(time) || 360;\n }\n\n render() {\n const remainingGiftback = this.bonus.minimumPurchase - this.bonus.totalValue;\n\n const translateDescription = i18next.t(\"giftDescription\", { amount: `${this.bonus.totalBonus.toFixed(2).replace(\".\", \",\")}`, custom_name: \"Giftback\" })\n\n const limit = defineLimit(remainingGiftback);\n\n return (\n\n <div class=\"giftback-container\">\n <div class=\"container-description\">\n <p innerHTML={translateDescription}></p>\n <crm-tooltip identity=\"crm-role-description\" text={i18next.t(\"labelUseGiftback\", { minimumPurchase: this.bonus.minimumPurchase, expírationDate: formatDateToBr(this.bonus.firstValidityDate) })} />\n </div>\n <div class=\"slider-wrapper\">\n <div\n class=\"slider-value\"\n style={{\n left: `calc(${this.sliderValuePosition}% - 20px)`, // Ajuste para centralizar o texto\n\n }}\n >\n R$ {this.usedValue.toFixed(2).replace(\".\", \",\")}\n </div>\n <input\n id=\"position_value_id\"\n disabled\n type=\"range\"\n min=\"0\"\n max={this.bonus.totalBonus}\n value={this.usedValue}\n class=\"slider\"\n step=\"0.01\"\n onInput={(event) => this.handleSliderChange(event)}\n style={{\n background: `linear-gradient(to right, #6D6D5F ${this.sliderPosition}%, #ddd ${this.sliderPosition}%)`,\n }}\n />\n </div>\n\n {\n limit.isComplete && (\n <p>\n {i18next.t(\"maxAmount\")}\n </p>\n )\n }\n\n {\n !limit.isComplete && (\n <div class=\"container-description\">\n <p>\n Adicione <strong>R$ {remainingGiftback < 0 ? \"0,00\" : remainingGiftback.toFixed(2).replace(\".\", \",\")}</strong> ao carrinho para atingir o valor\n máximo!\n </p>\n <crm-tooltip identity=\"crm-max-description\" text={i18next.t(\"labelamountPartial\")} />\n </div>\n )\n }\n\n\n <div class=\"options\">\n <div class=\"options-option\">\n <input\n disabled={this.showTime()}\n type=\"radio\"\n name=\"giftbackOption\"\n value=\"use\"\n checked={this.selectedOption === 'use'}\n onChange={() => this.handleOptionChange('use')}\n />\n <p>Usar o meu {this.config?.giftbackTitle}</p>\n </div>\n <div class=\"options-option\">\n <input\n disabled={this.showTime()}\n type=\"radio\"\n name=\"giftbackOption\"\n value=\"dontUse\"\n checked={this.selectedOption === 'dontUse'}\n onChange={() => this.handleOptionChange('dontUse')}\n />\n <p>Não usar o meu {this.config?.giftbackTitle}</p>\n </div>\n </div>\n\n {\n this.showTime() &&\n (\n <div class=\"info-box\">\n Após <countdown-timer initialValue={this.getTime()} downtime={() => { this.loadingTime = true }} />, você poderá alterar sua escolha de usar ou não o Giftback.\n </div>\n )\n }\n\n\n <div class=\"info-box\">\n O Giftback será aplicado na próxima etapa.\n </div>\n </div>\n );\n }\n}"],"version":3}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["moneyDollarsSvgrepoComSvg","setTime","localStorage","getItem","time","setItem","crmBonusNoteCss","CrmBonusNoteStyle0","CrmBonusNote","componentWillLoad","this","upadateCheckToFreteAndGetUrl","startTime","config","getInfoCustomization","storename","envios","document","getElementsByName","forEach","envio","checked","url","window","location","origin","handleHide","amount","cartId","getAmount","Number","toFixed","replace","backCart","href","pathname","removeItem","hasBonus","_bonus","getKeyReserveByCartId","info","requestBonus","bonus","JSON","parse","render","giftbackname","giftbackTitle","infobonus","h","key","class","src","money","width","showEdit","onClick","i18next","t","initialValue","downtime","txtBtn","handleClick"],"sources":["src/assets/svg/money-dollars-svgrepo-com.svg","src/helpers/time.helper.ts","src/components/note/crm-bonus-note.css?tag=crm-bonus-note","src/components/note/crm-bonus-note.tsx"],"sourcesContent":["<?xml version=\"1.0\" encoding=\"utf-8\"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->\n<svg width=\"800px\" height=\"800px\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<circle cx=\"12\" cy=\"12\" r=\"10\" stroke=\"#000000\" stroke-width=\"2\"/>\n<path d=\"M15 9.94728C14.5 9.3 13.8 8.5 12 8.5C10.2 8.5 9 9.51393 9 9.94728C9 10.3806 9.06786 10.9277 10 11.5C10.7522 11.9618 12.6684 12.0439 13.5 12.5C14.679 13.1467 14.8497 13.8202 14.8497 14.0522C14.8497 14.6837 13.4175 15.4852 12 15.5C10.536 15.5153 9.5 14.7 9 14.0522\" stroke=\"#000000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n<path d=\"M12 7V17\" stroke=\"#000000\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>","export function setTime() {\n\n if(localStorage.getItem(\"bc:time-allow\")) {\n return\n }\n\n const time = localStorage.getItem(\"bc:time\");\n\n if(!time) {\n localStorage.setItem(\"bc:time\", \"360\");\n localStorage.setItem(\"bc:time-allow\", \"true\");\n return\n } \n}",".note-container {\n border: 1px solid #dddddd;\n padding: 0 15px 15px;\n margin: 0 0 26px 0px;\n display: flex;\n flex-direction: column;\n gap: 13px;\n\n\n & .description {\n display: flex;\n flex-direction: column;\n gap: 13px;\n }\n}\n\n.note-container hr {\n border: 1px solid #CCC;\n}\n\n.note-container .back-cart {\n display: flex;\n text-align: center;\n}\n\n.note-header {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n}\n\n.note-title {\n font-weight: 700;\n text-align: left;\n display: flex;\n gap: 6px;\n align-items: center;\n margin-top: 11px;\n color: #000;\n}\n\n.note-description {\n font-family: Arial;\n color: #6d6d5f;\n padding: 0;\n margin: 0 auto;\n}\n\n.back-cart {\n font-size: .9em;\n color: #27272A;\n text-decoration: none;\n cursor: pointer;\n margin-top: 11px;\n}\n\n.note-description-2 {\n color: var(--crm-scheme-fg-main-inverse, #262626);\n font-family: Roboto;\n font-size: var(--crm-font-size-body-lg, 16px);\n font-style: normal;\n font-weight: var(--crm-font-weight-body-bold, 400);\n line-height: var(--crm-line-height-body-md, 20px);\n letter-spacing: var(--crm-letter-spacing-title-md, 0px);\n margin-top: 11px;\n color: #000;\n}\n\n.note-description-not {\n font-size: 16px;\n}","import { Component, Prop, State, h } from \"@stencil/core\";\nimport { IInfoStore, getInfoCustomization } from \"../../helpers/info.config.helper\";\n\nimport money from '../../assets/svg/money-dollars-svgrepo-com.svg'\nimport { getKeyReserveByCartId } from \"../../utils/keys.storage\";\nimport i18next from \"../../i18n/i18n\"\nimport { IBonus } from \"../../components\";\nimport { setTime } from \"../../helpers/time.helper\";\n\n@Component({\n tag: 'crm-bonus-note',\n styleUrl: 'crm-bonus-note.css'\n})\nexport class CrmBonusNote {\n\n @Prop({ attribute: 'cartid' }) cartId;\n @Prop({ attribute: \"storename\" }) storename;\n\n @State() url: string;\n @State() config: IInfoStore;\n\n @State() bonus: IBonus;\n\n @State() showEdit: boolean = false;\n\n componentWillLoad() {\n this.upadateCheckToFreteAndGetUrl();\n this.startTime();\n }\n\n upadateCheckToFreteAndGetUrl() {\n\n this.config = getInfoCustomization(this.storename);\n const envios = document.getElementsByName('forma-envio');\n envios.forEach((envio: any) => {\n envio.checked = false;\n });\n\n this.url = window.location.origin;\n }\n\n handleHide() {\n const amount = localStorage.getItem(this.cartId);\n return !!amount;\n }\n\n getAmount() {\n const amount = localStorage.getItem(this.cartId);\n\n return amount ? Number(amount).toFixed(2).replace(\".\", \",\") || \"0,00\" : \"0,00\";\n }\n\n async backCart() {\n window.location.href = this.url;\n }\n\n\n private startTime() {\n if(document.location.pathname == '/Fechamento') {\n\n if(!localStorage.getItem(\"bc:time-allow\")) {\n localStorage.removeItem(\"bc:time\")\n }\n\n setTime();\n }\n }\n\n\n hasBonus() {\n const _bonus = localStorage.getItem(getKeyReserveByCartId(this.cartId));\n\n const info = {\n hasBonus: false,\n requestBonus: false\n }\n\n if (_bonus) {\n this.bonus = JSON.parse(_bonus);\n info.hasBonus = this.bonus.hasBonus;\n info.requestBonus = true;\n }\n\n return info;\n }\n\n render() {\n\n const giftbackname = this.config.giftbackTitle || \"Giftback\";\n\n const infobonus = this.hasBonus()\n\n return (\n <div>\n <div class=\"note-container\">\n <div class=\"note-header\">\n\n <p class=\"note-title\">\n <img src={money} width={23} />\n {this.config.giftbackTitle}\n </p>\n {\n infobonus.hasBonus && (\n <div>\n {this.showEdit && (\n <p class=\"back-cart\" onClick={() => this.backCart()}>\n {i18next.t(\"edit\")}\n </p>\n )}\n {!this.showEdit && <countdown-timer initialValue={60} downtime={() => { this.showEdit = true }} />}\n </div>\n )\n }\n </div>\n\n {\n infobonus.hasBonus &&\n (\n <p class=\"note-description-2\">\n {i18next.t(\"withApplyBonus\", { giftbackname: giftbackname })} <strong>R$ {this.getAmount()}.</strong>\n </p>\n )\n }\n\n {\n (infobonus.requestBonus && !infobonus.hasBonus) &&\n (\n <p class=\"note-description-not\">\n {i18next.t(\"noBonus\", { giftbackname: giftbackname })}\n </p>\n )\n }\n\n {\n !infobonus.requestBonus &&\n (\n <div class=\"description\">\n <p class=\"note-description-not\">\n {i18next.t(\"backCart\")}\n </p>\n <crm-button txtBtn=\"VOLTAR AO CARRINHO\" handleClick={() => this.backCart()} />\n </div>\n )\n }\n\n {/* <a class=\"back-cart\" href={this.url}>\n Voltar ao carrinho\n </a> */}\n </div>\n </div>\n )\n }\n}"],"mappings":"uJAAA,MAAMA,EAA4B,6gC,SCAlBC,IAEZ,GAAGC,aAAaC,QAAQ,iBAAkB,CACtC,M,CAGJ,MAAMC,EAAOF,aAAaC,QAAQ,WAElC,IAAIC,EAAM,CACNF,aAAaG,QAAQ,UAAW,OAChCH,aAAaG,QAAQ,gBAAiB,QACtC,M,CAER,CCbA,MAAMC,EAAkB,k3CACxB,MAAAC,EAAeD,E,MCYFE,E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AAK6C,UACFN,EAAA,KAAAC,IAAA,2CAAGC,MAAM,YAAYK,QAAS,IAAM9C,KAAKuB,YACpCwB,EAAQC,EAAE,UAGjBhD,KAAK6C,UAAYN,EAAA,mBAAAC,IAAA,2CAAiBS,aAAc,GAAIC,SAAU,KAAQlD,KAAK6C,SAAW,IAAI,MAOxGP,EAAUX,UAENY,EAAA,KAAAC,IAAA,2CAAGC,MAAM,sBACJM,EAAQC,EAAE,iBAAkB,CAAEZ,aAAcA,IAAe,IAAEG,EAAA,UAAAC,IAAA,kDAAYxC,KAAKmB,YAAW,MAMjGmB,EAAUP,eAAiBO,EAAUX,UAElCY,EAAA,KAAAC,IAAA,2CAAGC,MAAM,wBACJM,EAAQC,EAAE,UAAW,CAAEZ,aAAcA,MAM7CE,EAAUP,cAEPQ,EAAA,OAAAC,IAAA,2CAAKC,MAAM,eACPF,EAAA,KAAAC,IAAA,2CAAGC,MAAM,wBACJM,EAAQC,EAAE,aAEfT,EAAA,cAAAC,IAAA,2CAAYW,OAAO,qBAAqBC,YAAa,IAAMpD,KAAKuB,e","ignoreList":[]}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as e,h as i,H as t}from"./p-3d6152b1.js";import{i as o}from"./p-e8c19a64.js";import{U as n}from"./p-f9aeffc1.js";import{d as a,a as c}from"./p-ba369e65.js";const r="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIFVwbG9hZGVkIHRvOiBTVkcgUmVwbywgd3d3LnN2Z3JlcG8uY29tLCBHZW5lcmF0b3I6IFNWRyBSZXBvIE1peGVyIFRvb2xzIC0tPg0KPHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik0xMiAxNy43NUMxMi40MTQyIDE3Ljc1IDEyLjc1IDE3LjQxNDIgMTIuNzUgMTdWMTFDMTIuNzUgMTAuNTg1OCAxMi40MTQyIDEwLjI1IDEyIDEwLjI1QzExLjU4NTggMTAuMjUgMTEuMjUgMTAuNTg1OCAxMS4yNSAxMVYxN0MxMS4yNSAxNy40MTQyIDExLjU4NTggMTcuNzUgMTIgMTcuNzVaIiBmaWxsPSIjMUMyNzRDIi8+DQo8cGF0aCBkPSJNMTIgN0MxMi41NTIzIDcgMTMgNy40NDc3MiAxMyA4QzEzIDguNTUyMjggMTIuNTUyMyA5IDEyIDlDMTEuNDQ3NyA5IDExIDguNTUyMjggMTEgOEMxMSA3LjQ0NzcyIDExLjQ0NzcgNyAxMiA3WiIgZmlsbD0iIzFDMjc0QyIvPg0KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xLjI1IDEyQzEuMjUgNi4wNjI5NCA2LjA2Mjk0IDEuMjUgMTIgMS4yNUMxNy45MzcxIDEuMjUgMjIuNzUgNi4wNjI5NCAyMi43NSAxMkMyMi43NSAxNy45MzcxIDE3LjkzNzEgMjIuNzUgMTIgMjIuNzVDNi4wNjI5NCAyMi43NSAxLjI1IDE3LjkzNzEgMS4yNSAxMlpNMTIgMi43NUM2Ljg5MTM3IDIuNzUgMi43NSA2Ljg5MTM3IDIuNzUgMTJDMi43NSAxNy4xMDg2IDYuODkxMzcgMjEuMjUgMTIgMjEuMjVDMTcuMTA4NiAyMS4yNSAyMS4yNSAxNy4xMDg2IDIxLjI1IDEyQzIxLjI1IDYuODkxMzcgMTcuMTA4NiAyLjc1IDEyIDIuNzVaIiBmaWxsPSIjMUMyNzRDIi8+DQo8L3N2Zz4=";const s=".crm-tooltip-container {\n display: flex;\n\n & img {\n width: 16px;\n margin-left: 3px;\n position: relative;\n }\n}\n\n.crm-tooltip {\n position: relative;\n display: inline-block;\n}\n\n.crm-tooltip .tooltiptext {\n visibility: hidden;\n background-color: black;\n color: #fff;\n text-align: center;\n padding: 8px 12px;\n border-radius: 0px;\n position: absolute;\n z-index: 1;\n min-width: 271px;\n top: 100%;\n left: 50%;\n margin-left: -238px;\n}\n\n@container (max-width: 410px) {\n .crm-tooltip .tooltiptext {\n margin-left: -14px;\n }\n\n .crm-tooltip #crm-role-description {\n margin-left: -151px;\n }\n}\n\n@container (max-width: 250px) {\n .crm-tooltip .tooltiptext {\n margin-left: -201px;\n }\n}\n\n.crm-tooltip:hover .tooltiptext {\n visibility: visible;\n}";const d=s;const p=class{constructor(i){e(this,i);this.text=undefined;this.identity=undefined}render(){return i("div",{key:"e5adedc85f8db34ef347ee41b804f97e254b1692",class:"crm-tooltip-container crm-tooltip"},i("img",{key:"76bd6d6aa860c81ba748cd92d1ee42de48140b56",src:r}),i("span",{key:"ca2ce50e7ba71165c244de210200275eb705bf9c",id:this.identity,class:"tooltiptext"},this.text))}};p.style=d;const l=":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{display:flex;align-items:center;gap:5px;margin:0 0 10px 0}.container-description p{font-size:14px;font-weight:400;margin:0px}p{font-size:14px;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 0px 3px 3px}input[type=\"range\"]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:rgb(109, 109, 95);border-radius:50%;cursor:pointer}.options{margin:0px 0;display:flex;gap:10px;flex-direction:column}.options label{display:flex;margin:0px 0;font-size:0.9rem;color:#333;align-items:center}.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;}.options-option{display:flex}";const f=l;const h=class{constructor(i){e(this,i);this.usedValue=0;this.selectedOption="none";this.loading=false;this.bonus={totalBonus:0,cartId:"",minimumPurchase:0,bonusBalance:0,calculatedValue:0,firstValidityDate:"",totalValue:0};this.reserve=undefined;this.cancel=undefined;this.config=undefined;this.sliderPosition=0;this.sliderValuePosition=0;this.loadingTime=false}changedBonus(){this.updateBonus()}updateBonus(){this.usedValue=this.bonus.bonusBalance;this.buildPositionSlider(0,this.bonus.totalBonus)}componentWillLoad(){this.updateBonus();this.selectedOption=localStorage.getItem(n)}handleSliderChange(e){const i=e.target;this.usedValue=parseFloat(i.value);this.buildPositionSlider(parseFloat(i.min),parseFloat(i.max))}componentDidLoad(){const e=document.getElementById("position_value_id");e.value=this.bonus.bonusBalance}buildPositionSlider(e,i){const t=i*.1;const o=(this.usedValue-e)/(i-e)*100;this.sliderPosition=o;this.sliderValuePosition=o+(this.usedValue<=t?10:0)}async handleOptionChange(e){this.selectedOption=e;localStorage.setItem(n,e);switch(this.selectedOption){case"use":await this.reserve(this.usedValue);break;case"dontUse":await this.cancel();break}}showTime(){const e=localStorage.getItem("bc:time");const i=localStorage.getItem("bc:time-allow");if(!i)return false;return!!e}getTime(){const e=localStorage.getItem("bc:time");return Number(e)||360}render(){var e,t;const n=this.bonus.minimumPurchase-this.bonus.totalValue;const r=o.t("giftDescription",{amount:`${this.bonus.totalBonus.toFixed(2).replace(".",",")}`,custom_name:"Giftback"});const s=a(n);return i("div",{key:"a95768449481c3b65cf268846b816f6ac9e8114a",class:"giftback-container"},i("div",{key:"4dc64dd88800e9d10722de867338a38942263544",class:"container-description"},i("p",{key:"4e27bd70286582c735a5f1232520e42e72829cf0",innerHTML:r}),i("crm-tooltip",{key:"1f71f1f7fb451bace36606603eb742757440b812",identity:"crm-role-description",text:o.t("labelUseGiftback",{minimumPurchase:this.bonus.minimumPurchase,expírationDate:c(this.bonus.firstValidityDate)})})),i("div",{key:"5cfa7ed56cd056eb537f9dfb65e34ab617039a12",class:"slider-wrapper"},i("div",{key:"e3b2a528f75d11ef8d57e3cdc756329bce54b2af",class:"slider-value",style:{left:`calc(${this.sliderValuePosition}% - 20px)`}},"R$ ",this.usedValue.toFixed(2).replace(".",",")),i("input",{key:"0d3db2ea9c816b6808896edc7c2f07b7331ca5fc",id:"position_value_id",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}%)`}})),s.isComplete&&i("p",{key:"1d5c84174d391884ce8f5c77c2189957fe9e92a6"},o.t("maxAmount")),!s.isComplete&&i("div",{key:"b2068a48e6a9dc5ac19e47a94f5abd10c8560a5e",class:"container-description"},i("p",{key:"50a0a8e2e65d630051a7ad94c205538da695d5c0"},"Adicione ",i("strong",{key:"50cc712ba5cbab10c24b9cdf40bf74086ee2c50d"},"R$ ",n<0?"0,00":n.toFixed(2).replace(".",","))," ao carrinho para atingir o valor máximo!"),i("crm-tooltip",{key:"19aa1c3225f5335c3831742840cf82e9adf92662",identity:"crm-max-description",text:o.t("labelamountPartial")})),i("div",{key:"9b73166715767caf1f3147512edc3a14aa077b82",class:"options"},i("div",{key:"42229f128f45bc942e2b834ec51666996d96717a",class:"options-option"},i("input",{key:"56186df933c8bec2bac972631904c77cc93e5f07",disabled:this.showTime(),type:"radio",name:"giftbackOption",value:"use",checked:this.selectedOption==="use",onChange:()=>this.handleOptionChange("use")}),i("p",{key:"34b1dd578c2823f158424a0677ba5ede7d3c729b"},"Usar o meu ",(e=this.config)===null||e===void 0?void 0:e.giftbackTitle)),i("div",{key:"282a1c9c1027a6d63eb606ff090c51cfcc20e313",class:"options-option"},i("input",{key:"f3cfaa2adfd24f88f4a2ef25fa8d481334cd416a",disabled:this.showTime(),type:"radio",name:"giftbackOption",value:"dontUse",checked:this.selectedOption==="dontUse",onChange:()=>this.handleOptionChange("dontUse")}),i("p",{key:"481e4ec08f7e1cd12670760336583f456acbbe08"},"Não usar o meu ",(t=this.config)===null||t===void 0?void 0:t.giftbackTitle))),this.showTime()&&i("div",{key:"6240035795b74b5456b251584d062ec6fb9cd738",class:"info-box"},"Após ",i("countdown-timer",{key:"6292e88fc610701330c2bf1a39f75d15bcbef4b3",initialValue:this.getTime(),downtime:()=>{this.loadingTime=true}}),", você poderá alterar sua escolha de usar ou não o Giftback."),i("div",{key:"10ff18273054939e4c1968bf21dc7e872879b0b0",class:"info-box"},"O Giftback será aplicado na próxima etapa."))}static get watchers(){return{bonus:["changedBonus"]}}};h.style=f;const b="*{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);font-weight:100}.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 x=b;const g=class{constructor(i){e(this,i);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 i(t,{key:"1133ae46d38d6b4e26f8aaac099b99932df6a745",class:"crm-phone-form"},i("label",{key:"538421a0779d973acdf16c6ef0910fe1e42e992e",class:"crm-subtitle"},"Digite o seu celular para verificar se há desconto disponível nessa compra:"),i("phone-input-mask",{key:"76e20e30715144c02a6d4864432ac3102bf193d9",initialValue:this.value,ref:e=>this.phoneInputMask=e}),i("crm-button",{key:"a886bd399e6da89676eabd4ac82011031c737a15",txtBtn:((e=this.config)===null||e===void 0?void 0:e.btnApplyBonusLabel)||"Avançar",loading:this.loading,handleClick:()=>this.handlePhone()}))}};g.style=x;const m=":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}.pin-container input{width:100%;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 u=m;const y="*{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);font-weight:100}.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 k=y;const M=class{constructor(i){e(this,i);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,i){const t=e.target;const o=t.value.slice(0,1);this.pin[i]=o;if(o&&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}}handleTimeout(){this.canResend=true}async handleResend(){await this.resend();this.canResend=false;this.pin=["","","",""]}render(){var e;return i("div",{key:"15aa6a8fe4e0fa3ea1a35e68b7853a4ca392899c",class:"crm-phone-form"},i("label",{key:"83d48a38bc6cbbdbd391d7253a1e1fc3d01c44d2",class:"crm-subtitle"},o.t("pin-sutitle")," ",i("strong",{key:"e88a16f28032afb4746dc8f97e83e2794b75f3fd"},"+55 ",this.phone)),i("div",{key:"516969313ac099dfa1e4761784ef5f4e5c5225c3",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("slot",{key:"b0ffbe2329a9e010766f3cf8e52943ebdbfe101e"}),i("p",{key:"91e9372e69f32ce93806ca194bf6347cd0a0a3ce",class:"crm-description"}," Não recebeu?",!this.canResend&&i("label",{key:"ed22df22e0498434ff3d6a187387aa8ddc48f6ef"}," Reenviar em ",i("countdown-timer",{key:"a81630d82997e9b74ceb08b52cd818d0aa81f00e",initialValue:30,downtime:()=>this.handleTimeout()})," "),this.canResend&&i("div",{key:"417c6dc13b0e87993c8dbb71d9e263678e1025d8"},i("a",{key:"9832f3c85b503e820d2452d76dc60a008ec250c9",onClick:()=>this.handleResend()},"Reenviar"),i("a",{key:"9c6ff0ab7b1e0f46235eed0a2e0c2142f3bd41f6",onClick:()=>this.cancel()},"Trocar número"))),i("crm-button",{key:"f347d33b491d5dae491ce5ed77e7f20734cfa76b",txtBtn:((e=this.config)===null||e===void 0?void 0:e.btnApplyBonusLabel)||"Avançar",loading:this.loading,handleClick:()=>this.validatePin()}))}};M.style=u+k;export{p as crm_tooltip,h as giftback_info,g as phone_form,M as pin_form};
|
2
|
-
//# sourceMappingURL=p-48a8f372.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["infoCircleSvgrepoComSvg","crmTooltipCss","CrmTooltipStyle0","Tooltip","render","h","key","class","src","info","id","this","identity","text","giftbackInfoCss","GiftbackInfoStyle0","GiftbackInfo","totalBonus","cartId","minimumPurchase","bonusBalance","calculatedValue","firstValidityDate","totalValue","changedBonus","updateBonus","usedValue","bonus","buildPositionSlider","componentWillLoad","selectedOption","localStorage","getItem","USED_KEY","handleSliderChange","event","input","target","parseFloat","value","min","max","componentDidLoad","document","getElementById","percentage_init","percentage","sliderPosition","sliderValuePosition","handleOptionChange","option","setItem","reserve","cancel","showTime","time","allow","getTime","Number","remainingGiftback","translateDescription","i18next","t","amount","toFixed","replace","custom_name","limit","defineLimit","innerHTML","formatDateToBr","style","left","disabled","type","step","onInput","background","isComplete","name","checked","onChange","_a","config","giftbackTitle","_b","initialValue","downtime","loadingTime","giftbackFormCss","PhoneFormStyle0","PhoneForm","handlePhone","phone","phoneInputMask","getPhone","handlerSubmit","Host","ref","txtBtn","btnApplyBonusLabel","loading","handleClick","pinFormCss","PinFormStyle0","PinFormStyle1","GiftbackPin","canResend","handleInput","index","slice","pin","length","nextInput","nextElementSibling","focus","validatePin","validate","join","verifyPin","pinCode","isVerified","handleTimeout","handleResend","resend","map","_","maxLength","onClick"],"sources":["src/assets/svg/info-circle-svgrepo-com.svg","src/components/tooltip/crm-tooltip.css?tag=crm-tooltip","src/components/tooltip/tooltip.tsx","src/components/giftback-form/subcomponents/giftback-info/giftback-info.css?tag=giftback-info","src/components/giftback-form/subcomponents/giftback-info/giftback-info.tsx","src/components/giftback-form/giftback-form.css?tag=phone-form","src/components/giftback-form/subcomponents/phone-form/phone-form.tsx","src/components/giftback-form/subcomponents/pin-form/pin-form.css?tag=pin-form&encapsulation=shadow","src/components/giftback-form/giftback-form.css?tag=pin-form&encapsulation=shadow","src/components/giftback-form/subcomponents/pin-form/pin-form.tsx"],"sourcesContent":["<?xml version=\"1.0\" encoding=\"utf-8\"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->\r\n<svg width=\"800px\" height=\"800px\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n<path d=\"M12 17.75C12.4142 17.75 12.75 17.4142 12.75 17V11C12.75 10.5858 12.4142 10.25 12 10.25C11.5858 10.25 11.25 10.5858 11.25 11V17C11.25 17.4142 11.5858 17.75 12 17.75Z\" fill=\"#1C274C\"/>\r\n<path d=\"M12 7C12.5523 7 13 7.44772 13 8C13 8.55228 12.5523 9 12 9C11.4477 9 11 8.55228 11 8C11 7.44772 11.4477 7 12 7Z\" fill=\"#1C274C\"/>\r\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12ZM12 2.75C6.89137 2.75 2.75 6.89137 2.75 12C2.75 17.1086 6.89137 21.25 12 21.25C17.1086 21.25 21.25 17.1086 21.25 12C21.25 6.89137 17.1086 2.75 12 2.75Z\" fill=\"#1C274C\"/>\r\n</svg>",".crm-tooltip-container {\n display: flex;\n\n & img {\n width: 16px;\n margin-left: 3px;\n position: relative;\n }\n}\n\n.crm-tooltip {\n position: relative;\n display: inline-block;\n}\n\n.crm-tooltip .tooltiptext {\n visibility: hidden;\n background-color: black;\n color: #fff;\n text-align: center;\n padding: 8px 12px;\n border-radius: 0px;\n position: absolute;\n z-index: 1;\n min-width: 271px;\n top: 100%;\n left: 50%;\n margin-left: -238px;\n}\n\n@container (max-width: 410px) {\n .crm-tooltip .tooltiptext {\n margin-left: -14px;\n }\n\n .crm-tooltip #crm-role-description {\n margin-left: -151px;\n }\n}\n\n@container (max-width: 250px) {\n .crm-tooltip .tooltiptext {\n margin-left: -201px;\n }\n}\n\n.crm-tooltip:hover .tooltiptext {\n visibility: visible;\n}","import { Component, h, Prop } from \"@stencil/core\";\nimport info from '../../assets/svg/info-circle-svgrepo-com.svg';\n\n\n@Component({\n tag: 'crm-tooltip',\n styleUrl: 'crm-tooltip.css'\n})\nexport class Tooltip {\n\n @Prop() text: string;\n @Prop() identity: string;\n\n render() {\n return (\n <div class=\"crm-tooltip-container crm-tooltip\">\n <img src={info} />\n <span id={this.identity} class=\"tooltiptext\">{this.text}</span>\n </div>\n );\n }\n}",":host {\n --text-color: #6D6D5F\n}\n\n.giftback-container {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\nh3 {\n font-size: 1.2rem;\n margin-bottom: 8px;\n color: #333;\n}\n\n.container-description {\n display: flex;\n align-items: center;\n gap: 5px;\n margin: 0 0 10px 0;\n}\n\n.container-description p {\n font-size: 14px;\n font-weight: 400;\n margin: 0px;\n}\n\n\np {\n font-size: 14px;\n color: #000;\n}\n\n.value-display h2 {\n color: #6D6D5F;\n /* Verde para o valor atual */\n font-size: 1.6rem;\n margin: 16px 0;\n}\n\ninput[type='range'] {\n width: 100%;\n margin: 12px 0;\n -webkit-appearance: none;\n background: #ddd;\n height: 4px;\n border-radius: 4px;\n outline: none;\n padding: 3px 0px 3px 3px;\n}\n\n/* input[type='range']::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 16px;\n height: 16px;\n background: var(--text-color);\n border-radius: 50%;\n cursor: pointer;\n} */\n\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 20px;\n height: 20px;\n background: rgb(109, 109, 95);\n /* Cor do botão */\n border-radius: 50%;\n cursor: pointer;\n}\n\n.options {\n margin: 0px 0;\n display: flex;\n gap: 10px;\n flex-direction: column;\n}\n\n.options label {\n display: flex;\n margin: 0px 0;\n font-size: 0.9rem;\n color: #333;\n align-items: center;\n}\n\n.options input[type='radio'] {\n margin-right: 8px;\n height: 16px;\n width: 16px;\n}\n\n.options input[type='radio'] {\n appearance: none;\n -webkit-appearance: none;\n margin-right: 8px;\n width: 16px;\n height: 16px;\n border: 2px solid #ddd;\n border-radius: 50%;\n background-color: #fff;\n cursor: pointer;\n transition: all 0.3s;\n padding: 0px;\n}\n\n.options input[type='radio']:checked {\n border-color: #000;\n background-color: #FAFAFA;\n border: 4px solid #000;\n}\n\n.info-box {\n background-color: #f9f9f9;\n border: 1px solid #e0e0e0;\n border-radius: 4px;\n padding: 8px;\n font-size: 14px;\n color: #262626;\n line-height: 20px;\n}\n\n.info-icon {\n font-size: 0.9rem;\n cursor: pointer;\n color: #888;\n}\n\nh3 {\n font-size: 1.2rem;\n margin-bottom: 8px;\n color: #333;\n}\n\n.slider-wrapper {\n position: relative;\n margin: 21px 0px 0px 0px;\n}\n\n.slider {\n width: 100%;\n -webkit-appearance: none;\n background: #ddd;\n height: 4px;\n border-radius: 2px;\n outline: none;\n}\n\n.slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 16px;\n height: 16px;\n background: var(--text-color);\n /* Azul para o slider */\n border-radius: 50%;\n cursor: pointer;\n}\n\n.slider-value {\n position: absolute;\n top: -30px;\n /* Posição acima do slider */\n font-size: 16px;\n font-weight: 700;\n color: var(--text-color);\n /* Verde para o texto */\n transform: translateX(-50%);\n white-space: nowrap;\n /* margin-left: 23px; */\n}\n\n.options-option {\n display: flex;\n}\n\n\n/* ########################################## */\n","import { Component, Prop, State, Watch, h } from \"@stencil/core\";\nimport { IBonus } from \"../../../../dto/validate.pin.bonus\";\n\nimport i18next from '../../../../i18n/i18n'\nimport { USED_KEY } from \"../../../../utils/keys.storage\";\nimport { defineLimit, formatDateToBr } from \"../../../../utils/utils\";\nimport { IInfoStore } from \"../../../../helpers/info.config.helper\";\n\n@Component({\n tag: 'giftback-info',\n styleUrls: ['giftback-info.css']\n})\nexport class GiftbackInfo {\n @State() usedValue: number = 0;\n @State() selectedOption: string = 'none';\n\n @Prop() loading: boolean = false;\n @Prop() bonus: Partial<IBonus> = {\n totalBonus: 0,\n cartId: \"\",\n minimumPurchase: 0,\n bonusBalance: 0,\n calculatedValue: 0,\n firstValidityDate: \"\",\n totalValue: 0\n };\n @Prop() reserve: (amountRedeemed: number) => void;\n @Prop() cancel: () => void;\n @Prop() config: IInfoStore;\n\n @State() sliderPosition: number = 0;\n @State() sliderValuePosition: number = 0;\n\n @State() loadingTime = false;\n\n @Watch(\"bonus\")\n changedBonus() {\n this.updateBonus()\n }\n\n private updateBonus() {\n this.usedValue = this.bonus.bonusBalance;\n this.buildPositionSlider(0, this.bonus.totalBonus);\n }\n\n componentWillLoad() {\n this.updateBonus();\n this.selectedOption = localStorage.getItem(USED_KEY);\n }\n\n handleSliderChange(event: Event) {\n const input = event.target as HTMLInputElement;\n this.usedValue = parseFloat(input.value);\n\n // Calculando a posição do texto com base no valor do slider\n // const percentage = ((this.usedValue - parseInt(input.min)) / (parseInt(input.max) - parseInt(input.min))) * 100;\n // this.sliderPosition = percentage;\n\n this.buildPositionSlider(parseFloat(input.min), parseFloat(input.max))\n }\n\n componentDidLoad() {\n const input: any = document.getElementById(\"position_value_id\")\n\n input.value = this.bonus.bonusBalance;\n }\n\n\n private buildPositionSlider(min: number, max: number) {\n\n const percentage_init = max * 0.1;\n\n // Calculando a posição do texto com base no valor do slider\n const percentage = ((this.usedValue - min) / (max - min)) * 100;\n\n this.sliderPosition = percentage;\n this.sliderValuePosition = percentage + (this.usedValue <= percentage_init ? 10 : 0);\n }\n\n async handleOptionChange(option: string) {\n this.selectedOption = option;\n\n localStorage.setItem(USED_KEY, option);\n\n switch (this.selectedOption) {\n case 'use':\n await this.reserve(this.usedValue);\n break;\n case 'dontUse':\n await this.cancel();\n break;\n default:\n }\n }\n\n showTime() {\n const time = localStorage.getItem(\"bc:time\");\n\n const allow = localStorage.getItem(\"bc:time-allow\");\n\n if(!allow) return false;\n\n return !!time;\n }\n\n getTime() {\n const time = localStorage.getItem(\"bc:time\");\n return Number(time) || 360;\n }\n\n render() {\n const remainingGiftback = this.bonus.minimumPurchase - this.bonus.totalValue;\n\n const translateDescription = i18next.t(\"giftDescription\", { amount: `${this.bonus.totalBonus.toFixed(2).replace(\".\", \",\")}`, custom_name: \"Giftback\" })\n\n const limit = defineLimit(remainingGiftback);\n\n return (\n\n <div class=\"giftback-container\">\n <div class=\"container-description\">\n <p innerHTML={translateDescription}></p>\n <crm-tooltip identity=\"crm-role-description\" text={i18next.t(\"labelUseGiftback\", { minimumPurchase: this.bonus.minimumPurchase, expírationDate: formatDateToBr(this.bonus.firstValidityDate) })} />\n </div>\n <div class=\"slider-wrapper\">\n <div\n class=\"slider-value\"\n style={{\n left: `calc(${this.sliderValuePosition}% - 20px)`, // Ajuste para centralizar o texto\n\n }}\n >\n R$ {this.usedValue.toFixed(2).replace(\".\", \",\")}\n </div>\n <input\n id=\"position_value_id\"\n disabled\n type=\"range\"\n min=\"0\"\n max={this.bonus.totalBonus}\n value={this.usedValue}\n class=\"slider\"\n step=\"0.01\"\n onInput={(event) => this.handleSliderChange(event)}\n style={{\n background: `linear-gradient(to right, #6D6D5F ${this.sliderPosition}%, #ddd ${this.sliderPosition}%)`,\n }}\n />\n </div>\n\n {\n limit.isComplete && (\n <p>\n {i18next.t(\"maxAmount\")}\n </p>\n )\n }\n\n {\n !limit.isComplete && (\n <div class=\"container-description\">\n <p>\n Adicione <strong>R$ {remainingGiftback < 0 ? \"0,00\" : remainingGiftback.toFixed(2).replace(\".\", \",\")}</strong> ao carrinho para atingir o valor\n máximo!\n </p>\n <crm-tooltip identity=\"crm-max-description\" text={i18next.t(\"labelamountPartial\")} />\n </div>\n )\n }\n\n\n <div class=\"options\">\n <div class=\"options-option\">\n <input\n disabled={this.showTime()}\n type=\"radio\"\n name=\"giftbackOption\"\n value=\"use\"\n checked={this.selectedOption === 'use'}\n onChange={() => this.handleOptionChange('use')}\n />\n <p>Usar o meu {this.config?.giftbackTitle}</p>\n </div>\n <div class=\"options-option\">\n <input\n disabled={this.showTime()}\n type=\"radio\"\n name=\"giftbackOption\"\n value=\"dontUse\"\n checked={this.selectedOption === 'dontUse'}\n onChange={() => this.handleOptionChange('dontUse')}\n />\n <p>Não usar o meu {this.config?.giftbackTitle}</p>\n </div>\n </div>\n\n {\n this.showTime() &&\n (\n <div class=\"info-box\">\n Após <countdown-timer initialValue={this.getTime()} downtime={() => { this.loadingTime = true }} />, você poderá alterar sua escolha de usar ou não o Giftback.\n </div>\n )\n }\n\n\n <div class=\"info-box\">\n O Giftback será aplicado na próxima etapa.\n </div>\n </div>\n );\n }\n}","* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\n:host {\n --crmfont-sizebodymd: 14px;\n --crmline-heightbodymd: 20px;\n --crmletter-spacingtitle-md: 0px\n}\n\n.container-message {\n font-family: Roboto;\n font-size: var(--crmfont-sizebodymd);\n font-weight: 400;\n line-height: var(--crmline-heightbodymd);\n letter-spacing: var(--crmletter-spacingtitle-md);\n text-align: left;\n text-underline-position: from-font;\n text-decoration-skip-ink: none;\n}\n\n.crm-container-form {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n height: auto;\n padding: 20px 24px 20px 24px;\n border: 1px solid #CCCC;\n writing-mode: horizontal-tb;\n gap: 16px;\n border-top: 1px solid #ccc !important;\n border-bottom: 1px solid #ccc !important;\n}\n\n/* .fbits-responsive-carrinho-desconto {\n overflow: hidden;\n border: 1px solid #ccc;\n border-top: 0;\n border-bottom: 0;\n} */\n\n.crm-phone-form {\n display: flex;\n flex-direction: column;\n height: 100%;\n /* justify-content: space-around; */\n gap: 16px;\n}\n\n.crm-subtitle {\n font-size: 14px;\n color: var(--crm-btn);\n font-weight: 100;\n}\n\n.crm-title {\n font-weight: 700;\n line-height: 20px;\n color: #262626;\n font-size: 16px;\n}\n\n.crm-message-info {\n color: #619013;\n font-weight: 500;\n font-size: 12px;\n}\n\n.crm-message-error {\n color: #E11D48;\n font-weight: 500;\n font-size: 12px;\n}","import { Component, Host, Prop, h } from \"@stencil/core\";\nimport { IInfoStore } from \"../../../../helpers/info.config.helper\";\n\n@Component({\n tag: 'phone-form',\n styleUrl: '../../giftback-form.css'\n})\nexport class PhoneForm {\n\n private phoneInputMask: HTMLPhoneInputMaskElement;\n\n @Prop() value: string;\n @Prop() loading: boolean;\n @Prop() handlerSubmit: (phone: string) => void;\n\n @Prop() config: IInfoStore;\n\n\n async handlePhone() {\n\n const phone = await this.phoneInputMask.getPhone()\n\n await this.handlerSubmit(phone);\n }\n\n\n render() {\n return (\n <Host class=\"crm-phone-form\">\n <label class=\"crm-subtitle\" >Digite o seu celular para verificar se há desconto disponível nessa compra:</label>\n <phone-input-mask initialValue={this.value} ref={ref => this.phoneInputMask = ref} />\n\n <crm-button txtBtn={this.config?.btnApplyBonusLabel || \"Avançar\"} loading={this.loading} handleClick={() => this.handlePhone() } />\n </Host>\n )\n }\n}",":host {\n display: block;\n font-family: Arial, sans-serif;\n}\n\n.form-container-pin {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.pin-container {\n display: flex;\n /* margin: 26px 0; */\n justify-content: start;\n gap: 10px;\n}\n\n.pin-container input {\n width: 100%;\n height: 48px;\n font-size: 14px;\n text-align: center;\n border: 1px solid #ccc;\n border-radius: 5px;\n}\n\nbutton {\n padding: 10px 20px;\n background-color: #ddd;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n}\n\n\n.success {\n color: green;\n margin-top: 10px;\n}\n\n.button {\n top: 50%;\n background-color: #6c6c7e;\n color: #fff;\n border: none;\n border-radius: 10px;\n padding: 15px;\n min-height: 30px;\n min-width: 120px;\n font-size: 20px;\n cursor: pointer;\n}\n\n.button-cancel {\n top: 50%;\n background-color: #ffffff;\n color: #1e1c1c;\n border: 1px solid gray;\n border-radius: 10px;\n padding: 10px;\n min-height: 30px;\n min-width: 120px;\n font-size: 19px;\n cursor: pointer;\n}\n\n.crm-description {\n font-size: 14px;\n width: 100%;\n display: flex;\n gap: 9px;\n}\n\n.crm-description a {\n font-weight: bold;\n cursor: pointer;\n text-decoration: underline;\n}\n\n.crm-description div {\n display: flex;\n gap: 5px;\n}","* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\n:host {\n --crmfont-sizebodymd: 14px;\n --crmline-heightbodymd: 20px;\n --crmletter-spacingtitle-md: 0px\n}\n\n.container-message {\n font-family: Roboto;\n font-size: var(--crmfont-sizebodymd);\n font-weight: 400;\n line-height: var(--crmline-heightbodymd);\n letter-spacing: var(--crmletter-spacingtitle-md);\n text-align: left;\n text-underline-position: from-font;\n text-decoration-skip-ink: none;\n}\n\n.crm-container-form {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n height: auto;\n padding: 20px 24px 20px 24px;\n border: 1px solid #CCCC;\n writing-mode: horizontal-tb;\n gap: 16px;\n border-top: 1px solid #ccc !important;\n border-bottom: 1px solid #ccc !important;\n}\n\n/* .fbits-responsive-carrinho-desconto {\n overflow: hidden;\n border: 1px solid #ccc;\n border-top: 0;\n border-bottom: 0;\n} */\n\n.crm-phone-form {\n display: flex;\n flex-direction: column;\n height: 100%;\n /* justify-content: space-around; */\n gap: 16px;\n}\n\n.crm-subtitle {\n font-size: 14px;\n color: var(--crm-btn);\n font-weight: 100;\n}\n\n.crm-title {\n font-weight: 700;\n line-height: 20px;\n color: #262626;\n font-size: 16px;\n}\n\n.crm-message-info {\n color: #619013;\n font-weight: 500;\n font-size: 12px;\n}\n\n.crm-message-error {\n color: #E11D48;\n font-weight: 500;\n font-size: 12px;\n}","import { Component, h, Prop, State } from '@stencil/core';\nimport { IPinSent } from '../../../../dto/pin.sent';\nimport i18next from '../../../../i18n/i18n'\nimport { IInfoStore } from '../../../../helpers/info.config.helper';\n\n@Component({\n tag: 'pin-form',\n styleUrls: ['pin-form.css', '../../giftback-form.css'],\n shadow: true,\n})\nexport class GiftbackPin {\n\n @Prop() validate: (pin: string) => void;\n @Prop() cancel: () => void;\n @Prop() resend: () => void;\n\n @Prop() sent: IPinSent;\n @Prop() loading: boolean = false;\n @Prop() phone: string;\n @Prop() config: IInfoStore;\n\n @State() pin: string[] = ['', '', '', ''];\n @State() isVerified: boolean = false;\n @State() canResend: boolean = false;\n\n componentWillLoad() {\n this.canResend = false;\n }\n\n handleInput(event: Event, index: number) {\n const input = event.target as HTMLInputElement;\n const value = input.value.slice(0, 1); // Limitar a um único dígito\n this.pin[index] = value;\n\n // Focar no próximo campo, se possível\n if (value && index < this.pin.length - 1) {\n const nextInput = input.nextElementSibling as HTMLInputElement;\n nextInput?.focus();\n }\n\n this.pin = [...this.pin];\n }\n\n validatePin() {\n this.validate(this.pin.join(\"\"))\n }\n\n verifyPin() {\n const pinCode = this.pin.join('');\n if (pinCode === '9999') {\n this.isVerified = true;\n }\n }\n\n handleTimeout() {\n this.canResend = true;\n }\n\n async handleResend() {\n await this.resend();\n\n this.canResend = false;\n this.pin = ['', '', '', '']\n }\n\n render() {\n return (\n <div class=\"crm-phone-form\">\n <label class=\"crm-subtitle\" >{i18next.t('pin-sutitle')} <strong>+55 {this.phone}</strong></label>\n <div class=\"pin-container\">\n {this.pin.map((_, index) => (\n <input\n type=\"text\"\n maxLength={1}\n value={this.pin[index]}\n onInput={(event) => this.handleInput(event, index)}\n />\n ))}\n </div>\n\n <slot></slot>\n\n <p class=\"crm-description\"> Não recebeu?\n {\n !this.canResend && <label> Reenviar em <countdown-timer initialValue={30} downtime={() => this.handleTimeout()} /> </label>\n }\n {\n this.canResend && (\n <div >\n <a onClick={() => this.handleResend()}>Reenviar</a>\n <a onClick={() => this.cancel()}>Trocar número</a>\n </div>\n )\n }\n </p>\n <crm-button txtBtn={this.config?.btnApplyBonusLabel || \"Avançar\"} loading={this.loading} handleClick={() => this.validatePin()} />\n </div >\n );\n }\n}\n"],"mappings":"qKAAA,MAAMA,EAA0B,yvCCAhC,MAAMC,EAAgB,03BACtB,MAAAC,EAAeD,E,MCOFE,EAAO,M,qEAKhB,MAAAC,GACI,OACIC,EAAA,OAAAC,IAAA,2CAAKC,MAAM,qCACPF,EAAA,OAAAC,IAAA,2CAAKE,IAAKC,IACVJ,EAAA,QAAAC,IAAA,2CAAMI,GAAIC,KAAKC,SAAUL,MAAM,eAAeI,KAAKE,M,aCjBnE,MAAMC,EAAkB,m7DACxB,MAAAC,EAAeD,E,MCWFE,EAAY,M,wCACQ,E,oBACK,O,aAEP,M,WACM,CAC7BC,WAAY,EACZC,OAAQ,GACRC,gBAAiB,EACjBC,aAAc,EACdC,gBAAiB,EACjBC,kBAAmB,GACnBC,WAAY,G,uFAMkB,E,yBACK,E,iBAEhB,K,CAGvB,YAAAC,GACIb,KAAKc,a,CAGD,WAAAA,GACJd,KAAKe,UAAYf,KAAKgB,MAAMP,aAC5BT,KAAKiB,oBAAoB,EAAGjB,KAAKgB,MAAMV,W,CAG3C,iBAAAY,GACIlB,KAAKc,cACLd,KAAKmB,eAAiBC,aAAaC,QAAQC,E,CAG/C,kBAAAC,CAAmBC,GACf,MAAMC,EAAQD,EAAME,OACpB1B,KAAKe,UAAYY,WAAWF,EAAMG,OAMlC5B,KAAKiB,oBAAoBU,WAAWF,E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