|
1 | | -import{p as fe,b as P,a as Z,r as S,j as d}from"./index-CuCgt-_Q.js";import{P as me}from"./PageHeader-BgVTdIzy.js";import{bx as ge,by as ve,m as b,aF as z,bz as H,u as A,bA as j,_ as a,b as g,o as x,bB as B,bC as be,bD as q,F as V,r as I,v as ie,bE as se,k as xe,l as ye,j as we,f as $e,g as ke,c as Ce,d as Se,D as Ie,bF as Fe,y as k,z as N,G as K,I as M,bG as y,K as T,bH as _e,bI as Te,bJ as L,bK as Le,Q as re,R as h,bL as ae,bM as Ee,B as Ae,E as w,C as Be,bN as le,bO as de,bP as Ve,bQ as Ne,bR as Re,J as De,bS as Pe,bT as Me,bU as ze,bV as He,bW as je,bX as qe,M as Ke,X as Ue,bY as X,aK as We,aL as J,bZ as Ge,b_ as Oe,a0 as Ze,a3 as Xe,Z as Je,$ as f,a6 as Qe,a8 as Ye,b$ as et,c0 as Q,a4 as Y,a5 as ee,a2 as ce,au as tt,w as U,an as W,aq as ot,ar as nt,as as _}from"./App-CST8Y6FE.js";import{c as te}from"./repeat-CUVrx7pN.js";import{r as it}from"./mgt-spinner-C5njrahq.js";import{D as st}from"./index-Con2QJjF.js";import{f as rt}from"./index-KJZo-YKE.js";import{r as at}from"./mgt-file-list-DH3EhD3g.js";import{r as lt}from"./mgt-picker-86HQay_x.js";import"./mgt-file-C-K6eRxv.js";import"./mgt-get-Ce_nKt01.js";class dt extends ve{constructor(t,e){super(t,e),this.observer=null,e.childList=!0}observe(){this.observer===null&&(this.observer=new MutationObserver(this.handleEvent.bind(this))),this.observer.observe(this.target,this.options)}disconnect(){this.observer.disconnect()}getNodes(){return"subtree"in this.options?Array.from(this.target.querySelectorAll(this.options.selector)):Array.from(this.target.childNodes)}}function ct(n){return typeof n=="string"&&(n={property:n}),new ge("fast-children",dt,n)}const ht=(n,t)=>b` |
| 1 | +import{p as fe,b as P,a as Z,r as S,j as d}from"./index-CUIyG1wb.js";import{P as me}from"./PageHeader-CaxvQlgU.js";import{bx as ge,by as ve,m as b,aF as z,bz as H,u as A,bA as j,_ as a,b as g,o as x,bB as B,bC as be,bD as q,F as V,r as I,v as ie,bE as se,k as xe,l as ye,j as we,f as $e,g as ke,c as Ce,d as Se,D as Ie,bF as Fe,y as k,z as N,G as K,I as M,bG as y,K as T,bH as _e,bI as Te,bJ as L,bK as Le,Q as re,R as h,bL as ae,bM as Ee,B as Ae,E as w,C as Be,bN as le,bO as de,bP as Ve,bQ as Ne,bR as Re,J as De,bS as Pe,bT as Me,bU as ze,bV as He,bW as je,bX as qe,M as Ke,X as Ue,bY as X,aK as We,aL as J,bZ as Ge,b_ as Oe,a0 as Ze,a3 as Xe,Z as Je,$ as f,a6 as Qe,a8 as Ye,b$ as et,c0 as Q,a4 as Y,a5 as ee,a2 as ce,au as tt,w as U,an as W,aq as ot,ar as nt,as as _}from"./App-B6S7UShP.js";import{c as te}from"./repeat-B9aMobyH.js";import{r as it}from"./mgt-spinner-DVktg0Ba.js";import{D as st}from"./index-CvJyBokB.js";import{f as rt}from"./index-D41GWJEh.js";import{r as at}from"./mgt-file-list-Bj8TlzDw.js";import{r as lt}from"./mgt-picker-C8WI9eOq.js";import"./mgt-file-C6LDyJdu.js";import"./mgt-get-BSVtnumE.js";class dt extends ve{constructor(t,e){super(t,e),this.observer=null,e.childList=!0}observe(){this.observer===null&&(this.observer=new MutationObserver(this.handleEvent.bind(this))),this.observer.observe(this.target,this.options)}disconnect(){this.observer.disconnect()}getNodes(){return"subtree"in this.options?Array.from(this.target.querySelectorAll(this.options.selector)):Array.from(this.target.childNodes)}}function ct(n){return typeof n=="string"&&(n={property:n}),new ge("fast-children",dt,n)}const ht=(n,t)=>b` |
2 | 2 | <a |
3 | 3 | class="control" |
4 | 4 | part="control" |
@@ -474,7 +474,7 @@ import{p as fe,b as P,a as Z,r as S,j as d}from"./index-CuCgt-_Q.js";import{P as |
474 | 474 | ${this.strings.loadingMessage} |
475 | 475 | </div> |
476 | 476 | </div> |
477 | | - `,this.onKeydownTreeView=t=>{t.key==="Escape"&&this.lostFocus()},this.handleTeamTreeItemClick=t=>{t.preventDefault(),t.stopImmediatePropagation();const e=t.target;e&&(e.getAttribute("expanded")?e.removeAttribute("expanded"):e.setAttribute("expanded","true"),e.removeAttribute("selected"),e.getAttribute("id")&&e.setAttribute("selected","true"))},this.handleInputChanged=t=>{const e=t.target;if(this._inputValue!==(e==null?void 0:e.value))this._inputValue=e==null?void 0:e.value;else return;t.key!=="Tab"&&t.key!=="Enter"&&t.key!=="Escape"&&this.gainedFocus(),this.debouncedSearch||(this.debouncedSearch=et(()=>{this.filterList()},400)),this.debouncedSearch()},this.loadTeamsIfNotLoaded=()=>{!this.items&&this._task.status!==Q.PENDING&&this._task.run()},this.handleWindowClick=t=>{t.target!==this&&this.lostFocus()},this.gainedFocus=()=>{const t=this._input;t&&t.focus(),this._isDropdownVisible=!0,this.toggleChevron(),this.resetFocusState(),this.requestUpdate()},this.lostFocus=()=>{this._inputValue="",this._input&&(this._input.value=this._inputValue,this._input.textContent="");const t=this._inputWrapper;t&&(t.value="",t.blur()),this._isDropdownVisible=!1,this.filterList(),this.toggleChevron(),this.requestUpdate(),this._selectedItemState!==void 0&&this.showCloseIcon()},this.handleFocus=()=>{this.gainedFocus()},this.handleUpChevronClick=t=>{t.stopPropagation(),this.lostFocus()},this.handleChevronKeydown=t=>{if(t.key==="Tab")this.blurPicker();else if(t.key==="Enter"){t.preventDefault();const e=t.target;e.classList.contains("down-chevron")?this.gainedFocus():e.classList.contains("up-chevron")&&this.lostFocus()}},this.handleStartSlotKeydown=t=>{t.key==="Tab"&&t.shiftKey&&this.blurPicker()},this.blurPicker=()=>{const t=this._inputWrapper,e=this._input;t==null||t.blur(),e==null||e.blur()},this._inputValue="",this._treeViewState=[],this._focusList=[],this._isDropdownVisible=!1}connectedCallback(){super.connectedCallback(),window.addEventListener("click",this.handleWindowClick),this.addEventListener("focus",this.loadTeamsIfNotLoaded),this.addEventListener("mouseover",this.loadTeamsIfNotLoaded),this.addEventListener("blur",this.lostFocus);const t=this.renderRoot.ownerDocument;t&&t.documentElement.setAttribute("dir",this.direction)}disconnectedCallback(){window.removeEventListener("click",this.handleWindowClick),this.removeEventListener("focus",this.loadTeamsIfNotLoaded),this.removeEventListener("mouseover",this.loadTeamsIfNotLoaded),this.removeEventListener("blur",this.lostFocus),super.disconnectedCallback()}args(){return[]}selectChannelById(t){return ne(this,void 0,void 0,function*(){const e=P.globalProvider;if(e&&e.state===Z.SignedIn){this.items||(yield this._task.run());for(const o of this._treeViewState)for(const s of o.channels)if(s.item.id===t)return o.isExpanded=!0,this.selectChannel(s),this.markSelectedChannelInDropdown(t),!0}return!1})}markSelectedChannelInDropdown(t){const e=this.renderRoot.querySelector(`[id='${t}']`);e&&(e.setAttribute("selected","true"),e.parentElement&&e.parentElement.setAttribute("expanded","true"))}renderSelected(){var t,e,o,s,i,r;if(!this._selectedItemState)return this.renderSearchIcon();let l;if(this._selectedItemState.parent.channels){const p=(t=this.teamsPhotos[this._selectedItemState.parent.item.id])===null||t===void 0?void 0:t.photo;l=f`<img |
| 477 | + `,this.onKeydownTreeView=t=>{t.key==="Escape"&&this.lostFocus()},this.handleTeamTreeItemClick=t=>{t.preventDefault(),t.stopImmediatePropagation();const e=t.target;e&&(e.hasAttribute("expanded")?e.removeAttribute("expanded"):e.setAttribute("expanded","true"),e.hasAttribute("id")?e.setAttribute("selected","true"):e.removeAttribute("selected"))},this.handleInputChanged=t=>{const e=t.target;if(this._inputValue!==(e==null?void 0:e.value))this._inputValue=e==null?void 0:e.value;else return;t.key!=="Tab"&&t.key!=="Enter"&&t.key!=="Escape"&&this.gainedFocus(),this.debouncedSearch||(this.debouncedSearch=et(()=>{this.filterList()},400)),this.debouncedSearch()},this.loadTeamsIfNotLoaded=()=>{!this.items&&this._task.status!==Q.PENDING&&this._task.run()},this.handleWindowClick=t=>{t.target!==this&&this.lostFocus()},this.gainedFocus=()=>{const t=this._input;t&&t.focus(),this._isDropdownVisible=!0,this.toggleChevron(),this.resetFocusState(),this.requestUpdate()},this.lostFocus=()=>{this._inputValue="",this._input&&(this._input.value=this._inputValue,this._input.textContent="");const t=this._inputWrapper;t&&(t.value="",t.blur()),this._isDropdownVisible=!1,this.filterList(),this.toggleChevron(),this.requestUpdate(),this._selectedItemState!==void 0&&this.showCloseIcon()},this.handleFocus=()=>{this.gainedFocus()},this.handleUpChevronClick=t=>{t.stopPropagation(),this.lostFocus()},this.handleChevronKeydown=t=>{if(t.key==="Tab")this.blurPicker();else if(t.key==="Enter"){t.preventDefault();const e=t.target;e.classList.contains("down-chevron")?this.gainedFocus():e.classList.contains("up-chevron")&&this.lostFocus()}},this.handleStartSlotKeydown=t=>{t.key==="Tab"&&t.shiftKey&&this.blurPicker()},this.blurPicker=()=>{const t=this._inputWrapper,e=this._input;t==null||t.blur(),e==null||e.blur()},this._inputValue="",this._treeViewState=[],this._focusList=[],this._isDropdownVisible=!1}connectedCallback(){super.connectedCallback(),window.addEventListener("click",this.handleWindowClick),this.addEventListener("focus",this.loadTeamsIfNotLoaded),this.addEventListener("mouseover",this.loadTeamsIfNotLoaded),this.addEventListener("blur",this.lostFocus);const t=this.renderRoot.ownerDocument;t&&t.documentElement.setAttribute("dir",this.direction)}disconnectedCallback(){window.removeEventListener("click",this.handleWindowClick),this.removeEventListener("focus",this.loadTeamsIfNotLoaded),this.removeEventListener("mouseover",this.loadTeamsIfNotLoaded),this.removeEventListener("blur",this.lostFocus),super.disconnectedCallback()}args(){return[]}selectChannelById(t){return ne(this,void 0,void 0,function*(){const e=P.globalProvider;if(e&&e.state===Z.SignedIn){this.items||(yield this._task.run());for(const o of this._treeViewState)for(const s of o.channels)if(s.item.id===t)return o.isExpanded=!0,this.selectChannel(s),this.markSelectedChannelInDropdown(t),!0}return!1})}markSelectedChannelInDropdown(t){const e=this.renderRoot.querySelector(`[id='${t}']`);e&&(e.setAttribute("selected","true"),e.parentElement&&e.parentElement.setAttribute("expanded","true"))}renderSelected(){var t,e,o,s,i,r;if(!this._selectedItemState)return this.renderSearchIcon();let l;if(this._selectedItemState.parent.channels){const p=(t=this.teamsPhotos[this._selectedItemState.parent.item.id])===null||t===void 0?void 0:t.photo;l=f`<img |
478 | 478 | class="team-photo" |
479 | 479 | alt="${this._selectedItemState.parent.item.displayName}" |
480 | 480 | role="img" |
|
0 commit comments