iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 11.3 kB
JavaScript
/*! For license information please see 66031.1044c1cce59afcc8.js.LICENSE.txt */
export const __webpack_ids__=["66031"];export const __webpack_modules__={36204:function(t,e,o){o.d(e,{o:()=>l});var n=o(9065),r=o(80573),i={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},d=function(t){function e(o){var r=t.call(this,(0,n.__assign)((0,n.__assign)({},e.defaultAdapter),o))||this;return r.shakeAnimationEndHandler=function(){r.handleShakeAnimationEnd()},r}return(0,n.__extends)(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return i},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.getWidth=function(){return this.adapter.getWidth()},e.prototype.shake=function(t){var o=e.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(o):this.adapter.removeClass(o)},e.prototype.float=function(t){var o=e.cssClasses,n=o.LABEL_FLOAT_ABOVE,r=o.LABEL_SHAKE;t?this.adapter.addClass(n):(this.adapter.removeClass(n),this.adapter.removeClass(r))},e.prototype.setRequired=function(t){var o=e.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(o):this.adapter.removeClass(o)},e.prototype.handleShakeAnimationEnd=function(){var t=e.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},e}(r.K);var a=o(45779);class s extends a.Xe{constructor(t){switch(super(t),this.foundation=null,this.previousPart=null,t.type){case a.pX.ATTRIBUTE:case a.pX.PROPERTY:break;default:throw new Error("FloatingLabel directive only support attribute and property parts")}}update(t,[e]){if(t!==this.previousPart){this.foundation&&this.foundation.destroy(),this.previousPart=t;const e=t.element;e.classList.add("mdc-floating-label");const o=(t=>({addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),getWidth:()=>t.scrollWidth,registerInteractionHandler:(e,o)=>{t.addEventListener(e,o)},deregisterInteractionHandler:(e,o)=>{t.removeEventListener(e,o)}}))(e);this.foundation=new d(o),this.foundation.init()}return this.render(e)}render(t){return this.foundation}}const l=(0,a.XM)(s)},9219:function(t,e,o){o.d(e,{_:()=>l});var n=o(9065),r=o(80573),i={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},d=function(t){function e(o){var r=t.call(this,(0,n.__assign)((0,n.__assign)({},e.defaultAdapter),o))||this;return r.transitionEndHandler=function(t){r.handleTransitionEnd(t)},r}return(0,n.__extends)(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return i},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},e.prototype.activate=function(){this.adapter.removeClass(i.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(i.LINE_RIPPLE_ACTIVE)},e.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},e.prototype.deactivate=function(){this.adapter.addClass(i.LINE_RIPPLE_DEACTIVATING)},e.prototype.handleTransitionEnd=function(t){var e=this.adapter.hasClass(i.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&e&&(this.adapter.removeClass(i.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(i.LINE_RIPPLE_DEACTIVATING))},e}(r.K);var a=o(45779);class s extends a.Xe{constructor(t){switch(super(t),this.previousPart=null,this.foundation=null,t.type){case a.pX.ATTRIBUTE:case a.pX.PROPERTY:return;default:throw new Error("LineRipple only support attribute and property parts.")}}update(t,e){if(this.previousPart!==t){this.foundation&&this.foundation.destroy(),this.previousPart=t;const e=t.element;e.classList.add("mdc-line-ripple");const o=(t=>({addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),hasClass:e=>t.classList.contains(e),setStyle:(e,o)=>t.style.setProperty(e,o),registerEventHandler:(e,o)=>{t.addEventListener(e,o)},deregisterEventHandler:(e,o)=>{t.removeEventListener(e,o)}}))(e);this.foundation=new d(o),this.foundation.init()}return this.render()}render(){return this.foundation}}const l=(0,a.XM)(s)},47268:function(t,e,o){var n=o(9065),r=o(15093),i=o(11911),d=o(80573),a={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},s={NOTCH_ELEMENT_PADDING:8},l={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},c=function(t){function e(o){return t.call(this,(0,n.__assign)((0,n.__assign)({},e.defaultAdapter),o))||this}return(0,n.__extends)(e,t),Object.defineProperty(e,"strings",{get:function(){return a},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return l},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return s},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.notch=function(t){var o=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=s.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(o)},e.prototype.closeNotch=function(){var t=e.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(t),this.adapter.removeNotchWidthProperty()},e}(d.K);var h=o(57243),p=o(35359);class u extends i.H{constructor(){super(...arguments),this.mdcFoundationClass=c,this.width=0,this.open=!1,this.lastOpen=this.open}createAdapter(){return{addClass:t=>this.mdcRoot.classList.add(t),removeClass:t=>this.mdcRoot.classList.remove(t),setNotchWidthProperty:t=>this.notchElement.style.setProperty("width",`${t}px`),removeNotchWidthProperty:()=>this.notchElement.style.removeProperty("width")}}openOrClose(t,e){this.mdcFoundation&&(t&&void 0!==e?this.mdcFoundation.notch(e):this.mdcFoundation.closeNotch())}render(){this.openOrClose(this.open,this.width);const t=(0,p.$)({"mdc-notched-outline--notched":this.open});return h.dy` <span class="mdc-notched-outline ${t}"> <span class="mdc-notched-outline__leading"></span> <span class="mdc-notched-outline__notch"> <slot></slot> </span> <span class="mdc-notched-outline__trailing"></span> </span>`}}(0,n.__decorate)([(0,r.IO)(".mdc-notched-outline")],u.prototype,"mdcRoot",void 0),(0,n.__decorate)([(0,r.Cb)({type:Number})],u.prototype,"width",void 0),(0,n.__decorate)([(0,r.Cb)({type:Boolean,reflect:!0})],u.prototype,"open",void 0),(0,n.__decorate)([(0,r.IO)(".mdc-notched-outline__notch")],u.prototype,"notchElement",void 0);const m=h.iv`.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}.mdc-notched-outline[dir=rtl],[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}.mdc-notched-outline__leading[dir=rtl],[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}.mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / .75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl],[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}:host([dir=rtl]),[dir=rtl] :host{text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / .75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px)}.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl],[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-bottom-left-radius:0} {.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-shape-small,4px))}} {.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-shape-small,4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small,4px);border-bottom-left-radius:0}.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl],[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small,4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small,4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color,var(--mdc-theme-primary,#6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width,1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset,0)}`;let _=class extends u{};_.styles=[m],_=(0,n.__decorate)([(0,r.Mo)("mwc-notched-outline")],_)}};
//# sourceMappingURL=66031.1044c1cce59afcc8.js.map