cas-ds-web-components 1.3.25 → 1.3.26
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/build/cas-booking-box.js
CHANGED
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
* @license
|
|
307
307
|
* Copyright 2018 Google LLC
|
|
308
308
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
309
|
-
*/const qt=ke(class extends Ee{constructor(n){var t;if(super(n),n.type!==we.ATTRIBUTE||n.name!=="class"||((t=n.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(t=>n[t]).join(" ")+" "}update(n,[t]){var e,i;if(this.it===void 0){this.it=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in t)t[a]&&!(!((e=this.nt)===null||e===void 0)&&e.has(a))&&this.it.add(a);return this.render(t)}const o=n.element.classList;this.it.forEach(a=>{a in t||(o.remove(a),this.it.delete(a))});for(const a in t){const s=!!t[a];s===this.it.has(a)||!((i=this.nt)===null||i===void 0)&&i.has(a)||(s?(o.add(a),this.it.add(a)):(o.remove(a),this.it.delete(a)))}return H}}),Se=[{name:"Consulta médica",items:[{name:"Consulta pediátrica",link:"https://www.clinicaalemana.cl/consulta-pediatrica-2026"},{name:"Presencial",link:"https://reserva.alemana.cl/reserva/portal/busqueda"},{name:"
|
|
309
|
+
*/const qt=ke(class extends Ee{constructor(n){var t;if(super(n),n.type!==we.ATTRIBUTE||n.name!=="class"||((t=n.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(t=>n[t]).join(" ")+" "}update(n,[t]){var e,i;if(this.it===void 0){this.it=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in t)t[a]&&!(!((e=this.nt)===null||e===void 0)&&e.has(a))&&this.it.add(a);return this.render(t)}const o=n.element.classList;this.it.forEach(a=>{a in t||(o.remove(a),this.it.delete(a))});for(const a in t){const s=!!t[a];s===this.it.has(a)||!((i=this.nt)===null||i===void 0)&&i.has(a)||(s?(o.add(a),this.it.add(a)):(o.remove(a),this.it.delete(a)))}return H}}),Se=[{name:"Consulta médica",items:[{name:"Consulta pediátrica",link:"https://www.clinicaalemana.cl/consulta-pediatrica-2026"},{name:"Presencial",link:"https://reserva.alemana.cl/reserva/portal/busqueda"},{name:"Teleconsulta",link:"https://agenda.clinicaalemana.cl/paciente"},{name:"TeleUrgencia",link:"https://www.clinicaalemana.cl/telemedicina/teleurgencia"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio"},{name:"Teledermatología",link:"https://teledermatologia.clinicaalemana.cl/"}]},{name:"Rehabilitación y bienestar",items:[{name:"Kinesiología",link:"https://agenda.clinicaalemana.cl/rehabilitacion-y-bienestar/seleccion-categoria"},{name:"Masoterapia",link:"https://agenda.clinicaalemana.cl/examenes-y-procedimientos/masoterapia/masoterapia-masaje-deportivo/disponibilidad"}]},{name:"Exámenes y procedimientos",items:[{name:"Presencial",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio/examenes-laboratorio-domicilio"}]},{name:"Vacunas",items:[{name:"Viajeros",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/reserva-vacuna-fiebre-amarilla"},{name:"TeleAsesoría pediátrica",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/asesoria-en-vacunacion-pediatrica"}]}],Ce=[{name:"Consulta médica",link:"https://reserva.clinicaalemana.cl/alemana-integral"},{name:"Exámenes y procedimientos",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"}],pt=Se,Wt=Ce;class V extends R{constructor(){super(),this.hidden=!1,this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.dataTipoDeAtencion=[],this.dataModalidad=[],this.opcionSelecionada="Paciente",this.focused=!1,this.refresh=!1,this.link=""}changeHandler(t){var i,o;const e=t.target.name;if(this[e]=t.composedPath()[0].value,this.handleErrorTipoDeAtencion(!1),this.handleErrorModalidad(!1),e==="tipoDeAtencionIntegral"&&(this.tipoDeAtencion="",this.modalidad=""),e==="tipoDeAtencion"){this.modalidad="",this.refresh=!0,this.handleFocusModalidad(!0),this.handleFocusTipoDeAtencion(!1);const a=((o=(i=pt.find(s=>s.name===this.tipoDeAtencion))==null?void 0:i.items)==null?void 0:o.map(s=>s.name))||[];t.target.value==="Consulta pediátrica"&&this.handleLink(),this.dataModalidad=[...a],this.requestUpdate(),setTimeout(()=>{this.refresh=!1,this.requestUpdate()},100)}e==="modalidad"&&this.handleFocusModalidad(!1),this.handleLink()}handleFocusTipoDeAtencion(t){const e=this.shadowRoot.getElementById("tipoDeAtencion");e==null||e.setAttribute("active",t)}handleFocusModalidad(t){const e=this.shadowRoot.getElementById("modalidad");e==null||e.setAttribute("active",t)}handleErrorTipoDeAtencion(t){const e=this.shadowRoot.getElementById("tipoDeAtencion");t?e==null||e.setAttribute("isSelectError",!0):e==null||e.removeAttribute("isSelectError")}handleErrorModalidad(t){const e=this.shadowRoot.getElementById("modalidad");t?e==null||e.setAttribute("isSelectError",!0):e==null||e.removeAttribute("isSelectError")}handleLink(){let t="";this.tipoDeAtencionIntegral!==""&&(t=Wt.find(i=>i.name===this.tipoDeAtencionIntegral).link),this.tipoDeAtencion!==""&&this.modalidad!==""&&(t=pt.find(i=>i.name===this.tipoDeAtencion).items.find(i=>i.name===this.modalidad).link),this.tipoDeAtencion==="Consulta pediátrica"&&(t="https://www.clinicaalemana.cl/consulta-pediatrica-2025"),this.link=t;const e=this.shadowRoot.querySelector(".btn-action");this.link!==""?e.setAttribute("href",this.link):e.removeAttribute("href")}submit(){this.link!==""?this.handleMark({category:"reservar_hora"}):this.tipoDeAtencion===""?(this.handleErrorTipoDeAtencion(!0),this.handleErrorModalidad(!0)):(this.handleFocusModalidad(!1),this.handleErrorModalidad(!0))}handleMark({category:t,action:e,label:i}){const o={event:"evento-interactivo","evento-interactivo-categoria":t,"evento-interactivo-accion":e||this.tipoDeAtencion||this.tipoDeAtencionIntegral||"reservar_hora","evento-interactivo-etiqueta":i||this.modalidad,opcion_seleccionada:this.opcionSelecionada};console.log("devLayer_ ",o);try{window.dataLayer.push(o)}catch{console.log("event push failed")}}eventHandler(){this.removeAttribute("hidden");let t=this.shadowRoot.getElementById("backdrop");t.style.display="flex",this.hidden=!1,this.focused=!0,this.requestUpdate()}firstUpdated(){if(this.handleParameter(),setTimeout(()=>{this.handleTab()},1e3),this.onlyView||document.addEventListener("openBookingBox",()=>{this.eventHandler()}),window.innerWidth>1023){const t=this.shadowRoot.querySelector(".booking-box");let e=this.shadowRoot.getElementById("backdrop");t.addEventListener("focusin",()=>{this.focused=!0,e.style.display="flex",this.requestUpdate()})}}handleTab(t){this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.handleLink();const e={1:"Paciente",2:"Alemana Integral"};this.opcionSelecionada=e[t]??"Paciente";const i=this.shadowRoot.querySelectorAll("[data-view]");if(t){const o=this.shadowRoot.querySelectorAll(".top .item");this.shadowRoot.querySelector(".option-box").setAttribute("current-view",t.toString()),i.forEach(s=>{s.getAttribute("data-view")===t.toString()?s.style.display="flex":s.style.display="none"}),o.forEach(s=>{s.getAttribute("data-tab")===t.toString()?s.querySelector("cas-radio").setAttribute("checked",!0):s.querySelector("cas-radio").removeAttribute("checked")})}else Array.from(i).filter(a=>a.getAttribute("data-view")==="2").forEach(a=>{a.style.display="none"})}handleParameter(){new URLSearchParams(window.location.search).get("rsv")==="true"&&this.eventHandler()}closeHandler(){let t=this.shadowRoot.getElementById("backdrop");t.style.display="none",this.hidden=!1,this.focused=!1,this.requestUpdate()}handleOverrideTime(){this.handleMark({category:"anular_hora"})}render(){const t=qt({"booking-box":!0,hidden:this.hidden,home:this.home,focused:this.focused}),e=qt({backdrop:!0,hidden:this.hidden});return ct`
|
|
310
310
|
<div class="${e}" id="backdrop" @click="${this.closeHandler}"></div>
|
|
311
311
|
<div class="booking-box-main-cont" id="booking-box-main-cont">
|
|
312
312
|
<div class="${t}" id="booking-box" tabindex="0">
|
|
@@ -16,7 +16,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16
16
|
document.head.appendChild(font2);
|
|
17
17
|
})();
|
|
18
18
|
const name = "@eloisa-ds/all-components";
|
|
19
|
-
const version$1 = "1.3.
|
|
19
|
+
const version$1 = "1.3.26";
|
|
20
20
|
const dependencies = {};
|
|
21
21
|
const main = "./index.js";
|
|
22
22
|
const module$1 = "./index.mjs";
|
|
@@ -2812,10 +2812,10 @@ var __publicField = (obj, key, value) => {
|
|
|
2812
2812
|
name: "Presencial",
|
|
2813
2813
|
link: "https://reserva.alemana.cl/reserva/portal/busqueda"
|
|
2814
2814
|
},
|
|
2815
|
-
{
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
},
|
|
2815
|
+
// {
|
|
2816
|
+
// name: 'Maitencillo',
|
|
2817
|
+
// link: 'https://www.clinicaalemana.cl/sucursales/centros-medicos/centro-medico-maitencillo',
|
|
2818
|
+
// },
|
|
2819
2819
|
{
|
|
2820
2820
|
name: "Teleconsulta",
|
|
2821
2821
|
link: "https://agenda.clinicaalemana.cl/paciente"
|
|
@@ -13,7 +13,7 @@ import { x as x$1, i as i$b, r as r$7, s as s$8, a as x$2, T as T$6, o as o$d, D
|
|
|
13
13
|
document.head.appendChild(font2);
|
|
14
14
|
})();
|
|
15
15
|
const name = "@eloisa-ds/all-components";
|
|
16
|
-
const version$1 = "1.3.
|
|
16
|
+
const version$1 = "1.3.26";
|
|
17
17
|
const dependencies = {};
|
|
18
18
|
const main = "./index.js";
|
|
19
19
|
const module$1 = "./index.mjs";
|
|
@@ -1996,10 +1996,10 @@ const dataPatient = [
|
|
|
1996
1996
|
name: "Presencial",
|
|
1997
1997
|
link: "https://reserva.alemana.cl/reserva/portal/busqueda"
|
|
1998
1998
|
},
|
|
1999
|
-
{
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
},
|
|
1999
|
+
// {
|
|
2000
|
+
// name: 'Maitencillo',
|
|
2001
|
+
// link: 'https://www.clinicaalemana.cl/sucursales/centros-medicos/centro-medico-maitencillo',
|
|
2002
|
+
// },
|
|
2003
2003
|
{
|
|
2004
2004
|
name: "Teleconsulta",
|
|
2005
2005
|
link: "https://agenda.clinicaalemana.cl/paciente"
|
package/build/cas-header.js
CHANGED
|
@@ -1068,7 +1068,7 @@
|
|
|
1068
1068
|
* @license
|
|
1069
1069
|
* Copyright 2018 Google LLC
|
|
1070
1070
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1071
|
-
*/const pe=Wa(class extends _r{constructor(s){var t;if(super(s),s.type!==fr.ATTRIBUTE||s.name!=="class"||((t=s.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){var e,i;if(this.it===void 0){this.it=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(h=>h!=="")));for(const h in t)t[h]&&!(!((e=this.nt)===null||e===void 0)&&e.has(h))&&this.it.add(h);return this.render(t)}const a=s.element.classList;this.it.forEach(h=>{h in t||(a.remove(h),this.it.delete(h))});for(const h in t){const o=!!t[h];o===this.it.has(h)||!((i=this.nt)===null||i===void 0)&&i.has(h)||(o?(a.add(h),this.it.add(h)):(a.remove(h),this.it.delete(h)))}return Lt}}),Mr=[{name:"Consulta médica",items:[{name:"Consulta pediátrica",link:"https://www.clinicaalemana.cl/consulta-pediatrica-2026"},{name:"Presencial",link:"https://reserva.alemana.cl/reserva/portal/busqueda"},{name:"
|
|
1071
|
+
*/const pe=Wa(class extends _r{constructor(s){var t;if(super(s),s.type!==fr.ATTRIBUTE||s.name!=="class"||((t=s.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){var e,i;if(this.it===void 0){this.it=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(h=>h!=="")));for(const h in t)t[h]&&!(!((e=this.nt)===null||e===void 0)&&e.has(h))&&this.it.add(h);return this.render(t)}const a=s.element.classList;this.it.forEach(h=>{h in t||(a.remove(h),this.it.delete(h))});for(const h in t){const o=!!t[h];o===this.it.has(h)||!((i=this.nt)===null||i===void 0)&&i.has(h)||(o?(a.add(h),this.it.add(h)):(a.remove(h),this.it.delete(h)))}return Lt}}),Mr=[{name:"Consulta médica",items:[{name:"Consulta pediátrica",link:"https://www.clinicaalemana.cl/consulta-pediatrica-2026"},{name:"Presencial",link:"https://reserva.alemana.cl/reserva/portal/busqueda"},{name:"Teleconsulta",link:"https://agenda.clinicaalemana.cl/paciente"},{name:"TeleUrgencia",link:"https://www.clinicaalemana.cl/telemedicina/teleurgencia"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio"},{name:"Teledermatología",link:"https://teledermatologia.clinicaalemana.cl/"}]},{name:"Rehabilitación y bienestar",items:[{name:"Kinesiología",link:"https://agenda.clinicaalemana.cl/rehabilitacion-y-bienestar/seleccion-categoria"},{name:"Masoterapia",link:"https://agenda.clinicaalemana.cl/examenes-y-procedimientos/masoterapia/masoterapia-masaje-deportivo/disponibilidad"}]},{name:"Exámenes y procedimientos",items:[{name:"Presencial",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio/examenes-laboratorio-domicilio"}]},{name:"Vacunas",items:[{name:"Viajeros",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/reserva-vacuna-fiebre-amarilla"},{name:"TeleAsesoría pediátrica",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/asesoria-en-vacunacion-pediatrica"}]}],zr=[{name:"Consulta médica",link:"https://reserva.clinicaalemana.cl/alemana-integral"},{name:"Exámenes y procedimientos",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"}],S1=Mr,Za=zr;class ve extends b{constructor(){super(),this.hidden=!1,this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.dataTipoDeAtencion=[],this.dataModalidad=[],this.opcionSelecionada="Paciente",this.focused=!1,this.refresh=!1,this.link=""}changeHandler(t){var i,a;const e=t.target.name;if(this[e]=t.composedPath()[0].value,this.handleErrorTipoDeAtencion(!1),this.handleErrorModalidad(!1),e==="tipoDeAtencionIntegral"&&(this.tipoDeAtencion="",this.modalidad=""),e==="tipoDeAtencion"){this.modalidad="",this.refresh=!0,this.handleFocusModalidad(!0),this.handleFocusTipoDeAtencion(!1);const h=((a=(i=S1.find(o=>o.name===this.tipoDeAtencion))==null?void 0:i.items)==null?void 0:a.map(o=>o.name))||[];t.target.value==="Consulta pediátrica"&&this.handleLink(),this.dataModalidad=[...h],this.requestUpdate(),setTimeout(()=>{this.refresh=!1,this.requestUpdate()},100)}e==="modalidad"&&this.handleFocusModalidad(!1),this.handleLink()}handleFocusTipoDeAtencion(t){const e=this.shadowRoot.getElementById("tipoDeAtencion");e==null||e.setAttribute("active",t)}handleFocusModalidad(t){const e=this.shadowRoot.getElementById("modalidad");e==null||e.setAttribute("active",t)}handleErrorTipoDeAtencion(t){const e=this.shadowRoot.getElementById("tipoDeAtencion");t?e==null||e.setAttribute("isSelectError",!0):e==null||e.removeAttribute("isSelectError")}handleErrorModalidad(t){const e=this.shadowRoot.getElementById("modalidad");t?e==null||e.setAttribute("isSelectError",!0):e==null||e.removeAttribute("isSelectError")}handleLink(){let t="";this.tipoDeAtencionIntegral!==""&&(t=Za.find(i=>i.name===this.tipoDeAtencionIntegral).link),this.tipoDeAtencion!==""&&this.modalidad!==""&&(t=S1.find(i=>i.name===this.tipoDeAtencion).items.find(i=>i.name===this.modalidad).link),this.tipoDeAtencion==="Consulta pediátrica"&&(t="https://www.clinicaalemana.cl/consulta-pediatrica-2025"),this.link=t;const e=this.shadowRoot.querySelector(".btn-action");this.link!==""?e.setAttribute("href",this.link):e.removeAttribute("href")}submit(){this.link!==""?this.handleMark({category:"reservar_hora"}):this.tipoDeAtencion===""?(this.handleErrorTipoDeAtencion(!0),this.handleErrorModalidad(!0)):(this.handleFocusModalidad(!1),this.handleErrorModalidad(!0))}handleMark({category:t,action:e,label:i}){const a={event:"evento-interactivo","evento-interactivo-categoria":t,"evento-interactivo-accion":e||this.tipoDeAtencion||this.tipoDeAtencionIntegral||"reservar_hora","evento-interactivo-etiqueta":i||this.modalidad,opcion_seleccionada:this.opcionSelecionada};console.log("devLayer_ ",a);try{window.dataLayer.push(a)}catch{console.log("event push failed")}}eventHandler(){this.removeAttribute("hidden");let t=this.shadowRoot.getElementById("backdrop");t.style.display="flex",this.hidden=!1,this.focused=!0,this.requestUpdate()}firstUpdated(){if(this.handleParameter(),setTimeout(()=>{this.handleTab()},1e3),this.onlyView||document.addEventListener("openBookingBox",()=>{this.eventHandler()}),window.innerWidth>1023){const t=this.shadowRoot.querySelector(".booking-box");let e=this.shadowRoot.getElementById("backdrop");t.addEventListener("focusin",()=>{this.focused=!0,e.style.display="flex",this.requestUpdate()})}}handleTab(t){this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.handleLink();const e={1:"Paciente",2:"Alemana Integral"};this.opcionSelecionada=e[t]??"Paciente";const i=this.shadowRoot.querySelectorAll("[data-view]");if(t){const a=this.shadowRoot.querySelectorAll(".top .item");this.shadowRoot.querySelector(".option-box").setAttribute("current-view",t.toString()),i.forEach(o=>{o.getAttribute("data-view")===t.toString()?o.style.display="flex":o.style.display="none"}),a.forEach(o=>{o.getAttribute("data-tab")===t.toString()?o.querySelector("cas-radio").setAttribute("checked",!0):o.querySelector("cas-radio").removeAttribute("checked")})}else Array.from(i).filter(h=>h.getAttribute("data-view")==="2").forEach(h=>{h.style.display="none"})}handleParameter(){new URLSearchParams(window.location.search).get("rsv")==="true"&&this.eventHandler()}closeHandler(){let t=this.shadowRoot.getElementById("backdrop");t.style.display="none",this.hidden=!1,this.focused=!1,this.requestUpdate()}handleOverrideTime(){this.handleMark({category:"anular_hora"})}render(){const t=pe({"booking-box":!0,hidden:this.hidden,home:this.home,focused:this.focused}),e=pe({backdrop:!0,hidden:this.hidden});return f`
|
|
1072
1072
|
<div class="${e}" id="backdrop" @click="${this.closeHandler}"></div>
|
|
1073
1073
|
<div class="booking-box-main-cont" id="booking-box-main-cont">
|
|
1074
1074
|
<div class="${t}" id="booking-box" tabindex="0">
|