homeassistant/custom_components/hacs/hacs_frontend_experimental/frontend_latest/1049.ub548fxmuzk.js

7 lines
17 KiB
JavaScript
Raw Permalink Normal View History

2025-01-10 21:08:35 -08:00
/*! For license information please see 1049.ub548fxmuzk.js.LICENSE.txt */
export const id=1049;export const ids=[1049];export const modules={92295:(e,t,i)=>{var d=i(309),l=i(14271),a=i(5095),o=i(95260),n=i(3712);(0,d.Z)([(0,o.Mo)("ha-button")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[n.W,a.iv`::slotted([slot=icon]){margin-inline-start:0px;margin-inline-end:8px;direction:var(--direction);display:block}.mdc-button{height:var(--button-height,36px)}.trailing-icon{display:flex}.slot-container{overflow:var(--button-slot-container-overflow,visible)}`]}]}}),l.z)},1049:(e,t,i)=>{i.r(t),i.d(t,{HaTextSelector:()=>s});var d=i(309),l=i(5095),a=i(95260),o=i(4771),n=i(18394),r=(i(54371),i(29950));i(92295),i(51520);(0,d.Z)([(0,a.Mo)("ha-multi-textfield")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"value",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,a.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"inputType",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"inputSuffix",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"inputPrefix",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"autocomplete",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"addLabel",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"removeLabel",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:"item-index",type:Boolean})],key:"itemIndex",value:()=>!1},{kind:"method",key:"render",value:function(){var e,t,i;return l.dy` ${this._items.map(((e,t)=>{var i,d,a;const o=""+(this.itemIndex?` ${t+1}`:"");return l.dy` <div class="layout horizontal center-center row"> <ha-textfield .suffix="${this.inputSuffix}" .prefix="${this.inputPrefix}" .type="${this.inputType}" .autocomplete="${this.autocomplete}" .disabled="${this.disabled}" dialogInitialFocus="${t}" .index="${t}" class="flex-auto" .label="${""+(this.label?`${this.label}${o}`:"")}" .value="${e}" ?data-last="${t===this._items.length-1}" @input="${this._editItem}" @keydown="${this._keyDown}"></ha-textfield> <ha-icon-button .disabled="${this.disabled}" .index="${t}" slot="navigationIcon" .label="${null!==(i=null!==(d=this.removeLabel)&&void 0!==d?d:null===(a=this.hass)||void 0===a?void 0:a.localize("ui.common.remove"))&&void 0!==i?i:"Remove"}" @click="${this._removeItem}" .path="${"M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z"}"></ha-icon-button> </div> `}))} <div class="layout horizontal center-center"> <ha-button @click="${this._addItem}" .disabled="${this.disabled}"> ${null!==(e=null!==(t=this.addLabel)&&void 0!==t?t:null===(i=this.hass)||void 0===i?void 0:i.localize("ui.common.add"))&&void 0!==e?e:"Add"} <ha-svg-icon slot="icon" .path="${"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}"></ha-svg-icon> </ha-button> </div> `}},{kind:"get",key:"_items",value:function(){var e;return null!==(e=this.value)&&void 0!==e?e:[]}},{kind:"method",key:"_addItem",value:async function(){var e;const t=[...this._items,""];this._fireChanged(t),await this.updateComplete;const i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("ha-textfield[data-last]");null==i||i.focus()}},{kind:"method",key:"_editItem",value:async function(e){const t=e.target.index,i=[...this._items];i[t]=e.target.value,this._fireChanged(i)}},{kind:"method",key:"_keyDown",value:async function(e){"Enter"===e.key&&(e.stopPropagation(),this._addItem())}},{kind:"method",key:"_removeItem",value:async function(e){const t=e.target.index,i=[...this._items];i.splice(t,1),this._fireChanged(i)}},{kind:"method",key:"_fireChanged",value:function(e){this.value=e,(0,n.B)(this,"value-changed",{value:e})}},{kind:"get",static:!0,key:"styles",value:function(){return[r.Qx,l.iv`.row{margin-bottom:8px}ha-textfield{display:block}ha-icon-button{display:block}ha-button{margin-left:8px}`]}}]}}),l.oi
--mdc-typography-subtitle1-letter-spacing,
.009375em
);visibility:hidden;white-space:pre-wrap}:host([autogrow]) .mdc-text-field__input{position:absolute;height:calc(100% - 32px)}:host([autogrow]) .mdc-text-field.mdc-text-field--no-label:after{margin-top:16px;margin-bottom:16px}:host([dir=rtl]) .mdc-floating-label{right:16px;left:initial}`]}]}}),o.O)},51520:(e,t,i)=>{var d=i(309),l=i(34541),a=i(47838),o=i(42977),n=i(31338),r=i(5095),s=i(95260),c=i(67684);(0,d.Z)([(0,s.Mo)("ha-textfield")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"invalid",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)({attribute:"error-message"})],key:"errorMessage",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"icon",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"iconTrailing",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)()],key:"autocomplete",value:void 0},{kind:"field",decorators:[(0,s.Cb)()],key:"autocorrect",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:"input-spellcheck"})],key:"inputSpellcheck",value:void 0},{kind:"field",decorators:[(0,s.IO)("input")],key:"formElement",value:void 0},{kind:"method",key:"updated",value:function(e){(0,l.Z)((0,a.Z)(i.prototype),"updated",this).call(this,e),(e.has("invalid")&&(this.invalid||void 0!==e.get("invalid"))||e.has("errorMessage"))&&(this.setCustomValidity(this.invalid?this.errorMessage||"Invalid":""),this.reportValidity()),e.has("autocomplete")&&(this.autocomplete?this.formElement.setAttribute("autocomplete",this.autocomplete):this.formElement.removeAttribute("autocomplete")),e.has("autocorrect")&&(this.autocorrect?this.formElement.setAttribute("autocorrect",this.autocorrect):this.formElement.removeAttribute("autocorrect")),e.has("inputSpellcheck")&&(this.inputSpellcheck?this.formElement.setAttribute("spellcheck",this.inputSpellcheck):this.formElement.removeAttribute("spellcheck"))}},{kind:"method",key:"renderIcon",value:function(e,t=!1){const i=t?"trailing":"leading";return r.dy` <span class="mdc-text-field__icon mdc-text-field__icon--${i}" tabindex="${t?1:-1}"> <slot name="${i}Icon"></slot> </span> `}},{kind:"field",static:!0,key:"styles",value:()=>[n.W,r.iv`.mdc-text-field__input{width:var(--ha-textfield-input-width,100%)}.mdc-text-field:not(.mdc-text-field--with-leading-icon){padding:var(--text-field-padding,0px 16px)}.mdc-text-field__affix--suffix{padding-left:var(--text-field-suffix-padding-left,12px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,12px);padding-inline-end:var(--text-field-suffix-padding-right,0px);direction:var(--direction)}.mdc-text-field--with-leading-icon{padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,16px);direction:var(--direction)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:var(--text-field-suffix-padding-left,0px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,0px)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:var(--secondary-text-color)}.mdc-text-field__icon{color:var(--secondary-text-color)}.mdc-text-field__icon--leading{margin-inline-start:16px;margin-inline-end:8px;direction:var(--direction)}.mdc-text-field__icon--trailing{padding:var(--textfield-icon-trailing-padding,12px)}.mdc-floating-label:not(.mdc-floating-label--float-above){text-overflow:ellipsis;width:inherit;padding-right:30px;padding-inline-end:30px;padding-inline-start:initial;box-sizing:border-box;direction:var(--direction)}input{text-align:var(--text-field-text-align,start)}::-ms-reveal{display:none}:host([no-spinner]) input::-webkit-inner-spin-button,:host([no-spinner]) input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}:host([no-spinner]) input[type=number]{-moz-appearance:textfield}.mdc-text-field__ripple{overflow:hidden}.mdc-text-f
</textarea>`}}(0,d.__decorate)([(0,o.IO)("textarea")],u.prototype,"formElement",void 0),(0,d.__decorate)([(0,o.Cb)({type:Number})],u.prototype,"rows",void 0),(0,d.__decorate)([(0,o.Cb)({type:Number})],u.prototype,"cols",void 0),(0,d.__decorate)([(0,o.Cb)({converter:c})],u.prototype,"charCounter",void 0)},96791:(e,t,i)=>{i.d(t,{W:()=>d});const d=i(5095).iv`.mdc-text-field{height:100%}.mdc-text-field__input{resize:none}`}};
//# sourceMappingURL=1049.ub548fxmuzk.js.map