@openremote/or-map 1.4.0-snapshot.20250313165420 → 1.4.0-snapshot.20250314134031

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.
@@ -558,9 +558,9 @@
558
558
  .mdc-list-item__graphic > or-icon {
559
559
  pointer-events: none;
560
560
  }
561
- `;let Ur=class extends Ct{constructor(){super(...arguments),this.readonly=!1,this.required=!1,this.checked=!1,this.indeterminate=!1,this.multiple=!1,this.searchLabel="search",this.compact=!1,this.comfortable=!1,this.raised=!1,this.action=!1,this.unElevated=!1,this.outlined=!1,this.rounded=!1,this.disableSliderNumberInput=!1,this.fullWidth=!1,this.helperPersistent=!1,this.autoValidate=!1,this.charCounter=!1,this.disabled=!1,this.continuous=!1,this.resizeVertical=!1,this._selectedIndex=-1,this.isUiValid=!0}static get styles(){return[k`${w(kr)}`,k`${w(xr)}`,k`${w(wr)}`,k`${w(Er)}`,k`${w(Cr)}`,k`${w(Ar)}`,k`${w(Tr)}`,k`${w(Ir)}`,k`${w(Sr)}`,k`${w(zr)}`,k`${w(Lr)}`,k`${w(Mr)}`,k`${w(Rr)}`,k`${w(Dr)}`,k`${w(Pr)}`,k`${w(Or)}`,Vr]}get nativeValue(){if(this._mdcComponent)return this._mdcComponent.value}disconnectedCallback(){var t,e;super.disconnectedCallback(),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0,null===(t=this._menuObserver)||void 0===t||t.disconnect()),this._mdcComponent2&&(this._mdcComponent2.destroy(),this._mdcComponent2=void 0,null===(e=this._menuObserver)||void 0===e||e.disconnect())}shouldUpdate(t){return t.has("indeterminate")&&this._mdcComponent&&this.type===Fr.CHECKBOX&&(this._mdcComponent.indeterminate=this.indeterminate),t.has("disabled")&&(this._mdcComponent&&(this._mdcComponent.disabled=this.disabled),this.type===Fr.RANGE&&this._mdcComponent2&&(this._mdcComponent2.disabled=this.disabled)),t.has("readonly")&&(this._mdcComponent&&(this._mdcComponent.readonly=this.readonly),this.type===Fr.RANGE&&this._mdcComponent2&&(this._mdcComponent2.readonly=this.readonly)),!this.type&&this.value&&(this.value instanceof Date?this.type=Fr.DATETIME:"boolean"==typeof this.value?this.type=Fr.CHECKBOX:"number"==typeof this.value?this.type=Fr.NUMBER:"string"==typeof this.value?this.type=Fr.TEXT:this.type=Fr.JSON),!0}focus(){this.type===Fr.RANGE&&this._mdcComponent2?this._mdcComponent2.focus():this._mdcComponent&&"function"==typeof this._mdcComponent.focus&&this._mdcComponent.focus()}render(){if(this.type){const t=!this.fullWidth&&this.label;let n=!this.fullWidth&&this.outlined,i=!!this.helperText;const r=!(this.isUiValid||!this.errorMessage&&!this.validationMessage),o={"mdc-text-field-helper-text--persistent":!r&&this.helperPersistent,"mdc-text-field-helper-text--validation-msg":r},a=null!==this.value&&void 0!==this.value||!1===this.value;let s=t?rt`<span class="mdc-floating-label ${a?"mdc-floating-label--float-above":""}" id="label">${this.label}</span>`:void 0;switch(this.type){case Fr.RADIO:const t=this.resolveOptions(this.options);return this._selectedIndex=-1,rt`
561
+ `;let Ur=class extends Ct{constructor(){super(...arguments),this.readonly=!1,this.required=!1,this.checked=!1,this.indeterminate=!1,this.multiple=!1,this.searchLabel="search",this.compact=!1,this.comfortable=!1,this.raised=!1,this.action=!1,this.unElevated=!1,this.outlined=!1,this.rounded=!1,this.disableSliderNumberInput=!1,this.fullWidth=!1,this.helperPersistent=!1,this.autoValidate=!1,this.charCounter=!1,this.disabled=!1,this.continuous=!1,this.resizeVertical=!1,this._selectedIndex=-1,this.isUiValid=!0}static get styles(){return[k`${w(kr)}`,k`${w(xr)}`,k`${w(wr)}`,k`${w(Er)}`,k`${w(Cr)}`,k`${w(Ar)}`,k`${w(Tr)}`,k`${w(Ir)}`,k`${w(Sr)}`,k`${w(zr)}`,k`${w(Lr)}`,k`${w(Mr)}`,k`${w(Rr)}`,k`${w(Dr)}`,k`${w(Pr)}`,k`${w(Or)}`,Vr]}get nativeValue(){if(this._mdcComponent)return this._mdcComponent.value}disconnectedCallback(){var t,e;super.disconnectedCallback(),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0,null===(t=this._menuObserver)||void 0===t||t.disconnect()),this._mdcComponent2&&(this._mdcComponent2.destroy(),this._mdcComponent2=void 0,null===(e=this._menuObserver)||void 0===e||e.disconnect())}shouldUpdate(t){return t.has("indeterminate")&&this._mdcComponent&&this.type===Fr.CHECKBOX&&(this._mdcComponent.indeterminate=this.indeterminate),t.has("disabled")&&(this._mdcComponent&&(this._mdcComponent.disabled=this.disabled),this.type===Fr.RANGE&&this._mdcComponent2&&(this._mdcComponent2.disabled=this.disabled)),t.has("readonly")&&(this._mdcComponent&&(this._mdcComponent.readonly=this.readonly),this.type===Fr.RANGE&&this._mdcComponent2&&(this._mdcComponent2.readonly=this.readonly)),!this.type&&this.value&&(this.value instanceof Date?this.type=Fr.DATETIME:"boolean"==typeof this.value?this.type=Fr.CHECKBOX:"number"==typeof this.value?this.type=Fr.NUMBER:"string"==typeof this.value?this.type=Fr.TEXT:this.type=Fr.JSON),!0}focus(){this.type===Fr.RANGE&&this._mdcComponent2?this._mdcComponent2.focus():this._mdcComponent&&"function"==typeof this._mdcComponent.focus&&this._mdcComponent.focus()}render(){var t;if(this.type){const n=!this.fullWidth&&this.label;let i=!this.fullWidth&&this.outlined,r=!!this.helperText;const o=!(this.isUiValid||!this.errorMessage&&!this.validationMessage),a={"mdc-text-field-helper-text--persistent":!o&&this.helperPersistent,"mdc-text-field-helper-text--validation-msg":o},s=null!==this.value&&void 0!==this.value||!1===this.value;let l=n?rt`<span class="mdc-floating-label ${s?"mdc-floating-label--float-above":""}" id="label">${this.label}</span>`:void 0;switch(this.type){case Fr.RADIO:const n=this.resolveOptions(this.options);return this._selectedIndex=-1,rt`
562
562
  <div class="mdc-radio-container">
563
- ${t?t.map((([t,e],n)=>(this.value===t&&(this._selectedIndex=n),rt`
563
+ ${n?n.map((([t,e],n)=>(this.value===t&&(this._selectedIndex=n),rt`
564
564
  <div id="field" class="mdc-form-field">
565
565
  <div class="mdc-radio">
566
566
  <input type="radio"
@@ -583,10 +583,10 @@
583
583
 
584
584
  `))):""}
585
585
  </div>
586
- `;case Fr.SWITCH:const l={"mdc-switch--disabled":this.disabled||this.readonly,"mdc-switch--full-width":this.fullWidth,"mdc-switch--checked":this.value};return rt`
586
+ `;case Fr.SWITCH:const c={"mdc-switch--disabled":this.disabled||this.readonly,"mdc-switch--full-width":this.fullWidth,"mdc-switch--checked":this.value};return rt`
587
587
  <span id="wrapper">
588
588
  ${this.label?rt`<label for="elem" class="${this.disabled?"mdc-switch--disabled":""}">${this.label}</label>`:""}
589
- <div id="component" class="mdc-switch ${ye(l)}">
589
+ <div id="component" class="mdc-switch ${ye(c)}">
590
590
  <div class="mdc-switch__track"></div>
591
591
  <div class="mdc-switch__thumb-underlay">
592
592
  <div class="mdc-switch__thumb">
@@ -600,23 +600,23 @@
600
600
  </div>
601
601
  </div>
602
602
  </span>
603
- `;case Fr.LIST:const c={"mdc-select--outlined":n,"mdc-select--disabled":this.disabled,"mdc-select--required":this.required,"mdc-select--dense":!1,"mdc-select--no-label":!this.label,"mdc-select--with-leading-icon":!!this.icon},d=this.resolveOptions(this.options);return this._selectedIndex=-1,rt`
604
- <div id="component" class="mdc-list mdc-select ${ye(c)}" @MDCList:action="${t=>this.onValueChange(void 0,-1===t.detail.index?void 0:Array.isArray(this.options[t.detail.index])?this.options[t.detail.index][0]:this.options[t.detail.index])}">
603
+ `;case Fr.LIST:const d={"mdc-select--outlined":i,"mdc-select--disabled":this.disabled,"mdc-select--required":this.required,"mdc-select--dense":!1,"mdc-select--no-label":!this.label,"mdc-select--with-leading-icon":!!this.icon},u=this.resolveOptions(this.options);return this._selectedIndex=-1,rt`
604
+ <div id="component" class="mdc-list mdc-select ${ye(d)}" @MDCList:action="${t=>this.onValueChange(void 0,-1===t.detail.index?void 0:Array.isArray(this.options[t.detail.index])?this.options[t.detail.index][0]:this.options[t.detail.index])}">
605
605
  <ul class="mdc-list">
606
- ${d?d.map((([t,e],n)=>(this.value===t&&(this._selectedIndex=n),rt`<li class="${ye({"mdc-list-item":!0,"mdc-list-item--selected":this.value===t})}" role="option" data-value="${t}"><or-translate value="${e}"></or-translate></li>`))):""}
606
+ ${u?u.map((([t,e],n)=>(this.value===t&&(this._selectedIndex=n),rt`<li class="${ye({"mdc-list-item":!0,"mdc-list-item--selected":this.value===t})}" role="option" data-value="${t}"><or-translate value="${e}"></or-translate></li>`))):""}
607
607
  </ul>
608
608
  </div>
609
- `;case Fr.SELECT:const u={"mdc-select--outlined":n,"mdc-select--filled":!n,"mdc-select--disabled":this.disabled||this.readonly,"mdc-select--required":this.required,"mdc-select--dense":!1,"dense-comfortable":this.comfortable,"mdc-select--no-label":!this.label,"mdc-select--with-leading-icon":!!this.icon,"or-mwc-input--rounded":this.rounded};let h;h=null!=this.searchProvider?this.searchProvider(this.searchableValue):this.resolveOptions(this.options);const p=(t,e)=>{var n;const i=e.value;if(this.multiple){t.stopPropagation();const e=null!==(n=this._tempValue)&&void 0!==n?n:Array.isArray(this.value)?[...this.value]:void 0!==this.value?[this.value]:[],r=e.findIndex((t=>t===i));r>=0?e.splice(r,1):e.push(i);const o=t.composedPath()[0].closest("li"),a=o.getElementsByTagName("or-icon")[0];o&&(r>=0?o.classList.remove("mdc-list-item--selected"):o.classList.add("mdc-list-item--selected")),a&&(a.icon=r>=0?"checkbox-blank-outline":"checkbox-marked"),this._tempValue=e}else null==this.searchProvider&&Array.isArray(h)||this.onValueChange(void 0,e.value)},m=()=>{var t;const e=null!==(t=this._tempValue)&&void 0!==t?t:this.value;if(window.setTimeout((()=>{this._mdcComponent&&this._mdcComponent.foundation.adapter.floatLabel(e&&(!Array.isArray(e)||e.length>0))})),!this._tempValue)return;const n=[...this._tempValue];this._tempValue=void 0,this.onValueChange(void 0,n)},f=t=>null==this.searchProvider||t&&0!=t.length?fr(this.multiple?pr.MULTI_TICK:pr.SELECT,rt`${null==t?void 0:t.map((([t,e],n)=>gr({text:e,value:t},n,Array.isArray(this.value)?this.value:this.value?[this.value]:[],this.multiple?pr.MULTI_TICK:pr.SELECT,!1,p)))}`,!1,void 0):rt`<span class="mdc-text-field-helper-line" style="margin: 8px 8px 8px 0;">${lr.i18next.t("noResults")}</span>`;return rt`
609
+ `;case Fr.SELECT:const h={"mdc-select--outlined":i,"mdc-select--filled":!i,"mdc-select--disabled":this.disabled||this.readonly,"mdc-select--required":this.required,"mdc-select--dense":!1,"dense-comfortable":this.comfortable,"mdc-select--no-label":!this.label,"mdc-select--with-leading-icon":!!this.icon,"or-mwc-input--rounded":this.rounded};let p;p=null!=this.searchProvider?this.searchProvider(this.searchableValue):this.resolveOptions(this.options);const m=(t,e)=>{var n;const i=e.value;if(this.multiple){t.stopPropagation();const e=null!==(n=this._tempValue)&&void 0!==n?n:Array.isArray(this.value)?[...this.value]:void 0!==this.value?[this.value]:[],r=e.findIndex((t=>t===i));r>=0?e.splice(r,1):e.push(i);const o=t.composedPath()[0].closest("li"),a=o.getElementsByTagName("or-icon")[0];o&&(r>=0?o.classList.remove("mdc-list-item--selected"):o.classList.add("mdc-list-item--selected")),a&&(a.icon=r>=0?"checkbox-blank-outline":"checkbox-marked"),this._tempValue=e}else null==this.searchProvider&&Array.isArray(p)||this.onValueChange(void 0,e.value)},f=()=>{var t;const e=null!==(t=this._tempValue)&&void 0!==t?t:this.value;if(window.setTimeout((()=>{this._mdcComponent&&this._mdcComponent.foundation.adapter.floatLabel(e&&(!Array.isArray(e)||e.length>0))})),!this._tempValue)return;const n=[...this._tempValue];this._tempValue=void 0,this.onValueChange(void 0,n)},g=t=>null==this.searchProvider||t&&0!=t.length?fr(this.multiple?pr.MULTI_TICK:pr.SELECT,rt`${null==t?void 0:t.map((([t,e],n)=>gr({text:e,value:t},n,Array.isArray(this.value)?this.value:this.value?[this.value]:[],this.multiple?pr.MULTI_TICK:pr.SELECT,!1,m)))}`,!1,void 0):rt`<span class="mdc-text-field-helper-line" style="margin: 8px 8px 8px 0;">${lr.i18next.t("noResults")}</span>`;return rt`
610
610
  <div id="component"
611
- class="mdc-select ${ye(u)}"
612
- @MDCSelect:change="${t=>yr(this,void 0,void 0,(function*(){const e=Array.isArray(h)?h:yield h;this.onValueChange(void 0,-1===t.detail.index?void 0:Array.isArray(e[t.detail.index])?e[t.detail.index][0]:e[t.detail.index])}))}">
611
+ class="mdc-select ${ye(h)}"
612
+ @MDCSelect:change="${t=>yr(this,void 0,void 0,(function*(){const e=Array.isArray(p)?p:yield p;this.onValueChange(void 0,-1===t.detail.index?void 0:Array.isArray(e[t.detail.index])?e[t.detail.index][0]:e[t.detail.index])}))}">
613
613
  <div class="mdc-select__anchor" role="button"
614
614
  aria-haspopup="listbox"
615
615
  aria-expanded="false"
616
616
  aria-disabled="${""+(this.disabled||this.readonly)}"
617
617
  aria-labelledby="label selected-text">
618
- ${n?void 0:rt`<span class="mdc-select__ripple"></span>`}
619
- ${n?this.renderOutlined(s):s}
618
+ ${i?void 0:rt`<span class="mdc-select__ripple"></span>`}
619
+ ${i?this.renderOutlined(l):l}
620
620
  <span class="mdc-select__selected-text-container">
621
621
  <span id="selected-text" class="mdc-select__selected-text"></span>
622
622
  </span>
@@ -638,9 +638,9 @@
638
638
  </polygon>
639
639
  </svg>
640
640
  </span>
641
- ${n?"":rt`<div class="mdc-line-ripple"></div>`}
641
+ ${i?"":rt`<div class="mdc-line-ripple"></div>`}
642
642
  </div>
643
- <div id="mdc-select-menu" class="mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fixed ${null!=this.searchProvider?"mdc-menu__searchable":void 0}" @MDCMenuSurface:closed="${m}">
643
+ <div id="mdc-select-menu" class="mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fixed ${null!=this.searchProvider?"mdc-menu__searchable":void 0}" @MDCMenuSurface:closed="${f}">
644
644
  ${we(null!=this.searchProvider,(()=>rt`
645
645
  <label id="select-searchable" class="mdc-text-field mdc-text-field--filled">
646
646
  <span class="mdc-floating-label" style="color: rgba(0, 0, 0, 0.6); text-transform: capitalize; visibility: ${this.searchableValue?"hidden":"visible"}" id="my-label-id">
@@ -651,11 +651,11 @@
651
651
  />
652
652
  </label>
653
653
  `))}
654
- ${we(Array.isArray(h),(()=>f(h)),(()=>Te(new Promise((t=>yr(this,void 0,void 0,(function*(){t(f(yield h))})))),rt`<span class="mdc-text-field-helper-line" style="margin: 8px 8px 8px 0;">${lr.i18next.t("loading")}</span>`)))}
654
+ ${we(Array.isArray(p),(()=>g(p)),(()=>Te(new Promise((t=>yr(this,void 0,void 0,(function*(){t(g(yield p))})))),rt`<span class="mdc-text-field-helper-line" style="margin: 8px 8px 8px 0;">${lr.i18next.t("loading")}</span>`)))}
655
655
  </div>
656
- ${i||r?rt`
657
- <p id="component-helper-text" class="mdc-select-helper-text ${ye(o)}" aria-hidden="true">
658
- ${r?this.errorMessage||this.validationMessage:this.helperText}
656
+ ${r||o?rt`
657
+ <p id="component-helper-text" class="mdc-select-helper-text ${ye(a)}" aria-hidden="true">
658
+ ${o?this.errorMessage||this.validationMessage:this.helperText}
659
659
  </p>`:""}
660
660
  </div>
661
661
  `;case Fr.BUTTON_TOGGLE:return rt`
@@ -677,9 +677,9 @@
677
677
  ${this.label?rt`<span class="${this.action?"mdc-fab__label":"mdc-button__label"}"><or-translate .value="${this.label}"></or-translate></span>`:""}
678
678
  ${!r&&this.iconTrailing?rt`<or-icon class="${this.action?"mdc-fab__icon":"mdc-button__icon"}" aria-hidden="true" icon="${this.iconTrailing}"></or-icon>`:""}
679
679
  </button>
680
- `}case Fr.CHECKBOX_LIST:Array.isArray(this.value)||(null===this.value||void 0===this.value?this.value=[]:this.value=[this.value]);const g=this.resolveOptions(this.options);return this._selectedIndex=-1,rt`
680
+ `}case Fr.CHECKBOX_LIST:Array.isArray(this.value)||(null===this.value||void 0===this.value?this.value=[]:this.value=[this.value]);const _=this.resolveOptions(this.options);return this._selectedIndex=-1,rt`
681
681
  <div class="mdc-checkbox-list">
682
- ${g?g.map((([t,e],n)=>(this.value===t&&(this._selectedIndex=n),rt`
682
+ ${_?_.map((([t,e],n)=>(this.value===t&&(this._selectedIndex=n),rt`
683
683
  <div id="field" class="mdc-form-field">
684
684
  <div id="component" class="mdc-checkbox">
685
685
  <input type="checkbox"
@@ -697,9 +697,9 @@
697
697
 
698
698
  `))):""}
699
699
  </div>
700
- `;case Fr.CHECKBOX:let _={"mdc-checkbox":!0,"mdc-checkbox--disabled":this.disabled||this.readonly};return rt`
700
+ `;case Fr.CHECKBOX:let b={"mdc-checkbox":!0,"mdc-checkbox--disabled":this.disabled||this.readonly};return rt`
701
701
  <div id="field" class="mdc-form-field">
702
- <div id="component" class="${ye(_)}">
702
+ <div id="component" class="${ye(b)}">
703
703
  <input type="checkbox"
704
704
  id="elem"
705
705
  data-indeterminate="${this.indeterminate}"
@@ -727,41 +727,41 @@
727
727
  />
728
728
  <label style="margin-left: 10px; cursor: pointer" for="elem">${this.label}</label>
729
729
  </div>
730
- `;case Fr.NUMBER:case Fr.RANGE:case Fr.DATE:case Fr.DATETIME:case Fr.TIME:case Fr.MONTH:case Fr.WEEK:case Fr.EMAIL:case Fr.PASSWORD:case Fr.TELEPHONE:case Fr.URL:case Fr.TEXT:case Fr.TEXTAREA:case Fr.JSON:case Fr.JSON_OBJECT:{let t,l=[void 0===this.value||null===this.value?void 0:this.value,this.min,this.max];if(l.some((t=>"string"!=typeof t)))if(this.type===Fr.JSON||this.type===Fr.JSON_OBJECT)if(void 0!==l[0]){if("string"!=typeof l[0]||null===l[0])try{l[0]=JSON.stringify(l[0],null,2)}catch(t){console.warn("Failed to parse JSON expression for input control"),l[0]=""}}else l[0]="";else{const t=this.format?Object.assign({},this.format):{};switch(this.type){case Fr.TIME:t.asDate=!0,t.hour12=!1,t.timeStyle=this.step&&this.step<60?"medium":"short";break;case Fr.DATE:t.asDate=!0,t.momentJsFormat="YYYY-MM-DD";break;case Fr.WEEK:t.asDate=!0,t.momentJsFormat="YYYY-[W]WW";break;case Fr.MONTH:t.asDate=!0,t.momentJsFormat="YYYY-MM";break;case Fr.DATETIME:t.asDate=!0,t.momentJsFormat="YYYY-MM-DDTHH:mm";break;case Fr.NUMBER:t.maximumFractionDigits=20}t.useGrouping=!1,l=l.map((n=>void 0!==n?e.Util.getValueAsString(n,(()=>t),"en-GB"):void 0))}let c=this.label,d=this.type,u="component";if(this.type===Fr.RANGE&&(c=void 0,n=!1,i=!1,d=Fr.NUMBER,u="number"),this.type!==Fr.RANGE||!this.disableSliderNumberInput){const e={"mdc-text-field":!0,"mdc-text-field--invalid":!this.valid,"mdc-text-field--filled":!n,"mdc-text-field--outlined":n,"mdc-text-field--textarea":d===Fr.TEXTAREA||d===Fr.JSON||d===Fr.JSON_OBJECT,"mdc-text-field--disabled":this.disabled,"mdc-text-field--fullwidth":this.fullWidth&&!n,"dense-comfortable":this.comfortable&&!(d===Fr.TEXTAREA||d===Fr.JSON||d===Fr.JSON_OBJECT),"dense-compact":!this.comfortable&&this.compact,"mdc-text-field--label-floating":a,"mdc-text-field--no-label":!this.label,"mdc-text-field--with-leading-icon":!!this.icon,"mdc-text-field--with-trailing-icon":!!this.iconTrailing,"or-mwc-input--rounded":this.rounded};t=d===Fr.TEXTAREA||d===Fr.JSON||d===Fr.JSON_OBJECT?rt`
730
+ `;case Fr.NUMBER:case Fr.RANGE:case Fr.DATE:case Fr.DATETIME:case Fr.TIME:case Fr.MONTH:case Fr.WEEK:case Fr.EMAIL:case Fr.PASSWORD:case Fr.TELEPHONE:case Fr.URL:case Fr.TEXT:case Fr.TEXTAREA:case Fr.JSON:case Fr.JSON_OBJECT:{let n,c=[void 0===this.value||null===this.value?void 0:this.value,this.min,this.max];if(c.some((t=>"string"!=typeof t)))if(this.type===Fr.JSON||this.type===Fr.JSON_OBJECT)if(void 0!==c[0]){if("string"!=typeof c[0]||null===c[0])try{c[0]=JSON.stringify(c[0],null,2)}catch(t){console.warn("Failed to parse JSON expression for input control"),c[0]=""}}else c[0]="";else{const n=this.format?Object.assign({},this.format):{};switch(this.type){case Fr.TIME:n.asDate=!0,n.hour12=!1,n.timeStyle=this.step&&this.step<60?"medium":"short";break;case Fr.DATE:n.asDate=!0,n.momentJsFormat="YYYY-MM-DD";break;case Fr.WEEK:n.asDate=!0,n.momentJsFormat="YYYY-[W]WW";break;case Fr.MONTH:n.asDate=!0,n.momentJsFormat="YYYY-MM";break;case Fr.DATETIME:n.asDate=!0,n.momentJsFormat="YYYY-MM-DDTHH:mm";break;case Fr.NUMBER:null!==(t=n.maximumFractionDigits)&&void 0!==t||(n.maximumFractionDigits=20)}n.useGrouping=!1,c=c.map((t=>void 0!==t?e.Util.getValueAsString(t,(()=>n),"en-GB"):void 0))}let d=this.label,u=this.type,h="component";if(this.type===Fr.RANGE&&(d=void 0,i=!1,r=!1,u=Fr.NUMBER,h="number"),this.type!==Fr.RANGE||!this.disableSliderNumberInput){const t={"mdc-text-field":!0,"mdc-text-field--invalid":!this.valid,"mdc-text-field--filled":!i,"mdc-text-field--outlined":i,"mdc-text-field--textarea":u===Fr.TEXTAREA||u===Fr.JSON||u===Fr.JSON_OBJECT,"mdc-text-field--disabled":this.disabled,"mdc-text-field--fullwidth":this.fullWidth&&!i,"dense-comfortable":this.comfortable&&!(u===Fr.TEXTAREA||u===Fr.JSON||u===Fr.JSON_OBJECT),"dense-compact":!this.comfortable&&this.compact,"mdc-text-field--label-floating":s,"mdc-text-field--no-label":!this.label,"mdc-text-field--with-leading-icon":!!this.icon,"mdc-text-field--with-trailing-icon":!!this.iconTrailing,"or-mwc-input--rounded":this.rounded};n=u===Fr.TEXTAREA||u===Fr.JSON||u===Fr.JSON_OBJECT?rt`
731
731
  <textarea id="elem" class="mdc-text-field__input ${this.resizeVertical?"resize-vertical":""}" ?required="${this.required}"
732
732
  ?readonly="${this.readonly}" ?disabled="${this.disabled}" minlength="${xe(this.minLength)}"
733
733
  maxlength="${xe(this.maxLength)}" rows="${this.rows?this.rows:5}"
734
- cols="${xe(this.cols)}" aria-label="${xe(c)}"
735
- aria-labelledby="${xe(c?"label":void 0)}"
736
- @change="${t=>this.onValueChange(t.target,t.target.value)}">${l[0]?l[0]:""}</textarea>`:rt`
737
- <input type="${d}" id="elem" aria-labelledby="${xe(c?"label":void 0)}"
734
+ cols="${xe(this.cols)}" aria-label="${xe(d)}"
735
+ aria-labelledby="${xe(d?"label":void 0)}"
736
+ @change="${t=>this.onValueChange(t.target,t.target.value)}">${c[0]?c[0]:""}</textarea>`:rt`
737
+ <input type="${u}" id="elem" aria-labelledby="${xe(d?"label":void 0)}"
738
738
  class="mdc-text-field__input" ?required="${this.required}" ?readonly="${this.readonly}"
739
- ?disabled="${this.disabled}" min="${xe(l[1])}" max="${xe(l[2])}"
739
+ ?disabled="${this.disabled}" min="${xe(c[1])}" max="${xe(c[2])}"
740
740
  step="${this.step?this.step:"any"}" minlength="${xe(this.minLength)}" pattern="${xe(this.pattern)}"
741
741
  maxlength="${xe(this.maxLength)}" placeholder="${xe(this.placeHolder)}"
742
- .value="${null!==l[0]&&void 0!==l[0]?l[0]:""}"
742
+ .value="${null!==c[0]&&void 0!==c[0]?c[0]:""}"
743
743
  @keydown="${t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||this.onValueChange(t.target,t.target.value,!0)}}"
744
744
  @blur="${t=>{""===t.target.value&&this.reportValidity()}}"
745
- @change="${t=>this.onValueChange(t.target,t.target.value)}" />`,t=rt`
746
- <label id="${u}" class="${ye(e)}">
745
+ @change="${t=>this.onValueChange(t.target,t.target.value)}" />`,n=rt`
746
+ <label id="${h}" class="${ye(t)}">
747
747
  ${this.icon?rt`<or-icon class="mdc-text-field__icon mdc-text-field__icon--leading" style="color: ${this.iconColor?"#"+this.iconColor:"unset"}" aria-hidden="true" icon="${this.icon}"></or-icon>`:""}
748
- ${n?"":rt`<span class="mdc-text-field__ripple"></span>`}
749
- ${t}
750
- ${n?this.renderOutlined(s):s}
751
- ${n?"":rt`<span class="mdc-line-ripple"></span>`}
748
+ ${i?"":rt`<span class="mdc-text-field__ripple"></span>`}
749
+ ${n}
750
+ ${i?this.renderOutlined(l):l}
751
+ ${i?"":rt`<span class="mdc-line-ripple"></span>`}
752
752
  ${this.iconTrailing?rt`<or-icon class="mdc-text-field__icon mdc-text-field__icon--trailing" aria-hidden="true" icon="${this.iconTrailing}"></or-icon>`:""}
753
753
  </label>
754
- ${i||r?rt`
754
+ ${r||o?rt`
755
755
  <div class="mdc-text-field-helper-line">
756
- <div class="mdc-text-field-helper-text ${ye(o)}">${r?this.errorMessage||this.validationMessage:this.helperText}</div>
756
+ <div class="mdc-text-field-helper-text ${ye(a)}">${o?this.errorMessage||this.validationMessage:this.helperText}</div>
757
757
  ${this.charCounter&&!this.readonly?rt`<div class="mdc-text-field-character-counter"></div>`:""}
758
758
  </div>
759
759
  `:""}
760
- `}if(this.type===Fr.RANGE){const e={"mdc-slider":!0,"mdc-slider--range":this.continuous,"mdc-slider--discreet":!this.continuous,"mdc-slider--disabled":this.disabled||this.readonly};t=rt`
760
+ `}if(this.type===Fr.RANGE){const t={"mdc-slider":!0,"mdc-slider--range":this.continuous,"mdc-slider--discreet":!this.continuous,"mdc-slider--disabled":this.disabled||this.readonly};n=rt`
761
761
  <span id="wrapper">
762
762
  ${this.label?rt`<label for="component" class="${this.disabled?"mdc-switch--disabled":""}">${this.label}</label>`:""}
763
- <div id="component" class="${ye(e)}" @MDCSlider:change="${t=>this.onValueChange(void 0,t.detail.value)}">
764
- <input id="elem" class="mdc-slider__input" type="range" min="${xe(l[1])}" max="${xe(l[2])}" value="${l[0]||l[1]||0}" name="slider" step="${this.step||1}" ?readonly="${this.readonly}" ?disabled="${this.disabled}" aria-label="${xe(this.label)}" />
763
+ <div id="component" class="${ye(t)}" @MDCSlider:change="${t=>this.onValueChange(void 0,t.detail.value)}">
764
+ <input id="elem" class="mdc-slider__input" type="range" min="${xe(c[1])}" max="${xe(c[2])}" value="${c[0]||c[1]||0}" name="slider" step="${this.step||1}" ?readonly="${this.readonly}" ?disabled="${this.disabled}" aria-label="${xe(this.label)}" />
765
765
  <div class="mdc-slider__track">
766
766
  <div class="mdc-slider__track--inactive"></div>
767
767
  <div class="mdc-slider__track--active">
@@ -779,9 +779,9 @@
779
779
  <div class="mdc-slider__thumb-knob"></div>
780
780
  </div>
781
781
  </div>
782
- ${t?rt`<div style="min-width: 70px; width: 70px;">${t}</div>`:""}
782
+ ${n?rt`<div style="min-width: 70px; width: 70px;">${n}</div>`:""}
783
783
  </span>
784
- `}return t}}}return rt`<span>INPUT TYPE NOT IMPLEMENTED</span>`}_getFormat(){if(this.format)return this.format}update(t){if(t.has("autoValidate")&&this._mdcComponent){const t=this._mdcComponent;t.foundation&&t.foundation.setValidateOnValueChange&&t.foundation.setValidateOnValueChange(this.autoValidate)}super.update(t)}firstUpdated(t){super.firstUpdated(t),this.autoValidate&&this.reportValidity()}updated(t){var e,n;if(super.updated(t),t.has("type")){const t=this.shadowRoot.getElementById("component");if(this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0),this._mdcComponent2&&(this._mdcComponent2.destroy(),this._mdcComponent2=void 0),t&&this.type){switch(this.type){case Fr.LIST:const e=new Si(t);this._mdcComponent=e,e.selectedIndex=this._selectedIndex;break;case Fr.SELECT:const n=new Wi(t);this._mdcComponent=n,null!==this.value&&void 0!==this.value||(n.selectedIndex=-1),this.multiple&&(this._mdcComponent.foundation.adapter.getSelectedIndex=()=>{if(!Array.isArray(this.value)||0===this.value.length)return-1;const t=this.value[0];return this._mdcComponent.foundation.adapter.getMenuItemValues().indexOf(t)}),n.useDefaultValidation=!this.multiple,n.valid=!this.required||!this.multiple&&n.valid||this.multiple&&Array.isArray(this.value)&&this.value.length>0;const i=this.getSelectedTextValue();this._mdcComponent.foundation.adapter.setSelectedText(i),this._mdcComponent.foundation.adapter.floatLabel(!!i),this._menuObserver||(this._menuObserver=new IntersectionObserver(((t,e)=>{var n,i;t[0].target.style.minWidth!=(null===(n=t[0].target.parentElement)||void 0===n?void 0:n.clientWidth)+"px"&&(t[0].target.style.minWidth=(null===(i=t[0].target.parentElement)||void 0===i?void 0:i.clientWidth)+"px")})),this._menuObserver.observe(this.shadowRoot.getElementById("mdc-select-menu")));const r=void 0!==this.searchProvider,o=this.multiple;n.menu.menuSurface_.foundation.handleBodyClick=function(t){const e=t.composedPath()[0];if(this.adapter.isElementInContainer(e)){if(!r)return;if(e instanceof Element&&!e.className.includes("mdc-list-item"))return;if(o)return}n.menu.menuSurface_.close()};break;case Fr.RADIO:case Fr.CHECKBOX_LIST:case Fr.COLOUR:break;case Fr.BUTTON:case Fr.BUTTON_MOMENTARY:const a=!this.action&&!this.label,s=new on(t);a&&(s.unbounded=!0),this._mdcComponent=s;break;case Fr.BUTTON_TOGGLE:this._mdcComponent=new rr(t);break;case Fr.CHECKBOX:this._mdcComponent=new Fn(t);const l=this.shadowRoot.getElementById("field");if(l){const t=new Qi(l);t.input=this._mdcComponent,this._mdcComponent2=t}break;case Fr.SWITCH:this._mdcComponent=new jn(t);break;case Fr.RANGE:this._mdcComponent=new li(t);const c=this.shadowRoot.getElementById("number");if(c){const t=new Tn(c);t.useNativeValidation=!1,this._mdcComponent2=t}break;default:const d=new Tn(t);d.useNativeValidation=!1,this._mdcComponent=d}this._mdcComponent&&this.focused&&"function"==typeof this._mdcComponent.focus&&this._mdcComponent.focus()}}else{if(this.type===Fr.SELECT&&this._mdcComponent){t.has("options")&&this._mdcComponent.layoutOptions(),this._mdcComponent.disabled=!(!this.disabled&&!this.readonly),this._mdcComponent.useDefaultValidation=!this.multiple,this._mdcComponent.valid=!this.required||!this.multiple&&this._mdcComponent.valid||this.multiple&&Array.isArray(this.value)&&this.value.length>0;const e=this.getSelectedTextValue();this._mdcComponent.foundation.adapter.setSelectedText(e),this._mdcComponent.foundation.adapter.floatLabel(!!e)}else if(this.type===Fr.RANGE&&this._mdcComponent){const t=this._mdcComponent;t.setDisabled(this.disabled||this.readonly),t.setValue(this.value)}else if(this.type===Fr.SWITCH&&this._mdcComponent)this._mdcComponent.checked=this.value;else if(this.type===Fr.CHECKBOX&&this._mdcComponent){const t=this._mdcComponent;t.checked=!!this.value,t.disabled=!(!this.disabled&&!this.readonly)}this._mdcComponent&&(this._mdcComponent.required=!!this.required)}t.has("label")&&(null===(n=null===(e=this._mdcComponent)||void 0===e?void 0:e.layout)||void 0===n||n.call(e)),this.autoValidate&&this.reportValidity()}renderOutlined(t){return rt`
784
+ `}return n}}}return rt`<span>INPUT TYPE NOT IMPLEMENTED</span>`}_getFormat(){if(this.format)return this.format}update(t){if(t.has("autoValidate")&&this._mdcComponent){const t=this._mdcComponent;t.foundation&&t.foundation.setValidateOnValueChange&&t.foundation.setValidateOnValueChange(this.autoValidate)}super.update(t)}firstUpdated(t){super.firstUpdated(t),this.autoValidate&&this.reportValidity()}updated(t){var e,n;if(super.updated(t),t.has("type")){const t=this.shadowRoot.getElementById("component");if(this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0),this._mdcComponent2&&(this._mdcComponent2.destroy(),this._mdcComponent2=void 0),t&&this.type){switch(this.type){case Fr.LIST:const e=new Si(t);this._mdcComponent=e,e.selectedIndex=this._selectedIndex;break;case Fr.SELECT:const n=new Wi(t);this._mdcComponent=n,null!==this.value&&void 0!==this.value||(n.selectedIndex=-1),this.multiple&&(this._mdcComponent.foundation.adapter.getSelectedIndex=()=>{if(!Array.isArray(this.value)||0===this.value.length)return-1;const t=this.value[0];return this._mdcComponent.foundation.adapter.getMenuItemValues().indexOf(t)}),n.useDefaultValidation=!this.multiple,n.valid=!this.required||!this.multiple&&n.valid||this.multiple&&Array.isArray(this.value)&&this.value.length>0;const i=this.getSelectedTextValue();this._mdcComponent.foundation.adapter.setSelectedText(i),this._mdcComponent.foundation.adapter.floatLabel(!!i),this._menuObserver||(this._menuObserver=new IntersectionObserver(((t,e)=>{var n,i;t[0].target.style.minWidth!=(null===(n=t[0].target.parentElement)||void 0===n?void 0:n.clientWidth)+"px"&&(t[0].target.style.minWidth=(null===(i=t[0].target.parentElement)||void 0===i?void 0:i.clientWidth)+"px")})),this._menuObserver.observe(this.shadowRoot.getElementById("mdc-select-menu")));const r=void 0!==this.searchProvider,o=this.multiple;n.menu.menuSurface_.foundation.handleBodyClick=function(t){const e=t.composedPath()[0];if(this.adapter.isElementInContainer(e)){if(!r)return;if(e instanceof Element&&!e.className.includes("mdc-list-item"))return;if(o)return}n.menu.menuSurface_.close()};break;case Fr.RADIO:case Fr.CHECKBOX_LIST:case Fr.COLOUR:break;case Fr.BUTTON:case Fr.BUTTON_MOMENTARY:const a=!this.action&&!this.label,s=new on(t);a&&(s.unbounded=!0),this._mdcComponent=s;break;case Fr.BUTTON_TOGGLE:this._mdcComponent=new rr(t);break;case Fr.CHECKBOX:this._mdcComponent=new Fn(t);const l=this.shadowRoot.getElementById("field");if(l){const t=new Qi(l);t.input=this._mdcComponent,this._mdcComponent2=t}break;case Fr.SWITCH:this._mdcComponent=new jn(t);break;case Fr.RANGE:this._mdcComponent=new li(t);const c=this.shadowRoot.getElementById("number");if(c){const t=new Tn(c);t.useNativeValidation=!1,this._mdcComponent2=t}break;default:const d=new Tn(t);d.useNativeValidation=!1,this._mdcComponent=d}this._mdcComponent&&this.focused&&"function"==typeof this._mdcComponent.focus&&this._mdcComponent.focus()}}else{if(this.type===Fr.SELECT&&this._mdcComponent){t.has("options")&&this._mdcComponent.layoutOptions(),this._mdcComponent.disabled=!(!this.disabled&&!this.readonly),this._mdcComponent.useDefaultValidation=!this.multiple,this._mdcComponent.valid=!this.required||!this.multiple&&this._mdcComponent.valid||this.multiple&&Array.isArray(this.value)&&this.value.length>0;const e=this.getSelectedTextValue();this._mdcComponent.foundation.adapter.setSelectedText(e),this._mdcComponent.foundation.adapter.floatLabel(!!e)}else if(this.type===Fr.RANGE&&this._mdcComponent){const t=this._mdcComponent;t.setDisabled(this.disabled||this.readonly),t.setValue(this.value)}else if(this.type===Fr.SWITCH&&this._mdcComponent)this._mdcComponent.checked=this.value;else if(this.type===Fr.CHECKBOX&&this._mdcComponent){const t=this._mdcComponent;t.checked=!!this.value,t.disabled=!(!this.disabled&&!this.readonly)}this._mdcComponent&&(this._mdcComponent.required=!!this.required)}t.has("label")&&(null===(n=null===(e=this._mdcComponent)||void 0===e?void 0:e.layout)||void 0===n||n.call(e)),this.autoValidate&&this.reportValidity()}renderOutlined(t){return rt`
785
785
  <span class="mdc-notched-outline">
786
786
  <span class="mdc-notched-outline__leading"></span>
787
787
  ${t?rt`
package/dist/umd/index.js CHANGED
@@ -558,9 +558,9 @@
558
558
  .mdc-list-item__graphic > or-icon {
559
559
  pointer-events: none;
560
560
  }
561
- `;let Vr=class extends Ct{constructor(){super(...arguments),this.readonly=!1,this.required=!1,this.checked=!1,this.indeterminate=!1,this.multiple=!1,this.searchLabel="search",this.compact=!1,this.comfortable=!1,this.raised=!1,this.action=!1,this.unElevated=!1,this.outlined=!1,this.rounded=!1,this.disableSliderNumberInput=!1,this.fullWidth=!1,this.helperPersistent=!1,this.autoValidate=!1,this.charCounter=!1,this.disabled=!1,this.continuous=!1,this.resizeVertical=!1,this._selectedIndex=-1,this.isUiValid=!0}static get styles(){return[k`${w(kr)}`,k`${w(yr)}`,k`${w(wr)}`,k`${w(Er)}`,k`${w(Cr)}`,k`${w(Ar)}`,k`${w(Ir)}`,k`${w(Tr)}`,k`${w(Sr)}`,k`${w(Lr)}`,k`${w(Or)}`,k`${w(zr)}`,k`${w(Rr)}`,k`${w(Mr)}`,k`${w(Nr)}`,k`${w(Dr)}`,Hr]}get nativeValue(){if(this._mdcComponent)return this._mdcComponent.value}disconnectedCallback(){var t,e;super.disconnectedCallback(),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0,null===(t=this._menuObserver)||void 0===t||t.disconnect()),this._mdcComponent2&&(this._mdcComponent2.destroy(),this._mdcComponent2=void 0,null===(e=this._menuObserver)||void 0===e||e.disconnect())}shouldUpdate(t){return t.has("indeterminate")&&this._mdcComponent&&this.type===Br.CHECKBOX&&(this._mdcComponent.indeterminate=this.indeterminate),t.has("disabled")&&(this._mdcComponent&&(this._mdcComponent.disabled=this.disabled),this.type===Br.RANGE&&this._mdcComponent2&&(this._mdcComponent2.disabled=this.disabled)),t.has("readonly")&&(this._mdcComponent&&(this._mdcComponent.readonly=this.readonly),this.type===Br.RANGE&&this._mdcComponent2&&(this._mdcComponent2.readonly=this.readonly)),!this.type&&this.value&&(this.value instanceof Date?this.type=Br.DATETIME:"boolean"==typeof this.value?this.type=Br.CHECKBOX:"number"==typeof this.value?this.type=Br.NUMBER:"string"==typeof this.value?this.type=Br.TEXT:this.type=Br.JSON),!0}focus(){this.type===Br.RANGE&&this._mdcComponent2?this._mdcComponent2.focus():this._mdcComponent&&"function"==typeof this._mdcComponent.focus&&this._mdcComponent.focus()}render(){if(this.type){const t=!this.fullWidth&&this.label;let n=!this.fullWidth&&this.outlined,i=!!this.helperText;const r=!(this.isUiValid||!this.errorMessage&&!this.validationMessage),o={"mdc-text-field-helper-text--persistent":!r&&this.helperPersistent,"mdc-text-field-helper-text--validation-msg":r},a=null!==this.value&&void 0!==this.value||!1===this.value;let l=t?rt`<span class="mdc-floating-label ${a?"mdc-floating-label--float-above":""}" id="label">${this.label}</span>`:void 0;switch(this.type){case Br.RADIO:const t=this.resolveOptions(this.options);return this._selectedIndex=-1,rt`
561
+ `;let Vr=class extends Ct{constructor(){super(...arguments),this.readonly=!1,this.required=!1,this.checked=!1,this.indeterminate=!1,this.multiple=!1,this.searchLabel="search",this.compact=!1,this.comfortable=!1,this.raised=!1,this.action=!1,this.unElevated=!1,this.outlined=!1,this.rounded=!1,this.disableSliderNumberInput=!1,this.fullWidth=!1,this.helperPersistent=!1,this.autoValidate=!1,this.charCounter=!1,this.disabled=!1,this.continuous=!1,this.resizeVertical=!1,this._selectedIndex=-1,this.isUiValid=!0}static get styles(){return[k`${w(kr)}`,k`${w(yr)}`,k`${w(wr)}`,k`${w(Er)}`,k`${w(Cr)}`,k`${w(Ar)}`,k`${w(Ir)}`,k`${w(Tr)}`,k`${w(Sr)}`,k`${w(Lr)}`,k`${w(Or)}`,k`${w(zr)}`,k`${w(Rr)}`,k`${w(Mr)}`,k`${w(Nr)}`,k`${w(Dr)}`,Hr]}get nativeValue(){if(this._mdcComponent)return this._mdcComponent.value}disconnectedCallback(){var t,e;super.disconnectedCallback(),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0,null===(t=this._menuObserver)||void 0===t||t.disconnect()),this._mdcComponent2&&(this._mdcComponent2.destroy(),this._mdcComponent2=void 0,null===(e=this._menuObserver)||void 0===e||e.disconnect())}shouldUpdate(t){return t.has("indeterminate")&&this._mdcComponent&&this.type===Br.CHECKBOX&&(this._mdcComponent.indeterminate=this.indeterminate),t.has("disabled")&&(this._mdcComponent&&(this._mdcComponent.disabled=this.disabled),this.type===Br.RANGE&&this._mdcComponent2&&(this._mdcComponent2.disabled=this.disabled)),t.has("readonly")&&(this._mdcComponent&&(this._mdcComponent.readonly=this.readonly),this.type===Br.RANGE&&this._mdcComponent2&&(this._mdcComponent2.readonly=this.readonly)),!this.type&&this.value&&(this.value instanceof Date?this.type=Br.DATETIME:"boolean"==typeof this.value?this.type=Br.CHECKBOX:"number"==typeof this.value?this.type=Br.NUMBER:"string"==typeof this.value?this.type=Br.TEXT:this.type=Br.JSON),!0}focus(){this.type===Br.RANGE&&this._mdcComponent2?this._mdcComponent2.focus():this._mdcComponent&&"function"==typeof this._mdcComponent.focus&&this._mdcComponent.focus()}render(){var t;if(this.type){const n=!this.fullWidth&&this.label;let i=!this.fullWidth&&this.outlined,r=!!this.helperText;const o=!(this.isUiValid||!this.errorMessage&&!this.validationMessage),a={"mdc-text-field-helper-text--persistent":!o&&this.helperPersistent,"mdc-text-field-helper-text--validation-msg":o},l=null!==this.value&&void 0!==this.value||!1===this.value;let c=n?rt`<span class="mdc-floating-label ${l?"mdc-floating-label--float-above":""}" id="label">${this.label}</span>`:void 0;switch(this.type){case Br.RADIO:const n=this.resolveOptions(this.options);return this._selectedIndex=-1,rt`
562
562
  <div class="mdc-radio-container">
563
- ${t?t.map((([t,e],n)=>(this.value===t&&(this._selectedIndex=n),rt`
563
+ ${n?n.map((([t,e],n)=>(this.value===t&&(this._selectedIndex=n),rt`
564
564
  <div id="field" class="mdc-form-field">
565
565
  <div class="mdc-radio">
566
566
  <input type="radio"
@@ -583,10 +583,10 @@
583
583
 
584
584
  `))):""}
585
585
  </div>
586
- `;case Br.SWITCH:const c={"mdc-switch--disabled":this.disabled||this.readonly,"mdc-switch--full-width":this.fullWidth,"mdc-switch--checked":this.value};return rt`
586
+ `;case Br.SWITCH:const s={"mdc-switch--disabled":this.disabled||this.readonly,"mdc-switch--full-width":this.fullWidth,"mdc-switch--checked":this.value};return rt`
587
587
  <span id="wrapper">
588
588
  ${this.label?rt`<label for="elem" class="${this.disabled?"mdc-switch--disabled":""}">${this.label}</label>`:""}
589
- <div id="component" class="mdc-switch ${xe(c)}">
589
+ <div id="component" class="mdc-switch ${xe(s)}">
590
590
  <div class="mdc-switch__track"></div>
591
591
  <div class="mdc-switch__thumb-underlay">
592
592
  <div class="mdc-switch__thumb">
@@ -600,23 +600,23 @@
600
600
  </div>
601
601
  </div>
602
602
  </span>
603
- `;case Br.LIST:const s={"mdc-select--outlined":n,"mdc-select--disabled":this.disabled,"mdc-select--required":this.required,"mdc-select--dense":!1,"mdc-select--no-label":!this.label,"mdc-select--with-leading-icon":!!this.icon},d=this.resolveOptions(this.options);return this._selectedIndex=-1,rt`
604
- <div id="component" class="mdc-list mdc-select ${xe(s)}" @MDCList:action="${t=>this.onValueChange(void 0,-1===t.detail.index?void 0:Array.isArray(this.options[t.detail.index])?this.options[t.detail.index][0]:this.options[t.detail.index])}">
603
+ `;case Br.LIST:const d={"mdc-select--outlined":i,"mdc-select--disabled":this.disabled,"mdc-select--required":this.required,"mdc-select--dense":!1,"mdc-select--no-label":!this.label,"mdc-select--with-leading-icon":!!this.icon},p=this.resolveOptions(this.options);return this._selectedIndex=-1,rt`
604
+ <div id="component" class="mdc-list mdc-select ${xe(d)}" @MDCList:action="${t=>this.onValueChange(void 0,-1===t.detail.index?void 0:Array.isArray(this.options[t.detail.index])?this.options[t.detail.index][0]:this.options[t.detail.index])}">
605
605
  <ul class="mdc-list">
606
- ${d?d.map((([t,e],n)=>(this.value===t&&(this._selectedIndex=n),rt`<li class="${xe({"mdc-list-item":!0,"mdc-list-item--selected":this.value===t})}" role="option" data-value="${t}"><or-translate value="${e}"></or-translate></li>`))):""}
606
+ ${p?p.map((([t,e],n)=>(this.value===t&&(this._selectedIndex=n),rt`<li class="${xe({"mdc-list-item":!0,"mdc-list-item--selected":this.value===t})}" role="option" data-value="${t}"><or-translate value="${e}"></or-translate></li>`))):""}
607
607
  </ul>
608
608
  </div>
609
- `;case Br.SELECT:const p={"mdc-select--outlined":n,"mdc-select--filled":!n,"mdc-select--disabled":this.disabled||this.readonly,"mdc-select--required":this.required,"mdc-select--dense":!1,"dense-comfortable":this.comfortable,"mdc-select--no-label":!this.label,"mdc-select--with-leading-icon":!!this.icon,"or-mwc-input--rounded":this.rounded};let m;m=null!=this.searchProvider?this.searchProvider(this.searchableValue):this.resolveOptions(this.options);const u=(t,e)=>{var n;const i=e.value;if(this.multiple){t.stopPropagation();const e=null!==(n=this._tempValue)&&void 0!==n?n:Array.isArray(this.value)?[...this.value]:void 0!==this.value?[this.value]:[],r=e.findIndex((t=>t===i));r>=0?e.splice(r,1):e.push(i);const o=t.composedPath()[0].closest("li"),a=o.getElementsByTagName("or-icon")[0];o&&(r>=0?o.classList.remove("mdc-list-item--selected"):o.classList.add("mdc-list-item--selected")),a&&(a.icon=r>=0?"checkbox-blank-outline":"checkbox-marked"),this._tempValue=e}else null==this.searchProvider&&Array.isArray(m)||this.onValueChange(void 0,e.value)},h=()=>{var t;const e=null!==(t=this._tempValue)&&void 0!==t?t:this.value;if(window.setTimeout((()=>{this._mdcComponent&&this._mdcComponent.foundation.adapter.floatLabel(e&&(!Array.isArray(e)||e.length>0))})),!this._tempValue)return;const n=[...this._tempValue];this._tempValue=void 0,this.onValueChange(void 0,n)},f=t=>null==this.searchProvider||t&&0!=t.length?fr(this.multiple?ur.MULTI_TICK:ur.SELECT,rt`${null==t?void 0:t.map((([t,e],n)=>gr({text:e,value:t},n,Array.isArray(this.value)?this.value:this.value?[this.value]:[],this.multiple?ur.MULTI_TICK:ur.SELECT,!1,u)))}`,!1,void 0):rt`<span class="mdc-text-field-helper-line" style="margin: 8px 8px 8px 0;">${cr.i18next.t("noResults")}</span>`;return rt`
609
+ `;case Br.SELECT:const m={"mdc-select--outlined":i,"mdc-select--filled":!i,"mdc-select--disabled":this.disabled||this.readonly,"mdc-select--required":this.required,"mdc-select--dense":!1,"dense-comfortable":this.comfortable,"mdc-select--no-label":!this.label,"mdc-select--with-leading-icon":!!this.icon,"or-mwc-input--rounded":this.rounded};let u;u=null!=this.searchProvider?this.searchProvider(this.searchableValue):this.resolveOptions(this.options);const h=(t,e)=>{var n;const i=e.value;if(this.multiple){t.stopPropagation();const e=null!==(n=this._tempValue)&&void 0!==n?n:Array.isArray(this.value)?[...this.value]:void 0!==this.value?[this.value]:[],r=e.findIndex((t=>t===i));r>=0?e.splice(r,1):e.push(i);const o=t.composedPath()[0].closest("li"),a=o.getElementsByTagName("or-icon")[0];o&&(r>=0?o.classList.remove("mdc-list-item--selected"):o.classList.add("mdc-list-item--selected")),a&&(a.icon=r>=0?"checkbox-blank-outline":"checkbox-marked"),this._tempValue=e}else null==this.searchProvider&&Array.isArray(u)||this.onValueChange(void 0,e.value)},f=()=>{var t;const e=null!==(t=this._tempValue)&&void 0!==t?t:this.value;if(window.setTimeout((()=>{this._mdcComponent&&this._mdcComponent.foundation.adapter.floatLabel(e&&(!Array.isArray(e)||e.length>0))})),!this._tempValue)return;const n=[...this._tempValue];this._tempValue=void 0,this.onValueChange(void 0,n)},g=t=>null==this.searchProvider||t&&0!=t.length?fr(this.multiple?ur.MULTI_TICK:ur.SELECT,rt`${null==t?void 0:t.map((([t,e],n)=>gr({text:e,value:t},n,Array.isArray(this.value)?this.value:this.value?[this.value]:[],this.multiple?ur.MULTI_TICK:ur.SELECT,!1,h)))}`,!1,void 0):rt`<span class="mdc-text-field-helper-line" style="margin: 8px 8px 8px 0;">${cr.i18next.t("noResults")}</span>`;return rt`
610
610
  <div id="component"
611
- class="mdc-select ${xe(p)}"
612
- @MDCSelect:change="${t=>xr(this,void 0,void 0,(function*(){const e=Array.isArray(m)?m:yield m;this.onValueChange(void 0,-1===t.detail.index?void 0:Array.isArray(e[t.detail.index])?e[t.detail.index][0]:e[t.detail.index])}))}">
611
+ class="mdc-select ${xe(m)}"
612
+ @MDCSelect:change="${t=>xr(this,void 0,void 0,(function*(){const e=Array.isArray(u)?u:yield u;this.onValueChange(void 0,-1===t.detail.index?void 0:Array.isArray(e[t.detail.index])?e[t.detail.index][0]:e[t.detail.index])}))}">
613
613
  <div class="mdc-select__anchor" role="button"
614
614
  aria-haspopup="listbox"
615
615
  aria-expanded="false"
616
616
  aria-disabled="${""+(this.disabled||this.readonly)}"
617
617
  aria-labelledby="label selected-text">
618
- ${n?void 0:rt`<span class="mdc-select__ripple"></span>`}
619
- ${n?this.renderOutlined(l):l}
618
+ ${i?void 0:rt`<span class="mdc-select__ripple"></span>`}
619
+ ${i?this.renderOutlined(c):c}
620
620
  <span class="mdc-select__selected-text-container">
621
621
  <span id="selected-text" class="mdc-select__selected-text"></span>
622
622
  </span>
@@ -638,9 +638,9 @@
638
638
  </polygon>
639
639
  </svg>
640
640
  </span>
641
- ${n?"":rt`<div class="mdc-line-ripple"></div>`}
641
+ ${i?"":rt`<div class="mdc-line-ripple"></div>`}
642
642
  </div>
643
- <div id="mdc-select-menu" class="mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fixed ${null!=this.searchProvider?"mdc-menu__searchable":void 0}" @MDCMenuSurface:closed="${h}">
643
+ <div id="mdc-select-menu" class="mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fixed ${null!=this.searchProvider?"mdc-menu__searchable":void 0}" @MDCMenuSurface:closed="${f}">
644
644
  ${we(null!=this.searchProvider,(()=>rt`
645
645
  <label id="select-searchable" class="mdc-text-field mdc-text-field--filled">
646
646
  <span class="mdc-floating-label" style="color: rgba(0, 0, 0, 0.6); text-transform: capitalize; visibility: ${this.searchableValue?"hidden":"visible"}" id="my-label-id">
@@ -651,11 +651,11 @@
651
651
  />
652
652
  </label>
653
653
  `))}
654
- ${we(Array.isArray(m),(()=>f(m)),(()=>Ie(new Promise((t=>xr(this,void 0,void 0,(function*(){t(f(yield m))})))),rt`<span class="mdc-text-field-helper-line" style="margin: 8px 8px 8px 0;">${cr.i18next.t("loading")}</span>`)))}
654
+ ${we(Array.isArray(u),(()=>g(u)),(()=>Ie(new Promise((t=>xr(this,void 0,void 0,(function*(){t(g(yield u))})))),rt`<span class="mdc-text-field-helper-line" style="margin: 8px 8px 8px 0;">${cr.i18next.t("loading")}</span>`)))}
655
655
  </div>
656
- ${i||r?rt`
657
- <p id="component-helper-text" class="mdc-select-helper-text ${xe(o)}" aria-hidden="true">
658
- ${r?this.errorMessage||this.validationMessage:this.helperText}
656
+ ${r||o?rt`
657
+ <p id="component-helper-text" class="mdc-select-helper-text ${xe(a)}" aria-hidden="true">
658
+ ${o?this.errorMessage||this.validationMessage:this.helperText}
659
659
  </p>`:""}
660
660
  </div>
661
661
  `;case Br.BUTTON_TOGGLE:return rt`
@@ -677,9 +677,9 @@
677
677
  ${this.label?rt`<span class="${this.action?"mdc-fab__label":"mdc-button__label"}"><or-translate .value="${this.label}"></or-translate></span>`:""}
678
678
  ${!r&&this.iconTrailing?rt`<or-icon class="${this.action?"mdc-fab__icon":"mdc-button__icon"}" aria-hidden="true" icon="${this.iconTrailing}"></or-icon>`:""}
679
679
  </button>
680
- `}case Br.CHECKBOX_LIST:Array.isArray(this.value)||(null===this.value||void 0===this.value?this.value=[]:this.value=[this.value]);const g=this.resolveOptions(this.options);return this._selectedIndex=-1,rt`
680
+ `}case Br.CHECKBOX_LIST:Array.isArray(this.value)||(null===this.value||void 0===this.value?this.value=[]:this.value=[this.value]);const b=this.resolveOptions(this.options);return this._selectedIndex=-1,rt`
681
681
  <div class="mdc-checkbox-list">
682
- ${g?g.map((([t,e],n)=>(this.value===t&&(this._selectedIndex=n),rt`
682
+ ${b?b.map((([t,e],n)=>(this.value===t&&(this._selectedIndex=n),rt`
683
683
  <div id="field" class="mdc-form-field">
684
684
  <div id="component" class="mdc-checkbox">
685
685
  <input type="checkbox"
@@ -697,9 +697,9 @@
697
697
 
698
698
  `))):""}
699
699
  </div>
700
- `;case Br.CHECKBOX:let b={"mdc-checkbox":!0,"mdc-checkbox--disabled":this.disabled||this.readonly};return rt`
700
+ `;case Br.CHECKBOX:let v={"mdc-checkbox":!0,"mdc-checkbox--disabled":this.disabled||this.readonly};return rt`
701
701
  <div id="field" class="mdc-form-field">
702
- <div id="component" class="${xe(b)}">
702
+ <div id="component" class="${xe(v)}">
703
703
  <input type="checkbox"
704
704
  id="elem"
705
705
  data-indeterminate="${this.indeterminate}"
@@ -727,41 +727,41 @@
727
727
  />
728
728
  <label style="margin-left: 10px; cursor: pointer" for="elem">${this.label}</label>
729
729
  </div>
730
- `;case Br.NUMBER:case Br.RANGE:case Br.DATE:case Br.DATETIME:case Br.TIME:case Br.MONTH:case Br.WEEK:case Br.EMAIL:case Br.PASSWORD:case Br.TELEPHONE:case Br.URL:case Br.TEXT:case Br.TEXTAREA:case Br.JSON:case Br.JSON_OBJECT:{let t,c=[void 0===this.value||null===this.value?void 0:this.value,this.min,this.max];if(c.some((t=>"string"!=typeof t)))if(this.type===Br.JSON||this.type===Br.JSON_OBJECT)if(void 0!==c[0]){if("string"!=typeof c[0]||null===c[0])try{c[0]=JSON.stringify(c[0],null,2)}catch(t){console.warn("Failed to parse JSON expression for input control"),c[0]=""}}else c[0]="";else{const t=this.format?Object.assign({},this.format):{};switch(this.type){case Br.TIME:t.asDate=!0,t.hour12=!1,t.timeStyle=this.step&&this.step<60?"medium":"short";break;case Br.DATE:t.asDate=!0,t.momentJsFormat="YYYY-MM-DD";break;case Br.WEEK:t.asDate=!0,t.momentJsFormat="YYYY-[W]WW";break;case Br.MONTH:t.asDate=!0,t.momentJsFormat="YYYY-MM";break;case Br.DATETIME:t.asDate=!0,t.momentJsFormat="YYYY-MM-DDTHH:mm";break;case Br.NUMBER:t.maximumFractionDigits=20}t.useGrouping=!1,c=c.map((n=>void 0!==n?e.Util.getValueAsString(n,(()=>t),"en-GB"):void 0))}let s=this.label,d=this.type,p="component";if(this.type===Br.RANGE&&(s=void 0,n=!1,i=!1,d=Br.NUMBER,p="number"),this.type!==Br.RANGE||!this.disableSliderNumberInput){const e={"mdc-text-field":!0,"mdc-text-field--invalid":!this.valid,"mdc-text-field--filled":!n,"mdc-text-field--outlined":n,"mdc-text-field--textarea":d===Br.TEXTAREA||d===Br.JSON||d===Br.JSON_OBJECT,"mdc-text-field--disabled":this.disabled,"mdc-text-field--fullwidth":this.fullWidth&&!n,"dense-comfortable":this.comfortable&&!(d===Br.TEXTAREA||d===Br.JSON||d===Br.JSON_OBJECT),"dense-compact":!this.comfortable&&this.compact,"mdc-text-field--label-floating":a,"mdc-text-field--no-label":!this.label,"mdc-text-field--with-leading-icon":!!this.icon,"mdc-text-field--with-trailing-icon":!!this.iconTrailing,"or-mwc-input--rounded":this.rounded};t=d===Br.TEXTAREA||d===Br.JSON||d===Br.JSON_OBJECT?rt`
730
+ `;case Br.NUMBER:case Br.RANGE:case Br.DATE:case Br.DATETIME:case Br.TIME:case Br.MONTH:case Br.WEEK:case Br.EMAIL:case Br.PASSWORD:case Br.TELEPHONE:case Br.URL:case Br.TEXT:case Br.TEXTAREA:case Br.JSON:case Br.JSON_OBJECT:{let n,s=[void 0===this.value||null===this.value?void 0:this.value,this.min,this.max];if(s.some((t=>"string"!=typeof t)))if(this.type===Br.JSON||this.type===Br.JSON_OBJECT)if(void 0!==s[0]){if("string"!=typeof s[0]||null===s[0])try{s[0]=JSON.stringify(s[0],null,2)}catch(t){console.warn("Failed to parse JSON expression for input control"),s[0]=""}}else s[0]="";else{const n=this.format?Object.assign({},this.format):{};switch(this.type){case Br.TIME:n.asDate=!0,n.hour12=!1,n.timeStyle=this.step&&this.step<60?"medium":"short";break;case Br.DATE:n.asDate=!0,n.momentJsFormat="YYYY-MM-DD";break;case Br.WEEK:n.asDate=!0,n.momentJsFormat="YYYY-[W]WW";break;case Br.MONTH:n.asDate=!0,n.momentJsFormat="YYYY-MM";break;case Br.DATETIME:n.asDate=!0,n.momentJsFormat="YYYY-MM-DDTHH:mm";break;case Br.NUMBER:null!==(t=n.maximumFractionDigits)&&void 0!==t||(n.maximumFractionDigits=20)}n.useGrouping=!1,s=s.map((t=>void 0!==t?e.Util.getValueAsString(t,(()=>n),"en-GB"):void 0))}let d=this.label,p=this.type,m="component";if(this.type===Br.RANGE&&(d=void 0,i=!1,r=!1,p=Br.NUMBER,m="number"),this.type!==Br.RANGE||!this.disableSliderNumberInput){const t={"mdc-text-field":!0,"mdc-text-field--invalid":!this.valid,"mdc-text-field--filled":!i,"mdc-text-field--outlined":i,"mdc-text-field--textarea":p===Br.TEXTAREA||p===Br.JSON||p===Br.JSON_OBJECT,"mdc-text-field--disabled":this.disabled,"mdc-text-field--fullwidth":this.fullWidth&&!i,"dense-comfortable":this.comfortable&&!(p===Br.TEXTAREA||p===Br.JSON||p===Br.JSON_OBJECT),"dense-compact":!this.comfortable&&this.compact,"mdc-text-field--label-floating":l,"mdc-text-field--no-label":!this.label,"mdc-text-field--with-leading-icon":!!this.icon,"mdc-text-field--with-trailing-icon":!!this.iconTrailing,"or-mwc-input--rounded":this.rounded};n=p===Br.TEXTAREA||p===Br.JSON||p===Br.JSON_OBJECT?rt`
731
731
  <textarea id="elem" class="mdc-text-field__input ${this.resizeVertical?"resize-vertical":""}" ?required="${this.required}"
732
732
  ?readonly="${this.readonly}" ?disabled="${this.disabled}" minlength="${ye(this.minLength)}"
733
733
  maxlength="${ye(this.maxLength)}" rows="${this.rows?this.rows:5}"
734
- cols="${ye(this.cols)}" aria-label="${ye(s)}"
735
- aria-labelledby="${ye(s?"label":void 0)}"
736
- @change="${t=>this.onValueChange(t.target,t.target.value)}">${c[0]?c[0]:""}</textarea>`:rt`
737
- <input type="${d}" id="elem" aria-labelledby="${ye(s?"label":void 0)}"
734
+ cols="${ye(this.cols)}" aria-label="${ye(d)}"
735
+ aria-labelledby="${ye(d?"label":void 0)}"
736
+ @change="${t=>this.onValueChange(t.target,t.target.value)}">${s[0]?s[0]:""}</textarea>`:rt`
737
+ <input type="${p}" id="elem" aria-labelledby="${ye(d?"label":void 0)}"
738
738
  class="mdc-text-field__input" ?required="${this.required}" ?readonly="${this.readonly}"
739
- ?disabled="${this.disabled}" min="${ye(c[1])}" max="${ye(c[2])}"
739
+ ?disabled="${this.disabled}" min="${ye(s[1])}" max="${ye(s[2])}"
740
740
  step="${this.step?this.step:"any"}" minlength="${ye(this.minLength)}" pattern="${ye(this.pattern)}"
741
741
  maxlength="${ye(this.maxLength)}" placeholder="${ye(this.placeHolder)}"
742
- .value="${null!==c[0]&&void 0!==c[0]?c[0]:""}"
742
+ .value="${null!==s[0]&&void 0!==s[0]?s[0]:""}"
743
743
  @keydown="${t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||this.onValueChange(t.target,t.target.value,!0)}}"
744
744
  @blur="${t=>{""===t.target.value&&this.reportValidity()}}"
745
- @change="${t=>this.onValueChange(t.target,t.target.value)}" />`,t=rt`
746
- <label id="${p}" class="${xe(e)}">
745
+ @change="${t=>this.onValueChange(t.target,t.target.value)}" />`,n=rt`
746
+ <label id="${m}" class="${xe(t)}">
747
747
  ${this.icon?rt`<or-icon class="mdc-text-field__icon mdc-text-field__icon--leading" style="color: ${this.iconColor?"#"+this.iconColor:"unset"}" aria-hidden="true" icon="${this.icon}"></or-icon>`:""}
748
- ${n?"":rt`<span class="mdc-text-field__ripple"></span>`}
749
- ${t}
750
- ${n?this.renderOutlined(l):l}
751
- ${n?"":rt`<span class="mdc-line-ripple"></span>`}
748
+ ${i?"":rt`<span class="mdc-text-field__ripple"></span>`}
749
+ ${n}
750
+ ${i?this.renderOutlined(c):c}
751
+ ${i?"":rt`<span class="mdc-line-ripple"></span>`}
752
752
  ${this.iconTrailing?rt`<or-icon class="mdc-text-field__icon mdc-text-field__icon--trailing" aria-hidden="true" icon="${this.iconTrailing}"></or-icon>`:""}
753
753
  </label>
754
- ${i||r?rt`
754
+ ${r||o?rt`
755
755
  <div class="mdc-text-field-helper-line">
756
- <div class="mdc-text-field-helper-text ${xe(o)}">${r?this.errorMessage||this.validationMessage:this.helperText}</div>
756
+ <div class="mdc-text-field-helper-text ${xe(a)}">${o?this.errorMessage||this.validationMessage:this.helperText}</div>
757
757
  ${this.charCounter&&!this.readonly?rt`<div class="mdc-text-field-character-counter"></div>`:""}
758
758
  </div>
759
759
  `:""}
760
- `}if(this.type===Br.RANGE){const e={"mdc-slider":!0,"mdc-slider--range":this.continuous,"mdc-slider--discreet":!this.continuous,"mdc-slider--disabled":this.disabled||this.readonly};t=rt`
760
+ `}if(this.type===Br.RANGE){const t={"mdc-slider":!0,"mdc-slider--range":this.continuous,"mdc-slider--discreet":!this.continuous,"mdc-slider--disabled":this.disabled||this.readonly};n=rt`
761
761
  <span id="wrapper">
762
762
  ${this.label?rt`<label for="component" class="${this.disabled?"mdc-switch--disabled":""}">${this.label}</label>`:""}
763
- <div id="component" class="${xe(e)}" @MDCSlider:change="${t=>this.onValueChange(void 0,t.detail.value)}">
764
- <input id="elem" class="mdc-slider__input" type="range" min="${ye(c[1])}" max="${ye(c[2])}" value="${c[0]||c[1]||0}" name="slider" step="${this.step||1}" ?readonly="${this.readonly}" ?disabled="${this.disabled}" aria-label="${ye(this.label)}" />
763
+ <div id="component" class="${xe(t)}" @MDCSlider:change="${t=>this.onValueChange(void 0,t.detail.value)}">
764
+ <input id="elem" class="mdc-slider__input" type="range" min="${ye(s[1])}" max="${ye(s[2])}" value="${s[0]||s[1]||0}" name="slider" step="${this.step||1}" ?readonly="${this.readonly}" ?disabled="${this.disabled}" aria-label="${ye(this.label)}" />
765
765
  <div class="mdc-slider__track">
766
766
  <div class="mdc-slider__track--inactive"></div>
767
767
  <div class="mdc-slider__track--active">
@@ -779,9 +779,9 @@
779
779
  <div class="mdc-slider__thumb-knob"></div>
780
780
  </div>
781
781
  </div>
782
- ${t?rt`<div style="min-width: 70px; width: 70px;">${t}</div>`:""}
782
+ ${n?rt`<div style="min-width: 70px; width: 70px;">${n}</div>`:""}
783
783
  </span>
784
- `}return t}}}return rt`<span>INPUT TYPE NOT IMPLEMENTED</span>`}_getFormat(){if(this.format)return this.format}update(t){if(t.has("autoValidate")&&this._mdcComponent){const t=this._mdcComponent;t.foundation&&t.foundation.setValidateOnValueChange&&t.foundation.setValidateOnValueChange(this.autoValidate)}super.update(t)}firstUpdated(t){super.firstUpdated(t),this.autoValidate&&this.reportValidity()}updated(t){var e,n;if(super.updated(t),t.has("type")){const t=this.shadowRoot.getElementById("component");if(this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0),this._mdcComponent2&&(this._mdcComponent2.destroy(),this._mdcComponent2=void 0),t&&this.type){switch(this.type){case Br.LIST:const e=new Si(t);this._mdcComponent=e,e.selectedIndex=this._selectedIndex;break;case Br.SELECT:const n=new Ki(t);this._mdcComponent=n,null!==this.value&&void 0!==this.value||(n.selectedIndex=-1),this.multiple&&(this._mdcComponent.foundation.adapter.getSelectedIndex=()=>{if(!Array.isArray(this.value)||0===this.value.length)return-1;const t=this.value[0];return this._mdcComponent.foundation.adapter.getMenuItemValues().indexOf(t)}),n.useDefaultValidation=!this.multiple,n.valid=!this.required||!this.multiple&&n.valid||this.multiple&&Array.isArray(this.value)&&this.value.length>0;const i=this.getSelectedTextValue();this._mdcComponent.foundation.adapter.setSelectedText(i),this._mdcComponent.foundation.adapter.floatLabel(!!i),this._menuObserver||(this._menuObserver=new IntersectionObserver(((t,e)=>{var n,i;t[0].target.style.minWidth!=(null===(n=t[0].target.parentElement)||void 0===n?void 0:n.clientWidth)+"px"&&(t[0].target.style.minWidth=(null===(i=t[0].target.parentElement)||void 0===i?void 0:i.clientWidth)+"px")})),this._menuObserver.observe(this.shadowRoot.getElementById("mdc-select-menu")));const r=void 0!==this.searchProvider,o=this.multiple;n.menu.menuSurface_.foundation.handleBodyClick=function(t){const e=t.composedPath()[0];if(this.adapter.isElementInContainer(e)){if(!r)return;if(e instanceof Element&&!e.className.includes("mdc-list-item"))return;if(o)return}n.menu.menuSurface_.close()};break;case Br.RADIO:case Br.CHECKBOX_LIST:case Br.COLOUR:break;case Br.BUTTON:case Br.BUTTON_MOMENTARY:const a=!this.action&&!this.label,l=new on(t);a&&(l.unbounded=!0),this._mdcComponent=l;break;case Br.BUTTON_TOGGLE:this._mdcComponent=new rr(t);break;case Br.CHECKBOX:this._mdcComponent=new Bn(t);const c=this.shadowRoot.getElementById("field");if(c){const t=new Qi(c);t.input=this._mdcComponent,this._mdcComponent2=t}break;case Br.SWITCH:this._mdcComponent=new Xn(t);break;case Br.RANGE:this._mdcComponent=new ci(t);const s=this.shadowRoot.getElementById("number");if(s){const t=new In(s);t.useNativeValidation=!1,this._mdcComponent2=t}break;default:const d=new In(t);d.useNativeValidation=!1,this._mdcComponent=d}this._mdcComponent&&this.focused&&"function"==typeof this._mdcComponent.focus&&this._mdcComponent.focus()}}else{if(this.type===Br.SELECT&&this._mdcComponent){t.has("options")&&this._mdcComponent.layoutOptions(),this._mdcComponent.disabled=!(!this.disabled&&!this.readonly),this._mdcComponent.useDefaultValidation=!this.multiple,this._mdcComponent.valid=!this.required||!this.multiple&&this._mdcComponent.valid||this.multiple&&Array.isArray(this.value)&&this.value.length>0;const e=this.getSelectedTextValue();this._mdcComponent.foundation.adapter.setSelectedText(e),this._mdcComponent.foundation.adapter.floatLabel(!!e)}else if(this.type===Br.RANGE&&this._mdcComponent){const t=this._mdcComponent;t.setDisabled(this.disabled||this.readonly),t.setValue(this.value)}else if(this.type===Br.SWITCH&&this._mdcComponent)this._mdcComponent.checked=this.value;else if(this.type===Br.CHECKBOX&&this._mdcComponent){const t=this._mdcComponent;t.checked=!!this.value,t.disabled=!(!this.disabled&&!this.readonly)}this._mdcComponent&&(this._mdcComponent.required=!!this.required)}t.has("label")&&(null===(n=null===(e=this._mdcComponent)||void 0===e?void 0:e.layout)||void 0===n||n.call(e)),this.autoValidate&&this.reportValidity()}renderOutlined(t){return rt`
784
+ `}return n}}}return rt`<span>INPUT TYPE NOT IMPLEMENTED</span>`}_getFormat(){if(this.format)return this.format}update(t){if(t.has("autoValidate")&&this._mdcComponent){const t=this._mdcComponent;t.foundation&&t.foundation.setValidateOnValueChange&&t.foundation.setValidateOnValueChange(this.autoValidate)}super.update(t)}firstUpdated(t){super.firstUpdated(t),this.autoValidate&&this.reportValidity()}updated(t){var e,n;if(super.updated(t),t.has("type")){const t=this.shadowRoot.getElementById("component");if(this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0),this._mdcComponent2&&(this._mdcComponent2.destroy(),this._mdcComponent2=void 0),t&&this.type){switch(this.type){case Br.LIST:const e=new Si(t);this._mdcComponent=e,e.selectedIndex=this._selectedIndex;break;case Br.SELECT:const n=new Ki(t);this._mdcComponent=n,null!==this.value&&void 0!==this.value||(n.selectedIndex=-1),this.multiple&&(this._mdcComponent.foundation.adapter.getSelectedIndex=()=>{if(!Array.isArray(this.value)||0===this.value.length)return-1;const t=this.value[0];return this._mdcComponent.foundation.adapter.getMenuItemValues().indexOf(t)}),n.useDefaultValidation=!this.multiple,n.valid=!this.required||!this.multiple&&n.valid||this.multiple&&Array.isArray(this.value)&&this.value.length>0;const i=this.getSelectedTextValue();this._mdcComponent.foundation.adapter.setSelectedText(i),this._mdcComponent.foundation.adapter.floatLabel(!!i),this._menuObserver||(this._menuObserver=new IntersectionObserver(((t,e)=>{var n,i;t[0].target.style.minWidth!=(null===(n=t[0].target.parentElement)||void 0===n?void 0:n.clientWidth)+"px"&&(t[0].target.style.minWidth=(null===(i=t[0].target.parentElement)||void 0===i?void 0:i.clientWidth)+"px")})),this._menuObserver.observe(this.shadowRoot.getElementById("mdc-select-menu")));const r=void 0!==this.searchProvider,o=this.multiple;n.menu.menuSurface_.foundation.handleBodyClick=function(t){const e=t.composedPath()[0];if(this.adapter.isElementInContainer(e)){if(!r)return;if(e instanceof Element&&!e.className.includes("mdc-list-item"))return;if(o)return}n.menu.menuSurface_.close()};break;case Br.RADIO:case Br.CHECKBOX_LIST:case Br.COLOUR:break;case Br.BUTTON:case Br.BUTTON_MOMENTARY:const a=!this.action&&!this.label,l=new on(t);a&&(l.unbounded=!0),this._mdcComponent=l;break;case Br.BUTTON_TOGGLE:this._mdcComponent=new rr(t);break;case Br.CHECKBOX:this._mdcComponent=new Bn(t);const c=this.shadowRoot.getElementById("field");if(c){const t=new Qi(c);t.input=this._mdcComponent,this._mdcComponent2=t}break;case Br.SWITCH:this._mdcComponent=new Xn(t);break;case Br.RANGE:this._mdcComponent=new ci(t);const s=this.shadowRoot.getElementById("number");if(s){const t=new In(s);t.useNativeValidation=!1,this._mdcComponent2=t}break;default:const d=new In(t);d.useNativeValidation=!1,this._mdcComponent=d}this._mdcComponent&&this.focused&&"function"==typeof this._mdcComponent.focus&&this._mdcComponent.focus()}}else{if(this.type===Br.SELECT&&this._mdcComponent){t.has("options")&&this._mdcComponent.layoutOptions(),this._mdcComponent.disabled=!(!this.disabled&&!this.readonly),this._mdcComponent.useDefaultValidation=!this.multiple,this._mdcComponent.valid=!this.required||!this.multiple&&this._mdcComponent.valid||this.multiple&&Array.isArray(this.value)&&this.value.length>0;const e=this.getSelectedTextValue();this._mdcComponent.foundation.adapter.setSelectedText(e),this._mdcComponent.foundation.adapter.floatLabel(!!e)}else if(this.type===Br.RANGE&&this._mdcComponent){const t=this._mdcComponent;t.setDisabled(this.disabled||this.readonly),t.setValue(this.value)}else if(this.type===Br.SWITCH&&this._mdcComponent)this._mdcComponent.checked=this.value;else if(this.type===Br.CHECKBOX&&this._mdcComponent){const t=this._mdcComponent;t.checked=!!this.value,t.disabled=!(!this.disabled&&!this.readonly)}this._mdcComponent&&(this._mdcComponent.required=!!this.required)}t.has("label")&&(null===(n=null===(e=this._mdcComponent)||void 0===e?void 0:e.layout)||void 0===n||n.call(e)),this.autoValidate&&this.reportValidity()}renderOutlined(t){return rt`
785
785
  <span class="mdc-notched-outline">
786
786
  <span class="mdc-notched-outline__leading"></span>
787
787
  ${t?rt`