cas-ds-web-components 1.2.64 → 1.2.65

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:wght@400;500&display=swap"),i.setAttribute("rel","stylesheet"),document.head.appendChild(i)})();const Y5={name:"@eloisa-ds/all-components",version:"1.0.67",dependencies:{},main:"./index.js",module:"./index.mjs",typings:"./index.d.ts",private:!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:wght@400;500&display=swap"),i.setAttribute("rel","stylesheet"),document.head.appendChild(i)})();const Y5={name:"@eloisa-ds/all-components",version:"1.0.68",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
@@ -11873,7 +11873,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
11873
11873
  // img {
11874
11874
  // filter: none;
11875
11875
  // }
11876
- `,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=new WebSocket("wss://m0vz2c0zfe.execute-api.us-east-1.amazonaws.com/prod");C.onopen=function(){C.send(JSON.stringify({action:"getAlert"}))},C.onmessage=t=>{const e=JSON.parse(t.data);if((e==null?void 0:e.type)==="getAlert"){const{showAlert:o,alert:a}=e;if(o){if(console.log(a),!a||!a.enabled)return!1;let l=new Date,h=new Date(a==null?void 0:a.startDate),n=new Date(a==null?void 0:a.endDate);if(l>h&&l<n)this.showAlert=o,this.alert={title:a==null?void 0:a.Titulo,text:a==null?void 0:a.Contenido,active:a==null?void 0:a.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`
11876
+ `,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=new WebSocket("wss://sjm3jibuni.execute-api.us-east-1.amazonaws.com/prod");C.onopen=function(){C.send(JSON.stringify({action:"getAlert"}))},C.onmessage=t=>{const e=JSON.parse(t.data);if((e==null?void 0:e.type)==="getAlert"){const{showAlert:o,alert:a}=e;if(o){if(console.log(a),!a||!a.enabled)return!1;let l=new Date,h=new Date(a==null?void 0:a.startDate),n=new Date(a==null?void 0:a.endDate);if(l>h&&l<n)this.showAlert=o,this.alert={title:a==null?void 0:a.Titulo,text:a==null?void 0:a.Contenido,active:a==null?void 0:a.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`
11877
11877
  <header class="container ${this.type}" data-theme=${o} style="height: ${this.spaceHeight}px">
11878
11878
  ${this.showAlert?M`<cas-alert
11879
11879
  showCloseButton
@@ -11873,7 +11873,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
11873
11873
  // img {
11874
11874
  // filter: none;
11875
11875
  // }
11876
- `,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=new WebSocket("wss://m0vz2c0zfe.execute-api.us-east-1.amazonaws.com/prod");C.onopen=function(){C.send(JSON.stringify({action:"getAlert"}))},C.onmessage=t=>{const e=JSON.parse(t.data);if((e==null?void 0:e.type)==="getAlert"){const{showAlert:i,alert:l}=e;if(i){if(console.log(l),!l||!l.enabled)return!1;let a=new Date,n=new Date(l==null?void 0:l.startDate),h=new Date(l==null?void 0:l.endDate);if(a>n&&a<h)this.showAlert=i,this.alert={title:l==null?void 0:l.Titulo,text:l==null?void 0:l.Contenido,active:l==null?void 0:l.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`
11876
+ `,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=new WebSocket("wss://sjm3jibuni.execute-api.us-east-1.amazonaws.com/prod");C.onopen=function(){C.send(JSON.stringify({action:"getAlert"}))},C.onmessage=t=>{const e=JSON.parse(t.data);if((e==null?void 0:e.type)==="getAlert"){const{showAlert:i,alert:l}=e;if(i){if(console.log(l),!l||!l.enabled)return!1;let a=new Date,n=new Date(l==null?void 0:l.startDate),h=new Date(l==null?void 0:l.endDate);if(a>n&&a<h)this.showAlert=i,this.alert={title:l==null?void 0:l.Titulo,text:l==null?void 0:l.Contenido,active:l==null?void 0:l.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`
11877
11877
  <header class="container ${this.type}" data-theme=${i} style="height: ${this.spaceHeight}px">
11878
11878
  ${this.showAlert?u`<cas-alert
11879
11879
  showCloseButton
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cas-ds-web-components",
3
3
  "description": "Web Components based on CAS DS",
4
- "version": "1.2.64",
4
+ "version": "1.2.65",
5
5
  "author": "aconejeros",
6
6
  "keywords": [
7
7
  "direflow",