@openremote/or-json-forms 1.6.2 → 1.6.3

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/umd/index.js CHANGED
@@ -266,7 +266,7 @@
266
266
  .mdc-list-item__graphic > or-icon {
267
267
  pointer-events: none;
268
268
  }
269
- `;let xs=class extends Ce{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[ue`${de(ns)}`,ue`${de(es)}`,ue`${de(ts)}`,ue`${de(is)}`,ue`${de(rs)}`,ue`${de(os)}`,ue`${de(as)}`,ue`${de(ss)}`,ue`${de(ls)}`,ue`${de(cs)}`,ue`${de(ds)}`,ue`${de(us)}`,ue`${de(ps)}`,ue`${de(ms)}`,ue`${de(hs)}`,ue`${de(fs)}`,ys]}get nativeValue(){if(this._mdcComponent)return this._mdcComponent.value}disconnectedCallback(){var e,t;super.disconnectedCallback(),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0,null===(e=this._menuObserver)||void 0===e||e.disconnect()),this._mdcComponent2&&(this._mdcComponent2.destroy(),this._mdcComponent2=void 0,null===(t=this._menuObserver)||void 0===t||t.disconnect())}shouldUpdate(e){return e.has("indeterminate")&&this._mdcComponent&&this.type===bs.CHECKBOX&&(this._mdcComponent.indeterminate=this.indeterminate),e.has("disabled")&&(this._mdcComponent&&(this._mdcComponent.disabled=this.disabled),this.type===bs.RANGE&&this._mdcComponent2&&(this._mdcComponent2.disabled=this.disabled)),e.has("readonly")&&(this._mdcComponent&&(this._mdcComponent.readonly=this.readonly),this.type===bs.RANGE&&this._mdcComponent2&&(this._mdcComponent2.readonly=this.readonly)),!this.type&&this.value&&(this.value instanceof Date?this.type=bs.DATETIME:"boolean"==typeof this.value?this.type=bs.CHECKBOX:"number"==typeof this.value?this.type=bs.NUMBER:"string"==typeof this.value?this.type=bs.TEXT:this.type=bs.JSON),!0}focus(){this.type===bs.RANGE&&this._mdcComponent2?this._mdcComponent2.focus():this._mdcComponent&&"function"==typeof this._mdcComponent.focus&&this._mdcComponent.focus()}render(){var e;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?F`<span class="mdc-floating-label ${a?"mdc-floating-label--float-above":""}" id="label">${this.label}</span>`:void 0;switch(this.type){case bs.RADIO:const t=this.resolveOptions(this.options);return this._selectedIndex=-1,F`
269
+ `;let xs=class extends Ce{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.censored=!1,this.advertised=!1,this._selectedIndex=-1,this.isUiValid=!0}static get styles(){return[ue`${de(ns)}`,ue`${de(es)}`,ue`${de(ts)}`,ue`${de(is)}`,ue`${de(rs)}`,ue`${de(os)}`,ue`${de(as)}`,ue`${de(ss)}`,ue`${de(ls)}`,ue`${de(cs)}`,ue`${de(ds)}`,ue`${de(us)}`,ue`${de(ps)}`,ue`${de(ms)}`,ue`${de(hs)}`,ue`${de(fs)}`,ys]}get nativeValue(){if(this._mdcComponent)return this._mdcComponent.value}disconnectedCallback(){var e,t;super.disconnectedCallback(),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0,null===(e=this._menuObserver)||void 0===e||e.disconnect()),this._mdcComponent2&&(this._mdcComponent2.destroy(),this._mdcComponent2=void 0,null===(t=this._menuObserver)||void 0===t||t.disconnect())}shouldUpdate(e){return e.has("indeterminate")&&this._mdcComponent&&this.type===bs.CHECKBOX&&(this._mdcComponent.indeterminate=this.indeterminate),e.has("disabled")&&(this._mdcComponent&&(this._mdcComponent.disabled=this.disabled),this.type===bs.RANGE&&this._mdcComponent2&&(this._mdcComponent2.disabled=this.disabled)),e.has("readonly")&&(this._mdcComponent&&(this._mdcComponent.readonly=this.readonly),this.type===bs.RANGE&&this._mdcComponent2&&(this._mdcComponent2.readonly=this.readonly)),!this.type&&this.value&&(this.value instanceof Date?this.type=bs.DATETIME:"boolean"==typeof this.value?this.type=bs.CHECKBOX:"number"==typeof this.value?this.type=bs.NUMBER:"string"==typeof this.value?this.type=bs.TEXT:this.type=bs.JSON),!0}focus(){this.type===bs.RANGE&&this._mdcComponent2?this._mdcComponent2.focus():this._mdcComponent&&"function"==typeof this._mdcComponent.focus&&this._mdcComponent.focus()}render(){var e;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?F`<span class="mdc-floating-label ${a?"mdc-floating-label--float-above":""}" id="label">${this.label}</span>`:void 0;switch(this.type){case bs.RADIO:const t=this.resolveOptions(this.options);return this._selectedIndex=-1,F`
270
270
  <div class="mdc-radio-container">
271
271
  ${t?t.map((([e,t],n)=>(this.value===e&&(this._selectedIndex=n),F`
272
272
  <div id="field" class="mdc-form-field">
@@ -435,7 +435,7 @@
435
435
  />
436
436
  <label style="margin-left: 10px; cursor: pointer" for="elem">${this.label}</label>
437
437
  </div>
438
- `;case bs.NUMBER:case bs.RANGE:case bs.DATE:case bs.DATETIME:case bs.TIME:case bs.MONTH:case bs.WEEK:case bs.EMAIL:case bs.PASSWORD:case bs.TELEPHONE:case bs.URL:case bs.TEXT:case bs.TEXTAREA:case bs.JSON:case bs.JSON_OBJECT:{let t,l=[void 0===this.value||null===this.value?void 0:this.value,this.min,this.max];if(l.some((e=>"string"!=typeof e)))if(this.type===bs.JSON||this.type===bs.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(e){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 bs.TIME:t.asDate=!0,t.hour12=!1,t.timeStyle=this.step&&this.step<60?"medium":"short";break;case bs.DATE:t.asDate=!0,t.momentJsFormat="YYYY-MM-DD";break;case bs.WEEK:t.asDate=!0,t.momentJsFormat="YYYY-[W]WW";break;case bs.MONTH:t.asDate=!0,t.momentJsFormat="YYYY-MM";break;case bs.DATETIME:t.asDate=!0,t.momentJsFormat="YYYY-MM-DDTHH:mm";break;case bs.NUMBER:null!==(e=t.maximumFractionDigits)&&void 0!==e||(t.maximumFractionDigits=20)}t.useGrouping=!1,l=l.map((e=>void 0!==e?ja.Util.getValueAsString(e,(()=>t),"en-GB"):void 0))}let c=this.label,d=this.type,u="component";if(this.type===bs.RANGE&&(c=void 0,n=!1,i=!1,d=bs.NUMBER,u="number"),this.type!==bs.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===bs.TEXTAREA||d===bs.JSON||d===bs.JSON_OBJECT,"mdc-text-field--disabled":this.disabled,"mdc-text-field--fullwidth":this.fullWidth&&!n,"dense-comfortable":this.comfortable&&!(d===bs.TEXTAREA||d===bs.JSON||d===bs.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===bs.TEXTAREA||d===bs.JSON||d===bs.JSON_OBJECT?F`
438
+ `;case bs.NUMBER:case bs.RANGE:case bs.DATE:case bs.DATETIME:case bs.TIME:case bs.MONTH:case bs.WEEK:case bs.EMAIL:case bs.PASSWORD:case bs.TELEPHONE:case bs.URL:case bs.TEXT:case bs.TEXTAREA:case bs.JSON:case bs.JSON_OBJECT:{let t,l=[void 0===this.value||null===this.value?void 0:this.value,this.min,this.max];if(l.some((e=>"string"!=typeof e)))if(this.type===bs.JSON||this.type===bs.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(e){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 bs.TIME:t.asDate=!0,t.hour12=!1,t.timeStyle=this.step&&this.step<60?"medium":"short";break;case bs.DATE:t.asDate=!0,t.momentJsFormat="YYYY-MM-DD";break;case bs.WEEK:t.asDate=!0,t.momentJsFormat="YYYY-[W]WW";break;case bs.MONTH:t.asDate=!0,t.momentJsFormat="YYYY-MM";break;case bs.DATETIME:t.asDate=!0,t.momentJsFormat="YYYY-MM-DDTHH:mm";break;case bs.NUMBER:null!==(e=t.maximumFractionDigits)&&void 0!==e||(t.maximumFractionDigits=20)}t.useGrouping=!1,l=l.map((e=>void 0!==e?ja.Util.getValueAsString(e,(()=>t),"en-GB"):void 0))}let c=this.label,d=this.type,u="component";if(this.type===bs.RANGE&&(c=void 0,n=!1,i=!1,d=bs.NUMBER,u="number"),this.type!==bs.RANGE||!this.disableSliderNumberInput){this.censored&&(d=bs.PASSWORD),this.type===bs.PASSWORD&&this.advertised&&(d=bs.TEXT);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===bs.TEXTAREA||d===bs.JSON||d===bs.JSON_OBJECT,"mdc-text-field--disabled":this.disabled,"mdc-text-field--fullwidth":this.fullWidth&&!n,"dense-comfortable":this.comfortable&&!(d===bs.TEXTAREA||d===bs.JSON||d===bs.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===bs.TEXTAREA||d===bs.JSON||d===bs.JSON_OBJECT?F`
439
439
  <textarea id="elem" class="mdc-text-field__input ${this.resizeVertical?"resize-vertical":""}" ?required="${this.required}"
440
440
  ?readonly="${this.readonly}" ?disabled="${this.disabled}" minlength="${Zi(this.minLength)}"
441
441
  maxlength="${Zi(this.maxLength)}" rows="${this.rows?this.rows:5}"
@@ -457,6 +457,7 @@
457
457
  ${t}
458
458
  ${n?this.renderOutlined(s):s}
459
459
  ${n?"":F`<span class="mdc-line-ripple"></span>`}
460
+ ${this.type!==bs.PASSWORD||this.censored?"":F`<or-icon class="mdc-text-field__icon mdc-text-field__icon--trailing" aria-hidden="true" icon=${this.advertised?"eye":"eye-off"} style="pointer-events: auto;" @click=${()=>this.advertised=!this.advertised}></or-icon>`}
460
461
  ${this.iconTrailing?F`<or-icon class="mdc-text-field__icon mdc-text-field__icon--trailing" aria-hidden="true" icon="${this.iconTrailing}"></or-icon>`:""}
461
462
  </label>
462
463
  ${i||r?F`
@@ -499,7 +500,7 @@
499
500
  `:""}
500
501
  <span class="mdc-notched-outline__trailing"></span>
501
502
  </span>
502
- `}setCustomValidity(e){this.errorMessage=e;const t=this.shadowRoot.getElementById("elem");t&&t.setCustomValidity&&t.setCustomValidity(null!=e?e:""),this.reportValidity()}checkValidity(){const e=this.shadowRoot.getElementById("elem");let t=!0;return e&&e.validity&&(t=e.validity.valid),!t||this.type!==bs.JSON&&this.type!==bs.JSON_OBJECT||void 0!==this.value&&null!==this.value&&""===this._mdcComponent.value&&(t=!1),t}reportValidity(){const e=this.checkValidity();return this.isUiValid=e,this._mdcComponent&&(this._mdcComponent.valid=e),e}onValueChange(e,t,n){var i,r;let o,a=this.value;if("undefined"===t&&(a=null,t=void 0),"null"===t&&(a=void 0,t=null),"string"==typeof t)switch(this.type){case bs.CHECKBOX:case bs.SWITCH:t="on"===t;break;case bs.JSON:case bs.JSON_OBJECT:case bs.NUMBER:case bs.RANGE:if(""===t)t=null;else try{t=JSON.parse(t),this.type!==bs.JSON_OBJECT||"object"==typeof t&&!Array.isArray(t)||(t=this.value,o=Ua.i18next.t("validation.invalidJSON"))}catch(e){t=this.value,o=this.type===bs.JSON||this.type==bs.JSON_OBJECT?Ua.i18next.t("validation.invalidJSON"):Ua.i18next.t("validation.invalidNumber")}break;case bs.DATETIME:if(""===t)t=null;else try{t=Date.parse(t)}catch(e){t=this.value,o=Ua.i18next.t("validation.invalidDate")}}if(this.value=t,this.setCustomValidity(o),this.reportValidity(),this.type!==bs.CHECKBOX_LIST&&t!==a&&(this.type===bs.RANGE&&(this._mdcComponent.setValue(t),this._mdcComponent2&&(this._mdcComponent2.value=t)),this.dispatchEvent(new gs(this.value,a,n))),null!=this.searchProvider&&this.type===bs.SELECT){const e=null===(r=null===(i=this.shadowRoot)||void 0===i?void 0:i.getElementById("select-searchable"))||void 0===r?void 0:r.children[1];e&&(this.searchableValue=void 0,e.value="")}this.type!==bs.CHECKBOX_LIST||ja.Util.objectsEqual(t,a,!0)||this.dispatchEvent(new gs(t,a,n))}get valid(){const e=this.shadowRoot.getElementById("elem");return!e||!e.checkValidity||e.checkValidity()}get currentValue(){const e=this.shadowRoot.getElementById("elem");if(e&&e.value)return e.value}resolveOptions(e){let t;return e&&e.length>0&&(t=e.map((e=>{if(Array.isArray(e))return e;{const t=""+e;return[e,Ua.i18next.t(t,{defaultValue:ja.Util.camelCaseToSentenceCase(t)})]}}))),t}getSelectedTextValue(e){const t=this.value,n=Array.isArray(t)?t:null!=t?[t]:void 0;if(!n)return"";const i=e||this.resolveOptions(this.options);return i&&n?n.map((e=>i.find((([t,n],i)=>e===t)))).map((e=>e?e[1]:"")).join(", "):""}};Qa([Ie({type:Boolean})],xs.prototype,"focused",void 0),Qa([Ie()],xs.prototype,"value",void 0),Qa([Ie({type:String})],xs.prototype,"type",void 0),Qa([Ie({type:String})],xs.prototype,"name",void 0),Qa([Ie({type:Boolean})],xs.prototype,"readonly",void 0),Qa([Ie({type:Boolean})],xs.prototype,"required",void 0),Qa([Ie()],xs.prototype,"max",void 0),Qa([Ie()],xs.prototype,"min",void 0),Qa([Ie({type:Number})],xs.prototype,"step",void 0),Qa([Ie({type:Boolean})],xs.prototype,"checked",void 0),Qa([Ie({type:Boolean})],xs.prototype,"indeterminate",void 0),Qa([Ie({type:Number})],xs.prototype,"maxLength",void 0),Qa([Ie({type:Number})],xs.prototype,"minLength",void 0),Qa([Ie({type:Number})],xs.prototype,"rows",void 0),Qa([Ie({type:Number})],xs.prototype,"cols",void 0),Qa([Ie({type:Boolean})],xs.prototype,"multiple",void 0),Qa([Ie({type:String,attribute:!0,reflect:!1})],xs.prototype,"pattern",void 0),Qa([Ie({type:String})],xs.prototype,"placeHolder",void 0),Qa([Ie({type:Array})],xs.prototype,"options",void 0),Qa([Ie({type:Boolean})],xs.prototype,"autoSelect",void 0),Qa([Ie({type:Object})],xs.prototype,"searchProvider",void 0),Qa([Ie({type:String})],xs.prototype,"searchLabel",void 0),Qa([Ie({type:String})],xs.prototype,"icon",void 0),Qa([Ie({type:String})],xs.prototype,"iconColor",void 0),Qa([Ie({type:String})],xs.prototype,"iconOn",void 0),Qa([Ie({type:String})],xs.prototype,"iconTrailing",void 0),Qa([Ie({type:Boolean})],xs.prototype,"compact",void 0),Qa([Ie({type:Boolean})],xs.prototype,"comfortable",void 0),Qa([Ie({type:Boolean})],xs.prototype,"raised",void 0),Qa([Ie({type:Boolean})],xs.prototype,"action",void 0),Qa([Ie({type:Boolean})],xs.prototype,"unElevated",void 0),Qa([Ie({type:Boolean})],xs.prototype,"outlined",void 0),Qa([Ie({type:Boolean})],xs.prototype,"rounded",void 0),Qa([Ie({type:Object})],xs.prototype,"format",void 0),Qa([Ie({type:Boolean})],xs.prototype,"disableSliderNumberInput",void 0),Qa([Ie({type:Boolean})],xs.prototype,"fullWidth",void 0),Qa([Ie({type:String})],xs.prototype,"helperText",void 0),Qa([Ie({type:Boolean})],xs.prototype,"helperPersistent",void 0),Qa([Ie({type:String,attribute:!0})],xs.prototype,"validationMessage",void 0),Qa([Ie({type:Boolean})],xs.prototype,"autoValidate",void 0),Qa([Ie({type:Boolean})],xs.prototype,"charCounter",void 0),Qa([Ie({type:String})],xs.prototype,"label",void 0),Qa([Ie({type:Boolean})],xs.prototype,"disabled",void 0),Qa([Ie({type:Boolean})],xs.prototype,"continuous",void 0),Qa([Ie({type:Boolean})],xs.prototype,"resizeVertical",void 0),Qa([Re()],xs.prototype,"isUiValid",void 0),Qa([Re()],xs.prototype,"searchableValue",void 0),Qa([Re()],xs.prototype,"errorMessage",void 0),xs=Qa([$e("or-mwc-input")],xs);var _s=o(88352),ws=o.n(_s),ks=(o(99176),o(52948),o(80832),o(7e4),function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a});class Es extends CustomEvent{constructor(e,t){super(Es.NAME,{bubbles:!0,composed:!0,detail:{value:e,valid:t}})}}Es.NAME="or-ace-editor-changed";class Cs extends CustomEvent{constructor(){super(Cs.NAME,{bubbles:!0,composed:!0})}}Cs.NAME="or-ace-editor-edit";let As=class extends Ce{constructor(){super(...arguments),this.mode="ace/mode/json",this._lastValue="",this._editing=!1}static get styles(){return ue`
503
+ `}setCustomValidity(e){this.errorMessage=e;const t=this.shadowRoot.getElementById("elem");t&&t.setCustomValidity&&t.setCustomValidity(null!=e?e:""),this.reportValidity()}checkValidity(){const e=this.shadowRoot.getElementById("elem");let t=!0;return e&&e.validity&&(t=e.validity.valid),!t||this.type!==bs.JSON&&this.type!==bs.JSON_OBJECT||void 0!==this.value&&null!==this.value&&""===this._mdcComponent.value&&(t=!1),t}reportValidity(){const e=this.checkValidity();return this.isUiValid=e,this._mdcComponent&&(this._mdcComponent.valid=e),e}onValueChange(e,t,n){var i,r;let o,a=this.value;if("undefined"===t&&(a=null,t=void 0),"null"===t&&(a=void 0,t=null),"string"==typeof t)switch(this.type){case bs.CHECKBOX:case bs.SWITCH:t="on"===t;break;case bs.JSON:case bs.JSON_OBJECT:case bs.NUMBER:case bs.RANGE:if(""===t)t=null;else try{t=JSON.parse(t),this.type!==bs.JSON_OBJECT||"object"==typeof t&&!Array.isArray(t)||(t=this.value,o=Ua.i18next.t("validation.invalidJSON"))}catch(e){t=this.value,o=this.type===bs.JSON||this.type==bs.JSON_OBJECT?Ua.i18next.t("validation.invalidJSON"):Ua.i18next.t("validation.invalidNumber")}break;case bs.DATETIME:if(""===t)t=null;else try{t=Date.parse(t)}catch(e){t=this.value,o=Ua.i18next.t("validation.invalidDate")}}if(this.value=t,this.setCustomValidity(o),this.reportValidity(),this.type!==bs.CHECKBOX_LIST&&t!==a&&(this.type===bs.RANGE&&(this._mdcComponent.setValue(t),this._mdcComponent2&&(this._mdcComponent2.value=t)),this.dispatchEvent(new gs(this.value,a,n))),null!=this.searchProvider&&this.type===bs.SELECT){const e=null===(r=null===(i=this.shadowRoot)||void 0===i?void 0:i.getElementById("select-searchable"))||void 0===r?void 0:r.children[1];e&&(this.searchableValue=void 0,e.value="")}this.type!==bs.CHECKBOX_LIST||ja.Util.objectsEqual(t,a,!0)||this.dispatchEvent(new gs(t,a,n))}get valid(){const e=this.shadowRoot.getElementById("elem");return!e||!e.checkValidity||e.checkValidity()}get currentValue(){const e=this.shadowRoot.getElementById("elem");if(e&&e.value)return e.value}resolveOptions(e){let t;return e&&e.length>0&&(t=e.map((e=>{if(Array.isArray(e))return e;{const t=""+e;return[e,Ua.i18next.t(t,{defaultValue:ja.Util.camelCaseToSentenceCase(t)})]}}))),t}getSelectedTextValue(e){const t=this.value,n=Array.isArray(t)?t:null!=t?[t]:void 0;if(!n)return"";const i=e||this.resolveOptions(this.options);return i&&n?n.map((e=>i.find((([t,n],i)=>e===t)))).map((e=>e?e[1]:"")).join(", "):""}};Qa([Ie({type:Boolean})],xs.prototype,"focused",void 0),Qa([Ie()],xs.prototype,"value",void 0),Qa([Ie({type:String})],xs.prototype,"type",void 0),Qa([Ie({type:String})],xs.prototype,"name",void 0),Qa([Ie({type:Boolean})],xs.prototype,"readonly",void 0),Qa([Ie({type:Boolean})],xs.prototype,"required",void 0),Qa([Ie()],xs.prototype,"max",void 0),Qa([Ie()],xs.prototype,"min",void 0),Qa([Ie({type:Number})],xs.prototype,"step",void 0),Qa([Ie({type:Boolean})],xs.prototype,"checked",void 0),Qa([Ie({type:Boolean})],xs.prototype,"indeterminate",void 0),Qa([Ie({type:Number})],xs.prototype,"maxLength",void 0),Qa([Ie({type:Number})],xs.prototype,"minLength",void 0),Qa([Ie({type:Number})],xs.prototype,"rows",void 0),Qa([Ie({type:Number})],xs.prototype,"cols",void 0),Qa([Ie({type:Boolean})],xs.prototype,"multiple",void 0),Qa([Ie({type:String,attribute:!0,reflect:!1})],xs.prototype,"pattern",void 0),Qa([Ie({type:String})],xs.prototype,"placeHolder",void 0),Qa([Ie({type:Array})],xs.prototype,"options",void 0),Qa([Ie({type:Boolean})],xs.prototype,"autoSelect",void 0),Qa([Ie({type:Object})],xs.prototype,"searchProvider",void 0),Qa([Ie({type:String})],xs.prototype,"searchLabel",void 0),Qa([Ie({type:String})],xs.prototype,"icon",void 0),Qa([Ie({type:String})],xs.prototype,"iconColor",void 0),Qa([Ie({type:String})],xs.prototype,"iconOn",void 0),Qa([Ie({type:String})],xs.prototype,"iconTrailing",void 0),Qa([Ie({type:Boolean})],xs.prototype,"compact",void 0),Qa([Ie({type:Boolean})],xs.prototype,"comfortable",void 0),Qa([Ie({type:Boolean})],xs.prototype,"raised",void 0),Qa([Ie({type:Boolean})],xs.prototype,"action",void 0),Qa([Ie({type:Boolean})],xs.prototype,"unElevated",void 0),Qa([Ie({type:Boolean})],xs.prototype,"outlined",void 0),Qa([Ie({type:Boolean})],xs.prototype,"rounded",void 0),Qa([Ie({type:Object})],xs.prototype,"format",void 0),Qa([Ie({type:Boolean})],xs.prototype,"disableSliderNumberInput",void 0),Qa([Ie({type:Boolean})],xs.prototype,"fullWidth",void 0),Qa([Ie({type:String})],xs.prototype,"helperText",void 0),Qa([Ie({type:Boolean})],xs.prototype,"helperPersistent",void 0),Qa([Ie({type:String,attribute:!0})],xs.prototype,"validationMessage",void 0),Qa([Ie({type:Boolean})],xs.prototype,"autoValidate",void 0),Qa([Ie({type:Boolean})],xs.prototype,"charCounter",void 0),Qa([Ie({type:String})],xs.prototype,"label",void 0),Qa([Ie({type:Boolean})],xs.prototype,"disabled",void 0),Qa([Ie({type:Boolean})],xs.prototype,"continuous",void 0),Qa([Ie({type:Boolean})],xs.prototype,"resizeVertical",void 0),Qa([Ie({type:Boolean})],xs.prototype,"censored",void 0),Qa([Ie({type:Boolean,reflect:!0})],xs.prototype,"advertised",void 0),Qa([Re()],xs.prototype,"isUiValid",void 0),Qa([Re()],xs.prototype,"searchableValue",void 0),Qa([Re()],xs.prototype,"errorMessage",void 0),xs=Qa([$e("or-mwc-input")],xs);var _s=o(88352),ws=o.n(_s),ks=(o(99176),o(52948),o(80832),o(7e4),function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a});class Es extends CustomEvent{constructor(e,t){super(Es.NAME,{bubbles:!0,composed:!0,detail:{value:e,valid:t}})}}Es.NAME="or-ace-editor-changed";class Cs extends CustomEvent{constructor(){super(Cs.NAME,{bubbles:!0,composed:!0})}}Cs.NAME="or-ace-editor-edit";let As=class extends Ce{constructor(){super(...arguments),this.mode="ace/mode/json",this._lastValue="",this._editing=!1}static get styles(){return ue`
503
504
  :host {
504
505
  display: block;
505
506
  width: 100%;