@everymatrix/helper-filters 0.1.5 → 0.1.7
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/helper-filters.cjs.js +2 -2
- package/dist/cjs/helper-filters_2.cjs.entry.js +175 -0
- package/dist/cjs/{index-0c5bb1ff.js → index-d16cebbc.js} +15 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/components/helper-filters.js +12 -22424
- package/dist/components/helper-modal.js +6 -0
- package/dist/components/helper-modal2.js +58 -0
- package/dist/esm/helper-filters.js +2 -2
- package/dist/esm/helper-filters_2.entry.js +170 -0
- package/dist/esm/{index-f5eea413.js → index-1b3528e3.js} +15 -1
- package/dist/esm/loader.js +2 -2
- package/dist/helper-filters/helper-filters.esm.js +1 -1
- package/dist/helper-filters/p-2cd626f1.js +1 -0
- package/dist/helper-filters/p-43dedb1d.entry.js +1 -0
- package/package.json +2 -2
- package/dist/cjs/helper-filters.cjs.entry.js +0 -22555
- package/dist/esm/helper-filters.entry.js +0 -22551
- package/dist/helper-filters/p-5018b398.entry.js +0 -2809
- package/dist/helper-filters/p-645ae858.js +0 -1
|
@@ -1,2809 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i}from"./p-645ae858.js";import"@everymatrix/helper-modal";const s=["ro","en"],o={en:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterDateRangePlaceholder:"Date Range",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},ro:{filterOpen:"Filtrare",filterClear:"Stergere",filterModalTicketTitle:"Rezultatele biletelor",filterModalDrawTitle:"Rezultatele draw-urilor",filterTicketPlaceholder:"Cauta ID bilet",filterDrawPlaceholder:"Cauta ID draw",filterDateRangePlaceholder:"Perioada",filterModalButton:"Cauta",filterOrDate:"sau cauta dupa data"}},r=(t,e)=>{const i=e;return o[void 0!==i&&s.includes(i)?i:"en"][t]};
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
5
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6
|
-
*/
|
|
7
|
-
class n extends HTMLElement{static get version(){return"23.2.0"}}customElements.define("vaadin-lumo-styles",n);
|
|
8
|
-
/**
|
|
9
|
-
* @license
|
|
10
|
-
* Copyright 2019 Google LLC
|
|
11
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/
|
|
13
|
-
const a=window,l=a.ShadowRoot&&(void 0===a.ShadyCSS||a.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,h=Symbol(),c=new WeakMap;class u{constructor(t,e,i){if(this._$cssResult$=!0,i!==h)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(l&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=c.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&c.set(e,t))}return t}toString(){return this.cssText}}const d=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new u(i,t,h)},p=l?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new u("string"==typeof t?t:t+"",void 0,h))(e)})(t):t
|
|
14
|
-
/**
|
|
15
|
-
* @license
|
|
16
|
-
* Copyright 2017 Google LLC
|
|
17
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
|
-
*/;var m;const f=window,v=f.trustedTypes,b=v?v.emptyScript:"",g=f.reactiveElementPolyfillSupport,y={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},w=(t,e)=>e!==t&&(e==e||t==t),_={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:w};class x extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const s=this._$Ep(i,e);void 0!==s&&(this._$Ev.set(s,i),t.push(s))})),t}static createProperty(t,e=_){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const o=this[t];this[e]=s,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||_}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(p(t))}else void 0!==t&&e.push(p(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{l?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),s=a.litNonce;void 0!==s&&i.setAttribute("nonce",s),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=_){var s;const o=this.constructor._$Ep(t,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==(null===(s=i.converter)||void 0===s?void 0:s.toAttribute)?i.converter:y).toAttribute(e,i.type);this._$El=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,o=s._$Ev.get(t);if(void 0!==o&&this._$El!==o){const t=s.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:y;this._$El=o,this[o]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||w)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
19
|
-
/**
|
|
20
|
-
* @license
|
|
21
|
-
* Copyright 2017 Google LLC
|
|
22
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/
|
|
24
|
-
var k;x.finalized=!0,x.elementProperties=new Map,x.elementStyles=[],x.shadowRootOptions={mode:"open"},null==g||g({ReactiveElement:x}),(null!==(m=f.reactiveElementVersions)&&void 0!==m?m:f.reactiveElementVersions=[]).push("1.4.1");const A=window,C=A.trustedTypes,D=C?C.createPolicy("lit-html",{createHTML:t=>t}):void 0,T=`lit$${(Math.random()+"").slice(9)}$`,S="?"+T,z=`<${S}>`,M=document,P=(t="")=>M.createComment(t),F=t=>null===t||"object"!=typeof t&&"function"!=typeof t,E=Array.isArray,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,B=/>/g,N=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),j=/'/g,L=/"/g,R=/^(?:script|style|textarea|title)$/i,W=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),U=new WeakMap,$=M.createTreeWalker(M,129,null,!1),Y=(t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":"",n=O;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,l=n.exec(i),null!==l);)c=n.lastIndex,n===O?"!--"===l[1]?n=I:void 0!==l[1]?n=B:void 0!==l[2]?(R.test(l[2])&&(o=RegExp("</"+l[2],"g")),n=N):void 0!==l[3]&&(n=N):n===N?">"===l[0]?(n=null!=o?o:O,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?N:'"'===l[3]?L:j):n===L||n===j?n=N:n===I||n===B?n=O:(n=N,o=void 0);const u=n===N&&t[e+1].startsWith("/>")?" ":"";r+=n===O?i+z:h>=0?(s.push(a),i.slice(0,h)+"$lit$"+i.slice(h)+T+u):i+T+(-2===h?(s.push(void 0),e):u)}const a=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==D?D.createHTML(a):a,s]};class q{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,a=this.parts,[l,h]=Y(t,e);if(this.el=q.createElement(l,i),$.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=$.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const e of s.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(T)){const i=h[r++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+"$lit$").split(T),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?Z:"?"===e[1]?Q:"@"===e[1]?tt:K})}else a.push({type:6,index:o})}for(const e of t)s.removeAttribute(e)}if(R.test(s.tagName)){const t=s.textContent.split(T),e=t.length-1;if(e>0){s.textContent=C?C.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],P()),$.nextNode(),a.push({type:2,index:++o});s.append(t[e],P())}}}else if(8===s.nodeType)if(s.data===S)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(T,t+1));)a.push({type:7,index:o}),t+=T.length-1}o++}}static createElement(t,e){const i=M.createElement("template");return i.innerHTML=t,i}}function V(t,e,i=t,s){var o,r,n,a;if(e===W)return e;let l=void 0!==s?null===(o=i._$Cl)||void 0===o?void 0:o[s]:i._$Cu;const h=F(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,s)),void 0!==s?(null!==(n=(a=i)._$Cl)&&void 0!==n?n:a._$Cl=[])[s]=l:i._$Cu=l),void 0!==l&&(e=V(t,l._$AS(t,e.values),l,s)),e}class G{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:s}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:M).importNode(i,!0);$.currentNode=o;let r=$.nextNode(),n=0,a=0,l=s[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new J(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new et(r,this,t)),this.v.push(e),l=s[++a]}n!==(null==l?void 0:l.index)&&(r=$.nextNode(),n++)}return o}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class J{constructor(t,e,i,s){var o;this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$C_=null===(o=null==s?void 0:s.isConnected)||void 0===o||o}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$C_}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=V(this,t,e),F(t)?t===H||null==t||""===t?(this._$AH!==H&&this._$AR(),this._$AH=H):t!==this._$AH&&t!==W&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>E(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.O(t):this.$(t)}S(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}$(t){this._$AH!==H&&F(this._$AH)?this._$AA.nextSibling.data=t:this.k(M.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=q.createElement(s.h,this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.m(i);else{const t=new G(o,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=U.get(t.strings);return void 0===e&&U.set(t.strings,e=new q(t)),e}O(t){E(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new J(this.S(P()),this.S(P()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$C_=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class K{constructor(t,e,i,s,o){this.type=1,this._$AH=H,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=V(this,t,e,0),r=!F(t)||t!==this._$AH&&t!==W,r&&(this._$AH=t);else{const s=t;let n,a;for(t=o[0],n=0;n<o.length-1;n++)a=V(this,s[i+n],e,n),a===W&&(a=this._$AH[n]),r||(r=!F(a)||a!==this._$AH[n]),a===H?t=H:t!==H&&(t+=(null!=a?a:"")+o[n+1]),this._$AH[n]=a}r&&!s&&this.P(t)}P(t){t===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Z extends K{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===H?void 0:t}}const X=C?C.emptyScript:"";class Q extends K{constructor(){super(...arguments),this.type=4}P(t){t&&t!==H?this.element.setAttribute(this.name,X):this.element.removeAttribute(this.name)}}class tt extends K{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=V(this,t,e,0))&&void 0!==i?i:H)===W)return;const s=this._$AH,o=t===H&&s!==H||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==H&&(s===H||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class et{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){V(this,t)}}const it=A.litHtmlPolyfillSupport;
|
|
25
|
-
/**
|
|
26
|
-
* @license
|
|
27
|
-
* Copyright 2017 Google LLC
|
|
28
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/
|
|
30
|
-
var st,ot;null==it||it(q,J),(null!==(k=A.litHtmlVersions)&&void 0!==k?k:A.litHtmlVersions=[]).push("2.3.1");class rt extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var s,o;const r=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let n=r._$litPart$;if(void 0===n){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;r._$litPart$=n=new J(e.insertBefore(P(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return W}}rt.finalized=!0,rt._$litElement$=!0,null===(st=globalThis.litElementHydrateSupport)||void 0===st||st.call(globalThis,{LitElement:rt});const nt=globalThis.litElementPolyfillSupport;null==nt||nt({LitElement:rt}),(null!==(ot=globalThis.litElementVersions)&&void 0!==ot?ot:globalThis.litElementVersions=[]).push("3.2.2");
|
|
31
|
-
/**
|
|
32
|
-
* @license
|
|
33
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
34
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
35
|
-
*/
|
|
36
|
-
const at=t=>class extends t{static get properties(){return{theme:{type:String,reflectToAttribute:!0,observer:"__deprecatedThemePropertyChanged"},_theme:{type:String,readOnly:!0}}}__deprecatedThemePropertyChanged(t){this._set_theme(t)}}
|
|
37
|
-
/**
|
|
38
|
-
* @license
|
|
39
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
40
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
41
|
-
*/,lt=[];function ht(t,e,i={}){t&&mt(customElements.get(t))&&console.warn(`The custom element definition for "${t}"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.`),e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof u||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):lt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId})}function ct(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():lt}function ut(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function dt(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=ct().find((e=>e.moduleId===t));i?e.push(...dt(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function pt(t){const e=`${t}-default-theme`,i=ct().filter((i=>i.moduleId!==e&&function(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`).test(e)))}(i.themeFor,t))).map((t=>({...t,styles:[...dt(t),...t.styles],includePriority:ut(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:ct().filter((t=>t.moduleId===e))}function mt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}const ft=t=>class extends(at(t)){static finalize(){if(super.finalize(),this.elementStyles)return;const t=this.prototype._template;t&&!mt(this)&&function(t,e){const i=document.createElement("style");i.innerHTML=t.map((t=>t.cssText)).join("\n"),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...super.finalizeStyles(t),...e]:e}static getStylesForThis(){const t=Object.getPrototypeOf(this.prototype);this.__themes=[...(t?t.constructor.__themes:[])||[],...pt(this.is)];const e=this.__themes.flatMap((t=>t.styles));return e.filter(((t,i)=>i===e.lastIndexOf(t)))}}
|
|
42
|
-
/**
|
|
43
|
-
* @license
|
|
44
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
45
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
46
|
-
*/,vt=d`
|
|
47
|
-
:host {
|
|
48
|
-
/* Base (background) */
|
|
49
|
-
--lumo-base-color: #fff;
|
|
50
|
-
|
|
51
|
-
/* Tint */
|
|
52
|
-
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
|
|
53
|
-
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
|
|
54
|
-
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
|
|
55
|
-
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
|
|
56
|
-
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
|
|
57
|
-
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
|
|
58
|
-
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
|
|
59
|
-
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
|
|
60
|
-
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
|
|
61
|
-
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
|
|
62
|
-
--lumo-tint: #fff;
|
|
63
|
-
|
|
64
|
-
/* Shade */
|
|
65
|
-
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
|
|
66
|
-
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
|
|
67
|
-
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
|
68
|
-
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
|
69
|
-
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
|
70
|
-
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
|
71
|
-
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
|
72
|
-
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
|
73
|
-
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
|
74
|
-
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
|
75
|
-
--lumo-shade: hsl(214, 35%, 15%);
|
|
76
|
-
|
|
77
|
-
/* Contrast */
|
|
78
|
-
--lumo-contrast-5pct: var(--lumo-shade-5pct);
|
|
79
|
-
--lumo-contrast-10pct: var(--lumo-shade-10pct);
|
|
80
|
-
--lumo-contrast-20pct: var(--lumo-shade-20pct);
|
|
81
|
-
--lumo-contrast-30pct: var(--lumo-shade-30pct);
|
|
82
|
-
--lumo-contrast-40pct: var(--lumo-shade-40pct);
|
|
83
|
-
--lumo-contrast-50pct: var(--lumo-shade-50pct);
|
|
84
|
-
--lumo-contrast-60pct: var(--lumo-shade-60pct);
|
|
85
|
-
--lumo-contrast-70pct: var(--lumo-shade-70pct);
|
|
86
|
-
--lumo-contrast-80pct: var(--lumo-shade-80pct);
|
|
87
|
-
--lumo-contrast-90pct: var(--lumo-shade-90pct);
|
|
88
|
-
--lumo-contrast: var(--lumo-shade);
|
|
89
|
-
|
|
90
|
-
/* Text */
|
|
91
|
-
--lumo-header-text-color: var(--lumo-contrast);
|
|
92
|
-
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
93
|
-
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
94
|
-
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
95
|
-
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
96
|
-
|
|
97
|
-
/* Primary */
|
|
98
|
-
--lumo-primary-color: hsl(214, 100%, 48%);
|
|
99
|
-
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
|
100
|
-
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
|
101
|
-
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
|
102
|
-
--lumo-primary-contrast-color: #fff;
|
|
103
|
-
|
|
104
|
-
/* Error */
|
|
105
|
-
--lumo-error-color: hsl(3, 85%, 48%);
|
|
106
|
-
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
|
107
|
-
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
|
108
|
-
--lumo-error-text-color: hsl(3, 89%, 42%);
|
|
109
|
-
--lumo-error-contrast-color: #fff;
|
|
110
|
-
|
|
111
|
-
/* Success */
|
|
112
|
-
--lumo-success-color: hsl(145, 72%, 30%);
|
|
113
|
-
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
|
114
|
-
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
|
115
|
-
--lumo-success-text-color: hsl(145, 85%, 25%);
|
|
116
|
-
--lumo-success-contrast-color: #fff;
|
|
117
|
-
}
|
|
118
|
-
`,bt=document.createElement("template");bt.innerHTML=`<style>${vt.toString().replace(":host","html")}</style>`,document.head.appendChild(bt.content);const gt=d`
|
|
119
|
-
[theme~='dark'] {
|
|
120
|
-
/* Base (background) */
|
|
121
|
-
--lumo-base-color: hsl(214, 35%, 21%);
|
|
122
|
-
|
|
123
|
-
/* Tint */
|
|
124
|
-
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
|
|
125
|
-
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
|
|
126
|
-
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
|
|
127
|
-
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
|
128
|
-
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
|
129
|
-
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
|
130
|
-
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
|
131
|
-
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
|
132
|
-
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
|
133
|
-
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
|
134
|
-
--lumo-tint: hsl(214, 100%, 98%);
|
|
135
|
-
|
|
136
|
-
/* Shade */
|
|
137
|
-
--lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
|
|
138
|
-
--lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
|
|
139
|
-
--lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
|
|
140
|
-
--lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
|
|
141
|
-
--lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
|
|
142
|
-
--lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
|
|
143
|
-
--lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
|
|
144
|
-
--lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
|
|
145
|
-
--lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
|
|
146
|
-
--lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
|
|
147
|
-
--lumo-shade: hsl(214, 33%, 13%);
|
|
148
|
-
|
|
149
|
-
/* Contrast */
|
|
150
|
-
--lumo-contrast-5pct: var(--lumo-tint-5pct);
|
|
151
|
-
--lumo-contrast-10pct: var(--lumo-tint-10pct);
|
|
152
|
-
--lumo-contrast-20pct: var(--lumo-tint-20pct);
|
|
153
|
-
--lumo-contrast-30pct: var(--lumo-tint-30pct);
|
|
154
|
-
--lumo-contrast-40pct: var(--lumo-tint-40pct);
|
|
155
|
-
--lumo-contrast-50pct: var(--lumo-tint-50pct);
|
|
156
|
-
--lumo-contrast-60pct: var(--lumo-tint-60pct);
|
|
157
|
-
--lumo-contrast-70pct: var(--lumo-tint-70pct);
|
|
158
|
-
--lumo-contrast-80pct: var(--lumo-tint-80pct);
|
|
159
|
-
--lumo-contrast-90pct: var(--lumo-tint-90pct);
|
|
160
|
-
--lumo-contrast: var(--lumo-tint);
|
|
161
|
-
|
|
162
|
-
/* Text */
|
|
163
|
-
--lumo-header-text-color: var(--lumo-contrast);
|
|
164
|
-
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
165
|
-
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
166
|
-
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
167
|
-
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
168
|
-
|
|
169
|
-
/* Primary */
|
|
170
|
-
--lumo-primary-color: hsl(214, 90%, 48%);
|
|
171
|
-
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
|
172
|
-
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
|
173
|
-
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
|
174
|
-
--lumo-primary-contrast-color: #fff;
|
|
175
|
-
|
|
176
|
-
/* Error */
|
|
177
|
-
--lumo-error-color: hsl(3, 79%, 49%);
|
|
178
|
-
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
|
179
|
-
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
|
180
|
-
--lumo-error-text-color: hsl(3, 100%, 80%);
|
|
181
|
-
|
|
182
|
-
/* Success */
|
|
183
|
-
--lumo-success-color: hsl(145, 72%, 30%);
|
|
184
|
-
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
|
185
|
-
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
|
186
|
-
--lumo-success-text-color: hsl(145, 85%, 46%);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
html {
|
|
190
|
-
color: var(--lumo-body-text-color);
|
|
191
|
-
background-color: var(--lumo-base-color);
|
|
192
|
-
color-scheme: light;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
[theme~='dark'] {
|
|
196
|
-
color: var(--lumo-body-text-color);
|
|
197
|
-
background-color: var(--lumo-base-color);
|
|
198
|
-
color-scheme: dark;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
h1,
|
|
202
|
-
h2,
|
|
203
|
-
h3,
|
|
204
|
-
h4,
|
|
205
|
-
h5,
|
|
206
|
-
h6 {
|
|
207
|
-
color: var(--lumo-header-text-color);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
a:where(:any-link) {
|
|
211
|
-
color: var(--lumo-primary-text-color);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
a:not(:any-link) {
|
|
215
|
-
color: var(--lumo-disabled-text-color);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
blockquote {
|
|
219
|
-
color: var(--lumo-secondary-text-color);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
code,
|
|
223
|
-
pre {
|
|
224
|
-
background-color: var(--lumo-contrast-10pct);
|
|
225
|
-
border-radius: var(--lumo-border-radius-m);
|
|
226
|
-
}
|
|
227
|
-
`;ht("",gt,{moduleId:"lumo-color"}),ht("",[gt,d`
|
|
228
|
-
:host {
|
|
229
|
-
color: var(--lumo-body-text-color) !important;
|
|
230
|
-
background-color: var(--lumo-base-color) !important;
|
|
231
|
-
}
|
|
232
|
-
`],{moduleId:"lumo-color-legacy"});
|
|
233
|
-
/**
|
|
234
|
-
* @license
|
|
235
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
236
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
237
|
-
*/
|
|
238
|
-
const yt=d`
|
|
239
|
-
:host {
|
|
240
|
-
--lumo-size-xs: 1.625rem;
|
|
241
|
-
--lumo-size-s: 1.875rem;
|
|
242
|
-
--lumo-size-m: 2.25rem;
|
|
243
|
-
--lumo-size-l: 2.75rem;
|
|
244
|
-
--lumo-size-xl: 3.5rem;
|
|
245
|
-
|
|
246
|
-
/* Icons */
|
|
247
|
-
--lumo-icon-size-s: 1.25em;
|
|
248
|
-
--lumo-icon-size-m: 1.5em;
|
|
249
|
-
--lumo-icon-size-l: 2.25em;
|
|
250
|
-
/* For backwards compatibility */
|
|
251
|
-
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
252
|
-
}
|
|
253
|
-
`,wt=document.createElement("template");wt.innerHTML=`<style>${yt.toString().replace(":host","html")}</style>`,document.head.appendChild(wt.content);
|
|
254
|
-
/**
|
|
255
|
-
* @license
|
|
256
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
257
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
258
|
-
*/
|
|
259
|
-
const _t=d`
|
|
260
|
-
:host {
|
|
261
|
-
/* Border radius */
|
|
262
|
-
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
263
|
-
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
|
264
|
-
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
|
265
|
-
--lumo-border-radius: 0.25em; /* Deprecated */
|
|
266
|
-
|
|
267
|
-
/* Shadow */
|
|
268
|
-
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
|
269
|
-
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
|
270
|
-
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
|
271
|
-
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
|
272
|
-
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
|
273
|
-
|
|
274
|
-
/* Clickable element cursor */
|
|
275
|
-
--lumo-clickable-cursor: default;
|
|
276
|
-
}
|
|
277
|
-
`,xt=document.createElement("template");xt.innerHTML=`<style>${_t.toString().replace(":host","html")}</style>`,document.head.appendChild(xt.content);
|
|
278
|
-
/**
|
|
279
|
-
* @license
|
|
280
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
281
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
282
|
-
*/
|
|
283
|
-
const kt=d`
|
|
284
|
-
:host {
|
|
285
|
-
/* prettier-ignore */
|
|
286
|
-
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
287
|
-
|
|
288
|
-
/* Font sizes */
|
|
289
|
-
--lumo-font-size-xxs: 0.75rem;
|
|
290
|
-
--lumo-font-size-xs: 0.8125rem;
|
|
291
|
-
--lumo-font-size-s: 0.875rem;
|
|
292
|
-
--lumo-font-size-m: 1rem;
|
|
293
|
-
--lumo-font-size-l: 1.125rem;
|
|
294
|
-
--lumo-font-size-xl: 1.375rem;
|
|
295
|
-
--lumo-font-size-xxl: 1.75rem;
|
|
296
|
-
--lumo-font-size-xxxl: 2.5rem;
|
|
297
|
-
|
|
298
|
-
/* Line heights */
|
|
299
|
-
--lumo-line-height-xs: 1.25;
|
|
300
|
-
--lumo-line-height-s: 1.375;
|
|
301
|
-
--lumo-line-height-m: 1.625;
|
|
302
|
-
}
|
|
303
|
-
`;ht("",d`
|
|
304
|
-
html,
|
|
305
|
-
:host {
|
|
306
|
-
font-family: var(--lumo-font-family);
|
|
307
|
-
font-size: var(--lumo-font-size, var(--lumo-font-size-m));
|
|
308
|
-
line-height: var(--lumo-line-height-m);
|
|
309
|
-
-webkit-text-size-adjust: 100%;
|
|
310
|
-
-webkit-font-smoothing: antialiased;
|
|
311
|
-
-moz-osx-font-smoothing: grayscale;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
small,
|
|
315
|
-
[theme~='font-size-s'] {
|
|
316
|
-
font-size: var(--lumo-font-size-s);
|
|
317
|
-
line-height: var(--lumo-line-height-s);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
[theme~='font-size-xs'] {
|
|
321
|
-
font-size: var(--lumo-font-size-xs);
|
|
322
|
-
line-height: var(--lumo-line-height-xs);
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
h1,
|
|
326
|
-
h2,
|
|
327
|
-
h3,
|
|
328
|
-
h4,
|
|
329
|
-
h5,
|
|
330
|
-
h6 {
|
|
331
|
-
font-weight: 600;
|
|
332
|
-
line-height: var(--lumo-line-height-xs);
|
|
333
|
-
margin-top: 1.25em;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
h1 {
|
|
337
|
-
font-size: var(--lumo-font-size-xxxl);
|
|
338
|
-
margin-bottom: 0.75em;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
h2 {
|
|
342
|
-
font-size: var(--lumo-font-size-xxl);
|
|
343
|
-
margin-bottom: 0.5em;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
h3 {
|
|
347
|
-
font-size: var(--lumo-font-size-xl);
|
|
348
|
-
margin-bottom: 0.5em;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
h4 {
|
|
352
|
-
font-size: var(--lumo-font-size-l);
|
|
353
|
-
margin-bottom: 0.5em;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
h5 {
|
|
357
|
-
font-size: var(--lumo-font-size-m);
|
|
358
|
-
margin-bottom: 0.25em;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
h6 {
|
|
362
|
-
font-size: var(--lumo-font-size-xs);
|
|
363
|
-
margin-bottom: 0;
|
|
364
|
-
text-transform: uppercase;
|
|
365
|
-
letter-spacing: 0.03em;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
p,
|
|
369
|
-
blockquote {
|
|
370
|
-
margin-top: 0.5em;
|
|
371
|
-
margin-bottom: 0.75em;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
a {
|
|
375
|
-
text-decoration: none;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
a:where(:any-link):hover {
|
|
379
|
-
text-decoration: underline;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
hr {
|
|
383
|
-
display: block;
|
|
384
|
-
align-self: stretch;
|
|
385
|
-
height: 1px;
|
|
386
|
-
border: 0;
|
|
387
|
-
padding: 0;
|
|
388
|
-
margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
|
|
389
|
-
background-color: var(--lumo-contrast-10pct);
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
blockquote {
|
|
393
|
-
border-left: 2px solid var(--lumo-contrast-30pct);
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
b,
|
|
397
|
-
strong {
|
|
398
|
-
font-weight: 600;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
/* RTL specific styles */
|
|
402
|
-
blockquote[dir='rtl'] {
|
|
403
|
-
border-left: none;
|
|
404
|
-
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
405
|
-
}
|
|
406
|
-
`,{moduleId:"lumo-typography"});const At=document.createElement("template");At.innerHTML=`<style>${kt.toString().replace(":host","html")}</style>`,document.head.appendChild(At.content),ht("vaadin-input-container",d`
|
|
407
|
-
:host {
|
|
408
|
-
border-radius: var(--lumo-border-radius-m);
|
|
409
|
-
background-color: var(--lumo-contrast-10pct);
|
|
410
|
-
padding: 0 calc(0.375em + var(--lumo-border-radius-m) / 4 - 1px);
|
|
411
|
-
font-weight: 500;
|
|
412
|
-
line-height: 1;
|
|
413
|
-
position: relative;
|
|
414
|
-
cursor: text;
|
|
415
|
-
box-sizing: border-box;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
/* Used for hover and activation effects */
|
|
419
|
-
:host::after {
|
|
420
|
-
content: '';
|
|
421
|
-
position: absolute;
|
|
422
|
-
top: 0;
|
|
423
|
-
right: 0;
|
|
424
|
-
bottom: 0;
|
|
425
|
-
left: 0;
|
|
426
|
-
border-radius: inherit;
|
|
427
|
-
pointer-events: none;
|
|
428
|
-
background-color: var(--lumo-contrast-50pct);
|
|
429
|
-
opacity: 0;
|
|
430
|
-
transition: transform 0.15s, opacity 0.2s;
|
|
431
|
-
transform-origin: 100% 0;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
::slotted(:not([slot$='fix'])) {
|
|
435
|
-
cursor: inherit;
|
|
436
|
-
min-height: var(--lumo-text-field-size, var(--lumo-size-m));
|
|
437
|
-
padding: 0 0.25em;
|
|
438
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
|
439
|
-
-webkit-mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
440
|
-
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
/* Read-only */
|
|
444
|
-
:host([readonly]) {
|
|
445
|
-
color: var(--lumo-secondary-text-color);
|
|
446
|
-
background-color: transparent;
|
|
447
|
-
cursor: default;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
:host([readonly])::after {
|
|
451
|
-
background-color: transparent;
|
|
452
|
-
opacity: 1;
|
|
453
|
-
border: 1px dashed var(--lumo-contrast-30pct);
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
/* Disabled */
|
|
457
|
-
:host([disabled]) {
|
|
458
|
-
background-color: var(--lumo-contrast-5pct);
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
:host([disabled]) ::slotted(*) {
|
|
462
|
-
color: var(--lumo-disabled-text-color);
|
|
463
|
-
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
/* Invalid */
|
|
467
|
-
:host([invalid]) {
|
|
468
|
-
background-color: var(--lumo-error-color-10pct);
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
:host([invalid])::after {
|
|
472
|
-
background-color: var(--lumo-error-color-50pct);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
/* Slotted icons */
|
|
476
|
-
::slotted(iron-icon),
|
|
477
|
-
::slotted(vaadin-icon) {
|
|
478
|
-
color: var(--lumo-contrast-60pct);
|
|
479
|
-
width: var(--lumo-icon-size-m);
|
|
480
|
-
height: var(--lumo-icon-size-m);
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
484
|
-
::slotted(iron-icon[icon^='vaadin:']),
|
|
485
|
-
::slotted(vaadin-icon[icon^='vaadin:']) {
|
|
486
|
-
padding: 0.25em;
|
|
487
|
-
box-sizing: border-box !important;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
/* Text align */
|
|
491
|
-
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
492
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em);
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
@-moz-document url-prefix() {
|
|
496
|
-
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
497
|
-
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
|
502
|
-
text-align: start;
|
|
503
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
:host([theme~='align-center']) ::slotted(:not([slot$='fix'])) {
|
|
507
|
-
text-align: center;
|
|
508
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
|
512
|
-
text-align: end;
|
|
513
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
@-moz-document url-prefix() {
|
|
517
|
-
/* Firefox is smart enough to align overflowing text to right */
|
|
518
|
-
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
|
519
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
@-moz-document url-prefix() {
|
|
524
|
-
/* Firefox is smart enough to align overflowing text to right */
|
|
525
|
-
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
|
526
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
/* RTL specific styles */
|
|
531
|
-
:host([dir='rtl'])::after {
|
|
532
|
-
transform-origin: 0% 0;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
536
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
:host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
540
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
544
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
@-moz-document url-prefix() {
|
|
548
|
-
/* Firefox is smart enough to align overflowing text to right */
|
|
549
|
-
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
550
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
@-moz-document url-prefix() {
|
|
555
|
-
/* Firefox is smart enough to align overflowing text to right */
|
|
556
|
-
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
557
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
`,{moduleId:"lumo-input-container"}),
|
|
561
|
-
/**
|
|
562
|
-
@license
|
|
563
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
564
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
565
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
566
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
567
|
-
Code distributed by Google as part of the polymer project is also
|
|
568
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
569
|
-
*/
|
|
570
|
-
window.JSCompiler_renameProperty=function(t){return t};
|
|
571
|
-
/**
|
|
572
|
-
@license
|
|
573
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
574
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
575
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
576
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
577
|
-
Code distributed by Google as part of the polymer project is also
|
|
578
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
579
|
-
*/
|
|
580
|
-
let Ct,Dt,Tt=/(url\()([^)]*)(\))/g,St=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function zt(t,e){if(t&&St.test(t))return t;if("//"===t)return t;if(void 0===Ct){Ct=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Ct="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),Ct)try{return new URL(t,e).href}catch(e){return t}return Dt||(Dt=document.implementation.createHTMLDocument("temp"),Dt.base=Dt.createElement("base"),Dt.head.appendChild(Dt.base),Dt.anchor=Dt.createElement("a"),Dt.body.appendChild(Dt.anchor)),Dt.base.href=e,Dt.anchor.href=t,Dt.anchor.href||t}function Mt(t,e){return t.replace(Tt,(function(t,i,s,o){return i+"'"+zt(s.replace(/["']/g,""),e)+"'"+o}))}function Pt(t){return t.substring(0,t.lastIndexOf("/")+1)}
|
|
581
|
-
/**
|
|
582
|
-
@license
|
|
583
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
584
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
585
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
586
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
587
|
-
Code distributed by Google as part of the polymer project is also
|
|
588
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
589
|
-
*/const Ft=!window.ShadyDOM||!window.ShadyDOM.inUse,Et=Ft&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let Ot=window.Polymer&&window.Polymer.rootPath||Pt(document.baseURI||window.location.href),It=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Bt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Nt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,jt=window.Polymer&&window.Polymer.legacyOptimizations||!1,Lt=window.Polymer&&window.Polymer.legacyWarnings||!1,Rt=window.Polymer&&window.Polymer.syncInitialRender||!1,Wt=window.Polymer&&window.Polymer.legacyUndefined||!1,Ht=window.Polymer&&window.Polymer.orderedComputed||!1,Ut=window.Polymer&&window.Polymer.removeNestedTemplates||!1,$t=window.Polymer&&window.Polymer.fastDomIf||!1,Yt=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,qt=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,Vt=0;const Gt=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=Vt++;return function(s){let o=s.__mixinSet;if(o&&o[i])return s;let r=e,n=r.get(s);if(!n){n=t(s),r.set(s,n);let e=Object.create(n.__mixinSet||o||null);e[i]=!0,n.__mixinSet=e}return n}};
|
|
590
|
-
/**
|
|
591
|
-
@license
|
|
592
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
593
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
594
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
595
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
596
|
-
Code distributed by Google as part of the polymer project is also
|
|
597
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
598
|
-
*/let Jt={},Kt={};function Zt(t,e){Jt[t]=Kt[t.toLowerCase()]=e}function Xt(t){return Jt[t]||Kt[t.toLowerCase()]}class Qt extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=Xt(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=zt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Pt(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Bt&&void 0!==Xt(t))throw Zt(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,Zt(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}function te(t){return Qt.import(t)}function ee(t){const e=Mt((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function ie(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...se(e[t]));return i}function se(t){const e=te(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...re(e));const i=e.querySelector("template");i&&t.push(...oe(i,e.assetpath)),e._styles=t}return e._styles}function oe(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let o=s[t],r=o.getAttribute("include");r&&i.push(...ie(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(o.textContent=Mt(o.textContent,e)),i.push(o)}t._styles=i}return t._styles}function re(t){const e=[],i=t.querySelectorAll("link[rel=import][type~=css]");for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute("shady-unscoped");if(i&&!t._unscopedStyle){const e=ee(t);e.setAttribute("shady-unscoped",""),t._unscopedStyle=e}else t._style||(t._style=ee(t));e.push(i?t._unscopedStyle:t._style)}}return e}
|
|
599
|
-
/**
|
|
600
|
-
@license
|
|
601
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
602
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
603
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
604
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
605
|
-
Code distributed by Google as part of the polymer project is also
|
|
606
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
607
|
-
*/Qt.prototype.modules=Jt,customElements.define("dom-module",Qt);const ne=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
|
|
608
|
-
/**
|
|
609
|
-
@license
|
|
610
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
611
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
612
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
613
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
614
|
-
Code distributed by Google as part of the polymer project is also
|
|
615
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
616
|
-
*/function ae(t){return t.indexOf(".")>=0}function le(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function he(t,e){return 0===t.indexOf(e+".")}function ce(t,e){return 0===e.indexOf(t+".")}function ue(t,e,i){return e+i.slice(t.length)}function de(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let s=t[i].toString().split(".");for(let t=0;t<s.length;t++)e.push(s[t])}return e.join(".")}return t}function pe(t){return Array.isArray(t)?de(t).split("."):t.toString().split(".")}function me(t,e,i){let s=t,o=pe(e);for(let t=0;t<o.length;t++){if(!s)return;s=s[o[t]]}return i&&(i.path=o.join(".")),s}function fe(t,e,i){let s=t,o=pe(e),r=o[o.length-1];if(o.length>1){for(let t=0;t<o.length-1;t++)if(s=s[o[t]],!s)return;s[r]=i}else s[e]=i;return o.join(".")}
|
|
617
|
-
/**
|
|
618
|
-
@license
|
|
619
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
620
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
621
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
622
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
623
|
-
Code distributed by Google as part of the polymer project is also
|
|
624
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
625
|
-
*/const ve={},be=/-[a-z]/g,ge=/([A-Z])/g;function ye(t){return ve[t]||(ve[t]=t.indexOf("-")<0?t:t.replace(be,(t=>t[1].toUpperCase())))}function we(t){return ve[t]||(ve[t]=t.replace(ge,"-$1").toLowerCase())}
|
|
626
|
-
/**
|
|
627
|
-
@license
|
|
628
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
629
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
630
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
631
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
632
|
-
Code distributed by Google as part of the polymer project is also
|
|
633
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
634
|
-
*/let _e=0,xe=0,ke=[],Ae=0,Ce=!1,De=document.createTextNode("");new window.MutationObserver((function(){Ce=!1;const t=ke.length;for(let e=0;e<t;e++){let t=ke[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}ke.splice(0,t),xe+=t})).observe(De,{characterData:!0});const Te={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Se={run:t=>(Ce||(Ce=!0,De.textContent=Ae++),ke.push(t),_e++),cancel(t){const e=t-xe;if(e>=0){if(!ke[e])throw new Error("invalid async handle: "+t);ke[e]=null}}},ze=Se,Me=Gt((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,ze.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,s){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,s)}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=ne(t)),void 0===s?t.removeAttribute(i):t.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_serializeValue(t){switch(typeof t){case"boolean":return t?"":void 0;default:return null!=t?t.toString():void 0}}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Pe={};let Fe=HTMLElement.prototype;for(;Fe;){let t=Object.getOwnPropertyNames(Fe);for(let e=0;e<t.length;e++)Pe[t[e]]=!0;Fe=Object.getPrototypeOf(Fe)}const Ee=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,Oe=Gt((t=>{const e=Me(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(ye(t[e]))}static attributeNameForProperty(t){return we(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){switch(typeof t){case"object":if(t instanceof Date)return t.toString();if(t){if(Ee(t))return t;try{return JSON.stringify(t)}catch(t){return""}}default:return super._serializeValue(t)}}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){!function(t,e){if(!Pe[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),Ie={"dom-if":!0,"dom-repeat":!0};let Be=!1,Ne=!1;const je=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const o=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(o,s)):e.setAttribute(s,o)}})();function Le(t){let e=t.getAttribute("is");if(e&&Ie[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];je(t,i,e),i.removeAttribute(e)}}return t}function Re(t,e){let i=e.parentInfo&&Re(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,s=0;t;t=t.nextSibling)if(e.parentIndex===s++)return t}function We(t,e,i,s){s.id&&(e[s.id]=i)}function He(t,e,i){if(i.events&&i.events.length)for(let s,o=0,r=i.events;o<r.length&&(s=r[o]);o++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function Ue(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const $e=Gt((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let s=!1,o=t;return"template"!=o.localName||o.hasAttribute("preserve-content")?"slot"===o.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(o,e,i)||s,function(t){(function(){if(!Be){Be=!0;const t=document.createElement("textarea");t.placeholder="a",Ne=t.placeholder===t.textContent}return Ne})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(o),o.firstChild&&this._parseTemplateChildNodes(o,e,i),o.hasAttributes&&o.hasAttributes()&&(s=this._parseTemplateNodeAttributes(o,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,o=t.firstChild,r=0;o;o=s){if("template"==o.localName&&(o=Le(o)),s=o.nextSibling,o.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)o.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!o.textContent.trim()){t.removeChild(o);continue}}let n={parentIndex:r,parentInfo:i};this._parseTemplateNode(o,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),o.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,o=this._parseTemplate(s,e);return(o.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=o,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,o=Array.from(t.attributes);for(let r,n=o.length-1;r=o[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,o){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:o}),!0):"id"===s&&(i.id=o,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let o=s.nodeList=new Array(i.length);s.$={};for(let t,r=0,n=i.length;r<n&&(t=i[r]);r++){let i=o[r]=Re(s,t);We(0,s.$,i,t),Ue(0,i,t,e),He(this,i,t)}return s=s,s}_addMethodEventListenerToNode(t,e,i,s){let o=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,o),o}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
|
|
635
|
-
/**
|
|
636
|
-
* @fileoverview
|
|
637
|
-
* @suppress {checkPrototypalTypes}
|
|
638
|
-
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
639
|
-
* This code may only be used under the BSD style license found at
|
|
640
|
-
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
641
|
-
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
642
|
-
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
643
|
-
* Google as part of the polymer project is also subject to an additional IP
|
|
644
|
-
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
645
|
-
*/let Ye=0;const qe=[],Ve={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Ge=/[A-Z]/;function Je(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function Ke(t,e,i,s,o,r){if(e){let n=!1;const a=Ye++;for(let l in i){let h=e[o?le(l):l];if(h)for(let e,c=0,u=h.length;c<u&&(e=h[c]);c++)e.info&&e.info.lastRun===a||o&&!Xe(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,o,r),n=!0)}return n}return!1}function Ze(t,e,i,s,o,r,n,a){let l=!1,h=e[n?le(s):s];if(h)for(let e,c=0,u=h.length;c<u&&(e=h[c]);c++)e.info&&e.info.lastRun===i||n&&!Xe(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),l=!0);return l}function Xe(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!he(i,t))||!(!e.wildcard||!ce(i,t))}return!0}function Qe(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function ti(t,e,i){let s=le(e);return s!==e&&(ei(t,we(s)+"-changed",i[e],e),!0)}function ei(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),ne(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function ii(t,e,i,s,o,r){let n=(r?le(e):e)!=e?e:null,a=n?me(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),ei(t,o.eventName,a,n)}function si(t,e,i,s,o){let r=t.__data[e];It&&(r=It(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const oi=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},ri=(t,e,i,s,o)=>{const r=e[o?le(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun===Ye||o&&!Xe(t,n.trigger)||(n.info.lastRun=Ye,oi(n.info,i,s))}};function ni(t,e,i,s,o){let r=pi(t,e,i,0,o);if(r===qe)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function ai(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||we(o)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,li(t,e,a,s,l)}}function li(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=gi(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:hi,info:n,trigger:s})}}}function hi(t,e,i,s,o,r,n){let a=n[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=ue(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,h,e,i,s,r);n!==qe&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,o,i,s),It&&(o=It(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?e[Ve.READ_ONLY]&&e[Ve.READ_ONLY][s]||e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,l,h,n)}}function ci(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=ne(t)),t[r]=e.literal)}}function ui(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=ue(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,e[Ve.READ_ONLY]&&e[Ve.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,r,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function di(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function pi(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===qe?qe:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const mi=[],fi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?((?:[a-zA-Z_$][\\w.:$\\-*]*)\\s*(?:\\(\\s*(?:(?:(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)(?:,\\s*(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*))*)?)\\)\\s*)?)(?:]]|}})","g");function vi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function bi(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:mi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=gi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function gi(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=le(e),i.structured=ae(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function yi(t,e,i){let s=me(t,i);return void 0===s&&(s=e[i]),s}function wi(t,e,i,s){const o={indexSplices:s};Wt&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),Wt&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function _i(t,e,i,s,o,r){wi(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const xi=Gt((t=>{const e=$e(Oe(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Ve}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(ki.length){let t=ki[ki.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Ve.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==Ve.READ_ONLY);let s=Je(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=Je(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Ve.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Ve.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Ve.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Ve.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||le(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=me(this,t);if(!(t=fe(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];ce(r,e)?(o=ue(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):ce(n,e)&&(o=ue(n,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=ne(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&ae(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[Ve.NOTIFY]&&this[Ve.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[Ve.READ_ONLY]&&this[Ve.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[Ve.COMPUTE];if(o)if(Ht){Ye++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Ve.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t.__computeInfo,i={},s=t[Ve.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)ri(t,o,n,r,s);let a;for(;a=n.shift();)ni(t,"",e,0,a)&&ri(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;Ke(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),Ke(this,this[Ve.REFLECT],e,i,o),Ke(this,this[Ve.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[Ve.NOTIFY],l=Ye++;for(let n in e)e[n]&&(a&&Ze(t,a,l,n,i,s,o)||o&&ti(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Ve.PROPAGATE]&&Ke(this,this[Ve.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{Ke(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=de(t),e=de(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=de(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};wi(this,me(this,t,i),i.path,e)}get(t,e){return me(e||this,t)}set(t,e,i){i?fe(i,t,e):this[Ve.READ_ONLY]&&this[Ve.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=me(this,t,i),o=s.length,r=s.push(...e);return e.length&&_i(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=me(this,t,e),s=Boolean(i.length),o=i.pop();return s&&_i(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=me(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&_i(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=me(this,t,e),s=Boolean(i.length),o=i.shift();return s&&_i(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=me(this,t,i),o=s.unshift(...e);return e.length&&_i(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=me(this,t,s),i=s.path}else i=Array.isArray(t)?de(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,Ve.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,Ve.OBSERVE,{fn:Qe,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,Ve.OBSERVE,{fn:Qe,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=bi(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");di(this,i,Ve.OBSERVE,pi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Ve.NOTIFY,{fn:ii,info:{eventName:we(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Ve.REFLECT,{fn:si,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=bi(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=di(this,s,Ve.COMPUTE,ni,t,i);Je(this,"__computeInfo")[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=ce(n,e),o=yi(s,i,t?e:n);h={path:t?e:n,value:o,base:t?me(s,n):o}}else h=a?yi(s,i,n):s[n];if(Wt&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return qe;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),ki.push(this);let i=super._stampTemplate(t,e);if(ki.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];ci(o,i),ui(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];ne(ne(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=vi(e)||" ",ai(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";Ge.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=vi(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=ye(o)),ai(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;Ut&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let l=n.hostProps;if($t&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),Ut||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)ai(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=fi.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=Boolean(i[2]),a=i[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let u=bi(a),d=[];if(u){let{args:t,methodName:i}=u;for(let e=0;e<t.length;e++){let i=t[e];i.literal||d.push(i)}let s=e.dynamicFns;(s&&s[i]||u.static)&&(d.push(i),u.dynamicFn=!0)}else d.push(a);s.push({source:a,mode:r,negate:n,customEvent:l,signature:u,dependencies:d,event:h}),o=fi.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?pi(t,i,s,0,e.signature):i!=e.source?me(t,e.source):r&&ae(i)?me(t,i):t.__data[i],e.negate&&(n=!n),n}}})),ki=[],Ai=Gt((t=>{const e=Me(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
646
|
-
/**
|
|
647
|
-
@license
|
|
648
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
649
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
650
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
651
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
652
|
-
Code distributed by Google as part of the polymer project is also
|
|
653
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
654
|
-
*/
|
|
655
|
-
function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),Ci=window.ShadyCSS&&window.ShadyCSS.cssBuild,Di=Gt((t=>{const e=Ai(xi(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.1"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):jt||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++)i._createMethodObserver(t[s],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!Bt||Nt)&&(e=Qt.import(t,"template"),Bt&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Pt(t.url);else{const t=Qt.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Ot,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let s=e[i];"value"in s&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=s)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return Mt(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,s){if(!Ci){const o=e.content.querySelectorAll("style"),r=oe(e),n=function(t){let e=te(t);return e?re(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let o=n[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,a)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],n=o[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),qt&&Ci&&Et){const i=e.content.querySelectorAll("style");if(i){let e="";Array.from(i).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,i?zt(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=ne(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Rt&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=zt(this.importPath)),zt(t,e)}static _parseTemplateContent(t,i,s){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,s)}static _addTemplatePropertyEffect(t,i,s){return!Lt||i in this._properties||s.info.part.signature&&s.info.part.signature.static||s.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,s)}}})),Ti=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Si{constructor(t,e){Pi(t,e);const i=e.reduce(((e,i,s)=>e+zi(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function zi(t){if(t instanceof Si)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Mi=function(t,...e){Pi(t,e);const i=document.createElement("template");let s=e.reduce(((e,i,s)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Si)return zi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Ti&&(s=Ti.createHTML(s)),i.innerHTML=s,i},Pi=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},Fi=Di(HTMLElement);
|
|
656
|
-
/**
|
|
657
|
-
* @license
|
|
658
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
659
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
660
|
-
*/
|
|
661
|
-
class Ei{static detectScrollType(){const t=document.createElement("div");t.textContent="ABCD",t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t);let e="reverse";return t.scrollLeft>0?e="default":(t.scrollLeft=2,t.scrollLeft<2&&(e="negative")),document.body.removeChild(t),e}static getNormalizedScrollLeft(t,e,i){const{scrollLeft:s}=i;if("rtl"!==e||!t)return s;switch(t){case"negative":return i.scrollWidth-i.clientWidth+s;case"reverse":return i.scrollWidth-i.clientWidth-s;default:return s}}static setNormalizedScrollLeft(t,e,i,s){if("rtl"===e&&t)switch(t){case"negative":i.scrollLeft=i.clientWidth-i.scrollWidth+s;break;case"reverse":i.scrollLeft=i.scrollWidth-i.clientWidth-s;break;default:i.scrollLeft=s}else i.scrollLeft=s}}
|
|
662
|
-
/**
|
|
663
|
-
* @license
|
|
664
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
665
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
666
|
-
*/const Oi=[];let Ii;function Bi(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function Ni(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=Ni();Oi.forEach((e=>{Bi(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const ji=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}static finalize(){super.finalize(),Ii||(Ii=Ei.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")||(this.__subscribe(),Bi(this,Ni(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=Ni(),o=i===s&&-1===Oi.indexOf(this),r=!i&&e&&-1===Oi.indexOf(this),n=i!==s&&e===s;o||r?(this.__subscribe(),Bi(this,s,i)):n&&this.__subscribe(!1)}disconnectedCallback(){super.disconnectedCallback(),this.__subscribe(!1),this.removeAttribute("dir")}_valueToNodeAttribute(t,e,i){("dir"!==i||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(t=!0){t?Oi.includes(this)||Oi.push(this):Oi.includes(this)&&Oi.splice(Oi.indexOf(this),1)}__getNormalizedScrollLeft(t){return Ei.getNormalizedScrollLeft(Ii,this.getAttribute("dir")||"ltr",t)}__setNormalizedScrollLeft(t,e){return Ei.setNormalizedScrollLeft(Ii,this.getAttribute("dir")||"ltr",t,e)}}
|
|
667
|
-
/**
|
|
668
|
-
* @license
|
|
669
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
670
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
671
|
-
*/;class Li extends(ft(ji(Fi))){static get is(){return"vaadin-input-container"}static get template(){return Mi`
|
|
672
|
-
<style>
|
|
673
|
-
:host {
|
|
674
|
-
display: flex;
|
|
675
|
-
align-items: center;
|
|
676
|
-
flex: 0 1 auto;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
:host([hidden]) {
|
|
680
|
-
display: none !important;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
/* Reset the native input styles */
|
|
684
|
-
::slotted(input) {
|
|
685
|
-
-webkit-appearance: none;
|
|
686
|
-
-moz-appearance: none;
|
|
687
|
-
flex: auto;
|
|
688
|
-
white-space: nowrap;
|
|
689
|
-
overflow: hidden;
|
|
690
|
-
width: 100%;
|
|
691
|
-
height: 100%;
|
|
692
|
-
outline: none;
|
|
693
|
-
margin: 0;
|
|
694
|
-
padding: 0;
|
|
695
|
-
border: 0;
|
|
696
|
-
border-radius: 0;
|
|
697
|
-
min-width: 0;
|
|
698
|
-
font: inherit;
|
|
699
|
-
line-height: normal;
|
|
700
|
-
color: inherit;
|
|
701
|
-
background-color: transparent;
|
|
702
|
-
/* Disable default invalid style in Firefox */
|
|
703
|
-
box-shadow: none;
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
::slotted(*) {
|
|
707
|
-
flex: none;
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
::slotted(:is(input, textarea))::placeholder {
|
|
711
|
-
/* Use ::slotted(input:placeholder-shown) in themes to style the placeholder. */
|
|
712
|
-
/* because ::slotted(...)::placeholder does not work in Safari. */
|
|
713
|
-
/* See the workaround at the end of this file. */
|
|
714
|
-
font: inherit;
|
|
715
|
-
color: inherit;
|
|
716
|
-
/* Override default opacity in Firefox */
|
|
717
|
-
opacity: 1;
|
|
718
|
-
}
|
|
719
|
-
</style>
|
|
720
|
-
<slot name="prefix"></slot>
|
|
721
|
-
<slot></slot>
|
|
722
|
-
<slot name="suffix"></slot>
|
|
723
|
-
`}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}customElements.define(Li.is,Li);const Ri=d`
|
|
724
|
-
/* Needed for Safari, where ::slotted(...)::placeholder does not work */
|
|
725
|
-
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
726
|
-
font: inherit;
|
|
727
|
-
color: inherit;
|
|
728
|
-
}
|
|
729
|
-
`,Wi=document.createElement("template");Wi.innerHTML=`<style>${Ri.toString()}</style>`,document.head.appendChild(Wi.content);
|
|
730
|
-
/**
|
|
731
|
-
* @license
|
|
732
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
733
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
734
|
-
*/
|
|
735
|
-
const Hi=d`
|
|
736
|
-
:host {
|
|
737
|
-
/* Square */
|
|
738
|
-
--lumo-space-xs: 0.25rem;
|
|
739
|
-
--lumo-space-s: 0.5rem;
|
|
740
|
-
--lumo-space-m: 1rem;
|
|
741
|
-
--lumo-space-l: 1.5rem;
|
|
742
|
-
--lumo-space-xl: 2.5rem;
|
|
743
|
-
|
|
744
|
-
/* Wide */
|
|
745
|
-
--lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
|
|
746
|
-
--lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
|
|
747
|
-
--lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
|
|
748
|
-
--lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
|
|
749
|
-
--lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
|
|
750
|
-
|
|
751
|
-
/* Tall */
|
|
752
|
-
--lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
|
|
753
|
-
--lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
|
|
754
|
-
--lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
|
|
755
|
-
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
756
|
-
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
757
|
-
}
|
|
758
|
-
`,Ui=document.createElement("template");Ui.innerHTML=`<style>${Hi.toString().replace(":host","html")}</style>`,document.head.appendChild(Ui.content);
|
|
759
|
-
/**
|
|
760
|
-
* @license
|
|
761
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
762
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
763
|
-
*/
|
|
764
|
-
const $i=d`
|
|
765
|
-
:host {
|
|
766
|
-
top: var(--lumo-space-m);
|
|
767
|
-
right: var(--lumo-space-m);
|
|
768
|
-
bottom: var(--lumo-space-m);
|
|
769
|
-
left: var(--lumo-space-m);
|
|
770
|
-
/* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
|
|
771
|
-
/* stylelint-disable-next-line */
|
|
772
|
-
outline: 0px solid transparent;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
[part='overlay'] {
|
|
776
|
-
background-color: var(--lumo-base-color);
|
|
777
|
-
background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
|
778
|
-
border-radius: var(--lumo-border-radius-m);
|
|
779
|
-
box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);
|
|
780
|
-
color: var(--lumo-body-text-color);
|
|
781
|
-
font-family: var(--lumo-font-family);
|
|
782
|
-
font-size: var(--lumo-font-size-m);
|
|
783
|
-
font-weight: 400;
|
|
784
|
-
line-height: var(--lumo-line-height-m);
|
|
785
|
-
letter-spacing: 0;
|
|
786
|
-
text-transform: none;
|
|
787
|
-
-webkit-text-size-adjust: 100%;
|
|
788
|
-
-webkit-font-smoothing: antialiased;
|
|
789
|
-
-moz-osx-font-smoothing: grayscale;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
[part='content'] {
|
|
793
|
-
padding: var(--lumo-space-xs);
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
[part='backdrop'] {
|
|
797
|
-
background-color: var(--lumo-shade-20pct);
|
|
798
|
-
animation: 0.2s lumo-overlay-backdrop-enter both;
|
|
799
|
-
will-change: opacity;
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
@keyframes lumo-overlay-backdrop-enter {
|
|
803
|
-
0% {
|
|
804
|
-
opacity: 0;
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
:host([closing]) [part='backdrop'] {
|
|
809
|
-
animation: 0.2s lumo-overlay-backdrop-exit both;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
@keyframes lumo-overlay-backdrop-exit {
|
|
813
|
-
100% {
|
|
814
|
-
opacity: 0;
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
@keyframes lumo-overlay-dummy-animation {
|
|
819
|
-
0% {
|
|
820
|
-
opacity: 1;
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
100% {
|
|
824
|
-
opacity: 1;
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
`;
|
|
828
|
-
/**
|
|
829
|
-
@license
|
|
830
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
831
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
832
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
833
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
834
|
-
Code distributed by Google as part of the polymer project is also
|
|
835
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
836
|
-
*/
|
|
837
|
-
function Yi(t,e,i){return{index:t,removed:e,addedCount:i}}function qi(t,e){return t===e}
|
|
838
|
-
/**
|
|
839
|
-
@license
|
|
840
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
841
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
842
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
843
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
844
|
-
Code distributed by Google as part of the polymer project is also
|
|
845
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
846
|
-
*/function Vi(t){return"slot"===t.localName}ht("",$i,{moduleId:"lumo-overlay"}),ht("vaadin-overlay",$i,{moduleId:"lumo-vaadin-overlay"});let Gi=class{static getFlattenedNodes(t){const e=ne(t);return Vi(t)?(t=t,e.assignedNodes({flatten:!0})):Array.from(e.childNodes).map((t=>Vi(t)?ne(t=t).assignedNodes({flatten:!0}):[t])).reduce(((t,e)=>t.concat(e)),[])}constructor(t,e){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=t,this.callback=e,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){Vi(this._target)?this._listenSlots([this._target]):ne(this._target).children&&(this._listenSlots(ne(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(t=>{this._processMutations(t)})):(this._nativeChildrenObserver=new MutationObserver((t=>{this._processMutations(t)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){Vi(this._target)?this._unlistenSlots([this._target]):ne(this._target).children&&(this._unlistenSlots(ne(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,Se.run((()=>this.flush())))}_processMutations(t){this._processSlotMutations(t),this.flush()}_processSlotMutations(t){if(t)for(let e=0;e<t.length;e++){let i=t[e];i.addedNodes&&this._listenSlots(i.addedNodes),i.removedNodes&&this._unlistenSlots(i.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let t={target:this._target,addedNodes:[],removedNodes:[]},e=this.constructor.getFlattenedNodes(this._target),i=function(t,e,i,s,o,r){let n,a=0,l=0,h=Math.min(i-e,r-o);if(0==e&&0==o&&(a=function(t,e,i){for(let s=0;s<i;s++)if(!qi(t[s],e[s]))return s;return i}(t,s,h)),i==t.length&&r==s.length&&(l=function(t,e,i){let s=t.length,o=e.length,r=0;for(;r<i&&qi(t[--s],e[--o]);)r++;return r}(t,s,h-a)),o+=a,r-=l,(i-=l)-(e+=a)==0&&r-o==0)return[];if(e==i){for(n=Yi(e,[],0);o<r;)n.removed.push(s[o++]);return[n]}if(o==r)return[Yi(e,[],i-e)];let c=function(t){let e=t.length-1,i=t[0].length-1,s=t[e][i],o=[];for(;e>0||i>0;){if(0==e){o.push(2),i--;continue}if(0==i){o.push(3),e--;continue}let r,n=t[e-1][i-1],a=t[e-1][i],l=t[e][i-1];r=a<l?a<n?a:n:l<n?l:n,r==n?(n==s?o.push(0):(o.push(1),s=n),e--,i--):r==a?(o.push(3),e--,s=a):(o.push(2),i--,s=l)}return o.reverse(),o}(function(t,e,i,s,o,r){let n=r-o+1,a=i-e+1,l=new Array(n);for(let t=0;t<n;t++)l[t]=new Array(a),l[t][0]=t;for(let t=0;t<a;t++)l[0][t]=t;for(let i=1;i<n;i++)for(let r=1;r<a;r++)if(qi(t[e+r-1],s[o+i-1]))l[i][r]=l[i-1][r-1];else{let t=l[i-1][r]+1,e=l[i][r-1]+1;l[i][r]=t<e?t:e}return l}(t,e,i,s,o,r));n=void 0;let u=[],d=e,p=o;for(let t=0;t<c.length;t++)switch(c[t]){case 0:n&&(u.push(n),n=void 0),d++,p++;break;case 1:n||(n=Yi(d,[],0)),n.addedCount++,d++,n.removed.push(s[p]),p++;break;case 2:n||(n=Yi(d,[],0)),n.addedCount++,d++;break;case 3:n||(n=Yi(d,[],0)),n.removed.push(s[p]),p++}return n&&u.push(n),u}(s=e,0,s.length,o=this._effectiveNodes,0,o.length);var s,o;for(let e,s=0;s<i.length&&(e=i[s]);s++)for(let i,s=0;s<e.removed.length&&(i=e.removed[s]);s++)t.removedNodes.push(i);for(let s,o=0;o<i.length&&(s=i[o]);o++)for(let i=s.index;i<s.index+s.addedCount;i++)t.addedNodes.push(e[i]);this._effectiveNodes=e;let r=!1;return(t.addedNodes.length||t.removedNodes.length)&&(r=!0,this.callback.call(this._target,t)),r}_listenSlots(t){for(let e=0;e<t.length;e++){let i=t[e];Vi(i)&&i.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(t){for(let e=0;e<t.length;e++){let i=t[e];Vi(i)&&i.removeEventListener("slotchange",this._boundSchedule)}}},Ji=!1,Ki=[],Zi=[];
|
|
847
|
-
/**
|
|
848
|
-
@license
|
|
849
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
850
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
851
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
852
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
853
|
-
Code distributed by Google as part of the polymer project is also
|
|
854
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
855
|
-
*/function Xi(t){const e=t[0],i=t[1],s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}function Qi(t,e,i){Ji||(Ji=!0,requestAnimationFrame((function(){Ji=!1,function(t){for(;t.length;)Xi(t.shift())}(Ki),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)Xi(t.shift())}(Zi)}))}))),Zi.push([t,e,i])}
|
|
856
|
-
/**
|
|
857
|
-
@license
|
|
858
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
859
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
860
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
861
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
862
|
-
Code distributed by Google as part of the polymer project is also
|
|
863
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
864
|
-
*/function ts(t,e,i,s,o){let r;o&&(r="object"==typeof i&&null!==i,r&&(s=t.__dataTemp[e]));let n=s!==i&&(s==s||i==i);return r&&n&&(t.__dataTemp[e]=i),n}const es=Gt((t=>class extends t{_shouldPropertyChange(t,e,i){return ts(this,t,e,i,!0)}})),is=Gt((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return ts(this,t,e,i,this.mutableData)}}));es._mutablePropertyChange=ts;
|
|
865
|
-
/**
|
|
866
|
-
@license
|
|
867
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
868
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
869
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
870
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
871
|
-
Code distributed by Google as part of the polymer project is also
|
|
872
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
873
|
-
*/
|
|
874
|
-
let ss=null;function os(){return ss}os.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:os,writable:!0}});const rs=xi(os),ns=es(rs),as=xi(class{});class ls extends as{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(t&&i.instanceProps||!i.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,i(t)}));else{let s=this.__dataHost.__dataHost;s&&s._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let s=e[i];if(Boolean(t)!=Boolean(s.__hideTemplateChildren__))if(s.nodeType===Node.TEXT_NODE)t?(s.__polymerTextContent__=s.textContent,s.textContent=""):s.textContent=s.__polymerTextContent__;else if("slot"===s.localName)if(t)s.__polymerReplaced__=document.createComment("hidden-slot"),ne(ne(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&ne(ne(t).parentNode).replaceChild(s,t)}else s.style&&(t?(s.__polymerDisplay__=s.style.display,s.style.display="none"):s.style.display=s.__polymerDisplay__);s.__hideTemplateChildren__=t,s._showHideChildren&&s._showHideChildren(t)}}(t,this.children)}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(t,e,i)}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do{t=t.__dataHost.__dataHost}while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}}const hs=es(ls);function cs(t){let e=t.__dataHost;return e&&e._methodHost||e}function us(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring("_host_".length),s[i])}}function ds(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function ps(t,e,i){if(Bt&&!cs(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(i=i||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let s=(e?e.constructor:ls)._parseTemplate(t),o=s.templatizeInstanceClass;o||(o=function(t,e,i){let s=i.mutableData?hs:ls;ps.mixin&&(s=ps.mixin(s));let o=class extends s{};return o.prototype.__templatizeOptions=i,o.prototype._bindTemplate(t),function(t,e,i,s){let o=i.hostProps||{};for(let e in s.instanceProps){delete o[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:ds(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in o)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(o,t,e,i),o}(t,s,i),s.templatizeInstanceClass=o);const r=cs(t);!function(t,e,i,s){let o=i.forwardHostProp;if(o&&e.hasHostProps){const r="template"==t.localName;let n=e.templatizeTemplateClass;if(!n){if(r){let t=i.mutableData?ns:rs;class s extends t{}n=e.templatizeTemplateClass=s}else{const i=t.constructor;class s extends i{}n=e.templatizeTemplateClass=s}let a=e.hostProps;for(let t in a)n.prototype._addPropertyEffect("_host_"+t,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:us(0,o)}),n.prototype._createNotifyingProperty("_host_"+t);Lt&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:o}=t,{instanceProps:r}=e;for(let t in o)if(!(s[t]||r&&r[t])){const e=o[t];for(let i=0;i<e.length;i++){const{part:s}=e[i].info;if(!s.signature||!s.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,s)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),r)!function(t,e){ss=t,Object.setPrototypeOf(t,e.prototype),new e,ss=null}(t,n),t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,n.prototype);const i=e.hostProps;for(let e in i)if(e="_host_"+e,e in t){const i=t[e];delete t[e],t.__data[e]=i}}}}(t,s,i,r);let n=class extends o{};return n.prototype._methodHost=r,n.prototype.__dataHost=t,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=s.hostProps,n=n,n}
|
|
875
|
-
/**
|
|
876
|
-
* @license
|
|
877
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
878
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
879
|
-
*/
|
|
880
|
-
const ms=t=>t.test(navigator.userAgent),fs=t=>t.test(navigator.platform);ms(/Android/),ms(/Chrome/)&&/Google Inc/.test(navigator.vendor);const vs=ms(/Firefox/),bs=fs(/^iPad/)||fs(/^Mac/)&&navigator.maxTouchPoints>1,gs=fs(/^iPhone/)||bs;ms(/^((?!chrome|android).)*safari/i),(()=>{try{document.createEvent("TouchEvent")}catch(t){return!1}})();
|
|
881
|
-
/**
|
|
882
|
-
* @license
|
|
883
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
884
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
885
|
-
*/
|
|
886
|
-
const ys=Gt((t=>class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}}));
|
|
887
|
-
/**
|
|
888
|
-
* @license
|
|
889
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
890
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
891
|
-
*/let ws=!1;function _s(t,e){const i=Math.max(t.tabIndex,0),s=Math.max(e.tabIndex,0);return 0===i||0===s?s>i:i>s}function xs(t){const e=t.length;if(e<2)return t;const i=Math.ceil(e/2);return function(t,e){const i=[];for(;t.length>0&&e.length>0;)_s(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(xs(t.slice(0,i)),xs(t.slice(i)))}function ks(t,e){if(t.nodeType!==Node.ELEMENT_NODE||function(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const i=window.getComputedStyle(t);return"hidden"===i.visibility||"none"===i.display}(t))return!1;const i=t,s=function(t){if(!function(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let o=s>0;s>=0&&e.push(i);let r=[];return r="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...r].forEach((t=>{o=ks(t,e)||o})),o}function As(t){return t.getRootNode().activeElement===t}window.addEventListener("keydown",(()=>{ws=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{ws=!1}),{capture:!0});
|
|
892
|
-
/**
|
|
893
|
-
* @license
|
|
894
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
895
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
896
|
-
*/
|
|
897
|
-
const Cs=[];class Ds{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Cs.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Cs.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Cs).pop()&&"Tab"===t.key&&(t.preventDefault(),this.__focusNextElement(t.shiftKey))}__focusNextElement(t=!1){const e=this.__focusableElements,i=e[(e.length+this.__focusedElementIndex+(t?-1:1))%e.length];i.focus(),"input"===i.localName&&i.select()}get __focusableElements(){return function(t){const e=[];return ks(t,e)?xs(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(As).pop())}}
|
|
898
|
-
/**
|
|
899
|
-
* @license
|
|
900
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
901
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
902
|
-
*/class Ts extends(ft(ji(ys(Fi)))){static get template(){return Mi`
|
|
903
|
-
<style>
|
|
904
|
-
:host {
|
|
905
|
-
z-index: 200;
|
|
906
|
-
position: fixed;
|
|
907
|
-
|
|
908
|
-
/* Despite of what the names say, <vaadin-overlay> is just a container
|
|
909
|
-
for position/sizing/alignment. The actual overlay is the overlay part. */
|
|
910
|
-
|
|
911
|
-
/* Default position constraints: the entire viewport. Note: themes can
|
|
912
|
-
override this to introduce gaps between the overlay and the viewport. */
|
|
913
|
-
top: 0;
|
|
914
|
-
right: 0;
|
|
915
|
-
bottom: var(--vaadin-overlay-viewport-bottom);
|
|
916
|
-
left: 0;
|
|
917
|
-
|
|
918
|
-
/* Use flexbox alignment for the overlay part. */
|
|
919
|
-
display: flex;
|
|
920
|
-
flex-direction: column; /* makes dropdowns sizing easier */
|
|
921
|
-
/* Align to center by default. */
|
|
922
|
-
align-items: center;
|
|
923
|
-
justify-content: center;
|
|
924
|
-
|
|
925
|
-
/* Allow centering when max-width/max-height applies. */
|
|
926
|
-
margin: auto;
|
|
927
|
-
|
|
928
|
-
/* The host is not clickable, only the overlay part is. */
|
|
929
|
-
pointer-events: none;
|
|
930
|
-
|
|
931
|
-
/* Remove tap highlight on touch devices. */
|
|
932
|
-
-webkit-tap-highlight-color: transparent;
|
|
933
|
-
|
|
934
|
-
/* CSS API for host */
|
|
935
|
-
--vaadin-overlay-viewport-bottom: 0;
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
:host([hidden]),
|
|
939
|
-
:host(:not([opened]):not([closing])) {
|
|
940
|
-
display: none !important;
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
[part='overlay'] {
|
|
944
|
-
-webkit-overflow-scrolling: touch;
|
|
945
|
-
overflow: auto;
|
|
946
|
-
pointer-events: auto;
|
|
947
|
-
|
|
948
|
-
/* Prevent overflowing the host in MSIE 11 */
|
|
949
|
-
max-width: 100%;
|
|
950
|
-
box-sizing: border-box;
|
|
951
|
-
|
|
952
|
-
-webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
[part='backdrop'] {
|
|
956
|
-
z-index: -1;
|
|
957
|
-
content: '';
|
|
958
|
-
background: rgba(0, 0, 0, 0.5);
|
|
959
|
-
position: fixed;
|
|
960
|
-
top: 0;
|
|
961
|
-
left: 0;
|
|
962
|
-
bottom: 0;
|
|
963
|
-
right: 0;
|
|
964
|
-
pointer-events: auto;
|
|
965
|
-
}
|
|
966
|
-
</style>
|
|
967
|
-
|
|
968
|
-
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
969
|
-
<div part="overlay" id="overlay" tabindex="0">
|
|
970
|
-
<div part="content" id="content">
|
|
971
|
-
<slot></slot>
|
|
972
|
-
</div>
|
|
973
|
-
</div>
|
|
974
|
-
`}static get is(){return"vaadin-overlay"}static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:Element,renderer:Function,template:{type:Object,notify:!0},content:{type:Object,notify:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0},model:Object,modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement},_mouseDownInside:{type:Boolean},_mouseUpInside:{type:Boolean},_instance:{type:Object},_originalContentPart:Object,_contentNodes:Array,_oldOwner:Element,_oldModel:Object,_oldTemplate:Object,_oldRenderer:Object,_oldOpened:Boolean}}static get observers(){return["_templateOrRendererChanged(template, renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),this._observer=new Gi(this,(t=>{this._setTemplateFromNodes(t.addedNodes)})),this._boundIronOverlayCanceledListener=this._ironOverlayCanceled.bind(this),gs&&(this._boundIosResizeListener=()=>this._detectIosNavbar()),this.__focusTrapController=new Ds(this)}ready(){super.ready(),this._observer.flush(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addController(this.__focusTrapController)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e>t&&i>t?i-t+"px":"0")}_setTemplateFromNodes(t){this.template=t.filter((t=>t.localName&&"template"===t.localName))[0]||this.template}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this.content,this.owner,this.model)}_ironOverlayCanceled(t){t.preventDefault()}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._last)return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}_ensureTemplatized(){this._setTemplateFromNodes(Array.from(this.children))}_openedChanged(t,e){this._instance||this._ensureTemplatized(),t?(this.__restoreFocusNode=this._getActiveElement(),this._animatedOpening(),Qi(this,(()=>{this.focusTrap&&this.__focusTrapController.trapFocus(this.$.overlay);const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this.focusTrap&&this.__focusTrapController.releaseFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this).getPropertyValue("animation-name");return!("none"===getComputedStyle(this).getPropertyValue("display"))&&t&&"none"!==t}_enqueueAnimation(t,e){const i=`__${t}Handler`,s=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){document.addEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this.removeAttribute("opening")}_finishClosing(){document.removeEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing")}_animatedClosing(){if(this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder){this._exitModalState();const t=this.restoreFocusNode||this.__restoreFocusNode;if(this.restoreFocusOnClose&&t){const e=this._getActiveElement();(e===document.body||this._deepContains(e))&&setTimeout((()=>t.focus())),this.__restoreFocusNode=null}this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing()}}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}static get __attachedInstances(){return Array.from(document.body.children).filter((t=>t instanceof Ts&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0))}get _last(){return this===Ts.__attachedInstances.pop()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Ts.__attachedInstances.forEach((t=>{t!==this&&(t.shadowRoot.querySelector('[part="overlay"]').style.pointerEvents="none")}))}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=Ts.__attachedInstances;let e;for(;(e=t.pop())&&(e===this||(e.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),e.modeless)););}_removeOldContent(){this.content&&this._contentNodes&&(this._observer.disconnect(),this._contentNodes.forEach((t=>{t.parentNode===this.content&&this.content.removeChild(t)})),this._originalContentPart&&(this.$.content.parentNode.replaceChild(this._originalContentPart,this.$.content),this.$.content=this._originalContentPart,this._originalContentPart=void 0),this._observer.connect(),this._contentNodes=void 0,this.content=void 0)}_stampOverlayTemplate(t){this._removeOldContent(),t._Templatizer||(t._Templatizer=ps(t,this,{forwardHostProp(t,e){this._instance&&this._instance.forwardHostProp(t,e)}})),this._instance=new t._Templatizer({}),this._contentNodes=Array.from(this._instance.root.childNodes);const e=t._templateRoot||(t._templateRoot=t.getRootNode());if(e!==document){this.$.content.shadowRoot||this.$.content.attachShadow({mode:"open"});let t=Array.from(e.querySelectorAll("style")).reduce(((t,e)=>t+e.textContent),"");if(t=t.replace(/:host/g,":host-nomatch"),t){const e=document.createElement("style");e.textContent=t,this.$.content.shadowRoot.appendChild(e),this._contentNodes.unshift(e)}this.$.content.shadowRoot.appendChild(this._instance.root),this.content=this.$.content.shadowRoot}else this.appendChild(this._instance.root),this.content=this}_removeNewRendererOrTemplate(t,e,i,s){t!==e?this.template=void 0:i!==s&&(this.renderer=void 0)}_templateOrRendererChanged(t,e,i,s,o){if(t&&e)throw this._removeNewRendererOrTemplate(t,this._oldTemplate,e,this._oldRenderer),new Error("You should only use either a renderer or a template for overlay content");const r=this._oldOwner!==i||this._oldModel!==s;this._oldModel=s,this._oldOwner=i;const n=this._oldTemplate!==t;this._oldTemplate=t;const a=this._oldRenderer!==e;this._oldRenderer=e;const l=this._oldOpened!==o;this._oldOpened=o,a&&(this.content=this,this.content.innerHTML="",delete this.content._$litPart$),t&&n?this._stampOverlayTemplate(t):e&&(a||l||r)&&o&&this.requestContentUpdate()}_getActiveElement(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}bringToFront(){let t="";const e=Ts.__attachedInstances.filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}}customElements.define(Ts.is,Ts);
|
|
975
|
-
/**
|
|
976
|
-
* @license
|
|
977
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
978
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
979
|
-
*/
|
|
980
|
-
const Ss=d`
|
|
981
|
-
:host([opening]),
|
|
982
|
-
:host([closing]) {
|
|
983
|
-
animation: 0.14s lumo-overlay-dummy-animation;
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
[part='overlay'] {
|
|
987
|
-
will-change: opacity, transform;
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
:host([opening]) [part='overlay'] {
|
|
991
|
-
animation: 0.1s lumo-menu-overlay-enter ease-out both;
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
@keyframes lumo-menu-overlay-enter {
|
|
995
|
-
0% {
|
|
996
|
-
opacity: 0;
|
|
997
|
-
transform: translateY(-4px);
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
:host([closing]) [part='overlay'] {
|
|
1002
|
-
animation: 0.1s lumo-menu-overlay-exit both;
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
@keyframes lumo-menu-overlay-exit {
|
|
1006
|
-
100% {
|
|
1007
|
-
opacity: 0;
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1010
|
-
`;ht("",Ss,{moduleId:"lumo-menu-overlay-core"});const zs=[$i,Ss,d`
|
|
1011
|
-
/* Small viewport (bottom sheet) styles */
|
|
1012
|
-
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
1013
|
-
@media (max-width: 420px), (max-height: 420px) {
|
|
1014
|
-
:host {
|
|
1015
|
-
top: 0 !important;
|
|
1016
|
-
right: 0 !important;
|
|
1017
|
-
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
1018
|
-
left: 0 !important;
|
|
1019
|
-
align-items: stretch !important;
|
|
1020
|
-
justify-content: flex-end !important;
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
[part='overlay'] {
|
|
1024
|
-
max-height: 50vh;
|
|
1025
|
-
width: 100vw;
|
|
1026
|
-
border-radius: 0;
|
|
1027
|
-
box-shadow: var(--lumo-box-shadow-xl);
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
/* The content part scrolls instead of the overlay part, because of the gradient fade-out */
|
|
1031
|
-
[part='content'] {
|
|
1032
|
-
padding: 30px var(--lumo-space-m);
|
|
1033
|
-
max-height: inherit;
|
|
1034
|
-
box-sizing: border-box;
|
|
1035
|
-
-webkit-overflow-scrolling: touch;
|
|
1036
|
-
overflow: auto;
|
|
1037
|
-
-webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
1038
|
-
mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
[part='backdrop'] {
|
|
1042
|
-
display: block;
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
/* Animations */
|
|
1046
|
-
|
|
1047
|
-
:host([opening]) [part='overlay'] {
|
|
1048
|
-
animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
:host([closing]),
|
|
1052
|
-
:host([closing]) [part='backdrop'] {
|
|
1053
|
-
animation-delay: 0.14s;
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
:host([closing]) [part='overlay'] {
|
|
1057
|
-
animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
@keyframes lumo-mobile-menu-overlay-enter {
|
|
1062
|
-
0% {
|
|
1063
|
-
transform: translateY(150%);
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
@keyframes lumo-mobile-menu-overlay-exit {
|
|
1068
|
-
100% {
|
|
1069
|
-
transform: translateY(150%);
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
`];ht("",zs,{moduleId:"lumo-menu-overlay"}),ht("vaadin-date-picker-overlay",[zs,d`
|
|
1073
|
-
[part='overlay'] {
|
|
1074
|
-
/*
|
|
1075
|
-
Width:
|
|
1076
|
-
date cell widths
|
|
1077
|
-
+ month calendar side padding
|
|
1078
|
-
+ year scroller width
|
|
1079
|
-
*/
|
|
1080
|
-
/* prettier-ignore */
|
|
1081
|
-
width:
|
|
1082
|
-
calc(
|
|
1083
|
-
var(--lumo-size-m) * 7
|
|
1084
|
-
+ var(--lumo-space-xs) * 2
|
|
1085
|
-
+ 57px
|
|
1086
|
-
);
|
|
1087
|
-
height: 100%;
|
|
1088
|
-
max-height: calc(var(--lumo-size-m) * 14);
|
|
1089
|
-
overflow: hidden;
|
|
1090
|
-
-webkit-tap-highlight-color: transparent;
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
[part='overlay'] {
|
|
1094
|
-
flex-direction: column;
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
[part='content'] {
|
|
1098
|
-
padding: 0;
|
|
1099
|
-
height: 100%;
|
|
1100
|
-
overflow: hidden;
|
|
1101
|
-
-webkit-mask-image: none;
|
|
1102
|
-
mask-image: none;
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
:host([top-aligned]) [part~='overlay'] {
|
|
1106
|
-
margin-top: var(--lumo-space-xs);
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
:host([bottom-aligned]) [part~='overlay'] {
|
|
1110
|
-
margin-bottom: var(--lumo-space-xs);
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
@media (max-width: 420px), (max-height: 420px) {
|
|
1114
|
-
[part='overlay'] {
|
|
1115
|
-
width: 100vw;
|
|
1116
|
-
height: 70vh;
|
|
1117
|
-
max-height: 70vh;
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
`],{moduleId:"lumo-date-picker-overlay"}),ht("vaadin-button",d`
|
|
1121
|
-
:host {
|
|
1122
|
-
/* Sizing */
|
|
1123
|
-
--lumo-button-size: var(--lumo-size-m);
|
|
1124
|
-
min-width: calc(var(--lumo-button-size) * 2);
|
|
1125
|
-
height: var(--lumo-button-size);
|
|
1126
|
-
padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius-m) / 2);
|
|
1127
|
-
margin: var(--lumo-space-xs) 0;
|
|
1128
|
-
box-sizing: border-box;
|
|
1129
|
-
/* Style */
|
|
1130
|
-
font-family: var(--lumo-font-family);
|
|
1131
|
-
font-size: var(--lumo-font-size-m);
|
|
1132
|
-
font-weight: 500;
|
|
1133
|
-
color: var(--_lumo-button-color, var(--lumo-primary-text-color));
|
|
1134
|
-
background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct));
|
|
1135
|
-
border-radius: var(--lumo-border-radius-m);
|
|
1136
|
-
cursor: var(--lumo-clickable-cursor);
|
|
1137
|
-
-webkit-tap-highlight-color: transparent;
|
|
1138
|
-
-webkit-font-smoothing: antialiased;
|
|
1139
|
-
-moz-osx-font-smoothing: grayscale;
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
/* Set only for the internal parts so we don’t affect the host vertical alignment */
|
|
1143
|
-
[part='label'],
|
|
1144
|
-
[part='prefix'],
|
|
1145
|
-
[part='suffix'] {
|
|
1146
|
-
line-height: var(--lumo-line-height-xs);
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
[part='label'] {
|
|
1150
|
-
padding: calc(var(--lumo-button-size) / 6) 0;
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
:host([theme~='small']) {
|
|
1154
|
-
font-size: var(--lumo-font-size-s);
|
|
1155
|
-
--lumo-button-size: var(--lumo-size-s);
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
:host([theme~='large']) {
|
|
1159
|
-
font-size: var(--lumo-font-size-l);
|
|
1160
|
-
--lumo-button-size: var(--lumo-size-l);
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
/* For interaction states */
|
|
1164
|
-
:host::before,
|
|
1165
|
-
:host::after {
|
|
1166
|
-
content: '';
|
|
1167
|
-
/* We rely on the host always being relative */
|
|
1168
|
-
position: absolute;
|
|
1169
|
-
z-index: 1;
|
|
1170
|
-
top: 0;
|
|
1171
|
-
right: 0;
|
|
1172
|
-
bottom: 0;
|
|
1173
|
-
left: 0;
|
|
1174
|
-
background-color: currentColor;
|
|
1175
|
-
border-radius: inherit;
|
|
1176
|
-
opacity: 0;
|
|
1177
|
-
pointer-events: none;
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
/* Hover */
|
|
1181
|
-
|
|
1182
|
-
@media (any-hover: hover) {
|
|
1183
|
-
:host(:hover)::before {
|
|
1184
|
-
opacity: 0.02;
|
|
1185
|
-
}
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
/* Active */
|
|
1189
|
-
|
|
1190
|
-
:host::after {
|
|
1191
|
-
transition: opacity 1.4s, transform 0.1s;
|
|
1192
|
-
filter: blur(8px);
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
:host([active])::before {
|
|
1196
|
-
opacity: 0.05;
|
|
1197
|
-
transition-duration: 0s;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
:host([active])::after {
|
|
1201
|
-
opacity: 0.1;
|
|
1202
|
-
transition-duration: 0s, 0s;
|
|
1203
|
-
transform: scale(0);
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
/* Keyboard focus */
|
|
1207
|
-
|
|
1208
|
-
:host([focus-ring]) {
|
|
1209
|
-
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
:host([theme~='primary'][focus-ring]) {
|
|
1213
|
-
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
/* Types (primary, tertiary, tertiary-inline */
|
|
1217
|
-
|
|
1218
|
-
:host([theme~='tertiary']),
|
|
1219
|
-
:host([theme~='tertiary-inline']) {
|
|
1220
|
-
background-color: transparent !important;
|
|
1221
|
-
min-width: 0;
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
:host([theme~='tertiary']) {
|
|
1225
|
-
padding: 0 calc(var(--lumo-button-size) / 6);
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
:host([theme~='tertiary-inline'])::before {
|
|
1229
|
-
display: none;
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
:host([theme~='tertiary-inline']) {
|
|
1233
|
-
margin: 0;
|
|
1234
|
-
height: auto;
|
|
1235
|
-
padding: 0;
|
|
1236
|
-
line-height: inherit;
|
|
1237
|
-
font-size: inherit;
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
:host([theme~='tertiary-inline']) [part='label'] {
|
|
1241
|
-
padding: 0;
|
|
1242
|
-
overflow: visible;
|
|
1243
|
-
line-height: inherit;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
:host([theme~='primary']) {
|
|
1247
|
-
background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color));
|
|
1248
|
-
color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color));
|
|
1249
|
-
font-weight: 600;
|
|
1250
|
-
min-width: calc(var(--lumo-button-size) * 2.5);
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
:host([theme~='primary'])::before {
|
|
1254
|
-
background-color: black;
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
@media (any-hover: hover) {
|
|
1258
|
-
:host([theme~='primary']:hover)::before {
|
|
1259
|
-
opacity: 0.05;
|
|
1260
|
-
}
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
:host([theme~='primary'][active])::before {
|
|
1264
|
-
opacity: 0.1;
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
:host([theme~='primary'][active])::after {
|
|
1268
|
-
opacity: 0.2;
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
/* Colors (success, error, contrast) */
|
|
1272
|
-
|
|
1273
|
-
:host([theme~='success']) {
|
|
1274
|
-
color: var(--lumo-success-text-color);
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
:host([theme~='success'][theme~='primary']) {
|
|
1278
|
-
background-color: var(--lumo-success-color);
|
|
1279
|
-
color: var(--lumo-success-contrast-color);
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
:host([theme~='error']) {
|
|
1283
|
-
color: var(--lumo-error-text-color);
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
:host([theme~='error'][theme~='primary']) {
|
|
1287
|
-
background-color: var(--lumo-error-color);
|
|
1288
|
-
color: var(--lumo-error-contrast-color);
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
:host([theme~='contrast']) {
|
|
1292
|
-
color: var(--lumo-contrast);
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
:host([theme~='contrast'][theme~='primary']) {
|
|
1296
|
-
background-color: var(--lumo-contrast);
|
|
1297
|
-
color: var(--lumo-base-color);
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
/* Disabled state. Keep selectors after other color variants. */
|
|
1301
|
-
|
|
1302
|
-
:host([disabled]) {
|
|
1303
|
-
pointer-events: none;
|
|
1304
|
-
color: var(--lumo-disabled-text-color);
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
:host([theme~='primary'][disabled]) {
|
|
1308
|
-
background-color: var(--lumo-contrast-30pct);
|
|
1309
|
-
color: var(--lumo-base-color);
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
:host([theme~='primary'][disabled]) [part] {
|
|
1313
|
-
opacity: 0.7;
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
/* Icons */
|
|
1317
|
-
|
|
1318
|
-
[part] ::slotted(vaadin-icon),
|
|
1319
|
-
[part] ::slotted(iron-icon) {
|
|
1320
|
-
display: inline-block;
|
|
1321
|
-
width: var(--lumo-icon-size-m);
|
|
1322
|
-
height: var(--lumo-icon-size-m);
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
1326
|
-
[part] ::slotted(vaadin-icon[icon^='vaadin:']),
|
|
1327
|
-
[part] ::slotted(iron-icon[icon^='vaadin:']) {
|
|
1328
|
-
padding: 0.25em;
|
|
1329
|
-
box-sizing: border-box !important;
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
[part='prefix'] {
|
|
1333
|
-
margin-left: -0.25em;
|
|
1334
|
-
margin-right: 0.25em;
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
[part='suffix'] {
|
|
1338
|
-
margin-left: 0.25em;
|
|
1339
|
-
margin-right: -0.25em;
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
/* Icon-only */
|
|
1343
|
-
|
|
1344
|
-
:host([theme~='icon']:not([theme~='tertiary-inline'])) {
|
|
1345
|
-
min-width: var(--lumo-button-size);
|
|
1346
|
-
padding-left: calc(var(--lumo-button-size) / 4);
|
|
1347
|
-
padding-right: calc(var(--lumo-button-size) / 4);
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
:host([theme~='icon']) [part='prefix'],
|
|
1351
|
-
:host([theme~='icon']) [part='suffix'] {
|
|
1352
|
-
margin-left: 0;
|
|
1353
|
-
margin-right: 0;
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
/* RTL specific styles */
|
|
1357
|
-
|
|
1358
|
-
:host([dir='rtl']) [part='prefix'] {
|
|
1359
|
-
margin-left: 0.25em;
|
|
1360
|
-
margin-right: -0.25em;
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
:host([dir='rtl']) [part='suffix'] {
|
|
1364
|
-
margin-left: -0.25em;
|
|
1365
|
-
margin-right: 0.25em;
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
|
-
:host([dir='rtl'][theme~='icon']) [part='prefix'],
|
|
1369
|
-
:host([dir='rtl'][theme~='icon']) [part='suffix'] {
|
|
1370
|
-
margin-left: 0;
|
|
1371
|
-
margin-right: 0;
|
|
1372
|
-
}
|
|
1373
|
-
`,{moduleId:"lumo-button"});const Ms=/\/\*\*\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Ps=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Fs(t,e){if("function"!=typeof t)return;const i=Ms.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function Es(){}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(Ps?!(Ps&&Object.keys(Ps).map((t=>Ps[t])).filter((t=>t.productionMode)).length>0):!Fs((function(){return!0})))}catch(t){return!1}}());
|
|
1374
|
-
/**
|
|
1375
|
-
* @license
|
|
1376
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1377
|
-
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1378
|
-
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1379
|
-
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1380
|
-
* Code distributed by Google as part of the polymer project is also
|
|
1381
|
-
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1382
|
-
*/
|
|
1383
|
-
let Os=0,Is=0;const Bs=[];let Ns=0,js=!1;const Ls=document.createTextNode("");new window.MutationObserver((function(){js=!1;const t=Bs.length;for(let e=0;e<t;e++){const t=Bs[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Bs.splice(0,t),Is+=t})).observe(Ls,{characterData:!0});const Rs={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Ws={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},Hs={run(t){js||(js=!0,Ls.textContent=Ns,Ns+=1),Bs.push(t);const e=Os;return Os+=1,e},cancel(t){const e=t-Is;if(e>=0){if(!Bs[e])throw new Error(`invalid async handle: ${t}`);Bs[e]=null}}};
|
|
1384
|
-
/**
|
|
1385
|
-
@license
|
|
1386
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1387
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1388
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1389
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1390
|
-
Code distributed by Google as part of the polymer project is also
|
|
1391
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1392
|
-
*/
|
|
1393
|
-
class Us{static debounce(t,e,i){return t instanceof Us?t._cancelAsync():t=new Us,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,Ys.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Ys.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}let $s,Ys=new Set;
|
|
1394
|
-
/**
|
|
1395
|
-
* @license
|
|
1396
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1397
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1398
|
-
*/
|
|
1399
|
-
window.Vaadin=window.Vaadin||{},window.Vaadin.registrations=window.Vaadin.registrations||[],window.Vaadin.developmentModeCallback=window.Vaadin.developmentModeCallback||{},window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)Fs(t,e)}(Es)};const qs=new Set,Vs=t=>class extends(ji(t)){static get version(){return"23.2.0"}static finalize(){super.finalize();const{is:t}=this;t&&!qs.has(t)&&(window.Vaadin.registrations.push(this),qs.add(t),window.Vaadin.developmentModeCallback&&($s=Us.debounce($s,Ws,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),Ys.add($s)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
|
|
1400
|
-
/**
|
|
1401
|
-
@license
|
|
1402
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1403
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1404
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1405
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1406
|
-
Code distributed by Google as part of the polymer project is also
|
|
1407
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1408
|
-
*/,Gs="string"==typeof document.head.style.touchAction,Js="__polymerGesturesHandled",Ks="__polymerGesturesTouchAction",Zs=["mousedown","mousemove","mouseup","click"],Xs=[0,1,4,2],Qs=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function to(t){return Zs.indexOf(t)>-1}let eo=!1;!function(){try{const t=Object.defineProperty({},"passive",{get(){eo=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const io=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),so={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function oo(t){const e=t.type;if(!to(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Qs&&(e=Xs[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const ro={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function no(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function ao(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const lo=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],ho={},co=[];function uo(t){const e=lo(t);return e.length>0?e[0]:t.target}function po(t){const e=t.type,i=t.currentTarget.__polymerGestures;if(!i)return;const s=i[e];if(!s)return;if(!t[Js]&&(t[Js]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(ro.touch.id=i.identifier),ro.touch.id!==i.identifier)return;Gs||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)ro.touch.x=e.clientX,ro.touch.y=e.clientY,ro.touch.scrollDecided=!1;else if("touchmove"===i){if(ro.touch.scrollDecided)return;ro.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=lo(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[Ks]){e=t[Ks];break}return e}(t);let s=!1;const o=Math.abs(ro.touch.x-e.clientX),r=Math.abs(ro.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=r>o:"pan-y"===i&&(s=o>r)),s?t.preventDefault():go("track")}}(t)}const o=t[Js];if(!o.skip){for(let e,i=0;i<co.length;i++)e=co[i],s[e.name]&&!o[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<co.length;r++)i=co[r],s[i.name]&&!o[i.name]&&(o[i.name]=!0,i[e](t))}}function mo(t,e,i){return!!ho[e]&&(function(t,e,i){const s=ho[e],o=s.deps,r=s.name;let n=t.__polymerGestures;n||(t.__polymerGestures=n={});for(let e,i,s=0;s<o.length;s++)e=o[s],io&&to(e)&&"click"!==e||(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,po,void to(e)),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&vo(t,s.touchAction)}(t,e,i),!0)}function fo(t){co.push(t);for(let e=0;e<t.emits.length;e++)ho[t.emits[e]]=t}function vo(t,e){Gs&&t instanceof HTMLElement&&Hs.run((()=>{t.style.touchAction=e})),t[Ks]=e}function bo(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,t.dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function go(t){const e=function(t){for(let e,i=0;i<co.length;i++){e=co[i];for(let i,s=0;s<e.emits.length;s++)if(i=e.emits[s],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function yo(t,e,i,s){e&&bo(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>go(t)})}function wo(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),o=Math.abs(t.y-i);return s>=5||o>=5}function _o(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],o=t.moves[t.moves.length-1];let r,n=0;s&&(r=o.x-s.x,n=o.y-s.y),bo(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:o.x-t.x,dy:o.y-t.y,ddx:r,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const o=s;if(s=s.shadowRoot.elementFromPoint(t,e),o===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function xo(t,e,i){const s=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y),r=uo(i||e);!r||so[r.localName]&&r.hasAttribute("disabled")||(isNaN(s)||isNaN(o)||s<=25&&o<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=uo(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,o=t.pageY;return!(s>=i.left&&s<=i.right&&o>=i.top&&o<=i.bottom)}return!1}(e))&&(t.prevent||bo(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
|
|
1409
|
-
/**
|
|
1410
|
-
* @license
|
|
1411
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1412
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1413
|
-
*/fo({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){ao(this.info)},mousedown(t){if(!oo(t))return;const e=uo(t),i=this;no(this.info,(t=>{oo(t)||(yo("up",e,t),ao(i.info))}),(t=>{oo(t)&&yo("up",e,t),ao(i.info)})),yo("down",e,t)},touchstart(t){yo("down",uo(t),t.changedTouches[0],t)},touchend(t){yo("up",uo(t),t.changedTouches[0],t)}}),fo({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,ao(this.info)},mousedown(t){if(!oo(t))return;const e=uo(t),i=this,s=t=>{const s=t.clientX,o=t.clientY;wo(i.info,s,o)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&go("tap"),i.info.addMove({x:s,y:o}),oo(t)||(i.info.state="end",ao(i.info)),e&&_o(i.info,e,t),i.info.started=!0)};no(this.info,s,(t=>{i.info.started&&s(t),ao(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=uo(t),i=t.changedTouches[0],s=i.clientX,o=i.clientY;wo(this.info,s,o)&&("start"===this.info.state&&go("tap"),this.info.addMove({x:s,y:o}),_o(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=uo(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),_o(this.info,e,i))}}),fo({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){oo(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){oo(t)&&xo(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){xo(this.info,t.changedTouches[0],t)}});const ko=Gt((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),Ao=Gt((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),Co=t=>class extends(ko(Ao(t))){get _activeKeys(){return[" "]}ready(){super.ready(),mo(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),mo(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}
|
|
1414
|
-
/**
|
|
1415
|
-
* @license
|
|
1416
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1417
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1418
|
-
*/,Do=Gt((t=>class extends t{get _keyboardActive(){return ws}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})),To=t=>class extends(ko(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}
|
|
1419
|
-
/**
|
|
1420
|
-
* @license
|
|
1421
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
1422
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1423
|
-
*/,So=t=>class extends(Co(To(Do(t)))){static get properties(){return{tabindex:{value:0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}}
|
|
1424
|
-
/**
|
|
1425
|
-
* @license
|
|
1426
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
1427
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1428
|
-
*/;
|
|
1429
|
-
/**
|
|
1430
|
-
* @license
|
|
1431
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
1432
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1433
|
-
*/class zo extends(So(Vs(ft(Fi)))){static get is(){return"vaadin-button"}static get template(){return Mi`
|
|
1434
|
-
<style>
|
|
1435
|
-
:host {
|
|
1436
|
-
display: inline-block;
|
|
1437
|
-
position: relative;
|
|
1438
|
-
outline: none;
|
|
1439
|
-
white-space: nowrap;
|
|
1440
|
-
-webkit-user-select: none;
|
|
1441
|
-
-moz-user-select: none;
|
|
1442
|
-
user-select: none;
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
:host([hidden]) {
|
|
1446
|
-
display: none !important;
|
|
1447
|
-
}
|
|
1448
|
-
|
|
1449
|
-
/* Aligns the button with form fields when placed on the same line.
|
|
1450
|
-
Note, to make it work, the form fields should have the same "::before" pseudo-element. */
|
|
1451
|
-
.vaadin-button-container::before {
|
|
1452
|
-
content: '\\2003';
|
|
1453
|
-
display: inline-block;
|
|
1454
|
-
width: 0;
|
|
1455
|
-
max-height: 100%;
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
.vaadin-button-container {
|
|
1459
|
-
display: inline-flex;
|
|
1460
|
-
align-items: center;
|
|
1461
|
-
justify-content: center;
|
|
1462
|
-
text-align: center;
|
|
1463
|
-
width: 100%;
|
|
1464
|
-
height: 100%;
|
|
1465
|
-
min-height: inherit;
|
|
1466
|
-
text-shadow: inherit;
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
[part='prefix'],
|
|
1470
|
-
[part='suffix'] {
|
|
1471
|
-
flex: none;
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
[part='label'] {
|
|
1475
|
-
white-space: nowrap;
|
|
1476
|
-
overflow: hidden;
|
|
1477
|
-
text-overflow: ellipsis;
|
|
1478
|
-
}
|
|
1479
|
-
</style>
|
|
1480
|
-
<div class="vaadin-button-container">
|
|
1481
|
-
<span part="prefix">
|
|
1482
|
-
<slot name="prefix"></slot>
|
|
1483
|
-
</span>
|
|
1484
|
-
<span part="label">
|
|
1485
|
-
<slot></slot>
|
|
1486
|
-
</span>
|
|
1487
|
-
<span part="suffix">
|
|
1488
|
-
<slot name="suffix"></slot>
|
|
1489
|
-
</span>
|
|
1490
|
-
</div>
|
|
1491
|
-
`}}customElements.define(zo.is,zo),ht("vaadin-date-picker-overlay-content",d`
|
|
1492
|
-
:host {
|
|
1493
|
-
position: relative;
|
|
1494
|
-
/* Background for the year scroller, placed here as we are using a mask image on the actual years part */
|
|
1495
|
-
background-image: linear-gradient(var(--lumo-shade-5pct), var(--lumo-shade-5pct));
|
|
1496
|
-
background-size: 57px 100%;
|
|
1497
|
-
background-position: top right;
|
|
1498
|
-
background-repeat: no-repeat;
|
|
1499
|
-
cursor: default;
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
/* Month scroller */
|
|
1503
|
-
|
|
1504
|
-
[part='months'] {
|
|
1505
|
-
/* Month calendar height:
|
|
1506
|
-
header height + margin-bottom
|
|
1507
|
-
+ weekdays height + margin-bottom
|
|
1508
|
-
+ date cell heights
|
|
1509
|
-
+ small margin between month calendars
|
|
1510
|
-
*/
|
|
1511
|
-
/* prettier-ignore */
|
|
1512
|
-
--vaadin-infinite-scroller-item-height:
|
|
1513
|
-
calc(
|
|
1514
|
-
var(--lumo-font-size-l) + var(--lumo-space-m)
|
|
1515
|
-
+ var(--lumo-font-size-xs) + var(--lumo-space-s)
|
|
1516
|
-
+ var(--lumo-size-m) * 6
|
|
1517
|
-
+ var(--lumo-space-s)
|
|
1518
|
-
);
|
|
1519
|
-
--vaadin-infinite-scroller-buffer-offset: 20%;
|
|
1520
|
-
-webkit-mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
|
|
1521
|
-
mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
|
|
1522
|
-
position: relative;
|
|
1523
|
-
margin-right: 57px;
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
|
-
/* Year scroller */
|
|
1527
|
-
[part='years'] {
|
|
1528
|
-
/* TODO get rid of fixed magic number */
|
|
1529
|
-
--vaadin-infinite-scroller-buffer-width: 97px;
|
|
1530
|
-
width: 57px;
|
|
1531
|
-
height: auto;
|
|
1532
|
-
top: 0;
|
|
1533
|
-
bottom: 0;
|
|
1534
|
-
font-size: var(--lumo-font-size-s);
|
|
1535
|
-
box-shadow: inset 2px 0 4px 0 var(--lumo-shade-5pct);
|
|
1536
|
-
-webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
|
|
1537
|
-
mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
|
|
1538
|
-
cursor: var(--lumo-clickable-cursor);
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
|
-
[part='year-number']:not([current]),
|
|
1542
|
-
[part='year-separator'] {
|
|
1543
|
-
opacity: 0.7;
|
|
1544
|
-
transition: 0.2s opacity;
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
[part='years']:hover [part='year-number'],
|
|
1548
|
-
[part='years']:hover [part='year-separator'] {
|
|
1549
|
-
opacity: 1;
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
|
-
/* TODO unsupported selector */
|
|
1553
|
-
#scrollers {
|
|
1554
|
-
position: static;
|
|
1555
|
-
display: block;
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
/* TODO unsupported selector, should fix this in vaadin-date-picker that it adapts to the
|
|
1559
|
-
* width of the year scroller */
|
|
1560
|
-
#scrollers[desktop] [part='months'] {
|
|
1561
|
-
right: auto;
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
/* Year scroller position indicator */
|
|
1565
|
-
[part='years']::before {
|
|
1566
|
-
border: none;
|
|
1567
|
-
width: 1em;
|
|
1568
|
-
height: 1em;
|
|
1569
|
-
background-color: var(--lumo-base-color);
|
|
1570
|
-
background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
|
1571
|
-
transform: translate(-75%, -50%) rotate(45deg);
|
|
1572
|
-
border-top-right-radius: var(--lumo-border-radius-s);
|
|
1573
|
-
box-shadow: 2px -2px 6px 0 var(--lumo-shade-5pct);
|
|
1574
|
-
z-index: 1;
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
[part='year-number'],
|
|
1578
|
-
[part='year-separator'] {
|
|
1579
|
-
display: flex;
|
|
1580
|
-
align-items: center;
|
|
1581
|
-
justify-content: center;
|
|
1582
|
-
height: 50%;
|
|
1583
|
-
transform: translateY(-50%);
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
[part='years'] [part='year-separator']::after {
|
|
1587
|
-
color: var(--lumo-disabled-text-color);
|
|
1588
|
-
content: '•';
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
|
-
/* Current year */
|
|
1592
|
-
|
|
1593
|
-
[part='years'] [part='year-number'][current] {
|
|
1594
|
-
color: var(--lumo-primary-text-color);
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
/* Toolbar (footer) */
|
|
1598
|
-
|
|
1599
|
-
[part='toolbar'] {
|
|
1600
|
-
padding: var(--lumo-space-s);
|
|
1601
|
-
border-bottom-left-radius: var(--lumo-border-radius-l);
|
|
1602
|
-
margin-right: 57px;
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
/* Today and Cancel buttons */
|
|
1606
|
-
|
|
1607
|
-
[part='toolbar'] [part\$='button'] {
|
|
1608
|
-
margin: 0;
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
/* Narrow viewport mode (fullscreen) */
|
|
1612
|
-
|
|
1613
|
-
:host([fullscreen]) [part='toolbar'] {
|
|
1614
|
-
order: -1;
|
|
1615
|
-
background-color: var(--lumo-base-color);
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
:host([fullscreen]) [part='overlay-header'] {
|
|
1619
|
-
order: -2;
|
|
1620
|
-
height: var(--lumo-size-m);
|
|
1621
|
-
padding: var(--lumo-space-s);
|
|
1622
|
-
position: absolute;
|
|
1623
|
-
left: 0;
|
|
1624
|
-
right: 0;
|
|
1625
|
-
justify-content: center;
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
:host([fullscreen]) [part='toggle-button'],
|
|
1629
|
-
:host([fullscreen]) [part='clear-button'],
|
|
1630
|
-
[part='overlay-header'] [part='label'] {
|
|
1631
|
-
display: none;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
/* Very narrow screen (year scroller initially hidden) */
|
|
1635
|
-
|
|
1636
|
-
[part='years-toggle-button'] {
|
|
1637
|
-
display: flex;
|
|
1638
|
-
align-items: center;
|
|
1639
|
-
height: var(--lumo-size-s);
|
|
1640
|
-
padding: 0 0.5em;
|
|
1641
|
-
border-radius: var(--lumo-border-radius-m);
|
|
1642
|
-
z-index: 3;
|
|
1643
|
-
color: var(--lumo-primary-text-color);
|
|
1644
|
-
font-weight: 500;
|
|
1645
|
-
-webkit-font-smoothing: antialiased;
|
|
1646
|
-
-moz-osx-font-smoothing: grayscale;
|
|
1647
|
-
}
|
|
1648
|
-
|
|
1649
|
-
:host([years-visible]) [part='years-toggle-button'] {
|
|
1650
|
-
background-color: var(--lumo-primary-color);
|
|
1651
|
-
color: var(--lumo-primary-contrast-color);
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
|
-
/* TODO magic number (same as used for iron-media-query in vaadin-date-picker-overlay-content) */
|
|
1655
|
-
@media screen and (max-width: 374px) {
|
|
1656
|
-
:host {
|
|
1657
|
-
background-image: none;
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
[part='years'] {
|
|
1661
|
-
background-color: var(--lumo-shade-5pct);
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
[part='toolbar'],
|
|
1665
|
-
[part='months'] {
|
|
1666
|
-
margin-right: 0;
|
|
1667
|
-
}
|
|
1668
|
-
|
|
1669
|
-
/* TODO make date-picker adapt to the width of the years part */
|
|
1670
|
-
[part='years'] {
|
|
1671
|
-
--vaadin-infinite-scroller-buffer-width: 90px;
|
|
1672
|
-
width: 50px;
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
|
-
:host([years-visible]) [part='months'] {
|
|
1676
|
-
padding-left: 50px;
|
|
1677
|
-
}
|
|
1678
|
-
}
|
|
1679
|
-
`,{moduleId:"lumo-date-picker-overlay-content"}),ht("vaadin-month-calendar",d`
|
|
1680
|
-
:host {
|
|
1681
|
-
-moz-user-select: none;
|
|
1682
|
-
-webkit-user-select: none;
|
|
1683
|
-
-webkit-tap-highlight-color: transparent;
|
|
1684
|
-
user-select: none;
|
|
1685
|
-
font-size: var(--lumo-font-size-m);
|
|
1686
|
-
color: var(--lumo-body-text-color);
|
|
1687
|
-
text-align: center;
|
|
1688
|
-
padding: 0 var(--lumo-space-xs);
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
|
-
/* Month header */
|
|
1692
|
-
|
|
1693
|
-
[part='month-header'] {
|
|
1694
|
-
color: var(--lumo-header-text-color);
|
|
1695
|
-
font-size: var(--lumo-font-size-l);
|
|
1696
|
-
line-height: 1;
|
|
1697
|
-
font-weight: 500;
|
|
1698
|
-
margin-bottom: var(--lumo-space-m);
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
|
-
/* Week days and numbers */
|
|
1702
|
-
|
|
1703
|
-
[part='weekdays'],
|
|
1704
|
-
[part='weekday'],
|
|
1705
|
-
[part='week-number'] {
|
|
1706
|
-
font-size: var(--lumo-font-size-xxs);
|
|
1707
|
-
line-height: 1;
|
|
1708
|
-
color: var(--lumo-secondary-text-color);
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
[part='weekdays'] {
|
|
1712
|
-
margin-bottom: var(--lumo-space-s);
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
[part='weekday']:empty,
|
|
1716
|
-
[part='week-number'] {
|
|
1717
|
-
width: var(--lumo-size-xs);
|
|
1718
|
-
}
|
|
1719
|
-
|
|
1720
|
-
/* Date and week number cells */
|
|
1721
|
-
|
|
1722
|
-
[part='date'],
|
|
1723
|
-
[part='week-number'] {
|
|
1724
|
-
box-sizing: border-box;
|
|
1725
|
-
display: inline-flex;
|
|
1726
|
-
align-items: center;
|
|
1727
|
-
justify-content: center;
|
|
1728
|
-
height: var(--lumo-size-m);
|
|
1729
|
-
position: relative;
|
|
1730
|
-
}
|
|
1731
|
-
|
|
1732
|
-
[part='date'] {
|
|
1733
|
-
transition: color 0.1s;
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
[part='date']:not(:empty) {
|
|
1737
|
-
cursor: var(--lumo-clickable-cursor);
|
|
1738
|
-
}
|
|
1739
|
-
|
|
1740
|
-
:host([week-numbers]) [part='weekday']:not(:empty),
|
|
1741
|
-
:host([week-numbers]) [part='date'] {
|
|
1742
|
-
width: calc((100% - var(--lumo-size-xs)) / 7);
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
/* Today date */
|
|
1746
|
-
|
|
1747
|
-
[part='date'][today] {
|
|
1748
|
-
color: var(--lumo-primary-text-color);
|
|
1749
|
-
}
|
|
1750
|
-
|
|
1751
|
-
/* Focused date */
|
|
1752
|
-
|
|
1753
|
-
[part='date']::before {
|
|
1754
|
-
content: '';
|
|
1755
|
-
position: absolute;
|
|
1756
|
-
z-index: -1;
|
|
1757
|
-
top: 50%;
|
|
1758
|
-
left: 50%;
|
|
1759
|
-
transform: translate(-50%, -50%);
|
|
1760
|
-
min-width: 2em;
|
|
1761
|
-
min-height: 2em;
|
|
1762
|
-
width: 80%;
|
|
1763
|
-
height: 80%;
|
|
1764
|
-
max-height: 100%;
|
|
1765
|
-
max-width: 100%;
|
|
1766
|
-
border-radius: var(--lumo-border-radius-m);
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
|
-
[part='date'][focused]::before {
|
|
1770
|
-
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
|
|
1771
|
-
}
|
|
1772
|
-
|
|
1773
|
-
:host(:not([focused])) [part='date'][focused]::before {
|
|
1774
|
-
animation: vaadin-date-picker-month-calendar-focus-date 1.4s infinite;
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
@keyframes vaadin-date-picker-month-calendar-focus-date {
|
|
1778
|
-
50% {
|
|
1779
|
-
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px transparent;
|
|
1780
|
-
}
|
|
1781
|
-
}
|
|
1782
|
-
|
|
1783
|
-
[part='date']:not(:empty):not([disabled]):not([selected]):hover::before {
|
|
1784
|
-
background-color: var(--lumo-primary-color-10pct);
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
|
-
[part='date'][selected] {
|
|
1788
|
-
color: var(--lumo-primary-contrast-color);
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
[part='date'][selected]::before {
|
|
1792
|
-
background-color: var(--lumo-primary-color);
|
|
1793
|
-
}
|
|
1794
|
-
|
|
1795
|
-
[part='date'][disabled] {
|
|
1796
|
-
color: var(--lumo-disabled-text-color);
|
|
1797
|
-
}
|
|
1798
|
-
|
|
1799
|
-
@media (pointer: coarse) {
|
|
1800
|
-
[part='date']:hover:not([selected])::before,
|
|
1801
|
-
[part='date'][focused]:not([selected])::before {
|
|
1802
|
-
display: none;
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
[part='date']:not(:empty):not([disabled]):active::before {
|
|
1806
|
-
display: block;
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
[part='date'][selected]::before {
|
|
1810
|
-
box-shadow: none;
|
|
1811
|
-
}
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
/* Disabled */
|
|
1815
|
-
|
|
1816
|
-
:host([disabled]) * {
|
|
1817
|
-
color: var(--lumo-disabled-text-color) !important;
|
|
1818
|
-
}
|
|
1819
|
-
`,{moduleId:"lumo-month-calendar"});const Mo=document.createElement("template");Mo.innerHTML="\n <style>\n @keyframes vaadin-date-picker-month-calendar-focus-date {\n 50% {\n box-shadow: 0 0 0 2px transparent;\n }\n }\n </style>\n",document.head.appendChild(Mo.content);
|
|
1820
|
-
/**
|
|
1821
|
-
* @license
|
|
1822
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
1823
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1824
|
-
*/
|
|
1825
|
-
const Po=document.createElement("template");Po.innerHTML='\n <style>\n @font-face {\n font-family: \'lumo-icons\';\n src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABEgAAsAAAAAIjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuKY21hcAAAAYgAAAD4AAADrsCU8d5nbHlmAAACgAAAC2cAABeAWri7U2hlYWQAAA3oAAAAMAAAADZa/6SsaGhlYQAADhgAAAAdAAAAJAbpA35obXR4AAAOOAAAABAAAACspBAAAGxvY2EAAA5IAAAAWAAAAFh57oA4bWF4cAAADqAAAAAfAAAAIAFKAXBuYW1lAAAOwAAAATEAAAIuUUJZCHBvc3QAAA/0AAABKwAAAelm8SzVeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+yDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mIO+p/FEMUcxDANKMwIkgMABn8MLQB4nO3SWW6DMABF0UtwCEnIPM/zhLK8LqhfXRybSP14XUYtHV9hGYQwQBNIo3cUIPkhQeM7rib1ekqnXg981XuC1qvy84lzojleh3puxL0hPjGjRU473teloEefAUNGjJkwZcacBUtWrNmwZceeA0dOnLlw5cadB09elPGhGf+j0NTI/65KfXerT6JhqKnpRKtgOpuqaTrtKjPUlqHmhto21I7pL6i6hlqY3q7qGWrfUAeGOjTUkaGODXViqFNDnRnq3FAXhro01JWhrg11Y6hbQ90Z6t5QD4Z6NNSToZ4N9WKoV0O9GerdUB+G+jTUl6GWRvkL24BkEXictVh9bFvVFb/nxvbz+7Rf/N6zHcd2bCfP+Wic1Z9N0jpNHCD9SNqqoVBgbQoMjY+pjA4hNnWa2pV1rHSIif0DGkyT2k10Kmu1Cag6huj4ZpqYBHSqJsTEJgZCG3TaVBFv595nO3ZIv4RIrPPuvefe884599zzO/cRF8G/tgn6CFFImNgkR0ggX8wlspbhSSWSdrC5ozd30s2dw5afzvgtyz9/zG9t1hV4RtF1pXolowvtzc2z6L2aYUQM45jKH9WDTvd1LRDoDASYWhfTzTyvboXz6uZX4ARX5wrF39y+HM2+CJ8d0pkyqBIqoze3D12ez4DrFoYzxI8dWwMrDlZ2DMqQAR9AROsJU+2smlTPaTTco52BVxXa2a2+I8vvqd2dVHm1LoPeTn/AZPRYGthDYOeZjBjKoFsVGulR3lGU95SeCK44oHU7MhWUGUKZDT3oSUcG2GWuh+EDDfUYA/jhIhl0TOsJNYSEu7mQmi3UzfXwZKA4BsVsHLXQYGgJW95qEtpJ1VcW9HiTriZBlFEqxsDjA09yCNUoQxxwd7KWSTt2y3GTKifkqHRCoWZc3m11Wa/dKdFgXD4kSYfkeJBKd8KMz7J8dZn/cGRCcLGDnA2Ge3bKzcvlnTDNthFWLH7Xt80ua5FMjA4WKelWv5Xo16vHuYzpRbJhhdVlftuRK0VlR27D9lu5TF0DPBi60OrHNO0AfP/uRWvhn/U3LXICE+nh+3IHPUJ8JE6GyBjZQLbjGchlrSgYngF8zyrIF4NJD3atUcgWsWunGN/UHX5B5/yg7uF87Nqp4Gf52F3gH73DjEZNRoqCKAr9giQJp5rGJABpiVE2htNhW9R8nw0jqYjCYcY4LIjwYNScf4WN06IZnZCEqsI4cFaQbo4Z1TsZBx40YhXkHOecaYE5oY37IIQ+iJJ+UsDYSun5MuRSBRZRUUhlY2DqOGajOR6zrSU/5My6l2DnusH1GQgnw5BZP7iuYM/ahcfQ7Z8y51ddfutvuwNqWQ0cBYr8fj0U0vsHpwerVaB2sWhXT2NExi2r1KUE2tUuVMnkepVQrxTmpQrZTG4iu8he8iPyM3KcPE/+RP5KPoE2CEAKclCBzXATxkYOtUY/o961PWRqsj0chRrHFBbtrjP9/P0ven5pcbRdpL94vfsy33e5+izuwz3nFLFPVNayPZx/jdG1fOChflFRvYzsW6L18efgLrSWIgvcqnGJYi4skO4xREURjbDuxKke5v0T3Mrzkt2fi31uyZlLLrqIpEuXXsMlgw442Jb0GAxjS1DM20kBoCzHLXm/jEm0IltdcvU0fEW24jgiwwRjVd9u4NJHcIyoHJcwvyVqgqj5hqBJ1ZWSJryh9p56UWhX1XbhRbW2ZopuZWsQd5y8mEQ8M+C6xjRYxZbDKWf5AgY+Qq/l6wSPk16zDFjowYuu+wjx13mfkxbyDDxadYT/LijZyI0THB+6yfLaWsRcO82zo9mWTNtpO18qlorZoIVMwSN40tky5DOQ1MCIAe24mvlsuwIIxPb10+uXDQ4uWz/9m3rj+ql7p6bufZARuPVq5tXtsn6KwfP8Jy0TeWOyNhUJN6mhX5rkUTtUppQWEMNTqEdaCGKFYKJaQrCE4JtDLYOlNEKmO5kBTPGY2A0N2sY3+dVlo1N9ycBsIGtOjQ2p/tlZvzo0ur4v6cOh8NTospB7U/X40KahoU3bGIH97dnwmtHlYffVG3R1YOwKM2vNhrPhCT5zk64sG53oS4b31aYjqe/B7+kQiXBN+b6h21hNUPMq29B8CU4elINdygMPKF1B+WBTG7Z9ZshpN/xwEuuDQZR+nuoo4CDaAiiwXmLpmukMQyPf/JMclqgL1ixZQ/nnP2VbdUODFGt2fgBvL123rlLYu/6A9ckb7F3K0/CyBMEu6aQoPscroCcacVehvyQyCZAsizsWWBkoLC+WAiWnOksLKaeuQDzGuqSk42aiYTiJ4zf9afl17SrqaTO1f+XlZAfIuYcq7/IqYMaMrksOJ6vHkOCPDq943xcCnHqVD9pHFRpMqSPXrIua1WNs+tOz1U+ciTCDpPk+c4QYJIHnYhxP/kVPAq+ahFpVhPcHp8qyarhiF+HsBU9Hrl+UZa876fbKipL0KqB6OdUveErgtOI97fZ63ae9SvWU6k2w1JfwqnUbHsYcFCJFrC/W12zIMMirWYEHxMPs6LGYSdkSZ5TsNP9PCpwnWC3HKZ1lydNjWHC2Mn3l6vL0dHn1ldP3LTSrX+vKrBqv7KmMr8p0SR6P1NqF63or6XRlIyO90f7+kf7+myOhvt4tq7f09oUiTc2/dycGgqFQcCDRLYmi1NL7fk0CknVMxEg/cdfs/TnpJMNkgqwj17B8beVazSrVbU4lG67IZYOCnWrYy3yBR9cyWcChywos3LJBEdhhFoAdYjiw0rLGm0xU5OzoGm5/ZfmHjVZpNNg6SznzGKDdwv2cCtVn6Eaxo12cfxLprpVtTcZ6hVx6dow7Yq7e8LXO8PY9Jgjoze9yCtU5FNbegcKkQMdCbt9au/te4Ebe0jkc0ukUL32eYnTpNs20h0KpUOhZPYwVcfhZnfdqeCvDfXiuCbAoYWcXERPc/mDQD3/hdF+wK4i/xv3kYfprIpAuMkk2kW3kdtS0kBIKpZwp8KxmsCyfM1MFzAss9LBkDxRyThiaqTLwKYKJVTwmWTudMyz+yks09346MDh4m72yOxCKrt1XMlQ1qPVlTEVVQ1ofdK/sCWjtZu9qGwZ8YZ9PPWlo1IV3eW3+U0aXblP39zrt+JPf6UhEQ1rUjNBULN+utyuaDNW34kpAVuSOeMTyWbSNWnooFu+QFNWQ4d/Ox4IPWx41fP/fB/Rjeoz08ezPA9TysMtmnOXfGN7Ui3xIYLDALrlDLOP09qtJuY2OeL0+QZXdRnR1nxRVBF/SOyKKPpcrn9mWzH4rH9IidE+PTNU2182+hOgSItrE1slByS24vaLvJpxOqe4Pduf3HJkZ+jLqUz9rRzB7p8gKcgWZwV1L8JtUS5Z2JxZSOCuBoMTQihMzLbCPA0KqGMAljRQjONklW/wjnXKy8vxT/Elvm3/KiMUMOoV0/vnDYlhec0SMKtt3/kKMyOt33tj2bqxQLsTjSGLl+EAsNhCnTyRGktW55EgCn/A4PlnWn+Mg8bgZrWqHxTbPwMuyy1u5YeZF2SUM7JRhddwRgiRuxpmgJmxn9ZW7XpcF3ViX/ar6ptRpGJ0S9Adg4qhb9sI3vbL7qNJV/y4i07t5TZBiho1imFoMz3gED+CtjYUxvP4SOxov4bFoNPg5aR1e+G4UgDPoedJTpogyCJ7oYvRqoVS0MQAy+CoNEdTDUjok5ZHZL/WtjV7rFj3PKQE3iKp7ou+rIxN3b9LB1dGjeT4cvKo3FrnWpYpuaFd/h3dtV8UeKN1Y9hpR3dt4p0H/zKuPQq0kZQUIIpuDfoiETsnIk+gCWMJZUXHtE8V9LkUc2TE8vOMbO4ax/MACabzyaGXc7u3FBr11ThBdB8SIeMAlCntG2KThHSPsaj2Dc9KNyY2a0KZ7ODaTHoRiFkeYz+shZBpCS4X6471KKKnuHd84edfk5F37d1XO5bbkcltu2ZLNbvnPXiUVAnVvprJrP+NObryjxrllS65md6Tm6wzFHRR4dY3QUUjb7MgxaIixU8hspi98fl/Xc+IB4iU66eCVL9YfAfahiSUt4TONS8x0D8W7u8vd3fGWx6OXlM/U1IoU/s61PGhpyXRFa3eReq2qG56lvmYtXavCC1iN7lbiBpWxXHU+cSlztVLVz0tVN600fVsLxaVDknhYioeoXP3t4lqV1r79MAw0GCI1FTL1YIGzPL1MMlJ9ZsN9P7lvA2yr9ZFUzwzPrVgxN/x/SS+chwB4nGNgZGBgAOLPrYdY4vltvjJwM78AijDUqG5oRND/XzNPZboF5HIwMIFEAU/lC+J4nGNgZGBgDvqfBSRfMAAB81QGRgZUoA0AVvYDbwAAAHicY2BgYGB+MTQwAM8EJo8AAAAAAE4AmgDoAQoBLAFOAXABmgHEAe4CGgKcAugEmgS8BNYE8gUOBSoFegXQBf4GRAZmBrYHGAeQCBgIUghqCP4JRgm+CdoKBAo+CoQKugr0C1QLmgvAeJxjYGRgYNBmTGEQZQABJiDmAkIGhv9gPgMAGJQBvAB4nG2RPU7DMBiG3/QP0UoIBGJh8QILavozdmRo9w7d09RpUzlx5LgVvQMn4BAcgoEzcAgOwVvzSZVQbcnf48fvFysJgGt8IcJxROiG9TgauODuj5ukG+EW+UG4jR4ehTv0Q+EunjER7uEWmk+IWpc0d3gVbuAKb8JN+nfhFvlDuI17fAp36L+Fu1jgR7iHp+jF7Arbz1Nb1nO93pnEncSJFtrVuS3VKB6e5EyX2iVer9TyoOr9eux9pjJnCzW1pdfGWFU5u9WpjzfeV5PBIBMfp7aAwQ4FLPrIkbKWqDHn+67pDRK4s4lzbsEux5qHvcIIMb/nueSMyTKkE3jWFdNLHLjW2PPmMa1Hxn3GjGW/wjT0HtOG09JU4WxLk9LH2ISuiv9twJn9y8fh9uIXI+BknAAAAHicbY7ZboMwEEW5CVBCSLrv+76kfJRjTwHFsdGAG+Xvy5JUfehIHp0rnxmNN/D6ir3/a4YBhvARIMQOIowQY4wEE0yxiz3s4wCHOMIxTnCKM5zjApe4wjVucIs73OMBj3jCM17wije84wMzfHqJ0EVmUkmmJo77oOmrHvfIRZbXsTCZplTZldlgb3TYGVHProwFs11t1A57tcON2rErR3PBqcwF1/6ctI6k0GSU4JHMSS6WghdJQ99sTbfuN7QLJ9vQ37dNrgyktnIxlDYLJNuqitpRbYWKFNuyDT6pog6oOYKHtKakeakqKjHXpPwlGRcsC+OqxLIiJpXqoqqDMreG2l5bv9Ri3TRX+c23DZna9WFFgmXuO6Ps1Jm/w6ErW8N3FbHn/QC444j0AA==) format(\'woff\');\n font-weight: normal;\n font-style: normal;\n }\n\n html {\n --lumo-icons-align-center: "\\ea01";\n --lumo-icons-align-left: "\\ea02";\n --lumo-icons-align-right: "\\ea03";\n --lumo-icons-angle-down: "\\ea04";\n --lumo-icons-angle-left: "\\ea05";\n --lumo-icons-angle-right: "\\ea06";\n --lumo-icons-angle-up: "\\ea07";\n --lumo-icons-arrow-down: "\\ea08";\n --lumo-icons-arrow-left: "\\ea09";\n --lumo-icons-arrow-right: "\\ea0a";\n --lumo-icons-arrow-up: "\\ea0b";\n --lumo-icons-bar-chart: "\\ea0c";\n --lumo-icons-bell: "\\ea0d";\n --lumo-icons-calendar: "\\ea0e";\n --lumo-icons-checkmark: "\\ea0f";\n --lumo-icons-chevron-down: "\\ea10";\n --lumo-icons-chevron-left: "\\ea11";\n --lumo-icons-chevron-right: "\\ea12";\n --lumo-icons-chevron-up: "\\ea13";\n --lumo-icons-clock: "\\ea14";\n --lumo-icons-cog: "\\ea15";\n --lumo-icons-cross: "\\ea16";\n --lumo-icons-download: "\\ea17";\n --lumo-icons-dropdown: "\\ea18";\n --lumo-icons-edit: "\\ea19";\n --lumo-icons-error: "\\ea1a";\n --lumo-icons-eye: "\\ea1b";\n --lumo-icons-eye-disabled: "\\ea1c";\n --lumo-icons-menu: "\\ea1d";\n --lumo-icons-minus: "\\ea1e";\n --lumo-icons-ordered-list: "\\ea1f";\n --lumo-icons-phone: "\\ea20";\n --lumo-icons-photo: "\\ea21";\n --lumo-icons-play: "\\ea22";\n --lumo-icons-plus: "\\ea23";\n --lumo-icons-redo: "\\ea24";\n --lumo-icons-reload: "\\ea25";\n --lumo-icons-search: "\\ea26";\n --lumo-icons-undo: "\\ea27";\n --lumo-icons-unordered-list: "\\ea28";\n --lumo-icons-upload: "\\ea29";\n --lumo-icons-user: "\\ea2a";\n }\n </style>\n',document.head.appendChild(Po.content);
|
|
1826
|
-
/**
|
|
1827
|
-
* @license
|
|
1828
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
1829
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1830
|
-
*/
|
|
1831
|
-
const Fo=d`
|
|
1832
|
-
[part$='button'] {
|
|
1833
|
-
flex: none;
|
|
1834
|
-
width: 1em;
|
|
1835
|
-
height: 1em;
|
|
1836
|
-
line-height: 1;
|
|
1837
|
-
font-size: var(--lumo-icon-size-m);
|
|
1838
|
-
text-align: center;
|
|
1839
|
-
color: var(--lumo-contrast-60pct);
|
|
1840
|
-
transition: 0.2s color;
|
|
1841
|
-
cursor: var(--lumo-clickable-cursor);
|
|
1842
|
-
}
|
|
1843
|
-
|
|
1844
|
-
[part$='button']:hover {
|
|
1845
|
-
color: var(--lumo-contrast-90pct);
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
:host([disabled]) [part$='button'],
|
|
1849
|
-
:host([readonly]) [part$='button'] {
|
|
1850
|
-
color: var(--lumo-contrast-20pct);
|
|
1851
|
-
cursor: default;
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
|
-
[part$='button']::before {
|
|
1855
|
-
font-family: 'lumo-icons';
|
|
1856
|
-
display: block;
|
|
1857
|
-
}
|
|
1858
|
-
`;ht("",Fo,{moduleId:"lumo-field-button"});
|
|
1859
|
-
/**
|
|
1860
|
-
* @license
|
|
1861
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
1862
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1863
|
-
*/
|
|
1864
|
-
const Eo=d`
|
|
1865
|
-
:host([has-helper]) [part='helper-text']::before {
|
|
1866
|
-
content: '';
|
|
1867
|
-
display: block;
|
|
1868
|
-
height: 0.4em;
|
|
1869
|
-
}
|
|
1870
|
-
|
|
1871
|
-
[part='helper-text'] {
|
|
1872
|
-
display: block;
|
|
1873
|
-
color: var(--lumo-secondary-text-color);
|
|
1874
|
-
font-size: var(--lumo-font-size-xs);
|
|
1875
|
-
line-height: var(--lumo-line-height-xs);
|
|
1876
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1877
|
-
transition: color 0.2s;
|
|
1878
|
-
}
|
|
1879
|
-
|
|
1880
|
-
:host(:hover:not([readonly])) [part='helper-text'] {
|
|
1881
|
-
color: var(--lumo-body-text-color);
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
:host([disabled]) [part='helper-text'] {
|
|
1885
|
-
color: var(--lumo-disabled-text-color);
|
|
1886
|
-
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {
|
|
1890
|
-
display: none;
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
|
-
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {
|
|
1894
|
-
content: '';
|
|
1895
|
-
display: block;
|
|
1896
|
-
height: 0.4em;
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
:host([has-helper][theme~='helper-above-field']) [part='label'] {
|
|
1900
|
-
order: 0;
|
|
1901
|
-
padding-bottom: 0.4em;
|
|
1902
|
-
}
|
|
1903
|
-
|
|
1904
|
-
:host([has-helper][theme~='helper-above-field']) [part='helper-text'] {
|
|
1905
|
-
order: 1;
|
|
1906
|
-
}
|
|
1907
|
-
|
|
1908
|
-
:host([has-helper][theme~='helper-above-field']) [part='label'] + * {
|
|
1909
|
-
order: 2;
|
|
1910
|
-
}
|
|
1911
|
-
|
|
1912
|
-
:host([has-helper][theme~='helper-above-field']) [part='error-message'] {
|
|
1913
|
-
order: 3;
|
|
1914
|
-
}
|
|
1915
|
-
`
|
|
1916
|
-
/**
|
|
1917
|
-
* @license
|
|
1918
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
1919
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1920
|
-
*/,Oo=d`
|
|
1921
|
-
[part='label'] {
|
|
1922
|
-
align-self: flex-start;
|
|
1923
|
-
color: var(--lumo-secondary-text-color);
|
|
1924
|
-
font-weight: 500;
|
|
1925
|
-
font-size: var(--lumo-font-size-s);
|
|
1926
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1927
|
-
transition: color 0.2s;
|
|
1928
|
-
line-height: 1;
|
|
1929
|
-
padding-right: 1em;
|
|
1930
|
-
padding-bottom: 0.5em;
|
|
1931
|
-
overflow: hidden;
|
|
1932
|
-
white-space: nowrap;
|
|
1933
|
-
text-overflow: ellipsis;
|
|
1934
|
-
position: relative;
|
|
1935
|
-
max-width: 100%;
|
|
1936
|
-
box-sizing: border-box;
|
|
1937
|
-
}
|
|
1938
|
-
|
|
1939
|
-
:host([has-label])::before {
|
|
1940
|
-
margin-top: calc(var(--lumo-font-size-s) * 1.5);
|
|
1941
|
-
}
|
|
1942
|
-
|
|
1943
|
-
:host([has-label][theme~='small'])::before {
|
|
1944
|
-
margin-top: calc(var(--lumo-font-size-xs) * 1.5);
|
|
1945
|
-
}
|
|
1946
|
-
|
|
1947
|
-
:host([has-label]) {
|
|
1948
|
-
padding-top: var(--lumo-space-m);
|
|
1949
|
-
}
|
|
1950
|
-
|
|
1951
|
-
:host([required]) [part='required-indicator']::after {
|
|
1952
|
-
content: var(--lumo-required-field-indicator, '•');
|
|
1953
|
-
transition: opacity 0.2s;
|
|
1954
|
-
color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
|
|
1955
|
-
position: absolute;
|
|
1956
|
-
right: 0;
|
|
1957
|
-
width: 1em;
|
|
1958
|
-
text-align: center;
|
|
1959
|
-
}
|
|
1960
|
-
|
|
1961
|
-
:host([invalid]) [part='required-indicator']::after {
|
|
1962
|
-
color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
|
|
1963
|
-
}
|
|
1964
|
-
|
|
1965
|
-
[part='error-message'] {
|
|
1966
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1967
|
-
font-size: var(--lumo-font-size-xs);
|
|
1968
|
-
line-height: var(--lumo-line-height-xs);
|
|
1969
|
-
color: var(--lumo-error-text-color);
|
|
1970
|
-
will-change: max-height;
|
|
1971
|
-
transition: 0.4s max-height;
|
|
1972
|
-
max-height: 5em;
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
:host([has-error-message]) [part='error-message']::before,
|
|
1976
|
-
:host([has-error-message]) [part='error-message']::after {
|
|
1977
|
-
content: '';
|
|
1978
|
-
display: block;
|
|
1979
|
-
height: 0.4em;
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
:host(:not([invalid])) [part='error-message'] {
|
|
1983
|
-
max-height: 0;
|
|
1984
|
-
overflow: hidden;
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
|
-
/* RTL specific styles */
|
|
1988
|
-
|
|
1989
|
-
:host([dir='rtl']) [part='label'] {
|
|
1990
|
-
margin-left: 0;
|
|
1991
|
-
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
:host([dir='rtl']) [part='label'] {
|
|
1995
|
-
padding-left: 1em;
|
|
1996
|
-
padding-right: 0;
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1999
|
-
:host([dir='rtl']) [part='required-indicator']::after {
|
|
2000
|
-
right: auto;
|
|
2001
|
-
left: 0;
|
|
2002
|
-
}
|
|
2003
|
-
|
|
2004
|
-
:host([dir='rtl']) [part='error-message'] {
|
|
2005
|
-
margin-left: 0;
|
|
2006
|
-
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
2007
|
-
}
|
|
2008
|
-
`;ht("",Oo,{moduleId:"lumo-required-field"});
|
|
2009
|
-
/**
|
|
2010
|
-
* @license
|
|
2011
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
2012
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2013
|
-
*/
|
|
2014
|
-
const Io=[Oo,Fo,Eo,d`
|
|
2015
|
-
:host {
|
|
2016
|
-
--lumo-text-field-size: var(--lumo-size-m);
|
|
2017
|
-
color: var(--lumo-body-text-color);
|
|
2018
|
-
font-size: var(--lumo-font-size-m);
|
|
2019
|
-
font-family: var(--lumo-font-family);
|
|
2020
|
-
-webkit-font-smoothing: antialiased;
|
|
2021
|
-
-moz-osx-font-smoothing: grayscale;
|
|
2022
|
-
-webkit-tap-highlight-color: transparent;
|
|
2023
|
-
padding: var(--lumo-space-xs) 0;
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
:host::before {
|
|
2027
|
-
height: var(--lumo-text-field-size);
|
|
2028
|
-
box-sizing: border-box;
|
|
2029
|
-
display: inline-flex;
|
|
2030
|
-
align-items: center;
|
|
2031
|
-
}
|
|
2032
|
-
|
|
2033
|
-
:host([focused]:not([readonly])) [part='label'] {
|
|
2034
|
-
color: var(--lumo-primary-text-color);
|
|
2035
|
-
}
|
|
2036
|
-
|
|
2037
|
-
:host([focused]) [part='input-field'] ::slotted(:is(input, textarea)) {
|
|
2038
|
-
-webkit-mask-image: none;
|
|
2039
|
-
mask-image: none;
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
::slotted(:is(input, textarea):placeholder-shown) {
|
|
2043
|
-
color: var(--lumo-secondary-text-color);
|
|
2044
|
-
}
|
|
2045
|
-
|
|
2046
|
-
/* Hover */
|
|
2047
|
-
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
2048
|
-
color: var(--lumo-body-text-color);
|
|
2049
|
-
}
|
|
2050
|
-
|
|
2051
|
-
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
|
2052
|
-
opacity: 0.1;
|
|
2053
|
-
}
|
|
2054
|
-
|
|
2055
|
-
/* Touch device adjustment */
|
|
2056
|
-
@media (pointer: coarse) {
|
|
2057
|
-
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
2058
|
-
color: var(--lumo-secondary-text-color);
|
|
2059
|
-
}
|
|
2060
|
-
|
|
2061
|
-
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
|
2062
|
-
opacity: 0;
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
:host(:active:not([readonly]):not([focused])) [part='input-field']::after {
|
|
2066
|
-
opacity: 0.2;
|
|
2067
|
-
}
|
|
2068
|
-
}
|
|
2069
|
-
|
|
2070
|
-
/* Trigger when not focusing using the keyboard */
|
|
2071
|
-
:host([focused]:not([focus-ring]):not([readonly])) [part='input-field']::after {
|
|
2072
|
-
transform: scaleX(0);
|
|
2073
|
-
transition-duration: 0.15s, 1s;
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2076
|
-
/* Focus-ring */
|
|
2077
|
-
:host([focus-ring]) [part='input-field'] {
|
|
2078
|
-
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
|
-
/* Read-only and disabled */
|
|
2082
|
-
:host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {
|
|
2083
|
-
opacity: 0;
|
|
2084
|
-
}
|
|
2085
|
-
|
|
2086
|
-
/* Disabled style */
|
|
2087
|
-
:host([disabled]) {
|
|
2088
|
-
pointer-events: none;
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
:host([disabled]) [part='label'],
|
|
2092
|
-
:host([disabled]) [part='input-field'] ::slotted(*) {
|
|
2093
|
-
color: var(--lumo-disabled-text-color);
|
|
2094
|
-
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
2095
|
-
}
|
|
2096
|
-
|
|
2097
|
-
/* Invalid style */
|
|
2098
|
-
:host([invalid][focus-ring]) [part='input-field'] {
|
|
2099
|
-
box-shadow: 0 0 0 2px var(--lumo-error-color-50pct);
|
|
2100
|
-
}
|
|
2101
|
-
|
|
2102
|
-
:host([input-prevented]) [part='input-field'] {
|
|
2103
|
-
animation: shake 0.15s infinite;
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
@keyframes shake {
|
|
2107
|
-
25% {
|
|
2108
|
-
transform: translateX(4px);
|
|
2109
|
-
}
|
|
2110
|
-
75% {
|
|
2111
|
-
transform: translateX(-4px);
|
|
2112
|
-
}
|
|
2113
|
-
}
|
|
2114
|
-
|
|
2115
|
-
/* Small theme */
|
|
2116
|
-
:host([theme~='small']) {
|
|
2117
|
-
font-size: var(--lumo-font-size-s);
|
|
2118
|
-
--lumo-text-field-size: var(--lumo-size-s);
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2121
|
-
:host([theme~='small']) [part='label'] {
|
|
2122
|
-
font-size: var(--lumo-font-size-xs);
|
|
2123
|
-
}
|
|
2124
|
-
|
|
2125
|
-
:host([theme~='small']) [part='error-message'] {
|
|
2126
|
-
font-size: var(--lumo-font-size-xxs);
|
|
2127
|
-
}
|
|
2128
|
-
|
|
2129
|
-
/* Slotted content */
|
|
2130
|
-
[part='input-field'] ::slotted(:not(iron-icon):not(vaadin-icon):not(input):not(textarea)) {
|
|
2131
|
-
color: var(--lumo-secondary-text-color);
|
|
2132
|
-
font-weight: 400;
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
[part='clear-button']::before {
|
|
2136
|
-
content: var(--lumo-icons-cross);
|
|
2137
|
-
}
|
|
2138
|
-
`];ht("",Io,{moduleId:"lumo-input-field-shared-styles"}),ht("vaadin-date-picker",[Io,d`
|
|
2139
|
-
:host {
|
|
2140
|
-
outline: none;
|
|
2141
|
-
}
|
|
2142
|
-
|
|
2143
|
-
[part='toggle-button']::before {
|
|
2144
|
-
content: var(--lumo-icons-calendar);
|
|
2145
|
-
}
|
|
2146
|
-
|
|
2147
|
-
[part='clear-button']::before {
|
|
2148
|
-
content: var(--lumo-icons-cross);
|
|
2149
|
-
}
|
|
2150
|
-
|
|
2151
|
-
@media (max-width: 420px), (max-height: 420px) {
|
|
2152
|
-
[part='overlay-content'] {
|
|
2153
|
-
height: 70vh;
|
|
2154
|
-
}
|
|
2155
|
-
}
|
|
2156
|
-
|
|
2157
|
-
:host([dir='rtl']) [part='input-field'] ::slotted(input) {
|
|
2158
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
:host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
|
|
2162
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
2163
|
-
}
|
|
2164
|
-
`],{moduleId:"lumo-date-picker"});
|
|
2165
|
-
/**
|
|
2166
|
-
* @fileoverview
|
|
2167
|
-
* @suppress {checkPrototypalTypes}
|
|
2168
|
-
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2169
|
-
* This code may only be used under the BSD style license found at
|
|
2170
|
-
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
2171
|
-
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
2172
|
-
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
2173
|
-
* Google as part of the polymer project is also subject to an additional IP
|
|
2174
|
-
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2175
|
-
*/
|
|
2176
|
-
const Bo=Gt((t=>{const e=Di(t);let i=(t=>{for(;t;){const e=Object.getOwnPropertyDescriptor(t,"observedAttributes");if(e)return e.get;t=Object.getPrototypeOf(t.prototype).constructor}return()=>[]})(e);return class extends e{constructor(){super()}static get observedAttributes(){return i.call(this).concat("disable-upgrade")}_initializeProperties(){this.hasAttribute("disable-upgrade")?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(t){return super._canApplyPropertyDefault(t)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(t))}attributeChangedCallback(t,e,i,s){"disable-upgrade"==t?this.__isUpgradeDisabled&&null==i&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,ne(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(t,e,i,s)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}}));function No(t){return t?new Set(t.split(" ")):new Set}function jo(t){return[...t].join(" ")}
|
|
2177
|
-
/**
|
|
2178
|
-
* @license
|
|
2179
|
-
* Copyright (c) 2017 - 2022 Vaadin Ltd.
|
|
2180
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2181
|
-
*/
|
|
2182
|
-
const Lo={start:"top",end:"bottom"},Ro={start:"left",end:"right"},Wo=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=
|
|
2183
|
-
/**
|
|
2184
|
-
* @license
|
|
2185
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2186
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2187
|
-
*/
|
|
2188
|
-
function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this._updatePosition,!0)}))}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this._updatePosition,!0)})),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),t&&e&&this.__addUpdatePositionEventListeners(),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this.setAttribute("dir",t.direction),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}get __isRTL(){return"rtl"===this.getAttribute("dir")}__positionSettingsChanged(){this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const t=this.positionTarget.getBoundingClientRect(),e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__shouldAlignStartHorizontally(t,this.__isRTL),s=!this.__isRTL&&i||this.__isRTL&&!i;this.style.alignItems=s?"flex-start":"flex-end";const o=this.getBoundingClientRect(),r=this.__calculatePositionInOneDimension(t,o,this.noVerticalOverlap,Lo,this,e),n=this.__calculatePositionInOneDimension(t,o,this.noHorizontalOverlap,Ro,this,i);Object.assign(this.style,r,n),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!s),this.toggleAttribute("start-aligned",s)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,i,s,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,Ro)}__shouldAlignStartVertically(t){const e=Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight);return this.__shouldAlignStart(t,e,i,this.__margins,"top"===this.verticalAlign,this.noVerticalOverlap,Lo)}__shouldAlignStart(t,e,i,s,o,r,n){const a=i-t[r?n.end:n.start]-s[n.end],l=t[r?n.start:n.end]-s[n.start],h=o?a:l;return o===(h>(o?l:a)||h>e)}__calculatePositionInOneDimension(t,e,i,s,o,r){const n=r?s.start:s.end,a=r?s.end:s.start;return{[n]:`${parseFloat(o.style[n]||getComputedStyle(o)[n])+(e[r?s.start:s.end]-t[i===r?s.end:s.start])*(r?-1:1)}px`,[a]:""}}}
|
|
2189
|
-
/**
|
|
2190
|
-
* @license
|
|
2191
|
-
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2192
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2193
|
-
*/,Ho=d`
|
|
2194
|
-
:host([dir='rtl']) [part='input-field'] {
|
|
2195
|
-
direction: ltr;
|
|
2196
|
-
}
|
|
2197
|
-
|
|
2198
|
-
:host([dir='rtl']) [part='value']::placeholder {
|
|
2199
|
-
direction: rtl;
|
|
2200
|
-
text-align: left;
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
|
-
:host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
|
|
2204
|
-
direction: rtl;
|
|
2205
|
-
text-align: left;
|
|
2206
|
-
}
|
|
2207
|
-
`;let Uo;
|
|
2208
|
-
/**
|
|
2209
|
-
* @license
|
|
2210
|
-
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2211
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2212
|
-
*/
|
|
2213
|
-
ht("vaadin-date-picker-overlay",d`
|
|
2214
|
-
[part='overlay'] {
|
|
2215
|
-
display: flex;
|
|
2216
|
-
flex: auto;
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2219
|
-
[part~='content'] {
|
|
2220
|
-
flex: auto;
|
|
2221
|
-
}
|
|
2222
|
-
`,{moduleId:"vaadin-date-picker-overlay-styles"});class $o extends(Bo(Wo(Ts))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return Uo||(Uo=super.template.cloneNode(!0),Uo.content.querySelector('[part~="overlay"]').removeAttribute("tabindex")),Uo}}customElements.define($o.is,$o);
|
|
2223
|
-
/**
|
|
2224
|
-
@license
|
|
2225
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2226
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2227
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2228
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2229
|
-
Code distributed by Google as part of the polymer project is also
|
|
2230
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2231
|
-
*/
|
|
2232
|
-
class Yo{constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,qo.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),qo.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}static debounce(t,e,i){return t instanceof Yo?t._cancelAsync():t=new Yo,t.setConfig(e,i),t}}let qo=new Set;const Vo=function(){const t=Boolean(qo.size);return qo.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t};
|
|
2233
|
-
/**
|
|
2234
|
-
@license
|
|
2235
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2236
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2237
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2238
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2239
|
-
Code distributed by Google as part of the polymer project is also
|
|
2240
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2241
|
-
*/
|
|
2242
|
-
let Go=!1;
|
|
2243
|
-
/**
|
|
2244
|
-
@license
|
|
2245
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2246
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2247
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2248
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2249
|
-
Code distributed by Google as part of the polymer project is also
|
|
2250
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2251
|
-
*/
|
|
2252
|
-
const Jo=is(Fi);class Ko extends Jo{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!Yt,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),function(){if(jt&&!Ft){if(!Go){Go=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=ne(ne(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=ps(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,o=0;o<i.length&&(s=i[o]);o++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if((s=this.as)===(o=e)||he(s,o)||ce(s,o)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let o=ue(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(o,i)}var s,o}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)0===t.indexOf(e[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=Yo.debounce(this.__renderDebouncer,e>0?Te.after(e):Se,t.bind(this)),qo.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=Vo()}while(t||e)}()}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[];const e=this.__sortAndFilterItems(t),i=this.__calculateLimit(e.length);this.__updateInstances(t,i,e),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame((()=>{this.__chunkingId=null,this.__continueChunking()}))),this._setRenderedItemCount(this.__instances.length),Yt&&!this.notifyDomChange||this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter(((e,i,s)=>this.__filterFn(t[e],i,s)))),this.__sortFn&&e.sort(((e,i)=>this.__sortFn(t[e],t[i]))),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),s=Math.max(e-i,0),this.__chunkCount=s||1):(s=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+s,t)),this.__shouldMeasureChunk=s===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,i){const s=this.__itemsIdxToInstIdx={};let o;for(o=0;o<e;o++){let e=this.__instances[o],r=i[o],n=t[r];s[r]=o,e?(e._setPendingProperty(this.as,n),e._setPendingProperty(this.indexAs,o),e._setPendingProperty(this.itemsIndexAs,r),e._flushProperties()):this.__insertInstance(n,o,r)}for(let t=this.__instances.length-1;t>=o;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=ne(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let s={};return s[this.as]=t,s[this.indexAs]=e,s[this.itemsIndexAs]=i,new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let o=this.__instances[e+1],r=o?o.children[0]:this;return ne(ne(this).parentNode).insertBefore(s.root,r),this.__instances[e]=s,s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),s=i.indexOf("."),o=s<0?i:i.substring(0,s);if(o==parseInt(o,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let r=this.__instances[this.__itemsIdxToInstIdx[o]];return r&&(r._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),r._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=ne(e).parentNode;return null}(this.template,t)}}function Zo(t,e){return t instanceof Date&&e instanceof Date&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function Xo(t,e,i){return(!e||t>=e)&&(!i||t<=i)}function Qo(t,e){return e.filter((t=>void 0!==t)).reduce(((e,i)=>i?e?Math.abs(t.getTime()-i.getTime())<Math.abs(e.getTime()-t.getTime())?i:e:i:e))}function tr(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}
|
|
2253
|
-
/**
|
|
2254
|
-
* @license
|
|
2255
|
-
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2256
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2257
|
-
*/customElements.define(Ko.is,Ko);class er extends(Do(ft(Fi))){static get template(){return Mi`
|
|
2258
|
-
<style>
|
|
2259
|
-
:host {
|
|
2260
|
-
display: block;
|
|
2261
|
-
}
|
|
2262
|
-
|
|
2263
|
-
#monthGrid {
|
|
2264
|
-
width: 100%;
|
|
2265
|
-
border-collapse: collapse;
|
|
2266
|
-
}
|
|
2267
|
-
|
|
2268
|
-
#days-container tr,
|
|
2269
|
-
#weekdays-container tr {
|
|
2270
|
-
display: flex;
|
|
2271
|
-
}
|
|
2272
|
-
|
|
2273
|
-
[part='date'] {
|
|
2274
|
-
outline: none;
|
|
2275
|
-
}
|
|
2276
|
-
|
|
2277
|
-
[part='week-number'][hidden],
|
|
2278
|
-
[part='weekday'][hidden] {
|
|
2279
|
-
display: none;
|
|
2280
|
-
}
|
|
2281
|
-
|
|
2282
|
-
[part='weekday'],
|
|
2283
|
-
[part='date'] {
|
|
2284
|
-
width: calc(100% / 7);
|
|
2285
|
-
padding: 0;
|
|
2286
|
-
font-weight: normal;
|
|
2287
|
-
}
|
|
2288
|
-
|
|
2289
|
-
[part='weekday']:empty,
|
|
2290
|
-
[part='week-number'] {
|
|
2291
|
-
width: 12.5%;
|
|
2292
|
-
flex-shrink: 0;
|
|
2293
|
-
padding: 0;
|
|
2294
|
-
}
|
|
2295
|
-
|
|
2296
|
-
:host([week-numbers]) [part='weekday']:not(:empty),
|
|
2297
|
-
:host([week-numbers]) [part='date'] {
|
|
2298
|
-
width: 12.5%;
|
|
2299
|
-
}
|
|
2300
|
-
</style>
|
|
2301
|
-
|
|
2302
|
-
<div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n.monthNames)]]</div>
|
|
2303
|
-
<table
|
|
2304
|
-
id="monthGrid"
|
|
2305
|
-
role="grid"
|
|
2306
|
-
aria-labelledby="month-header"
|
|
2307
|
-
on-touchend="_preventDefault"
|
|
2308
|
-
on-touchstart="_onMonthGridTouchStart"
|
|
2309
|
-
>
|
|
2310
|
-
<thead id="weekdays-container">
|
|
2311
|
-
<tr role="row" part="weekdays">
|
|
2312
|
-
<th
|
|
2313
|
-
part="weekday"
|
|
2314
|
-
aria-hidden="true"
|
|
2315
|
-
hidden$="[[!_showWeekSeparator(showWeekNumbers, i18n.firstDayOfWeek)]]"
|
|
2316
|
-
></th>
|
|
2317
|
-
<template
|
|
2318
|
-
is="dom-repeat"
|
|
2319
|
-
items="[[_getWeekDayNames(i18n.weekdays, i18n.weekdaysShort, showWeekNumbers, i18n.firstDayOfWeek)]]"
|
|
2320
|
-
>
|
|
2321
|
-
<th role="columnheader" part="weekday" scope="col" abbr$="[[item.weekDay]]">[[item.weekDayShort]]</th>
|
|
2322
|
-
</template>
|
|
2323
|
-
</tr>
|
|
2324
|
-
</thead>
|
|
2325
|
-
<tbody id="days-container">
|
|
2326
|
-
<template is="dom-repeat" items="[[_weeks]]" as="week">
|
|
2327
|
-
<tr role="row">
|
|
2328
|
-
<td
|
|
2329
|
-
part="week-number"
|
|
2330
|
-
aria-hidden="true"
|
|
2331
|
-
hidden$="[[!_showWeekSeparator(showWeekNumbers, i18n.firstDayOfWeek)]]"
|
|
2332
|
-
>
|
|
2333
|
-
[[__getWeekNumber(week)]]
|
|
2334
|
-
</td>
|
|
2335
|
-
<template is="dom-repeat" items="[[week]]">
|
|
2336
|
-
<td
|
|
2337
|
-
role="gridcell"
|
|
2338
|
-
part="date"
|
|
2339
|
-
date="[[item]]"
|
|
2340
|
-
today$="[[_isToday(item)]]"
|
|
2341
|
-
focused$="[[__isDayFocused(item, focusedDate)]]"
|
|
2342
|
-
tabindex$="[[__getDayTabindex(item, focusedDate)]]"
|
|
2343
|
-
selected$="[[__isDaySelected(item, selectedDate)]]"
|
|
2344
|
-
disabled$="[[__isDayDisabled(item, minDate, maxDate)]]"
|
|
2345
|
-
aria-selected$="[[__getDayAriaSelected(item, selectedDate)]]"
|
|
2346
|
-
aria-disabled$="[[__getDayAriaDisabled(item, minDate, maxDate)]]"
|
|
2347
|
-
aria-label$="[[__getDayAriaLabel(item)]]"
|
|
2348
|
-
>[[_getDate(item)]]</td
|
|
2349
|
-
>
|
|
2350
|
-
</template>
|
|
2351
|
-
</tr>
|
|
2352
|
-
</template>
|
|
2353
|
-
</tbody>
|
|
2354
|
-
</table>
|
|
2355
|
-
`}static get is(){return"vaadin-month-calendar"}static get properties(){return{month:{type:Date,value:new Date},selectedDate:{type:Date,notify:!0},focusedDate:Date,showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Date,value:null},maxDate:{type:Date,value:null},_days:{type:Array,computed:"_getDays(month, i18n.firstDayOfWeek, minDate, maxDate)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return["_showWeekNumbersChanged(showWeekNumbers, i18n.firstDayOfWeek)","__focusedDateChanged(focusedDate, _days)"]}ready(){super.ready(),mo(this.$.monthGrid,"tap",this._handleTap.bind(this))}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part=date]")].find((t=>Zo(t.date,this.focusedDate)))}_isDisabled(t,e,i){const s=new Date(0,0);s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()),s.setDate(1);const o=new Date(0,0);return o.setFullYear(t.getFullYear()),o.setMonth(t.getMonth()+1),o.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||Xo(s,e,i)||Xo(o,e,i))}_getTitle(t,e){if(void 0!==t&&void 0!==e)return this.i18n.formatTitle(e[t.getMonth()],t.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300)}_dateAdd(t,e){t.setDate(t.getDate()+e)}_applyFirstDayOfWeek(t,e){if(void 0!==t&&void 0!==e)return t.slice(e).concat(t.slice(0,e))}_getWeekDayNames(t,e,i,s){if(void 0!==t&&void 0!==e&&void 0!==i&&void 0!==s)return t=this._applyFirstDayOfWeek(t,s),e=this._applyFirstDayOfWeek(e,s),t.map(((t,i)=>({weekDay:t,weekDayShort:e[i]})))}__focusedDateChanged(t,e){e.some((e=>Zo(e,t)))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(t){return t?t.getDate():""}_showWeekNumbersChanged(t,e){t&&1===e?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}_showWeekSeparator(t,e){return t&&1===e}_isToday(t){return Zo(new Date,t)}_getDays(t,e){if(void 0===t||void 0===e)return;const i=new Date(0,0);for(i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()),i.setDate(1);i.getDay()!==e;)this._dateAdd(i,-1);const s=[],o=i.getMonth(),r=t.getMonth();for(;i.getMonth()===r||i.getMonth()===o;)s.push(i.getMonth()===r?new Date(i.getTime()):null),this._dateAdd(i,1);return s}_getWeeks(t){return t.reduce(((t,e,i)=>(i%7==0&&t.push([]),t[t.length-1].push(e),t)),[])}_handleTap(t){this.ignoreTaps||this._notTapping||!t.target.date||t.target.hasAttribute("disabled")||(this.selectedDate=t.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:t.target.date},bubbles:!0,composed:!0})))}_preventDefault(t){t.preventDefault()}__getWeekNumber(t){
|
|
2356
|
-
/**
|
|
2357
|
-
* @license
|
|
2358
|
-
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2359
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2360
|
-
*/
|
|
2361
|
-
return function(t){let e=t.getDay();0===e&&(e=7);const i=4-e,s=new Date(t.getTime()+24*i*3600*1e3),o=new Date(0,0);o.setFullYear(s.getFullYear());const r=s.getTime()-o.getTime(),n=Math.round(r/864e5);return Math.floor(n/7+1)}(t.reduce(((t,e)=>!t&&e?e:t)))}__isDayFocused(t,e){return Zo(t,e)}__isDaySelected(t,e){return Zo(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,i){return!Xo(t,e,i)}__getDayAriaDisabled(t,e,i){if(void 0!==t&&void 0!==e&&void 0!==i)return this.__isDayDisabled(t,e,i)?"true":void 0}__getDayAriaLabel(t){if(!t)return"";let e=`${this._getDate(t)} ${this.i18n.monthNames[t.getMonth()]} ${t.getFullYear()}, ${this.i18n.weekdays[t.getDay()]}`;return this._isToday(t)&&(e+=`, ${this.i18n.today}`),e}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}__getWeekNumbers(t){return t.map((e=>this.__getWeekNumber(e,t))).filter(((t,e,i)=>i.indexOf(t)===e))}}customElements.define(er.is,er);
|
|
2362
|
-
/**
|
|
2363
|
-
* @license
|
|
2364
|
-
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2365
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2366
|
-
*/
|
|
2367
|
-
class ir extends Fi{static get template(){return Mi`
|
|
2368
|
-
<style>
|
|
2369
|
-
:host {
|
|
2370
|
-
display: block;
|
|
2371
|
-
overflow: hidden;
|
|
2372
|
-
height: 500px;
|
|
2373
|
-
}
|
|
2374
|
-
|
|
2375
|
-
#scroller {
|
|
2376
|
-
position: relative;
|
|
2377
|
-
height: 100%;
|
|
2378
|
-
overflow: auto;
|
|
2379
|
-
outline: none;
|
|
2380
|
-
margin-right: -40px;
|
|
2381
|
-
-webkit-overflow-scrolling: touch;
|
|
2382
|
-
overflow-x: hidden;
|
|
2383
|
-
}
|
|
2384
|
-
|
|
2385
|
-
#scroller.notouchscroll {
|
|
2386
|
-
-webkit-overflow-scrolling: auto;
|
|
2387
|
-
}
|
|
2388
|
-
|
|
2389
|
-
#scroller::-webkit-scrollbar {
|
|
2390
|
-
display: none;
|
|
2391
|
-
}
|
|
2392
|
-
|
|
2393
|
-
.buffer {
|
|
2394
|
-
position: absolute;
|
|
2395
|
-
width: var(--vaadin-infinite-scroller-buffer-width, 100%);
|
|
2396
|
-
box-sizing: border-box;
|
|
2397
|
-
padding-right: 40px;
|
|
2398
|
-
top: var(--vaadin-infinite-scroller-buffer-offset, 0);
|
|
2399
|
-
animation: fadein 0.2s;
|
|
2400
|
-
}
|
|
2401
|
-
|
|
2402
|
-
@keyframes fadein {
|
|
2403
|
-
from {
|
|
2404
|
-
opacity: 0;
|
|
2405
|
-
}
|
|
2406
|
-
to {
|
|
2407
|
-
opacity: 1;
|
|
2408
|
-
}
|
|
2409
|
-
}
|
|
2410
|
-
</style>
|
|
2411
|
-
|
|
2412
|
-
<div id="scroller" on-scroll="_scroll">
|
|
2413
|
-
<div class="buffer"></div>
|
|
2414
|
-
<div class="buffer"></div>
|
|
2415
|
-
<div id="fullHeight"></div>
|
|
2416
|
-
</div>
|
|
2417
|
-
`}static get is(){return"vaadin-infinite-scroller"}static get properties(){return{bufferSize:{type:Number,value:20},_initialScroll:{value:5e5},_initialIndex:{value:0},_buffers:Array,_preventScrollEvent:Boolean,_mayHaveMomentum:Boolean,_initialized:Boolean,active:{type:Boolean,observer:"_activated"}}}ready(){super.ready(),this._buffers=Array.prototype.slice.call(this.root.querySelectorAll(".buffer")),this.$.fullHeight.style.height=2*this._initialScroll+"px";const t=this.querySelector("template");this._TemplateClass=ps(t,this,{forwardHostProp(t,e){"index"!==t&&this._buffers.forEach((i=>{[].forEach.call(i.children,(i=>{i._itemWrapper.instance[t]=e}))}))}}),vs&&(this.$.scroller.tabIndex=-1)}_activated(t){t&&!this._initialized&&(this._createPool(),this._initialized=!0)}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[].forEach.call(t.children,(t=>this._ensureStampedInstance(t._itemWrapper)))})),this._buffers[0].translateY||this._reset(),this._initDone=!0)}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=Us.debounce(this._debouncerScrollFinish,Rs.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();this._isVisible(this._buffers[0],t)||this._isVisible(this._buffers[1],t)||(this.position=this.position)}))}get bufferOffset(){return this._buffers[0].offsetTop}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=Us.debounce(this._debouncerUpdateClones,Rs.after(200),(()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()})),this._scrollDisabled=!1}_createPool(){const t=this.getBoundingClientRect();this._buffers.forEach((e=>{for(let i=0;i<this.bufferSize;i++){const i=document.createElement("div");i.style.height=`${this.itemHeight}px`,i.instance={};const s=`vaadin-infinite-scroller-item-content-${ir._contentIndex=ir._contentIndex+1||0}`,o=document.createElement("slot");o.setAttribute("name",s),o._itemWrapper=i,e.appendChild(o),i.setAttribute("slot",s),this.appendChild(i),setTimeout((()=>{this._isVisible(i,t)&&this._ensureStampedInstance(i)}),1)}})),setTimeout((()=>{Qi(this,this._finishInit.bind(this))}),1)}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=new this._TemplateClass({}),t.appendChild(t.instance.root),Object.keys(e).forEach((i=>{t.instance.set(i,e[i])}))}_updateClones(t){this._firstIndex=~~((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,s)=>{if(!i.updated){const o=this._firstIndex+this.bufferSize*s;[].forEach.call(i.children,((i,s)=>{const r=i._itemWrapper;t&&!this._isVisible(r,e)||(r.instance.index=o+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}customElements.define(ir.is,ir);
|
|
2418
|
-
/**
|
|
2419
|
-
* @license
|
|
2420
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2421
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2422
|
-
*/
|
|
2423
|
-
class sr{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=this._queryHandler.bind(this)}hostConnected(){this._removeListener(),this._mediaQuery=window.matchMedia(this.query),this._addListener(),this._queryHandler(this._mediaQuery)}hostDisconnected(){this._removeListener()}_addListener(){this._mediaQuery&&this._mediaQuery.addListener(this._boundQueryHandler)}_removeListener(){this._mediaQuery&&this._mediaQuery.removeListener(this._boundQueryHandler),this._mediaQuery=null}_queryHandler(t){"function"==typeof this.callback&&this.callback(t.matches)}}
|
|
2424
|
-
/**
|
|
2425
|
-
* @license
|
|
2426
|
-
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2427
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2428
|
-
*/class or extends(ys(ft(ji(Fi)))){static get template(){return Mi`
|
|
2429
|
-
<style>
|
|
2430
|
-
:host {
|
|
2431
|
-
display: flex;
|
|
2432
|
-
flex-direction: column;
|
|
2433
|
-
height: 100%;
|
|
2434
|
-
width: 100%;
|
|
2435
|
-
outline: none;
|
|
2436
|
-
}
|
|
2437
|
-
|
|
2438
|
-
[part='overlay-header'] {
|
|
2439
|
-
display: flex;
|
|
2440
|
-
flex-shrink: 0;
|
|
2441
|
-
flex-wrap: nowrap;
|
|
2442
|
-
align-items: center;
|
|
2443
|
-
}
|
|
2444
|
-
|
|
2445
|
-
:host(:not([fullscreen])) [part='overlay-header'] {
|
|
2446
|
-
display: none;
|
|
2447
|
-
}
|
|
2448
|
-
|
|
2449
|
-
[part='label'] {
|
|
2450
|
-
flex-grow: 1;
|
|
2451
|
-
}
|
|
2452
|
-
|
|
2453
|
-
[hidden] {
|
|
2454
|
-
display: none !important;
|
|
2455
|
-
}
|
|
2456
|
-
|
|
2457
|
-
[part='years-toggle-button'] {
|
|
2458
|
-
display: flex;
|
|
2459
|
-
}
|
|
2460
|
-
|
|
2461
|
-
#scrollers {
|
|
2462
|
-
display: flex;
|
|
2463
|
-
height: 100%;
|
|
2464
|
-
width: 100%;
|
|
2465
|
-
position: relative;
|
|
2466
|
-
overflow: hidden;
|
|
2467
|
-
}
|
|
2468
|
-
|
|
2469
|
-
[part='months'],
|
|
2470
|
-
[part='years'] {
|
|
2471
|
-
height: 100%;
|
|
2472
|
-
}
|
|
2473
|
-
|
|
2474
|
-
[part='months'] {
|
|
2475
|
-
--vaadin-infinite-scroller-item-height: 270px;
|
|
2476
|
-
position: absolute;
|
|
2477
|
-
top: 0;
|
|
2478
|
-
left: 0;
|
|
2479
|
-
right: 0;
|
|
2480
|
-
bottom: 0;
|
|
2481
|
-
}
|
|
2482
|
-
|
|
2483
|
-
#scrollers[desktop] [part='months'] {
|
|
2484
|
-
right: 50px;
|
|
2485
|
-
transform: none !important;
|
|
2486
|
-
}
|
|
2487
|
-
|
|
2488
|
-
[part='years'] {
|
|
2489
|
-
--vaadin-infinite-scroller-item-height: 80px;
|
|
2490
|
-
width: 50px;
|
|
2491
|
-
position: absolute;
|
|
2492
|
-
right: 0;
|
|
2493
|
-
transform: translateX(100%);
|
|
2494
|
-
-webkit-tap-highlight-color: transparent;
|
|
2495
|
-
-webkit-user-select: none;
|
|
2496
|
-
-moz-user-select: none;
|
|
2497
|
-
user-select: none;
|
|
2498
|
-
/* Center the year scroller position. */
|
|
2499
|
-
--vaadin-infinite-scroller-buffer-offset: 50%;
|
|
2500
|
-
}
|
|
2501
|
-
|
|
2502
|
-
#scrollers[desktop] [part='years'] {
|
|
2503
|
-
position: absolute;
|
|
2504
|
-
transform: none !important;
|
|
2505
|
-
}
|
|
2506
|
-
|
|
2507
|
-
[part='years']::before {
|
|
2508
|
-
content: '';
|
|
2509
|
-
display: block;
|
|
2510
|
-
background: transparent;
|
|
2511
|
-
width: 0;
|
|
2512
|
-
height: 0;
|
|
2513
|
-
position: absolute;
|
|
2514
|
-
left: 0;
|
|
2515
|
-
top: 50%;
|
|
2516
|
-
transform: translateY(-50%);
|
|
2517
|
-
border-width: 6px;
|
|
2518
|
-
border-style: solid;
|
|
2519
|
-
border-color: transparent;
|
|
2520
|
-
border-left-color: #000;
|
|
2521
|
-
}
|
|
2522
|
-
|
|
2523
|
-
:host(.animate) [part='months'],
|
|
2524
|
-
:host(.animate) [part='years'] {
|
|
2525
|
-
transition: all 200ms;
|
|
2526
|
-
}
|
|
2527
|
-
|
|
2528
|
-
[part='toolbar'] {
|
|
2529
|
-
display: flex;
|
|
2530
|
-
justify-content: space-between;
|
|
2531
|
-
z-index: 2;
|
|
2532
|
-
flex-shrink: 0;
|
|
2533
|
-
}
|
|
2534
|
-
</style>
|
|
2535
|
-
|
|
2536
|
-
<div part="overlay-header" on-touchend="_preventDefault" desktop$="[[_desktopMode]]" aria-hidden="true">
|
|
2537
|
-
<div part="label">[[_formatDisplayed(selectedDate, i18n.formatDate, label)]]</div>
|
|
2538
|
-
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
|
2539
|
-
<div part="toggle-button"></div>
|
|
2540
|
-
|
|
2541
|
-
<div part="years-toggle-button" hidden$="[[_desktopMode]]" aria-hidden="true">
|
|
2542
|
-
[[_yearAfterXMonths(_visibleMonthIndex)]]
|
|
2543
|
-
</div>
|
|
2544
|
-
</div>
|
|
2545
|
-
|
|
2546
|
-
<div id="scrollers" desktop$="[[_desktopMode]]">
|
|
2547
|
-
<vaadin-infinite-scroller
|
|
2548
|
-
id="monthScroller"
|
|
2549
|
-
on-custom-scroll="_onMonthScroll"
|
|
2550
|
-
on-touchstart="_onMonthScrollTouchStart"
|
|
2551
|
-
buffer-size="3"
|
|
2552
|
-
active="[[initialPosition]]"
|
|
2553
|
-
part="months"
|
|
2554
|
-
>
|
|
2555
|
-
<template>
|
|
2556
|
-
<vaadin-month-calendar
|
|
2557
|
-
i18n="[[i18n]]"
|
|
2558
|
-
month="[[_dateAfterXMonths(index)]]"
|
|
2559
|
-
selected-date="{{selectedDate}}"
|
|
2560
|
-
focused-date="[[focusedDate]]"
|
|
2561
|
-
ignore-taps="[[_ignoreTaps]]"
|
|
2562
|
-
show-week-numbers="[[showWeekNumbers]]"
|
|
2563
|
-
min-date="[[minDate]]"
|
|
2564
|
-
max-date="[[maxDate]]"
|
|
2565
|
-
part="month"
|
|
2566
|
-
theme$="[[_theme]]"
|
|
2567
|
-
on-keydown="__onMonthCalendarKeyDown"
|
|
2568
|
-
>
|
|
2569
|
-
</vaadin-month-calendar>
|
|
2570
|
-
</template>
|
|
2571
|
-
</vaadin-infinite-scroller>
|
|
2572
|
-
<vaadin-infinite-scroller
|
|
2573
|
-
id="yearScroller"
|
|
2574
|
-
on-custom-scroll="_onYearScroll"
|
|
2575
|
-
on-touchstart="_onYearScrollTouchStart"
|
|
2576
|
-
buffer-size="12"
|
|
2577
|
-
active="[[initialPosition]]"
|
|
2578
|
-
part="years"
|
|
2579
|
-
aria-hidden="true"
|
|
2580
|
-
>
|
|
2581
|
-
<template>
|
|
2582
|
-
<div
|
|
2583
|
-
part="year-number"
|
|
2584
|
-
current$="[[_isCurrentYear(index)]]"
|
|
2585
|
-
selected$="[[_isSelectedYear(index, selectedDate)]]"
|
|
2586
|
-
>
|
|
2587
|
-
[[_yearAfterXYears(index)]]
|
|
2588
|
-
</div>
|
|
2589
|
-
<div part="year-separator" aria-hidden="true"></div>
|
|
2590
|
-
</template>
|
|
2591
|
-
</vaadin-infinite-scroller>
|
|
2592
|
-
</div>
|
|
2593
|
-
|
|
2594
|
-
<div on-touchend="_preventDefault" role="toolbar" part="toolbar">
|
|
2595
|
-
<vaadin-button
|
|
2596
|
-
id="todayButton"
|
|
2597
|
-
part="today-button"
|
|
2598
|
-
theme="tertiary"
|
|
2599
|
-
disabled="[[!_isTodayAllowed(minDate, maxDate)]]"
|
|
2600
|
-
on-keydown="__onTodayButtonKeyDown"
|
|
2601
|
-
>
|
|
2602
|
-
[[i18n.today]]
|
|
2603
|
-
</vaadin-button>
|
|
2604
|
-
<vaadin-button id="cancelButton" part="cancel-button" theme="tertiary" on-keydown="__onCancelButtonKeyDown">
|
|
2605
|
-
[[i18n.cancel]]
|
|
2606
|
-
</vaadin-button>
|
|
2607
|
-
</div>
|
|
2608
|
-
`}static get is(){return"vaadin-date-picker-overlay-content"}static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Date,value:null},focusedDate:{type:Date,notify:!0,observer:"_focusedDateChanged"},_focusedMonthDate:Number,initialPosition:{type:Date,observer:"_initialPositionChanged"},_originDate:{value:new Date},_visibleMonthIndex:Number,_desktopMode:Boolean,_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:Date,maxDate:Date,label:String}}get __isRTL(){return"rtl"===this.getAttribute("dir")}get calendars(){return[...this.shadowRoot.querySelectorAll("vaadin-month-calendar")]}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}ready(){super.ready(),this.setAttribute("role","dialog"),mo(this.$.scrollers,"track",this._track.bind(this)),mo(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),mo(this.shadowRoot.querySelector('[part="today-button"]'),"tap",this._onTodayTap.bind(this)),mo(this.shadowRoot.querySelector('[part="cancel-button"]'),"tap",this._cancel.bind(this)),mo(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),mo(this.shadowRoot.querySelector('[part="years"]'),"tap",this._onYearTap.bind(this)),mo(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this)),this.addController(new sr(this._desktopMediaQuery,(t=>{this._desktopMode=t})))}connectedCallback(){super.connectedCallback(),this._closeYearScroller(),this._toggleAnimateClass(!0),vo(this.$.scrollers,"pan-y")}focusCancel(){this.$.cancelButton.focus()}scrollToDate(t,e){this._scrollToPosition(this._differenceInMonths(t,this._originDate),e)}_selectDate(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}_focusedDateChanged(t){this.revealDate(t)}_isCurrentYear(t){return 0===t}_isSelectedYear(t,e){if(e)return e.getFullYear()===this._originDate.getFullYear()+t}revealDate(t,e=!0){if(t){const i=this._differenceInMonths(t,this._originDate),s=this.$.monthScroller.position>i,o=Math.max(this.$.monthScroller.itemHeight,this.$.monthScroller.clientHeight-2*this.$.monthScroller.bufferOffset)/this.$.monthScroller.itemHeight,r=this.$.monthScroller.position+o-1<i;s?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-o+1,e)}}_initialPositionChanged(t){this.scrollToDate(t)}_repositionYearScroller(){this._visibleMonthIndex=Math.floor(this.$.monthScroller.position),this.$.yearScroller.position=(this.$.monthScroller.position+this._originDate.getMonth())/12}_repositionMonthScroller(){this.$.monthScroller.position=12*this.$.yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this.$.monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=Us.debounce(this._debouncer,Rs.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t?e(tr(t)):i}_onTodayTap(){const t=new Date;Math.abs(this.$.monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=t.detail.y-(this.$.yearScroller.getBoundingClientRect().top+this.$.yearScroller.clientHeight/2);this._scrollToPosition(this.$.monthScroller.position+e/this.$.yearScroller.itemHeight*12,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this.$.monthScroller.position=t,this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let s=0;const o=this.$.monthScroller.position,r=t=>{s=s||t;const e=t-s;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,o,this._targetPosition-o);this.$.monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:o}})),this.$.monthScroller.position=this._targetPosition,this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(r)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this.$.monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this.$.yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXYears(t){const e=new Date(this._originDate);return e.setFullYear(parseInt(t)+this._originDate.getFullYear()),e.getFullYear()}_yearAfterXMonths(t){return this._dateAfterXMonths(t).getFullYear()}_dateAfterXMonths(t){const e=new Date(this._originDate);return e.setDate(1),e.setMonth(parseInt(t)+this._originDate.getMonth()),e}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_differenceInYears(t,e){return this._differenceInMonths(t,e)/12}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){Zo(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate),this._close(),e=!0;break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.$.cancelButton.focus():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&Zo(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}async focusDate(t,e){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),await this.focusDateElement(!1)}async focusDateElement(t=!0){this.__pendingDateFocus=this.focusedDate,this.calendars.length||await new Promise((t=>{setTimeout(t)})),t&&this.revealDate(this.focusedDate),this._revealPromise&&await this._revealPromise,this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(Qo(t,[this.minDate,this.maxDate]))}_moveFocusByDays(t){const e=this.focusedDate,i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(e.getDate()+t),this._dateAllowed(i,this.minDate,this.maxDate)?this.focusDate(i):this._dateAllowed(e,this.minDate,this.maxDate)?this.focusDate(t>0?this.maxDate:this.minDate):this._focusClosestDate(e)}_moveFocusByMonths(t){const e=this.focusedDate,i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()+t);const s=i.getMonth();i.setDate(this._focusedMonthDate||(this._focusedMonthDate=e.getDate())),i.getMonth()!==s&&i.setDate(0),this._dateAllowed(i,this.minDate,this.maxDate)?this.focusDate(i,!0):this._dateAllowed(e,this.minDate,this.maxDate)?this.focusDate(t>0?this.maxDate:this.minDate):this._focusClosestDate(e)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i,this.minDate,this.maxDate)?this.focusDate(i):this._dateAllowed(t,this.minDate,this.maxDate)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e,i){return(!e||t>=e)&&(!i||t<=i)}_isTodayAllowed(t,e){const i=new Date,s=new Date(0,0);return s.setFullYear(i.getFullYear()),s.setMonth(i.getMonth()),s.setDate(i.getDate()),this._dateAllowed(s,t,e)}}customElements.define(or.is,or);
|
|
2609
|
-
/**
|
|
2610
|
-
* @license
|
|
2611
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2612
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2613
|
-
*/
|
|
2614
|
-
const rr=Gt((t=>class extends(Do(To(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&(this.focusElement.focus(),this._setFocused(!0))}blur(){this.focusElement&&(this.focusElement.blur(),this._setFocused(!1))}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}}));
|
|
2615
|
-
/**
|
|
2616
|
-
* @license
|
|
2617
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2618
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2619
|
-
*/let nr=0;
|
|
2620
|
-
/**
|
|
2621
|
-
* @license
|
|
2622
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2623
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2624
|
-
*/
|
|
2625
|
-
class ar extends EventTarget{static generateId(t,e){return`${t||"default"}-${e.localName}-${nr++}`}constructor(t,e,i,s,o){super(),this.host=t,this.slotName=e,this.slotFactory=i,this.slotInitializer=s,o&&(this.defaultId=ar.generateId(e,t))}hostConnected(){if(!this.initialized){let t=this.getSlotChild();t?(this.node=t,this.initCustomNode(t)):t=this.attachDefaultNode(),this.initNode(t),this.observe(),this.initialized=!0}}attachDefaultNode(){const{host:t,slotName:e,slotFactory:i}=this;let s=this.defaultNode;return!s&&i&&(s=i(t),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.node=s,this.defaultNode=s)),s&&t.appendChild(s),s}getSlotChild(){const{slotName:t}=this;return Array.from(this.host.childNodes).find((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}initNode(t){const{slotInitializer:e}=this;e&&e(this.host,t)}initCustomNode(t){}teardownNode(t){}observe(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new Gi(e,(t=>{const e=this.node,i=t.addedNodes.find((t=>t!==e));t.removedNodes.length&&t.removedNodes.forEach((t=>{this.teardownNode(t)})),i&&(e&&e.isConnected&&this.host.removeChild(e),this.node=i,i!==this.defaultNode&&(this.initCustomNode(i),this.initNode(i)))}))}}
|
|
2626
|
-
/**
|
|
2627
|
-
* @license
|
|
2628
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2629
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2630
|
-
*/class lr extends ar{constructor(t){super(t,"error-message",(()=>document.createElement("div")),((t,e)=>{this.__updateErrorId(e),this.__updateHasError()}),!0)}get errorId(){return this.node&&this.node.id}setErrorMessage(t){this.errorMessage=t,this.__updateHasError()}setInvalid(t){this.invalid=t,this.__updateHasError()}initCustomNode(t){this.__updateErrorId(t),t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),this.__updateHasError()}teardownNode(t){let e=this.getSlotChild();e||t===this.defaultNode||(e=this.attachDefaultNode(),this.initNode(e)),this.__updateHasError()}__isNotEmpty(t){return Boolean(t&&""!==t.trim())}__updateHasError(){const t=this.node,e=Boolean(this.invalid&&this.__isNotEmpty(this.errorMessage));t&&(t.textContent=e?this.errorMessage:"",t.hidden=!e,e?t.setAttribute("role","alert"):t.removeAttribute("role")),this.host.toggleAttribute("has-error-message",e)}__updateErrorId(t){t.id||(t.id=this.defaultId)}}
|
|
2631
|
-
/**
|
|
2632
|
-
* @license
|
|
2633
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2634
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2635
|
-
*/class hr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setLabelId(t){this.__setLabelIdToAriaAttribute(t,this.__labelId),this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}get __isGroupField(){return this.__target===this.host}__setLabelIdToAriaAttribute(t,e){this.__setAriaAttributeId("aria-labelledby",t,e)}__setErrorIdToAriaAttribute(t,e){this.__setAriaAttributeId(this.__isGroupField?"aria-labelledby":"aria-describedby",t,e)}__setHelperIdToAriaAttribute(t,e){this.__setAriaAttributeId(this.__isGroupField?"aria-labelledby":"aria-describedby",t,e)}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}__setAriaAttributeId(t,e,i){this.__target&&(i&&function(t,e,i){const s=No(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,jo(s)):t.removeAttribute(e)}(this.__target,t,i),e&&function(t,e,i){const s=No(t.getAttribute(e));s.add(i),t.setAttribute(e,jo(s))}(this.__target,t,e))}}
|
|
2636
|
-
/**
|
|
2637
|
-
* @license
|
|
2638
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2639
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2640
|
-
*/class cr extends ar{constructor(t){super(t,"helper",null,null,!0)}get helperId(){return this.node&&this.node.id}initCustomNode(t){this.__updateHelperId(t),this.__observeHelper(t);const e=this.__hasHelper(t);this.__toggleHasHelper(e)}teardownNode(t){this.__helperIdObserver&&this.__helperIdObserver.disconnect();const e=this.getSlotChild();if(e&&e!==this.defaultNode){const t=this.__hasHelper(e);this.__toggleHasHelper(t)}else this.__applyDefaultHelper(this.helperText,e)}setHelperText(t){this.helperText=t;const e=this.getSlotChild();e&&e!==this.defaultNode||this.__applyDefaultHelper(t,e)}__hasHelper(t){return!!t&&(t.children.length>0||this.__isNotEmpty(t.textContent))}__isNotEmpty(t){return t&&""!==t.trim()}__applyDefaultHelper(t,e){const i=this.__isNotEmpty(t);i&&!e&&(this.slotFactory=()=>document.createElement("div"),e=this.attachDefaultNode(),this.__updateHelperId(e),this.__observeHelper(e)),e&&(e.textContent=t),this.__toggleHasHelper(i)}__observeHelper(t){this.__helperObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;if("attributes"===t.type)i&&e.id!==this.defaultId&&this.__updateHelperId(e);else if(i||e.parentElement===this.node){const t=this.__hasHelper(this.node);this.__toggleHasHelper(t)}}))})),this.__helperObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__toggleHasHelper(t){this.host.toggleAttribute("has-helper",t),this.dispatchEvent(new CustomEvent("helper-changed",{detail:{hasHelper:t,node:this.node}}))}__updateHelperId(t){t.id||(t.id=this.defaultId)}}
|
|
2641
|
-
/**
|
|
2642
|
-
* @license
|
|
2643
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2644
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2645
|
-
*/class ur extends ar{constructor(t){super(t,"label",(()=>document.createElement("label")),((t,e)=>{this.__updateLabelId(e),this.__updateDefaultLabel(this.label),this.__observeLabel(e)}),!0)}get labelId(){return this.node.id}initCustomNode(t){this.__updateLabelId(t);const e=this.__hasLabel(t);this.__toggleHasLabel(e)}teardownNode(t){this.__labelObserver&&this.__labelObserver.disconnect();let e=this.getSlotChild();e||t===this.defaultNode||(e=this.attachDefaultNode(),this.initNode(e));const i=this.__hasLabel(e);this.__toggleHasLabel(i)}setLabel(t){this.label=t,this.__updateDefaultLabel(t)}__hasLabel(t){return!!t&&(t.children.length>0||this.__isNotEmpty(t.textContent))}__isNotEmpty(t){return Boolean(t&&""!==t.trim())}__observeLabel(t){this.__labelObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;if("attributes"===t.type)i&&e.id!==this.defaultId&&this.__updateLabelId(e);else if(i||e.parentElement===this.node){const t=this.__hasLabel(this.node);this.__toggleHasLabel(t)}}))})),this.__labelObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__toggleHasLabel(t){this.host.toggleAttribute("has-label",t),this.dispatchEvent(new CustomEvent("label-changed",{detail:{hasLabel:t,node:this.node}}))}__updateDefaultLabel(t){if(this.defaultNode&&(this.defaultNode.textContent=t,this.defaultNode===this.node)){const e=this.__isNotEmpty(t);this.__toggleHasLabel(e)}}__updateLabelId(t){t.id||(t.id=this.defaultId)}}
|
|
2646
|
-
/**
|
|
2647
|
-
* @license
|
|
2648
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2649
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2650
|
-
*/const dr=Gt((t=>class extends(ys(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}get _labelId(){return this._labelController.labelId}get _labelNode(){return this._labelController.node}constructor(){super(),this._labelController=new ur(this)}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),pr=Gt((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}})),mr=t=>class extends(pr(dr(ys(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}get _errorId(){return this._errorController.errorId}get _errorNode(){return this._errorController.node}get _helperId(){return this._helperController.helperId}get _helperNode(){return this._helperController.node}constructor(){super(),this._fieldAriaController=new hr(this),this._helperController=new cr(this),this._errorController=new lr(this),this._labelController.addEventListener("label-changed",(t=>{const{hasLabel:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("helper-changed",(t=>{const{hasHelper:e,node:i}=t.detail;this.__helperChanged(e,i)}))}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{this._fieldAriaController.setErrorId(t?this._errorController.errorId:null)}))}}
|
|
2651
|
-
/**
|
|
2652
|
-
* @license
|
|
2653
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2654
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2655
|
-
*/,fr=Gt((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}})),vr=Gt((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}clear(){this.value=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this.inputElement.value=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0,this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),""===t&&void 0===e||this.__userInput||this._forwardInputValue(t)}get _hasValue(){return null!=this.value&&""!==this.value}})),br=Gt((t=>class extends(fr(pr(vr(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():s&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return Boolean(t)||0===t}})),gr=t=>class extends(rr(br(mr(Ao(t))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t)))}_onClearButtonClick(t){t.preventDefault(),this.inputElement.focus(),this.__clear()}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&(t.stopPropagation(),this.__clear())}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__clear(){this.clear(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=Us.debounce(this._preventInputDebouncer,Rs.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`),this.__allowedTextRegExp=new RegExp(`^${t}*$`)}catch(t){console.error(t)}}}
|
|
2656
|
-
/**
|
|
2657
|
-
* @license
|
|
2658
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2659
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2660
|
-
*/;
|
|
2661
|
-
/**
|
|
2662
|
-
* @license
|
|
2663
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2664
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2665
|
-
*/class yr extends ar{constructor(t,e){super(t,"input",(()=>document.createElement("input")),((t,i)=>{t.value&&i.setAttribute("value",t.value),t.type&&i.setAttribute("type",t.type),i.id=this.defaultId,"function"==typeof e&&e(i)}),!0)}}
|
|
2666
|
-
/**
|
|
2667
|
-
* @license
|
|
2668
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2669
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2670
|
-
*/class wr{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("label-changed",(t=>{this.__initLabel(t.detail.node)})),this.__initLabel(e.node)}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t)};this.input.addEventListener("click",t)}}
|
|
2671
|
-
/**
|
|
2672
|
-
* @license
|
|
2673
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd..
|
|
2674
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2675
|
-
*/const _r=[d`
|
|
2676
|
-
:host {
|
|
2677
|
-
display: inline-flex;
|
|
2678
|
-
outline: none;
|
|
2679
|
-
}
|
|
2680
|
-
|
|
2681
|
-
:host::before {
|
|
2682
|
-
content: '\\2003';
|
|
2683
|
-
width: 0;
|
|
2684
|
-
display: inline-block;
|
|
2685
|
-
/* Size and position this element on the same vertical position as the input-field element
|
|
2686
|
-
to make vertical align for the host element work as expected */
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
|
-
:host([hidden]) {
|
|
2690
|
-
display: none !important;
|
|
2691
|
-
}
|
|
2692
|
-
|
|
2693
|
-
:host(:not([has-label])) [part='label'] {
|
|
2694
|
-
display: none;
|
|
2695
|
-
}
|
|
2696
|
-
`
|
|
2697
|
-
/**
|
|
2698
|
-
* @license
|
|
2699
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd..
|
|
2700
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2701
|
-
*/,d`
|
|
2702
|
-
[class$='container'] {
|
|
2703
|
-
display: flex;
|
|
2704
|
-
flex-direction: column;
|
|
2705
|
-
min-width: 100%;
|
|
2706
|
-
max-width: 100%;
|
|
2707
|
-
width: var(--vaadin-field-default-width, 12em);
|
|
2708
|
-
}
|
|
2709
|
-
`
|
|
2710
|
-
/**
|
|
2711
|
-
* @license
|
|
2712
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd..
|
|
2713
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2714
|
-
*/,d`
|
|
2715
|
-
[part='clear-button'] {
|
|
2716
|
-
display: none;
|
|
2717
|
-
cursor: default;
|
|
2718
|
-
}
|
|
2719
|
-
|
|
2720
|
-
[part='clear-button']::before {
|
|
2721
|
-
content: '✕';
|
|
2722
|
-
}
|
|
2723
|
-
|
|
2724
|
-
:host([clear-button-visible][has-value]:not([disabled]):not([readonly])) [part='clear-button'] {
|
|
2725
|
-
display: block;
|
|
2726
|
-
}
|
|
2727
|
-
`
|
|
2728
|
-
/**
|
|
2729
|
-
* @license
|
|
2730
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd..
|
|
2731
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2732
|
-
*/];
|
|
2733
|
-
/**
|
|
2734
|
-
* @license
|
|
2735
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
2736
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2737
|
-
*/
|
|
2738
|
-
class xr{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.opened||this.__setVirtualKeyboardEnabled(!1)})),t.addEventListener("blur",(()=>this.__setVirtualKeyboardEnabled(!0))),t.addEventListener("touchstart",(()=>this.__setVirtualKeyboardEnabled(!0)))}__setVirtualKeyboardEnabled(t){this.host.inputElement&&(this.host.inputElement.inputMode=t?"":"none")}}
|
|
2739
|
-
/**
|
|
2740
|
-
* @license
|
|
2741
|
-
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2742
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2743
|
-
*/const kr=t=>class extends(ys(rr(br(Ao(t))))){static get properties(){return{_selectedDate:{type:Date},_focusedDate:Date,value:{type:String,notify:!0,value:""},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged"},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean},_fullscreen:{type:Boolean,value:!1},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},i18n:{type:Object,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,week:"Week",calendar:"Calendar",today:"Today",cancel:"Cancel",formatDate:t=>{const e=String(t.year).replace(/\d+/,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate:t=>{const e=t.split("/"),i=new Date;let s,o=i.getMonth(),r=i.getFullYear();if(3===e.length?(r=parseInt(e[2]),e[2].length<3&&r>=0&&(r+=r<50?2e3:1900),o=parseInt(e[0])-1,s=parseInt(e[1])):2===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:o,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String},max:{type:String},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)"},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)"},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:gs},_focusOverlayOnOpen:Boolean,_overlayInitialized:Boolean}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n.formatDate)","_focusedDateChanged(_focusedDate, i18n.formatDate)"]}static get constraints(){return[...super.constraints,"min","max"]}get clearElement(){return null}get _inputValue(){return this.inputElement?this.inputElement.value:void 0}set _inputValue(t){this.inputElement&&(this.inputElement.value=t)}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this)}_onFocus(t){super._onFocus(t),this._noInput&&t.target.blur()}_onBlur(t){if(super._onBlur(t),!this.opened){if(this.autoOpenDisabled){const t=this._getParsedDate();this._isValidDate(t)&&this._selectDate(t)}this.validate(),""===this._inputValue&&""!==this.value&&(this.value="")}}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new sr(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new xr(this))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),"value"in e&&this.__dispatchChange&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChange=!1)}open(){this.disabled||this.readonly||(this.opened=!0)}close(){(this._overlayInitialized||this.autoOpenDisabled)&&this.$.overlay.close()}_initOverlay(){this.$.overlay.removeAttribute("disable-upgrade"),this._overlayInitialized=!0,this.$.overlay.addEventListener("opened-changed",(t=>{this.opened=t.detail.value})),this.$.overlay.addEventListener("vaadin-overlay-escape-press",(()=>{this._focusedDate=this._selectedDate,this._close()})),this._overlayContent.addEventListener("close",(()=>{this._close()})),this._overlayContent.addEventListener("focus-input",this._focusAndSelect.bind(this)),this._overlayContent.addEventListener("date-tap",(t=>{this.__userConfirmedDate=!0,this._selectDate(t.detail.date),this._close()})),this._overlayContent.addEventListener("date-selected",(t=>{this.__userConfirmedDate=!0,this._selectDate(t.detail.date)})),this._overlayContent.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}checkValidity(){const t=!this._inputValue||!!this._selectedDate&&this._inputValue===this._getFormattedDate(this.i18n.formatDate,this._selectedDate),e=!this._selectedDate||Xo(this._selectedDate,this._minDate,this._maxDate);let i=!0;return this.inputElement&&(this.inputElement.checkValidity?i=this.inputElement.checkValidity():this.inputElement.validate&&(i=this.inputElement.validate())),t&&e&&i}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){return!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}_selectDate(t){const e=this._formatISO(t);this.value!==e&&(this.__dispatchChange=!0),this._selectedDate=t}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_parseDate(t){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/.exec(t);if(!e)return;const i=new Date(0,0);return i.setFullYear(parseInt(e[1],10)),i.setMonth(parseInt(e[2],10)-1),i.setDate(parseInt(e[3],10)),i}_isNoInput(t,e,i,s,o,r){return!t||e&&(!r||o)||i&&o||!s.parseDate}_formatISO(t){if(!(t instanceof Date))return"";const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",s="0000",o=t.getFullYear();return o<0?(o=-o,i="-",s="000000"):t.getFullYear()>=1e4&&(i="+",s="000000"),[i+e(o,s),e(t.getMonth()+1),e(t.getDate())].join("-")}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){t&&!this._overlayInitialized&&this._initOverlay(),this._overlayInitialized&&(this.$.overlay.opened=t),this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){if(void 0===t||void 0===e)return;const i=this._formatISO(t);this.__keepInputValue||this._applyInputValue(t),i!==this.value&&(this.validate(),this.value=i),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1}_focusedDateChanged(t,e){void 0!==t&&void 0!==e&&(this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(t))}__getOverlayTheme(t,e){if(e)return t}_valueChanged(t,e){const i=this._parseDate(t);!t||i?(t?Zo(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this._toggleHasValue(this._hasValue)):this.value=e}_onOverlayOpened(){const t=this._parseDate(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;this._overlayContent.initialPosition=t||Xo(e,this._minDate,this._maxDate)?e:Qo(e,[this._minDate,this._maxDate]),this._overlayContent.scrollToDate(this._overlayContent.focusedDate||this._overlayContent.initialPosition),this._ignoreFocusedDateChange=!0,this._overlayContent.focusedDate=this._overlayContent.focusedDate||this._overlayContent.initialPosition,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(this._overlayContent.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus(),this._noInput&&this.focusElement&&(this.focusElement.blur(),this._overlayContent.focusDateElement())}_selectParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this._getParsedDate(this._inputValue||"");this._isValidDate(t)?this._selectDate(t):(this.__keepInputValue=!0,this._selectDate(null),this._selectedDate=null,this.__keepInputValue=!1)}else this._focusedDate&&this._selectDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){window.removeEventListener("scroll",this._boundOnScroll,!0),this.__userConfirmedDate?this.__userConfirmedDate=!1:this._selectParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.value||this.validate()}_onScroll(t){t.target!==window&&this._overlayContent.contains(t.target)||this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputValue.length)}_applyInputValue(t){this._inputValue=t?this._getFormattedDate(this.i18n.formatDate,t):""}_getFormattedDate(t,e){return t(tr(e))}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_isValidDate(t){return t&&!isNaN(t.getTime())}_onChange(t){""===this._inputValue&&(this.__dispatchChange=!0),t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){this.autoOpenDisabled&&!this._noInput||(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.value="",this._inputValue="",this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){const e=this._getParsedDate(),i=this._isValidDate(e);if(this.opened)this._overlayInitialized&&this._overlayContent.focusedDate&&i&&this._selectDate(this._overlayContent.focusedDate),this.close();else if(i||""===this.inputElement.value){const t=this.value;this._selectParsedOrFocusedDate(),t===this.value&&this.validate()}else this.validate()}_onEscape(t){if(!this.opened)return this.clearButtonVisible&&this.value?(t.stopPropagation(),void this._onClearButtonClick(t)):void(this.autoOpenDisabled?(""===this.inputElement.value&&this._selectDate(null),this._applyInputValue(this._selectedDate)):(this._focusedDate=this._selectedDate,this._selectParsedOrFocusedDate()))}_getParsedDate(t=this._inputValue){const e=this.i18n.parseDate&&this.i18n.parseDate(t);return e&&this._parseDate(`${e.year}-${e.month+1}-${e.day}`)}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){this.opened||!this.inputElement.value||this.autoOpenDisabled||this.open(),this._userInputValueChanged()}_userInputValueChanged(){if(this.opened&&this._inputValue){const t=this._getParsedDate();this._isValidDate(t)&&(this._ignoreFocusedDateChange=!0,Zo(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}get _overlayContent(){return this.$.overlay.content.querySelector("#overlay-content")}__computeMinOrMaxDate(t){return this._parseDate(t)}}
|
|
2744
|
-
/**
|
|
2745
|
-
* @license
|
|
2746
|
-
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
2747
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2748
|
-
*/;ht("vaadin-date-picker",[_r,Ho],{moduleId:"vaadin-date-picker-styles"});class Ar extends(kr(gr(ft(Vs(Fi))))){static get is(){return"vaadin-date-picker"}static get template(){return Mi`
|
|
2749
|
-
<style>
|
|
2750
|
-
:host([opened]) {
|
|
2751
|
-
pointer-events: auto;
|
|
2752
|
-
}
|
|
2753
|
-
</style>
|
|
2754
|
-
|
|
2755
|
-
<div class="vaadin-date-picker-container">
|
|
2756
|
-
<div part="label">
|
|
2757
|
-
<slot name="label"></slot>
|
|
2758
|
-
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
|
2759
|
-
</div>
|
|
2760
|
-
|
|
2761
|
-
<vaadin-input-container
|
|
2762
|
-
part="input-field"
|
|
2763
|
-
readonly="[[readonly]]"
|
|
2764
|
-
disabled="[[disabled]]"
|
|
2765
|
-
invalid="[[invalid]]"
|
|
2766
|
-
theme$="[[_theme]]"
|
|
2767
|
-
>
|
|
2768
|
-
<slot name="prefix" slot="prefix"></slot>
|
|
2769
|
-
<slot name="input"></slot>
|
|
2770
|
-
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
2771
|
-
<div part="toggle-button" slot="suffix" aria-hidden="true" on-click="_toggle"></div>
|
|
2772
|
-
</vaadin-input-container>
|
|
2773
|
-
|
|
2774
|
-
<div part="helper-text">
|
|
2775
|
-
<slot name="helper"></slot>
|
|
2776
|
-
</div>
|
|
2777
|
-
|
|
2778
|
-
<div part="error-message">
|
|
2779
|
-
<slot name="error-message"></slot>
|
|
2780
|
-
</div>
|
|
2781
|
-
</div>
|
|
2782
|
-
|
|
2783
|
-
<vaadin-date-picker-overlay
|
|
2784
|
-
id="overlay"
|
|
2785
|
-
fullscreen$="[[_fullscreen]]"
|
|
2786
|
-
theme$="[[__getOverlayTheme(_theme, _overlayInitialized)]]"
|
|
2787
|
-
on-vaadin-overlay-open="_onOverlayOpened"
|
|
2788
|
-
on-vaadin-overlay-closing="_onOverlayClosed"
|
|
2789
|
-
restore-focus-on-close
|
|
2790
|
-
restore-focus-node="[[inputElement]]"
|
|
2791
|
-
disable-upgrade
|
|
2792
|
-
>
|
|
2793
|
-
<template>
|
|
2794
|
-
<vaadin-date-picker-overlay-content
|
|
2795
|
-
id="overlay-content"
|
|
2796
|
-
i18n="[[i18n]]"
|
|
2797
|
-
fullscreen$="[[_fullscreen]]"
|
|
2798
|
-
label="[[label]]"
|
|
2799
|
-
selected-date="[[_selectedDate]]"
|
|
2800
|
-
focused-date="{{_focusedDate}}"
|
|
2801
|
-
show-week-numbers="[[showWeekNumbers]]"
|
|
2802
|
-
min-date="[[_minDate]]"
|
|
2803
|
-
max-date="[[_maxDate]]"
|
|
2804
|
-
part="overlay-content"
|
|
2805
|
-
theme$="[[__getOverlayTheme(_theme, _overlayInitialized)]]"
|
|
2806
|
-
></vaadin-date-picker-overlay-content>
|
|
2807
|
-
</template>
|
|
2808
|
-
</vaadin-date-picker-overlay>
|
|
2809
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new yr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new wr(this.inputElement,this._labelController)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault()))}_initOverlay(){super._initOverlay(),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this[this._overlayInitialized&&this.$.overlay.opened?"close":"open"]()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}customElements.define(Ar.is,Ar);const Cr=class{constructor(i){t(this,i),this.filterDraw=e(this,"filterDraw",7),this.filterSelection=e(this,"filterSelection",7),this.filterSelectionReset=e(this,"filterSelectionReset",7),this.showFilterId=!0,this.activateTicketSearch=!1,this.gameId="",this.playerId="",this.session="",this.postMessage=!1,this.language="en",this.showFilterModal=!1,this.showClearButton=!1,this.filterData={},this.filterDataReset={ticketDrawId:"",filterFromCalendar:"",filterToCalendar:""}}componentDidRender(){this.filterData.ticketDrawId=null,this.filterData.filterFromCalendar=null,this.filterData.filterToCalendar=null,document.getElementById("#FilterById")&&(document.getElementById("#FilterById").value="")}filterSelectionHandler(t){this.postMessage&&window.postMessage({type:"filterSelection",event:t},window.location.href),this.filterData.ticketDrawId&&this.filterDraw.emit(t),(this.filterData.filterFromCalendar||this.filterData.filterToCalendar)&&this.filterSelection.emit(t)}filterSelectionResetHandler(t){this.postMessage&&window.postMessage({type:"filterSelectionReset",event:t},window.location.href),this.filterSelectionReset.emit(t)}modalCloseEvent(){this.showFilterModal=!1}toggleFilterModal(){this.showFilterModal=!0}filterSearch(){this.modalCloseEvent(),this.showClearButton=!0,this.filterSelectionHandler(this.filterData)}resetSearch(){this.showClearButton=!1,this.filterSelectionResetHandler(this.filterDataReset),this.filterData={}}handleTicketDrawId(t){this.filterData.ticketDrawId=t.target.value}handleFilterFrom(t){this.filterData.filterFromCalendar=new Date(t.target.value).toISOString()}handleFilterTo(t){this.filterData.filterToCalendar=new Date(t.target.value).toISOString()}render(){return i("div",{class:"HelperFilters"},i("div",{class:"FilterButtonsWrapper"},i("button",{class:"FilterOpen",onClick:()=>this.toggleFilterModal()},r("filterOpen",this.language)),this.showClearButton?i("button",{class:"FilterClear",onClick:()=>this.resetSearch()},r("filterClear",this.language)):null),i("helper-modal",{"title-modal":"Filter Modal",visible:this.showFilterModal},i("div",{class:"FilterModalHeader"},i("h3",{class:"FilterModalTitle"},r(this.activateTicketSearch?"filterModalTicketTitle":"filterModalDrawTitle",this.language))),i("div",{class:"FilterModalBody"},i("input",{id:"FilterById",type:"text",value:this.filterData.ticketDrawId,onInput:t=>this.handleTicketDrawId(t),class:"FilterModalSearch",placeholder:r(this.activateTicketSearch?"filterTicketPlaceholder":"filterDrawPlaceholder",this.language)}),i("p",null,r("filterOrDate",this.language)),i("div",{class:"FilterCalendarWrapper"},i("vaadin-date-picker",{value:this.filterData.filterFromCalendar,onChange:t=>this.handleFilterFrom(t),placeholder:r("filterFromCalendar",this.language),class:"VaadinDatePicker"}),i("vaadin-date-picker",{value:this.filterData.filterToCalendar,onChange:t=>this.handleFilterTo(t),placeholder:r("filterToCalendar",this.language),class:"VaadinDatePicker"}))),i("div",{class:"FilterModalFooter"},i("button",{class:"FilterModalButton",onClick:()=>this.filterSearch()},r("filterModalButton",this.language)))))}};Cr.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:#00958f;color:#FFF}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:#00958f;color:#FFF}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:#009993;text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:4px;background:#e8ebef;color:#263445;width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:#009993}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:#00958f;color:#FFF}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}';export{Cr as helper_filters}
|