@openremote/or-map 1.2.0-snapshot.20241015145246 → 1.2.0-snapshot.20241218144812
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.bundle.js
CHANGED
|
@@ -558,7 +558,7 @@
|
|
|
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.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(){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`
|
|
562
562
|
<div class="mdc-radio-container">
|
|
563
563
|
${t?t.map((([t,e],n)=>(this.value===t&&(this._selectedIndex=n),rt`
|
|
564
564
|
<div id="field" class="mdc-form-field">
|
|
@@ -643,7 +643,9 @@
|
|
|
643
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}">
|
|
644
644
|
${we(null!=this.searchProvider,(()=>rt`
|
|
645
645
|
<label id="select-searchable" class="mdc-text-field mdc-text-field--filled">
|
|
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"
|
|
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">
|
|
647
|
+
<or-translate .value="${this.searchLabel}"></or-translate>
|
|
648
|
+
</span>
|
|
647
649
|
<input class="mdc-text-field__input" type="text"
|
|
648
650
|
@keyup="${t=>this.searchableValue=t.target.value}"
|
|
649
651
|
/>
|
|
@@ -789,7 +791,7 @@
|
|
|
789
791
|
`:""}
|
|
790
792
|
<span class="mdc-notched-outline__trailing"></span>
|
|
791
793
|
</span>
|
|
792
|
-
`}setCustomValidity(t){this.errorMessage=t;const e=this.shadowRoot.getElementById("elem");e&&e.setCustomValidity&&e.setCustomValidity(null!=t?t:""),this.reportValidity()}checkValidity(){const t=this.shadowRoot.getElementById("elem");let e=!0;return t&&t.validity&&(e=t.validity.valid),!e||this.type!==Fr.JSON&&this.type!==Fr.JSON_OBJECT||void 0!==this.value&&null!==this.value&&""===this._mdcComponent.value&&(e=!1),e}reportValidity(){const t=this.checkValidity();return this.isUiValid=t,this._mdcComponent&&(this._mdcComponent.valid=t),t}onValueChange(t,n,i){var r,o;let a,s=this.value;if("undefined"===n&&(s=null,n=void 0),"null"===n&&(s=void 0,n=null),"string"==typeof n)switch(this.type){case Fr.CHECKBOX:case Fr.SWITCH:n="on"===n;break;case Fr.JSON:case Fr.JSON_OBJECT:case Fr.NUMBER:case Fr.RANGE:if(""===n)n=null;else try{n=JSON.parse(n),this.type!==Fr.JSON_OBJECT||"object"==typeof n&&!Array.isArray(n)||(n=this.value,a=lr.i18next.t("validation.invalidJSON"))}catch(t){n=this.value,a=this.type===Fr.JSON||this.type==Fr.JSON_OBJECT?lr.i18next.t("validation.invalidJSON"):lr.i18next.t("validation.invalidNumber")}break;case Fr.DATETIME:if(""===n)n=null;else try{n=Date.parse(n)}catch(t){n=this.value,a=lr.i18next.t("validation.invalidDate")}}if(this.value=n,this.setCustomValidity(a),this.reportValidity(),this.type!==Fr.CHECKBOX_LIST&&n!==s&&(this.type===Fr.RANGE&&(this._mdcComponent.setValue(n),this._mdcComponent2&&(this._mdcComponent2.value=n)),this.dispatchEvent(new Br(this.value,s,i))),null!=this.searchProvider&&this.type===Fr.SELECT){const t=null===(o=null===(r=this.shadowRoot)||void 0===r?void 0:r.getElementById("select-searchable"))||void 0===o?void 0:o.children[1];t&&(this.searchableValue=void 0,t.value="")}this.type!==Fr.CHECKBOX_LIST||e.Util.objectsEqual(n,s,!0)||this.dispatchEvent(new Br(n,s,i))}get valid(){const t=this.shadowRoot.getElementById("elem");return!t||!t.checkValidity||t.checkValidity()}get currentValue(){const t=this.shadowRoot.getElementById("elem");if(t&&t.value)return t.value}resolveOptions(t){let n;return t&&t.length>0&&(n=t.map((t=>{if(Array.isArray(t))return t;{const n=""+t;return[t,lr.i18next.t(n,{defaultValue:e.Util.camelCaseToSentenceCase(n)})]}}))),n}getSelectedTextValue(t){const e=this.value,n=Array.isArray(e)?e:null!=e?[e]:void 0;if(!n)return"";const i=t||this.resolveOptions(this.options);return i&&n?n.map((t=>i.find((([e,n],i)=>t===e)))).map((t=>t?t[1]:"")).join(", "):""}};vr([zt({type:Boolean})],Ur.prototype,"focused",void 0),vr([zt()],Ur.prototype,"value",void 0),vr([zt({type:String})],Ur.prototype,"type",void 0),vr([zt({type:String})],Ur.prototype,"name",void 0),vr([zt({type:Boolean})],Ur.prototype,"readonly",void 0),vr([zt({type:Boolean})],Ur.prototype,"required",void 0),vr([zt()],Ur.prototype,"max",void 0),vr([zt()],Ur.prototype,"min",void 0),vr([zt({type:Number})],Ur.prototype,"step",void 0),vr([zt({type:Boolean})],Ur.prototype,"checked",void 0),vr([zt({type:Boolean})],Ur.prototype,"indeterminate",void 0),vr([zt({type:Number})],Ur.prototype,"maxLength",void 0),vr([zt({type:Number})],Ur.prototype,"minLength",void 0),vr([zt({type:Number})],Ur.prototype,"rows",void 0),vr([zt({type:Number})],Ur.prototype,"cols",void 0),vr([zt({type:Boolean})],Ur.prototype,"multiple",void 0),vr([zt({type:String,attribute:!0,reflect:!1})],Ur.prototype,"pattern",void 0),vr([zt({type:String})],Ur.prototype,"placeHolder",void 0),vr([zt({type:Array})],Ur.prototype,"options",void 0),vr([zt({type:Boolean})],Ur.prototype,"autoSelect",void 0),vr([zt({type:Object})],Ur.prototype,"searchProvider",void 0),vr([zt({type:String})],Ur.prototype,"icon",void 0),vr([zt({type:String})],Ur.prototype,"iconColor",void 0),vr([zt({type:String})],Ur.prototype,"iconOn",void 0),vr([zt({type:String})],Ur.prototype,"iconTrailing",void 0),vr([zt({type:Boolean})],Ur.prototype,"compact",void 0),vr([zt({type:Boolean})],Ur.prototype,"comfortable",void 0),vr([zt({type:Boolean})],Ur.prototype,"raised",void 0),vr([zt({type:Boolean})],Ur.prototype,"action",void 0),vr([zt({type:Boolean})],Ur.prototype,"unElevated",void 0),vr([zt({type:Boolean})],Ur.prototype,"outlined",void 0),vr([zt({type:Boolean})],Ur.prototype,"rounded",void 0),vr([zt({type:Object})],Ur.prototype,"format",void 0),vr([zt({type:Boolean})],Ur.prototype,"disableSliderNumberInput",void 0),vr([zt({type:Boolean})],Ur.prototype,"fullWidth",void 0),vr([zt({type:String})],Ur.prototype,"helperText",void 0),vr([zt({type:Boolean})],Ur.prototype,"helperPersistent",void 0),vr([zt({type:String,attribute:!0})],Ur.prototype,"validationMessage",void 0),vr([zt({type:Boolean})],Ur.prototype,"autoValidate",void 0),vr([zt({type:Boolean})],Ur.prototype,"charCounter",void 0),vr([zt({type:String})],Ur.prototype,"label",void 0),vr([zt({type:Boolean})],Ur.prototype,"disabled",void 0),vr([zt({type:Boolean})],Ur.prototype,"continuous",void 0),vr([zt({type:Boolean})],Ur.prototype,"resizeVertical",void 0),vr([Lt()],Ur.prototype,"isUiValid",void 0),vr([Lt()],Ur.prototype,"searchableValue",void 0),vr([Lt()],Ur.prototype,"errorMessage",void 0),Ur=vr([Tt("or-mwc-input")],Ur);var $r="mdc-dom-focus-sentinel",qr=function(){function t(t,e){void 0===e&&(e={}),this.root=t,this.options=e,this.elFocusedBeforeTrapFocus=null}return t.prototype.trapFocus=function(){var t=this.getFocusableElements(this.root);if(0===t.length)throw new Error("FocusTrap: Element must have at least one focusable child.");this.elFocusedBeforeTrapFocus=document.activeElement instanceof HTMLElement?document.activeElement:null,this.wrapTabFocus(this.root,t),this.options.skipInitialFocus||this.focusInitialElement(t,this.options.initialFocusEl)},t.prototype.releaseFocus=function(){[].slice.call(this.root.querySelectorAll("."+$r)).forEach((function(t){t.parentElement.removeChild(t)})),this.elFocusedBeforeTrapFocus&&this.elFocusedBeforeTrapFocus.focus()},t.prototype.wrapTabFocus=function(t,e){var n=this.createSentinel(),i=this.createSentinel();n.addEventListener("focus",(function(){e.length>0&&e[e.length-1].focus()})),i.addEventListener("focus",(function(){e.length>0&&e[0].focus()})),t.insertBefore(n,t.children[0]),t.appendChild(i)},t.prototype.focusInitialElement=function(t,e){var n=0;e&&(n=Math.max(t.indexOf(e),0)),t[n].focus()},t.prototype.getFocusableElements=function(t){return[].slice.call(t.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button")).filter((function(t){var e="true"===t.getAttribute("aria-disabled")||null!=t.getAttribute("disabled")||null!=t.getAttribute("hidden")||"true"===t.getAttribute("aria-hidden"),n=t.tabIndex>=0&&t.getBoundingClientRect().width>0&&!t.classList.contains($r)&&!e,i=!1;if(n){var r=getComputedStyle(t);i="none"===r.display||"hidden"===r.visibility}return n&&!i}))},t.prototype.createSentinel=function(){var t=document.createElement("div");return t.setAttribute("tabindex","0"),t.setAttribute("aria-hidden","true"),t.classList.add($r),t},t}(),Hr={CLOSING:"mdc-dialog--closing",OPEN:"mdc-dialog--open",OPENING:"mdc-dialog--opening",SCROLLABLE:"mdc-dialog--scrollable",SCROLL_LOCK:"mdc-dialog-scroll-lock",STACKED:"mdc-dialog--stacked"},jr={ACTION_ATTRIBUTE:"data-mdc-dialog-action",BUTTON_DEFAULT_ATTRIBUTE:"data-mdc-dialog-button-default",BUTTON_SELECTOR:".mdc-dialog__button",CLOSED_EVENT:"MDCDialog:closed",CLOSE_ACTION:"close",CLOSING_EVENT:"MDCDialog:closing",CONTAINER_SELECTOR:".mdc-dialog__container",CONTENT_SELECTOR:".mdc-dialog__content",DESTROY_ACTION:"destroy",INITIAL_FOCUS_ATTRIBUTE:"data-mdc-dialog-initial-focus",OPENED_EVENT:"MDCDialog:opened",OPENING_EVENT:"MDCDialog:opening",SCRIM_SELECTOR:".mdc-dialog__scrim",SUPPRESS_DEFAULT_PRESS_SELECTOR:["textarea",".mdc-menu .mdc-list-item"].join(", "),SURFACE_SELECTOR:".mdc-dialog__surface"},Gr={DIALOG_ANIMATION_CLOSE_TIME_MS:75,DIALOG_ANIMATION_OPEN_TIME_MS:150},Xr=function(t){function e(n){var i=t.call(this,ze(ze({},e.defaultAdapter),n))||this;return i.isOpen_=!1,i.animationFrame_=0,i.animationTimer_=0,i.layoutFrame_=0,i.escapeKeyAction_=jr.CLOSE_ACTION,i.scrimClickAction_=jr.CLOSE_ACTION,i.autoStackButtons_=!0,i.areButtonsStacked_=!1,i.suppressDefaultPressSelector=jr.SUPPRESS_DEFAULT_PRESS_SELECTOR,i}return Se(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return Hr},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return jr},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Gr},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addBodyClass:function(){},addClass:function(){},areButtonsStacked:function(){return!1},clickDefaultButton:function(){},eventTargetMatches:function(){return!1},getActionFromEvent:function(){return""},getInitialFocusEl:function(){return null},hasClass:function(){return!1},isContentScrollable:function(){return!1},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeBodyClass:function(){},removeClass:function(){},reverseButtons:function(){},trapFocus:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter.hasClass(Hr.STACKED)&&this.setAutoStackButtons(!1)},e.prototype.destroy=function(){this.isOpen_&&this.close(jr.DESTROY_ACTION),this.animationTimer_&&(clearTimeout(this.animationTimer_),this.handleAnimationTimerEnd_()),this.layoutFrame_&&(cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=0)},e.prototype.open=function(){var t=this;this.isOpen_=!0,this.adapter.notifyOpening(),this.adapter.addClass(Hr.OPENING),this.runNextAnimationFrame_((function(){t.adapter.addClass(Hr.OPEN),t.adapter.addBodyClass(Hr.SCROLL_LOCK),t.layout(),t.animationTimer_=setTimeout((function(){t.handleAnimationTimerEnd_(),t.adapter.trapFocus(t.adapter.getInitialFocusEl()),t.adapter.notifyOpened()}),Gr.DIALOG_ANIMATION_OPEN_TIME_MS)}))},e.prototype.close=function(t){var e=this;void 0===t&&(t=""),this.isOpen_&&(this.isOpen_=!1,this.adapter.notifyClosing(t),this.adapter.addClass(Hr.CLOSING),this.adapter.removeClass(Hr.OPEN),this.adapter.removeBodyClass(Hr.SCROLL_LOCK),cancelAnimationFrame(this.animationFrame_),this.animationFrame_=0,clearTimeout(this.animationTimer_),this.animationTimer_=setTimeout((function(){e.adapter.releaseFocus(),e.handleAnimationTimerEnd_(),e.adapter.notifyClosed(t)}),Gr.DIALOG_ANIMATION_CLOSE_TIME_MS))},e.prototype.isOpen=function(){return this.isOpen_},e.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction_},e.prototype.setEscapeKeyAction=function(t){this.escapeKeyAction_=t},e.prototype.getScrimClickAction=function(){return this.scrimClickAction_},e.prototype.setScrimClickAction=function(t){this.scrimClickAction_=t},e.prototype.getAutoStackButtons=function(){return this.autoStackButtons_},e.prototype.setAutoStackButtons=function(t){this.autoStackButtons_=t},e.prototype.getSuppressDefaultPressSelector=function(){return this.suppressDefaultPressSelector},e.prototype.setSuppressDefaultPressSelector=function(t){this.suppressDefaultPressSelector=t},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame((function(){t.layoutInternal_(),t.layoutFrame_=0}))},e.prototype.handleClick=function(t){if(this.adapter.eventTargetMatches(t.target,jr.SCRIM_SELECTOR)&&""!==this.scrimClickAction_)this.close(this.scrimClickAction_);else{var e=this.adapter.getActionFromEvent(t);e&&this.close(e)}},e.prototype.handleKeydown=function(t){var e="Enter"===t.key||13===t.keyCode;if(e&&!this.adapter.getActionFromEvent(t)){var n=t.composedPath?t.composedPath()[0]:t.target,i=!this.adapter.eventTargetMatches(n,this.suppressDefaultPressSelector);e&&i&&this.adapter.clickDefaultButton()}},e.prototype.handleDocumentKeydown=function(t){("Escape"===t.key||27===t.keyCode)&&""!==this.escapeKeyAction_&&this.close(this.escapeKeyAction_)},e.prototype.layoutInternal_=function(){this.autoStackButtons_&&this.detectStackedButtons_(),this.detectScrollableContent_()},e.prototype.handleAnimationTimerEnd_=function(){this.animationTimer_=0,this.adapter.removeClass(Hr.OPENING),this.adapter.removeClass(Hr.CLOSING)},e.prototype.runNextAnimationFrame_=function(t){var e=this;cancelAnimationFrame(this.animationFrame_),this.animationFrame_=requestAnimationFrame((function(){e.animationFrame_=0,clearTimeout(e.animationTimer_),e.animationTimer_=setTimeout(t,0)}))},e.prototype.detectStackedButtons_=function(){this.adapter.removeClass(Hr.STACKED);var t=this.adapter.areButtonsStacked();t&&this.adapter.addClass(Hr.STACKED),t!==this.areButtonsStacked_&&(this.adapter.reverseButtons(),this.areButtonsStacked_=t)},e.prototype.detectScrollableContent_=function(){this.adapter.removeClass(Hr.SCROLLABLE),this.adapter.isContentScrollable()&&this.adapter.addClass(Hr.SCROLLABLE)},e}(Pe),Zr=Xr.strings,Wr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Se(e,t),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"escapeKeyAction",{get:function(){return this.foundation.getEscapeKeyAction()},set:function(t){this.foundation.setEscapeKeyAction(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrimClickAction",{get:function(){return this.foundation.getScrimClickAction()},set:function(t){this.foundation.setScrimClickAction(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoStackButtons",{get:function(){return this.foundation.getAutoStackButtons()},set:function(t){this.foundation.setAutoStackButtons(t)},enumerable:!0,configurable:!0}),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t){var e,n;void 0===t&&(t=function(t,e){return new qr(t,e)});var i=this.root.querySelector(Zr.CONTAINER_SELECTOR);if(!i)throw new Error("Dialog component requires a "+Zr.CONTAINER_SELECTOR+" container element");this.container_=i,this.content_=this.root.querySelector(Zr.CONTENT_SELECTOR),this.buttons_=[].slice.call(this.root.querySelectorAll(Zr.BUTTON_SELECTOR)),this.defaultButton_=this.root.querySelector("["+Zr.BUTTON_DEFAULT_ATTRIBUTE+"]"),this.focusTrapFactory_=t,this.buttonRipples_=[];try{for(var r=Le(this.buttons_),o=r.next();!o.done;o=r.next()){var a=o.value;this.buttonRipples_.push(new on(a))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},e.prototype.initialSyncWithDOM=function(){var t,e=this;this.focusTrap_=(t=this.container_,(0,this.focusTrapFactory_)(t,{initialFocusEl:this.getInitialFocusEl_()||void 0})),this.handleClick_=this.foundation.handleClick.bind(this.foundation),this.handleKeydown_=this.foundation.handleKeydown.bind(this.foundation),this.handleDocumentKeydown_=this.foundation.handleDocumentKeydown.bind(this.foundation),this.handleLayout_=this.layout.bind(this);var n=["resize","orientationchange"];this.handleOpening_=function(){n.forEach((function(t){return window.addEventListener(t,e.handleLayout_)})),document.addEventListener("keydown",e.handleDocumentKeydown_)},this.handleClosing_=function(){n.forEach((function(t){return window.removeEventListener(t,e.handleLayout_)})),document.removeEventListener("keydown",e.handleDocumentKeydown_)},this.listen("click",this.handleClick_),this.listen("keydown",this.handleKeydown_),this.listen(Zr.OPENING_EVENT,this.handleOpening_),this.listen(Zr.CLOSING_EVENT,this.handleClosing_)},e.prototype.destroy=function(){this.unlisten("click",this.handleClick_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(Zr.OPENING_EVENT,this.handleOpening_),this.unlisten(Zr.CLOSING_EVENT,this.handleClosing_),this.handleClosing_(),this.buttonRipples_.forEach((function(t){return t.destroy()})),t.prototype.destroy.call(this)},e.prototype.layout=function(){this.foundation.layout()},e.prototype.open=function(){this.foundation.open()},e.prototype.close=function(t){void 0===t&&(t=""),this.foundation.close(t)},e.prototype.getDefaultFoundation=function(){var t=this;return new Xr({addBodyClass:function(t){return document.body.classList.add(t)},addClass:function(e){return t.root.classList.add(e)},areButtonsStacked:function(){return e=t.buttons_,n=new Set,[].forEach.call(e,(function(t){return n.add(t.offsetTop)})),n.size>1;var e,n},clickDefaultButton:function(){return t.defaultButton_&&t.defaultButton_.click()},eventTargetMatches:function(t,e){return!!t&&Fe(t,e)},getActionFromEvent:function(t){if(!t.target)return"";var e=Be(t.target,"["+Zr.ACTION_ATTRIBUTE+"]");return e&&e.getAttribute(Zr.ACTION_ATTRIBUTE)},getInitialFocusEl:function(){return t.getInitialFocusEl_()},hasClass:function(e){return t.root.classList.contains(e)},isContentScrollable:function(){return!!(e=t.content_)&&e.scrollHeight>e.offsetHeight;var e},notifyClosed:function(e){return t.emit(Zr.CLOSED_EVENT,e?{action:e}:{})},notifyClosing:function(e){return t.emit(Zr.CLOSING_EVENT,e?{action:e}:{})},notifyOpened:function(){return t.emit(Zr.OPENED_EVENT,{})},notifyOpening:function(){return t.emit(Zr.OPENING_EVENT,{})},releaseFocus:function(){return t.focusTrap_.releaseFocus()},removeBodyClass:function(t){return document.body.classList.remove(t)},removeClass:function(e){return t.root.classList.remove(e)},reverseButtons:function(){t.buttons_.reverse(),t.buttons_.forEach((function(t){t.parentElement.appendChild(t)}))},trapFocus:function(){return t.focusTrap_.trapFocus()}})},e.prototype.getInitialFocusEl_=function(){return this.root.querySelector("["+Zr.INITIAL_FOCUS_ATTRIBUTE+"]")},e}(De),Yr=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};const Kr=l(40),Jr=l(744);class Qr extends CustomEvent{constructor(){super(Qr.NAME,{bubbles:!0,composed:!0})}}Qr.NAME="or-mwc-dialog-opened";class to extends CustomEvent{constructor(t){super(to.NAME,{detail:t,bubbles:!0,composed:!0})}}to.NAME="or-mwc-dialog-closed";const eo=k`
|
|
794
|
+
`}setCustomValidity(t){this.errorMessage=t;const e=this.shadowRoot.getElementById("elem");e&&e.setCustomValidity&&e.setCustomValidity(null!=t?t:""),this.reportValidity()}checkValidity(){const t=this.shadowRoot.getElementById("elem");let e=!0;return t&&t.validity&&(e=t.validity.valid),!e||this.type!==Fr.JSON&&this.type!==Fr.JSON_OBJECT||void 0!==this.value&&null!==this.value&&""===this._mdcComponent.value&&(e=!1),e}reportValidity(){const t=this.checkValidity();return this.isUiValid=t,this._mdcComponent&&(this._mdcComponent.valid=t),t}onValueChange(t,n,i){var r,o;let a,s=this.value;if("undefined"===n&&(s=null,n=void 0),"null"===n&&(s=void 0,n=null),"string"==typeof n)switch(this.type){case Fr.CHECKBOX:case Fr.SWITCH:n="on"===n;break;case Fr.JSON:case Fr.JSON_OBJECT:case Fr.NUMBER:case Fr.RANGE:if(""===n)n=null;else try{n=JSON.parse(n),this.type!==Fr.JSON_OBJECT||"object"==typeof n&&!Array.isArray(n)||(n=this.value,a=lr.i18next.t("validation.invalidJSON"))}catch(t){n=this.value,a=this.type===Fr.JSON||this.type==Fr.JSON_OBJECT?lr.i18next.t("validation.invalidJSON"):lr.i18next.t("validation.invalidNumber")}break;case Fr.DATETIME:if(""===n)n=null;else try{n=Date.parse(n)}catch(t){n=this.value,a=lr.i18next.t("validation.invalidDate")}}if(this.value=n,this.setCustomValidity(a),this.reportValidity(),this.type!==Fr.CHECKBOX_LIST&&n!==s&&(this.type===Fr.RANGE&&(this._mdcComponent.setValue(n),this._mdcComponent2&&(this._mdcComponent2.value=n)),this.dispatchEvent(new Br(this.value,s,i))),null!=this.searchProvider&&this.type===Fr.SELECT){const t=null===(o=null===(r=this.shadowRoot)||void 0===r?void 0:r.getElementById("select-searchable"))||void 0===o?void 0:o.children[1];t&&(this.searchableValue=void 0,t.value="")}this.type!==Fr.CHECKBOX_LIST||e.Util.objectsEqual(n,s,!0)||this.dispatchEvent(new Br(n,s,i))}get valid(){const t=this.shadowRoot.getElementById("elem");return!t||!t.checkValidity||t.checkValidity()}get currentValue(){const t=this.shadowRoot.getElementById("elem");if(t&&t.value)return t.value}resolveOptions(t){let n;return t&&t.length>0&&(n=t.map((t=>{if(Array.isArray(t))return t;{const n=""+t;return[t,lr.i18next.t(n,{defaultValue:e.Util.camelCaseToSentenceCase(n)})]}}))),n}getSelectedTextValue(t){const e=this.value,n=Array.isArray(e)?e:null!=e?[e]:void 0;if(!n)return"";const i=t||this.resolveOptions(this.options);return i&&n?n.map((t=>i.find((([e,n],i)=>t===e)))).map((t=>t?t[1]:"")).join(", "):""}};vr([zt({type:Boolean})],Ur.prototype,"focused",void 0),vr([zt()],Ur.prototype,"value",void 0),vr([zt({type:String})],Ur.prototype,"type",void 0),vr([zt({type:String})],Ur.prototype,"name",void 0),vr([zt({type:Boolean})],Ur.prototype,"readonly",void 0),vr([zt({type:Boolean})],Ur.prototype,"required",void 0),vr([zt()],Ur.prototype,"max",void 0),vr([zt()],Ur.prototype,"min",void 0),vr([zt({type:Number})],Ur.prototype,"step",void 0),vr([zt({type:Boolean})],Ur.prototype,"checked",void 0),vr([zt({type:Boolean})],Ur.prototype,"indeterminate",void 0),vr([zt({type:Number})],Ur.prototype,"maxLength",void 0),vr([zt({type:Number})],Ur.prototype,"minLength",void 0),vr([zt({type:Number})],Ur.prototype,"rows",void 0),vr([zt({type:Number})],Ur.prototype,"cols",void 0),vr([zt({type:Boolean})],Ur.prototype,"multiple",void 0),vr([zt({type:String,attribute:!0,reflect:!1})],Ur.prototype,"pattern",void 0),vr([zt({type:String})],Ur.prototype,"placeHolder",void 0),vr([zt({type:Array})],Ur.prototype,"options",void 0),vr([zt({type:Boolean})],Ur.prototype,"autoSelect",void 0),vr([zt({type:Object})],Ur.prototype,"searchProvider",void 0),vr([zt({type:String})],Ur.prototype,"searchLabel",void 0),vr([zt({type:String})],Ur.prototype,"icon",void 0),vr([zt({type:String})],Ur.prototype,"iconColor",void 0),vr([zt({type:String})],Ur.prototype,"iconOn",void 0),vr([zt({type:String})],Ur.prototype,"iconTrailing",void 0),vr([zt({type:Boolean})],Ur.prototype,"compact",void 0),vr([zt({type:Boolean})],Ur.prototype,"comfortable",void 0),vr([zt({type:Boolean})],Ur.prototype,"raised",void 0),vr([zt({type:Boolean})],Ur.prototype,"action",void 0),vr([zt({type:Boolean})],Ur.prototype,"unElevated",void 0),vr([zt({type:Boolean})],Ur.prototype,"outlined",void 0),vr([zt({type:Boolean})],Ur.prototype,"rounded",void 0),vr([zt({type:Object})],Ur.prototype,"format",void 0),vr([zt({type:Boolean})],Ur.prototype,"disableSliderNumberInput",void 0),vr([zt({type:Boolean})],Ur.prototype,"fullWidth",void 0),vr([zt({type:String})],Ur.prototype,"helperText",void 0),vr([zt({type:Boolean})],Ur.prototype,"helperPersistent",void 0),vr([zt({type:String,attribute:!0})],Ur.prototype,"validationMessage",void 0),vr([zt({type:Boolean})],Ur.prototype,"autoValidate",void 0),vr([zt({type:Boolean})],Ur.prototype,"charCounter",void 0),vr([zt({type:String})],Ur.prototype,"label",void 0),vr([zt({type:Boolean})],Ur.prototype,"disabled",void 0),vr([zt({type:Boolean})],Ur.prototype,"continuous",void 0),vr([zt({type:Boolean})],Ur.prototype,"resizeVertical",void 0),vr([Lt()],Ur.prototype,"isUiValid",void 0),vr([Lt()],Ur.prototype,"searchableValue",void 0),vr([Lt()],Ur.prototype,"errorMessage",void 0),Ur=vr([Tt("or-mwc-input")],Ur);var $r="mdc-dom-focus-sentinel",qr=function(){function t(t,e){void 0===e&&(e={}),this.root=t,this.options=e,this.elFocusedBeforeTrapFocus=null}return t.prototype.trapFocus=function(){var t=this.getFocusableElements(this.root);if(0===t.length)throw new Error("FocusTrap: Element must have at least one focusable child.");this.elFocusedBeforeTrapFocus=document.activeElement instanceof HTMLElement?document.activeElement:null,this.wrapTabFocus(this.root,t),this.options.skipInitialFocus||this.focusInitialElement(t,this.options.initialFocusEl)},t.prototype.releaseFocus=function(){[].slice.call(this.root.querySelectorAll("."+$r)).forEach((function(t){t.parentElement.removeChild(t)})),this.elFocusedBeforeTrapFocus&&this.elFocusedBeforeTrapFocus.focus()},t.prototype.wrapTabFocus=function(t,e){var n=this.createSentinel(),i=this.createSentinel();n.addEventListener("focus",(function(){e.length>0&&e[e.length-1].focus()})),i.addEventListener("focus",(function(){e.length>0&&e[0].focus()})),t.insertBefore(n,t.children[0]),t.appendChild(i)},t.prototype.focusInitialElement=function(t,e){var n=0;e&&(n=Math.max(t.indexOf(e),0)),t[n].focus()},t.prototype.getFocusableElements=function(t){return[].slice.call(t.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button")).filter((function(t){var e="true"===t.getAttribute("aria-disabled")||null!=t.getAttribute("disabled")||null!=t.getAttribute("hidden")||"true"===t.getAttribute("aria-hidden"),n=t.tabIndex>=0&&t.getBoundingClientRect().width>0&&!t.classList.contains($r)&&!e,i=!1;if(n){var r=getComputedStyle(t);i="none"===r.display||"hidden"===r.visibility}return n&&!i}))},t.prototype.createSentinel=function(){var t=document.createElement("div");return t.setAttribute("tabindex","0"),t.setAttribute("aria-hidden","true"),t.classList.add($r),t},t}(),Hr={CLOSING:"mdc-dialog--closing",OPEN:"mdc-dialog--open",OPENING:"mdc-dialog--opening",SCROLLABLE:"mdc-dialog--scrollable",SCROLL_LOCK:"mdc-dialog-scroll-lock",STACKED:"mdc-dialog--stacked"},jr={ACTION_ATTRIBUTE:"data-mdc-dialog-action",BUTTON_DEFAULT_ATTRIBUTE:"data-mdc-dialog-button-default",BUTTON_SELECTOR:".mdc-dialog__button",CLOSED_EVENT:"MDCDialog:closed",CLOSE_ACTION:"close",CLOSING_EVENT:"MDCDialog:closing",CONTAINER_SELECTOR:".mdc-dialog__container",CONTENT_SELECTOR:".mdc-dialog__content",DESTROY_ACTION:"destroy",INITIAL_FOCUS_ATTRIBUTE:"data-mdc-dialog-initial-focus",OPENED_EVENT:"MDCDialog:opened",OPENING_EVENT:"MDCDialog:opening",SCRIM_SELECTOR:".mdc-dialog__scrim",SUPPRESS_DEFAULT_PRESS_SELECTOR:["textarea",".mdc-menu .mdc-list-item"].join(", "),SURFACE_SELECTOR:".mdc-dialog__surface"},Gr={DIALOG_ANIMATION_CLOSE_TIME_MS:75,DIALOG_ANIMATION_OPEN_TIME_MS:150},Xr=function(t){function e(n){var i=t.call(this,ze(ze({},e.defaultAdapter),n))||this;return i.isOpen_=!1,i.animationFrame_=0,i.animationTimer_=0,i.layoutFrame_=0,i.escapeKeyAction_=jr.CLOSE_ACTION,i.scrimClickAction_=jr.CLOSE_ACTION,i.autoStackButtons_=!0,i.areButtonsStacked_=!1,i.suppressDefaultPressSelector=jr.SUPPRESS_DEFAULT_PRESS_SELECTOR,i}return Se(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return Hr},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return jr},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Gr},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addBodyClass:function(){},addClass:function(){},areButtonsStacked:function(){return!1},clickDefaultButton:function(){},eventTargetMatches:function(){return!1},getActionFromEvent:function(){return""},getInitialFocusEl:function(){return null},hasClass:function(){return!1},isContentScrollable:function(){return!1},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeBodyClass:function(){},removeClass:function(){},reverseButtons:function(){},trapFocus:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter.hasClass(Hr.STACKED)&&this.setAutoStackButtons(!1)},e.prototype.destroy=function(){this.isOpen_&&this.close(jr.DESTROY_ACTION),this.animationTimer_&&(clearTimeout(this.animationTimer_),this.handleAnimationTimerEnd_()),this.layoutFrame_&&(cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=0)},e.prototype.open=function(){var t=this;this.isOpen_=!0,this.adapter.notifyOpening(),this.adapter.addClass(Hr.OPENING),this.runNextAnimationFrame_((function(){t.adapter.addClass(Hr.OPEN),t.adapter.addBodyClass(Hr.SCROLL_LOCK),t.layout(),t.animationTimer_=setTimeout((function(){t.handleAnimationTimerEnd_(),t.adapter.trapFocus(t.adapter.getInitialFocusEl()),t.adapter.notifyOpened()}),Gr.DIALOG_ANIMATION_OPEN_TIME_MS)}))},e.prototype.close=function(t){var e=this;void 0===t&&(t=""),this.isOpen_&&(this.isOpen_=!1,this.adapter.notifyClosing(t),this.adapter.addClass(Hr.CLOSING),this.adapter.removeClass(Hr.OPEN),this.adapter.removeBodyClass(Hr.SCROLL_LOCK),cancelAnimationFrame(this.animationFrame_),this.animationFrame_=0,clearTimeout(this.animationTimer_),this.animationTimer_=setTimeout((function(){e.adapter.releaseFocus(),e.handleAnimationTimerEnd_(),e.adapter.notifyClosed(t)}),Gr.DIALOG_ANIMATION_CLOSE_TIME_MS))},e.prototype.isOpen=function(){return this.isOpen_},e.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction_},e.prototype.setEscapeKeyAction=function(t){this.escapeKeyAction_=t},e.prototype.getScrimClickAction=function(){return this.scrimClickAction_},e.prototype.setScrimClickAction=function(t){this.scrimClickAction_=t},e.prototype.getAutoStackButtons=function(){return this.autoStackButtons_},e.prototype.setAutoStackButtons=function(t){this.autoStackButtons_=t},e.prototype.getSuppressDefaultPressSelector=function(){return this.suppressDefaultPressSelector},e.prototype.setSuppressDefaultPressSelector=function(t){this.suppressDefaultPressSelector=t},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame((function(){t.layoutInternal_(),t.layoutFrame_=0}))},e.prototype.handleClick=function(t){if(this.adapter.eventTargetMatches(t.target,jr.SCRIM_SELECTOR)&&""!==this.scrimClickAction_)this.close(this.scrimClickAction_);else{var e=this.adapter.getActionFromEvent(t);e&&this.close(e)}},e.prototype.handleKeydown=function(t){var e="Enter"===t.key||13===t.keyCode;if(e&&!this.adapter.getActionFromEvent(t)){var n=t.composedPath?t.composedPath()[0]:t.target,i=!this.adapter.eventTargetMatches(n,this.suppressDefaultPressSelector);e&&i&&this.adapter.clickDefaultButton()}},e.prototype.handleDocumentKeydown=function(t){("Escape"===t.key||27===t.keyCode)&&""!==this.escapeKeyAction_&&this.close(this.escapeKeyAction_)},e.prototype.layoutInternal_=function(){this.autoStackButtons_&&this.detectStackedButtons_(),this.detectScrollableContent_()},e.prototype.handleAnimationTimerEnd_=function(){this.animationTimer_=0,this.adapter.removeClass(Hr.OPENING),this.adapter.removeClass(Hr.CLOSING)},e.prototype.runNextAnimationFrame_=function(t){var e=this;cancelAnimationFrame(this.animationFrame_),this.animationFrame_=requestAnimationFrame((function(){e.animationFrame_=0,clearTimeout(e.animationTimer_),e.animationTimer_=setTimeout(t,0)}))},e.prototype.detectStackedButtons_=function(){this.adapter.removeClass(Hr.STACKED);var t=this.adapter.areButtonsStacked();t&&this.adapter.addClass(Hr.STACKED),t!==this.areButtonsStacked_&&(this.adapter.reverseButtons(),this.areButtonsStacked_=t)},e.prototype.detectScrollableContent_=function(){this.adapter.removeClass(Hr.SCROLLABLE),this.adapter.isContentScrollable()&&this.adapter.addClass(Hr.SCROLLABLE)},e}(Pe),Zr=Xr.strings,Wr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Se(e,t),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"escapeKeyAction",{get:function(){return this.foundation.getEscapeKeyAction()},set:function(t){this.foundation.setEscapeKeyAction(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrimClickAction",{get:function(){return this.foundation.getScrimClickAction()},set:function(t){this.foundation.setScrimClickAction(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoStackButtons",{get:function(){return this.foundation.getAutoStackButtons()},set:function(t){this.foundation.setAutoStackButtons(t)},enumerable:!0,configurable:!0}),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t){var e,n;void 0===t&&(t=function(t,e){return new qr(t,e)});var i=this.root.querySelector(Zr.CONTAINER_SELECTOR);if(!i)throw new Error("Dialog component requires a "+Zr.CONTAINER_SELECTOR+" container element");this.container_=i,this.content_=this.root.querySelector(Zr.CONTENT_SELECTOR),this.buttons_=[].slice.call(this.root.querySelectorAll(Zr.BUTTON_SELECTOR)),this.defaultButton_=this.root.querySelector("["+Zr.BUTTON_DEFAULT_ATTRIBUTE+"]"),this.focusTrapFactory_=t,this.buttonRipples_=[];try{for(var r=Le(this.buttons_),o=r.next();!o.done;o=r.next()){var a=o.value;this.buttonRipples_.push(new on(a))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},e.prototype.initialSyncWithDOM=function(){var t,e=this;this.focusTrap_=(t=this.container_,(0,this.focusTrapFactory_)(t,{initialFocusEl:this.getInitialFocusEl_()||void 0})),this.handleClick_=this.foundation.handleClick.bind(this.foundation),this.handleKeydown_=this.foundation.handleKeydown.bind(this.foundation),this.handleDocumentKeydown_=this.foundation.handleDocumentKeydown.bind(this.foundation),this.handleLayout_=this.layout.bind(this);var n=["resize","orientationchange"];this.handleOpening_=function(){n.forEach((function(t){return window.addEventListener(t,e.handleLayout_)})),document.addEventListener("keydown",e.handleDocumentKeydown_)},this.handleClosing_=function(){n.forEach((function(t){return window.removeEventListener(t,e.handleLayout_)})),document.removeEventListener("keydown",e.handleDocumentKeydown_)},this.listen("click",this.handleClick_),this.listen("keydown",this.handleKeydown_),this.listen(Zr.OPENING_EVENT,this.handleOpening_),this.listen(Zr.CLOSING_EVENT,this.handleClosing_)},e.prototype.destroy=function(){this.unlisten("click",this.handleClick_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(Zr.OPENING_EVENT,this.handleOpening_),this.unlisten(Zr.CLOSING_EVENT,this.handleClosing_),this.handleClosing_(),this.buttonRipples_.forEach((function(t){return t.destroy()})),t.prototype.destroy.call(this)},e.prototype.layout=function(){this.foundation.layout()},e.prototype.open=function(){this.foundation.open()},e.prototype.close=function(t){void 0===t&&(t=""),this.foundation.close(t)},e.prototype.getDefaultFoundation=function(){var t=this;return new Xr({addBodyClass:function(t){return document.body.classList.add(t)},addClass:function(e){return t.root.classList.add(e)},areButtonsStacked:function(){return e=t.buttons_,n=new Set,[].forEach.call(e,(function(t){return n.add(t.offsetTop)})),n.size>1;var e,n},clickDefaultButton:function(){return t.defaultButton_&&t.defaultButton_.click()},eventTargetMatches:function(t,e){return!!t&&Fe(t,e)},getActionFromEvent:function(t){if(!t.target)return"";var e=Be(t.target,"["+Zr.ACTION_ATTRIBUTE+"]");return e&&e.getAttribute(Zr.ACTION_ATTRIBUTE)},getInitialFocusEl:function(){return t.getInitialFocusEl_()},hasClass:function(e){return t.root.classList.contains(e)},isContentScrollable:function(){return!!(e=t.content_)&&e.scrollHeight>e.offsetHeight;var e},notifyClosed:function(e){return t.emit(Zr.CLOSED_EVENT,e?{action:e}:{})},notifyClosing:function(e){return t.emit(Zr.CLOSING_EVENT,e?{action:e}:{})},notifyOpened:function(){return t.emit(Zr.OPENED_EVENT,{})},notifyOpening:function(){return t.emit(Zr.OPENING_EVENT,{})},releaseFocus:function(){return t.focusTrap_.releaseFocus()},removeBodyClass:function(t){return document.body.classList.remove(t)},removeClass:function(e){return t.root.classList.remove(e)},reverseButtons:function(){t.buttons_.reverse(),t.buttons_.forEach((function(t){t.parentElement.appendChild(t)}))},trapFocus:function(){return t.focusTrap_.trapFocus()}})},e.prototype.getInitialFocusEl_=function(){return this.root.querySelector("["+Zr.INITIAL_FOCUS_ATTRIBUTE+"]")},e}(De),Yr=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};const Kr=l(40),Jr=l(744);class Qr extends CustomEvent{constructor(){super(Qr.NAME,{bubbles:!0,composed:!0})}}Qr.NAME="or-mwc-dialog-opened";class to extends CustomEvent{constructor(t){super(to.NAME,{detail:t,bubbles:!0,composed:!0})}}to.NAME="or-mwc-dialog-closed";const eo=k`
|
|
793
795
|
:host {
|
|
794
796
|
position: relative;
|
|
795
797
|
}
|
|
@@ -816,7 +818,7 @@
|
|
|
816
818
|
max-width: 1024px;
|
|
817
819
|
}
|
|
818
820
|
}
|
|
819
|
-
`;let no=class extends Ct{constructor(){super(...arguments),this._open=!1}static get styles(){return[k`${w(Kr)}`,k`${w(Jr)}`,eo]}get isOpen(){return!!this._mdcComponent&&this._mdcComponent.isOpen}setOpen(t){return this._open=!0,this}setHeading(t){return this.heading=t,this}setContent(t){return this.content=t,this}setActions(t){return this.actions=t,this}setDismissAction(t){return this.dismissAction=t,this}setStyles(t){return this.styles=t,this}setAvatar(t){return this.avatar=t,this}open(){this._mdcElem&&!this._mdcComponent&&(this._mdcComponent=new Wr(this._mdcElem),this._mdcComponent.scrimClickAction=this.dismissAction||null===this.dismissAction?"close":""),this._mdcComponent&&this._mdcComponent.open()}close(t){this._mdcComponent&&this._mdcComponent.close(t)}disconnectedCallback(){super.disconnectedCallback(),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0)}render(){return rt`
|
|
821
|
+
`;let no=class extends Ct{constructor(){super(...arguments),this._open=!1,this._popstateEventBind=t=>this._onBrowserNavigate(t)}static get styles(){return[k`${w(Kr)}`,k`${w(Jr)}`,eo]}get isOpen(){return!!this._mdcComponent&&this._mdcComponent.isOpen}setOpen(t){return this._open=!0,this}setHeading(t){return this.heading=t,this}setContent(t){return this.content=t,this}setActions(t){return this.actions=t,this}setDismissAction(t){return this.dismissAction=t,this}setStyles(t){return this.styles=t,this}setAvatar(t){return this.avatar=t,this}open(){this._mdcElem&&!this._mdcComponent&&(this._mdcComponent=new Wr(this._mdcElem),this._mdcComponent.scrimClickAction=this.dismissAction||null===this.dismissAction?"close":""),this._mdcComponent&&this._mdcComponent.open()}close(t){this._mdcComponent&&this._mdcComponent.close(t)}connectedCallback(){super.connectedCallback(),window.addEventListener("popstate",this._popstateEventBind)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this._popstateEventBind),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0)}render(){return rt`
|
|
820
822
|
${"string"==typeof this.styles?rt`<style>${this.styles}</style>`:this.styles||""}
|
|
821
823
|
|
|
822
824
|
<div id="dialog"
|
|
@@ -849,7 +851,7 @@
|
|
|
849
851
|
</div>
|
|
850
852
|
<div class="mdc-dialog__scrim"></div>
|
|
851
853
|
</div>
|
|
852
|
-
`}updated(t){super.updated(t),t.has("_open")&&this._open&&this.open()}_onDialogOpened(){this.dispatchEvent(new Qr)}_onDialogClosed(t){if("close"===t&&this.dismissAction&&this.dismissAction.action)this.dismissAction.action(this);else if(t&&this.actions){const e=this.actions.find((e=>e.actionName===t));e&&e.action&&e.action(this)}this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0),this.dispatchEvent(new to(t))}};Yr([zt({type:String})],no.prototype,"heading",void 0),Yr([zt({type:Object,attribute:!1})],no.prototype,"content",void 0),Yr([zt({type:Array,attribute:!1})],no.prototype,"actions",void 0),Yr([zt({type:Object,attribute:!1})],no.prototype,"dismissAction",void 0),Yr([zt({type:Boolean})],no.prototype,"avatar",void 0),Yr([zt()],no.prototype,"styles",void 0),Yr([zt({attribute:!1})],no.prototype,"_open",void 0),Yr([Mt("#dialog")],no.prototype,"_mdcElem",void 0),no=Yr([Tt("or-mwc-dialog")],no);var io=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};class ro extends CustomEvent{constructor(t){super(ro.NAME,{bubbles:!0,composed:!0,detail:t})}}ro.NAME="or-map-asset-card-load-asset";const oo={default:{exclude:["notes"]},assetTypes:{}};let ao=class extends((0,e.subscribe)(n())(Ct)){constructor(){super(...arguments),this.useAssetColor=!0}static get styles(){return Qt}shouldUpdate(t){return(!t.has("assetId")||(this.title="",this.assetIds=this.assetId&&this.assetId.length>0?[this.assetId]:void 0,1!==t.size))&&super.shouldUpdate(t)}_onEvent(t){if("asset"===t.eventType){const e=t;switch(e.cause){case"READ":case"CREATE":case"UPDATE":this.asset=e.asset;break;case"DELETE":this.asset=void 0}}"attribute"===t.eventType&&this.asset&&(this.asset=e.Util.updateAsset(this.asset,t),this.requestUpdate())}getCardConfig(){let t=this.config||oo;return this.asset&&t.assetTypes&&t.assetTypes.hasOwnProperty(this.asset.type)?t.assetTypes[this.asset.type]:t.default}render(){if(!this.asset)return rt``;const t=this.getIcon(),n=this.getColor(),i=n?"--internal-or-map-asset-card-header-color: #"+n+";":"",r=this.getCardConfig(),o=Object.values(this.asset.attributes).filter((t=>"location"!==t.name)),a=r&&r.include?r.include:void 0,s=r&&r.exclude?r.exclude:[],l=o.filter((t=>!(a&&!(a.indexOf(t.name)>=0)||s&&!(s.indexOf(t.name)<0)||t.meta&&t.meta.hasOwnProperty("showOnDashboard")&&!e.Util.getMetaValue("showOnDashboard",t)))).sort(e.Util.sortByString((t=>t.name))),c=se(this.markerconfig,this.asset.type);return rt`
|
|
854
|
+
`}updated(t){super.updated(t),t.has("_open")&&this._open&&this.open()}_onDialogOpened(){this.dispatchEvent(new Qr)}_onDialogClosed(t){if("close"===t&&this.dismissAction&&this.dismissAction.action)this.dismissAction.action(this);else if(t&&this.actions){const e=this.actions.find((e=>e.actionName===t));e&&e.action&&e.action(this)}this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0),this.dispatchEvent(new to(t))}_onBrowserNavigate(t){this.close("close")}};Yr([zt({type:String})],no.prototype,"heading",void 0),Yr([zt({type:Object,attribute:!1})],no.prototype,"content",void 0),Yr([zt({type:Array,attribute:!1})],no.prototype,"actions",void 0),Yr([zt({type:Object,attribute:!1})],no.prototype,"dismissAction",void 0),Yr([zt({type:Boolean})],no.prototype,"avatar",void 0),Yr([zt()],no.prototype,"styles",void 0),Yr([zt({attribute:!1})],no.prototype,"_open",void 0),Yr([Mt("#dialog")],no.prototype,"_mdcElem",void 0),no=Yr([Tt("or-mwc-dialog")],no);var io=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};class ro extends CustomEvent{constructor(t){super(ro.NAME,{bubbles:!0,composed:!0,detail:t})}}ro.NAME="or-map-asset-card-load-asset";const oo={default:{exclude:["notes"]},assetTypes:{}};let ao=class extends((0,e.subscribe)(n())(Ct)){constructor(){super(...arguments),this.useAssetColor=!0}static get styles(){return Qt}shouldUpdate(t){return(!t.has("assetId")||(this.title="",this.assetIds=this.assetId&&this.assetId.length>0?[this.assetId]:void 0,1!==t.size))&&super.shouldUpdate(t)}_onEvent(t){if("asset"===t.eventType){const e=t;switch(e.cause){case"READ":case"CREATE":case"UPDATE":this.asset=e.asset;break;case"DELETE":this.asset=void 0}}"attribute"===t.eventType&&this.asset&&(this.asset=e.Util.updateAsset(this.asset,t),this.requestUpdate())}getCardConfig(){let t=this.config||oo;return this.asset&&t.assetTypes&&t.assetTypes.hasOwnProperty(this.asset.type)?t.assetTypes[this.asset.type]:t.default}render(){if(!this.asset)return rt``;const t=this.getIcon(),n=this.getColor(),i=n?"--internal-or-map-asset-card-header-color: #"+n+";":"",r=this.getCardConfig(),o=Object.values(this.asset.attributes).filter((t=>"location"!==t.name)),a=r&&r.include?r.include:void 0,s=r&&r.exclude?r.exclude:[],l=o.filter((t=>!(a&&!(a.indexOf(t.name)>=0)||s&&!(s.indexOf(t.name)<0)||t.meta&&t.meta.hasOwnProperty("showOnDashboard")&&!e.Util.getMetaValue("showOnDashboard",t)))).sort(e.Util.sortByString((t=>t.name))),c=se(this.markerconfig,this.asset.type);return rt`
|
|
853
855
|
<div id="card-container" style="${i}">
|
|
854
856
|
<div id="header">
|
|
855
857
|
${t?rt`<or-icon icon="${t}"></or-icon>`:""}
|
package/dist/umd/index.js
CHANGED
|
@@ -558,7 +558,7 @@
|
|
|
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.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(){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`
|
|
562
562
|
<div class="mdc-radio-container">
|
|
563
563
|
${t?t.map((([t,e],n)=>(this.value===t&&(this._selectedIndex=n),rt`
|
|
564
564
|
<div id="field" class="mdc-form-field">
|
|
@@ -643,7 +643,9 @@
|
|
|
643
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}">
|
|
644
644
|
${we(null!=this.searchProvider,(()=>rt`
|
|
645
645
|
<label id="select-searchable" class="mdc-text-field mdc-text-field--filled">
|
|
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"
|
|
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">
|
|
647
|
+
<or-translate .value="${this.searchLabel}"></or-translate>
|
|
648
|
+
</span>
|
|
647
649
|
<input class="mdc-text-field__input" type="text"
|
|
648
650
|
@keyup="${t=>this.searchableValue=t.target.value}"
|
|
649
651
|
/>
|
|
@@ -789,7 +791,7 @@
|
|
|
789
791
|
`:""}
|
|
790
792
|
<span class="mdc-notched-outline__trailing"></span>
|
|
791
793
|
</span>
|
|
792
|
-
`}setCustomValidity(t){this.errorMessage=t;const e=this.shadowRoot.getElementById("elem");e&&e.setCustomValidity&&e.setCustomValidity(null!=t?t:""),this.reportValidity()}checkValidity(){const t=this.shadowRoot.getElementById("elem");let e=!0;return t&&t.validity&&(e=t.validity.valid),!e||this.type!==Br.JSON&&this.type!==Br.JSON_OBJECT||void 0!==this.value&&null!==this.value&&""===this._mdcComponent.value&&(e=!1),e}reportValidity(){const t=this.checkValidity();return this.isUiValid=t,this._mdcComponent&&(this._mdcComponent.valid=t),t}onValueChange(t,n,i){var r,o;let a,l=this.value;if("undefined"===n&&(l=null,n=void 0),"null"===n&&(l=void 0,n=null),"string"==typeof n)switch(this.type){case Br.CHECKBOX:case Br.SWITCH:n="on"===n;break;case Br.JSON:case Br.JSON_OBJECT:case Br.NUMBER:case Br.RANGE:if(""===n)n=null;else try{n=JSON.parse(n),this.type!==Br.JSON_OBJECT||"object"==typeof n&&!Array.isArray(n)||(n=this.value,a=cr.i18next.t("validation.invalidJSON"))}catch(t){n=this.value,a=this.type===Br.JSON||this.type==Br.JSON_OBJECT?cr.i18next.t("validation.invalidJSON"):cr.i18next.t("validation.invalidNumber")}break;case Br.DATETIME:if(""===n)n=null;else try{n=Date.parse(n)}catch(t){n=this.value,a=cr.i18next.t("validation.invalidDate")}}if(this.value=n,this.setCustomValidity(a),this.reportValidity(),this.type!==Br.CHECKBOX_LIST&&n!==l&&(this.type===Br.RANGE&&(this._mdcComponent.setValue(n),this._mdcComponent2&&(this._mdcComponent2.value=n)),this.dispatchEvent(new Pr(this.value,l,i))),null!=this.searchProvider&&this.type===Br.SELECT){const t=null===(o=null===(r=this.shadowRoot)||void 0===r?void 0:r.getElementById("select-searchable"))||void 0===o?void 0:o.children[1];t&&(this.searchableValue=void 0,t.value="")}this.type!==Br.CHECKBOX_LIST||e.Util.objectsEqual(n,l,!0)||this.dispatchEvent(new Pr(n,l,i))}get valid(){const t=this.shadowRoot.getElementById("elem");return!t||!t.checkValidity||t.checkValidity()}get currentValue(){const t=this.shadowRoot.getElementById("elem");if(t&&t.value)return t.value}resolveOptions(t){let n;return t&&t.length>0&&(n=t.map((t=>{if(Array.isArray(t))return t;{const n=""+t;return[t,cr.i18next.t(n,{defaultValue:e.Util.camelCaseToSentenceCase(n)})]}}))),n}getSelectedTextValue(t){const e=this.value,n=Array.isArray(e)?e:null!=e?[e]:void 0;if(!n)return"";const i=t||this.resolveOptions(this.options);return i&&n?n.map((t=>i.find((([e,n],i)=>t===e)))).map((t=>t?t[1]:"")).join(", "):""}};_r([Lt({type:Boolean})],Vr.prototype,"focused",void 0),_r([Lt()],Vr.prototype,"value",void 0),_r([Lt({type:String})],Vr.prototype,"type",void 0),_r([Lt({type:String})],Vr.prototype,"name",void 0),_r([Lt({type:Boolean})],Vr.prototype,"readonly",void 0),_r([Lt({type:Boolean})],Vr.prototype,"required",void 0),_r([Lt()],Vr.prototype,"max",void 0),_r([Lt()],Vr.prototype,"min",void 0),_r([Lt({type:Number})],Vr.prototype,"step",void 0),_r([Lt({type:Boolean})],Vr.prototype,"checked",void 0),_r([Lt({type:Boolean})],Vr.prototype,"indeterminate",void 0),_r([Lt({type:Number})],Vr.prototype,"maxLength",void 0),_r([Lt({type:Number})],Vr.prototype,"minLength",void 0),_r([Lt({type:Number})],Vr.prototype,"rows",void 0),_r([Lt({type:Number})],Vr.prototype,"cols",void 0),_r([Lt({type:Boolean})],Vr.prototype,"multiple",void 0),_r([Lt({type:String,attribute:!0,reflect:!1})],Vr.prototype,"pattern",void 0),_r([Lt({type:String})],Vr.prototype,"placeHolder",void 0),_r([Lt({type:Array})],Vr.prototype,"options",void 0),_r([Lt({type:Boolean})],Vr.prototype,"autoSelect",void 0),_r([Lt({type:Object})],Vr.prototype,"searchProvider",void 0),_r([Lt({type:String})],Vr.prototype,"icon",void 0),_r([Lt({type:String})],Vr.prototype,"iconColor",void 0),_r([Lt({type:String})],Vr.prototype,"iconOn",void 0),_r([Lt({type:String})],Vr.prototype,"iconTrailing",void 0),_r([Lt({type:Boolean})],Vr.prototype,"compact",void 0),_r([Lt({type:Boolean})],Vr.prototype,"comfortable",void 0),_r([Lt({type:Boolean})],Vr.prototype,"raised",void 0),_r([Lt({type:Boolean})],Vr.prototype,"action",void 0),_r([Lt({type:Boolean})],Vr.prototype,"unElevated",void 0),_r([Lt({type:Boolean})],Vr.prototype,"outlined",void 0),_r([Lt({type:Boolean})],Vr.prototype,"rounded",void 0),_r([Lt({type:Object})],Vr.prototype,"format",void 0),_r([Lt({type:Boolean})],Vr.prototype,"disableSliderNumberInput",void 0),_r([Lt({type:Boolean})],Vr.prototype,"fullWidth",void 0),_r([Lt({type:String})],Vr.prototype,"helperText",void 0),_r([Lt({type:Boolean})],Vr.prototype,"helperPersistent",void 0),_r([Lt({type:String,attribute:!0})],Vr.prototype,"validationMessage",void 0),_r([Lt({type:Boolean})],Vr.prototype,"autoValidate",void 0),_r([Lt({type:Boolean})],Vr.prototype,"charCounter",void 0),_r([Lt({type:String})],Vr.prototype,"label",void 0),_r([Lt({type:Boolean})],Vr.prototype,"disabled",void 0),_r([Lt({type:Boolean})],Vr.prototype,"continuous",void 0),_r([Lt({type:Boolean})],Vr.prototype,"resizeVertical",void 0),_r([Ot()],Vr.prototype,"isUiValid",void 0),_r([Ot()],Vr.prototype,"searchableValue",void 0),_r([Ot()],Vr.prototype,"errorMessage",void 0),Vr=_r([It("or-mwc-input")],Vr);var $r="mdc-dom-focus-sentinel",Ur=function(){function t(t,e){void 0===e&&(e={}),this.root=t,this.options=e,this.elFocusedBeforeTrapFocus=null}return t.prototype.trapFocus=function(){var t=this.getFocusableElements(this.root);if(0===t.length)throw new Error("FocusTrap: Element must have at least one focusable child.");this.elFocusedBeforeTrapFocus=document.activeElement instanceof HTMLElement?document.activeElement:null,this.wrapTabFocus(this.root,t),this.options.skipInitialFocus||this.focusInitialElement(t,this.options.initialFocusEl)},t.prototype.releaseFocus=function(){[].slice.call(this.root.querySelectorAll("."+$r)).forEach((function(t){t.parentElement.removeChild(t)})),this.elFocusedBeforeTrapFocus&&this.elFocusedBeforeTrapFocus.focus()},t.prototype.wrapTabFocus=function(t,e){var n=this.createSentinel(),i=this.createSentinel();n.addEventListener("focus",(function(){e.length>0&&e[e.length-1].focus()})),i.addEventListener("focus",(function(){e.length>0&&e[0].focus()})),t.insertBefore(n,t.children[0]),t.appendChild(i)},t.prototype.focusInitialElement=function(t,e){var n=0;e&&(n=Math.max(t.indexOf(e),0)),t[n].focus()},t.prototype.getFocusableElements=function(t){return[].slice.call(t.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button")).filter((function(t){var e="true"===t.getAttribute("aria-disabled")||null!=t.getAttribute("disabled")||null!=t.getAttribute("hidden")||"true"===t.getAttribute("aria-hidden"),n=t.tabIndex>=0&&t.getBoundingClientRect().width>0&&!t.classList.contains($r)&&!e,i=!1;if(n){var r=getComputedStyle(t);i="none"===r.display||"hidden"===r.visibility}return n&&!i}))},t.prototype.createSentinel=function(){var t=document.createElement("div");return t.setAttribute("tabindex","0"),t.setAttribute("aria-hidden","true"),t.classList.add($r),t},t}(),qr={CLOSING:"mdc-dialog--closing",OPEN:"mdc-dialog--open",OPENING:"mdc-dialog--opening",SCROLLABLE:"mdc-dialog--scrollable",SCROLL_LOCK:"mdc-dialog-scroll-lock",STACKED:"mdc-dialog--stacked"},Xr={ACTION_ATTRIBUTE:"data-mdc-dialog-action",BUTTON_DEFAULT_ATTRIBUTE:"data-mdc-dialog-button-default",BUTTON_SELECTOR:".mdc-dialog__button",CLOSED_EVENT:"MDCDialog:closed",CLOSE_ACTION:"close",CLOSING_EVENT:"MDCDialog:closing",CONTAINER_SELECTOR:".mdc-dialog__container",CONTENT_SELECTOR:".mdc-dialog__content",DESTROY_ACTION:"destroy",INITIAL_FOCUS_ATTRIBUTE:"data-mdc-dialog-initial-focus",OPENED_EVENT:"MDCDialog:opened",OPENING_EVENT:"MDCDialog:opening",SCRIM_SELECTOR:".mdc-dialog__scrim",SUPPRESS_DEFAULT_PRESS_SELECTOR:["textarea",".mdc-menu .mdc-list-item"].join(", "),SURFACE_SELECTOR:".mdc-dialog__surface"},jr={DIALOG_ANIMATION_CLOSE_TIME_MS:75,DIALOG_ANIMATION_OPEN_TIME_MS:150},Gr=function(t){function e(n){var i=t.call(this,Le(Le({},e.defaultAdapter),n))||this;return i.isOpen_=!1,i.animationFrame_=0,i.animationTimer_=0,i.layoutFrame_=0,i.escapeKeyAction_=Xr.CLOSE_ACTION,i.scrimClickAction_=Xr.CLOSE_ACTION,i.autoStackButtons_=!0,i.areButtonsStacked_=!1,i.suppressDefaultPressSelector=Xr.SUPPRESS_DEFAULT_PRESS_SELECTOR,i}return Se(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return qr},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Xr},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return jr},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addBodyClass:function(){},addClass:function(){},areButtonsStacked:function(){return!1},clickDefaultButton:function(){},eventTargetMatches:function(){return!1},getActionFromEvent:function(){return""},getInitialFocusEl:function(){return null},hasClass:function(){return!1},isContentScrollable:function(){return!1},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeBodyClass:function(){},removeClass:function(){},reverseButtons:function(){},trapFocus:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter.hasClass(qr.STACKED)&&this.setAutoStackButtons(!1)},e.prototype.destroy=function(){this.isOpen_&&this.close(Xr.DESTROY_ACTION),this.animationTimer_&&(clearTimeout(this.animationTimer_),this.handleAnimationTimerEnd_()),this.layoutFrame_&&(cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=0)},e.prototype.open=function(){var t=this;this.isOpen_=!0,this.adapter.notifyOpening(),this.adapter.addClass(qr.OPENING),this.runNextAnimationFrame_((function(){t.adapter.addClass(qr.OPEN),t.adapter.addBodyClass(qr.SCROLL_LOCK),t.layout(),t.animationTimer_=setTimeout((function(){t.handleAnimationTimerEnd_(),t.adapter.trapFocus(t.adapter.getInitialFocusEl()),t.adapter.notifyOpened()}),jr.DIALOG_ANIMATION_OPEN_TIME_MS)}))},e.prototype.close=function(t){var e=this;void 0===t&&(t=""),this.isOpen_&&(this.isOpen_=!1,this.adapter.notifyClosing(t),this.adapter.addClass(qr.CLOSING),this.adapter.removeClass(qr.OPEN),this.adapter.removeBodyClass(qr.SCROLL_LOCK),cancelAnimationFrame(this.animationFrame_),this.animationFrame_=0,clearTimeout(this.animationTimer_),this.animationTimer_=setTimeout((function(){e.adapter.releaseFocus(),e.handleAnimationTimerEnd_(),e.adapter.notifyClosed(t)}),jr.DIALOG_ANIMATION_CLOSE_TIME_MS))},e.prototype.isOpen=function(){return this.isOpen_},e.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction_},e.prototype.setEscapeKeyAction=function(t){this.escapeKeyAction_=t},e.prototype.getScrimClickAction=function(){return this.scrimClickAction_},e.prototype.setScrimClickAction=function(t){this.scrimClickAction_=t},e.prototype.getAutoStackButtons=function(){return this.autoStackButtons_},e.prototype.setAutoStackButtons=function(t){this.autoStackButtons_=t},e.prototype.getSuppressDefaultPressSelector=function(){return this.suppressDefaultPressSelector},e.prototype.setSuppressDefaultPressSelector=function(t){this.suppressDefaultPressSelector=t},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame((function(){t.layoutInternal_(),t.layoutFrame_=0}))},e.prototype.handleClick=function(t){if(this.adapter.eventTargetMatches(t.target,Xr.SCRIM_SELECTOR)&&""!==this.scrimClickAction_)this.close(this.scrimClickAction_);else{var e=this.adapter.getActionFromEvent(t);e&&this.close(e)}},e.prototype.handleKeydown=function(t){var e="Enter"===t.key||13===t.keyCode;if(e&&!this.adapter.getActionFromEvent(t)){var n=t.composedPath?t.composedPath()[0]:t.target,i=!this.adapter.eventTargetMatches(n,this.suppressDefaultPressSelector);e&&i&&this.adapter.clickDefaultButton()}},e.prototype.handleDocumentKeydown=function(t){("Escape"===t.key||27===t.keyCode)&&""!==this.escapeKeyAction_&&this.close(this.escapeKeyAction_)},e.prototype.layoutInternal_=function(){this.autoStackButtons_&&this.detectStackedButtons_(),this.detectScrollableContent_()},e.prototype.handleAnimationTimerEnd_=function(){this.animationTimer_=0,this.adapter.removeClass(qr.OPENING),this.adapter.removeClass(qr.CLOSING)},e.prototype.runNextAnimationFrame_=function(t){var e=this;cancelAnimationFrame(this.animationFrame_),this.animationFrame_=requestAnimationFrame((function(){e.animationFrame_=0,clearTimeout(e.animationTimer_),e.animationTimer_=setTimeout(t,0)}))},e.prototype.detectStackedButtons_=function(){this.adapter.removeClass(qr.STACKED);var t=this.adapter.areButtonsStacked();t&&this.adapter.addClass(qr.STACKED),t!==this.areButtonsStacked_&&(this.adapter.reverseButtons(),this.areButtonsStacked_=t)},e.prototype.detectScrollableContent_=function(){this.adapter.removeClass(qr.SCROLLABLE),this.adapter.isContentScrollable()&&this.adapter.addClass(qr.SCROLLABLE)},e}(Ne),Yr=Gr.strings,Kr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Se(e,t),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"escapeKeyAction",{get:function(){return this.foundation.getEscapeKeyAction()},set:function(t){this.foundation.setEscapeKeyAction(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrimClickAction",{get:function(){return this.foundation.getScrimClickAction()},set:function(t){this.foundation.setScrimClickAction(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoStackButtons",{get:function(){return this.foundation.getAutoStackButtons()},set:function(t){this.foundation.setAutoStackButtons(t)},enumerable:!0,configurable:!0}),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t){var e,n;void 0===t&&(t=function(t,e){return new Ur(t,e)});var i=this.root.querySelector(Yr.CONTAINER_SELECTOR);if(!i)throw new Error("Dialog component requires a "+Yr.CONTAINER_SELECTOR+" container element");this.container_=i,this.content_=this.root.querySelector(Yr.CONTENT_SELECTOR),this.buttons_=[].slice.call(this.root.querySelectorAll(Yr.BUTTON_SELECTOR)),this.defaultButton_=this.root.querySelector("["+Yr.BUTTON_DEFAULT_ATTRIBUTE+"]"),this.focusTrapFactory_=t,this.buttonRipples_=[];try{for(var r=Oe(this.buttons_),o=r.next();!o.done;o=r.next()){var a=o.value;this.buttonRipples_.push(new on(a))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},e.prototype.initialSyncWithDOM=function(){var t,e=this;this.focusTrap_=(t=this.container_,(0,this.focusTrapFactory_)(t,{initialFocusEl:this.getInitialFocusEl_()||void 0})),this.handleClick_=this.foundation.handleClick.bind(this.foundation),this.handleKeydown_=this.foundation.handleKeydown.bind(this.foundation),this.handleDocumentKeydown_=this.foundation.handleDocumentKeydown.bind(this.foundation),this.handleLayout_=this.layout.bind(this);var n=["resize","orientationchange"];this.handleOpening_=function(){n.forEach((function(t){return window.addEventListener(t,e.handleLayout_)})),document.addEventListener("keydown",e.handleDocumentKeydown_)},this.handleClosing_=function(){n.forEach((function(t){return window.removeEventListener(t,e.handleLayout_)})),document.removeEventListener("keydown",e.handleDocumentKeydown_)},this.listen("click",this.handleClick_),this.listen("keydown",this.handleKeydown_),this.listen(Yr.OPENING_EVENT,this.handleOpening_),this.listen(Yr.CLOSING_EVENT,this.handleClosing_)},e.prototype.destroy=function(){this.unlisten("click",this.handleClick_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(Yr.OPENING_EVENT,this.handleOpening_),this.unlisten(Yr.CLOSING_EVENT,this.handleClosing_),this.handleClosing_(),this.buttonRipples_.forEach((function(t){return t.destroy()})),t.prototype.destroy.call(this)},e.prototype.layout=function(){this.foundation.layout()},e.prototype.open=function(){this.foundation.open()},e.prototype.close=function(t){void 0===t&&(t=""),this.foundation.close(t)},e.prototype.getDefaultFoundation=function(){var t=this;return new Gr({addBodyClass:function(t){return document.body.classList.add(t)},addClass:function(e){return t.root.classList.add(e)},areButtonsStacked:function(){return e=t.buttons_,n=new Set,[].forEach.call(e,(function(t){return n.add(t.offsetTop)})),n.size>1;var e,n},clickDefaultButton:function(){return t.defaultButton_&&t.defaultButton_.click()},eventTargetMatches:function(t,e){return!!t&&Be(t,e)},getActionFromEvent:function(t){if(!t.target)return"";var e=Pe(t.target,"["+Yr.ACTION_ATTRIBUTE+"]");return e&&e.getAttribute(Yr.ACTION_ATTRIBUTE)},getInitialFocusEl:function(){return t.getInitialFocusEl_()},hasClass:function(e){return t.root.classList.contains(e)},isContentScrollable:function(){return!!(e=t.content_)&&e.scrollHeight>e.offsetHeight;var e},notifyClosed:function(e){return t.emit(Yr.CLOSED_EVENT,e?{action:e}:{})},notifyClosing:function(e){return t.emit(Yr.CLOSING_EVENT,e?{action:e}:{})},notifyOpened:function(){return t.emit(Yr.OPENED_EVENT,{})},notifyOpening:function(){return t.emit(Yr.OPENING_EVENT,{})},releaseFocus:function(){return t.focusTrap_.releaseFocus()},removeBodyClass:function(t){return document.body.classList.remove(t)},removeClass:function(e){return t.root.classList.remove(e)},reverseButtons:function(){t.buttons_.reverse(),t.buttons_.forEach((function(t){t.parentElement.appendChild(t)}))},trapFocus:function(){return t.focusTrap_.trapFocus()}})},e.prototype.getInitialFocusEl_=function(){return this.root.querySelector("["+Yr.INITIAL_FOCUS_ATTRIBUTE+"]")},e}(Me),Wr=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};const Jr=s(40),Zr=s(744);class Qr extends CustomEvent{constructor(){super(Qr.NAME,{bubbles:!0,composed:!0})}}Qr.NAME="or-mwc-dialog-opened";class to extends CustomEvent{constructor(t){super(to.NAME,{detail:t,bubbles:!0,composed:!0})}}to.NAME="or-mwc-dialog-closed";const eo=k`
|
|
794
|
+
`}setCustomValidity(t){this.errorMessage=t;const e=this.shadowRoot.getElementById("elem");e&&e.setCustomValidity&&e.setCustomValidity(null!=t?t:""),this.reportValidity()}checkValidity(){const t=this.shadowRoot.getElementById("elem");let e=!0;return t&&t.validity&&(e=t.validity.valid),!e||this.type!==Br.JSON&&this.type!==Br.JSON_OBJECT||void 0!==this.value&&null!==this.value&&""===this._mdcComponent.value&&(e=!1),e}reportValidity(){const t=this.checkValidity();return this.isUiValid=t,this._mdcComponent&&(this._mdcComponent.valid=t),t}onValueChange(t,n,i){var r,o;let a,l=this.value;if("undefined"===n&&(l=null,n=void 0),"null"===n&&(l=void 0,n=null),"string"==typeof n)switch(this.type){case Br.CHECKBOX:case Br.SWITCH:n="on"===n;break;case Br.JSON:case Br.JSON_OBJECT:case Br.NUMBER:case Br.RANGE:if(""===n)n=null;else try{n=JSON.parse(n),this.type!==Br.JSON_OBJECT||"object"==typeof n&&!Array.isArray(n)||(n=this.value,a=cr.i18next.t("validation.invalidJSON"))}catch(t){n=this.value,a=this.type===Br.JSON||this.type==Br.JSON_OBJECT?cr.i18next.t("validation.invalidJSON"):cr.i18next.t("validation.invalidNumber")}break;case Br.DATETIME:if(""===n)n=null;else try{n=Date.parse(n)}catch(t){n=this.value,a=cr.i18next.t("validation.invalidDate")}}if(this.value=n,this.setCustomValidity(a),this.reportValidity(),this.type!==Br.CHECKBOX_LIST&&n!==l&&(this.type===Br.RANGE&&(this._mdcComponent.setValue(n),this._mdcComponent2&&(this._mdcComponent2.value=n)),this.dispatchEvent(new Pr(this.value,l,i))),null!=this.searchProvider&&this.type===Br.SELECT){const t=null===(o=null===(r=this.shadowRoot)||void 0===r?void 0:r.getElementById("select-searchable"))||void 0===o?void 0:o.children[1];t&&(this.searchableValue=void 0,t.value="")}this.type!==Br.CHECKBOX_LIST||e.Util.objectsEqual(n,l,!0)||this.dispatchEvent(new Pr(n,l,i))}get valid(){const t=this.shadowRoot.getElementById("elem");return!t||!t.checkValidity||t.checkValidity()}get currentValue(){const t=this.shadowRoot.getElementById("elem");if(t&&t.value)return t.value}resolveOptions(t){let n;return t&&t.length>0&&(n=t.map((t=>{if(Array.isArray(t))return t;{const n=""+t;return[t,cr.i18next.t(n,{defaultValue:e.Util.camelCaseToSentenceCase(n)})]}}))),n}getSelectedTextValue(t){const e=this.value,n=Array.isArray(e)?e:null!=e?[e]:void 0;if(!n)return"";const i=t||this.resolveOptions(this.options);return i&&n?n.map((t=>i.find((([e,n],i)=>t===e)))).map((t=>t?t[1]:"")).join(", "):""}};_r([Lt({type:Boolean})],Vr.prototype,"focused",void 0),_r([Lt()],Vr.prototype,"value",void 0),_r([Lt({type:String})],Vr.prototype,"type",void 0),_r([Lt({type:String})],Vr.prototype,"name",void 0),_r([Lt({type:Boolean})],Vr.prototype,"readonly",void 0),_r([Lt({type:Boolean})],Vr.prototype,"required",void 0),_r([Lt()],Vr.prototype,"max",void 0),_r([Lt()],Vr.prototype,"min",void 0),_r([Lt({type:Number})],Vr.prototype,"step",void 0),_r([Lt({type:Boolean})],Vr.prototype,"checked",void 0),_r([Lt({type:Boolean})],Vr.prototype,"indeterminate",void 0),_r([Lt({type:Number})],Vr.prototype,"maxLength",void 0),_r([Lt({type:Number})],Vr.prototype,"minLength",void 0),_r([Lt({type:Number})],Vr.prototype,"rows",void 0),_r([Lt({type:Number})],Vr.prototype,"cols",void 0),_r([Lt({type:Boolean})],Vr.prototype,"multiple",void 0),_r([Lt({type:String,attribute:!0,reflect:!1})],Vr.prototype,"pattern",void 0),_r([Lt({type:String})],Vr.prototype,"placeHolder",void 0),_r([Lt({type:Array})],Vr.prototype,"options",void 0),_r([Lt({type:Boolean})],Vr.prototype,"autoSelect",void 0),_r([Lt({type:Object})],Vr.prototype,"searchProvider",void 0),_r([Lt({type:String})],Vr.prototype,"searchLabel",void 0),_r([Lt({type:String})],Vr.prototype,"icon",void 0),_r([Lt({type:String})],Vr.prototype,"iconColor",void 0),_r([Lt({type:String})],Vr.prototype,"iconOn",void 0),_r([Lt({type:String})],Vr.prototype,"iconTrailing",void 0),_r([Lt({type:Boolean})],Vr.prototype,"compact",void 0),_r([Lt({type:Boolean})],Vr.prototype,"comfortable",void 0),_r([Lt({type:Boolean})],Vr.prototype,"raised",void 0),_r([Lt({type:Boolean})],Vr.prototype,"action",void 0),_r([Lt({type:Boolean})],Vr.prototype,"unElevated",void 0),_r([Lt({type:Boolean})],Vr.prototype,"outlined",void 0),_r([Lt({type:Boolean})],Vr.prototype,"rounded",void 0),_r([Lt({type:Object})],Vr.prototype,"format",void 0),_r([Lt({type:Boolean})],Vr.prototype,"disableSliderNumberInput",void 0),_r([Lt({type:Boolean})],Vr.prototype,"fullWidth",void 0),_r([Lt({type:String})],Vr.prototype,"helperText",void 0),_r([Lt({type:Boolean})],Vr.prototype,"helperPersistent",void 0),_r([Lt({type:String,attribute:!0})],Vr.prototype,"validationMessage",void 0),_r([Lt({type:Boolean})],Vr.prototype,"autoValidate",void 0),_r([Lt({type:Boolean})],Vr.prototype,"charCounter",void 0),_r([Lt({type:String})],Vr.prototype,"label",void 0),_r([Lt({type:Boolean})],Vr.prototype,"disabled",void 0),_r([Lt({type:Boolean})],Vr.prototype,"continuous",void 0),_r([Lt({type:Boolean})],Vr.prototype,"resizeVertical",void 0),_r([Ot()],Vr.prototype,"isUiValid",void 0),_r([Ot()],Vr.prototype,"searchableValue",void 0),_r([Ot()],Vr.prototype,"errorMessage",void 0),Vr=_r([It("or-mwc-input")],Vr);var $r="mdc-dom-focus-sentinel",Ur=function(){function t(t,e){void 0===e&&(e={}),this.root=t,this.options=e,this.elFocusedBeforeTrapFocus=null}return t.prototype.trapFocus=function(){var t=this.getFocusableElements(this.root);if(0===t.length)throw new Error("FocusTrap: Element must have at least one focusable child.");this.elFocusedBeforeTrapFocus=document.activeElement instanceof HTMLElement?document.activeElement:null,this.wrapTabFocus(this.root,t),this.options.skipInitialFocus||this.focusInitialElement(t,this.options.initialFocusEl)},t.prototype.releaseFocus=function(){[].slice.call(this.root.querySelectorAll("."+$r)).forEach((function(t){t.parentElement.removeChild(t)})),this.elFocusedBeforeTrapFocus&&this.elFocusedBeforeTrapFocus.focus()},t.prototype.wrapTabFocus=function(t,e){var n=this.createSentinel(),i=this.createSentinel();n.addEventListener("focus",(function(){e.length>0&&e[e.length-1].focus()})),i.addEventListener("focus",(function(){e.length>0&&e[0].focus()})),t.insertBefore(n,t.children[0]),t.appendChild(i)},t.prototype.focusInitialElement=function(t,e){var n=0;e&&(n=Math.max(t.indexOf(e),0)),t[n].focus()},t.prototype.getFocusableElements=function(t){return[].slice.call(t.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button")).filter((function(t){var e="true"===t.getAttribute("aria-disabled")||null!=t.getAttribute("disabled")||null!=t.getAttribute("hidden")||"true"===t.getAttribute("aria-hidden"),n=t.tabIndex>=0&&t.getBoundingClientRect().width>0&&!t.classList.contains($r)&&!e,i=!1;if(n){var r=getComputedStyle(t);i="none"===r.display||"hidden"===r.visibility}return n&&!i}))},t.prototype.createSentinel=function(){var t=document.createElement("div");return t.setAttribute("tabindex","0"),t.setAttribute("aria-hidden","true"),t.classList.add($r),t},t}(),qr={CLOSING:"mdc-dialog--closing",OPEN:"mdc-dialog--open",OPENING:"mdc-dialog--opening",SCROLLABLE:"mdc-dialog--scrollable",SCROLL_LOCK:"mdc-dialog-scroll-lock",STACKED:"mdc-dialog--stacked"},Xr={ACTION_ATTRIBUTE:"data-mdc-dialog-action",BUTTON_DEFAULT_ATTRIBUTE:"data-mdc-dialog-button-default",BUTTON_SELECTOR:".mdc-dialog__button",CLOSED_EVENT:"MDCDialog:closed",CLOSE_ACTION:"close",CLOSING_EVENT:"MDCDialog:closing",CONTAINER_SELECTOR:".mdc-dialog__container",CONTENT_SELECTOR:".mdc-dialog__content",DESTROY_ACTION:"destroy",INITIAL_FOCUS_ATTRIBUTE:"data-mdc-dialog-initial-focus",OPENED_EVENT:"MDCDialog:opened",OPENING_EVENT:"MDCDialog:opening",SCRIM_SELECTOR:".mdc-dialog__scrim",SUPPRESS_DEFAULT_PRESS_SELECTOR:["textarea",".mdc-menu .mdc-list-item"].join(", "),SURFACE_SELECTOR:".mdc-dialog__surface"},jr={DIALOG_ANIMATION_CLOSE_TIME_MS:75,DIALOG_ANIMATION_OPEN_TIME_MS:150},Gr=function(t){function e(n){var i=t.call(this,Le(Le({},e.defaultAdapter),n))||this;return i.isOpen_=!1,i.animationFrame_=0,i.animationTimer_=0,i.layoutFrame_=0,i.escapeKeyAction_=Xr.CLOSE_ACTION,i.scrimClickAction_=Xr.CLOSE_ACTION,i.autoStackButtons_=!0,i.areButtonsStacked_=!1,i.suppressDefaultPressSelector=Xr.SUPPRESS_DEFAULT_PRESS_SELECTOR,i}return Se(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return qr},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Xr},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return jr},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addBodyClass:function(){},addClass:function(){},areButtonsStacked:function(){return!1},clickDefaultButton:function(){},eventTargetMatches:function(){return!1},getActionFromEvent:function(){return""},getInitialFocusEl:function(){return null},hasClass:function(){return!1},isContentScrollable:function(){return!1},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeBodyClass:function(){},removeClass:function(){},reverseButtons:function(){},trapFocus:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.adapter.hasClass(qr.STACKED)&&this.setAutoStackButtons(!1)},e.prototype.destroy=function(){this.isOpen_&&this.close(Xr.DESTROY_ACTION),this.animationTimer_&&(clearTimeout(this.animationTimer_),this.handleAnimationTimerEnd_()),this.layoutFrame_&&(cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=0)},e.prototype.open=function(){var t=this;this.isOpen_=!0,this.adapter.notifyOpening(),this.adapter.addClass(qr.OPENING),this.runNextAnimationFrame_((function(){t.adapter.addClass(qr.OPEN),t.adapter.addBodyClass(qr.SCROLL_LOCK),t.layout(),t.animationTimer_=setTimeout((function(){t.handleAnimationTimerEnd_(),t.adapter.trapFocus(t.adapter.getInitialFocusEl()),t.adapter.notifyOpened()}),jr.DIALOG_ANIMATION_OPEN_TIME_MS)}))},e.prototype.close=function(t){var e=this;void 0===t&&(t=""),this.isOpen_&&(this.isOpen_=!1,this.adapter.notifyClosing(t),this.adapter.addClass(qr.CLOSING),this.adapter.removeClass(qr.OPEN),this.adapter.removeBodyClass(qr.SCROLL_LOCK),cancelAnimationFrame(this.animationFrame_),this.animationFrame_=0,clearTimeout(this.animationTimer_),this.animationTimer_=setTimeout((function(){e.adapter.releaseFocus(),e.handleAnimationTimerEnd_(),e.adapter.notifyClosed(t)}),jr.DIALOG_ANIMATION_CLOSE_TIME_MS))},e.prototype.isOpen=function(){return this.isOpen_},e.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction_},e.prototype.setEscapeKeyAction=function(t){this.escapeKeyAction_=t},e.prototype.getScrimClickAction=function(){return this.scrimClickAction_},e.prototype.setScrimClickAction=function(t){this.scrimClickAction_=t},e.prototype.getAutoStackButtons=function(){return this.autoStackButtons_},e.prototype.setAutoStackButtons=function(t){this.autoStackButtons_=t},e.prototype.getSuppressDefaultPressSelector=function(){return this.suppressDefaultPressSelector},e.prototype.setSuppressDefaultPressSelector=function(t){this.suppressDefaultPressSelector=t},e.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame((function(){t.layoutInternal_(),t.layoutFrame_=0}))},e.prototype.handleClick=function(t){if(this.adapter.eventTargetMatches(t.target,Xr.SCRIM_SELECTOR)&&""!==this.scrimClickAction_)this.close(this.scrimClickAction_);else{var e=this.adapter.getActionFromEvent(t);e&&this.close(e)}},e.prototype.handleKeydown=function(t){var e="Enter"===t.key||13===t.keyCode;if(e&&!this.adapter.getActionFromEvent(t)){var n=t.composedPath?t.composedPath()[0]:t.target,i=!this.adapter.eventTargetMatches(n,this.suppressDefaultPressSelector);e&&i&&this.adapter.clickDefaultButton()}},e.prototype.handleDocumentKeydown=function(t){("Escape"===t.key||27===t.keyCode)&&""!==this.escapeKeyAction_&&this.close(this.escapeKeyAction_)},e.prototype.layoutInternal_=function(){this.autoStackButtons_&&this.detectStackedButtons_(),this.detectScrollableContent_()},e.prototype.handleAnimationTimerEnd_=function(){this.animationTimer_=0,this.adapter.removeClass(qr.OPENING),this.adapter.removeClass(qr.CLOSING)},e.prototype.runNextAnimationFrame_=function(t){var e=this;cancelAnimationFrame(this.animationFrame_),this.animationFrame_=requestAnimationFrame((function(){e.animationFrame_=0,clearTimeout(e.animationTimer_),e.animationTimer_=setTimeout(t,0)}))},e.prototype.detectStackedButtons_=function(){this.adapter.removeClass(qr.STACKED);var t=this.adapter.areButtonsStacked();t&&this.adapter.addClass(qr.STACKED),t!==this.areButtonsStacked_&&(this.adapter.reverseButtons(),this.areButtonsStacked_=t)},e.prototype.detectScrollableContent_=function(){this.adapter.removeClass(qr.SCROLLABLE),this.adapter.isContentScrollable()&&this.adapter.addClass(qr.SCROLLABLE)},e}(Ne),Yr=Gr.strings,Kr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Se(e,t),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"escapeKeyAction",{get:function(){return this.foundation.getEscapeKeyAction()},set:function(t){this.foundation.setEscapeKeyAction(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrimClickAction",{get:function(){return this.foundation.getScrimClickAction()},set:function(t){this.foundation.setScrimClickAction(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoStackButtons",{get:function(){return this.foundation.getAutoStackButtons()},set:function(t){this.foundation.setAutoStackButtons(t)},enumerable:!0,configurable:!0}),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t){var e,n;void 0===t&&(t=function(t,e){return new Ur(t,e)});var i=this.root.querySelector(Yr.CONTAINER_SELECTOR);if(!i)throw new Error("Dialog component requires a "+Yr.CONTAINER_SELECTOR+" container element");this.container_=i,this.content_=this.root.querySelector(Yr.CONTENT_SELECTOR),this.buttons_=[].slice.call(this.root.querySelectorAll(Yr.BUTTON_SELECTOR)),this.defaultButton_=this.root.querySelector("["+Yr.BUTTON_DEFAULT_ATTRIBUTE+"]"),this.focusTrapFactory_=t,this.buttonRipples_=[];try{for(var r=Oe(this.buttons_),o=r.next();!o.done;o=r.next()){var a=o.value;this.buttonRipples_.push(new on(a))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},e.prototype.initialSyncWithDOM=function(){var t,e=this;this.focusTrap_=(t=this.container_,(0,this.focusTrapFactory_)(t,{initialFocusEl:this.getInitialFocusEl_()||void 0})),this.handleClick_=this.foundation.handleClick.bind(this.foundation),this.handleKeydown_=this.foundation.handleKeydown.bind(this.foundation),this.handleDocumentKeydown_=this.foundation.handleDocumentKeydown.bind(this.foundation),this.handleLayout_=this.layout.bind(this);var n=["resize","orientationchange"];this.handleOpening_=function(){n.forEach((function(t){return window.addEventListener(t,e.handleLayout_)})),document.addEventListener("keydown",e.handleDocumentKeydown_)},this.handleClosing_=function(){n.forEach((function(t){return window.removeEventListener(t,e.handleLayout_)})),document.removeEventListener("keydown",e.handleDocumentKeydown_)},this.listen("click",this.handleClick_),this.listen("keydown",this.handleKeydown_),this.listen(Yr.OPENING_EVENT,this.handleOpening_),this.listen(Yr.CLOSING_EVENT,this.handleClosing_)},e.prototype.destroy=function(){this.unlisten("click",this.handleClick_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(Yr.OPENING_EVENT,this.handleOpening_),this.unlisten(Yr.CLOSING_EVENT,this.handleClosing_),this.handleClosing_(),this.buttonRipples_.forEach((function(t){return t.destroy()})),t.prototype.destroy.call(this)},e.prototype.layout=function(){this.foundation.layout()},e.prototype.open=function(){this.foundation.open()},e.prototype.close=function(t){void 0===t&&(t=""),this.foundation.close(t)},e.prototype.getDefaultFoundation=function(){var t=this;return new Gr({addBodyClass:function(t){return document.body.classList.add(t)},addClass:function(e){return t.root.classList.add(e)},areButtonsStacked:function(){return e=t.buttons_,n=new Set,[].forEach.call(e,(function(t){return n.add(t.offsetTop)})),n.size>1;var e,n},clickDefaultButton:function(){return t.defaultButton_&&t.defaultButton_.click()},eventTargetMatches:function(t,e){return!!t&&Be(t,e)},getActionFromEvent:function(t){if(!t.target)return"";var e=Pe(t.target,"["+Yr.ACTION_ATTRIBUTE+"]");return e&&e.getAttribute(Yr.ACTION_ATTRIBUTE)},getInitialFocusEl:function(){return t.getInitialFocusEl_()},hasClass:function(e){return t.root.classList.contains(e)},isContentScrollable:function(){return!!(e=t.content_)&&e.scrollHeight>e.offsetHeight;var e},notifyClosed:function(e){return t.emit(Yr.CLOSED_EVENT,e?{action:e}:{})},notifyClosing:function(e){return t.emit(Yr.CLOSING_EVENT,e?{action:e}:{})},notifyOpened:function(){return t.emit(Yr.OPENED_EVENT,{})},notifyOpening:function(){return t.emit(Yr.OPENING_EVENT,{})},releaseFocus:function(){return t.focusTrap_.releaseFocus()},removeBodyClass:function(t){return document.body.classList.remove(t)},removeClass:function(e){return t.root.classList.remove(e)},reverseButtons:function(){t.buttons_.reverse(),t.buttons_.forEach((function(t){t.parentElement.appendChild(t)}))},trapFocus:function(){return t.focusTrap_.trapFocus()}})},e.prototype.getInitialFocusEl_=function(){return this.root.querySelector("["+Yr.INITIAL_FOCUS_ATTRIBUTE+"]")},e}(Me),Wr=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};const Jr=s(40),Zr=s(744);class Qr extends CustomEvent{constructor(){super(Qr.NAME,{bubbles:!0,composed:!0})}}Qr.NAME="or-mwc-dialog-opened";class to extends CustomEvent{constructor(t){super(to.NAME,{detail:t,bubbles:!0,composed:!0})}}to.NAME="or-mwc-dialog-closed";const eo=k`
|
|
793
795
|
:host {
|
|
794
796
|
position: relative;
|
|
795
797
|
}
|
|
@@ -816,7 +818,7 @@
|
|
|
816
818
|
max-width: 1024px;
|
|
817
819
|
}
|
|
818
820
|
}
|
|
819
|
-
`;let no=class extends Ct{constructor(){super(...arguments),this._open=!1}static get styles(){return[k`${w(Jr)}`,k`${w(Zr)}`,eo]}get isOpen(){return!!this._mdcComponent&&this._mdcComponent.isOpen}setOpen(t){return this._open=!0,this}setHeading(t){return this.heading=t,this}setContent(t){return this.content=t,this}setActions(t){return this.actions=t,this}setDismissAction(t){return this.dismissAction=t,this}setStyles(t){return this.styles=t,this}setAvatar(t){return this.avatar=t,this}open(){this._mdcElem&&!this._mdcComponent&&(this._mdcComponent=new Kr(this._mdcElem),this._mdcComponent.scrimClickAction=this.dismissAction||null===this.dismissAction?"close":""),this._mdcComponent&&this._mdcComponent.open()}close(t){this._mdcComponent&&this._mdcComponent.close(t)}disconnectedCallback(){super.disconnectedCallback(),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0)}render(){return rt`
|
|
821
|
+
`;let no=class extends Ct{constructor(){super(...arguments),this._open=!1,this._popstateEventBind=t=>this._onBrowserNavigate(t)}static get styles(){return[k`${w(Jr)}`,k`${w(Zr)}`,eo]}get isOpen(){return!!this._mdcComponent&&this._mdcComponent.isOpen}setOpen(t){return this._open=!0,this}setHeading(t){return this.heading=t,this}setContent(t){return this.content=t,this}setActions(t){return this.actions=t,this}setDismissAction(t){return this.dismissAction=t,this}setStyles(t){return this.styles=t,this}setAvatar(t){return this.avatar=t,this}open(){this._mdcElem&&!this._mdcComponent&&(this._mdcComponent=new Kr(this._mdcElem),this._mdcComponent.scrimClickAction=this.dismissAction||null===this.dismissAction?"close":""),this._mdcComponent&&this._mdcComponent.open()}close(t){this._mdcComponent&&this._mdcComponent.close(t)}connectedCallback(){super.connectedCallback(),window.addEventListener("popstate",this._popstateEventBind)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this._popstateEventBind),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0)}render(){return rt`
|
|
820
822
|
${"string"==typeof this.styles?rt`<style>${this.styles}</style>`:this.styles||""}
|
|
821
823
|
|
|
822
824
|
<div id="dialog"
|
|
@@ -849,7 +851,7 @@
|
|
|
849
851
|
</div>
|
|
850
852
|
<div class="mdc-dialog__scrim"></div>
|
|
851
853
|
</div>
|
|
852
|
-
`}updated(t){super.updated(t),t.has("_open")&&this._open&&this.open()}_onDialogOpened(){this.dispatchEvent(new Qr)}_onDialogClosed(t){if("close"===t&&this.dismissAction&&this.dismissAction.action)this.dismissAction.action(this);else if(t&&this.actions){const e=this.actions.find((e=>e.actionName===t));e&&e.action&&e.action(this)}this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0),this.dispatchEvent(new to(t))}};Wr([Lt({type:String})],no.prototype,"heading",void 0),Wr([Lt({type:Object,attribute:!1})],no.prototype,"content",void 0),Wr([Lt({type:Array,attribute:!1})],no.prototype,"actions",void 0),Wr([Lt({type:Object,attribute:!1})],no.prototype,"dismissAction",void 0),Wr([Lt({type:Boolean})],no.prototype,"avatar",void 0),Wr([Lt()],no.prototype,"styles",void 0),Wr([Lt({attribute:!1})],no.prototype,"_open",void 0),Wr([zt("#dialog")],no.prototype,"_mdcElem",void 0),no=Wr([It("or-mwc-dialog")],no);var io=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};class ro extends CustomEvent{constructor(t){super(ro.NAME,{bubbles:!0,composed:!0,detail:t})}}ro.NAME="or-map-asset-card-load-asset";const oo={default:{exclude:["notes"]},assetTypes:{}};let ao=class extends((0,e.subscribe)(n())(Ct)){constructor(){super(...arguments),this.useAssetColor=!0}static get styles(){return Qt}shouldUpdate(t){return(!t.has("assetId")||(this.title="",this.assetIds=this.assetId&&this.assetId.length>0?[this.assetId]:void 0,1!==t.size))&&super.shouldUpdate(t)}_onEvent(t){if("asset"===t.eventType){const e=t;switch(e.cause){case"READ":case"CREATE":case"UPDATE":this.asset=e.asset;break;case"DELETE":this.asset=void 0}}"attribute"===t.eventType&&this.asset&&(this.asset=e.Util.updateAsset(this.asset,t),this.requestUpdate())}getCardConfig(){let t=this.config||oo;return this.asset&&t.assetTypes&&t.assetTypes.hasOwnProperty(this.asset.type)?t.assetTypes[this.asset.type]:t.default}render(){if(!this.asset)return rt``;const t=this.getIcon(),n=this.getColor(),i=n?"--internal-or-map-asset-card-header-color: #"+n+";":"",r=this.getCardConfig(),o=Object.values(this.asset.attributes).filter((t=>"location"!==t.name)),a=r&&r.include?r.include:void 0,l=r&&r.exclude?r.exclude:[],c=o.filter((t=>!(a&&!(a.indexOf(t.name)>=0)||l&&!(l.indexOf(t.name)<0)||t.meta&&t.meta.hasOwnProperty("showOnDashboard")&&!e.Util.getMetaValue("showOnDashboard",t)))).sort(e.Util.sortByString((t=>t.name))),s=le(this.markerconfig,this.asset.type);return rt`
|
|
854
|
+
`}updated(t){super.updated(t),t.has("_open")&&this._open&&this.open()}_onDialogOpened(){this.dispatchEvent(new Qr)}_onDialogClosed(t){if("close"===t&&this.dismissAction&&this.dismissAction.action)this.dismissAction.action(this);else if(t&&this.actions){const e=this.actions.find((e=>e.actionName===t));e&&e.action&&e.action(this)}this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0),this.dispatchEvent(new to(t))}_onBrowserNavigate(t){this.close("close")}};Wr([Lt({type:String})],no.prototype,"heading",void 0),Wr([Lt({type:Object,attribute:!1})],no.prototype,"content",void 0),Wr([Lt({type:Array,attribute:!1})],no.prototype,"actions",void 0),Wr([Lt({type:Object,attribute:!1})],no.prototype,"dismissAction",void 0),Wr([Lt({type:Boolean})],no.prototype,"avatar",void 0),Wr([Lt()],no.prototype,"styles",void 0),Wr([Lt({attribute:!1})],no.prototype,"_open",void 0),Wr([zt("#dialog")],no.prototype,"_mdcElem",void 0),no=Wr([It("or-mwc-dialog")],no);var io=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};class ro extends CustomEvent{constructor(t){super(ro.NAME,{bubbles:!0,composed:!0,detail:t})}}ro.NAME="or-map-asset-card-load-asset";const oo={default:{exclude:["notes"]},assetTypes:{}};let ao=class extends((0,e.subscribe)(n())(Ct)){constructor(){super(...arguments),this.useAssetColor=!0}static get styles(){return Qt}shouldUpdate(t){return(!t.has("assetId")||(this.title="",this.assetIds=this.assetId&&this.assetId.length>0?[this.assetId]:void 0,1!==t.size))&&super.shouldUpdate(t)}_onEvent(t){if("asset"===t.eventType){const e=t;switch(e.cause){case"READ":case"CREATE":case"UPDATE":this.asset=e.asset;break;case"DELETE":this.asset=void 0}}"attribute"===t.eventType&&this.asset&&(this.asset=e.Util.updateAsset(this.asset,t),this.requestUpdate())}getCardConfig(){let t=this.config||oo;return this.asset&&t.assetTypes&&t.assetTypes.hasOwnProperty(this.asset.type)?t.assetTypes[this.asset.type]:t.default}render(){if(!this.asset)return rt``;const t=this.getIcon(),n=this.getColor(),i=n?"--internal-or-map-asset-card-header-color: #"+n+";":"",r=this.getCardConfig(),o=Object.values(this.asset.attributes).filter((t=>"location"!==t.name)),a=r&&r.include?r.include:void 0,l=r&&r.exclude?r.exclude:[],c=o.filter((t=>!(a&&!(a.indexOf(t.name)>=0)||l&&!(l.indexOf(t.name)<0)||t.meta&&t.meta.hasOwnProperty("showOnDashboard")&&!e.Util.getMetaValue("showOnDashboard",t)))).sort(e.Util.sortByString((t=>t.name))),s=le(this.markerconfig,this.asset.type);return rt`
|
|
853
855
|
<div id="card-container" style="${i}">
|
|
854
856
|
<div id="header">
|
|
855
857
|
${t?rt`<or-icon icon="${t}"></or-icon>`:""}
|