cas-ds-web-components 1.2.72 → 1.2.73
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(b,J){typeof exports=="object"&&typeof module<"u"?J(exports):typeof define=="function"&&define.amd?define(["exports"],J):(b=typeof globalThis<"u"?globalThis:b||self,J(b["all-components"]={}))})(this,function(b){"use strict";var Tv=Object.defineProperty;var Iv=(b,J,J1)=>J in b?Tv(b,J,{enumerable:!0,configurable:!0,writable:!0,value:J1}):b[J]=J1;var g=(b,J,J1)=>(Iv(b,typeof J!="symbol"?J+"":J,J1),J1);var I3,SC;(()=>{const i=document.createElement("link");i.setAttribute("href","https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap"),i.setAttribute("rel","stylesheet"),document.head.appendChild(i)})();const Y5={name:"@eloisa-ds/all-components",version:"1.0.
|
|
1
|
+
(function(b,J){typeof exports=="object"&&typeof module<"u"?J(exports):typeof define=="function"&&define.amd?define(["exports"],J):(b=typeof globalThis<"u"?globalThis:b||self,J(b["all-components"]={}))})(this,function(b){"use strict";var Tv=Object.defineProperty;var Iv=(b,J,J1)=>J in b?Tv(b,J,{enumerable:!0,configurable:!0,writable:!0,value:J1}):b[J]=J1;var g=(b,J,J1)=>(Iv(b,typeof J!="symbol"?J+"":J,J1),J1);var I3,SC;(()=>{const i=document.createElement("link");i.setAttribute("href","https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap"),i.setAttribute("rel","stylesheet"),document.head.appendChild(i)})();const Y5={name:"@eloisa-ds/all-components",version:"1.0.76",dependencies:{},main:"./index.js",module:"./index.mjs",typings:"./index.d.ts",private:!0};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -11878,7 +11878,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11878
11878
|
// img {
|
|
11879
11879
|
// filter: none;
|
|
11880
11880
|
// }
|
|
11881
|
-
`,C==null||C.appendChild(t)}else{const t=document.querySelector('[data-name="eloisa-ds-dark-mode"]');t==null||t.remove()}}handleEvents(){const C=o=>{this.setAttribute("darkMode",o.detail.isDark)},t=()=>{this.handleTheme({theme:"dark"})},e=()=>{this.handleTheme({theme:"light"})};document.addEventListener("themeChange",C),document.addEventListener("onDarkMode",t),document.addEventListener("onLightMode",e),setTimeout(()=>{const o=this.disableMode==="true";this.darkMode==="true"&&!o&&t(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",function(l){!localStorage.getItem("theme")&&!o&&(l.matches?t():e())})},1e3)}async handleAlert(){const C={type:"getAlert",showAlert:!0,alert:{Id:"3a2c0001-f74f-4004-bab2-d71ff5948d5e",LastModified:"2024-06-24T15:36:42Z",PublicationDate:"2024-06-13T19:31:49Z",DateCreated:"2022-11-07T21:01:31Z",IncludeInSitemap:!0,SystemSourceKey:null,UrlName:"alert-home",ItemDefaultUrl:"/alert-home",enabled:!
|
|
11881
|
+
`,C==null||C.appendChild(t)}else{const t=document.querySelector('[data-name="eloisa-ds-dark-mode"]');t==null||t.remove()}}handleEvents(){const C=o=>{this.setAttribute("darkMode",o.detail.isDark)},t=()=>{this.handleTheme({theme:"dark"})},e=()=>{this.handleTheme({theme:"light"})};document.addEventListener("themeChange",C),document.addEventListener("onDarkMode",t),document.addEventListener("onLightMode",e),setTimeout(()=>{const o=this.disableMode==="true";this.darkMode==="true"&&!o&&t(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",function(l){!localStorage.getItem("theme")&&!o&&(l.matches?t():e())})},1e3)}async handleAlert(){const C={type:"getAlert",showAlert:!0,alert:{Id:"3a2c0001-f74f-4004-bab2-d71ff5948d5e",LastModified:"2024-06-24T15:36:42Z",PublicationDate:"2024-06-13T19:31:49Z",DateCreated:"2022-11-07T21:01:31Z",IncludeInSitemap:!0,SystemSourceKey:null,UrlName:"alert-home",ItemDefaultUrl:"/alert-home",enabled:!1,endDate:"2024-06-25T04:57:00Z",Title:"Alert",Icono:"4",Contenido:'<div><div role="presentation" data-qa="message_content"><div><div data-qa="message-text"><div data-qa="block-kit-renderer"><div><div dir="auto"><div><p class="mb-0"><strong></strong><strong></strong><strong data-stringify-type="bold"></strong><strong data-stringify-type="bold"></strong><strong data-stringify-type="bold"></strong><strong data-stringify-type="bold"></strong><strong>¡Importante!</strong> En este momento, la visualización de exámenes no está disponible en Mi Alemana Go. Sin embargo, puedes hacerlo <a href="https://mipaginadesalud.alemana.cl/wps/portal/mpdsvp/">aqui</a>.</p></div></div></div></div></div></div></div></div><div role="group"><div role="group" aria-label="Acciones en torno a un mensaje" data-qa="message-actions"></div></div><a href="https://www.google.com"></a>',startDate:"2024-06-24T14:14:07Z",Provider:"dynamicProvider121"}};{const{showAlert:t,alert:e}=C;if(t){if(console.log(e),!e||!e.enabled)return!1;let o=new Date,a=new Date(e==null?void 0:e.startDate),l=new Date(e==null?void 0:e.endDate);if(o>a&&o<l)this.showAlert=t,this.alert={title:e==null?void 0:e.Titulo,text:e==null?void 0:e.Contenido,active:e==null?void 0:e.enabled},console.log("Alerta activa"),this.delay(200).then(()=>this.handleSpaces());else return!1;this.requestUpdate()}}}async delay(C){return new Promise(t=>setTimeout(t,C))}async handleSpaces(){var a,l,h;const C=this.shadowRoot.querySelector("cas-header-taxonomy"),t=(a=this.shadowRoot.querySelector("cas-header-head"))==null?void 0:a.getClientRects()[0].height,e=(l=this.shadowRoot.querySelector("cas-header-pre-head"))==null?void 0:l.getClientRects()[0].height,o=(h=this.shadowRoot.querySelector("cas-header-taxonomy"))==null?void 0:h.getClientRects()[0].height;if(this.showAlert){const n=this.shadowRoot.querySelector("cas-alert");n==null||n.addEventListener("close",()=>{this.showAlert=!1,this.spaceHeight=t+e+o,C.style.top=`${t+e}px`,this.requestUpdate()});const r=n==null?void 0:n.getClientRects()[0].height;this.type!==t1.HOME?this.spaceHeight=t+r:(this.spaceHeight=t+e+o+r,C.style.top=`${t+e+r}px`)}else this.type!==t1.HOME?this.spaceHeight=t:(this.spaceHeight=t+e+o,C.style.top=`${t+e}px`);this.requestUpdate()}async firstUpdated(){const C=this.disableMode==="true",{theme:t}=Fp(this.darkMode);this.theme=C?"light":t,this.defaultDarkMode(),this.handleEvents(),await this.handleAlert(),await this.delay(200),this.handleSpaces()}render(){const{alert:C,type:t,bookingBox:e,theme:o}=this,a=e==="true";return M`
|
|
11882
11882
|
<header class="container ${this.type}" data-theme=${o} style="height: ${this.spaceHeight}px">
|
|
11883
11883
|
${this.showAlert?M`<cas-alert
|
|
11884
11884
|
showCloseButton
|
package/build/cas-header.js
CHANGED
|
@@ -11878,7 +11878,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11878
11878
|
// img {
|
|
11879
11879
|
// filter: none;
|
|
11880
11880
|
// }
|
|
11881
|
-
`,C==null||C.appendChild(t)}else{const t=document.querySelector('[data-name="eloisa-ds-dark-mode"]');t==null||t.remove()}}handleEvents(){const C=i=>{this.setAttribute("darkMode",i.detail.isDark)},t=()=>{this.handleTheme({theme:"dark"})},e=()=>{this.handleTheme({theme:"light"})};document.addEventListener("themeChange",C),document.addEventListener("onDarkMode",t),document.addEventListener("onLightMode",e),setTimeout(()=>{const i=this.disableMode==="true";this.darkMode==="true"&&!i&&t(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",function(a){!localStorage.getItem("theme")&&!i&&(a.matches?t():e())})},1e3)}async handleAlert(){const C={type:"getAlert",showAlert:!0,alert:{Id:"3a2c0001-f74f-4004-bab2-d71ff5948d5e",LastModified:"2024-06-24T15:36:42Z",PublicationDate:"2024-06-13T19:31:49Z",DateCreated:"2022-11-07T21:01:31Z",IncludeInSitemap:!0,SystemSourceKey:null,UrlName:"alert-home",ItemDefaultUrl:"/alert-home",enabled:!
|
|
11881
|
+
`,C==null||C.appendChild(t)}else{const t=document.querySelector('[data-name="eloisa-ds-dark-mode"]');t==null||t.remove()}}handleEvents(){const C=i=>{this.setAttribute("darkMode",i.detail.isDark)},t=()=>{this.handleTheme({theme:"dark"})},e=()=>{this.handleTheme({theme:"light"})};document.addEventListener("themeChange",C),document.addEventListener("onDarkMode",t),document.addEventListener("onLightMode",e),setTimeout(()=>{const i=this.disableMode==="true";this.darkMode==="true"&&!i&&t(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",function(a){!localStorage.getItem("theme")&&!i&&(a.matches?t():e())})},1e3)}async handleAlert(){const C={type:"getAlert",showAlert:!0,alert:{Id:"3a2c0001-f74f-4004-bab2-d71ff5948d5e",LastModified:"2024-06-24T15:36:42Z",PublicationDate:"2024-06-13T19:31:49Z",DateCreated:"2022-11-07T21:01:31Z",IncludeInSitemap:!0,SystemSourceKey:null,UrlName:"alert-home",ItemDefaultUrl:"/alert-home",enabled:!1,endDate:"2024-06-25T04:57:00Z",Title:"Alert",Icono:"4",Contenido:'<div><div role="presentation" data-qa="message_content"><div><div data-qa="message-text"><div data-qa="block-kit-renderer"><div><div dir="auto"><div><p class="mb-0"><strong></strong><strong></strong><strong data-stringify-type="bold"></strong><strong data-stringify-type="bold"></strong><strong data-stringify-type="bold"></strong><strong data-stringify-type="bold"></strong><strong>¡Importante!</strong> En este momento, la visualización de exámenes no está disponible en Mi Alemana Go. Sin embargo, puedes hacerlo <a href="https://mipaginadesalud.alemana.cl/wps/portal/mpdsvp/">aqui</a>.</p></div></div></div></div></div></div></div></div><div role="group"><div role="group" aria-label="Acciones en torno a un mensaje" data-qa="message-actions"></div></div><a href="https://www.google.com"></a>',startDate:"2024-06-24T14:14:07Z",Provider:"dynamicProvider121"}};{const{showAlert:t,alert:e}=C;if(t){if(console.log(e),!e||!e.enabled)return!1;let i=new Date,l=new Date(e==null?void 0:e.startDate),a=new Date(e==null?void 0:e.endDate);if(i>l&&i<a)this.showAlert=t,this.alert={title:e==null?void 0:e.Titulo,text:e==null?void 0:e.Contenido,active:e==null?void 0:e.enabled},console.log("Alerta activa"),this.delay(200).then(()=>this.handleSpaces());else return!1;this.requestUpdate()}}}async delay(C){return new Promise(t=>setTimeout(t,C))}async handleSpaces(){var l,a,n;const C=this.shadowRoot.querySelector("cas-header-taxonomy"),t=(l=this.shadowRoot.querySelector("cas-header-head"))==null?void 0:l.getClientRects()[0].height,e=(a=this.shadowRoot.querySelector("cas-header-pre-head"))==null?void 0:a.getClientRects()[0].height,i=(n=this.shadowRoot.querySelector("cas-header-taxonomy"))==null?void 0:n.getClientRects()[0].height;if(this.showAlert){const h=this.shadowRoot.querySelector("cas-alert");h==null||h.addEventListener("close",()=>{this.showAlert=!1,this.spaceHeight=t+e+i,C.style.top=`${t+e}px`,this.requestUpdate()});const r=h==null?void 0:h.getClientRects()[0].height;this.type!==q.HOME?this.spaceHeight=t+r:(this.spaceHeight=t+e+i+r,C.style.top=`${t+e+r}px`)}else this.type!==q.HOME?this.spaceHeight=t:(this.spaceHeight=t+e+i,C.style.top=`${t+e}px`);this.requestUpdate()}async firstUpdated(){const C=this.disableMode==="true",{theme:t}=Uc(this.darkMode);this.theme=C?"light":t,this.defaultDarkMode(),this.handleEvents(),await this.handleAlert(),await this.delay(200),this.handleSpaces()}render(){const{alert:C,type:t,bookingBox:e,theme:i}=this,l=e==="true";return u`
|
|
11882
11882
|
<header class="container ${this.type}" data-theme=${i} style="height: ${this.spaceHeight}px">
|
|
11883
11883
|
${this.showAlert?u`<cas-alert
|
|
11884
11884
|
showCloseButton
|