@tylertech/forge 2.24.1 → 2.24.2
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/custom-elements.json +2652 -2667
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/menu-button/index.js +1 -1
- package/dist/esm/app-bar/notification-button/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/app-bar/search/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/banner/index.js +1 -1
- package/dist/esm/bottom-sheet/index.js +1 -1
- package/dist/esm/busy-indicator/index.js +1 -1
- package/dist/esm/button/index.js +1 -1
- package/dist/esm/button-area/index.js +1 -1
- package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
- package/dist/esm/calendar/calendar-menu/index.js +1 -1
- package/dist/esm/calendar/index.js +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chips/chip/index.js +1 -1
- package/dist/esm/chips/chip-set/index.js +1 -1
- package/dist/esm/chips/index.js +1 -1
- package/dist/esm/chunks/{chunk.UUBAUAER.js → chunk.3MMDUUTN.js} +2 -2
- package/dist/esm/chunks/{chunk.KZDQFUNT.js → chunk.3V2VDOOP.js} +2 -2
- package/dist/esm/chunks/{chunk.Q2PGK4IA.js → chunk.4KKMVMPN.js} +2 -2
- package/dist/esm/chunks/{chunk.WLBRU5HI.js → chunk.5SM7UG6C.js} +2 -2
- package/dist/esm/chunks/{chunk.LJQO5G5I.js → chunk.6DVJ22IK.js} +2 -2
- package/dist/esm/chunks/{chunk.QRWYYBZC.js → chunk.6NARYF7U.js} +2 -2
- package/dist/esm/chunks/{chunk.QRWYYBZC.js.map → chunk.6NARYF7U.js.map} +3 -3
- package/dist/esm/chunks/{chunk.4APGDQHF.js → chunk.AFW54X3W.js} +2 -2
- package/dist/esm/chunks/chunk.AH4YGLZ4.js +7 -0
- package/dist/esm/chunks/chunk.AH4YGLZ4.js.map +7 -0
- package/dist/esm/chunks/chunk.AJTQHK25.js +7 -0
- package/dist/esm/chunks/chunk.AJTQHK25.js.map +7 -0
- package/dist/esm/chunks/{chunk.KMMOZ2SF.js → chunk.C3G25JFG.js} +2 -2
- package/dist/esm/chunks/chunk.CL4FTBLR.js +7 -0
- package/dist/esm/chunks/chunk.CL4FTBLR.js.map +7 -0
- package/dist/esm/chunks/{chunk.POBCKMFO.js → chunk.CYLDP7ML.js} +2 -2
- package/dist/esm/chunks/{chunk.HDHGU4L2.js → chunk.E3K6KM57.js} +2 -2
- package/dist/esm/chunks/{chunk.PTEWJ5PZ.js → chunk.EQEMCHMB.js} +2 -2
- package/dist/esm/chunks/{chunk.QBST3QSM.js → chunk.FEU4FTVQ.js} +2 -2
- package/dist/esm/chunks/{chunk.IPQDOSLO.js → chunk.FIZVVCUB.js} +2 -2
- package/dist/esm/chunks/{chunk.BQRXAJTH.js → chunk.JFAOCIGZ.js} +2 -2
- package/dist/esm/chunks/{chunk.4QVF44G5.js → chunk.K57IO236.js} +2 -2
- package/dist/esm/chunks/{chunk.K2O3KSP7.js → chunk.KGMCBPGV.js} +2 -2
- package/dist/esm/chunks/chunk.KYH5GKVI.js +7 -0
- package/dist/esm/chunks/chunk.KYH5GKVI.js.map +7 -0
- package/dist/esm/chunks/chunk.LEINPSKL.js +7 -0
- package/dist/esm/chunks/chunk.LEINPSKL.js.map +7 -0
- package/dist/esm/chunks/{chunk.V5L5DKNF.js → chunk.LFBYFJTX.js} +2 -2
- package/dist/esm/chunks/chunk.MKHU4IPO.js +7 -0
- package/dist/esm/chunks/chunk.MKHU4IPO.js.map +7 -0
- package/dist/esm/chunks/chunk.N6MAUMFI.js +7 -0
- package/dist/esm/chunks/chunk.N6MAUMFI.js.map +7 -0
- package/dist/esm/chunks/{chunk.USKQFX4N.js → chunk.OBBYRQCY.js} +2 -2
- package/dist/esm/chunks/chunk.OJ54J4L3.js +7 -0
- package/dist/esm/chunks/chunk.OJ54J4L3.js.map +7 -0
- package/dist/esm/chunks/chunk.OML7MHH6.js +29 -0
- package/dist/esm/chunks/chunk.OML7MHH6.js.map +7 -0
- package/dist/esm/chunks/chunk.OUORLMTZ.js +12 -0
- package/dist/esm/chunks/{chunk.U5DETNRU.js → chunk.QIGNMZRL.js} +2 -2
- package/dist/esm/chunks/{chunk.DNWMURCG.js → chunk.RHXQ2GMV.js} +2 -2
- package/dist/esm/chunks/{chunk.OLNY6ZNB.js → chunk.TLXWXBQO.js} +2 -2
- package/dist/esm/chunks/chunk.TMEYQXRR.js +7 -0
- package/dist/esm/chunks/chunk.TMEYQXRR.js.map +7 -0
- package/dist/esm/chunks/{chunk.VUHUEAJD.js → chunk.TUQWDTRA.js} +2 -2
- package/dist/esm/chunks/{chunk.VUHUEAJD.js.map → chunk.TUQWDTRA.js.map} +1 -1
- package/dist/esm/chunks/{chunk.EPFMWAIO.js → chunk.TVWUZYVG.js} +2 -2
- package/dist/esm/chunks/{chunk.AITARMT3.js → chunk.UNFOIEF6.js} +2 -2
- package/dist/esm/chunks/{chunk.AITARMT3.js.map → chunk.UNFOIEF6.js.map} +2 -2
- package/dist/esm/chunks/{chunk.32AY5G4D.js → chunk.W3DFKTAX.js} +2 -2
- package/dist/esm/chunks/{chunk.ATJJ6NAY.js → chunk.WF24FWAT.js} +2 -2
- package/dist/esm/chunks/chunk.XINI6PNZ.js +7 -0
- package/dist/esm/chunks/chunk.XINI6PNZ.js.map +7 -0
- package/dist/esm/chunks/{chunk.WVU4LCVC.js → chunk.XKX2BE6Z.js} +2 -2
- package/dist/esm/chunks/{chunk.ZVHFSAID.js → chunk.YVXZ753Q.js} +2 -2
- package/dist/esm/chunks/{chunk.QFMQPAT2.js → chunk.Z7Y2RA4P.js} +2 -2
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/core/index.js +1 -1
- package/dist/esm/core/utils/index.js +1 -1
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/icon/index.js +1 -1
- package/dist/esm/icon-button/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/list/index.js +1 -1
- package/dist/esm/list/list/index.js +1 -1
- package/dist/esm/list/list-item/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/open-icon/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/radio/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/option/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/slider/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/stepper/index.js +1 -1
- package/dist/esm/stepper/step/index.js +1 -1
- package/dist/esm/stepper/stepper/index.js +1 -1
- package/dist/esm/switch/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/tabs/index.js +1 -1
- package/dist/esm/tabs/tab/index.js +1 -1
- package/dist/esm/tabs/tab-bar/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/dist/esm/toast/index.js +1 -1
- package/esm/autocomplete/autocomplete-adapter.d.ts +2 -0
- package/esm/autocomplete/autocomplete-adapter.js +6 -0
- package/esm/autocomplete/autocomplete-foundation.js +1 -0
- package/esm/core/utils/utils.d.ts +9 -0
- package/esm/core/utils/utils.js +22 -0
- package/esm/date-picker/date-picker-adapter.js +3 -0
- package/esm/date-range-picker/date-range-picker-adapter.js +6 -1
- package/esm/list/list-item/list-item-adapter.js +3 -1
- package/esm/list-dropdown/list-dropdown-constants.d.ts +1 -0
- package/esm/list-dropdown/list-dropdown-utils.js +16 -3
- package/esm/menu/menu-adapter.d.ts +2 -0
- package/esm/menu/menu-adapter.js +3 -0
- package/esm/menu/menu-foundation.js +2 -0
- package/esm/select/core/base-select-adapter.d.ts +0 -2
- package/esm/select/core/base-select-foundation.js +1 -2
- package/esm/select/option/option.d.ts +0 -1
- package/esm/select/option/option.js +0 -5
- package/esm/select/select/select-adapter.d.ts +0 -1
- package/esm/select/select/select-adapter.js +4 -9
- package/esm/select/select/select-foundation.js +0 -1
- package/esm/select/select-dropdown/select-dropdown-adapter.d.ts +0 -1
- package/esm/select/select-dropdown/select-dropdown-adapter.js +0 -11
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/tabs/tab/tab-adapter.d.ts +1 -3
- package/esm/tabs/tab/tab-adapter.js +13 -14
- package/esm/tabs/tab/tab-constants.d.ts +2 -1
- package/esm/tabs/tab/tab-constants.js +2 -1
- package/esm/tabs/tab/tab-foundation.d.ts +0 -2
- package/esm/tabs/tab/tab-foundation.js +3 -3
- package/esm/tabs/tab/tab.d.ts +0 -1
- package/esm/tabs/tab/tab.js +2 -5
- package/esm/time-picker/time-picker-adapter.d.ts +2 -0
- package/esm/time-picker/time-picker-adapter.js +7 -2
- package/esm/time-picker/time-picker-foundation.js +1 -0
- package/package.json +1 -1
- package/styles/tabs/tab/_mixins.scss +3 -7
- package/styles/tabs/tab/tab.scss +4 -0
- package/dist/esm/chunks/chunk.36RT7UOR.js +0 -7
- package/dist/esm/chunks/chunk.36RT7UOR.js.map +0 -7
- package/dist/esm/chunks/chunk.5KU2NSKM.js +0 -12
- package/dist/esm/chunks/chunk.F6DMKNFU.js +0 -29
- package/dist/esm/chunks/chunk.F6DMKNFU.js.map +0 -7
- package/dist/esm/chunks/chunk.HSUOYMJT.js +0 -7
- package/dist/esm/chunks/chunk.HSUOYMJT.js.map +0 -7
- package/dist/esm/chunks/chunk.HVYDNI2O.js +0 -7
- package/dist/esm/chunks/chunk.HVYDNI2O.js.map +0 -7
- package/dist/esm/chunks/chunk.KZJYLYWN.js +0 -7
- package/dist/esm/chunks/chunk.KZJYLYWN.js.map +0 -7
- package/dist/esm/chunks/chunk.LZOAYM6V.js +0 -7
- package/dist/esm/chunks/chunk.LZOAYM6V.js.map +0 -7
- package/dist/esm/chunks/chunk.M5QM2CPF.js +0 -7
- package/dist/esm/chunks/chunk.M5QM2CPF.js.map +0 -7
- package/dist/esm/chunks/chunk.MA2P7CG4.js +0 -7
- package/dist/esm/chunks/chunk.MA2P7CG4.js.map +0 -7
- package/dist/esm/chunks/chunk.MSOMQ4HD.js +0 -7
- package/dist/esm/chunks/chunk.MSOMQ4HD.js.map +0 -7
- package/dist/esm/chunks/chunk.QRSFRMBF.js +0 -7
- package/dist/esm/chunks/chunk.QRSFRMBF.js.map +0 -7
- package/dist/esm/chunks/chunk.U7SENURF.js +0 -7
- package/dist/esm/chunks/chunk.U7SENURF.js.map +0 -7
- /package/dist/esm/chunks/{chunk.UUBAUAER.js.map → chunk.3MMDUUTN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KZDQFUNT.js.map → chunk.3V2VDOOP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Q2PGK4IA.js.map → chunk.4KKMVMPN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WLBRU5HI.js.map → chunk.5SM7UG6C.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LJQO5G5I.js.map → chunk.6DVJ22IK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4APGDQHF.js.map → chunk.AFW54X3W.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KMMOZ2SF.js.map → chunk.C3G25JFG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.POBCKMFO.js.map → chunk.CYLDP7ML.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HDHGU4L2.js.map → chunk.E3K6KM57.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PTEWJ5PZ.js.map → chunk.EQEMCHMB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QBST3QSM.js.map → chunk.FEU4FTVQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IPQDOSLO.js.map → chunk.FIZVVCUB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BQRXAJTH.js.map → chunk.JFAOCIGZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4QVF44G5.js.map → chunk.K57IO236.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.K2O3KSP7.js.map → chunk.KGMCBPGV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.V5L5DKNF.js.map → chunk.LFBYFJTX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.USKQFX4N.js.map → chunk.OBBYRQCY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5KU2NSKM.js.map → chunk.OUORLMTZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.U5DETNRU.js.map → chunk.QIGNMZRL.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DNWMURCG.js.map → chunk.RHXQ2GMV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OLNY6ZNB.js.map → chunk.TLXWXBQO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.EPFMWAIO.js.map → chunk.TVWUZYVG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.32AY5G4D.js.map → chunk.W3DFKTAX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ATJJ6NAY.js.map → chunk.WF24FWAT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WVU4LCVC.js.map → chunk.XKX2BE6Z.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZVHFSAID.js.map → chunk.YVXZ753Q.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QFMQPAT2.js.map → chunk.Z7Y2RA4P.js.map} +0 -0
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as q,b as x,c as v,d as X}from"./chunk.DONAMICM.js";import{c as ce}from"./chunk.ZVHFSAID.js";import{c as re}from"./chunk.M4PI24CI.js";import{a as M,d as ne}from"./chunk.SXQ22MNR.js";import{a as R}from"./chunk.4DAIIJ37.js";import{b as te}from"./chunk.MZLPUI6R.js";import{a as ae}from"./chunk.SYHVVXRW.js";import{a as ie,d as oe,l as se}from"./chunk.WHQZNZHW.js";import{a as Y}from"./chunk.2KXSGD3S.js";import{a as le}from"./chunk.BESB4RGK.js";import{a as U}from"./chunk.UWYANU5D.js";import{a as b}from"./chunk.KTGSZEAG.js";import{a as J,b as ee}from"./chunk.DL7NX432.js";import{a as j,l as Q}from"./chunk.LJLEPTLU.js";import{d as g,e as F,f as p,g as D,i as W,j as K,t as $}from"./chunk.4LA6HEA7.js";import{b as L,c as G,d as y,h as H,j as w,k as h,l as V,o as Z}from"./chunk.J2M2MXP2.js";import{a as C,f as _}from"./chunk.MCIQXNKY.js";var I=class{constructor(e){this._key=e,this._items=[]}getItems(){return[...this._items]}count(){return this._items.length}setKey(e){this._key=e}add(e){return e instanceof Array||(e=[e]),e.forEach(t=>{this.exists(t)||this._items.push(t)}),this}remove(e){e instanceof Array||(e=[e]);for(let t=e.length-1;t>=0;t--)this.exists(e[t])&&this._items.splice(this._items.indexOf(this._getItem(e[t])),1);return this}clear(){return this._items=[],this}exists(e){return this._getItem(e)!==null}_getItem(e){return this._key?x(this._items,v(this._key,e))||null:this._items.find(t=>t===e)||null}};var S=`${ee}table`,de={TABLE:"forge-table",TABLE_DENSE:"forge-table--dense",TABLE_ROOMY:"forge-table--roomy",TABLE_RESIZABLE:"forge-table--resizable",TABLE_RESIZING:"forge-table--resizing",TABLE_RESIZE_HANDLE:"forge-table__resize-handle",TABLE_NO_WRAP_CONTENT:"forge-table--no-wrap-content",TABLE_LAYOUT_FIXED:"forge-table--layout-fixed",TABLE_FILTER_VISIBLE:"forge-table--filter-visible",TABLE_FIXED:"forge-table--fixed",TABLE_HEAD:"forge-table-head",TABLE_HEAD_ROW:"forge-table-head__row",TABLE_HEAD_ROW_FILTER:"forge-table-head__row__filter",TABLE_HEAD_CELL:"forge-table-head__cell",TABLE_HEAD_CELL_CONTAINER:"forge-table-head__cell-container",TABLE_HEAD_CELL_SORTABLE:"forge-table-head__cell--sortable",TABLE_HEAD_CELL_SORT_ICON:"forge-table-head__cell-sort-icon",TABLE_HEAD_CELL_TEXT:"forge-table-head__cell-text",TABLE_HEAD_CELL_SORT_ICON_ACTIVE:"forge-table-head__cell-sort-icon--active",TABLE_HEAD_CELL_SORTED_ASCENDING:"forge-table-head__cell--sorted-ascending",TABLE_HEAD_CELL_SORTED_DESCENDING:"forge-table-head__cell--sorted-descending",TABLE_HEAD_CELL_SORT_ORDER:"forge-table-head__cell__sort-order",TABLE_HEAD_CELL_SORT_ORDER_HIDDEN:"forge-table-head__cell__sort-order--hidden",TABLE_BODY:"forge-table-body",TABLE_BODY_ROW:"forge-table-body__row",TABLE_BODY_ROW_SELECTED:"forge-table-body__row--selected",TABLE_BODY_ROW_CLICKABLE:"forge-table-body__row--clickable",TABLE_BODY_CELL:"forge-table-body__cell",TABLE_ROW:"forge-table-row",TABLE_ROW_EXPANDED:"forge-table-row--expanded",TABLE_ROW_EXPANDABLE_CONTENT:"forge-table-row__expandable-content",TABLE_ROW_EXPANDABLE_CONTENT_CELL:"forge-table-row__expandable-content-cell",TABLE_CELL:"forge-table-cell",TABLE_CELL_SELECT:"forge-table-cell__select",TABLE_CELL_SELECT_CHECKBOX:"forge-table-cell__select-checkbox",TABLE_CELL_SELECT_CHECKBOX_CONTAINER:"forge-table-cell__select-checkbox-container",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT:"forge-table-cell__select-checkbox-container--align-right",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT:"forge-table-cell__select-checkbox-container--align-left",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER:"forge-table-cell__select-checkbox-container--align-center",TABLE_CELL_CONTAINER:"forge-table-cell__container",TABLE_CELL_CONTAINER_TEXT:"forge-table-cell__container-text",TABLE_CELL_CENTER:"forge-table-cell--center",TABLE_CELL_RIGHT:"forge-table-cell--right",TABLE_CELL_RESIZABLE:"forge-table-cell--resizing"},_e={TABLE:".forge-table",CHECKBOX_INPUT:"forge-checkbox > input[type=checkbox]:not([forge-ignore])",SELECT_ALL_TEMPLATE_CHECKBOX_INPUT:"input[type=checkbox]:not([forge-ignore])",ROW_SELECTED:`.${de.TABLE_BODY_ROW_SELECTED}`},be={SELECT:"select",MULTISELECT:"multiselect",SELECT_KEY:"select-key",DENSE:"dense",ROOMY:"roomy",FILTER:"filter",FIXED_HEADERS:"fixed-headers",LAYOUT_TYPE:"layout-type",WRAP_CONTENT:"wrap-content",RESIZABLE:"resizable",MIN_RESIZE_WIDTH:"min-resize-width",ALLOW_ROW_CLICK:"allow-row-click",MULTI_COLUMN_SORT:"multi-column-sort",SELECT_CHECKBOX_ALIGNMENT:"select-checkbox-alignment",TOOLTIP_SELECT:"tooltip-select",TOOLTIP_SELECT_ALL:"tooltip-select-all",CHECKBOX_TYPE:"forge-checkbox-type",CUSTOM_CELL_TEMPLATE:"data-cell-template",CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION:"data-cell-template-stop-propagation"},pe={ROW_CLICK:`${S}-row-click`,SELECT:`${S}-select`,SELECT_DOUBLE:`${S}-select-double`,SELECT_ALL:`${S}-select-all`,SORT:`${S}-sort`,FILTER:`${S}-filter`,INITIALIZED:`${S}-initialized`,COLUMN_RESIZE:`${S}-column-resize`},Te={SELECT_ALL:"select-all",SELECT_ROW:"select-row",DEFAULT_LAYOUT_TYPE:"auto"},Ce={SORT_DOWN:"arrow_downward"},he={DEFAULT_FILTER_DEBOUNCE_TIME:750,MIN_RESIZE_WIDTH:100,RESIZE_HOVER_DURATION:150},o={elementName:S,classes:de,selectors:_e,attributes:be,events:pe,strings:Te,icons:Ce,numbers:he};var B=(l=>(l.Left="left",l.Right="right",l.Center="center",l))(B||{}),O=(l=>(l.Ascending="ASC",l.Descending="DESC",l.Unset="UNSET",l))(O||{}),Le=(s=>(s.InputText="text",s.InputNumber="number",s.Select="select",s.SelectMultiple="select-multiple",s.Date="date",s.DateRange="date-range",s))(Le||{});function me(f){return f&&typeof f=="object"&&"content"in f}var a=class{static createTable(e){a._resetTable(e.tableElement);let t=a._createTableHead(e),l=a._createTableBody(e);e.clickListener&&(a._attachRowClickListeners(l,e.clickListener,e.doubleClickListener),a._addRowClickAttributes(l)),e.fixedHeaders&&a.setFixedHeaders(e),e.resizable&&a.setResizable(e),e.dense&&a.setDenseState(e.tableElement,e.dense),e.wrapContent&&a.setWrapContentState(e.tableElement,e.wrapContent),e.selectListener&&a._addSelectColumn(t,l,e.selectListener,e.selectAllListener,e.selectAllTemplate,e.selectCheckboxAlignment,e.data,e.tooltipSelect,e.tooltipSelectAll),(e.resizable||e.columnConfigurations.some(i=>!!i.sortable))&&(a._attachHeadRowMouseDownListener(t,e.headRowMouseDownListener),a._isMac()&&a._attachHeadRowContextMenuListener(t,e.headRowContextMenuListener)),a.setLayoutType(e),a._setTableHead(e.tableElement,t),e.filter&&a.setFilterRow(e),a._setTableBody(e.tableElement,l)}static _setTableHead(e,t){e.tHead?F(t,e.tHead):e.appendChild(t)}static _setTableBody(e,t){e.tBodies.length?F(t,e.tBodies[0]):e.appendChild(t)}static recreateTableBody(e){let t=a._createTableBody(e);e.clickListener&&(a._attachRowClickListeners(t,e.clickListener,e.doubleClickListener),a._addRowClickAttributes(t)),e.selectListener&&(a._createBodySelectColumn(t,e.selectCheckboxAlignment,e.data,e.tooltipSelect,e.tooltipSelectAll),a._attachRowSelectListeners(t,e.selectListener)),a._setTableBody(e.tableElement,t)}static _resetTable(e){g(e)}static _createMultisortTooltip(){let e=document.createElement(ae.elementName);return e.textContent="Ctrl + click to sort multiple columns",e.position="bottom",e.delay=0,e}static _createTableHead(e){let t=document.createElement("thead"),l=t.insertRow();p([o.classes.TABLE_ROW,o.classes.TABLE_HEAD_ROW],l);let i=!1;for(let n=0;n<e.columnConfigurations.length;n++){let s=e.columnConfigurations[n],r=document.createElement("th");r.scope="col",p([o.classes.TABLE_CELL,o.classes.TABLE_HEAD_CELL],r);let c;if(s.sortable?(c=document.createElement("button"),c.type="button",c.addEventListener("keydown",e.sortableHeadCellKeydownListener)):c=document.createElement("div"),c.classList.add(o.classes.TABLE_HEAD_CELL_CONTAINER),e.multiColumnSort){let d=a._createMultisortTooltip();c.appendChild(d)}if(s.align&&a._setCellAlignmentClass(c,s.align),L(s.width)){let d=K(s.width);d&&(r.style.width=d)}if(e.resizable&&s.resizable!==!1){let d=document.createElement("div");d.classList.add(o.classes.TABLE_RESIZE_HANDLE),r.appendChild(d)}L(s.headerCellStyle)&&w(s.headerCellStyle)&&(Object.assign(r.style,s.headerCellStyle),Object.assign(c.style,s.headerCellStyle));let m=document.createElement("span");if(m.classList.add(o.classes.TABLE_HEAD_CELL_TEXT),m.textContent=s.header&&typeof s.header=="string"?s.header.trim():"",s.sortable){r.classList.add(o.classes.TABLE_HEAD_CELL_SORTABLE);let d=document.createElement("span");p([o.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,o.classes.TABLE_HEAD_CELL_SORT_ORDER],d);let u=document.createElement(ie.elementName);u.name=o.icons.SORT_DOWN,p([o.classes.TABLE_HEAD_CELL_SORT_ICON],u),e.multiColumnSort?typeof s.initialSort=="object"&&s.initialSort.sortOrder&&(d.textContent=s.initialSort.sortOrder.toString(),e.columnConfigurations.filter(T=>typeof T.initialSort=="object").length>1&&D(o.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,d),r.classList.add(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),u.classList.add(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),a._setColumnSortDirection(r,s.initialSort.direction)):e.sortedColumn===n&&!i&&!e.multiColumnSort&&(r.classList.add(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),u.classList.add(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),a._setColumnSortDirection(r,e.sortDirection),i=!0),c.appendChild(u),c.appendChild(d)}typeof s.headerTemplate=="function"?Promise.resolve(s.headerTemplate(n,c,s)).then(d=>{if(d){let u=document.createElement("div");p(o.classes.TABLE_CELL_CONTAINER,u),typeof d=="string"?u.innerHTML=d:a._prepend(d,u),u.setAttribute(o.attributes.CUSTOM_CELL_TEMPLATE,""),a._prepend(u,c)}}):a._prepend(m,c),r.appendChild(c),l.appendChild(r)}return t}static setSortDirection(e,t,l){let i=a._getHeaderCellByIndex(e,t);e.querySelectorAll("th[aria-sort]").forEach(n=>n.removeAttribute("aria-sort")),a._setColumnSortDirection(i,l)}static _setColumnSortDirection(e,t){e.classList.contains(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&e.classList.remove(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),e.classList.contains(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&e.classList.remove(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),!t||t==="DESC"?(e.setAttribute("aria-sort","descending"),e.classList.add(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)):(e.setAttribute("aria-sort","ascending"),e.classList.add(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING))}static _createTableBody(e){let t=document.createElement("tbody");return a._getOrderedRowData(e.columnConfigurations,e.data).forEach((i,n)=>{let s=t.insertRow();p([o.classes.TABLE_ROW,o.classes.TABLE_BODY_ROW],s),a._populateRowCells(e,s,i,n),typeof e.rowCreatedCallback=="function"&&e.rowCreatedCallback(s,n,C({},e.data[n].data))}),t}static _populateRowCells(e,t,l,i){for(let n=0;n<l.length;n++){let s=e.columnConfigurations[n],r=t.insertCell();if(p([o.classes.TABLE_CELL,o.classes.TABLE_BODY_CELL],r),L(s.width)){let m=K(s.width);m&&(r.style.width=m)}let c=document.createElement("div");if(c.classList.add(o.classes.TABLE_CELL_CONTAINER),L(s.cellStyle)&&w(s.cellStyle)&&(Object.assign(r.style,s.cellStyle),Object.assign(c.style,s.cellStyle)),s.template&&typeof s.template=="function"){let m=e.data[i]?e.data[i].data:void 0;Promise.resolve(s.template(i,c,m,n)).then(d=>{let u=me(d)?d:{content:d,stopClickPropagation:s.stopCellTemplateClickPropagation};!u.content||(typeof u.content=="string"?c.innerHTML=u.content:c.appendChild(u.content),c.setAttribute(o.attributes.CUSTOM_CELL_TEMPLATE,""),u.stopClickPropagation&&c.setAttribute(o.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION,""))})}else if(s.property){let m=document.createElement("span");m.classList.add(o.classes.TABLE_CELL_CONTAINER_TEXT),c.appendChild(m),s.transform&&typeof s.transform=="function"?Promise.resolve(s.transform(l[n])).then(d=>m.textContent=d):l[n]==null?m.textContent="":m.textContent=l[n].toString()}if(s.align&&a._setCellAlignmentClass(c,s.align),r.appendChild(c),L(s.columnSpan)){if(s.columnSpan==="all"){r.colSpan=l.length-n;break}else if(typeof s.columnSpan=="number"&&s.columnSpan>0){let m=s.columnSpan;s.columnSpan>l.length-n&&(m=l.length),r.colSpan=m,n=n+(m-1)}}typeof e.cellCreatedCallback=="function"&&e.cellCreatedCallback(r,i,n)}}static _setCellAlignmentClass(e,t){switch(t){case"center":e.classList.add(o.classes.TABLE_CELL_CENTER);break;case"right":e.classList.add(o.classes.TABLE_CELL_RIGHT);break}}static _getNonExpandedRows(e){return Array.from(e).filter(t=>!t.classList.contains(o.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _getExpandedRows(e){return Array.from(e).filter(t=>t.classList.contains(o.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _createColumnDataMap(e,t){return e.map(l=>({config:l,data:t.map(i=>{if(l.property){let n=q(i.data,l.property);return L(n)?n:null}return null})}))}static _getOrderedRowData(e,t){let l=a._createColumnDataMap(e,t),i=[];for(let n of l)for(let s=0;s<n.data.length;s++)i[s]||(i[s]=[]),i[s].push(n.data[s]);return i}static _attachRowClickListeners(e,t,l){a._getNonExpandedRows(e.rows).forEach(n=>{n.addEventListener("click",t),l&&n.addEventListener("dblclick",l)})}static _addRowClickAttributes(e){a._getNonExpandedRows(e.rows).forEach(l=>{l.classList.add(o.classes.TABLE_BODY_ROW_CLICKABLE)})}static _removeRowClickAttributes(e){a._getNonExpandedRows(e.rows).forEach(l=>{l.classList.remove(o.classes.TABLE_BODY_ROW_CLICKABLE)})}static _attachRowSelectListeners(e,t){a._getNonExpandedRows(e.rows).forEach(i=>a._attachRowSelectListener(i,t))}static _attachRowSelectListener(e,t){let l=a._getCheckboxElement(e);l==null||l.addEventListener("click",t)}static _detachRowSelectListeners(e,t){Array.from(e.rows).forEach(l=>{let i=a._getCheckboxElement(l);i==null||i.removeEventListener("click",t)})}static _detachRowClickListeners(e,t,l){Array.from(e.rows).forEach(i=>{i.removeEventListener("click",t),i.removeEventListener("dblclick",l)})}static _attachSelectAllListener(e,t){let l=e.rows[e.rows.length-1],i=a._getCheckboxElement(l);if(!i)throw new Error("Checkbox element not found.");i.addEventListener("change",t)}static _tryAttachSelectAllTemplateListener(e,t){let l=e.rows[e.rows.length-1],i=a._tryGetSelectAllCheckboxElement(l);i&&i.addEventListener("change",t)}static _detachSelectAllListener(e,t){let l=e.rows[e.rows.length-1],i=a._tryGetSelectAllCheckboxElement(l);!i||i.removeEventListener("change",t)}static _attachHeadRowMouseDownListener(e,t){let l=e.rows[0];if(!l)throw new Error("Missing table header row. Unable to attach sort listener.");l.addEventListener("mousedown",t)}static _attachHeadRowContextMenuListener(e,t){let l=e.rows[0];if(!l)throw new Error("Missing table header row. Unable to attach sort listener.");l.addEventListener("contextmenu",t)}static _createSelectColumn(e,t,l,i,n,s,r,c,m){e&&a._createHeadSelectColumn(e,l,i,n,s,m),t&&a._createBodySelectColumn(t,s,r,c,m)}static _createHeadSelectColumn(e,t,l,i,n,s){var r;if(Array.from(e.rows).forEach(c=>{let m=document.createElement("th");p([o.classes.TABLE_CELL,o.classes.TABLE_HEAD_CELL],m),c.insertBefore(m,c.cells.item(0))}),t){let c=(r=e.rows.item(e.rows.length-1))==null?void 0:r.cells.item(0);c.classList.add(o.classes.TABLE_CELL_SELECT),typeof l=="function"?a._renderSelectAllTemplate(l,e).then(()=>{typeof i=="function"&&i()}):c==null||c.appendChild(a._createCheckboxElement(!0,n,null,null,null,s))}}static _createBodySelectColumn(e,t,l,i,n){if(a._getNonExpandedRows(e.rows).forEach((r,c)=>a._addRowSelectColumn(r,t,c,l[c],i,n)),e.rows.length){let r=e.rows.item(0);r&&a._updateExpandedRowColspan(e.rows,r.cells.length)}}static _addRowSelectColumn(e,t,l,i,n,s){let r=e.insertCell(0);p([o.classes.TABLE_CELL,o.classes.TABLE_BODY_CELL,o.classes.TABLE_CELL_SELECT],r),r.appendChild(a._createCheckboxElement(!1,t,l,i,n,s))}static _destroySelectColumn(e,t){let l=a._getNonExpandedRows(t.rows);if(Array.from(e.rows).forEach(i=>i.removeChild(i.cells.item(0))),Array.from(l).forEach(i=>i.removeChild(i.cells.item(0))),t.rows.length){let i=t.rows.item(0);i&&a._updateExpandedRowColspan(t.rows,i.cells.length)}}static _hasSelectColumn(e,t){return[...Array.from(e.rows),...Array.from(t.rows)].some(i=>i.cells.item(0).classList.contains(o.classes.TABLE_CELL_SELECT))}static _createCheckboxElement(e,t,l,i,n,s){let r=document.createElement("div");if(r.classList.add(o.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER),t)switch(t){case"center":r.classList.add(o.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER);break;case"left":r.classList.add(o.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT);break;case"right":r.classList.add(o.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT);break}let c=document.createElement(re.elementName),m=document.createElement("input");m.type="checkbox";let d=n||"";i&&typeof n=="function"&&(d=n.call(null,l,i.data));let u=document.createElement("forge-tooltip");return u.position="left",e?u.textContent=s||"":u.textContent=d,m.setAttribute("aria-label","Select row"),c.appendChild(m),r.appendChild(u),r.appendChild(c),r}static _getCheckboxElement(e){let t=e.querySelector(`.${o.classes.TABLE_CELL_SELECT}`);return t?t.querySelector(o.selectors.CHECKBOX_INPUT):null}static _tryGetSelectAllCheckboxElement(e){let t=e.querySelector(`.${o.classes.TABLE_CELL_SELECT}`);return t?t.querySelector(o.selectors.CHECKBOX_INPUT)||t.querySelector(o.selectors.SELECT_ALL_TEMPLATE_CHECKBOX_INPUT):null}static _setSelectedCheckboxState(e,t){e&&(e.checked=t)}static _setIndeterminateCheckboxState(e,t){e&&(e.indeterminate=t)}static _setRowSelectedState(e,t){t?e.classList.contains(o.classes.TABLE_BODY_ROW_SELECTED)||e.classList.add(o.classes.TABLE_BODY_ROW_SELECTED):e.classList.remove(o.classes.TABLE_BODY_ROW_SELECTED)}static _updateExpandedRowColspan(e,t){a._getExpandedRows(e).forEach(i=>{let n=i.cells.item(0);n&&(n.colSpan=t)})}static updateSelectedState(e,t){a._setRowSelectedState(e,t);let l=a._getCheckboxElement(e);l&&a._setSelectedCheckboxState(l,t)}static getRowByIndex(e,t){return a._getNonExpandedRows(e.tBodies[0].rows)[t]}static updateSelectAllState(e,t,l){if(!e.tHead)return;let i=e.tHead.rows[e.tHead.rows.length-1],n=a._tryGetSelectAllCheckboxElement(i);n&&(a._setSelectedCheckboxState(n,t),a._setIndeterminateCheckboxState(n,!!l))}static setSelectedRows(e,t,l,i,n=!1){if(!e.tBodies.length)return;n||a.clearSelectedRows(e);let s=e.tBodies[0].rows,r=0;i.length&&Array.from(s).forEach((c,m)=>{let d=l[m];if(x(i,v(t,d))){a._setRowSelectedState(c,!0);let T=a._getCheckboxElement(c);T&&a._setSelectedCheckboxState(T,!0),r++}}),a.updateSelectAllState(e,r>0&&s.length===r)}static clearSelectedRows(e){if(!e.tBodies.length)return;a._getNonExpandedRows(e.tBodies[0].rows).forEach(l=>{a._setRowSelectedState(l,!1);let i=a._getCheckboxElement(l);i&&a._setSelectedCheckboxState(i,!1)})}static setSortedColumn(e,t,l){let i=a._getHeaderCellByIndex(e,t);a._getSortIconElementFromHeaderCell(i).classList.add(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),a._setColumnSortDirection(i,l)}static setMultiSortColumnSortNumber(e,t,l,i){let r=a._getHeaderCellByIndex(e,l).querySelector(`.${o.classes.TABLE_HEAD_CELL_CONTAINER}`).querySelector(`.${o.classes.TABLE_HEAD_CELL_SORT_ORDER}`);r&&($(r,typeof i!="number"||!t,o.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN),i&&(r.textContent=i.toString()))}static removeColumnSort(e,t){let l=a._getHeaderCellByIndex(e,t);l.removeAttribute("aria-sort"),l.classList.contains(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&l.classList.remove(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),l.classList.contains(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&l.classList.remove(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);let i=a._getSortIconElementFromHeaderCell(l);i&&i.classList.contains(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)&&i.classList.remove(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)}static _getHeaderCellByIndex(e,t){if(!e.tHead)throw new Error("Table head element cannot be null.");return e.tHead.rows.item(0).cells.item(t)}static _getSortIconElementFromHeaderCell(e){return e.querySelector(`.${o.classes.TABLE_HEAD_CELL_SORT_ICON}`)}static setSelectColumnVisibility(e,t,l,i,n,s,r,c,m){let d=e.tHead,u=e.tBodies[0];!d||!u||(t?a._addSelectColumn(d,u,l,i,n,s,r,c,m):a._hasSelectColumn(d,u)&&(l&&a._detachRowSelectListeners(u,l),i&&a._detachSelectAllListener(d,i),a._destroySelectColumn(d,u)))}static _addSelectColumn(e,t,l,i,n,s,r,c,m){a._createSelectColumn(e,t,!!i,n,()=>{i&&a._tryAttachSelectAllTemplateListener(e,i)},s,r,c,m),l&&a._attachRowSelectListeners(t,l),i&&!n&&a._tryAttachSelectAllTemplateListener(e,i)}static setDenseState(e,t){e.classList.contains(o.classes.TABLE_DENSE)&&e.classList.remove(o.classes.TABLE_DENSE),t&&e.classList.add(o.classes.TABLE_DENSE)}static setRoomyState(e,t){e.classList.contains(o.classes.TABLE_ROOMY)&&e.classList.remove(o.classes.TABLE_ROOMY),t&&e.classList.add(o.classes.TABLE_ROOMY)}static setResizable(e){let t=e.tableElement.tHead;e.resizable?(e.tableElement.classList.add(o.classes.TABLE_RESIZABLE),a._addResizeHandles(t,e)):(e.tableElement.classList.remove(o.classes.TABLE_RESIZABLE),a._removeResizeHandles(t,e))}static _addResizeHandles(e,t){if(!e)return;let l=e.rows.item(0);if(l){let i=Array.from(l.cells);t.selectListener&&(i=i.slice(1));for(let n of i){let s=i.indexOf(n);if(t.columnConfigurations[s].resizable!==!1){let c=document.createElement("div");c.classList.add(o.classes.TABLE_RESIZE_HANDLE),n.appendChild(c)}}}}static _removeResizeHandles(e,t){if(!e)return;let l=e.rows.item(0);if(l){let i=Array.from(l.cells);t.selectListener&&(i=i.slice(1));for(let n of i){let s=document.querySelector(`.${o.classes.TABLE_RESIZE_HANDLE}`);s&&n.removeChild(s)}}}static setWrapContentState(e,t){t?e.classList.remove(o.classes.TABLE_NO_WRAP_CONTENT):e.classList.add(o.classes.TABLE_NO_WRAP_CONTENT)}static setSelectAllVisibility(e,t,l,i,n,s){let r=e.tHead;if(!r)return;!t&&l&&a._detachSelectAllListener(r,l);let m=r.rows[r.rows.length-1].cells.item(0);t?m.childElementCount||(m.classList.add(o.classes.TABLE_CELL_SELECT),i?a._renderSelectAllTemplate(i,r).then(()=>{l&&a._tryAttachSelectAllTemplateListener(r,l)}):m.appendChild(a._createCheckboxElement(!0,n||null,null,null,null,s)),l&&!i&&a._attachSelectAllListener(r,l)):(l&&a._detachSelectAllListener(r,l),g(m))}static setFilterRow(e){if(!e.tableElement.tHead)return;let t=a._getFilterRowElement(e.tableElement.tHead),l;if(e.filter?e.tableElement.classList.add(o.classes.TABLE_FILTER_VISIBLE):e.tableElement.classList.remove(o.classes.TABLE_FILTER_VISIBLE),e.filter&&!t){if(e.columnConfigurations.every(n=>!n.filter))return;e.selectListener&&e.selectAllListener&&(l=e.tableElement.tHead.rows[e.tableElement.tHead.rows.length-1].cells.item(0));let i=a._createFilterRowElement(e);i&&l&&Array.from(l.children).forEach(n=>{var s;(s=i.cells.item(0))==null||s.appendChild(n)})}else if(!e.filter&&t){if(e.selectListener&&e.selectAllListener){l=t.cells.item(0);let i=Array.from(e.tableElement.tHead.rows).indexOf(t)-1,n=e.tableElement.tHead.rows.item(i);n&&Array.from(l.children).forEach(s=>{var r;(r=n.cells.item(0))==null||r.appendChild(s)})}W(t)}}static _createFilterRowElement(e){if(!e.tableElement.tHead)throw new Error("Table head element cannot be null.");let t=e.tableElement.tHead.insertRow();if(p([o.classes.TABLE_ROW,o.classes.TABLE_HEAD_ROW_FILTER],t),e.selectListener){let l=document.createElement("th");p([o.classes.TABLE_CELL,o.classes.TABLE_HEAD_CELL],l),t.insertBefore(l,t.cells[0]),l.classList.add(o.classes.TABLE_CELL_SELECT)}return e.columnConfigurations.forEach((l,i)=>{let n=document.createElement("th");if(p([o.classes.TABLE_CELL,o.classes.TABLE_HEAD_CELL],n),l.filter&&L(l.filterDelegate)){let s=document.createElement("div");s.classList.add(o.classes.TABLE_HEAD_CELL_CONTAINER),l.align&&a._setCellAlignmentClass(s,l.align);let r=a._createFilterElement(l,i,e.filterListener);s.appendChild(r),n.appendChild(s)}t.appendChild(n)}),t}static _createFilterElement(e,t,l){let i;if(H(e.filterDelegate))i=e.filterDelegate();else if(e.filterDelegate instanceof Y||e.filterDelegate instanceof le)i=e.filterDelegate;else throw new Error("Invalid filter delegate.");if(!!l&&i instanceof Y&&H(i.onChange))if(!L(e.filterDebounceTime)||y(e.filterDebounceTime)){let n=L(e.filterDebounceTime)?e.filterDebounceTime:o.numbers.DEFAULT_FILTER_DEBOUNCE_TIME;i.onChange(Z(s=>l(s,t),n))}else i.onChange(n=>l(n,t));return i.element}static _getFilterRowElement(e){if(!!e)return Array.from(e.rows).find(t=>t.classList.contains(o.classes.TABLE_HEAD_ROW_FILTER))}static async expandRow(e,t,l){let i=e.tableElement.tBodies[0],s=a._getNonExpandedRows(i.rows)[t];s.classList.add(o.classes.TABLE_ROW_EXPANDED);let r=Array.from(i.rows).indexOf(s),c=i.insertRow(r+1);p([o.classes.TABLE_ROW,o.classes.TABLE_BODY_ROW,o.classes.TABLE_ROW_EXPANDABLE_CONTENT],c);let m=c.insertCell();m.setAttribute("colspan",s.cells.length.toString()),m.classList.add(o.classes.TABLE_ROW_EXPANDABLE_CONTENT_CELL);let d=document.createElement("div"),u=document.createElement(M.elementName);u.appendChild(d),m.appendChild(u);let T=l;if(H(l)){let ue=e.data[t]?e.data[t].data:void 0,Ee=l(t,d,ue);try{let A=await Promise.resolve(Ee);T=me(A)?A.content:A}catch(A){console.error("Failed to load row template "+A.message),T=""}}T&&a._setRowTemplate(d,T),window.requestAnimationFrame(()=>u.open=!0)}static _setRowTemplate(e,t){G(t)?e.innerHTML=t:e.appendChild(t)}static collapseRow(e,t){if(!e.tableElement||!e.tableElement.tBodies.length||!e.tableElement.tBodies[0].rows.length)return Promise.resolve();let l=e.tableElement.tBodies[0],n=a._getNonExpandedRows(l.rows)[t],s=Array.from(l.rows).indexOf(n);if(n&&n.classList.contains(o.classes.TABLE_ROW_EXPANDED)){let r=l.rows[s+1],c=r.querySelector(M.elementName);if(c&&c.open)return c.open=!1,new Promise(m=>{setTimeout(()=>{n.classList.remove(o.classes.TABLE_ROW_EXPANDED),W(r),m()},M.numbers.COLLAPSE_ANIMATION_DURATION)})}return Promise.resolve()}static isRowExpanded(e,t){let l=e.tableElement.tBodies[0],n=a._getNonExpandedRows(l.rows)[t];return n&&n.classList.contains(o.classes.TABLE_ROW_EXPANDED)}static setFixedHeaders(e){e.fixedHeaders?e.tableElement.classList.add(o.classes.TABLE_FIXED):e.tableElement.classList.remove(o.classes.TABLE_FIXED)}static setLayoutType(e){e.layoutType==="fixed"?e.tableElement.classList.add(o.classes.TABLE_LAYOUT_FIXED):e.tableElement.classList.remove(o.classes.TABLE_LAYOUT_FIXED)}static normalizeColumnWidths(e){let t=e.tableElement;if(t.tHead&&t.tHead.rows.length){let l=Array.from(t.tHead.rows[0].cells);for(let i of l){let n=getComputedStyle(i).width;i.style.width&&i.style.width!==n&&(i.style.width=n)}}}static setColumnResizeIndicatorVisibility(e,t,l){let i=e.tableElement;if(i.tHead&&i.tHead.rows.length){let n=Array.from(i.tHead.rows);for(let s of n){let r=s.cells[t];r&&(l?r.classList.add(o.classes.TABLE_CELL_RESIZABLE):r.classList.remove(o.classes.TABLE_CELL_RESIZABLE))}}if(i.tBodies.length){let n=Array.from(i.tBodies[0].rows);for(let s of n){let r=s.cells[t];r&&(l?r.classList.add(o.classes.TABLE_CELL_RESIZABLE):r.classList.remove(o.classes.TABLE_CELL_RESIZABLE))}}}static setRowClickListeners(e,t,l,i){let n=e.tBodies[0];!n||(t?a._attachRowClickListeners(n,l,i):a._detachRowClickListeners(n,l,i))}static setRowClickAttributes(e,t){let l=e.tBodies[0];!l||(t?a._addRowClickAttributes(l):a._removeRowClickAttributes(l))}static getOwnerDocument(e){return e.ownerDocument||document}static _prepend(e,t){let l=t.childNodes.item(0);l?t.insertBefore(e,l):t.appendChild(e)}static _isMac(){return!!(navigator&&navigator.platform&&navigator.platform.substr(0,3)==="Mac")}static _renderSelectAllTemplate(e,t){return Promise.resolve(e()).then(l=>{let i=t.rows.item(t.rows.length-1);if(!i)return;let n=i.cells.item(0);l&&n&&(typeof l=="string"?n.innerHTML=l:l instanceof HTMLElement&&n.appendChild(l),n.setAttribute(o.attributes.CUSTOM_CELL_TEMPLATE,""))})}};var N=class extends U{constructor(t){super(t)}initialize(){this._tableElement||(this._tableElement=document.createElement("table"),this._tableElement.classList.add(o.classes.TABLE),this._component.children.length&&g(this._component),this._component.appendChild(this._tableElement))}getTableElement(){return this._tableElement||this.initialize(),this._tableElement}createTable(t){return a.createTable(t)}recreateTableBody(t){a.recreateTableBody(t)}setSelectedRows(t,l,i,n,s=!1){a.setSelectedRows(t,l,i,n,s)}clearSelectedRows(t){a.clearSelectedRows(t)}updateSelectedState(t,l){a.updateSelectedState(t,l)}updateSelectAllState(t,l,i){a.updateSelectAllState(t,l,i)}setSortedColumn(t,l,i){a.setSortedColumn(t,l,i)}removeColumnSort(t,l){a.removeColumnSort(t,l)}setSortDirection(t,l,i){a.setSortDirection(t,l,i)}setSelectColumnVisibility(t,l,i,n,s,r,c,m,d){a.setSelectColumnVisibility(t,l,i,n||null,s||null,r||null,c||[],m||null,d||null)}setDense(t,l){a.setDenseState(t,l)}setRoomy(t,l){a.setRoomyState(t,l)}setResizable(t){a.setResizable(t)}setSelectAllVisibility(t,l,i,n,s,r=null){a.setSelectAllVisibility(t,l,i,n,s||null,r||null)}setFilterRow(t){a.setFilterRow(t)}expandRow(t,l,i){return a.expandRow(t,l,i)}collapseRow(t,l){return a.collapseRow(t,l)}isRowExpanded(t,l){return a.isRowExpanded(t,l)}setFixedHeaders(t){a.setFixedHeaders(t)}setTableLayoutType(t){a.setLayoutType(t)}setWrapContentState(t){a.setWrapContentState(t.tableElement,t.wrapContent)}addDocumentListener(t,l){a.getOwnerDocument(this._component).addEventListener(t,l)}removeDocumentListener(t,l){a.getOwnerDocument(this._component).removeEventListener(t,l)}normalizeColumnWidths(t){a.normalizeColumnWidths(t)}setResizeColumnVisibility(t,l,i){a.setColumnResizeIndicatorVisibility(t,l,i)}addTableClass(t){p(t,this._tableElement)}removeTableClass(t){D(t,this._tableElement)}setRowClickListeners(t,l,i,n){a.setRowClickListeners(t,l,i,n)}setRowClickAttributes(t,l){a.setRowClickAttributes(t,l)}};var k=class{constructor(){this._sortedColumns=[]}get sortedColumns(){return[...this._sortedColumns.map(e=>C({},e))]}addSortColumn(e){this._sortedColumns.push(C({},e)),this._updateSortNumbers()}updateSortColumn(e){let t=this._sortedColumns.find(l=>l.columnIndex===e.columnIndex);if(t)switch(t.direction){case"ASC":this.removeSortColumn(e);break;case"DESC":t.direction="ASC";break;case"UNSET":t.direction="DESC";break}}setSortColumns(e){this._sortedColumns=[...e.map(t=>C({},t))]}removeSortColumn(e){typeof e=="number"?this._sortedColumns.splice(e,1):this._sortedColumns.splice(this._sortedColumns.indexOf(e),1),this._updateSortNumbers()}isSortColumn(e){return typeof e=="number"?this._sortedColumns.some(t=>t.columnIndex===e):this._sortedColumns.includes(e)}clearMultiSort(){this._sortedColumns=[]}getSortColumn(e){return this._sortedColumns.find(t=>t.columnIndex===e)}_updateSortNumbers(){this._sortedColumns.every(e=>typeof e.sortOrder=="number")&&this._sortedColumns.sort((e,t)=>e.sortOrder-t.sortOrder),this._sortedColumns.forEach((e,t)=>e.sortOrder=t+1)}};var P=class{constructor(e,t=!1){this.data=e;this.selected=t}};var z=class{constructor(e){this._adapter=e;this._tableRows=[];this._data=[];this._columnConfigurations=[];this._select=!1;this._multiselect=!0;this._dense=!1;this._roomy=!1;this._filter=!1;this._fixedHeaders=!1;this._layoutType=o.strings.DEFAULT_LAYOUT_TYPE;this._wrapContent=!0;this._resizable=!1;this._minResizeWidth=o.numbers.MIN_RESIZE_WIDTH;this._multiColumnSort=!1;this._selectCheckboxAlignment="center";this._isAllSelected=!1;this._sortedColumnIndex=-1;this._rendered=!1;this._allowRowClick=!1;this._multiSortManager=new k;this._rowClickListener=t=>this._onRowClick(t),this._rowDoubleClickListener=t=>this._onRowDoubleClick(t),this._selectRowListener=t=>this._onRowSelected(t),this._selectAllListener=t=>this._onSelectAll(t),this._sortableHeadCellKeydownListener=t=>this._onSortableHeadCellKeydown(t),this._headRowMouseDownListener=t=>this._onHeadRowMouseDown(t),this._headRowContextMenuListener=t=>this._onHeadRowContextMenu(t),this._documentMouseMoveListener=t=>this._onMouseMove(t),this._documentMouseUpListener=t=>this._onMouseUp(t),this._filterListener=(t,l)=>this._onFilter(t,l),this._selectionManager=new I(this._selectKey),this._hiddenColumnManager=new I}initialize(){this.connect(),this._adapter.setHostAttribute(o.attributes.SELECT,this._select.toString()),this._adapter.setHostAttribute(o.attributes.MULTISELECT,this._multiselect.toString()),this._adapter.setHostAttribute(o.attributes.DENSE,this._dense.toString()),this._adapter.setHostAttribute(o.attributes.ROOMY,this._roomy.toString()),this._adapter.setHostAttribute(o.attributes.FILTER,this._filter.toString()),this._adapter.emitHostEvent(o.events.INITIALIZED,void 0,!1)}connect(){this._adapter.initialize()}disconnect(){this._resizeDescriptor=void 0,this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener)}set data(e){Array.isArray(e)&&e.length>0?w(e[0])?this._data=e.map(t=>C({},t)):this._data=[...e]:this._data=[],this._tableRows=this._data.map(t=>new P(t,this._selectionManager.exists(t))),this._renderBody()}get data(){return this._data.map(e=>C({},e))}set columnConfigurations(e){this._columnConfigurations=e.map(t=>C({},t)),this._hiddenColumnManager.clear(),this._columnConfigurations.forEach(t=>{t.hidden&&this._hiddenColumnManager.add(t)}),this._refreshTableSort(),this.render()}get columnConfigurations(){return this._columnConfigurations.map(e=>C({},e))}get _visibleColumnConfigurations(){return this._columnConfigurations.filter(e=>!this._hiddenColumnManager.exists(e))}get _tableConfiguration(){return{tableElement:this._adapter.getTableElement(),columnConfigurations:this._visibleColumnConfigurations,data:this._tableRows,clickListener:this._allowRowClick?this._rowClickListener:null,doubleClickListener:this._allowRowClick?this._rowDoubleClickListener:null,selectListener:this._select?this._selectRowListener:null,selectAllListener:this._multiselect?this._selectAllListener:null,sortableHeadCellKeydownListener:this._sortableHeadCellKeydownListener,headRowMouseDownListener:this._headRowMouseDownListener,headRowContextMenuListener:this._headRowContextMenuListener,filterListener:this._filter?this._filterListener:null,sortDirection:this._sortDirection,sortedColumn:this._sortedColumnIndex,multiColumnSort:this._multiColumnSort,filter:this._filter,wrapContent:this._wrapContent,fixedHeaders:this._fixedHeaders,layoutType:this._layoutType,dense:this._dense,resizable:this._resizable,rowCreatedCallback:this._rowCreatedCallback,cellCreatedCallback:this._cellCreatedCallback,selectAllTemplate:this._selectAllTemplate,selectCheckboxAlignment:this._selectCheckboxAlignment,tooltipSelect:this._tooltipSelect,tooltipSelectAll:this._tooltipSelectAll}}set select(e){this._select!==e&&(this._select=e,this._adapter.setSelectColumnVisibility(this._adapter.getTableElement(),this._select,this._selectRowListener,this._multiselect?this._selectAllListener:void 0,this._multiselect?this._selectAllTemplate:null,this._selectCheckboxAlignment,this._tableRows,this._tooltipSelect,this._tooltipSelectAll),this._updateSelections(!0),this._select?this._adapter.setHostAttribute(o.attributes.SELECT,this._select.toString()):this._adapter.removeHostAttribute(o.attributes.SELECT))}get select(){return this._select}set multiselect(e){this._multiselect!==e&&(this._multiselect=e,this._select&&(this._adapter.setSelectAllVisibility(this._adapter.getTableElement(),this._multiselect,this._multiselect?this._selectAllListener:null,this._multiselect?this.selectAllTemplate:null,this._selectCheckboxAlignment,this._tooltipSelectAll),this._updateSelections(!0)),this._adapter.setHostAttribute(o.attributes.MULTISELECT,this._multiselect.toString()))}get multiselect(){return this._multiselect}get selectKey(){return Array.isArray(this._selectKey)?[...this._selectKey]:this._selectKey}set selectKey(e){this._originalSelectKey!==e&&(Array.isArray(e)?(this._originalSelectKey=[...e],this._selectKey=[...e]):(this._originalSelectKey=e,this._selectKey=[e]),this._selectionManager.setKey(this._selectKey),this._updateSelections(!1))}get dense(){return this._dense}set dense(e){this._dense!==e&&(this._dense=e,this._adapter.setDense(this._adapter.getTableElement(),this._dense),this._adapter.setHostAttribute(o.attributes.DENSE,this._dense.toString()))}get roomy(){return this._roomy}set roomy(e){e!==this._roomy&&(this._roomy=e,this._applyRoomy())}set filter(e){this._filter!==e&&(this._filter=e,this._adapter.setFilterRow(this._tableConfiguration),this._adapter.setHostAttribute(o.attributes.FILTER,this._filter.toString()))}get filter(){return this._filter}set fixedHeaders(e){this._fixedHeaders!==e&&(this._fixedHeaders=e,this._adapter.setFixedHeaders(this._tableConfiguration))}get fixedHeaders(){return this._fixedHeaders}get layoutType(){return this._layoutType}set layoutType(e){this._layoutType!==e&&(this._layoutType=e,this._adapter.setTableLayoutType(this._tableConfiguration))}get wrapContent(){return this._wrapContent}set wrapContent(e){this._wrapContent!==e&&(this._wrapContent=e,this._adapter.setWrapContentState(this._tableConfiguration))}get resizable(){return this._resizable}set resizable(e){this._resizable!==e&&(this._resizable=e,this._adapter.setResizable(this._tableConfiguration))}get minResizeWidth(){return this._minResizeWidth}set minResizeWidth(e){this._minResizeWidth!==e&&(this._minResizeWidth=e,y(this._minResizeWidth)?this._minResizeWidth<0&&(this._minResizeWidth=0):this._minResizeWidth=o.numbers.MIN_RESIZE_WIDTH)}get allowRowClick(){return this._allowRowClick}set allowRowClick(e){this._allowRowClick!==e&&(this._allowRowClick=e,this._rendered&&(this._adapter.setRowClickListeners(this._adapter.getTableElement(),this._allowRowClick,this._rowClickListener,this._rowDoubleClickListener),this._adapter.setRowClickAttributes(this._adapter.getTableElement(),this._allowRowClick)))}get multiColumnSort(){return this._multiColumnSort}set multiColumnSort(e){e!==this._multiColumnSort&&(this._multiColumnSort=e,this._refreshTableSort(),this.render())}get selectCheckboxAlignment(){return this._selectCheckboxAlignment}set selectCheckboxAlignment(e){e!==this._selectCheckboxAlignment&&(this._selectCheckboxAlignment=e,this._adapter.setHostAttribute(o.attributes.SELECT_CHECKBOX_ALIGNMENT,e),this.render())}get tooltipSelect(){return this._tooltipSelect}set tooltipSelect(e){e!==this._tooltipSelect&&(this._tooltipSelect=e,typeof e=="string"&&this._adapter.setHostAttribute(o.attributes.TOOLTIP_SELECT,e),this.render())}get tooltipSelectAll(){return this._tooltipSelectAll}set tooltipSelectAll(e){e!==this._tooltipSelectAll&&(this._tooltipSelectAll=e,this._adapter.setHostAttribute(o.attributes.TOOLTIP_SELECT_ALL,e),this.render())}get selectAllTemplate(){return this._selectAllTemplate}set selectAllTemplate(e){e!==this._selectAllTemplate&&(this._selectAllTemplate=e,this.render())}get rowCreated(){return this._rowCreatedCallback}set rowCreated(e){this._rowCreatedCallback=e}get cellCreated(){return this._cellCreatedCallback}set cellCreated(e){this._cellCreatedCallback=e}isRowSelected(e){let t=v(Array.isArray(this._selectKey)?this._selectKey:[this._selectKey],e);return this.selectKey?!!this._selectionManager.getItems().find(l=>X(l,t)):this._selectionManager.exists(e)}getSelectedRows(){return this._selectionManager.getItems()}selectRows(e,t){if(!this._selectKey)throw new Error("You must set a selectKey to select rows.");(!this._multiselect||t)&&this.clearSelections(),e&&e.length&&(this._selectionManager.add(e),this._updateSelections(!t))}deselectRows(e){e&&e.length&&(this._selectionManager.remove(e),this._updateSelections(!1))}clearSelections(){let e=this._adapter.getTableElement();this._selectionManager.clear(),this._tableRows.forEach(t=>t.selected=!1),this._isAllSelected=!1,this._adapter.clearSelectedRows(e),this._select&&this._multiselect&&this._adapter.updateSelectAllState(e,!1)}hideColumn(e){let t=this._columnConfigurations[e];this._sortedColumnIndex===e&&(this._sortedColumnIndex=-1),this._hiddenColumnManager.exists(t)||(this._hiddenColumnManager.add(t),this.render())}showColumn(e){let t=this._columnConfigurations[e];this._hiddenColumnManager.exists(t)&&(this._hiddenColumnManager.remove(t),this.render())}isColumnHidden(e){let t=this._columnConfigurations[e];return!!t&&this._hiddenColumnManager.exists(t)}render(){this._adapter.createTable(this._tableConfiguration),this._renderSelections(),this._rendered=!0}_renderBody(){!this._rendered||(this._adapter.recreateTableBody(this._tableConfiguration),this._renderSelections())}_renderSelections(){this.select&&(this._isAllSelected=this._getSelectAllState(),this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)));let e=this._selectionManager.getItems();e.length&&this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,e,!1)}expandRow(e,t){if(!this._rendered)throw new Error("Cannot expand a row before the table has rendered.");if(e<0||e>this._tableRows.length)throw new Error(`Invalid row index: ${e}.`);return this._adapter.expandRow(this._tableConfiguration,e,t)}collapseRow(e){return!this._rendered||e<0||e>this._tableRows.length?Promise.resolve():this._adapter.collapseRow(this._tableConfiguration,e)}isRowExpanded(e){return this._adapter.isRowExpanded(this._tableConfiguration,e)}selectRowsByIndex(e,t){let l=e.map(i=>this._data[i]).filter(i=>!!i);this.selectRows(l,!t)}deselectRowsByIndex(e){let t=e.map(l=>this._data[l]).filter(l=>!!l);this.deselectRows(t)}_getSelectAllState(){return this._tableRows.length>0&&this._tableRows.every(e=>e.selected)}_updateSelections(e){this._tableRows.forEach(l=>l.selected=this._selectionManager.exists(l.data));let t=this._getSelectAllState();this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,this._selectionManager.getItems(),e),(t!==this._isAllSelected||this._isIndeterminate(t))&&(this._isAllSelected=t,this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)))}_onRowClick(e){if(e.stopImmediatePropagation(),e.target.tagName==="INPUT"&&e.target.type==="checkbox")return;let i=R(e).filter(m=>m.nodeType===1).find(m=>m.hasAttribute(o.attributes.CUSTOM_CELL_TEMPLATE));if(i&&i.hasAttribute(o.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION))return;let{index:s,data:r}=this._getSelectedRowFromEvent(e),c={index:s,data:r};this._adapter.emitHostEvent(o.events.ROW_CLICK,c,!0,!1)}_onRowDoubleClick(e){if(e.stopPropagation(),e.target.tagName==="INPUT"&&e.target.type==="checkbox")return;let t=this._getSelectedRowFromEvent(e),l={index:t.index,data:t.data};this._adapter.emitHostEvent(o.events.SELECT_DOUBLE,l,!0,!1)}_onRowSelected(e){let t=this._getSelectedRowFromEvent(e);this._multiselect||this._tableRows.filter(r=>r.selected).forEach(r=>{X(r.data,v(this._selectKey,t.data))||this.deselectRows([r.data])});let l=!this._selectionManager.exists(t.data);this._adapter.updateSelectedState(t.rowElement,l),l?this._selectionManager.add(t.data):this._selectionManager.remove(t.data),this._tableRows[t.index].selected=l;let i=[t.index],n=!1;if(this._multiselect){if(e.shiftKey&&this._previouslyClickedRow&&(i=this._shiftSelectRows(t),i.includes(this._previouslyClickedRow.index))){let r=i.indexOf(this._previouslyClickedRow.index);i.splice(r,1)}n=this._getSelectAllState(),this._adapter.updateSelectAllState(this._adapter.getTableElement(),n,this._isIndeterminate(n))}for(let s of i){let r=this._tableRows[s].data,m={selected:this._selectionManager.exists(r),index:s,data:r};this._adapter.emitHostEvent(o.events.SELECT,m,!0,!1)}if(this._isAllSelected!==n){this._isAllSelected=n;let s={status:this._isAllSelected,count:this._tableRows.filter(r=>r.selected).length,data:[...this._data],targetType:"row"};this._adapter.emitHostEvent(o.events.SELECT_ALL,s,!0,!1)}this._previouslyClickedRow=C({},t)}_getSelectedRowFromEvent(e){let l=R(e).find(r=>r.tagName==="TR"),i=l.parentElement,n=this._getNonExpandedRows(i).findIndex(r=>r===l),s=this._tableRows[n].data;return{rowElement:l,index:n,data:s}}_getNonExpandedRows(e){return Array.from(e.rows).filter(t=>!t.classList.contains(o.classes.TABLE_ROW_EXPANDABLE_CONTENT))}_onSelectAll(e){e.stopPropagation(),this._isAllSelected=!this._isAllSelected;let t=this._adapter.getTableElement();this._adapter.updateSelectAllState(t,this._isAllSelected),this._tableRows.forEach((i,n)=>{i.selected=this._isAllSelected,this._isAllSelected?this._selectionManager.add(i.data):this._selectionManager.remove(i.data);let s=a.getRowByIndex(t,n);s&&this._adapter.updateSelectedState(s,this._isAllSelected)});let l={status:this._isAllSelected,count:this._tableRows.filter(i=>i.selected).length,data:[...this._data],targetType:"select-all"};this._adapter.emitHostEvent(o.events.SELECT_ALL,l,!0,!1)}_onHeadRowContextMenu(e){e.ctrlKey&&e.preventDefault()}_onHeadRowMouseDown(e){if(e.button!==0)return;let t=R(e),l=e.target,i=t.find(r=>r.tagName==="TR"),n=t.find(r=>r.tagName==="TH"),s=Array.from(i.cells).findIndex(r=>r===n);this._headCellMouseDownIndex=s,l!==n&&l.classList.contains(o.classes.TABLE_RESIZE_HANDLE)&&(this._resizeDescriptor={element:n,startWidth:n.offsetWidth,startX:e.pageX,width:n.offsetWidth,index:this._select?s-1:s},this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.setResizeColumnVisibility(this._tableConfiguration,s,!0)),this._adapter.addDocumentListener("mouseup",this._documentMouseUpListener)}_onMouseMove(e){if(this._resizeDescriptor){let t=this._resizeDescriptor.startWidth+(e.pageX-this._resizeDescriptor.startX);t<this._minResizeWidth&&(t=this._minResizeWidth),this._resizeDescriptor.width=t,this._resizeDescriptor.element.style.width=`${t}px`,this._adapter.addTableClass(o.classes.TABLE_RESIZING)}}_onMouseUp(e){if(this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener),this._adapter.removeTableClass(o.classes.TABLE_RESIZING),this._headCellMouseDownIndex!==void 0){if(this._resizeDescriptor){this._adapter.normalizeColumnWidths(this._tableConfiguration),this._adapter.setResizeColumnVisibility(this._tableConfiguration,this._headCellMouseDownIndex,!1);let t={index:this._resizeDescriptor.index,width:this._resizeDescriptor.width};this._adapter.emitHostEvent(o.events.COLUMN_RESIZE,t),this._resizeDescriptor=void 0}else this._tableConfiguration.tableElement.tHead.contains(e.target)&&(this._multiColumnSort?this._onMultiSort(this._headCellMouseDownIndex,e.ctrlKey):this._onSort(this._headCellMouseDownIndex));this._headCellMouseDownIndex=void 0}}_onSortableHeadCellKeydown(e){if(e.key===" "||e.key==="Enter"){let t=R(e),l=t.find(s=>s.tagName==="TR"),i=t.find(s=>s.tagName==="TH"),n=Array.from(l.cells).findIndex(s=>s===i);this._onSort(n)}}_onSort(e){let t=this._select?e-1:e,l=t>=0?this._visibleColumnConfigurations[t]:null;if(!l||!l.sortable)return;let i="ASC",n=t===this._sortedColumnIndex,s=this._sortDirection==="ASC"||this._sortDirection===void 0,r=n&&this._sortDirection==="DESC";n&&s&&(i="DESC"),r&&!l.preventUnsort&&(i="UNSET");let c={direction:i,columnIndex:t};if(!!this._adapter.emitHostEvent(o.events.SORT,c,!0,!0)){if(n&&this._sortDirection==="DESC"&&!l.preventUnsort){this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=-1;return}this._sortDirection=i,t===this._sortedColumnIndex?this._adapter.setSortDirection(this._adapter.getTableElement(),e,this._sortDirection):(this._sortedColumnIndex>=0&&this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=t,this._adapter.setSortedColumn(this._adapter.getTableElement(),e,this._sortDirection))}}_onMultiSort(e,t){let l=this._select?e-1:e,i=l>=0?this._visibleColumnConfigurations[l]:null;if(!i||!i.sortable)return;let n=this._multiSortManager.sortedColumns,s=this._multiSortManager.getSortColumn(l);s?this._multiSortManager.updateSortColumn(s):t?this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:l,propertyName:i.property}):(this._multiSortManager.clearMultiSort(),this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:l,propertyName:i.property}));let r=this._multiSortManager.sortedColumns.map(d=>C({},d));if(!this._adapter.emitHostEvent(o.events.SORT,r,!0,!0)){this._multiSortManager.setSortColumns(n);return}let m=this._multiSortManager.sortedColumns.length>1;for(let d=0;d<this._visibleColumnConfigurations.length;d++){let u=this._select?d+1:d;if(!this._multiSortManager.isSortColumn(d))this._adapter.removeColumnSort(this._adapter.getTableElement(),u),a.setMultiSortColumnSortNumber(this._adapter.getTableElement(),m,u,null);else{let T=this._multiSortManager.getSortColumn(d);T&&(this._adapter.setSortedColumn(this._adapter.getTableElement(),u,T.direction),a.setMultiSortColumnSortNumber(this._adapter.getTableElement(),m,u,T.sortOrder||null))}}}_onFilter(e,t){let l={value:e,columnIndex:t};this._adapter.emitHostEvent(o.events.FILTER,l,!0,!1)}_shiftSelectRows(e){let t=[];if(this._previouslyClickedRow){let l=this._previouslyClickedRow.index,i=e.index,n=i>=l?l:i,s=i>=l?i:l;s+=s>n?1:0,n+=n>s?1:0;let r=d=>this.selectRows(d,!1),c=this._tableRows.find(d=>d.selected&&d.data===e.data),m=this._tableRows.find(d=>{var u;return d.data===((u=this._previouslyClickedRow)==null?void 0:u.data)&&!d.selected});(!c||m)&&(r=d=>this.deselectRows(d));for(let d=n;d<s;d++)t.push(d);r(this.data.filter((d,u)=>t.includes(u)))}return t}_isIndeterminate(e){return!e&&this.getSelectedRows().length>0&&this._data.length!==this.getSelectedRows().length}_applyRoomy(){this._adapter.setRoomy(this._adapter.getTableElement(),this._roomy),this._adapter.setHostAttribute(o.attributes.ROOMY,this._roomy.toString())}_refreshTableSort(){if(this._sortedColumnIndex=this._visibleColumnConfigurations.findIndex(e=>e.initialSort),this._sortedColumnIndex>=0&&this._sortDirection===void 0){let e=this._visibleColumnConfigurations[this._sortedColumnIndex];e.initialSort===!0&&e.sortDirection?this._sortDirection=e.sortDirection:typeof e.initialSort=="object"&&e.initialSort.direction&&(this._sortDirection=e.initialSort.direction)}if(this._multiColumnSort){let e=[];this._visibleColumnConfigurations.forEach((t,l)=>{typeof t.initialSort=="object"&&e.push({columnIndex:l,direction:t.initialSort.direction,sortOrder:t.initialSort.sortOrder,propertyName:t.property})}),this._multiSortManager.setSortColumns(e)}}};var E=class extends Q{constructor(){super();oe.define(te),this._foundation=new z(new N(this))}static get observedAttributes(){return[o.attributes.SELECT,o.attributes.MULTISELECT,o.attributes.SELECT_KEY,o.attributes.DENSE,o.attributes.ROOMY,o.attributes.FILTER,o.attributes.FIXED_HEADERS,o.attributes.LAYOUT_TYPE,o.attributes.WRAP_CONTENT,o.attributes.RESIZABLE,o.attributes.MIN_RESIZE_WIDTH,o.attributes.ALLOW_ROW_CLICK,o.attributes.MULTI_COLUMN_SORT,o.attributes.SELECT_CHECKBOX_ALIGNMENT,o.attributes.TOOLTIP_SELECT,o.attributes.TOOLTIP_SELECT_ALL]}initializedCallback(){this._foundation.initialize()}connectedCallback(){this._foundation.connect()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,l,i){switch(t){case o.attributes.SELECT:this.select=h(i);break;case o.attributes.MULTISELECT:this.multiselect=h(i);break;case o.attributes.SELECT_KEY:this.selectKey=i;break;case o.attributes.DENSE:this.dense=h(i);break;case o.attributes.ROOMY:this.roomy=h(i);break;case o.attributes.FILTER:this.filter=h(i);break;case o.attributes.FIXED_HEADERS:this.fixedHeaders=h(i);break;case o.attributes.LAYOUT_TYPE:this.layoutType=i;break;case o.attributes.WRAP_CONTENT:this.wrapContent=h(i);break;case o.attributes.RESIZABLE:this.resizable=h(i);break;case o.attributes.MIN_RESIZE_WIDTH:this.minResizeWidth=V(i);break;case o.attributes.ALLOW_ROW_CLICK:this.allowRowClick=h(i);break;case o.attributes.MULTI_COLUMN_SORT:this.multiColumnSort=h(i);break;case o.attributes.SELECT_CHECKBOX_ALIGNMENT:this.selectCheckboxAlignment=this.getAttribute(o.attributes.SELECT_CHECKBOX_ALIGNMENT)||"center";break;case o.attributes.TOOLTIP_SELECT:this.tooltipSelect=i;break;case o.attributes.TOOLTIP_SELECT_ALL:this.tooltipSelectAll=i;break}}hideColumn(t){this._foundation.hideColumn(t)}showColumn(t){this._foundation.showColumn(t)}isColumnHidden(t){return this._foundation.isColumnHidden(t)}getSelectedRows(){return this._foundation.getSelectedRows()}selectRow(t){this._foundation.selectRows([t],!1)}selectRows(t,l=!1){this._foundation.selectRows(t,!l)}deselectRow(t){this._foundation.deselectRows([t])}deselectRows(t){this._foundation.deselectRows(t)}clearSelections(){this._foundation.clearSelections()}render(){this._foundation.render()}expandRow(t,l){return this._foundation.expandRow(t,l)}collapseRow(t){return this._foundation.collapseRow(t)}isRowExpanded(t){return this._foundation.isRowExpanded(t)}selectRowsByIndex(t,l){typeof t=="number"?this._foundation.selectRowsByIndex([t],l):Array.isArray(t)&&this._foundation.selectRowsByIndex(t,l)}deselectRowsByIndex(t){typeof t=="number"?this._foundation.deselectRowsByIndex([t]):Array.isArray(t)&&this._foundation.deselectRowsByIndex(t)}isRowSelected(t){return this._foundation.isRowSelected(t)}};_([b()],E.prototype,"data",2),_([b()],E.prototype,"columnConfigurations",2),_([b()],E.prototype,"select",2),_([b()],E.prototype,"multiselect",2),_([b()],E.prototype,"selectKey",2),_([b()],E.prototype,"tooltipSelect",2),_([b()],E.prototype,"tooltipSelectAll",2),_([b()],E.prototype,"dense",2),_([b()],E.prototype,"roomy",2),_([b()],E.prototype,"filter",2),_([b()],E.prototype,"fixedHeaders",2),_([b()],E.prototype,"layoutType",2),_([b()],E.prototype,"wrapContent",2),_([b()],E.prototype,"resizable",2),_([b()],E.prototype,"minResizeWidth",2),_([b()],E.prototype,"allowRowClick",2),_([b()],E.prototype,"multiColumnSort",2),_([b()],E.prototype,"rowCreated",2),_([b()],E.prototype,"cellCreated",2),_([b()],E.prototype,"selectAllTemplate",2),_([b()],E.prototype,"selectCheckboxAlignment",2),E=_([J({name:o.elementName,dependencies:[ne,se,ce]})],E);function El(){j(E)}export{o as a,B as b,O as c,Le as d,N as e,P as f,z as g,E as h,El as i};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as q,b as x,c as v,d as X}from"./chunk.DONAMICM.js";import{c as ce}from"./chunk.YVXZ753Q.js";import{c as re}from"./chunk.M4PI24CI.js";import{a as M,d as ne}from"./chunk.SXQ22MNR.js";import{a as R}from"./chunk.4DAIIJ37.js";import{b as te}from"./chunk.MZLPUI6R.js";import{a as ae}from"./chunk.SYHVVXRW.js";import{a as ie,d as oe,l as se}from"./chunk.WHQZNZHW.js";import{a as Y}from"./chunk.2KXSGD3S.js";import{a as le}from"./chunk.BESB4RGK.js";import{a as U}from"./chunk.UWYANU5D.js";import{a as b}from"./chunk.KTGSZEAG.js";import{a as J,b as ee}from"./chunk.DL7NX432.js";import{a as j,l as Q}from"./chunk.LJLEPTLU.js";import{d as g,e as F,f as p,g as D,i as W,j as K,t as $}from"./chunk.4LA6HEA7.js";import{b as L,c as G,d as y,h as H,j as w,k as h,l as V,o as Z}from"./chunk.J2M2MXP2.js";import{a as C,f as _}from"./chunk.MCIQXNKY.js";var I=class{constructor(e){this._key=e,this._items=[]}getItems(){return[...this._items]}count(){return this._items.length}setKey(e){this._key=e}add(e){return e instanceof Array||(e=[e]),e.forEach(t=>{this.exists(t)||this._items.push(t)}),this}remove(e){e instanceof Array||(e=[e]);for(let t=e.length-1;t>=0;t--)this.exists(e[t])&&this._items.splice(this._items.indexOf(this._getItem(e[t])),1);return this}clear(){return this._items=[],this}exists(e){return this._getItem(e)!==null}_getItem(e){return this._key?x(this._items,v(this._key,e))||null:this._items.find(t=>t===e)||null}};var S=`${ee}table`,de={TABLE:"forge-table",TABLE_DENSE:"forge-table--dense",TABLE_ROOMY:"forge-table--roomy",TABLE_RESIZABLE:"forge-table--resizable",TABLE_RESIZING:"forge-table--resizing",TABLE_RESIZE_HANDLE:"forge-table__resize-handle",TABLE_NO_WRAP_CONTENT:"forge-table--no-wrap-content",TABLE_LAYOUT_FIXED:"forge-table--layout-fixed",TABLE_FILTER_VISIBLE:"forge-table--filter-visible",TABLE_FIXED:"forge-table--fixed",TABLE_HEAD:"forge-table-head",TABLE_HEAD_ROW:"forge-table-head__row",TABLE_HEAD_ROW_FILTER:"forge-table-head__row__filter",TABLE_HEAD_CELL:"forge-table-head__cell",TABLE_HEAD_CELL_CONTAINER:"forge-table-head__cell-container",TABLE_HEAD_CELL_SORTABLE:"forge-table-head__cell--sortable",TABLE_HEAD_CELL_SORT_ICON:"forge-table-head__cell-sort-icon",TABLE_HEAD_CELL_TEXT:"forge-table-head__cell-text",TABLE_HEAD_CELL_SORT_ICON_ACTIVE:"forge-table-head__cell-sort-icon--active",TABLE_HEAD_CELL_SORTED_ASCENDING:"forge-table-head__cell--sorted-ascending",TABLE_HEAD_CELL_SORTED_DESCENDING:"forge-table-head__cell--sorted-descending",TABLE_HEAD_CELL_SORT_ORDER:"forge-table-head__cell__sort-order",TABLE_HEAD_CELL_SORT_ORDER_HIDDEN:"forge-table-head__cell__sort-order--hidden",TABLE_BODY:"forge-table-body",TABLE_BODY_ROW:"forge-table-body__row",TABLE_BODY_ROW_SELECTED:"forge-table-body__row--selected",TABLE_BODY_ROW_CLICKABLE:"forge-table-body__row--clickable",TABLE_BODY_CELL:"forge-table-body__cell",TABLE_ROW:"forge-table-row",TABLE_ROW_EXPANDED:"forge-table-row--expanded",TABLE_ROW_EXPANDABLE_CONTENT:"forge-table-row__expandable-content",TABLE_ROW_EXPANDABLE_CONTENT_CELL:"forge-table-row__expandable-content-cell",TABLE_CELL:"forge-table-cell",TABLE_CELL_SELECT:"forge-table-cell__select",TABLE_CELL_SELECT_CHECKBOX:"forge-table-cell__select-checkbox",TABLE_CELL_SELECT_CHECKBOX_CONTAINER:"forge-table-cell__select-checkbox-container",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT:"forge-table-cell__select-checkbox-container--align-right",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT:"forge-table-cell__select-checkbox-container--align-left",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER:"forge-table-cell__select-checkbox-container--align-center",TABLE_CELL_CONTAINER:"forge-table-cell__container",TABLE_CELL_CONTAINER_TEXT:"forge-table-cell__container-text",TABLE_CELL_CENTER:"forge-table-cell--center",TABLE_CELL_RIGHT:"forge-table-cell--right",TABLE_CELL_RESIZABLE:"forge-table-cell--resizing"},_e={TABLE:".forge-table",CHECKBOX_INPUT:"forge-checkbox > input[type=checkbox]:not([forge-ignore])",SELECT_ALL_TEMPLATE_CHECKBOX_INPUT:"input[type=checkbox]:not([forge-ignore])",ROW_SELECTED:`.${de.TABLE_BODY_ROW_SELECTED}`},be={SELECT:"select",MULTISELECT:"multiselect",SELECT_KEY:"select-key",DENSE:"dense",ROOMY:"roomy",FILTER:"filter",FIXED_HEADERS:"fixed-headers",LAYOUT_TYPE:"layout-type",WRAP_CONTENT:"wrap-content",RESIZABLE:"resizable",MIN_RESIZE_WIDTH:"min-resize-width",ALLOW_ROW_CLICK:"allow-row-click",MULTI_COLUMN_SORT:"multi-column-sort",SELECT_CHECKBOX_ALIGNMENT:"select-checkbox-alignment",TOOLTIP_SELECT:"tooltip-select",TOOLTIP_SELECT_ALL:"tooltip-select-all",CHECKBOX_TYPE:"forge-checkbox-type",CUSTOM_CELL_TEMPLATE:"data-cell-template",CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION:"data-cell-template-stop-propagation"},pe={ROW_CLICK:`${S}-row-click`,SELECT:`${S}-select`,SELECT_DOUBLE:`${S}-select-double`,SELECT_ALL:`${S}-select-all`,SORT:`${S}-sort`,FILTER:`${S}-filter`,INITIALIZED:`${S}-initialized`,COLUMN_RESIZE:`${S}-column-resize`},Te={SELECT_ALL:"select-all",SELECT_ROW:"select-row",DEFAULT_LAYOUT_TYPE:"auto"},Ce={SORT_DOWN:"arrow_downward"},he={DEFAULT_FILTER_DEBOUNCE_TIME:750,MIN_RESIZE_WIDTH:100,RESIZE_HOVER_DURATION:150},o={elementName:S,classes:de,selectors:_e,attributes:be,events:pe,strings:Te,icons:Ce,numbers:he};var B=(l=>(l.Left="left",l.Right="right",l.Center="center",l))(B||{}),O=(l=>(l.Ascending="ASC",l.Descending="DESC",l.Unset="UNSET",l))(O||{}),Le=(s=>(s.InputText="text",s.InputNumber="number",s.Select="select",s.SelectMultiple="select-multiple",s.Date="date",s.DateRange="date-range",s))(Le||{});function me(f){return f&&typeof f=="object"&&"content"in f}var a=class{static createTable(e){a._resetTable(e.tableElement);let t=a._createTableHead(e),l=a._createTableBody(e);e.clickListener&&(a._attachRowClickListeners(l,e.clickListener,e.doubleClickListener),a._addRowClickAttributes(l)),e.fixedHeaders&&a.setFixedHeaders(e),e.resizable&&a.setResizable(e),e.dense&&a.setDenseState(e.tableElement,e.dense),e.wrapContent&&a.setWrapContentState(e.tableElement,e.wrapContent),e.selectListener&&a._addSelectColumn(t,l,e.selectListener,e.selectAllListener,e.selectAllTemplate,e.selectCheckboxAlignment,e.data,e.tooltipSelect,e.tooltipSelectAll),(e.resizable||e.columnConfigurations.some(i=>!!i.sortable))&&(a._attachHeadRowMouseDownListener(t,e.headRowMouseDownListener),a._isMac()&&a._attachHeadRowContextMenuListener(t,e.headRowContextMenuListener)),a.setLayoutType(e),a._setTableHead(e.tableElement,t),e.filter&&a.setFilterRow(e),a._setTableBody(e.tableElement,l)}static _setTableHead(e,t){e.tHead?F(t,e.tHead):e.appendChild(t)}static _setTableBody(e,t){e.tBodies.length?F(t,e.tBodies[0]):e.appendChild(t)}static recreateTableBody(e){let t=a._createTableBody(e);e.clickListener&&(a._attachRowClickListeners(t,e.clickListener,e.doubleClickListener),a._addRowClickAttributes(t)),e.selectListener&&(a._createBodySelectColumn(t,e.selectCheckboxAlignment,e.data,e.tooltipSelect,e.tooltipSelectAll),a._attachRowSelectListeners(t,e.selectListener)),a._setTableBody(e.tableElement,t)}static _resetTable(e){g(e)}static _createMultisortTooltip(){let e=document.createElement(ae.elementName);return e.textContent="Ctrl + click to sort multiple columns",e.position="bottom",e.delay=0,e}static _createTableHead(e){let t=document.createElement("thead"),l=t.insertRow();p([o.classes.TABLE_ROW,o.classes.TABLE_HEAD_ROW],l);let i=!1;for(let n=0;n<e.columnConfigurations.length;n++){let s=e.columnConfigurations[n],r=document.createElement("th");r.scope="col",p([o.classes.TABLE_CELL,o.classes.TABLE_HEAD_CELL],r);let c;if(s.sortable?(c=document.createElement("button"),c.type="button",c.addEventListener("keydown",e.sortableHeadCellKeydownListener)):c=document.createElement("div"),c.classList.add(o.classes.TABLE_HEAD_CELL_CONTAINER),e.multiColumnSort){let d=a._createMultisortTooltip();c.appendChild(d)}if(s.align&&a._setCellAlignmentClass(c,s.align),L(s.width)){let d=K(s.width);d&&(r.style.width=d)}if(e.resizable&&s.resizable!==!1){let d=document.createElement("div");d.classList.add(o.classes.TABLE_RESIZE_HANDLE),r.appendChild(d)}L(s.headerCellStyle)&&w(s.headerCellStyle)&&(Object.assign(r.style,s.headerCellStyle),Object.assign(c.style,s.headerCellStyle));let m=document.createElement("span");if(m.classList.add(o.classes.TABLE_HEAD_CELL_TEXT),m.textContent=s.header&&typeof s.header=="string"?s.header.trim():"",s.sortable){r.classList.add(o.classes.TABLE_HEAD_CELL_SORTABLE);let d=document.createElement("span");p([o.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,o.classes.TABLE_HEAD_CELL_SORT_ORDER],d);let u=document.createElement(ie.elementName);u.name=o.icons.SORT_DOWN,p([o.classes.TABLE_HEAD_CELL_SORT_ICON],u),e.multiColumnSort?typeof s.initialSort=="object"&&s.initialSort.sortOrder&&(d.textContent=s.initialSort.sortOrder.toString(),e.columnConfigurations.filter(T=>typeof T.initialSort=="object").length>1&&D(o.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,d),r.classList.add(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),u.classList.add(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),a._setColumnSortDirection(r,s.initialSort.direction)):e.sortedColumn===n&&!i&&!e.multiColumnSort&&(r.classList.add(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),u.classList.add(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),a._setColumnSortDirection(r,e.sortDirection),i=!0),c.appendChild(u),c.appendChild(d)}typeof s.headerTemplate=="function"?Promise.resolve(s.headerTemplate(n,c,s)).then(d=>{if(d){let u=document.createElement("div");p(o.classes.TABLE_CELL_CONTAINER,u),typeof d=="string"?u.innerHTML=d:a._prepend(d,u),u.setAttribute(o.attributes.CUSTOM_CELL_TEMPLATE,""),a._prepend(u,c)}}):a._prepend(m,c),r.appendChild(c),l.appendChild(r)}return t}static setSortDirection(e,t,l){let i=a._getHeaderCellByIndex(e,t);e.querySelectorAll("th[aria-sort]").forEach(n=>n.removeAttribute("aria-sort")),a._setColumnSortDirection(i,l)}static _setColumnSortDirection(e,t){e.classList.contains(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&e.classList.remove(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),e.classList.contains(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&e.classList.remove(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),!t||t==="DESC"?(e.setAttribute("aria-sort","descending"),e.classList.add(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)):(e.setAttribute("aria-sort","ascending"),e.classList.add(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING))}static _createTableBody(e){let t=document.createElement("tbody");return a._getOrderedRowData(e.columnConfigurations,e.data).forEach((i,n)=>{let s=t.insertRow();p([o.classes.TABLE_ROW,o.classes.TABLE_BODY_ROW],s),a._populateRowCells(e,s,i,n),typeof e.rowCreatedCallback=="function"&&e.rowCreatedCallback(s,n,C({},e.data[n].data))}),t}static _populateRowCells(e,t,l,i){for(let n=0;n<l.length;n++){let s=e.columnConfigurations[n],r=t.insertCell();if(p([o.classes.TABLE_CELL,o.classes.TABLE_BODY_CELL],r),L(s.width)){let m=K(s.width);m&&(r.style.width=m)}let c=document.createElement("div");if(c.classList.add(o.classes.TABLE_CELL_CONTAINER),L(s.cellStyle)&&w(s.cellStyle)&&(Object.assign(r.style,s.cellStyle),Object.assign(c.style,s.cellStyle)),s.template&&typeof s.template=="function"){let m=e.data[i]?e.data[i].data:void 0;Promise.resolve(s.template(i,c,m,n)).then(d=>{let u=me(d)?d:{content:d,stopClickPropagation:s.stopCellTemplateClickPropagation};!u.content||(typeof u.content=="string"?c.innerHTML=u.content:c.appendChild(u.content),c.setAttribute(o.attributes.CUSTOM_CELL_TEMPLATE,""),u.stopClickPropagation&&c.setAttribute(o.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION,""))})}else if(s.property){let m=document.createElement("span");m.classList.add(o.classes.TABLE_CELL_CONTAINER_TEXT),c.appendChild(m),s.transform&&typeof s.transform=="function"?Promise.resolve(s.transform(l[n])).then(d=>m.textContent=d):l[n]==null?m.textContent="":m.textContent=l[n].toString()}if(s.align&&a._setCellAlignmentClass(c,s.align),r.appendChild(c),L(s.columnSpan)){if(s.columnSpan==="all"){r.colSpan=l.length-n;break}else if(typeof s.columnSpan=="number"&&s.columnSpan>0){let m=s.columnSpan;s.columnSpan>l.length-n&&(m=l.length),r.colSpan=m,n=n+(m-1)}}typeof e.cellCreatedCallback=="function"&&e.cellCreatedCallback(r,i,n)}}static _setCellAlignmentClass(e,t){switch(t){case"center":e.classList.add(o.classes.TABLE_CELL_CENTER);break;case"right":e.classList.add(o.classes.TABLE_CELL_RIGHT);break}}static _getNonExpandedRows(e){return Array.from(e).filter(t=>!t.classList.contains(o.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _getExpandedRows(e){return Array.from(e).filter(t=>t.classList.contains(o.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _createColumnDataMap(e,t){return e.map(l=>({config:l,data:t.map(i=>{if(l.property){let n=q(i.data,l.property);return L(n)?n:null}return null})}))}static _getOrderedRowData(e,t){let l=a._createColumnDataMap(e,t),i=[];for(let n of l)for(let s=0;s<n.data.length;s++)i[s]||(i[s]=[]),i[s].push(n.data[s]);return i}static _attachRowClickListeners(e,t,l){a._getNonExpandedRows(e.rows).forEach(n=>{n.addEventListener("click",t),l&&n.addEventListener("dblclick",l)})}static _addRowClickAttributes(e){a._getNonExpandedRows(e.rows).forEach(l=>{l.classList.add(o.classes.TABLE_BODY_ROW_CLICKABLE)})}static _removeRowClickAttributes(e){a._getNonExpandedRows(e.rows).forEach(l=>{l.classList.remove(o.classes.TABLE_BODY_ROW_CLICKABLE)})}static _attachRowSelectListeners(e,t){a._getNonExpandedRows(e.rows).forEach(i=>a._attachRowSelectListener(i,t))}static _attachRowSelectListener(e,t){let l=a._getCheckboxElement(e);l==null||l.addEventListener("click",t)}static _detachRowSelectListeners(e,t){Array.from(e.rows).forEach(l=>{let i=a._getCheckboxElement(l);i==null||i.removeEventListener("click",t)})}static _detachRowClickListeners(e,t,l){Array.from(e.rows).forEach(i=>{i.removeEventListener("click",t),i.removeEventListener("dblclick",l)})}static _attachSelectAllListener(e,t){let l=e.rows[e.rows.length-1],i=a._getCheckboxElement(l);if(!i)throw new Error("Checkbox element not found.");i.addEventListener("change",t)}static _tryAttachSelectAllTemplateListener(e,t){let l=e.rows[e.rows.length-1],i=a._tryGetSelectAllCheckboxElement(l);i&&i.addEventListener("change",t)}static _detachSelectAllListener(e,t){let l=e.rows[e.rows.length-1],i=a._tryGetSelectAllCheckboxElement(l);!i||i.removeEventListener("change",t)}static _attachHeadRowMouseDownListener(e,t){let l=e.rows[0];if(!l)throw new Error("Missing table header row. Unable to attach sort listener.");l.addEventListener("mousedown",t)}static _attachHeadRowContextMenuListener(e,t){let l=e.rows[0];if(!l)throw new Error("Missing table header row. Unable to attach sort listener.");l.addEventListener("contextmenu",t)}static _createSelectColumn(e,t,l,i,n,s,r,c,m){e&&a._createHeadSelectColumn(e,l,i,n,s,m),t&&a._createBodySelectColumn(t,s,r,c,m)}static _createHeadSelectColumn(e,t,l,i,n,s){var r;if(Array.from(e.rows).forEach(c=>{let m=document.createElement("th");p([o.classes.TABLE_CELL,o.classes.TABLE_HEAD_CELL],m),c.insertBefore(m,c.cells.item(0))}),t){let c=(r=e.rows.item(e.rows.length-1))==null?void 0:r.cells.item(0);c.classList.add(o.classes.TABLE_CELL_SELECT),typeof l=="function"?a._renderSelectAllTemplate(l,e).then(()=>{typeof i=="function"&&i()}):c==null||c.appendChild(a._createCheckboxElement(!0,n,null,null,null,s))}}static _createBodySelectColumn(e,t,l,i,n){if(a._getNonExpandedRows(e.rows).forEach((r,c)=>a._addRowSelectColumn(r,t,c,l[c],i,n)),e.rows.length){let r=e.rows.item(0);r&&a._updateExpandedRowColspan(e.rows,r.cells.length)}}static _addRowSelectColumn(e,t,l,i,n,s){let r=e.insertCell(0);p([o.classes.TABLE_CELL,o.classes.TABLE_BODY_CELL,o.classes.TABLE_CELL_SELECT],r),r.appendChild(a._createCheckboxElement(!1,t,l,i,n,s))}static _destroySelectColumn(e,t){let l=a._getNonExpandedRows(t.rows);if(Array.from(e.rows).forEach(i=>i.removeChild(i.cells.item(0))),Array.from(l).forEach(i=>i.removeChild(i.cells.item(0))),t.rows.length){let i=t.rows.item(0);i&&a._updateExpandedRowColspan(t.rows,i.cells.length)}}static _hasSelectColumn(e,t){return[...Array.from(e.rows),...Array.from(t.rows)].some(i=>i.cells.item(0).classList.contains(o.classes.TABLE_CELL_SELECT))}static _createCheckboxElement(e,t,l,i,n,s){let r=document.createElement("div");if(r.classList.add(o.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER),t)switch(t){case"center":r.classList.add(o.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER);break;case"left":r.classList.add(o.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT);break;case"right":r.classList.add(o.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT);break}let c=document.createElement(re.elementName),m=document.createElement("input");m.type="checkbox";let d=n||"";i&&typeof n=="function"&&(d=n.call(null,l,i.data));let u=document.createElement("forge-tooltip");return u.position="left",e?u.textContent=s||"":u.textContent=d,m.setAttribute("aria-label","Select row"),c.appendChild(m),r.appendChild(u),r.appendChild(c),r}static _getCheckboxElement(e){let t=e.querySelector(`.${o.classes.TABLE_CELL_SELECT}`);return t?t.querySelector(o.selectors.CHECKBOX_INPUT):null}static _tryGetSelectAllCheckboxElement(e){let t=e.querySelector(`.${o.classes.TABLE_CELL_SELECT}`);return t?t.querySelector(o.selectors.CHECKBOX_INPUT)||t.querySelector(o.selectors.SELECT_ALL_TEMPLATE_CHECKBOX_INPUT):null}static _setSelectedCheckboxState(e,t){e&&(e.checked=t)}static _setIndeterminateCheckboxState(e,t){e&&(e.indeterminate=t)}static _setRowSelectedState(e,t){t?e.classList.contains(o.classes.TABLE_BODY_ROW_SELECTED)||e.classList.add(o.classes.TABLE_BODY_ROW_SELECTED):e.classList.remove(o.classes.TABLE_BODY_ROW_SELECTED)}static _updateExpandedRowColspan(e,t){a._getExpandedRows(e).forEach(i=>{let n=i.cells.item(0);n&&(n.colSpan=t)})}static updateSelectedState(e,t){a._setRowSelectedState(e,t);let l=a._getCheckboxElement(e);l&&a._setSelectedCheckboxState(l,t)}static getRowByIndex(e,t){return a._getNonExpandedRows(e.tBodies[0].rows)[t]}static updateSelectAllState(e,t,l){if(!e.tHead)return;let i=e.tHead.rows[e.tHead.rows.length-1],n=a._tryGetSelectAllCheckboxElement(i);n&&(a._setSelectedCheckboxState(n,t),a._setIndeterminateCheckboxState(n,!!l))}static setSelectedRows(e,t,l,i,n=!1){if(!e.tBodies.length)return;n||a.clearSelectedRows(e);let s=e.tBodies[0].rows,r=0;i.length&&Array.from(s).forEach((c,m)=>{let d=l[m];if(x(i,v(t,d))){a._setRowSelectedState(c,!0);let T=a._getCheckboxElement(c);T&&a._setSelectedCheckboxState(T,!0),r++}}),a.updateSelectAllState(e,r>0&&s.length===r)}static clearSelectedRows(e){if(!e.tBodies.length)return;a._getNonExpandedRows(e.tBodies[0].rows).forEach(l=>{a._setRowSelectedState(l,!1);let i=a._getCheckboxElement(l);i&&a._setSelectedCheckboxState(i,!1)})}static setSortedColumn(e,t,l){let i=a._getHeaderCellByIndex(e,t);a._getSortIconElementFromHeaderCell(i).classList.add(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),a._setColumnSortDirection(i,l)}static setMultiSortColumnSortNumber(e,t,l,i){let r=a._getHeaderCellByIndex(e,l).querySelector(`.${o.classes.TABLE_HEAD_CELL_CONTAINER}`).querySelector(`.${o.classes.TABLE_HEAD_CELL_SORT_ORDER}`);r&&($(r,typeof i!="number"||!t,o.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN),i&&(r.textContent=i.toString()))}static removeColumnSort(e,t){let l=a._getHeaderCellByIndex(e,t);l.removeAttribute("aria-sort"),l.classList.contains(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&l.classList.remove(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),l.classList.contains(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&l.classList.remove(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);let i=a._getSortIconElementFromHeaderCell(l);i&&i.classList.contains(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)&&i.classList.remove(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)}static _getHeaderCellByIndex(e,t){if(!e.tHead)throw new Error("Table head element cannot be null.");return e.tHead.rows.item(0).cells.item(t)}static _getSortIconElementFromHeaderCell(e){return e.querySelector(`.${o.classes.TABLE_HEAD_CELL_SORT_ICON}`)}static setSelectColumnVisibility(e,t,l,i,n,s,r,c,m){let d=e.tHead,u=e.tBodies[0];!d||!u||(t?a._addSelectColumn(d,u,l,i,n,s,r,c,m):a._hasSelectColumn(d,u)&&(l&&a._detachRowSelectListeners(u,l),i&&a._detachSelectAllListener(d,i),a._destroySelectColumn(d,u)))}static _addSelectColumn(e,t,l,i,n,s,r,c,m){a._createSelectColumn(e,t,!!i,n,()=>{i&&a._tryAttachSelectAllTemplateListener(e,i)},s,r,c,m),l&&a._attachRowSelectListeners(t,l),i&&!n&&a._tryAttachSelectAllTemplateListener(e,i)}static setDenseState(e,t){e.classList.contains(o.classes.TABLE_DENSE)&&e.classList.remove(o.classes.TABLE_DENSE),t&&e.classList.add(o.classes.TABLE_DENSE)}static setRoomyState(e,t){e.classList.contains(o.classes.TABLE_ROOMY)&&e.classList.remove(o.classes.TABLE_ROOMY),t&&e.classList.add(o.classes.TABLE_ROOMY)}static setResizable(e){let t=e.tableElement.tHead;e.resizable?(e.tableElement.classList.add(o.classes.TABLE_RESIZABLE),a._addResizeHandles(t,e)):(e.tableElement.classList.remove(o.classes.TABLE_RESIZABLE),a._removeResizeHandles(t,e))}static _addResizeHandles(e,t){if(!e)return;let l=e.rows.item(0);if(l){let i=Array.from(l.cells);t.selectListener&&(i=i.slice(1));for(let n of i){let s=i.indexOf(n);if(t.columnConfigurations[s].resizable!==!1){let c=document.createElement("div");c.classList.add(o.classes.TABLE_RESIZE_HANDLE),n.appendChild(c)}}}}static _removeResizeHandles(e,t){if(!e)return;let l=e.rows.item(0);if(l){let i=Array.from(l.cells);t.selectListener&&(i=i.slice(1));for(let n of i){let s=document.querySelector(`.${o.classes.TABLE_RESIZE_HANDLE}`);s&&n.removeChild(s)}}}static setWrapContentState(e,t){t?e.classList.remove(o.classes.TABLE_NO_WRAP_CONTENT):e.classList.add(o.classes.TABLE_NO_WRAP_CONTENT)}static setSelectAllVisibility(e,t,l,i,n,s){let r=e.tHead;if(!r)return;!t&&l&&a._detachSelectAllListener(r,l);let m=r.rows[r.rows.length-1].cells.item(0);t?m.childElementCount||(m.classList.add(o.classes.TABLE_CELL_SELECT),i?a._renderSelectAllTemplate(i,r).then(()=>{l&&a._tryAttachSelectAllTemplateListener(r,l)}):m.appendChild(a._createCheckboxElement(!0,n||null,null,null,null,s)),l&&!i&&a._attachSelectAllListener(r,l)):(l&&a._detachSelectAllListener(r,l),g(m))}static setFilterRow(e){if(!e.tableElement.tHead)return;let t=a._getFilterRowElement(e.tableElement.tHead),l;if(e.filter?e.tableElement.classList.add(o.classes.TABLE_FILTER_VISIBLE):e.tableElement.classList.remove(o.classes.TABLE_FILTER_VISIBLE),e.filter&&!t){if(e.columnConfigurations.every(n=>!n.filter))return;e.selectListener&&e.selectAllListener&&(l=e.tableElement.tHead.rows[e.tableElement.tHead.rows.length-1].cells.item(0));let i=a._createFilterRowElement(e);i&&l&&Array.from(l.children).forEach(n=>{var s;(s=i.cells.item(0))==null||s.appendChild(n)})}else if(!e.filter&&t){if(e.selectListener&&e.selectAllListener){l=t.cells.item(0);let i=Array.from(e.tableElement.tHead.rows).indexOf(t)-1,n=e.tableElement.tHead.rows.item(i);n&&Array.from(l.children).forEach(s=>{var r;(r=n.cells.item(0))==null||r.appendChild(s)})}W(t)}}static _createFilterRowElement(e){if(!e.tableElement.tHead)throw new Error("Table head element cannot be null.");let t=e.tableElement.tHead.insertRow();if(p([o.classes.TABLE_ROW,o.classes.TABLE_HEAD_ROW_FILTER],t),e.selectListener){let l=document.createElement("th");p([o.classes.TABLE_CELL,o.classes.TABLE_HEAD_CELL],l),t.insertBefore(l,t.cells[0]),l.classList.add(o.classes.TABLE_CELL_SELECT)}return e.columnConfigurations.forEach((l,i)=>{let n=document.createElement("th");if(p([o.classes.TABLE_CELL,o.classes.TABLE_HEAD_CELL],n),l.filter&&L(l.filterDelegate)){let s=document.createElement("div");s.classList.add(o.classes.TABLE_HEAD_CELL_CONTAINER),l.align&&a._setCellAlignmentClass(s,l.align);let r=a._createFilterElement(l,i,e.filterListener);s.appendChild(r),n.appendChild(s)}t.appendChild(n)}),t}static _createFilterElement(e,t,l){let i;if(H(e.filterDelegate))i=e.filterDelegate();else if(e.filterDelegate instanceof Y||e.filterDelegate instanceof le)i=e.filterDelegate;else throw new Error("Invalid filter delegate.");if(!!l&&i instanceof Y&&H(i.onChange))if(!L(e.filterDebounceTime)||y(e.filterDebounceTime)){let n=L(e.filterDebounceTime)?e.filterDebounceTime:o.numbers.DEFAULT_FILTER_DEBOUNCE_TIME;i.onChange(Z(s=>l(s,t),n))}else i.onChange(n=>l(n,t));return i.element}static _getFilterRowElement(e){if(!!e)return Array.from(e.rows).find(t=>t.classList.contains(o.classes.TABLE_HEAD_ROW_FILTER))}static async expandRow(e,t,l){let i=e.tableElement.tBodies[0],s=a._getNonExpandedRows(i.rows)[t];s.classList.add(o.classes.TABLE_ROW_EXPANDED);let r=Array.from(i.rows).indexOf(s),c=i.insertRow(r+1);p([o.classes.TABLE_ROW,o.classes.TABLE_BODY_ROW,o.classes.TABLE_ROW_EXPANDABLE_CONTENT],c);let m=c.insertCell();m.setAttribute("colspan",s.cells.length.toString()),m.classList.add(o.classes.TABLE_ROW_EXPANDABLE_CONTENT_CELL);let d=document.createElement("div"),u=document.createElement(M.elementName);u.appendChild(d),m.appendChild(u);let T=l;if(H(l)){let ue=e.data[t]?e.data[t].data:void 0,Ee=l(t,d,ue);try{let A=await Promise.resolve(Ee);T=me(A)?A.content:A}catch(A){console.error("Failed to load row template "+A.message),T=""}}T&&a._setRowTemplate(d,T),window.requestAnimationFrame(()=>u.open=!0)}static _setRowTemplate(e,t){G(t)?e.innerHTML=t:e.appendChild(t)}static collapseRow(e,t){if(!e.tableElement||!e.tableElement.tBodies.length||!e.tableElement.tBodies[0].rows.length)return Promise.resolve();let l=e.tableElement.tBodies[0],n=a._getNonExpandedRows(l.rows)[t],s=Array.from(l.rows).indexOf(n);if(n&&n.classList.contains(o.classes.TABLE_ROW_EXPANDED)){let r=l.rows[s+1],c=r.querySelector(M.elementName);if(c&&c.open)return c.open=!1,new Promise(m=>{setTimeout(()=>{n.classList.remove(o.classes.TABLE_ROW_EXPANDED),W(r),m()},M.numbers.COLLAPSE_ANIMATION_DURATION)})}return Promise.resolve()}static isRowExpanded(e,t){let l=e.tableElement.tBodies[0],n=a._getNonExpandedRows(l.rows)[t];return n&&n.classList.contains(o.classes.TABLE_ROW_EXPANDED)}static setFixedHeaders(e){e.fixedHeaders?e.tableElement.classList.add(o.classes.TABLE_FIXED):e.tableElement.classList.remove(o.classes.TABLE_FIXED)}static setLayoutType(e){e.layoutType==="fixed"?e.tableElement.classList.add(o.classes.TABLE_LAYOUT_FIXED):e.tableElement.classList.remove(o.classes.TABLE_LAYOUT_FIXED)}static normalizeColumnWidths(e){let t=e.tableElement;if(t.tHead&&t.tHead.rows.length){let l=Array.from(t.tHead.rows[0].cells);for(let i of l){let n=getComputedStyle(i).width;i.style.width&&i.style.width!==n&&(i.style.width=n)}}}static setColumnResizeIndicatorVisibility(e,t,l){let i=e.tableElement;if(i.tHead&&i.tHead.rows.length){let n=Array.from(i.tHead.rows);for(let s of n){let r=s.cells[t];r&&(l?r.classList.add(o.classes.TABLE_CELL_RESIZABLE):r.classList.remove(o.classes.TABLE_CELL_RESIZABLE))}}if(i.tBodies.length){let n=Array.from(i.tBodies[0].rows);for(let s of n){let r=s.cells[t];r&&(l?r.classList.add(o.classes.TABLE_CELL_RESIZABLE):r.classList.remove(o.classes.TABLE_CELL_RESIZABLE))}}}static setRowClickListeners(e,t,l,i){let n=e.tBodies[0];!n||(t?a._attachRowClickListeners(n,l,i):a._detachRowClickListeners(n,l,i))}static setRowClickAttributes(e,t){let l=e.tBodies[0];!l||(t?a._addRowClickAttributes(l):a._removeRowClickAttributes(l))}static getOwnerDocument(e){return e.ownerDocument||document}static _prepend(e,t){let l=t.childNodes.item(0);l?t.insertBefore(e,l):t.appendChild(e)}static _isMac(){return!!(navigator&&navigator.platform&&navigator.platform.substr(0,3)==="Mac")}static _renderSelectAllTemplate(e,t){return Promise.resolve(e()).then(l=>{let i=t.rows.item(t.rows.length-1);if(!i)return;let n=i.cells.item(0);l&&n&&(typeof l=="string"?n.innerHTML=l:l instanceof HTMLElement&&n.appendChild(l),n.setAttribute(o.attributes.CUSTOM_CELL_TEMPLATE,""))})}};var N=class extends U{constructor(t){super(t)}initialize(){this._tableElement||(this._tableElement=document.createElement("table"),this._tableElement.classList.add(o.classes.TABLE),this._component.children.length&&g(this._component),this._component.appendChild(this._tableElement))}getTableElement(){return this._tableElement||this.initialize(),this._tableElement}createTable(t){return a.createTable(t)}recreateTableBody(t){a.recreateTableBody(t)}setSelectedRows(t,l,i,n,s=!1){a.setSelectedRows(t,l,i,n,s)}clearSelectedRows(t){a.clearSelectedRows(t)}updateSelectedState(t,l){a.updateSelectedState(t,l)}updateSelectAllState(t,l,i){a.updateSelectAllState(t,l,i)}setSortedColumn(t,l,i){a.setSortedColumn(t,l,i)}removeColumnSort(t,l){a.removeColumnSort(t,l)}setSortDirection(t,l,i){a.setSortDirection(t,l,i)}setSelectColumnVisibility(t,l,i,n,s,r,c,m,d){a.setSelectColumnVisibility(t,l,i,n||null,s||null,r||null,c||[],m||null,d||null)}setDense(t,l){a.setDenseState(t,l)}setRoomy(t,l){a.setRoomyState(t,l)}setResizable(t){a.setResizable(t)}setSelectAllVisibility(t,l,i,n,s,r=null){a.setSelectAllVisibility(t,l,i,n,s||null,r||null)}setFilterRow(t){a.setFilterRow(t)}expandRow(t,l,i){return a.expandRow(t,l,i)}collapseRow(t,l){return a.collapseRow(t,l)}isRowExpanded(t,l){return a.isRowExpanded(t,l)}setFixedHeaders(t){a.setFixedHeaders(t)}setTableLayoutType(t){a.setLayoutType(t)}setWrapContentState(t){a.setWrapContentState(t.tableElement,t.wrapContent)}addDocumentListener(t,l){a.getOwnerDocument(this._component).addEventListener(t,l)}removeDocumentListener(t,l){a.getOwnerDocument(this._component).removeEventListener(t,l)}normalizeColumnWidths(t){a.normalizeColumnWidths(t)}setResizeColumnVisibility(t,l,i){a.setColumnResizeIndicatorVisibility(t,l,i)}addTableClass(t){p(t,this._tableElement)}removeTableClass(t){D(t,this._tableElement)}setRowClickListeners(t,l,i,n){a.setRowClickListeners(t,l,i,n)}setRowClickAttributes(t,l){a.setRowClickAttributes(t,l)}};var k=class{constructor(){this._sortedColumns=[]}get sortedColumns(){return[...this._sortedColumns.map(e=>C({},e))]}addSortColumn(e){this._sortedColumns.push(C({},e)),this._updateSortNumbers()}updateSortColumn(e){let t=this._sortedColumns.find(l=>l.columnIndex===e.columnIndex);if(t)switch(t.direction){case"ASC":this.removeSortColumn(e);break;case"DESC":t.direction="ASC";break;case"UNSET":t.direction="DESC";break}}setSortColumns(e){this._sortedColumns=[...e.map(t=>C({},t))]}removeSortColumn(e){typeof e=="number"?this._sortedColumns.splice(e,1):this._sortedColumns.splice(this._sortedColumns.indexOf(e),1),this._updateSortNumbers()}isSortColumn(e){return typeof e=="number"?this._sortedColumns.some(t=>t.columnIndex===e):this._sortedColumns.includes(e)}clearMultiSort(){this._sortedColumns=[]}getSortColumn(e){return this._sortedColumns.find(t=>t.columnIndex===e)}_updateSortNumbers(){this._sortedColumns.every(e=>typeof e.sortOrder=="number")&&this._sortedColumns.sort((e,t)=>e.sortOrder-t.sortOrder),this._sortedColumns.forEach((e,t)=>e.sortOrder=t+1)}};var P=class{constructor(e,t=!1){this.data=e;this.selected=t}};var z=class{constructor(e){this._adapter=e;this._tableRows=[];this._data=[];this._columnConfigurations=[];this._select=!1;this._multiselect=!0;this._dense=!1;this._roomy=!1;this._filter=!1;this._fixedHeaders=!1;this._layoutType=o.strings.DEFAULT_LAYOUT_TYPE;this._wrapContent=!0;this._resizable=!1;this._minResizeWidth=o.numbers.MIN_RESIZE_WIDTH;this._multiColumnSort=!1;this._selectCheckboxAlignment="center";this._isAllSelected=!1;this._sortedColumnIndex=-1;this._rendered=!1;this._allowRowClick=!1;this._multiSortManager=new k;this._rowClickListener=t=>this._onRowClick(t),this._rowDoubleClickListener=t=>this._onRowDoubleClick(t),this._selectRowListener=t=>this._onRowSelected(t),this._selectAllListener=t=>this._onSelectAll(t),this._sortableHeadCellKeydownListener=t=>this._onSortableHeadCellKeydown(t),this._headRowMouseDownListener=t=>this._onHeadRowMouseDown(t),this._headRowContextMenuListener=t=>this._onHeadRowContextMenu(t),this._documentMouseMoveListener=t=>this._onMouseMove(t),this._documentMouseUpListener=t=>this._onMouseUp(t),this._filterListener=(t,l)=>this._onFilter(t,l),this._selectionManager=new I(this._selectKey),this._hiddenColumnManager=new I}initialize(){this.connect(),this._adapter.setHostAttribute(o.attributes.SELECT,this._select.toString()),this._adapter.setHostAttribute(o.attributes.MULTISELECT,this._multiselect.toString()),this._adapter.setHostAttribute(o.attributes.DENSE,this._dense.toString()),this._adapter.setHostAttribute(o.attributes.ROOMY,this._roomy.toString()),this._adapter.setHostAttribute(o.attributes.FILTER,this._filter.toString()),this._adapter.emitHostEvent(o.events.INITIALIZED,void 0,!1)}connect(){this._adapter.initialize()}disconnect(){this._resizeDescriptor=void 0,this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener)}set data(e){Array.isArray(e)&&e.length>0?w(e[0])?this._data=e.map(t=>C({},t)):this._data=[...e]:this._data=[],this._tableRows=this._data.map(t=>new P(t,this._selectionManager.exists(t))),this._renderBody()}get data(){return this._data.map(e=>C({},e))}set columnConfigurations(e){this._columnConfigurations=e.map(t=>C({},t)),this._hiddenColumnManager.clear(),this._columnConfigurations.forEach(t=>{t.hidden&&this._hiddenColumnManager.add(t)}),this._refreshTableSort(),this.render()}get columnConfigurations(){return this._columnConfigurations.map(e=>C({},e))}get _visibleColumnConfigurations(){return this._columnConfigurations.filter(e=>!this._hiddenColumnManager.exists(e))}get _tableConfiguration(){return{tableElement:this._adapter.getTableElement(),columnConfigurations:this._visibleColumnConfigurations,data:this._tableRows,clickListener:this._allowRowClick?this._rowClickListener:null,doubleClickListener:this._allowRowClick?this._rowDoubleClickListener:null,selectListener:this._select?this._selectRowListener:null,selectAllListener:this._multiselect?this._selectAllListener:null,sortableHeadCellKeydownListener:this._sortableHeadCellKeydownListener,headRowMouseDownListener:this._headRowMouseDownListener,headRowContextMenuListener:this._headRowContextMenuListener,filterListener:this._filter?this._filterListener:null,sortDirection:this._sortDirection,sortedColumn:this._sortedColumnIndex,multiColumnSort:this._multiColumnSort,filter:this._filter,wrapContent:this._wrapContent,fixedHeaders:this._fixedHeaders,layoutType:this._layoutType,dense:this._dense,resizable:this._resizable,rowCreatedCallback:this._rowCreatedCallback,cellCreatedCallback:this._cellCreatedCallback,selectAllTemplate:this._selectAllTemplate,selectCheckboxAlignment:this._selectCheckboxAlignment,tooltipSelect:this._tooltipSelect,tooltipSelectAll:this._tooltipSelectAll}}set select(e){this._select!==e&&(this._select=e,this._adapter.setSelectColumnVisibility(this._adapter.getTableElement(),this._select,this._selectRowListener,this._multiselect?this._selectAllListener:void 0,this._multiselect?this._selectAllTemplate:null,this._selectCheckboxAlignment,this._tableRows,this._tooltipSelect,this._tooltipSelectAll),this._updateSelections(!0),this._select?this._adapter.setHostAttribute(o.attributes.SELECT,this._select.toString()):this._adapter.removeHostAttribute(o.attributes.SELECT))}get select(){return this._select}set multiselect(e){this._multiselect!==e&&(this._multiselect=e,this._select&&(this._adapter.setSelectAllVisibility(this._adapter.getTableElement(),this._multiselect,this._multiselect?this._selectAllListener:null,this._multiselect?this.selectAllTemplate:null,this._selectCheckboxAlignment,this._tooltipSelectAll),this._updateSelections(!0)),this._adapter.setHostAttribute(o.attributes.MULTISELECT,this._multiselect.toString()))}get multiselect(){return this._multiselect}get selectKey(){return Array.isArray(this._selectKey)?[...this._selectKey]:this._selectKey}set selectKey(e){this._originalSelectKey!==e&&(Array.isArray(e)?(this._originalSelectKey=[...e],this._selectKey=[...e]):(this._originalSelectKey=e,this._selectKey=[e]),this._selectionManager.setKey(this._selectKey),this._updateSelections(!1))}get dense(){return this._dense}set dense(e){this._dense!==e&&(this._dense=e,this._adapter.setDense(this._adapter.getTableElement(),this._dense),this._adapter.setHostAttribute(o.attributes.DENSE,this._dense.toString()))}get roomy(){return this._roomy}set roomy(e){e!==this._roomy&&(this._roomy=e,this._applyRoomy())}set filter(e){this._filter!==e&&(this._filter=e,this._adapter.setFilterRow(this._tableConfiguration),this._adapter.setHostAttribute(o.attributes.FILTER,this._filter.toString()))}get filter(){return this._filter}set fixedHeaders(e){this._fixedHeaders!==e&&(this._fixedHeaders=e,this._adapter.setFixedHeaders(this._tableConfiguration))}get fixedHeaders(){return this._fixedHeaders}get layoutType(){return this._layoutType}set layoutType(e){this._layoutType!==e&&(this._layoutType=e,this._adapter.setTableLayoutType(this._tableConfiguration))}get wrapContent(){return this._wrapContent}set wrapContent(e){this._wrapContent!==e&&(this._wrapContent=e,this._adapter.setWrapContentState(this._tableConfiguration))}get resizable(){return this._resizable}set resizable(e){this._resizable!==e&&(this._resizable=e,this._adapter.setResizable(this._tableConfiguration))}get minResizeWidth(){return this._minResizeWidth}set minResizeWidth(e){this._minResizeWidth!==e&&(this._minResizeWidth=e,y(this._minResizeWidth)?this._minResizeWidth<0&&(this._minResizeWidth=0):this._minResizeWidth=o.numbers.MIN_RESIZE_WIDTH)}get allowRowClick(){return this._allowRowClick}set allowRowClick(e){this._allowRowClick!==e&&(this._allowRowClick=e,this._rendered&&(this._adapter.setRowClickListeners(this._adapter.getTableElement(),this._allowRowClick,this._rowClickListener,this._rowDoubleClickListener),this._adapter.setRowClickAttributes(this._adapter.getTableElement(),this._allowRowClick)))}get multiColumnSort(){return this._multiColumnSort}set multiColumnSort(e){e!==this._multiColumnSort&&(this._multiColumnSort=e,this._refreshTableSort(),this.render())}get selectCheckboxAlignment(){return this._selectCheckboxAlignment}set selectCheckboxAlignment(e){e!==this._selectCheckboxAlignment&&(this._selectCheckboxAlignment=e,this._adapter.setHostAttribute(o.attributes.SELECT_CHECKBOX_ALIGNMENT,e),this.render())}get tooltipSelect(){return this._tooltipSelect}set tooltipSelect(e){e!==this._tooltipSelect&&(this._tooltipSelect=e,typeof e=="string"&&this._adapter.setHostAttribute(o.attributes.TOOLTIP_SELECT,e),this.render())}get tooltipSelectAll(){return this._tooltipSelectAll}set tooltipSelectAll(e){e!==this._tooltipSelectAll&&(this._tooltipSelectAll=e,this._adapter.setHostAttribute(o.attributes.TOOLTIP_SELECT_ALL,e),this.render())}get selectAllTemplate(){return this._selectAllTemplate}set selectAllTemplate(e){e!==this._selectAllTemplate&&(this._selectAllTemplate=e,this.render())}get rowCreated(){return this._rowCreatedCallback}set rowCreated(e){this._rowCreatedCallback=e}get cellCreated(){return this._cellCreatedCallback}set cellCreated(e){this._cellCreatedCallback=e}isRowSelected(e){let t=v(Array.isArray(this._selectKey)?this._selectKey:[this._selectKey],e);return this.selectKey?!!this._selectionManager.getItems().find(l=>X(l,t)):this._selectionManager.exists(e)}getSelectedRows(){return this._selectionManager.getItems()}selectRows(e,t){if(!this._selectKey)throw new Error("You must set a selectKey to select rows.");(!this._multiselect||t)&&this.clearSelections(),e&&e.length&&(this._selectionManager.add(e),this._updateSelections(!t))}deselectRows(e){e&&e.length&&(this._selectionManager.remove(e),this._updateSelections(!1))}clearSelections(){let e=this._adapter.getTableElement();this._selectionManager.clear(),this._tableRows.forEach(t=>t.selected=!1),this._isAllSelected=!1,this._adapter.clearSelectedRows(e),this._select&&this._multiselect&&this._adapter.updateSelectAllState(e,!1)}hideColumn(e){let t=this._columnConfigurations[e];this._sortedColumnIndex===e&&(this._sortedColumnIndex=-1),this._hiddenColumnManager.exists(t)||(this._hiddenColumnManager.add(t),this.render())}showColumn(e){let t=this._columnConfigurations[e];this._hiddenColumnManager.exists(t)&&(this._hiddenColumnManager.remove(t),this.render())}isColumnHidden(e){let t=this._columnConfigurations[e];return!!t&&this._hiddenColumnManager.exists(t)}render(){this._adapter.createTable(this._tableConfiguration),this._renderSelections(),this._rendered=!0}_renderBody(){!this._rendered||(this._adapter.recreateTableBody(this._tableConfiguration),this._renderSelections())}_renderSelections(){this.select&&(this._isAllSelected=this._getSelectAllState(),this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)));let e=this._selectionManager.getItems();e.length&&this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,e,!1)}expandRow(e,t){if(!this._rendered)throw new Error("Cannot expand a row before the table has rendered.");if(e<0||e>this._tableRows.length)throw new Error(`Invalid row index: ${e}.`);return this._adapter.expandRow(this._tableConfiguration,e,t)}collapseRow(e){return!this._rendered||e<0||e>this._tableRows.length?Promise.resolve():this._adapter.collapseRow(this._tableConfiguration,e)}isRowExpanded(e){return this._adapter.isRowExpanded(this._tableConfiguration,e)}selectRowsByIndex(e,t){let l=e.map(i=>this._data[i]).filter(i=>!!i);this.selectRows(l,!t)}deselectRowsByIndex(e){let t=e.map(l=>this._data[l]).filter(l=>!!l);this.deselectRows(t)}_getSelectAllState(){return this._tableRows.length>0&&this._tableRows.every(e=>e.selected)}_updateSelections(e){this._tableRows.forEach(l=>l.selected=this._selectionManager.exists(l.data));let t=this._getSelectAllState();this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,this._selectionManager.getItems(),e),(t!==this._isAllSelected||this._isIndeterminate(t))&&(this._isAllSelected=t,this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)))}_onRowClick(e){if(e.stopImmediatePropagation(),e.target.tagName==="INPUT"&&e.target.type==="checkbox")return;let i=R(e).filter(m=>m.nodeType===1).find(m=>m.hasAttribute(o.attributes.CUSTOM_CELL_TEMPLATE));if(i&&i.hasAttribute(o.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION))return;let{index:s,data:r}=this._getSelectedRowFromEvent(e),c={index:s,data:r};this._adapter.emitHostEvent(o.events.ROW_CLICK,c,!0,!1)}_onRowDoubleClick(e){if(e.stopPropagation(),e.target.tagName==="INPUT"&&e.target.type==="checkbox")return;let t=this._getSelectedRowFromEvent(e),l={index:t.index,data:t.data};this._adapter.emitHostEvent(o.events.SELECT_DOUBLE,l,!0,!1)}_onRowSelected(e){let t=this._getSelectedRowFromEvent(e);this._multiselect||this._tableRows.filter(r=>r.selected).forEach(r=>{X(r.data,v(this._selectKey,t.data))||this.deselectRows([r.data])});let l=!this._selectionManager.exists(t.data);this._adapter.updateSelectedState(t.rowElement,l),l?this._selectionManager.add(t.data):this._selectionManager.remove(t.data),this._tableRows[t.index].selected=l;let i=[t.index],n=!1;if(this._multiselect){if(e.shiftKey&&this._previouslyClickedRow&&(i=this._shiftSelectRows(t),i.includes(this._previouslyClickedRow.index))){let r=i.indexOf(this._previouslyClickedRow.index);i.splice(r,1)}n=this._getSelectAllState(),this._adapter.updateSelectAllState(this._adapter.getTableElement(),n,this._isIndeterminate(n))}for(let s of i){let r=this._tableRows[s].data,m={selected:this._selectionManager.exists(r),index:s,data:r};this._adapter.emitHostEvent(o.events.SELECT,m,!0,!1)}if(this._isAllSelected!==n){this._isAllSelected=n;let s={status:this._isAllSelected,count:this._tableRows.filter(r=>r.selected).length,data:[...this._data],targetType:"row"};this._adapter.emitHostEvent(o.events.SELECT_ALL,s,!0,!1)}this._previouslyClickedRow=C({},t)}_getSelectedRowFromEvent(e){let l=R(e).find(r=>r.tagName==="TR"),i=l.parentElement,n=this._getNonExpandedRows(i).findIndex(r=>r===l),s=this._tableRows[n].data;return{rowElement:l,index:n,data:s}}_getNonExpandedRows(e){return Array.from(e.rows).filter(t=>!t.classList.contains(o.classes.TABLE_ROW_EXPANDABLE_CONTENT))}_onSelectAll(e){e.stopPropagation(),this._isAllSelected=!this._isAllSelected;let t=this._adapter.getTableElement();this._adapter.updateSelectAllState(t,this._isAllSelected),this._tableRows.forEach((i,n)=>{i.selected=this._isAllSelected,this._isAllSelected?this._selectionManager.add(i.data):this._selectionManager.remove(i.data);let s=a.getRowByIndex(t,n);s&&this._adapter.updateSelectedState(s,this._isAllSelected)});let l={status:this._isAllSelected,count:this._tableRows.filter(i=>i.selected).length,data:[...this._data],targetType:"select-all"};this._adapter.emitHostEvent(o.events.SELECT_ALL,l,!0,!1)}_onHeadRowContextMenu(e){e.ctrlKey&&e.preventDefault()}_onHeadRowMouseDown(e){if(e.button!==0)return;let t=R(e),l=e.target,i=t.find(r=>r.tagName==="TR"),n=t.find(r=>r.tagName==="TH"),s=Array.from(i.cells).findIndex(r=>r===n);this._headCellMouseDownIndex=s,l!==n&&l.classList.contains(o.classes.TABLE_RESIZE_HANDLE)&&(this._resizeDescriptor={element:n,startWidth:n.offsetWidth,startX:e.pageX,width:n.offsetWidth,index:this._select?s-1:s},this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.setResizeColumnVisibility(this._tableConfiguration,s,!0)),this._adapter.addDocumentListener("mouseup",this._documentMouseUpListener)}_onMouseMove(e){if(this._resizeDescriptor){let t=this._resizeDescriptor.startWidth+(e.pageX-this._resizeDescriptor.startX);t<this._minResizeWidth&&(t=this._minResizeWidth),this._resizeDescriptor.width=t,this._resizeDescriptor.element.style.width=`${t}px`,this._adapter.addTableClass(o.classes.TABLE_RESIZING)}}_onMouseUp(e){if(this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener),this._adapter.removeTableClass(o.classes.TABLE_RESIZING),this._headCellMouseDownIndex!==void 0){if(this._resizeDescriptor){this._adapter.normalizeColumnWidths(this._tableConfiguration),this._adapter.setResizeColumnVisibility(this._tableConfiguration,this._headCellMouseDownIndex,!1);let t={index:this._resizeDescriptor.index,width:this._resizeDescriptor.width};this._adapter.emitHostEvent(o.events.COLUMN_RESIZE,t),this._resizeDescriptor=void 0}else this._tableConfiguration.tableElement.tHead.contains(e.target)&&(this._multiColumnSort?this._onMultiSort(this._headCellMouseDownIndex,e.ctrlKey):this._onSort(this._headCellMouseDownIndex));this._headCellMouseDownIndex=void 0}}_onSortableHeadCellKeydown(e){if(e.key===" "||e.key==="Enter"){let t=R(e),l=t.find(s=>s.tagName==="TR"),i=t.find(s=>s.tagName==="TH"),n=Array.from(l.cells).findIndex(s=>s===i);this._onSort(n)}}_onSort(e){let t=this._select?e-1:e,l=t>=0?this._visibleColumnConfigurations[t]:null;if(!l||!l.sortable)return;let i="ASC",n=t===this._sortedColumnIndex,s=this._sortDirection==="ASC"||this._sortDirection===void 0,r=n&&this._sortDirection==="DESC";n&&s&&(i="DESC"),r&&!l.preventUnsort&&(i="UNSET");let c={direction:i,columnIndex:t};if(!!this._adapter.emitHostEvent(o.events.SORT,c,!0,!0)){if(n&&this._sortDirection==="DESC"&&!l.preventUnsort){this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=-1;return}this._sortDirection=i,t===this._sortedColumnIndex?this._adapter.setSortDirection(this._adapter.getTableElement(),e,this._sortDirection):(this._sortedColumnIndex>=0&&this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=t,this._adapter.setSortedColumn(this._adapter.getTableElement(),e,this._sortDirection))}}_onMultiSort(e,t){let l=this._select?e-1:e,i=l>=0?this._visibleColumnConfigurations[l]:null;if(!i||!i.sortable)return;let n=this._multiSortManager.sortedColumns,s=this._multiSortManager.getSortColumn(l);s?this._multiSortManager.updateSortColumn(s):t?this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:l,propertyName:i.property}):(this._multiSortManager.clearMultiSort(),this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:l,propertyName:i.property}));let r=this._multiSortManager.sortedColumns.map(d=>C({},d));if(!this._adapter.emitHostEvent(o.events.SORT,r,!0,!0)){this._multiSortManager.setSortColumns(n);return}let m=this._multiSortManager.sortedColumns.length>1;for(let d=0;d<this._visibleColumnConfigurations.length;d++){let u=this._select?d+1:d;if(!this._multiSortManager.isSortColumn(d))this._adapter.removeColumnSort(this._adapter.getTableElement(),u),a.setMultiSortColumnSortNumber(this._adapter.getTableElement(),m,u,null);else{let T=this._multiSortManager.getSortColumn(d);T&&(this._adapter.setSortedColumn(this._adapter.getTableElement(),u,T.direction),a.setMultiSortColumnSortNumber(this._adapter.getTableElement(),m,u,T.sortOrder||null))}}}_onFilter(e,t){let l={value:e,columnIndex:t};this._adapter.emitHostEvent(o.events.FILTER,l,!0,!1)}_shiftSelectRows(e){let t=[];if(this._previouslyClickedRow){let l=this._previouslyClickedRow.index,i=e.index,n=i>=l?l:i,s=i>=l?i:l;s+=s>n?1:0,n+=n>s?1:0;let r=d=>this.selectRows(d,!1),c=this._tableRows.find(d=>d.selected&&d.data===e.data),m=this._tableRows.find(d=>{var u;return d.data===((u=this._previouslyClickedRow)==null?void 0:u.data)&&!d.selected});(!c||m)&&(r=d=>this.deselectRows(d));for(let d=n;d<s;d++)t.push(d);r(this.data.filter((d,u)=>t.includes(u)))}return t}_isIndeterminate(e){return!e&&this.getSelectedRows().length>0&&this._data.length!==this.getSelectedRows().length}_applyRoomy(){this._adapter.setRoomy(this._adapter.getTableElement(),this._roomy),this._adapter.setHostAttribute(o.attributes.ROOMY,this._roomy.toString())}_refreshTableSort(){if(this._sortedColumnIndex=this._visibleColumnConfigurations.findIndex(e=>e.initialSort),this._sortedColumnIndex>=0&&this._sortDirection===void 0){let e=this._visibleColumnConfigurations[this._sortedColumnIndex];e.initialSort===!0&&e.sortDirection?this._sortDirection=e.sortDirection:typeof e.initialSort=="object"&&e.initialSort.direction&&(this._sortDirection=e.initialSort.direction)}if(this._multiColumnSort){let e=[];this._visibleColumnConfigurations.forEach((t,l)=>{typeof t.initialSort=="object"&&e.push({columnIndex:l,direction:t.initialSort.direction,sortOrder:t.initialSort.sortOrder,propertyName:t.property})}),this._multiSortManager.setSortColumns(e)}}};var E=class extends Q{constructor(){super();oe.define(te),this._foundation=new z(new N(this))}static get observedAttributes(){return[o.attributes.SELECT,o.attributes.MULTISELECT,o.attributes.SELECT_KEY,o.attributes.DENSE,o.attributes.ROOMY,o.attributes.FILTER,o.attributes.FIXED_HEADERS,o.attributes.LAYOUT_TYPE,o.attributes.WRAP_CONTENT,o.attributes.RESIZABLE,o.attributes.MIN_RESIZE_WIDTH,o.attributes.ALLOW_ROW_CLICK,o.attributes.MULTI_COLUMN_SORT,o.attributes.SELECT_CHECKBOX_ALIGNMENT,o.attributes.TOOLTIP_SELECT,o.attributes.TOOLTIP_SELECT_ALL]}initializedCallback(){this._foundation.initialize()}connectedCallback(){this._foundation.connect()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,l,i){switch(t){case o.attributes.SELECT:this.select=h(i);break;case o.attributes.MULTISELECT:this.multiselect=h(i);break;case o.attributes.SELECT_KEY:this.selectKey=i;break;case o.attributes.DENSE:this.dense=h(i);break;case o.attributes.ROOMY:this.roomy=h(i);break;case o.attributes.FILTER:this.filter=h(i);break;case o.attributes.FIXED_HEADERS:this.fixedHeaders=h(i);break;case o.attributes.LAYOUT_TYPE:this.layoutType=i;break;case o.attributes.WRAP_CONTENT:this.wrapContent=h(i);break;case o.attributes.RESIZABLE:this.resizable=h(i);break;case o.attributes.MIN_RESIZE_WIDTH:this.minResizeWidth=V(i);break;case o.attributes.ALLOW_ROW_CLICK:this.allowRowClick=h(i);break;case o.attributes.MULTI_COLUMN_SORT:this.multiColumnSort=h(i);break;case o.attributes.SELECT_CHECKBOX_ALIGNMENT:this.selectCheckboxAlignment=this.getAttribute(o.attributes.SELECT_CHECKBOX_ALIGNMENT)||"center";break;case o.attributes.TOOLTIP_SELECT:this.tooltipSelect=i;break;case o.attributes.TOOLTIP_SELECT_ALL:this.tooltipSelectAll=i;break}}hideColumn(t){this._foundation.hideColumn(t)}showColumn(t){this._foundation.showColumn(t)}isColumnHidden(t){return this._foundation.isColumnHidden(t)}getSelectedRows(){return this._foundation.getSelectedRows()}selectRow(t){this._foundation.selectRows([t],!1)}selectRows(t,l=!1){this._foundation.selectRows(t,!l)}deselectRow(t){this._foundation.deselectRows([t])}deselectRows(t){this._foundation.deselectRows(t)}clearSelections(){this._foundation.clearSelections()}render(){this._foundation.render()}expandRow(t,l){return this._foundation.expandRow(t,l)}collapseRow(t){return this._foundation.collapseRow(t)}isRowExpanded(t){return this._foundation.isRowExpanded(t)}selectRowsByIndex(t,l){typeof t=="number"?this._foundation.selectRowsByIndex([t],l):Array.isArray(t)&&this._foundation.selectRowsByIndex(t,l)}deselectRowsByIndex(t){typeof t=="number"?this._foundation.deselectRowsByIndex([t]):Array.isArray(t)&&this._foundation.deselectRowsByIndex(t)}isRowSelected(t){return this._foundation.isRowSelected(t)}};_([b()],E.prototype,"data",2),_([b()],E.prototype,"columnConfigurations",2),_([b()],E.prototype,"select",2),_([b()],E.prototype,"multiselect",2),_([b()],E.prototype,"selectKey",2),_([b()],E.prototype,"tooltipSelect",2),_([b()],E.prototype,"tooltipSelectAll",2),_([b()],E.prototype,"dense",2),_([b()],E.prototype,"roomy",2),_([b()],E.prototype,"filter",2),_([b()],E.prototype,"fixedHeaders",2),_([b()],E.prototype,"layoutType",2),_([b()],E.prototype,"wrapContent",2),_([b()],E.prototype,"resizable",2),_([b()],E.prototype,"minResizeWidth",2),_([b()],E.prototype,"allowRowClick",2),_([b()],E.prototype,"multiColumnSort",2),_([b()],E.prototype,"rowCreated",2),_([b()],E.prototype,"cellCreated",2),_([b()],E.prototype,"selectAllTemplate",2),_([b()],E.prototype,"selectCheckboxAlignment",2),E=_([J({name:o.elementName,dependencies:[ne,se,ce]})],E);function El(){j(E)}export{o as a,B as b,O as c,Le as d,N as e,P as f,z as g,E as h,El as i};
|
|
7
|
+
//# sourceMappingURL=chunk.TLXWXBQO.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as k}from"./chunk.EQEMCHMB.js";import{e as V,h as B,j as H}from"./chunk.LEINPSKL.js";import{c as x}from"./chunk.K57IO236.js";import{a as m,b as N}from"./chunk.AJTQHK25.js";import{d as K}from"./chunk.B3LPXCVL.js";import{b as A}from"./chunk.P73BXRKY.js";import{e as F}from"./chunk.WCSVKQR2.js";import{d as P}from"./chunk.MZLPUI6R.js";import{d as w}from"./chunk.WHQZNZHW.js";import{a as y}from"./chunk.UWYANU5D.js";import{a as p}from"./chunk.KTGSZEAG.js";import{a as T,b as S,d as D}from"./chunk.DL7NX432.js";import{a as L,e as C}from"./chunk.LJLEPTLU.js";import{m as M}from"./chunk.4LA6HEA7.js";import{a as g,b as O,i as I,k as _}from"./chunk.J2M2MXP2.js";import{a as c,b,f as a}from"./chunk.MCIQXNKY.js";var l=`${S}menu`,G={POPUP:"forge-menu__popup",MENU:"mdc-menu"},U={TOGGLE:`.${l}__toggle,[${l}-toggle],button,[type=button],[role=button],a,[tabindex]:not([tabindex^="-"])`,MENU_LIST:"forge-list"},R={OPEN:"open",PLACEMENT:"placement",SELECTED_INDEX:"selected-index",SELECTED_VALUE:"selected-value",DENSE:"dense",ICON_CLASS:"icon-class",PERSIST_SELECTION:"persist-selection",MODE:"mode",SYNC_POPUP_WIDTH:"sync-popup-width",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold"},$={SELECT:`${l}-select`,OPEN:`${l}-open`,CLOSE:`${l}-close`,ACTIVE_CHANGE:`${l}-active-change`},z={CHILD_MOUSE_LEAVE_TIMEOUT:300,POPUP_MOUSE_LEAVE_TIMEOUT:500},i={elementName:l,classes:G,selectors:U,attributes:R,events:$,numbers:z};var u=class extends y{constructor(e){super(e);this._childMenus=new Map}get targetElement(){return this._targetElement}getDropdownElement(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.dropdownElement)!=null?t:null}hasTargetElement(){return!!this._targetElement}initializeTarget(){this._targetElement=this._component.querySelector(i.selectors.TOGGLE),this._targetElement||(this._targetElement=this._component.firstElementChild)}initializeAccessibility(e){!this._targetElement||(this._targetElement.setAttribute("aria-atomic","true"),this._targetElement.setAttribute("aria-live","assertive"),this._targetElement.setAttribute("aria-haspopup","true"),this._targetElement.setAttribute("aria-expanded","false"),this._targetElement.hasAttribute("aria-label")||this._targetElement.setAttribute("aria-label",this._targetElement.textContent||""))}addTargetListener(e,t,n=!1){this._targetElement&&this._targetElement.addEventListener(e,t,n)}removeTargetListener(e,t){this._targetElement&&this._targetElement.removeEventListener(e,t)}attachMenu(e){this._listDropdown||!this._targetElement||(this._listDropdown=new B(this._targetElement,e),this._listDropdown.open(),this._targetElement.setAttribute("aria-expanded","true"),this._targetElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`))}setOptions(e){this._listDropdown&&this._listDropdown.setOptions(e)}detachMenu(){this._targetElement&&(this._targetElement.removeAttribute("aria-activedescendant"),this._targetElement.removeAttribute("aria-expanded"),this._targetElement.removeAttribute("aria-controls")),this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0)}setActiveOption(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}setCascadeTargetInactive(){let e=this._targetElement;e!=null&&e.active&&(e.active=!1)}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:-1}focusTarget(){this._targetElement&&this._targetElement.focus()}isTargetFocused(){return document.activeElement===this._targetElement}updateActiveDescendant(e){!this._targetElement||(e?this._targetElement.setAttribute("aria-activedescendant",e):this._targetElement.removeAttribute("aria-activedescendant"))}addDropdownListener(e,t){!this._listDropdown||!this._listDropdown.dropdownElement||this._listDropdown.dropdownElement.addEventListener(e,t)}isOwnElement(e){return!this._targetElement||!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._targetElement.contains(e)||!!this._listDropdown.dropdownElement.contains(e)}propagateKey(e){var t;(t=this._listDropdown)==null||t.handleKey(e)}proxyKeyboardEventToChild(e,t){if(!this.getDropdownElement())return;let n=this._getOpenChildMenu(t);n&&n.propagateKeyEvent(e)}toggleChildMenu(e,t){let r=this._getListItems()[e].parentElement;r&&r.tagName.toLowerCase()===i.elementName&&(t===void 0?r.open=!r.open:r.open=t,r.activateFirstOption())}createChildMenu(e,t,n,o,r){let d=document.createElement("forge-menu");return d.style.display="block",d.addEventListener(i.events.OPEN,()=>{this._childMenus.set(e,d),n(e)}),d.addEventListener(i.events.CLOSE,()=>{this._childMenus.delete(e),o(e)}),d.addEventListener(i.events.SELECT,f=>{f.stopPropagation(),r(b(c({},f.detail),{parentValue:t}))}),d}closeOtherChildMenus(e){let t=[];this._childMenus.forEach((n,o)=>{o!==e&&(n.open=!1,t.push(o))}),t.forEach(n=>this._childMenus.delete(n))}setSelectedValues(e){var t;(t=this._listDropdown)==null||t.setSelectedValues(e)}_getOpenChildMenu(e){if(!this.getDropdownElement())return null;let t=this._getOwnList(e);return t?t.querySelector(`${i.elementName}[${i.attributes.OPEN}]`):null}_getOwnList(e){let t=this.getDropdownElement();return t?t.querySelector(`${m.elementName}[id="list-dropdown-list-${e}"]`):null}_getListItems(){let e=this.getDropdownElement();if(!e)return[];let t=e.querySelector(m.elementName);return t?Array.from(t.querySelectorAll(N.elementName)):[]}};var h=class extends H{constructor(e){super({popupTimeout:i.numbers.POPUP_MOUSE_LEAVE_TIMEOUT,targetTimeout:i.numbers.CHILD_MOUSE_LEAVE_TIMEOUT});this._adapter=e;this._placement="bottom-start";this._fallbackPlacements=[];this._dense=!1;this._iconClass=D;this._persistSelection=!1;this._mode="click";this._identifier=g(),this._clickListener=t=>this._onTargetClick(t),this._blurListener=t=>this._onTargetBlur(t),this._selectListener=t=>this._handleSelectEvent(t),this._keydownListener=t=>this.onKeydown(t),this._activeChangeListener=t=>this._onActiveOptionChanged(t)}initialize(){this._adapter.initializeTarget(),this._adapter.initializeAccessibility(this._identifier),this._initializeInteractionListeners()}disconnect(){this._open&&this._closeDropdown(),this._destroyInteractionListeners()}activateFirstOption(){this._adapter.activateFirstOption()}_applyMode(){!this._adapter.hasTargetElement()||(this._mode!=="cascade"?this._adapter.addTargetListener("click",this._clickListener):this._attachCascadingListeners())}_initializeInteractionListeners(){!this._adapter.hasTargetElement()||(this._applyMode(),this._adapter.addTargetListener("keydown",this._keydownListener,!0),this._adapter.addTargetListener("focusout",this._blurListener))}_destroyInteractionListeners(){!this._adapter.hasTargetElement()||(this._adapter.removeTargetListener("keydown",this._clickListener),this._adapter.removeTargetListener("focusout",this._blurListener),this._adapter.removeTargetListener("click",this._clickListener),this._detachCascadingListeners())}_attachCascadingListeners(){this._adapter.addTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.addTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener)}_detachCascadingListeners(){this._adapter.removeTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.removeTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener)}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}get _flatOptions(){return this._flattenOptions(this._options)}_flattenOptions(e){return V(e,1)?e.reduce((t,n)=>n.options?t.concat(n.options):t,[]):e}_onTargetClick(e){if(this._open){this._closeDropdown();return}this.open=!this._open,this._open&&this._adapter.focusTarget()}_onTargetBlur(e){this._open&&this._closeDropdown()}_onActiveOptionChanged(e){let t={id:e},n=this._adapter.emitHostEvent(i.events.ACTIVE_CHANGE,t,!0,!0);this._mode!=="cascade"&&n&&this._adapter.updateActiveDescendant(e)}onKeydown(e){if(this._childOpen){this._adapter.proxyKeyboardEventToChild(e,this._identifier);return}switch(e.code){case"Escape":this._open&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Space":e.preventDefault(),this._open?this._closeDropdown():this._openDropdown({fromKeyboard:!0});break;case"Home":case"End":this._open&&(e.preventDefault(),this._adapter.propagateKey(e.code));break;case"Enter":if(e.preventDefault(),!this._open){e.preventDefault(),this._openDropdown({fromKeyboard:!0});return}e.stopImmediatePropagation(),this._adapter.propagateKey(e.code);let t=this._adapter.getActiveOptionIndex(),n=this._nonDividerOptions[t];n&&n.options&&n.options.length&&this._adapter.toggleChildMenu(t);break;case"ArrowUp":case"ArrowDown":if(this._open&&e.stopImmediatePropagation(),e.preventDefault(),!this._open&&e.code==="ArrowDown"){this._openDropdown({fromKeyboard:!0}),this._adapter.activateFirstOption();return}this._adapter.propagateKey(e.code);break;case"ArrowLeft":this._open&&e.stopImmediatePropagation(),this._mode==="cascade"&&this._open&&this._closeDropdown();break;case"ArrowRight":if(this._open&&e.stopImmediatePropagation(),!this._open)return;let o=this._adapter.getActiveOptionIndex(),r=this._nonDividerOptions[o];if(r&&r.options){this._adapter.toggleChildMenu(o,e.code==="ArrowRight");return}break}}async _openMenu({fromKeyboard:e}={}){this._open=!0;let t=[];if(typeof this._optionsFactory=="function")this._loadOptionsAsync(),this._options=[];else{if(!this._options||!this._options.length)return;t=this._options}this._persistSelection||t.forEach(r=>r.selected=!1),this._mapIconToLeadingIcon();let n=this._persistSelection?this._getSelectedValues():[],o={id:this._identifier,referenceElement:this._adapter.targetElement,type:"menu",options:this._options,selectedValues:n,iconClass:this._iconClass,dense:this._dense,multiple:!1,popupStatic:!0,allowBusy:!0,asyncStyle:"spinner",optionBuilder:this._optionBuilder,optionLimit:this._optionLimit,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,popupPlacement:this._placement,popupFallbackPlacements:this._fallbackPlacements,activeStartIndex:e?0:void 0,popupClasses:[i.classes.POPUP,i.classes.MENU,...this._popupClasses],syncWidth:this._syncPopupWidth,activeChangeCallback:this._activeChangeListener,selectCallback:this._selectListener,popupOffset:this._popupOffset,cascadingElementFactory:r=>this._createCascadingElement(r)};this._adapter.setHostAttribute(i.attributes.OPEN,""),this._adapter.attachMenu(o),this._mode==="cascade"&&(this._adapter.addDropdownListener("mouseenter",this._childPopupMouseEnterListener),this._adapter.addDropdownListener("mouseleave",this._childPopupMouseLeaveListener)),this._adapter.addDropdownListener(i.events.ACTIVE_CHANGE,r=>{this._onActiveOptionChanged(r.detail.id)}),this._adapter.emitHostEvent(i.events.OPEN)}_closeMenu(){this._open=!1,this._childOpen=!1,this._adapter.detachMenu(),this._activeMouseLeaveTimeout!==void 0&&window.clearTimeout(this._activeMouseLeaveTimeout),this._adapter.removeHostAttribute(i.attributes.OPEN),this._adapter.emitHostEvent(i.events.CLOSE)}_loadOptionsAsync(){return this._optionsFactory?Promise.resolve(this._optionsFactory()).then(e=>{if(this._persistSelection||this._flattenOptions(e).filter(n=>n.selected).forEach(n=>n.selected=!1),this._open)if(e&&I(e)&&e.length){this._options=e,this._mapIconToLeadingIcon(),this._adapter.setOptions(e);let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}else this._open&&this._closeDropdown()}).catch(e=>{console.error("An unexpected error ocurred while opening the menu:",e),this._open&&this._closeDropdown()}):(this._open&&this._closeMenu(),Promise.resolve())}_handleSelectEvent(e){let t=this._nonDividerOptions.findIndex(n=>n.value===e);t<0||this._selectOptionByIndex(t)}_selectActiveOption(){let e=this._adapter.getActiveOptionIndex();e>=0&&this._nonDividerOptions[e]&&this._selectOptionByIndex(e)}_selectOptionByIndex(e){let{options:t,value:n}=this._nonDividerOptions[e];if(t){this._adapter.setActiveOption(e);return}this._closeDropdown();let o={index:e,value:n};!this._adapter.emitHostEvent(i.events.SELECT,o,!0,!0)||(this._selectedValue=this._persistSelection?n:void 0)}_getSelectedValues(){let e=this._flatOptions.filter(t=>t.selected).map(t=>t.value);return this._selectedValue!==void 0&&e.push(this._selectedValue),e}_onCascadingOptionSelected(e){this._persistSelection&&(this._selectedValue=e.value),this._adapter.emitHostEvent(i.events.SELECT,e),this._closeDropdown()}_onCascadingChildOpen(e){super._clearMouseLeaveTimeout(),this._adapter.closeOtherChildMenus(e),this._childOpen=!0,this._adapter.setActiveOption(e)}_onCascadingChildClose(e){this._childOpen=!1}_closeDropdown(){this._closeMenu()}_openDropdown({fromKeyboard:e}={}){this._openMenu({fromKeyboard:e})}_setCascadeTargetInactive(){this._adapter.setCascadeTargetInactive()}_isOwnElement(e){return this._adapter.isOwnElement(e)}_createCascadingElement({index:e,options:t,parentValue:n}){let o=this._adapter.createChildMenu(e,n,this._onCascadingChildOpen.bind(this),this._onCascadingChildClose.bind(this),this._onCascadingOptionSelected.bind(this));return o.mode="cascade",o.popupOffset={x:0,y:-8},o.dense=this._dense,o.placement="right-start",o.fallbackPlacements=["left-start","right-start"],o.persistSelection=this._persistSelection,this._persistSelection&&(o.selectedValue=this._selectedValue),o.options=t,o.optionBuilder=this._optionBuilder,o.iconClass=this._iconClass,o}_mapIconToLeadingIcon(){this._flatOptions.filter(e=>e.icon).forEach(e=>e.leadingIcon=e.icon)}get open(){return this._open}set open(e){e=Boolean(e),this._open!==e&&(this._open=e,e?this._openDropdown():this._closeDropdown())}set options(e){if(typeof e=="function")this.optionsFactory=e;else if(this.optionsFactory=void 0,this._options=e.map(t=>c({},t)),this._open&&(this._mapIconToLeadingIcon(),this._adapter.setOptions(this._options),this._persistSelection)){let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}}get options(){return this._options?this._flatOptions.map(e=>c({},e)):[]}set optionsFactory(e){this._optionsFactory=e}set selectedIndex(e){let t=this._nonDividerOptions[e];t&&t.value!==this._selectedValue&&(this.selectedValue=t.value)}get selectedIndex(){return this._selectedValue!==void 0?this._nonDividerOptions.findIndex(e=>e.value===this._selectedValue):-1}set selectedValue(e){this._selectedValue!==e&&(this._selectedValue=e,this._adapter.setSelectedValues(this._selectedValue))}get selectedValue(){return this._selectedValue}get placement(){return this._placement}set placement(e){this._placement!==e&&(this._placement=e||"bottom-start",this._adapter.setHostAttribute(i.attributes.PLACEMENT,this._placement))}get fallbackPlacements(){return this._fallbackPlacements}set fallbackPlacements(e){this._fallbackPlacements=Array.isArray(e)?e:[]}get dense(){return this._dense}set dense(e){this._dense=e}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass=e}get persistSelection(){return this._persistSelection}set persistSelection(e){this._persistSelection!==e&&(this._persistSelection=e,this._adapter.toggleHostAttribute(i.attributes.PERSIST_SELECTION,this._persistSelection),this._persistSelection||(this._flatOptions.forEach(t=>t.selected=!1),this._selectedValue=void 0))}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._destroyInteractionListeners(),this._applyMode(),this._adapter.setHostAttribute(i.attributes.MODE,this._mode))}get popupOffset(){return this._popupOffset}set popupOffset(e){this._popupOffset=e}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get popupElement(){return this._adapter.getDropdownElement()}};var q="<template><slot></slot></template>",W=":host{display:inline-block}:host([hidden]){display:none}",s=class extends k{constructor(){super();w.define(P),this._foundation=new h(new u(this)),C(this,q,W)}static get observedAttributes(){return[i.attributes.OPEN,i.attributes.PLACEMENT,i.attributes.SELECTED_INDEX,i.attributes.SELECTED_VALUE,i.attributes.DENSE,i.attributes.ICON_CLASS,i.attributes.PERSIST_SELECTION,i.attributes.MODE,i.attributes.SYNC_POPUP_WIDTH,i.attributes.POPUP_CLASSES,i.attributes.OPTION_LIMIT,i.attributes.OBSERVE_SCROLL,i.attributes.OBSERVE_SCROLL_THRESHOLD]}connectedCallback(){this.querySelector(i.selectors.TOGGLE)?this._foundation.initialize():M(this,i.selectors.TOGGLE).then(()=>this._foundation.initialize())}attributeChangedCallback(e,t,n){switch(super.attributeChangedCallback(e,t,n),e){case i.attributes.OPEN:this._foundation.open=O(n);break;case i.attributes.PLACEMENT:this._foundation.placement=n;break;case i.attributes.SELECTED_INDEX:this._foundation.selectedIndex=Number(n);break;case i.attributes.SELECTED_VALUE:this._foundation.selectedValue=n;break;case i.attributes.DENSE:this._foundation.dense=_(n);break;case i.attributes.ICON_CLASS:this._foundation.iconClass=n;break;case i.attributes.PERSIST_SELECTION:this.persistSelection=_(n);break;case i.attributes.MODE:this.mode=n;break}}disconnectedCallback(){this._foundation.disconnect()}propagateKeyEvent(e){this._foundation.onKeydown(e)}activateFirstOption(){this._foundation.activateFirstOption()}};a([p()],s.prototype,"open",2),a([p()],s.prototype,"options",2),a([p()],s.prototype,"selectedIndex",2),a([p()],s.prototype,"selectedValue",2),a([p()],s.prototype,"placement",2),a([p()],s.prototype,"fallbackPlacements",2),a([p()],s.prototype,"dense",2),a([p()],s.prototype,"iconClass",2),a([p()],s.prototype,"persistSelection",2),a([p()],s.prototype,"mode",2),a([p()],s.prototype,"popupOffset",2),a([p()],s.prototype,"optionBuilder",2),a([p({set:!1})],s.prototype,"popupElement",2),s=a([T({name:i.elementName,dependencies:[F,x,K,A]})],s);function je(){L(s)}export{i as a,u as b,h as c,s as d,je as e};
|
|
7
|
+
//# sourceMappingURL=chunk.TMEYQXRR.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/menu/menu-constants.ts", "../../src/menu/menu-adapter.ts", "../../src/menu/menu-foundation.ts", "../../src/menu/menu.ts", "../../src/menu/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\nimport { IListDropdownOption, IListDropdownOptionGroup } from '../list-dropdown';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}menu`;\n\nconst classes = {\n POPUP: 'forge-menu__popup',\n MENU: 'mdc-menu'\n};\n\nconst selectors = {\n TOGGLE: `.${elementName}__toggle,[${elementName}-toggle],button,[type=button],[role=button],a,[tabindex]:not([tabindex^=\"-\"])`,\n MENU_LIST: 'forge-list'\n};\n\nconst attributes = {\n OPEN: 'open',\n PLACEMENT: 'placement',\n SELECTED_INDEX: 'selected-index',\n SELECTED_VALUE: 'selected-value',\n DENSE: 'dense',\n ICON_CLASS: 'icon-class',\n PERSIST_SELECTION: 'persist-selection',\n MODE: 'mode',\n SYNC_POPUP_WIDTH: 'sync-popup-width',\n POPUP_CLASSES: 'popup-classes',\n OPTION_LIMIT: 'option-limit',\n OBSERVE_SCROLL: 'observe-scroll',\n OBSERVE_SCROLL_THRESHOLD: 'observe-scroll-threshold'\n};\n\nconst events = {\n SELECT: `${elementName}-select`,\n OPEN: `${elementName}-open`,\n CLOSE: `${elementName}-close`,\n ACTIVE_CHANGE: `${elementName}-active-change`\n};\n\nconst numbers = {\n CHILD_MOUSE_LEAVE_TIMEOUT: 300,\n POPUP_MOUSE_LEAVE_TIMEOUT: 500\n};\n\nexport const MENU_CONSTANTS = {\n elementName,\n classes,\n selectors,\n attributes,\n events,\n numbers\n};\n\nexport interface IMenuSelectEventData<T = any, K = any> {\n index: number;\n value?: T;\n parentValue?: K;\n}\n\nexport interface IMenuActiveChangeEventData {\n id: string;\n}\n\nexport interface IMenuOption<T = any> extends IListDropdownOption<T> {\n icon?: string;\n selected?: boolean;\n}\n\nexport interface IMenuOptionGroup extends IListDropdownOptionGroup {}\n\nexport type MenuOptionBuilder = (option: IMenuOption, parentElement: HTMLElement) => HTMLElement | string | void;\nexport type MenuOptionFactory = (() => Array<IMenuOption | IMenuOptionGroup>) | (() => Promise<Array<IMenuOption | IMenuOptionGroup>>);\nexport type MenuMode = 'click' | 'cascade';\n", "import { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { IMenuOption } from './index';\nimport { IMenuComponent } from './menu';\nimport { MENU_CONSTANTS, IMenuSelectEventData, IMenuOptionGroup } from './menu-constants';\nimport { IListDropdownConfig, IListDropdown, ListDropdown } from '../list-dropdown';\nimport { IListComponent, IListItemComponent, LIST_CONSTANTS, LIST_ITEM_CONSTANTS } from '../list';\n\nexport interface IMenuAdapter extends IBaseAdapter {\n readonly targetElement: HTMLElement | null;\n getDropdownElement(): HTMLElement | null;\n initializeTarget(): void;\n initializeAccessibility(id: string): void;\n hasTargetElement(): boolean;\n addTargetListener(event: string, callback: (event: Event) => void, bubbles?: boolean): void;\n removeTargetListener(event: string, callback: (event: Event) => void): void;\n attachMenu(config: IListDropdownConfig): void;\n detachMenu(): void;\n setOptions(options: Array<IMenuOption | IMenuOptionGroup>): void;\n getActiveOptionIndex(): number;\n setActiveOption(index: number): void;\n activateFirstOption(): void;\n setCascadeTargetInactive(): void;\n propagateKey(key: string): void;\n proxyKeyboardEventToChild(evt: KeyboardEvent, id: string): void;\n toggleChildMenu(index: number, open?: boolean): void;\n focusTarget(): void;\n isTargetFocused(): boolean;\n updateActiveDescendant(id: string): void;\n isOwnElement(element: Element): boolean;\n addDropdownListener(type: string, listener: (evt: any) => void): void;\n createChildMenu(index: number, parentValue: any, openCb: (index: number) => void, closeCb: (index: number) => void, selectCb: (data: IMenuSelectEventData) => void): IMenuComponent;\n closeOtherChildMenus(excludeIndex?: number): void;\n setSelectedValues(values: any[]): void;\n}\n\nexport class MenuAdapter extends BaseAdapter<IMenuComponent> implements IMenuAdapter {\n private _targetElement: HTMLElement | null;\n private _listDropdown?: IListDropdown;\n private _childMenus = new Map<number, IMenuComponent>();\n\n constructor(component: IMenuComponent) {\n super(component);\n }\n\n public get targetElement(): HTMLElement | null {\n return this._targetElement;\n }\n\n public getDropdownElement(): HTMLElement | null {\n return this._listDropdown?.dropdownElement ?? null;\n }\n\n public hasTargetElement(): boolean {\n return !!this._targetElement;\n }\n\n public initializeTarget(): void {\n this._targetElement = this._component.querySelector(MENU_CONSTANTS.selectors.TOGGLE);\n if (!this._targetElement) {\n this._targetElement = this._component.firstElementChild as HTMLElement;\n }\n }\n\n public initializeAccessibility(id: string): void {\n if (!this._targetElement) {\n return;\n }\n\n this._targetElement.setAttribute('aria-atomic', 'true');\n this._targetElement.setAttribute('aria-live', 'assertive');\n this._targetElement.setAttribute('aria-haspopup', 'true');\n this._targetElement.setAttribute('aria-expanded', 'false');\n\n if (!this._targetElement.hasAttribute('aria-label')) {\n this._targetElement.setAttribute('aria-label', this._targetElement.textContent || '');\n }\n }\n\n public addTargetListener(event: string, callback: (event: Event) => void, bubbles = false): void {\n if (this._targetElement) {\n this._targetElement.addEventListener(event, callback, bubbles);\n }\n }\n\n public removeTargetListener(event: string, callback: (event: Event) => void): void {\n if (this._targetElement) {\n this._targetElement.removeEventListener(event, callback);\n }\n }\n\n public attachMenu(config: IListDropdownConfig): void {\n if (this._listDropdown || !this._targetElement) {\n return;\n }\n this._listDropdown = new ListDropdown(this._targetElement as HTMLElement, config);\n this._listDropdown.open();\n this._targetElement.setAttribute('aria-expanded', 'true');\n this._targetElement.setAttribute('aria-controls', `list-dropdown-popup-${config.id}`);\n }\n\n public setOptions(options: Array<IMenuOption | IMenuOptionGroup>): void {\n if (this._listDropdown) {\n this._listDropdown.setOptions(options);\n }\n }\n\n public detachMenu(): void {\n if (this._targetElement) {\n this._targetElement.removeAttribute('aria-activedescendant');\n this._targetElement.removeAttribute('aria-expanded');\n this._targetElement.removeAttribute('aria-controls');\n }\n\n if (this._listDropdown) {\n this._listDropdown.close();\n this._listDropdown.destroy();\n this._listDropdown = undefined;\n }\n }\n\n public setActiveOption(index: number): void {\n this._listDropdown?.activateOption(index);\n }\n\n public activateFirstOption(): void {\n this._listDropdown?.activateFirstOption();\n }\n\n public setCascadeTargetInactive(): void {\n const listItem = this._targetElement as IListItemComponent;\n if (listItem?.active) {\n listItem.active = false;\n }\n }\n\n public getActiveOptionIndex(): number {\n return this._listDropdown?.getActiveOptionIndex() ?? -1;\n }\n\n public focusTarget(): void {\n if (this._targetElement) {\n this._targetElement.focus();\n }\n }\n\n public isTargetFocused(): boolean {\n return document.activeElement === this._targetElement;\n }\n\n public updateActiveDescendant(id: string): void {\n if (!this._targetElement) {\n return;\n }\n if (id) {\n this._targetElement.setAttribute('aria-activedescendant', id);\n } else {\n this._targetElement.removeAttribute('aria-activedescendant');\n }\n }\n\n public addDropdownListener(type: string, listener: (evt: any) => void): void {\n if (!this._listDropdown || !this._listDropdown.dropdownElement) {\n return;\n }\n this._listDropdown.dropdownElement.addEventListener(type, listener);\n }\n\n public isOwnElement(el: Element): boolean {\n if (!this._targetElement || !this._listDropdown || !this._listDropdown.dropdownElement) {\n return false;\n }\n return this._targetElement.contains(el) || !!this._listDropdown.dropdownElement.contains(el);\n }\n\n public propagateKey(key: string): void {\n this._listDropdown?.handleKey(key);\n }\n\n public proxyKeyboardEventToChild(evt: KeyboardEvent, id: string): void {\n if (!this.getDropdownElement()) {\n return;\n }\n const openMenu = this._getOpenChildMenu(id);\n if (openMenu) {\n openMenu.propagateKeyEvent(evt);\n }\n }\n\n public toggleChildMenu(index: number, open?: boolean): void {\n const listItems = this._getListItems();\n const listItem = listItems[index];\n const childMenu = listItem.parentElement as IMenuComponent;\n if (childMenu && childMenu.tagName.toLowerCase() === MENU_CONSTANTS.elementName) {\n if (open === undefined) {\n childMenu.open = !childMenu.open;\n } else {\n childMenu.open = open;\n }\n childMenu.activateFirstOption();\n }\n }\n\n public createChildMenu(index: number, parentValue: any, openCb: (index: number) => void, closeCb: (index: number) => void, selectCb: (data: IMenuSelectEventData) => void): IMenuComponent {\n const menu = document.createElement('forge-menu');\n menu.style.display = 'block';\n\n // Set listeners to notify the parent menu when anything important happens within a child menu that needs to be propagated to the root menu\n menu.addEventListener(MENU_CONSTANTS.events.OPEN, () => {\n this._childMenus.set(index, menu);\n openCb(index);\n });\n menu.addEventListener(MENU_CONSTANTS.events.CLOSE, () => {\n this._childMenus.delete(index);\n closeCb(index);\n });\n menu.addEventListener(MENU_CONSTANTS.events.SELECT, (evt: CustomEvent<IMenuSelectEventData>) => {\n evt.stopPropagation();\n selectCb({ ...evt.detail, parentValue });\n });\n\n return menu;\n }\n\n public closeOtherChildMenus(excludeIndex?: number): void {\n const menusToRemove: number[] = [];\n this._childMenus.forEach((menu, index) => {\n if (index !== excludeIndex) {\n menu.open = false;\n menusToRemove.push(index);\n }\n });\n menusToRemove.forEach(index => this._childMenus.delete(index));\n }\n\n public setSelectedValues(values: any[]): void {\n this._listDropdown?.setSelectedValues(values);\n }\n\n private _getOpenChildMenu(id: string): IMenuComponent | null {\n if (!this.getDropdownElement()) {\n return null;\n }\n const list = this._getOwnList(id);\n return list ? list.querySelector(`${MENU_CONSTANTS.elementName}[${MENU_CONSTANTS.attributes.OPEN}]`) : null;\n }\n\n private _getOwnList(id: string): IListComponent | null {\n const popup = this.getDropdownElement();\n if (!popup) {\n return null;\n }\n return popup.querySelector(`${LIST_CONSTANTS.elementName}[id=\"list-dropdown-list-${id}\"]`);\n }\n\n private _getListItems(): IListItemComponent[] {\n const popup = this.getDropdownElement();\n if (!popup) {\n return [];\n }\n const listElement = popup.querySelector(LIST_CONSTANTS.elementName);\n if (listElement) {\n return Array.from(listElement.querySelectorAll(LIST_ITEM_CONSTANTS.elementName)) as IListItemComponent[];\n }\n return [];\n }\n}\n", "import { ICustomElementFoundation, isArray, randomChars } from '@tylertech/forge-core';\nimport { ICON_CLASS_NAME } from '../constants';\nimport { CascadingListDropdownAwareFoundation, IListDropdownCascadingElementFactoryConfig, IListDropdownConfig, ListDropdownAsyncStyle, ListDropdownType } from '../list-dropdown';\nimport { isListDropdownOptionType, ListDropdownOptionType } from '../list-dropdown/list-dropdown-utils';\nimport { IPopupPosition, PopupPlacement } from '../popup';\nimport { IMenuOption } from './index';\nimport { IMenuAdapter } from './menu-adapter';\nimport { IMenuActiveChangeEventData, IMenuOptionGroup, IMenuSelectEventData, MenuMode, MenuOptionBuilder, MenuOptionFactory, MENU_CONSTANTS } from './menu-constants';\n\nexport interface IMenuFoundation extends ICustomElementFoundation {\n initialize(): void;\n disconnect(): void;\n onKeydown(evt: KeyboardEvent): void;\n open: boolean;\n options: Array<IMenuOption | IMenuOptionGroup>;\n optionsFactory: MenuOptionFactory | undefined;\n selectedIndex: number;\n selectedValue: any;\n placement: PopupPlacement;\n fallbackPlacements: PopupPlacement[];\n dense: boolean;\n iconClass: string;\n persistSelection: boolean;\n mode: MenuMode;\n popupOffset: IPopupPosition;\n optionBuilder: MenuOptionBuilder | undefined;\n activateFirstOption(): void;\n}\n\nexport class MenuFoundation extends CascadingListDropdownAwareFoundation<IMenuOption | IMenuOptionGroup> implements IMenuFoundation {\n private _optionsFactory: MenuOptionFactory | undefined;\n private _placement: PopupPlacement = 'bottom-start';\n private _fallbackPlacements: PopupPlacement[] = [];\n private _dense = false;\n private _selectedValue: any;\n private _iconClass = ICON_CLASS_NAME;\n private _persistSelection = false;\n private _mode: MenuMode = 'click';\n private _popupOffset: IPopupPosition;\n private _optionBuilder: MenuOptionBuilder | undefined;\n private _identifier: string;\n private _clickListener: (evt: MouseEvent) => void;\n private _blurListener: (evt: MouseEvent) => void;\n private _selectListener: (value: any) => void;\n private _keydownListener: (evt: KeyboardEvent) => void;\n private _activeChangeListener: (id: string) => void;\n \n constructor(private _adapter: IMenuAdapter) {\n super({\n popupTimeout: MENU_CONSTANTS.numbers.POPUP_MOUSE_LEAVE_TIMEOUT,\n targetTimeout: MENU_CONSTANTS.numbers.CHILD_MOUSE_LEAVE_TIMEOUT\n });\n this._identifier = randomChars();\n this._clickListener = evt => this._onTargetClick(evt);\n this._blurListener = evt => this._onTargetBlur(evt);\n this._selectListener = value => this._handleSelectEvent(value);\n this._keydownListener = evt => this.onKeydown(evt);\n this._activeChangeListener = id => this._onActiveOptionChanged(id);\n }\n\n public initialize(): void {\n this._adapter.initializeTarget();\n this._adapter.initializeAccessibility(this._identifier);\n this._initializeInteractionListeners();\n }\n\n public disconnect(): void {\n if (this._open) {\n this._closeDropdown();\n }\n this._destroyInteractionListeners();\n }\n\n public activateFirstOption(): void {\n this._adapter.activateFirstOption();\n }\n\n private _applyMode(): void {\n if (!this._adapter.hasTargetElement()) {\n return;\n }\n\n if (this._mode !== 'cascade') {\n this._adapter.addTargetListener('click', this._clickListener);\n } else {\n this._attachCascadingListeners();\n }\n }\n\n private _initializeInteractionListeners(): void {\n if (!this._adapter.hasTargetElement()) {\n return;\n }\n this._applyMode();\n this._adapter.addTargetListener('keydown', this._keydownListener, true);\n this._adapter.addTargetListener('focusout', this._blurListener);\n }\n\n private _destroyInteractionListeners(): void {\n if (!this._adapter.hasTargetElement()) {\n return;\n }\n this._adapter.removeTargetListener('keydown', this._clickListener);\n this._adapter.removeTargetListener('focusout', this._blurListener);\n this._adapter.removeTargetListener('click', this._clickListener);\n this._detachCascadingListeners();\n }\n\n protected _attachCascadingListeners(): void {\n this._adapter.addTargetListener('mouseenter', this._targetMouseEnterListener);\n this._adapter.addTargetListener('mouseleave', this._targetMouseLeaveListener);\n\n // We listen for document mousemove events only to track mouse coords for use when determining\n // if popups should open/close after specific delays\n this._adapter.addDocumentListener('mousemove', this._documentMouseMoveListener);\n }\n\n protected _detachCascadingListeners(): void {\n this._adapter.removeTargetListener('mouseenter', this._targetMouseEnterListener);\n this._adapter.removeTargetListener('mouseleave', this._targetMouseLeaveListener);\n this._adapter.removeDocumentListener('mousemove', this._documentMouseMoveListener);\n }\n\n private get _nonDividerOptions(): IMenuOption[] {\n return this._flatOptions.filter(o => !o.divider);\n }\n\n private get _flatOptions(): IMenuOption[] {\n return this._flattenOptions(this._options);\n }\n\n private _flattenOptions(options: Array<IMenuOption | IMenuOptionGroup>): IMenuOption[] {\n if (isListDropdownOptionType(options, ListDropdownOptionType.Group)) {\n return (options as IMenuOptionGroup[])\n .reduce((previousValue, currentValue) => {\n return currentValue.options ? previousValue.concat(currentValue.options) : previousValue;\n }, [] as IMenuOption[]);\n }\n return options as IMenuOption[];\n }\n\n private _onTargetClick(evt: MouseEvent): void {\n if (this._open) {\n this._closeDropdown();\n return;\n }\n this.open = !this._open;\n if (this._open) {\n this._adapter.focusTarget();\n }\n }\n\n private _onTargetBlur(evt: Event): void {\n if (this._open) {\n this._closeDropdown();\n }\n }\n\n private _onActiveOptionChanged(id: string): void {\n // We need to dispatch an event when the active descendant changes to propagate that to the proper target element\n const data: IMenuActiveChangeEventData = { id };\n const canSetActiveDescendant = this._adapter.emitHostEvent(MENU_CONSTANTS.events.ACTIVE_CHANGE, data, true, true);\n if (this._mode !== 'cascade' && canSetActiveDescendant) {\n this._adapter.updateActiveDescendant(id);\n }\n }\n\n public onKeydown(evt: KeyboardEvent): void {\n // If we have any child menus open, we need to proxy the keyboard events to those and exit\n if (this._childOpen) {\n this._adapter.proxyKeyboardEventToChild(evt, this._identifier);\n return;\n }\n\n switch (evt.code) {\n case 'Escape':\n if (this._open) {\n evt.preventDefault();\n evt.stopPropagation();\n this._closeDropdown();\n }\n break;\n case 'Space':\n evt.preventDefault();\n\n if (this._open) {\n this._closeDropdown();\n } else {\n this._openDropdown({ fromKeyboard: true });\n }\n break;\n case 'Home':\n case 'End':\n if (this._open) {\n evt.preventDefault();\n this._adapter.propagateKey(evt.code);\n }\n break;\n case 'Enter':\n evt.preventDefault();\n\n if (!this._open) {\n evt.preventDefault();\n this._openDropdown({ fromKeyboard: true });\n return;\n }\n\n evt.stopImmediatePropagation();\n\n this._adapter.propagateKey(evt.code);\n\n // Check if we need to toggle the child menu open state\n const activeIndex = this._adapter.getActiveOptionIndex();\n const activeOption = this._nonDividerOptions[activeIndex];\n if (activeOption && activeOption.options && activeOption.options.length) {\n this._adapter.toggleChildMenu(activeIndex);\n }\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n if (this._open) {\n evt.stopImmediatePropagation();\n }\n\n evt.preventDefault();\n\n if (!this._open && evt.code === 'ArrowDown') {\n this._openDropdown({ fromKeyboard: true });\n this._adapter.activateFirstOption();\n return;\n }\n\n this._adapter.propagateKey(evt.code);\n break;\n case 'ArrowLeft':\n if (this._open) {\n evt.stopImmediatePropagation();\n }\n if (this._mode === 'cascade' && this._open) {\n this._closeDropdown();\n }\n break;\n case 'ArrowRight':\n if (this._open) {\n evt.stopImmediatePropagation();\n }\n if (!this._open) {\n return;\n }\n const hoveredIndex = this._adapter.getActiveOptionIndex();\n const hoveredOption = this._nonDividerOptions[hoveredIndex];\n if (hoveredOption && hoveredOption.options) {\n this._adapter.toggleChildMenu(hoveredIndex, evt.code === 'ArrowRight');\n return;\n }\n break;\n }\n }\n\n private async _openMenu({ fromKeyboard }: { fromKeyboard?: boolean } = {}): Promise<void> {\n this._open = true;\n let options: IMenuOption[] = [];\n\n if (typeof this._optionsFactory === 'function') {\n this._loadOptionsAsync();\n this._options = [];\n } else {\n if (!this._options || !this._options.length) {\n return;\n }\n options = this._options as IMenuOption[];\n }\n\n if (!this._persistSelection) {\n options.forEach(o => o.selected = false);\n }\n\n this._mapIconToLeadingIcon();\n\n const selectedValues = this._persistSelection ? this._getSelectedValues() : [];\n\n const config: IListDropdownConfig = {\n id: this._identifier,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n referenceElement: this._adapter.targetElement!,\n type: ListDropdownType.Menu,\n options: this._options,\n selectedValues,\n iconClass: this._iconClass,\n dense: this._dense,\n multiple: false,\n popupStatic: true,\n allowBusy: true,\n asyncStyle: ListDropdownAsyncStyle.Spinner,\n optionBuilder: this._optionBuilder,\n optionLimit: this._optionLimit,\n headerBuilder: this._popupHeaderBuilder,\n footerBuilder: this._popupFooterBuilder,\n observeScroll: this._observeScroll,\n observeScrollThreshold: this._observeScrollThreshold,\n popupPlacement: this._placement,\n popupFallbackPlacements: this._fallbackPlacements,\n activeStartIndex: fromKeyboard ? 0 : undefined,\n popupClasses: [\n MENU_CONSTANTS.classes.POPUP,\n MENU_CONSTANTS.classes.MENU,\n ...this._popupClasses as string[]\n ],\n syncWidth: this._syncPopupWidth,\n activeChangeCallback: this._activeChangeListener,\n selectCallback: this._selectListener,\n popupOffset: this._popupOffset,\n cascadingElementFactory: params => this._createCascadingElement(params)\n };\n\n this._adapter.setHostAttribute(MENU_CONSTANTS.attributes.OPEN, '');\n this._adapter.attachMenu(config);\n\n // If this menu is in a hover mode, we need to listen for mouse enter/leave events to know when the user is hovering over the popup\n if (this._mode === 'cascade') {\n this._adapter.addDropdownListener('mouseenter', this._childPopupMouseEnterListener);\n this._adapter.addDropdownListener('mouseleave', this._childPopupMouseLeaveListener);\n }\n \n this._adapter.addDropdownListener(MENU_CONSTANTS.events.ACTIVE_CHANGE, (evt: CustomEvent<IMenuActiveChangeEventData>) => {\n this._onActiveOptionChanged(evt.detail.id);\n });\n this._adapter.emitHostEvent(MENU_CONSTANTS.events.OPEN);\n }\n\n private _closeMenu(): void {\n this._open = false;\n this._childOpen = false;\n this._adapter.detachMenu();\n\n if (this._activeMouseLeaveTimeout !== undefined) {\n window.clearTimeout(this._activeMouseLeaveTimeout);\n }\n\n this._adapter.removeHostAttribute(MENU_CONSTANTS.attributes.OPEN);\n this._adapter.emitHostEvent(MENU_CONSTANTS.events.CLOSE);\n }\n\n private _loadOptionsAsync(): Promise<void> {\n if (!this._optionsFactory) {\n if (this._open) {\n this._closeMenu();\n }\n return Promise.resolve();\n }\n\n return Promise.resolve(this._optionsFactory())\n .then(results => {\n if (!this._persistSelection) {\n const flatResults = this._flattenOptions(results);\n flatResults.filter(o => o.selected).forEach(o => o.selected = false);\n }\n\n if (this._open) {\n if (results && isArray(results) && results.length) {\n this._options = results;\n this._mapIconToLeadingIcon();\n this._adapter.setOptions(results);\n const selectedValues = this._getSelectedValues();\n if (selectedValues.length) {\n this._adapter.setSelectedValues(selectedValues);\n }\n } else if (this._open) {\n this._closeDropdown();\n }\n }\n })\n .catch(e => {\n console.error('An unexpected error ocurred while opening the menu:', e);\n if (this._open) {\n this._closeDropdown();\n }\n });\n }\n\n private _handleSelectEvent(value: any): void {\n const index = this._nonDividerOptions.findIndex(o => o.value === value);\n if (index < 0) {\n return;\n }\n this._selectOptionByIndex(index);\n }\n\n private _selectActiveOption(): void {\n const index = this._adapter.getActiveOptionIndex();\n if (index >= 0 && this._nonDividerOptions[index]) {\n this._selectOptionByIndex(index);\n }\n }\n\n private _selectOptionByIndex(index: number): void {\n const { options, value } = this._nonDividerOptions[index];\n\n // We ignore selections if the option has child options\n if (options) {\n this._adapter.setActiveOption(index);\n return;\n }\n\n this._closeDropdown();\n \n const data: IMenuSelectEventData = { index, value };\n const isCancelled = !this._adapter.emitHostEvent(MENU_CONSTANTS.events.SELECT, data, true, true);\n if (!isCancelled) {\n this._selectedValue = this._persistSelection ? value : undefined;\n }\n }\n\n private _getSelectedValues(): any[] {\n const values = this._flatOptions.filter(o => o.selected).map(o => o.value);\n if (this._selectedValue !== undefined) {\n values.push(this._selectedValue);\n }\n return values;\n }\n\n /** Called when a child menu option is selected. */\n protected _onCascadingOptionSelected(data: IMenuSelectEventData): void {\n if (this._persistSelection) {\n this._selectedValue = data.value;\n }\n this._adapter.emitHostEvent(MENU_CONSTANTS.events.SELECT, data);\n this._closeDropdown();\n }\n\n /** Called when a child menu is opened off of one of our menu options. */\n protected _onCascadingChildOpen(index: number): void {\n super._clearMouseLeaveTimeout();\n this._adapter.closeOtherChildMenus(index);\n this._childOpen = true;\n this._adapter.setActiveOption(index);\n }\n\n /** Called when a child menu is closed off of one of our menu options. */\n protected _onCascadingChildClose(index: number): void {\n this._childOpen = false;\n }\n\n protected _closeDropdown(): void {\n this._closeMenu();\n }\n\n protected _openDropdown({ fromKeyboard }: { fromKeyboard?: boolean } = {}): void {\n this._openMenu({ fromKeyboard });\n }\n\n protected _setCascadeTargetInactive(): void {\n this._adapter.setCascadeTargetInactive();\n }\n\n protected _isOwnElement(element: Element): boolean {\n return this._adapter.isOwnElement(element);\n }\n\n private _createCascadingElement({ index, options, parentValue }: IListDropdownCascadingElementFactoryConfig): HTMLElement {\n const menu = this._adapter.createChildMenu(\n index,\n parentValue,\n this._onCascadingChildOpen.bind(this),\n this._onCascadingChildClose.bind(this),\n this._onCascadingOptionSelected.bind(this)\n );\n menu.mode = 'cascade';\n menu.popupOffset = { x: 0, y: -8 };\n menu.dense = this._dense;\n menu.placement = 'right-start';\n menu.fallbackPlacements = ['left-start', 'right-start']; // Cascading menus should only fallback to left or right placement if needed\n menu.persistSelection = this._persistSelection;\n if (this._persistSelection) {\n menu.selectedValue = this._selectedValue;\n }\n menu.options = options;\n menu.optionBuilder = this._optionBuilder;\n menu.iconClass = this._iconClass;\n\n return menu;\n }\n\n private _mapIconToLeadingIcon(): void {\n // For backwards compatibility with old API, map the old \"icon\" property to the new \"leadingIcon\" property (if exists)\n this._flatOptions.filter(o => o.icon).forEach(o => o.leadingIcon = o.icon);\n }\n\n public get open(): boolean {\n return this._open;\n }\n public set open(value: boolean) {\n value = Boolean(value);\n if (this._open !== value) {\n this._open = value;\n if (value) {\n this._openDropdown();\n } else {\n this._closeDropdown();\n }\n }\n }\n\n public set options(options: IMenuOption[]) {\n if (typeof options === 'function') {\n this.optionsFactory = options;\n } else {\n this.optionsFactory = undefined;\n // Intentional shallow copy of member properties. These member objects have properties that are references to functions.\n this._options = options.map(o => ({ ...o }));\n \n if (this._open) {\n this._mapIconToLeadingIcon();\n this._adapter.setOptions(this._options as IMenuOption[]);\n if (this._persistSelection) {\n const selectedValues = this._getSelectedValues();\n if (selectedValues.length) {\n this._adapter.setSelectedValues(selectedValues);\n }\n }\n }\n }\n }\n public get options(): IMenuOption[] {\n if (!this._options) {\n return [];\n }\n\n // Intentional shallow copy of member properties. These member objects have properties that are references to functions.\n return this._flatOptions.map(o => ({ ...o }));\n }\n\n public set optionsFactory(factory: MenuOptionFactory | undefined) {\n this._optionsFactory = factory;\n }\n\n public set selectedIndex(value: number) {\n const option = this._nonDividerOptions[value];\n if (option && option.value !== this._selectedValue) {\n this.selectedValue = option.value;\n }\n }\n public get selectedIndex(): number {\n return this._selectedValue !== undefined ? this._nonDividerOptions.findIndex(o => o.value === this._selectedValue) : -1;\n }\n\n public set selectedValue(value: any) {\n if (this._selectedValue !== value) {\n this._selectedValue = value;\n this._adapter.setSelectedValues(this._selectedValue);\n }\n }\n public get selectedValue(): any {\n return this._selectedValue;\n }\n\n public get placement(): PopupPlacement {\n return this._placement;\n }\n public set placement(value: PopupPlacement) {\n if (this._placement !== value) {\n this._placement = value || 'bottom-start';\n this._adapter.setHostAttribute(MENU_CONSTANTS.attributes.PLACEMENT, this._placement);\n }\n }\n\n public get fallbackPlacements(): PopupPlacement[] {\n return this._fallbackPlacements;\n }\n public set fallbackPlacements(value: PopupPlacement[]) {\n this._fallbackPlacements = Array.isArray(value) ? value : [];\n }\n\n public get dense(): boolean {\n return this._dense;\n }\n public set dense(value: boolean) {\n this._dense = value;\n }\n\n public get iconClass(): string {\n return this._iconClass;\n }\n public set iconClass(value: string) {\n this._iconClass = value;\n }\n\n public get persistSelection(): boolean {\n return this._persistSelection;\n }\n public set persistSelection(value: boolean) {\n if (this._persistSelection === value) {\n return;\n }\n\n this._persistSelection = value;\n this._adapter.toggleHostAttribute(MENU_CONSTANTS.attributes.PERSIST_SELECTION, this._persistSelection);\n\n if (!this._persistSelection) {\n this._flatOptions.forEach(o => o.selected = false);\n this._selectedValue = undefined;\n }\n }\n\n public get mode(): MenuMode {\n return this._mode;\n }\n public set mode(value: MenuMode) {\n if (this._mode !== value) {\n this._mode = value;\n this._destroyInteractionListeners();\n this._applyMode();\n this._adapter.setHostAttribute(MENU_CONSTANTS.attributes.MODE, this._mode);\n }\n }\n\n public get popupOffset(): IPopupPosition {\n return this._popupOffset;\n }\n public set popupOffset(value: IPopupPosition) {\n this._popupOffset = value;\n }\n\n public get optionBuilder(): MenuOptionBuilder | undefined {\n return this._optionBuilder;\n }\n public set optionBuilder(cb: MenuOptionBuilder | undefined) {\n this._optionBuilder = cb;\n }\n\n public get popupElement(): HTMLElement | null {\n return this._adapter.getDropdownElement();\n }\n}\n", "import { attachShadowTemplate, coerceBoolean, CustomElement, ensureChild, FoundationProperty, isDefined } from '@tylertech/forge-core';\nimport { tylIconArrowRight } from '@tylertech/tyler-icons/standard';\nimport { CircularProgressComponent } from '../circular-progress';\nimport { IconRegistry } from '../icon';\nimport { LinearProgressComponent } from '../linear-progress';\nimport { ListComponent } from '../list';\nimport { IListDropdownAware, ListDropdownAware } from '../list-dropdown/list-dropdown-aware';\nimport { IPopupPosition, PopupComponent, PopupPlacement } from '../popup';\nimport { MenuAdapter } from './menu-adapter';\nimport { IMenuActiveChangeEventData, IMenuOption, IMenuOptionGroup, IMenuSelectEventData, MenuMode, MenuOptionBuilder, MenuOptionFactory, MENU_CONSTANTS } from './menu-constants';\nimport { MenuFoundation } from './menu-foundation';\nconst template = '<template><slot></slot></template>';\nconst styles = ':host{display:inline-block}:host([hidden]){display:none}';\n\nexport interface IMenuComponent extends IListDropdownAware {\n open: boolean;\n options: Array<IMenuOption | IMenuOptionGroup> | MenuOptionFactory;\n selectedIndex: number;\n selectedValue: number;\n placement: PopupPlacement;\n fallbackPlacements: PopupPlacement[];\n dense: boolean;\n iconClass: string;\n persistSelection: boolean;\n mode: MenuMode;\n popupOffset: IPopupPosition;\n optionBuilder: MenuOptionBuilder | undefined;\n popupElement: HTMLElement | undefined;\n propagateKeyEvent(evt: KeyboardEvent): void;\n activateFirstOption(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-menu': IMenuComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-menu-select': CustomEvent<IMenuSelectEventData>;\n 'forge-menu-open': CustomEvent<void>;\n 'forge-menu-close': CustomEvent<void>;\n 'forge-menu-active-change': CustomEvent<IMenuActiveChangeEventData>;\n }\n}\n\n/**\n * The web component class behind the `<forge-menu>` custom element.\n * \n * @tag forge-menu\n */\n@CustomElement({\n name: MENU_CONSTANTS.elementName,\n dependencies: [\n PopupComponent,\n ListComponent,\n CircularProgressComponent,\n LinearProgressComponent\n ]\n})\nexport class MenuComponent extends ListDropdownAware implements IMenuComponent {\n public static get observedAttributes(): string[] {\n return [\n MENU_CONSTANTS.attributes.OPEN,\n MENU_CONSTANTS.attributes.PLACEMENT,\n MENU_CONSTANTS.attributes.SELECTED_INDEX,\n MENU_CONSTANTS.attributes.SELECTED_VALUE,\n MENU_CONSTANTS.attributes.DENSE,\n MENU_CONSTANTS.attributes.ICON_CLASS,\n MENU_CONSTANTS.attributes.PERSIST_SELECTION,\n MENU_CONSTANTS.attributes.MODE,\n MENU_CONSTANTS.attributes.SYNC_POPUP_WIDTH,\n MENU_CONSTANTS.attributes.POPUP_CLASSES,\n MENU_CONSTANTS.attributes.OPTION_LIMIT,\n MENU_CONSTANTS.attributes.OBSERVE_SCROLL,\n MENU_CONSTANTS.attributes.OBSERVE_SCROLL_THRESHOLD\n ];\n }\n\n private _foundation: MenuFoundation;\n\n constructor() {\n super();\n IconRegistry.define(tylIconArrowRight);\n this._foundation = new MenuFoundation(new MenuAdapter(this));\n attachShadowTemplate(this, template, styles);\n }\n\n public connectedCallback(): void {\n if (this.querySelector(MENU_CONSTANTS.selectors.TOGGLE)) {\n this._foundation.initialize();\n } else {\n ensureChild(this, MENU_CONSTANTS.selectors.TOGGLE).then(() => this._foundation.initialize());\n }\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n super.attributeChangedCallback(name, oldValue, newValue);\n switch (name) {\n case MENU_CONSTANTS.attributes.OPEN:\n this._foundation.open = isDefined(newValue);\n break;\n case MENU_CONSTANTS.attributes.PLACEMENT:\n this._foundation.placement = newValue as PopupPlacement;\n break;\n case MENU_CONSTANTS.attributes.SELECTED_INDEX:\n this._foundation.selectedIndex = Number(newValue);\n break;\n case MENU_CONSTANTS.attributes.SELECTED_VALUE:\n this._foundation.selectedValue = newValue;\n break;\n case MENU_CONSTANTS.attributes.DENSE:\n this._foundation.dense = coerceBoolean(newValue);\n break;\n case MENU_CONSTANTS.attributes.ICON_CLASS:\n this._foundation.iconClass = newValue;\n break;\n case MENU_CONSTANTS.attributes.PERSIST_SELECTION:\n this.persistSelection = coerceBoolean(newValue);\n break;\n case MENU_CONSTANTS.attributes.MODE:\n this.mode = newValue as MenuMode;\n break;\n }\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n /** Gets/sets the open state. */\n @FoundationProperty()\n public declare open: boolean;\n\n /** Gets/sets the array of options to display in the menu. */\n @FoundationProperty()\n public declare options: Array<IMenuOption | IMenuOptionGroup> | MenuOptionFactory;\n\n /** Gets/sets the selected option to the index. Does not support cascading menus. */\n @FoundationProperty()\n public declare selectedIndex: number;\n\n /** Gets/sets the value of the option to select. */\n @FoundationProperty()\n public declare selectedValue: any;\n\n /** Gets/sets the menu placement (default is bottom-left). */\n @FoundationProperty()\n public declare placement: `${PopupPlacement}`;\n\n /** Gets/sets the fallback menu placement for overriding the default of any side. */\n @FoundationProperty()\n public declare fallbackPlacements: `${PopupPlacement}`[];\n\n /** Gets/sets dense state of the list options used in the menu popup. */\n @FoundationProperty()\n public declare dense: boolean;\n\n /** Gets/sets the class name to use for option icons. */\n @FoundationProperty()\n public declare iconClass: string;\n\n /**\n * Gets/sets whether selection of menu items is persisted.\n * @deprecated Please use `<forge-select-dropdown>` for handling selection states.\n */\n @FoundationProperty()\n public declare persistSelection: boolean;\n\n /** Gets/sets the mode that this menu is using. */\n @FoundationProperty()\n public declare mode: MenuMode;\n\n /** Sets the position adjustment on the internal popup element. */\n @FoundationProperty()\n public declare popupOffset: IPopupPosition;\n\n /** Sets the callback that will be executed for each option in the dropdown for producing custom option templates. */\n @FoundationProperty()\n public declare optionBuilder: MenuOptionBuilder;\n\n /**\n * Gets the currently active popup element when the dropdown is open.\n * @readonly\n */\n @FoundationProperty({ set: false })\n public declare popupElement: HTMLElement | undefined;\n\n /** Force propagates the key event from another element this component. */\n public propagateKeyEvent(evt: KeyboardEvent): void {\n this._foundation.onKeydown(evt);\n }\n\n public activateFirstOption(): void {\n this._foundation.activateFirstOption();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { MenuComponent } from './menu';\n\nexport * from './menu-adapter';\nexport * from './menu-constants';\nexport * from './menu-foundation';\nexport * from './menu';\n\nexport function defineMenuComponent(): void {\n defineCustomElement(MenuComponent);\n}\n"],
|
|
5
|
+
"mappings": "wsBAGA,IAAMA,EAA2C,GAAGC,QAE9CC,EAAU,CACd,MAAO,oBACP,KAAM,UACR,EAEMC,EAAY,CAChB,OAAQ,IAAIH,cAAwBA,iFACpC,UAAW,YACb,EAEMI,EAAa,CACjB,KAAM,OACN,UAAW,YACX,eAAgB,iBAChB,eAAgB,iBAChB,MAAO,QACP,WAAY,aACZ,kBAAmB,oBACnB,KAAM,OACN,iBAAkB,mBAClB,cAAe,gBACf,aAAc,eACd,eAAgB,iBAChB,yBAA0B,0BAC5B,EAEMC,EAAS,CACb,OAAQ,GAAGL,WACX,KAAM,GAAGA,SACT,MAAO,GAAGA,UACV,cAAe,GAAGA,iBACpB,EAEMM,EAAU,CACd,0BAA2B,IAC3B,0BAA2B,GAC7B,EAEaC,EAAiB,CAC5B,YAAAP,EACA,QAAAE,EACA,UAAAC,EACA,WAAAC,EACA,OAAAC,EACA,QAAAC,CACF,ECfO,IAAME,EAAN,cAA0BC,CAAoD,CAKnF,YAAYC,EAA2B,CACrC,MAAMA,CAAS,EAHjB,KAAQ,YAAc,IAAI,GAI1B,CAEA,IAAW,eAAoC,CAC7C,OAAO,KAAK,cACd,CAEO,oBAAyC,CAhDlD,IAAAC,EAAAC,EAiDI,OAAOA,GAAAD,EAAA,KAAK,gBAAL,YAAAA,EAAoB,kBAApB,KAAAC,EAAuC,IAChD,CAEO,kBAA4B,CACjC,MAAO,CAAC,CAAC,KAAK,cAChB,CAEO,kBAAyB,CAC9B,KAAK,eAAiB,KAAK,WAAW,cAAcC,EAAe,UAAU,MAAM,EAC9E,KAAK,iBACR,KAAK,eAAiB,KAAK,WAAW,kBAE1C,CAEO,wBAAwBC,EAAkB,C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K,EAAM,CAAC,GA7HvBhB,EA8HI,4BA9HJA,EAANe,EAAA,CATNE,EAAc,CACb,KAAMV,EAAe,YACrB,aAAc,CACZW,EACAC,EACAC,EACAC,CACF,CACF,CAAC,GACYrB,GClDN,SAASsB,IAA4B,CAC1CC,EAAoBC,CAAa,CACnC",
|
|
6
|
+
"names": ["elementName", "COMPONENT_NAME_PREFIX", "classes", "selectors", "attributes", "events", "numbers", "MENU_CONSTANTS", "MenuAdapter", "BaseAdapter", "component", "_a", "_b", "MENU_CONSTANTS", "id", "event", "callback", "bubbles", "config", "ListDropdown", "options", "index", "listItem", "type", "listener", "el", "key", "evt", "openMenu", "open", "childMenu", "parentValue", "openCb", "closeCb", "selectCb", "menu", "__spreadProps", "__spreadValues", "excludeIndex", "menusToRemove", "values", "list", "popup", "LIST_CONSTANTS", "listElement", "LIST_ITEM_CONSTANTS", "MenuFoundation", "CascadingListDropdownAwareFoundation", "_adapter", "MENU_CONSTANTS", "ICON_CLASS_NAME", "randomChars", "evt", "value", "id", "o", "options", "isListDropdownOptionType", "previousValue", "currentValue", "data", "canSetActiveDescendant", "activeIndex", "activeOption", "hoveredIndex", "hoveredOption", "fromKeyboard", "selectedValues", "config", "params", "results", "isArray", "index", "values", "element", "parentValue", "menu", "__spreadValues", "factory", "option", "cb", "template", "styles", "MenuComponent", "ListDropdownAware", "IconRegistry", "tylIconArrowRight", "MenuFoundation", "MenuAdapter", "attachShadowTemplate", "MENU_CONSTANTS", "ensureChild", "name", "oldValue", "newValue", "isDefined", "coerceBoolean", "evt", "__decorateClass", "FoundationProperty", "CustomElement", "PopupComponent", "ListComponent", "CircularProgressComponent", "LinearProgressComponent", "defineMenuComponent", "defineCustomElement", "MenuComponent"]
|
|
7
|
+
}
|