@tylertech/forge 2.20.1 → 2.21.1
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 +51 -17
- 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/calendar/index.js +1 -1
- package/dist/esm/chunks/{chunk.K55FBLTW.js → chunk.2GDEYC4V.js} +2 -2
- package/dist/esm/chunks/{chunk.HGGP6G7L.js → chunk.43RHBWGI.js} +2 -2
- package/dist/esm/chunks/{chunk.ZWL2Q7E6.js → chunk.45KYMP5J.js} +2 -2
- package/dist/esm/chunks/{chunk.KNVCEYY2.js → chunk.5E2BG6O3.js} +2 -2
- package/dist/esm/chunks/{chunk.2VWASAUU.js → chunk.AIUIUCZH.js} +2 -2
- package/dist/esm/chunks/{chunk.AD4NVLFA.js → chunk.COS4RDZB.js} +2 -2
- package/dist/esm/chunks/chunk.DPZU5F27.js +7 -0
- package/dist/esm/chunks/chunk.DPZU5F27.js.map +7 -0
- package/dist/esm/chunks/chunk.F5LXG5X7.js +7 -0
- package/dist/esm/chunks/chunk.F5LXG5X7.js.map +7 -0
- package/dist/esm/chunks/chunk.PWHMNJ5Y.js +7 -0
- package/dist/esm/chunks/{chunk.WPJEXVHM.js.map → chunk.PWHMNJ5Y.js.map} +2 -2
- package/dist/esm/chunks/chunk.Q7HX26UO.js +7 -0
- package/dist/esm/chunks/chunk.Q7HX26UO.js.map +7 -0
- package/dist/esm/chunks/{chunk.O7IKUHRR.js → chunk.RD7SYOAI.js} +2 -2
- package/dist/esm/chunks/{chunk.4E4ZOFQI.js → chunk.TBSCULSM.js} +2 -2
- package/dist/esm/chunks/{chunk.4E4ZOFQI.js.map → chunk.TBSCULSM.js.map} +1 -1
- package/dist/esm/chunks/{chunk.4HWB754J.js → chunk.UQTJSPU4.js} +2 -2
- package/dist/esm/chunks/chunk.Y7YPNMPI.js +7 -0
- package/dist/esm/chunks/chunk.Y7YPNMPI.js.map +7 -0
- 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/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/paginator/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/table/index.js +1 -1
- package/esm/calendar/calendar-foundation.js +2 -1
- package/esm/date-range-picker/date-range-picker-foundation.d.ts +1 -0
- package/esm/date-range-picker/date-range-picker-foundation.js +4 -0
- package/esm/expansion-panel/expansion-panel-adapter.js +0 -5
- package/esm/menu/menu-adapter.d.ts +3 -3
- package/esm/menu/menu-constants.d.ts +1 -1
- package/esm/menu/menu-foundation.d.ts +1 -0
- package/esm/menu/menu-foundation.js +11 -4
- package/esm/paginator/paginator-constants.d.ts +9 -0
- package/esm/paginator/paginator-foundation.d.ts +5 -2
- package/esm/paginator/paginator-foundation.js +29 -8
- package/esm/paginator/paginator.d.ts +3 -1
- package/esm/paginator/paginator.js +3 -0
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/package.json +1 -1
- package/dist/esm/chunks/chunk.JOLJ7WVN.js +0 -7
- package/dist/esm/chunks/chunk.JOLJ7WVN.js.map +0 -7
- package/dist/esm/chunks/chunk.RH4E52PS.js +0 -7
- package/dist/esm/chunks/chunk.RH4E52PS.js.map +0 -7
- package/dist/esm/chunks/chunk.SZNMBPMR.js +0 -7
- package/dist/esm/chunks/chunk.SZNMBPMR.js.map +0 -7
- package/dist/esm/chunks/chunk.WPJEXVHM.js +0 -7
- package/dist/esm/chunks/chunk.XY3WCDVX.js +0 -7
- package/dist/esm/chunks/chunk.XY3WCDVX.js.map +0 -7
- /package/dist/esm/chunks/{chunk.K55FBLTW.js.map → chunk.2GDEYC4V.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HGGP6G7L.js.map → chunk.43RHBWGI.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZWL2Q7E6.js.map → chunk.45KYMP5J.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KNVCEYY2.js.map → chunk.5E2BG6O3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2VWASAUU.js.map → chunk.AIUIUCZH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AD4NVLFA.js.map → chunk.COS4RDZB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.O7IKUHRR.js.map → chunk.RD7SYOAI.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4HWB754J.js.map → chunk.UQTJSPU4.js.map} +0 -0
package/custom-elements.json
CHANGED
|
@@ -35118,6 +35118,20 @@
|
|
|
35118
35118
|
},
|
|
35119
35119
|
"privacy": "private"
|
|
35120
35120
|
},
|
|
35121
|
+
{
|
|
35122
|
+
"kind": "method",
|
|
35123
|
+
"name": "initialize",
|
|
35124
|
+
"privacy": "public",
|
|
35125
|
+
"return": {
|
|
35126
|
+
"type": {
|
|
35127
|
+
"text": "void"
|
|
35128
|
+
}
|
|
35129
|
+
},
|
|
35130
|
+
"inheritedFrom": {
|
|
35131
|
+
"name": "BaseDatePickerFoundation",
|
|
35132
|
+
"module": "date-picker/base/base-date-picker-foundation.ts"
|
|
35133
|
+
}
|
|
35134
|
+
},
|
|
35121
35135
|
{
|
|
35122
35136
|
"kind": "method",
|
|
35123
35137
|
"name": "_initializeState",
|
|
@@ -36138,20 +36152,6 @@
|
|
|
36138
36152
|
"module": "date-picker/base/base-date-picker-foundation.ts"
|
|
36139
36153
|
}
|
|
36140
36154
|
},
|
|
36141
|
-
{
|
|
36142
|
-
"kind": "method",
|
|
36143
|
-
"name": "initialize",
|
|
36144
|
-
"privacy": "public",
|
|
36145
|
-
"return": {
|
|
36146
|
-
"type": {
|
|
36147
|
-
"text": "void"
|
|
36148
|
-
}
|
|
36149
|
-
},
|
|
36150
|
-
"inheritedFrom": {
|
|
36151
|
-
"name": "BaseDatePickerFoundation",
|
|
36152
|
-
"module": "date-picker/base/base-date-picker-foundation.ts"
|
|
36153
|
-
}
|
|
36154
|
-
},
|
|
36155
36155
|
{
|
|
36156
36156
|
"kind": "method",
|
|
36157
36157
|
"name": "disconnect",
|
|
@@ -52240,7 +52240,7 @@
|
|
|
52240
52240
|
{
|
|
52241
52241
|
"name": "options",
|
|
52242
52242
|
"type": {
|
|
52243
|
-
"text": "IMenuOption
|
|
52243
|
+
"text": "Array<IMenuOption | IMenuOptionGroup>"
|
|
52244
52244
|
}
|
|
52245
52245
|
}
|
|
52246
52246
|
]
|
|
@@ -53285,6 +53285,24 @@
|
|
|
53285
53285
|
},
|
|
53286
53286
|
"privacy": "private"
|
|
53287
53287
|
},
|
|
53288
|
+
{
|
|
53289
|
+
"kind": "method",
|
|
53290
|
+
"name": "_flattenOptions",
|
|
53291
|
+
"privacy": "private",
|
|
53292
|
+
"return": {
|
|
53293
|
+
"type": {
|
|
53294
|
+
"text": "IMenuOption[]"
|
|
53295
|
+
}
|
|
53296
|
+
},
|
|
53297
|
+
"parameters": [
|
|
53298
|
+
{
|
|
53299
|
+
"name": "options",
|
|
53300
|
+
"type": {
|
|
53301
|
+
"text": "Array<IMenuOption | IMenuOptionGroup>"
|
|
53302
|
+
}
|
|
53303
|
+
}
|
|
53304
|
+
]
|
|
53305
|
+
},
|
|
53288
53306
|
{
|
|
53289
53307
|
"kind": "method",
|
|
53290
53308
|
"name": "_onTargetClick",
|
|
@@ -56579,9 +56597,9 @@
|
|
|
56579
56597
|
},
|
|
56580
56598
|
{
|
|
56581
56599
|
"kind": "field",
|
|
56582
|
-
"name": "
|
|
56600
|
+
"name": "_rangeLabelCallback",
|
|
56583
56601
|
"type": {
|
|
56584
|
-
"text": "
|
|
56602
|
+
"text": "PaginatorRangeLabelBuilder"
|
|
56585
56603
|
},
|
|
56586
56604
|
"privacy": "private"
|
|
56587
56605
|
},
|
|
@@ -57083,6 +57101,14 @@
|
|
|
57083
57101
|
"text": "PaginatorAlternativeAlignment"
|
|
57084
57102
|
},
|
|
57085
57103
|
"privacy": "public"
|
|
57104
|
+
},
|
|
57105
|
+
{
|
|
57106
|
+
"kind": "field",
|
|
57107
|
+
"name": "rangeLabelCallback",
|
|
57108
|
+
"type": {
|
|
57109
|
+
"text": "PaginatorRangeLabelBuilder"
|
|
57110
|
+
},
|
|
57111
|
+
"privacy": "public"
|
|
57086
57112
|
}
|
|
57087
57113
|
]
|
|
57088
57114
|
}
|
|
@@ -57213,6 +57239,14 @@
|
|
|
57213
57239
|
},
|
|
57214
57240
|
"privacy": "public"
|
|
57215
57241
|
},
|
|
57242
|
+
{
|
|
57243
|
+
"kind": "field",
|
|
57244
|
+
"name": "rangeLabelCallback",
|
|
57245
|
+
"type": {
|
|
57246
|
+
"text": "PaginatorRangeLabelBuilder"
|
|
57247
|
+
},
|
|
57248
|
+
"privacy": "public"
|
|
57249
|
+
},
|
|
57216
57250
|
{
|
|
57217
57251
|
"kind": "method",
|
|
57218
57252
|
"name": "focus",
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a,b,c,d,e}from"../chunks/chunk.
|
|
6
|
+
import{a,b,c,d,e}from"../chunks/chunk.2GDEYC4V.js";import"../chunks/chunk.DPZU5F27.js";import"../chunks/chunk.7IHNVPY5.js";import"../chunks/chunk.4DAIIJ37.js";import"../chunks/chunk.MZLPUI6R.js";import"../chunks/chunk.IWICN773.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SKLCDWYQ.js";import"../chunks/chunk.2KXSGD3S.js";import"../chunks/chunk.FVRSGKJD.js";import"../chunks/chunk.U6WGJELL.js";import"../chunks/chunk.7XFU2W25.js";import"../chunks/chunk.Y66GSZJB.js";import"../chunks/chunk.BESB4RGK.js";import"../chunks/chunk.5KC43VFL.js";import"../chunks/chunk.KTGSZEAG.js";import"../chunks/chunk.QOA2O575.js";import"../chunks/chunk.HOXFK44F.js";import"../chunks/chunk.4LA6HEA7.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.MCIQXNKY.js";export{b as ACCORDION_CONSTANTS,a as AccordionAdapter,d as AccordionComponent,c as AccordionFoundation,e as defineAccordionComponent};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a,b,c,d,e}from"../../chunks/chunk.
|
|
6
|
+
import{a,b,c,d,e}from"../../chunks/chunk.UQTJSPU4.js";import"../../chunks/chunk.Y7YPNMPI.js";import"../../chunks/chunk.D43PPRFO.js";import"../../chunks/chunk.WOTVTBJS.js";import"../../chunks/chunk.K7HRCGML.js";import"../../chunks/chunk.FZQCBRPK.js";import"../../chunks/chunk.SXTM6OK4.js";import"../../chunks/chunk.DYF2MREZ.js";import"../../chunks/chunk.6YPD6CQM.js";import"../../chunks/chunk.JD4APKZS.js";import"../../chunks/chunk.BL4IBI6G.js";import"../../chunks/chunk.V4TCOZLK.js";import"../../chunks/chunk.4DAIIJ37.js";import"../../chunks/chunk.3C44DXZ2.js";import"../../chunks/chunk.RLWX5BFQ.js";import"../../chunks/chunk.4CWMNWZU.js";import"../../chunks/chunk.2DXG2R3M.js";import"../../chunks/chunk.F3MP6AXF.js";import"../../chunks/chunk.MZLPUI6R.js";import"../../chunks/chunk.73GVVX4K.js";import"../../chunks/chunk.3IXTRC6Z.js";import"../../chunks/chunk.YI4JTY4T.js";import"../../chunks/chunk.3KQL7VAZ.js";import"../../chunks/chunk.IWICN773.js";import"../../chunks/chunk.6KTLOA7V.js";import"../../chunks/chunk.U6FJJGO3.js";import"../../chunks/chunk.SKLCDWYQ.js";import"../../chunks/chunk.2KXSGD3S.js";import"../../chunks/chunk.FVRSGKJD.js";import"../../chunks/chunk.U6WGJELL.js";import"../../chunks/chunk.7XFU2W25.js";import"../../chunks/chunk.Y66GSZJB.js";import"../../chunks/chunk.BESB4RGK.js";import"../../chunks/chunk.5KC43VFL.js";import"../../chunks/chunk.KTGSZEAG.js";import"../../chunks/chunk.QOA2O575.js";import"../../chunks/chunk.HOXFK44F.js";import"../../chunks/chunk.4LA6HEA7.js";import"../../chunks/chunk.J2M2MXP2.js";import"../../chunks/chunk.MCIQXNKY.js";export{c as APP_BAR_HELP_BUTTON_CONSTANTS,a as AppBarHelpButtonAdapter,d as AppBarHelpButtonComponent,b as AppBarHelpButtonFoundation,e as defineAppBarHelpButtonComponent};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a,b,c,d,e,f as I}from"../chunks/chunk.SAQSXX2T.js";import{a as t,b as u,c as v,d as w,e as x}from"../chunks/chunk.
|
|
6
|
+
import{a,b,c,d,e,f as I}from"../chunks/chunk.SAQSXX2T.js";import{a as t,b as u,c as v,d as w,e as x}from"../chunks/chunk.UQTJSPU4.js";import"../chunks/chunk.Y7YPNMPI.js";import"../chunks/chunk.D43PPRFO.js";import"../chunks/chunk.WOTVTBJS.js";import"../chunks/chunk.K7HRCGML.js";import"../chunks/chunk.FZQCBRPK.js";import"../chunks/chunk.SXTM6OK4.js";import"../chunks/chunk.DYF2MREZ.js";import"../chunks/chunk.6YPD6CQM.js";import"../chunks/chunk.JD4APKZS.js";import"../chunks/chunk.BL4IBI6G.js";import"../chunks/chunk.V4TCOZLK.js";import"../chunks/chunk.4DAIIJ37.js";import{a as l,b as m,c as n}from"../chunks/chunk.XTMXGKUO.js";import{a as o,b as p,c as q,d as r,e as s}from"../chunks/chunk.AZFF62ZK.js";import"../chunks/chunk.76PI42C5.js";import{a as D,b as E,c as F,d as G,e as H}from"../chunks/chunk.JCDIPDQR.js";import{a as y,b as z,c as A,d as B,e as C}from"../chunks/chunk.TH7RLTJK.js";import"../chunks/chunk.ZCQO3N25.js";import"../chunks/chunk.EMV7JGHB.js";import"../chunks/chunk.AVKCWA7I.js";import"../chunks/chunk.BJZ7RB5F.js";import"../chunks/chunk.CE6NTUWI.js";import"../chunks/chunk.3C44DXZ2.js";import"../chunks/chunk.RLWX5BFQ.js";import"../chunks/chunk.4CWMNWZU.js";import"../chunks/chunk.2DXG2R3M.js";import"../chunks/chunk.F3MP6AXF.js";import{a as f,b as g,c as h,d as i,e as j,f as k}from"../chunks/chunk.42QTJZSF.js";import"../chunks/chunk.MZLPUI6R.js";import"../chunks/chunk.73GVVX4K.js";import"../chunks/chunk.3IXTRC6Z.js";import"../chunks/chunk.YI4JTY4T.js";import"../chunks/chunk.3KQL7VAZ.js";import"../chunks/chunk.IWICN773.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SKLCDWYQ.js";import"../chunks/chunk.2KXSGD3S.js";import"../chunks/chunk.FVRSGKJD.js";import"../chunks/chunk.U6WGJELL.js";import"../chunks/chunk.7XFU2W25.js";import"../chunks/chunk.Y66GSZJB.js";import"../chunks/chunk.BESB4RGK.js";import"../chunks/chunk.5KC43VFL.js";import"../chunks/chunk.KTGSZEAG.js";import"../chunks/chunk.QOA2O575.js";import"../chunks/chunk.HOXFK44F.js";import"../chunks/chunk.4LA6HEA7.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.MCIQXNKY.js";export{b as APP_BAR_CONSTANTS,v as APP_BAR_HELP_BUTTON_CONSTANTS,l as APP_BAR_MENU_BUTTON_CONSTANTS,p as APP_BAR_NOTIFICATION_BUTTON_CONSTANTS,D as APP_BAR_PROFILE_BUTTON_CONSTANTS,f as APP_BAR_SEARCH_CONSTANTS,c as AppBarAdapter,e as AppBarComponent,d as AppBarFoundation,t as AppBarHelpButtonAdapter,w as AppBarHelpButtonComponent,u as AppBarHelpButtonFoundation,m as AppBarMenuButtonComponent,o as AppBarNotificationButtonAdapter,r as AppBarNotificationButtonComponent,q as AppBarNotificationButtonFoundation,E as AppBarProfileButtonAdapter,G as AppBarProfileButtonComponent,F as AppBarProfileButtonFoundation,i as AppBarSearchAdapter,j as AppBarSearchComponent,h as AppBarSearchFoundation,g as DEFAULT_COMBINED_OPTIONS,y as PROFILE_CARD_CONSTANTS,z as ProfileCardAdapter,B as ProfileCardComponent,A as ProfileCardFoundation,I as defineAppBarComponent,x as defineAppBarHelpButtonComponent,n as defineAppBarMenuButtonComponent,s as defineAppBarNotificationButtonComponent,H as defineAppBarProfileButtonComponent,k as defineAppBarSearchComponent,C as defineProfileCardComponent,a as elementName};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{A as oa,B as pa,C as qa,D as ra,E as sa,F as ta,G as wa,a as Q,b as R,c as S,d as T,e as U,f as V,g as W,h as X,i as Y,j as Z,k as _,l as $,m as aa,n as ba,o as ca,p as da,q as ea,r as fa,s as ga,t as ha,u as ia,v as ja,w as ka,x as la,y as ma,z as na}from"../chunks/chunk.
|
|
6
|
+
import{A as oa,B as pa,C as qa,D as ra,E as sa,F as ta,G as wa,a as Q,b as R,c as S,d as T,e as U,f as V,g as W,h as X,i as Y,j as Z,k as _,l as $,m as aa,n as ba,o as ca,p as da,q as ea,r as fa,s as ga,t as ha,u as ia,v as ja,w as ka,x as la,y as ma,z as na}from"../chunks/chunk.PWHMNJ5Y.js";import{A as M,B as N,C as O,D as P,E as ua,F as va,a as l,b as m,c as n,d as o,e as p,f as q,g as r,h as s,i as t,j as u,k as w,l as x,m as y,n as z,o as A,p as B,q as C,r as D,s as E,t as F,u as G,v as H,w as I,x as J,y as K,z as L}from"../chunks/chunk.44WDRTRR.js";import{a,b,c,d,e,f,g,h,i,j,k}from"../chunks/chunk.PADHAJLS.js";import{a as v}from"../chunks/chunk.YPZNIYQL.js";import"../chunks/chunk.6YPD6CQM.js";import"../chunks/chunk.4DAIIJ37.js";import"../chunks/chunk.CE6NTUWI.js";import"../chunks/chunk.3C44DXZ2.js";import"../chunks/chunk.RLWX5BFQ.js";import"../chunks/chunk.4CWMNWZU.js";import"../chunks/chunk.2DXG2R3M.js";import"../chunks/chunk.F3MP6AXF.js";import"../chunks/chunk.MZLPUI6R.js";import"../chunks/chunk.73GVVX4K.js";import"../chunks/chunk.3IXTRC6Z.js";import"../chunks/chunk.YI4JTY4T.js";import"../chunks/chunk.3KQL7VAZ.js";import"../chunks/chunk.IWICN773.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SKLCDWYQ.js";import"../chunks/chunk.2KXSGD3S.js";import"../chunks/chunk.FVRSGKJD.js";import"../chunks/chunk.U6WGJELL.js";import"../chunks/chunk.7XFU2W25.js";import"../chunks/chunk.Y66GSZJB.js";import"../chunks/chunk.BESB4RGK.js";import"../chunks/chunk.5KC43VFL.js";import"../chunks/chunk.KTGSZEAG.js";import"../chunks/chunk.QOA2O575.js";import"../chunks/chunk.HOXFK44F.js";import"../chunks/chunk.4LA6HEA7.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.MCIQXNKY.js";export{l as CALENDAR_CONSTANTS,ua as CALENDAR_DROPDOWN_CONSTANTS,a as CALENDAR_MENU_CONSTANTS,qa as CalendarAdapter,sa as CalendarComponent,ta as CalendarComponentDelegate,va as CalendarDropdown,ra as CalendarFoundation,h as CalendarMenuAdapter,j as CalendarMenuComponent,i as CalendarMenuFoundation,n as CalendarMonthFocus,v as DateRange,m as DayOfWeek,oa as coerceDateFromValue,wa as defineCalendarComponent,k as defineCalendarMenuComponent,N as eventIncludesDate,O as eventIncludesElement,J as getAccessibleHeader,ia as getAllYearOptions,L as getClearButton,B as getDateElement,x as getDateId,$ as getDateRangeFromDates,A as getDateRow,C as getDateSpacerElement,aa as getDatesFromDateRange,ca as getDatesInRange,z as getDayElement,w as getDayId,da as getEventDescriptions,E as getEventElement,D as getEventWrapperElement,y as getEventWrapperId,ma as getEventsOnDate,S as getFirstDateOfWeek,U as getFirstDayOfMonth,s as getFirstDayOfWeekForLocale,K as getFooter,b as getGrid,c as getGridItems,G as getHeader,la as getIndexOfDate,T as getLastDateOfWeek,d as getList,e as getListItems,p as getLocalizedDayOfMonth,o as getLocalizedDayOfWeek,q as getLocalizedMonth,r as getLocalizedYear,ba as getMinAndMaxDates,H as getMonthButtonContent,Q as getMonthDates,ga as getMonthOptions,na as getMultipleFromRange,f as getScrollSpy,V as getSortedDaysOfWeek,M as getTodayButton,F as getTooltip,R as getWeekDates,t as getWeekendDaysForLocale,I as getYearButtonContent,ha as getYearOptions,ka as isDisabled,X as isInMonth,Y as isInRange,u as isRtlLocale,ja as isSelected,W as isToday,ea as parseDateOffset,fa as parseYearRange,g as removeAllExceptLastChild,P as setTabindexOnElement,pa as shouldHandleEvent,Z as sortDates,_ as splitIntoWeeks};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as o,d as f}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as o,d as f}from"./chunk.DPZU5F27.js";import{a as C}from"./chunk.5KC43VFL.js";import{a as u}from"./chunk.KTGSZEAG.js";import{a as E,b as v}from"./chunk.QOA2O575.js";import{a as d,l as h}from"./chunk.HOXFK44F.js";import{b as m}from"./chunk.4LA6HEA7.js";import{f as c}from"./chunk.MCIQXNKY.js";var a=class extends C{constructor(e){super(e)}getHostElement(){return this._component}isNestedPanel(e){return!e||!this._component.contains(e)?!1:m(e,this._component).some(t=>t.tagName.toLocaleLowerCase()===o.elementName)}getChildPanels(e){return e?Array.from(this._component.querySelectorAll(e)):Array.from(this._component.children).filter(t=>t.tagName.toLocaleLowerCase()===o.elementName)}addEventListener(e,n,t,l){t.addEventListener(e,n,l||!1)}removeEventListener(e,n,t){t.removeEventListener(e,n)}};var _=`${v}accordion`,b={PANEL_SELECTOR:"panel-selector"},r={elementName:_,attributes:b};var s=class{constructor(e){this._adapter=e}initialize(){this._attachListeners()}disconnect(){this._detachListeners()}_attachListeners(){this._hostInteractionCallback=e=>this._hostInteraction(e),this._adapter.addEventListener(o.events.TOGGLE,this._hostInteractionCallback,this._adapter.getHostElement())}_detachListeners(){this._hostInteractionCallback&&(this._adapter.removeEventListener(o.events.TOGGLE,this._hostInteractionCallback,this._adapter.getHostElement()),this._hostInteractionCallback=void 0)}_hostInteraction(e){switch(e.type){case o.events.TOGGLE:if(e.detail){e.stopPropagation();let n=e.target;if(this._adapter.isNestedPanel(n))return;this._adapter.getChildPanels(this._panelSelector).forEach(t=>{n!==t&&!this._adapter.isNestedPanel(t)&&(t.open=!1)})}break;default:break}}get panelSelector(){return this._panelSelector}set panelSelector(e){this._panelSelector!==e&&(this._panelSelector=e,this._adapter.setHostAttribute(r.attributes.PANEL_SELECTOR,this._panelSelector))}};var i=class extends h{constructor(){super();this._foundation=new s(new a(this))}static get observedAttributes(){return[r.attributes.PANEL_SELECTOR]}initializedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(n,t,l){switch(n){case r.attributes.PANEL_SELECTOR:this.panelSelector=l;break}}};c([u()],i.prototype,"panelSelector",2),i=c([E({name:r.elementName,dependencies:[f]})],i);function X(){d(i)}export{a,r as b,s as c,i as d,X as e};
|
|
7
|
+
//# sourceMappingURL=chunk.2GDEYC4V.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as h,v as i,x as k}from"./chunk.4E4ZOFQI.js";import{a as L}from"./chunk.5KC43VFL.js";import{a as c}from"./chunk.KTGSZEAG.js";import{a as O}from"./chunk.QOA2O575.js";import{a as C,e as y,g as I,l as E}from"./chunk.HOXFK44F.js";import{k as b,l as S,p as w}from"./chunk.J2M2MXP2.js";import{f as d}from"./chunk.MCIQXNKY.js";var r=class{static observe(t,e,l){var a,o;r._targets.has(t)&&((a=r._observer)===null||a===void 0||a.unobserve(t)),r._targets.set(t,e),r._countTargets(),(o=r._observer)===null||o===void 0||o.observe(t,l)}static unobserve(t){var e;r._targets.delete(t),(e=r._observer)===null||e===void 0||e.unobserve(t),r._countTargets()}static _countTargets(){r._observer?r._targets.size<1&&(r._observer=void 0):r._targets.size&&(r._observer=new ResizeObserver(r._handleResize))}};r._targets=new Map;r._handleResize=f=>{f.forEach(t=>{var e;(e=r._targets.get(t.target))===null||e===void 0||e(t)})};var v=class extends L{constructor(e){super(e);this._root=I(e,i.selectors.ROOT)}registerSlotListener(e){this._root.addEventListener("slotchange",e)}registerDidOpenListener(e){this._root.addEventListener(h.events.DID_OPEN,e)}registerDidCloseListener(e){this._root.addEventListener(h.events.DID_CLOSE,e)}observeResize(e){r.observe(this._root,e)}unobserveResize(){r.unobserve(this._root)}getSlottedPanels(){let e=this._component.querySelectorAll(i.selectors.PANEL);return Array.from(e).filter(o=>o.parentElement===this._component)}refitSlottedPanels(e){let l=e==="horizontal"?this._root.clientWidth:this._root.clientHeight,a=this.getSlottedPanels(),o=a.map(p=>{var m;let n=(m=p.shadowRoot)==null?void 0:m.querySelector(h.selectors.ROOT),u=e==="horizontal"?n==null?void 0:n.clientWidth:n==null?void 0:n.clientHeight;return u!=null?u:0}).reduce((p,n)=>p+n,0);if(o<=l)return;let _=o-l;a.slice().reverse().forEach(p=>{if(_<=0)return;let n=p.getContentSize(),u=p.getCollapsibleSize(),m=Math.min(_,u),T=n-m;p.setContentSize(T),_-=m})}};var g=class{constructor(t){this._adapter=t;this._orientation="horizontal";this._disabled=!1;this._allowClose=!1;this._autoClose=!1;this._autoCloseThreshold=0;this._isInitialized=!1;this._slotListener=e=>this._onSlotChange(e),this._didOpenListener=()=>this._onDidOpen(),this._didCloseListener=()=>this._onDidClose(),this._resizeObserverCallback=w(e=>this._onResize(e),i.numbers.RESIZE_THROTTLE_THRESHOLD)}initialize(){this._adapter.registerSlotListener(this._slotListener),this._adapter.registerDidOpenListener(this._didOpenListener),this._adapter.registerDidCloseListener(this._didCloseListener),this._adapter.observeResize(this._resizeObserverCallback),this._applyOrientation(),this._isInitialized=!0}disconnect(){this._adapter.unobserveResize()}_onSlotChange(t){this._layoutSlottedPanels(),this.update({accessibility:!0,cursor:!0,orientation:this._orientation})}_onDidOpen(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onDidClose(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onResize(t){this.update({accessibility:!0,cursor:!0,size:!0})}_layoutSlottedPanels(){let t=this._adapter.getSlottedPanels();t.length<2||t.some(e=>e.resizable!=="off")||t.slice(1).forEach(e=>e.resizable="start")}get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._applyOrientation())}_applyOrientation(){this._adapter.setHostAttribute(i.attributes.ORIENTATION,this._orientation),this.update({orientation:this._orientation}),this._isInitialized&&this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0})}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled),this.update({properties:{disabled:this._disabled}})}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,this._allowClose),this.update({properties:{allowClose:this._allowClose}})}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,this._autoClose),this.update({properties:{autoClose:this._autoClose}})}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){this._adapter.setHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,this._autoCloseThreshold.toString()),this.update({properties:{autoCloseThreshold:this._autoCloseThreshold}})}layerSlottedPanels(t){let e=this._adapter.getSlottedPanels(),l=t.resizable==="start"?1:-1,a=t.resizable==="start"?1:3;e.forEach(o=>{(o===t||a===2)&&(a+=l),o.style.setProperty(i.customCssProperties.ANIMATING_LAYER,a.toString())})}unlayerSlottedPanels(){this._adapter.getSlottedPanels().forEach(e=>{e.style.removeProperty(i.customCssProperties.ANIMATING_LAYER)})}update(t){this._adapter.getSlottedPanels().forEach(l=>{l.update(t)})}refitSlottedPanels(){this._adapter.refitSlottedPanels(this._orientation)}};var P='<template><div class="forge-split-view" id="root" part="root"><slot></slot></div></template>',A='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view{display:-webkit-box;display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden;contain:paint size}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}:host([orientation=vertical]) .forge-split-view{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}',s=class extends E{constructor(){super();y(this,P,A),this._foundation=new g(new v(this))}static get observedAttributes(){return[i.attributes.ORIENTATION,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,l,a){switch(e){case i.attributes.ORIENTATION:this.orientation=a;break;case i.attributes.DISABLED:this.disabled=b(a);break;case i.attributes.ALLOW_CLOSE:this.allowClose=b(a);break;case i.attributes.AUTO_CLOSE:this.autoClose=b(a);break;case i.attributes.AUTO_CLOSE_THRESHOLD:this.autoCloseThreshold=S(a);break}}layerSlottedPanels(e){this._foundation.layerSlottedPanels(e)}unlayerSlottedPanels(){this._foundation.unlayerSlottedPanels()}update(e){this._foundation.update(e)}refit(){this._foundation.refitSlottedPanels()}};d([c()],s.prototype,"orientation",2),d([c()],s.prototype,"disabled",2),d([c()],s.prototype,"allowClose",2),d([c()],s.prototype,"autoClose",2),d([c()],s.prototype,"autoCloseThreshold",2),s=d([O({name:i.elementName,dependencies:[k]})],s);function de(){C(s)}export{v as a,g as b,s as c,de as d};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as h,v as i,x as k}from"./chunk.TBSCULSM.js";import{a as L}from"./chunk.5KC43VFL.js";import{a as c}from"./chunk.KTGSZEAG.js";import{a as O}from"./chunk.QOA2O575.js";import{a as C,e as y,g as I,l as E}from"./chunk.HOXFK44F.js";import{k as b,l as S,p as w}from"./chunk.J2M2MXP2.js";import{f as d}from"./chunk.MCIQXNKY.js";var r=class{static observe(t,e,l){var a,o;r._targets.has(t)&&((a=r._observer)===null||a===void 0||a.unobserve(t)),r._targets.set(t,e),r._countTargets(),(o=r._observer)===null||o===void 0||o.observe(t,l)}static unobserve(t){var e;r._targets.delete(t),(e=r._observer)===null||e===void 0||e.unobserve(t),r._countTargets()}static _countTargets(){r._observer?r._targets.size<1&&(r._observer=void 0):r._targets.size&&(r._observer=new ResizeObserver(r._handleResize))}};r._targets=new Map;r._handleResize=f=>{f.forEach(t=>{var e;(e=r._targets.get(t.target))===null||e===void 0||e(t)})};var v=class extends L{constructor(e){super(e);this._root=I(e,i.selectors.ROOT)}registerSlotListener(e){this._root.addEventListener("slotchange",e)}registerDidOpenListener(e){this._root.addEventListener(h.events.DID_OPEN,e)}registerDidCloseListener(e){this._root.addEventListener(h.events.DID_CLOSE,e)}observeResize(e){r.observe(this._root,e)}unobserveResize(){r.unobserve(this._root)}getSlottedPanels(){let e=this._component.querySelectorAll(i.selectors.PANEL);return Array.from(e).filter(o=>o.parentElement===this._component)}refitSlottedPanels(e){let l=e==="horizontal"?this._root.clientWidth:this._root.clientHeight,a=this.getSlottedPanels(),o=a.map(p=>{var m;let n=(m=p.shadowRoot)==null?void 0:m.querySelector(h.selectors.ROOT),u=e==="horizontal"?n==null?void 0:n.clientWidth:n==null?void 0:n.clientHeight;return u!=null?u:0}).reduce((p,n)=>p+n,0);if(o<=l)return;let _=o-l;a.slice().reverse().forEach(p=>{if(_<=0)return;let n=p.getContentSize(),u=p.getCollapsibleSize(),m=Math.min(_,u),T=n-m;p.setContentSize(T),_-=m})}};var g=class{constructor(t){this._adapter=t;this._orientation="horizontal";this._disabled=!1;this._allowClose=!1;this._autoClose=!1;this._autoCloseThreshold=0;this._isInitialized=!1;this._slotListener=e=>this._onSlotChange(e),this._didOpenListener=()=>this._onDidOpen(),this._didCloseListener=()=>this._onDidClose(),this._resizeObserverCallback=w(e=>this._onResize(e),i.numbers.RESIZE_THROTTLE_THRESHOLD)}initialize(){this._adapter.registerSlotListener(this._slotListener),this._adapter.registerDidOpenListener(this._didOpenListener),this._adapter.registerDidCloseListener(this._didCloseListener),this._adapter.observeResize(this._resizeObserverCallback),this._applyOrientation(),this._isInitialized=!0}disconnect(){this._adapter.unobserveResize()}_onSlotChange(t){this._layoutSlottedPanels(),this.update({accessibility:!0,cursor:!0,orientation:this._orientation})}_onDidOpen(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onDidClose(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onResize(t){this.update({accessibility:!0,cursor:!0,size:!0})}_layoutSlottedPanels(){let t=this._adapter.getSlottedPanels();t.length<2||t.some(e=>e.resizable!=="off")||t.slice(1).forEach(e=>e.resizable="start")}get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._applyOrientation())}_applyOrientation(){this._adapter.setHostAttribute(i.attributes.ORIENTATION,this._orientation),this.update({orientation:this._orientation}),this._isInitialized&&this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0})}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled),this.update({properties:{disabled:this._disabled}})}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,this._allowClose),this.update({properties:{allowClose:this._allowClose}})}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,this._autoClose),this.update({properties:{autoClose:this._autoClose}})}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){this._adapter.setHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,this._autoCloseThreshold.toString()),this.update({properties:{autoCloseThreshold:this._autoCloseThreshold}})}layerSlottedPanels(t){let e=this._adapter.getSlottedPanels(),l=t.resizable==="start"?1:-1,a=t.resizable==="start"?1:3;e.forEach(o=>{(o===t||a===2)&&(a+=l),o.style.setProperty(i.customCssProperties.ANIMATING_LAYER,a.toString())})}unlayerSlottedPanels(){this._adapter.getSlottedPanels().forEach(e=>{e.style.removeProperty(i.customCssProperties.ANIMATING_LAYER)})}update(t){this._adapter.getSlottedPanels().forEach(l=>{l.update(t)})}refitSlottedPanels(){this._adapter.refitSlottedPanels(this._orientation)}};var P='<template><div class="forge-split-view" id="root" part="root"><slot></slot></div></template>',A='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view{display:-webkit-box;display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden;contain:paint size}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}:host([orientation=vertical]) .forge-split-view{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}',s=class extends E{constructor(){super();y(this,P,A),this._foundation=new g(new v(this))}static get observedAttributes(){return[i.attributes.ORIENTATION,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,l,a){switch(e){case i.attributes.ORIENTATION:this.orientation=a;break;case i.attributes.DISABLED:this.disabled=b(a);break;case i.attributes.ALLOW_CLOSE:this.allowClose=b(a);break;case i.attributes.AUTO_CLOSE:this.autoClose=b(a);break;case i.attributes.AUTO_CLOSE_THRESHOLD:this.autoCloseThreshold=S(a);break}}layerSlottedPanels(e){this._foundation.layerSlottedPanels(e)}unlayerSlottedPanels(){this._foundation.unlayerSlottedPanels()}update(e){this._foundation.update(e)}refit(){this._foundation.refitSlottedPanels()}};d([c()],s.prototype,"orientation",2),d([c()],s.prototype,"disabled",2),d([c()],s.prototype,"allowClose",2),d([c()],s.prototype,"autoClose",2),d([c()],s.prototype,"autoCloseThreshold",2),s=d([O({name:i.elementName,dependencies:[k]})],s);function de(){C(s)}export{v as a,g as b,s as c,de as d};
|
|
7
|
+
//# sourceMappingURL=chunk.43RHBWGI.js.map
|
|
@@ -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 re,f as ce}from"./chunk.YG24YPYO.js";import{a as M,d as ne}from"./chunk.RH4E52PS.js";import{a as R}from"./chunk.4DAIIJ37.js";import{b as te}from"./chunk.MZLPUI6R.js";import{a as ae}from"./chunk.3IXTRC6Z.js";import{a as ie,d as oe,l as se}from"./chunk.IWICN773.js";import{a as Y}from"./chunk.2KXSGD3S.js";import{a as le}from"./chunk.BESB4RGK.js";import{a as U}from"./chunk.5KC43VFL.js";import{a as b}from"./chunk.KTGSZEAG.js";import{a as J,b as ee}from"./chunk.QOA2O575.js";import{a as j,l as Q}from"./chunk.HOXFK44F.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._sortDirection=this._sortedColumnIndex>=0?this._visibleColumnConfigurations[this._sortedColumnIndex].sortDirection:void 0,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 re,f as ce}from"./chunk.YG24YPYO.js";import{a as M,d as ne}from"./chunk.DPZU5F27.js";import{a as R}from"./chunk.4DAIIJ37.js";import{b as te}from"./chunk.MZLPUI6R.js";import{a as ae}from"./chunk.3IXTRC6Z.js";import{a as ie,d as oe,l as se}from"./chunk.IWICN773.js";import{a as Y}from"./chunk.2KXSGD3S.js";import{a as le}from"./chunk.BESB4RGK.js";import{a as U}from"./chunk.5KC43VFL.js";import{a as b}from"./chunk.KTGSZEAG.js";import{a as J,b as ee}from"./chunk.QOA2O575.js";import{a as j,l as Q}from"./chunk.HOXFK44F.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._sortDirection=this._sortedColumnIndex>=0?this._visibleColumnConfigurations[this._sortedColumnIndex].sortDirection:void 0,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.45KYMP5J.js.map
|