@fluid-topics/ft-filterable-table 0.3.40 → 0.3.45
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/build/ft-filterable-table.css.d.ts +1 -0
- package/build/ft-filterable-table.css.js +4 -1
- package/build/ft-filterable-table.d.ts +1 -0
- package/build/ft-filterable-table.js +43 -35
- package/build/ft-filterable-table.light.js +44 -30
- package/build/ft-filterable-table.min.js +46 -32
- package/package.json +6 -6
|
@@ -4,6 +4,7 @@ export declare const FtFilterableTableCssVariables: {
|
|
|
4
4
|
evenRowBackground: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
5
5
|
rowHoverBackground: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
6
6
|
stickyHeaderZIndex: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
7
|
+
cellVerticalBorderWidth: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
7
8
|
colorOnSurfaceHigh: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
8
9
|
titleFont: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
9
10
|
contentFont: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
@@ -7,6 +7,7 @@ export const FtFilterableTableCssVariables = {
|
|
|
7
7
|
evenRowBackground: FtCssVariableFactory.create("--ft-filterable-table-even-row-background", "COLOR", "#fdfdfd"),
|
|
8
8
|
rowHoverBackground: FtCssVariableFactory.create("--ft-filterable-table-row-hover-background", "COLOR", "#fafafa"),
|
|
9
9
|
stickyHeaderZIndex: FtCssVariableFactory.create("--ft-filterable-table-sticky-header-zindex", "NUMBER", "100"),
|
|
10
|
+
cellVerticalBorderWidth: FtCssVariableFactory.create("--ft-filterable-table-cell-vertical-border-width", "SIZE", "1px"),
|
|
10
11
|
colorOnSurfaceHigh: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceHigh, "Design system"),
|
|
11
12
|
titleFont: FtCssVariableFactory.external(designSystemVariables.titleFont, "Design system"),
|
|
12
13
|
contentFont: FtCssVariableFactory.external(designSystemVariables.contentFont, "Design system"),
|
|
@@ -84,7 +85,9 @@ export const styles = css `
|
|
|
84
85
|
|
|
85
86
|
.cell {
|
|
86
87
|
padding: 1rem;
|
|
87
|
-
border-left:
|
|
88
|
+
border-left-color: ${FtFilterableTableCssVariables.headerBackground};
|
|
89
|
+
border-left-style: solid;
|
|
90
|
+
border-left-width: ${FtFilterableTableCssVariables.cellVerticalBorderWidth};
|
|
88
91
|
border-bottom: 1px solid ${FtFilterableTableCssVariables.headerBackground};
|
|
89
92
|
overflow-x: auto;
|
|
90
93
|
display: flex;
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html } from "lit";
|
|
7
|
+
import { html, nothing } from "lit";
|
|
8
8
|
import { property, state } from "lit/decorators.js";
|
|
9
9
|
import { repeat } from "lit/directives/repeat.js";
|
|
10
10
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
@@ -49,33 +49,26 @@ export class FtFilterableTable extends FtLitElement {
|
|
|
49
49
|
${repeat(data, (_, rowIndex) => "row-" + rowIndex, (row, rowIndex) => html `
|
|
50
50
|
<div class="row"
|
|
51
51
|
@click=${() => this.dispatchEvent(new RowClickEvent(row))}>
|
|
52
|
-
${repeat(this.columns, (_, columnIndex) => "cell-" +
|
|
52
|
+
${repeat(this.columns, (_, columnIndex) => "cell-" + columnIndex + "-" + rowIndex, (column, columnIndex) => this.renderCell(column, columnIndex, row, rowIndex))}
|
|
53
53
|
</div>
|
|
54
54
|
`)}
|
|
55
55
|
</div>
|
|
56
56
|
`;
|
|
57
57
|
}
|
|
58
58
|
filterData() {
|
|
59
|
-
|
|
60
|
-
this.filters.forEach((filter, columnIndex) => {
|
|
59
|
+
return this.filters.reduce((data, filter, columnIndex) => {
|
|
61
60
|
var _a;
|
|
62
61
|
const column = this.columns[columnIndex];
|
|
63
|
-
if (filter) {
|
|
62
|
+
if (filter && filter.value) {
|
|
64
63
|
switch ((_a = column.filter) !== null && _a !== void 0 ? _a : "text") {
|
|
65
64
|
case "text":
|
|
66
|
-
|
|
67
|
-
data = data.filter((row) => this.getValueAsString(column, row, columnIndex).toLowerCase().includes(filter.value.toLowerCase()));
|
|
68
|
-
}
|
|
69
|
-
break;
|
|
65
|
+
return data.filter((row) => this.getValueAsString(column, row, columnIndex).toLowerCase().includes(filter.value.toLowerCase()));
|
|
70
66
|
case "select":
|
|
71
|
-
|
|
72
|
-
data = data.filter((row) => this.getValueAsString(column, row, columnIndex) === filter.value);
|
|
73
|
-
}
|
|
74
|
-
break;
|
|
67
|
+
return data.filter((row) => this.getValueAsString(column, row, columnIndex) === filter.value);
|
|
75
68
|
}
|
|
76
69
|
}
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
return data;
|
|
71
|
+
}, this.data);
|
|
79
72
|
}
|
|
80
73
|
sortData(data) {
|
|
81
74
|
var _a;
|
|
@@ -115,15 +108,16 @@ export class FtFilterableTable extends FtLitElement {
|
|
|
115
108
|
"header-cell--sticky": this.stickyHeaders
|
|
116
109
|
};
|
|
117
110
|
return html `
|
|
118
|
-
<div class="${classMap(classes)}"
|
|
111
|
+
<div class="${classMap(classes)}"
|
|
112
|
+
part="${this.columnPart("header-cell", index)}">
|
|
119
113
|
<div class="column-title-container">
|
|
120
|
-
<span class="column-title"
|
|
114
|
+
<span class="column-title"
|
|
115
|
+
part="${this.columnPart("title", index)}">
|
|
116
|
+
${column.title}
|
|
117
|
+
</span>
|
|
121
118
|
${this.renderColumnSort(column, index)}
|
|
122
119
|
</div>
|
|
123
|
-
${column
|
|
124
|
-
<div class="column-filter">
|
|
125
|
-
${this.renderColumnFilter(column, index)}
|
|
126
|
-
</div>` : null}
|
|
120
|
+
${this.renderColumnFilter(column, index)}
|
|
127
121
|
</div>
|
|
128
122
|
`;
|
|
129
123
|
}
|
|
@@ -159,6 +153,7 @@ export class FtFilterableTable extends FtLitElement {
|
|
|
159
153
|
icon="${sortIcon}"
|
|
160
154
|
label="Sort ${column.title}"
|
|
161
155
|
@click=${sort}
|
|
156
|
+
part="${this.columnPart("sort-button", index)}"
|
|
162
157
|
></ft-button>
|
|
163
158
|
`;
|
|
164
159
|
}
|
|
@@ -171,27 +166,37 @@ export class FtFilterableTable extends FtLitElement {
|
|
|
171
166
|
switch ((_a = column.filter) !== null && _a !== void 0 ? _a : "text") {
|
|
172
167
|
case "text":
|
|
173
168
|
return html `
|
|
174
|
-
<
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
169
|
+
<div class="column-filter" part="${this.columnPart("filter-container", index)}">
|
|
170
|
+
<ft-text-field
|
|
171
|
+
label="Search ${column.title}"
|
|
172
|
+
@live-change="${onChange}"
|
|
173
|
+
part="${this.columnPart("filter", index)}"
|
|
174
|
+
></ft-text-field>
|
|
175
|
+
</div>
|
|
178
176
|
`;
|
|
179
177
|
case "select":
|
|
180
178
|
const values = (_b = this.selectData[index]) !== null && _b !== void 0 ? _b : [];
|
|
181
179
|
return values.length ? html `
|
|
182
|
-
<
|
|
183
|
-
<ft-select
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
180
|
+
<div class="column-filter" part="${this.columnPart("filter-container", index)}">
|
|
181
|
+
<ft-select label="Filter ${column.title}"
|
|
182
|
+
@change=${onChange}
|
|
183
|
+
part="${this.columnPart("filter", index)}">
|
|
184
|
+
<ft-select-option></ft-select-option>
|
|
185
|
+
${values.map(v => html `
|
|
186
|
+
<ft-select-option value="${v}" label="${v}"></ft-select-option>
|
|
187
|
+
`)}
|
|
188
|
+
</ft-select>
|
|
189
|
+
</div>
|
|
190
|
+
` : nothing;
|
|
189
191
|
case "date":
|
|
190
192
|
break;
|
|
191
193
|
}
|
|
192
|
-
return
|
|
194
|
+
return nothing;
|
|
193
195
|
}
|
|
194
|
-
|
|
196
|
+
columnPart(prefix, index) {
|
|
197
|
+
return `${prefix} ${prefix}-column-${index}`;
|
|
198
|
+
}
|
|
199
|
+
renderCell(column, columnIndex, row, rowIndex) {
|
|
195
200
|
var _a;
|
|
196
201
|
const renderer = (_a = column.render) !== null && _a !== void 0 ? _a : DEFAULT_RENDER;
|
|
197
202
|
const render = (value) => {
|
|
@@ -199,7 +204,10 @@ export class FtFilterableTable extends FtLitElement {
|
|
|
199
204
|
return typeof rendered === "string" ? unsafeHTML(rendered) : rendered;
|
|
200
205
|
};
|
|
201
206
|
return html `
|
|
202
|
-
<div class="cell"
|
|
207
|
+
<div class="cell"
|
|
208
|
+
part="${this.columnPart("cell", columnIndex)} cell-row-${rowIndex} cell-column-${columnIndex}-row-${rowIndex}">
|
|
209
|
+
${render(this.getValue(column, row))}
|
|
210
|
+
</div>
|
|
203
211
|
`;
|
|
204
212
|
}
|
|
205
213
|
getValue(column, row) {
|
|
@@ -10,7 +10,7 @@ var r;const a=window,p=a.trustedTypes,f=p?p.createPolicy("lit-html",{createHTML:
|
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const H=Symbol.for(""),
|
|
13
|
+
const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t._$litStatic$},K=t=>({_$litStatic$:t,r:H}),L=new Map,P=(t=>(e,...i)=>{const o=i.length;let s,n;const l=[],r=[];let a,p=0,f=!1;for(;p<o;){for(a=e[p];p<o&&void 0!==(n=i[p],s=W(n));)a+=s+e[++p],f=!0;r.push(n),l.push(a),p++}if(p===o&&l.push(e[o]),f){const t=l.join("$$lit$$");void 0===(e=L.get(t))&&(l.raw=l,L.set(t,e=l)),i=r}return t(e,...i)})(z);var V;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(V||(V={}));const G=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),X={fontFamily:q,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},Y=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",G),J=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",X.fontSize,"20px"),Q=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",X.fontWeight,"normal"),tt=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",X.letterSpacing,"0.15px"),et=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",X.lineHeight,"1.2"),it=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",X.textTransform,"inherit"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",G),st=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",X.fontSize,"14px"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",X.fontWeight,"normal"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",X.letterSpacing,"0.105px"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",X.lineHeight,"1.7"),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",X.textTransform,"inherit"),pt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",q),ft=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",X.fontSize,"16px"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",X.fontWeight,"600"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",X.letterSpacing,"0.144px"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",X.lineHeight,"1.5"),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",X.textTransform,"inherit"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",q),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",X.fontSize,"14px"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",X.fontWeight,"normal"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",X.letterSpacing,"0.098px"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",X.lineHeight,"1.7"),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",X.textTransform,"inherit"),$t={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",X.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",X.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",X.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",X.textTransform,"inherit")},wt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",q),kt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",X.fontSize,"14px"),St=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",X.fontWeight,"normal"),zt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",X.letterSpacing,"0.252px"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",X.lineHeight,"1.4"),Ct=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",X.textTransform,"inherit"),Et={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",X.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",X.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",X.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",X.textTransform,"inherit")},Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",q),Bt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",X.fontSize,"10px"),It=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",X.fontWeight,"normal"),jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",X.letterSpacing,"0.33px"),Nt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",X.lineHeight,"1.6"),Ft=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",X.textTransform,"inherit"),At=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",q),Zt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",X.fontSize,"10px"),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",X.fontWeight,"normal"),Rt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",X.letterSpacing,"1.5px"),Mt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",X.lineHeight,"1.6"),_t=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",X.textTransform,"uppercase"),Ut={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",X.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",X.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",X.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",X.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",X.textTransform,"uppercase")},Ht=i.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
15
|
font-family: ${Y};
|
|
16
16
|
font-size: ${J};
|
|
@@ -19,7 +19,7 @@ const H=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
19
19
|
line-height: ${et};
|
|
20
20
|
text-transform: ${it};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,Wt=i.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
24
|
font-family: ${ot};
|
|
25
25
|
font-size: ${st};
|
|
@@ -28,7 +28,7 @@ const H=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
28
28
|
line-height: ${rt};
|
|
29
29
|
text-transform: ${at};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,Kt=i.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
33
|
font-family: ${pt};
|
|
34
34
|
font-size: ${ft};
|
|
@@ -106,13 +106,13 @@ const H=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
106
106
|
vertical-align: inherit;
|
|
107
107
|
}
|
|
108
108
|
`;var Qt=function(t,e,i,o){for(var s,n=arguments.length,l=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(l=(n<3?s(l):n>3?s(e,i,l):s(e,i))||l);return n>3&&l&&Object.defineProperty(e,i,l),l};class te extends e.FtLitElement{constructor(){super(...arguments),this.variant=V.body1}render(){return this.element?P`
|
|
109
|
-
<${
|
|
109
|
+
<${K(this.element)}
|
|
110
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
111
111
|
<slot></slot>
|
|
112
|
-
</${
|
|
112
|
+
</${K(this.element)}>
|
|
113
113
|
`:P`
|
|
114
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}te.styles=[Ht,Kt,
|
|
115
|
+
`}}te.styles=[Ht,Wt,Kt,Lt,Pt,Vt,Gt,qt,Xt,Yt,Jt],Qt([o.property()],te.prototype,"element",void 0),Qt([o.property()],te.prototype,"variant",void 0),e.customElement("ft-typography")(te);const ee={fontSize:e.FtCssVariableFactory.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariableFactory.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:e.FtCssVariableFactory.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariableFactory.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},ie=i.css`
|
|
116
116
|
.ft-input-label {
|
|
117
117
|
position: absolute;
|
|
118
118
|
inset: 0;
|
|
@@ -839,7 +839,7 @@ const H=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
839
839
|
position: relative;
|
|
840
840
|
word-break: break-word;
|
|
841
841
|
}
|
|
842
|
-
`;var
|
|
842
|
+
`;var We=function(t,e,i,o){for(var s,n=arguments.length,l=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(l=(n<3?s(l):n>3?s(e,i,l):s(e,i))||l);return n>3&&l&&Object.defineProperty(e,i,l),l};class Ke extends e.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new e.Debouncer,this.revealDebouncer=new e.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return i.html`
|
|
843
843
|
<div part="container"
|
|
844
844
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
845
845
|
@mouseenter=${this.onHover}
|
|
@@ -857,7 +857,7 @@ const H=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
857
857
|
</div>
|
|
858
858
|
</div>
|
|
859
859
|
</div>
|
|
860
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=e.height,s=o;break;case"left":n=i,s=-this.tooltip.clientWidth;break;case"right":n=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const l=this.tooltip.style;l.left=s+"px",l.top=n+"px",l.maxWidth=`max(${e.width}px, ${Ue})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}
|
|
860
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=e.height,s=o;break;case"left":n=i,s=-this.tooltip.clientWidth;break;case"right":n=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const l=this.tooltip.style;l.left=s+"px",l.top=n+"px",l.maxWidth=`max(${e.width}px, ${Ue})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}Ke.elementDefinitions={"ft-typography":te},Ke.styles=He,We([o.property()],Ke.prototype,"text",void 0),We([o.property({type:Boolean})],Ke.prototype,"manual",void 0),We([o.property({type:Boolean})],Ke.prototype,"inline",void 0),We([o.property({type:Number})],Ke.prototype,"delay",void 0),We([o.property()],Ke.prototype,"position",void 0),We([o.queryAssignedNodes("",!0)],Ke.prototype,"slotNodes",void 0),We([o.query(".ft-tooltip--container")],Ke.prototype,"container",void 0),We([o.query("slot")],Ke.prototype,"target",void 0),We([o.query(".ft-tooltip")],Ke.prototype,"tooltip",void 0),We([o.query(".ft-tooltip--content")],Ke.prototype,"tooltipContent",void 0),We([o.state()],Ke.prototype,"visible",void 0),e.customElement("ft-tooltip")(Ke);const Le={color:e.FtCssVariableFactory.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Pe=i.css`
|
|
861
861
|
:host {
|
|
862
862
|
line-height: 0;
|
|
863
863
|
}
|
|
@@ -1088,7 +1088,7 @@ const H=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1088
1088
|
</ft-tooltip>
|
|
1089
1089
|
`:t}resolveIcon(){return this.loading?i.html`
|
|
1090
1090
|
<ft-loader></ft-loader> `:this.icon?i.html`
|
|
1091
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:i.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}ei.elementDefinitions={"ft-ripple":be,"ft-tooltip":
|
|
1091
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:i.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}ei.elementDefinitions={"ft-ripple":be,"ft-tooltip":Ke,"ft-typography":te,"ft-icon":we,"ft-loader":Ve},ei.styles=Qe,ti([o.property({type:Boolean})],ei.prototype,"primary",void 0),ti([o.property({type:Boolean})],ei.prototype,"outlined",void 0),ti([o.property({type:Boolean})],ei.prototype,"disabled",void 0),ti([o.property({type:Boolean})],ei.prototype,"dense",void 0),ti([o.property({type:Boolean})],ei.prototype,"round",void 0),ti([o.property({type:String})],ei.prototype,"label",void 0),ti([o.property({type:String})],ei.prototype,"icon",void 0),ti([o.property({type:String})],ei.prototype,"iconVariant",void 0),ti([o.property({type:Boolean})],ei.prototype,"trailingIcon",void 0),ti([o.property({type:Boolean})],ei.prototype,"loading",void 0),ti([o.property({type:String})],ei.prototype,"tooltipPosition",void 0),ti([o.property({type:Boolean})],ei.prototype,"hideTooltip",void 0),ti([o.property({type:Boolean})],ei.prototype,"forceTooltip",void 0),ti([o.query(".ft-button")],ei.prototype,"button",void 0),ti([o.query(".ft-button--label slot")],ei.prototype,"slottedContent",void 0),e.customElement("ft-button")(ei);class ii extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const oi={headerBackground:e.FtCssVariableFactory.create("--ft-filterable-table-header-background","COLOR","whitesmoke"),oddRowBackground:e.FtCssVariableFactory.create("--ft-filterable-table-odd-row-background","COLOR","#FFFFFF"),evenRowBackground:e.FtCssVariableFactory.create("--ft-filterable-table-even-row-background","COLOR","#fdfdfd"),rowHoverBackground:e.FtCssVariableFactory.create("--ft-filterable-table-row-hover-background","COLOR","#fafafa"),stickyHeaderZIndex:e.FtCssVariableFactory.create("--ft-filterable-table-sticky-header-zindex","NUMBER","100"),cellVerticalBorderWidth:e.FtCssVariableFactory.create("--ft-filterable-table-cell-vertical-border-width","SIZE","1px"),colorOnSurfaceHigh:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceHigh,"Design system"),titleFont:e.FtCssVariableFactory.external(e.designSystemVariables.titleFont,"Design system"),contentFont:e.FtCssVariableFactory.external(e.designSystemVariables.contentFont,"Design system")},si=i.css`
|
|
1092
1092
|
:host {
|
|
1093
1093
|
display: block;
|
|
1094
1094
|
}
|
|
@@ -1160,7 +1160,9 @@ const H=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1160
1160
|
|
|
1161
1161
|
.cell {
|
|
1162
1162
|
padding: 1rem;
|
|
1163
|
-
border-left:
|
|
1163
|
+
border-left-color: ${oi.headerBackground};
|
|
1164
|
+
border-left-style: solid;
|
|
1165
|
+
border-left-width: ${oi.cellVerticalBorderWidth};
|
|
1164
1166
|
border-bottom: 1px solid ${oi.headerBackground};
|
|
1165
1167
|
overflow-x: auto;
|
|
1166
1168
|
display: flex;
|
|
@@ -1209,20 +1211,21 @@ const H=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1209
1211
|
${s.repeat(t,((t,e)=>"row-"+e),((t,e)=>i.html`
|
|
1210
1212
|
<div class="row"
|
|
1211
1213
|
@click=${()=>this.dispatchEvent(new ii(t))}>
|
|
1212
|
-
${s.repeat(this.columns,((t,i)=>"cell-"+
|
|
1214
|
+
${s.repeat(this.columns,((t,i)=>"cell-"+i+"-"+e),((i,o)=>this.renderCell(i,o,t,e)))}
|
|
1213
1215
|
</div>
|
|
1214
1216
|
`))}
|
|
1215
1217
|
</div>
|
|
1216
|
-
`}filterData(){
|
|
1217
|
-
<div class="${l.classMap(o)}"
|
|
1218
|
+
`}filterData(){return this.filters.reduce(((t,e,i)=>{var o;const s=this.columns[i];if(e&&e.value)switch(null!==(o=s.filter)&&void 0!==o?o:"text"){case"text":return t.filter((t=>this.getValueAsString(s,t,i).toLowerCase().includes(e.value.toLowerCase())));case"select":return t.filter((t=>this.getValueAsString(s,t,i)===e.value))}return t}),this.data)}sortData(t){var e;if(this.currentSort){const i=this.columns[this.currentSort.column],o=null!==(e=i.comparator)&&void 0!==e?e:ri,s="asc"===this.currentSort.order?o:(t,e)=>-o(t,e);return t.sort(((t,e)=>s(this.getValue(i,t),this.getValue(i,e))))}return t}update(t){super.update(t),t.has("sort")&&(this.currentSort=this.sort),(t.has("data")||t.has("columns"))&&this.updateSelectData()}updateSelectData(){this.selectData=[];const t=this.data,e=this.columns;for(let i in e){const o=e[i];"select"===o.filter&&(this.selectData[i]=[...new Set(t.map(((t,e)=>this.getValueAsString(o,t,e))))].sort(((t,e)=>t.localeCompare(e))))}this.requestUpdate()}renderHeader(t,e){const o={"header-cell":!0,"header-cell--sticky":this.stickyHeaders};return i.html`
|
|
1219
|
+
<div class="${l.classMap(o)}"
|
|
1220
|
+
part="${this.columnPart("header-cell",e)}">
|
|
1218
1221
|
<div class="column-title-container">
|
|
1219
|
-
<span class="column-title"
|
|
1222
|
+
<span class="column-title"
|
|
1223
|
+
part="${this.columnPart("title",e)}">
|
|
1224
|
+
${t.title}
|
|
1225
|
+
</span>
|
|
1220
1226
|
${this.renderColumnSort(t,e)}
|
|
1221
1227
|
</div>
|
|
1222
|
-
${t
|
|
1223
|
-
<div class="column-filter">
|
|
1224
|
-
${this.renderColumnFilter(t,e)}
|
|
1225
|
-
</div>`:null}
|
|
1228
|
+
${this.renderColumnFilter(t,e)}
|
|
1226
1229
|
</div>
|
|
1227
1230
|
`}renderColumnSort(t,e){var o;const s=this.currentSort&&this.currentSort.column===e,n=s?"asc"===this.currentSort.order?"expand_more":"expand_less":"unfold_more";return i.html`
|
|
1228
1231
|
<ft-button
|
|
@@ -1232,19 +1235,30 @@ const H=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
1232
1235
|
icon="${n}"
|
|
1233
1236
|
label="Sort ${t.title}"
|
|
1234
1237
|
@click=${()=>{var t;s?"asc"===(null===(t=this.currentSort)||void 0===t?void 0:t.order)?this.currentSort={column:e,order:"desc"}:this.currentSort=void 0:this.currentSort={column:e,order:"asc"}}}
|
|
1238
|
+
part="${this.columnPart("sort-button",e)}"
|
|
1235
1239
|
></ft-button>
|
|
1236
1240
|
`}renderColumnFilter(t,e){var o,s;const n=t=>{this.filters[e]={value:t.detail},this.requestUpdate()};switch(null!==(o=t.filter)&&void 0!==o?o:"text"){case"text":return i.html`
|
|
1237
|
-
<
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
+
<div class="column-filter" part="${this.columnPart("filter-container",e)}">
|
|
1242
|
+
<ft-text-field
|
|
1243
|
+
label="Search ${t.title}"
|
|
1244
|
+
@live-change="${n}"
|
|
1245
|
+
part="${this.columnPart("filter",e)}"
|
|
1246
|
+
></ft-text-field>
|
|
1247
|
+
</div>
|
|
1241
1248
|
`;case"select":const o=null!==(s=this.selectData[e])&&void 0!==s?s:[];return o.length?i.html`
|
|
1242
|
-
<
|
|
1243
|
-
<ft-select
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1249
|
+
<div class="column-filter" part="${this.columnPart("filter-container",e)}">
|
|
1250
|
+
<ft-select label="Filter ${t.title}"
|
|
1251
|
+
@change=${n}
|
|
1252
|
+
part="${this.columnPart("filter",e)}">
|
|
1253
|
+
<ft-select-option></ft-select-option>
|
|
1254
|
+
${o.map((t=>i.html`
|
|
1255
|
+
<ft-select-option value="${t}" label="${t}"></ft-select-option>
|
|
1256
|
+
`))}
|
|
1257
|
+
</ft-select>
|
|
1258
|
+
</div>
|
|
1259
|
+
`:i.nothing}return i.nothing}columnPart(t,e){return`${t} ${t}-column-${e}`}renderCell(t,e,o,s){var l;const r=null!==(l=t.render)&&void 0!==l?l:li;return i.html`
|
|
1260
|
+
<div class="cell"
|
|
1261
|
+
part="${this.columnPart("cell",e)} cell-row-${s} cell-column-${e}-row-${s}">
|
|
1262
|
+
${(t=>{const e=r(t,s);return"string"==typeof e?n.unsafeHTML(e):e})(this.getValue(t,o))}
|
|
1263
|
+
</div>
|
|
1250
1264
|
`}getValue(t,e){return"string"==typeof t.getter?e[t.getter]:t.getter(e)}getValueAsString(t,e,i){const o=this.getValue(t,e);return"function"==typeof t.stringify?t.stringify(o,i):(t=>""+t)(o)}}ai.styles=si,ni([o.property({attribute:!1})],ai.prototype,"data",void 0),ni([o.property({attribute:!1})],ai.prototype,"columns",void 0),ni([o.property({attribute:!1})],ai.prototype,"sort",void 0),ni([o.property()],ai.prototype,"stickyHeaders",void 0),ni([o.state()],ai.prototype,"currentSort",void 0),e.customElement("ft-filterable-table")(ai),t.FtFilterableTable=ai,t.FtFilterableTableCssVariables=oi,t.RowClickEvent=ii,t.styles=si,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap);
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,s=new WeakMap,r=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=n.prototype.attributeChangedCallback,a=new Set(n.observedAttributes||[]);f(n,a,l);const p={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,p),this._definitionsByClass.set(n,p);let c=i.call(o,t);c||(c=d(t),e.call(o,t,c)),this===window.customElements&&(r.set(n,p),p.standInClass=c);const h=this._awaitingUpgrade.get(t);if(h){this._awaitingUpgrade.delete(t);for(const t of h)s.delete(t),u(t,p,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,s=new WeakMap,r=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=n.prototype.attributeChangedCallback,a=new Set(n.observedAttributes||[]);f(n,a,l);const p={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,p),this._definitionsByClass.set(n,p);let c=i.call(o,t);c||(c=d(t),e.call(o,t,c)),this===window.customElements&&(r.set(n,p),p.standInClass=c);const h=this._awaitingUpgrade.get(t);if(h){this._awaitingUpgrade.delete(t);for(const t of h)s.delete(t),u(t,p,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){b.push(this),o.upgrade.apply(o,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=r.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),n.set(e,i),e},window.HTMLElement.prototype=t.prototype;const p=t=>t===document||t instanceof ShadowRoot,c=t=>{let e=t.getRootNode();if(!p(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),p(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},d=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=c(i)||window.customElements,n=o._getDefinition(e);return n?u(i,n):s.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);o.call(this,s,n),i.call(this,s,t,n)}else o.call(this,s,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o),i.call(this,o,t,null)}else n.call(this,o)})},h=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):h(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),a=t;try{new e.elementClass}catch(t){h(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const x=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),b.pop(),t}};x(ShadowRoot,"createElement",document),x(ShadowRoot,"importNode",document),x(Element,"insertAdjacentHTML");const g=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){b.push(this),i.set.call(this,t),b.pop()}})};if(g(Element,"innerHTML"),g(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==n.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),n=e.get(o)||[];this[+i]=t,n.push(t),e.set(o,n)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new s(e)}})}}try{window.customElements.define("custom-element",null)}catch(Ht){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,n=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void o(t)}n(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -49,7 +49,7 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
|
|
|
49
49
|
* @license
|
|
50
50
|
* Copyright 2019 Google LLC
|
|
51
51
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
52
|
-
*/const h=window,u=h.ShadowRoot&&(void 0===h.ShadyCSS||h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v=Symbol(),
|
|
52
|
+
*/const h=window,u=h.ShadowRoot&&(void 0===h.ShadyCSS||h.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v=Symbol(),b=new WeakMap;class x{constructor(t,e,i){if(this._$cssResult$=!0,i!==v)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(u&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=b.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&b.set(e,t))}return t}toString(){return this.cssText}}const g=t=>new x("string"==typeof t?t:t+"",void 0,v),y=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new x(i,t,v)},m=(t,e)=>{u?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=h.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))},$=u?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return g(e)})(t):t
|
|
53
53
|
/**
|
|
54
54
|
* @license
|
|
55
55
|
* Copyright 2017 Google LLC
|
|
@@ -66,12 +66,12 @@ var M;z.finalized=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRoot
|
|
|
66
66
|
* Copyright 2017 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
68
|
*/
|
|
69
|
-
var ut,vt;class
|
|
69
|
+
var ut,vt;class bt extends z{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var o,n;const s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let r=s._$litPart$;if(void 0===r){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;s._$litPart$=r=new st(e.insertBefore(T(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Y}}bt.finalized=!0,bt._$litElement$=!0,null===(ut=globalThis.litElementHydrateSupport)||void 0===ut||ut.call(globalThis,{LitElement:bt});const xt=globalThis.litElementPolyfillSupport;null==xt||xt({LitElement:bt}),(null!==(vt=globalThis.litElementVersions)&&void 0!==vt?vt:globalThis.litElementVersions=[]).push("3.2.2");class gt{static create(t,e,i){let o=t=>g(null!=t?t:i),n=y`var(${g(t)}, ${o(i)})`;return n.name=t,n.category=e,n.defaultValue=i,n.defaultCssValue=o,n.get=e=>y`var(${g(t)}, ${o(e)})`,n.breadcrumb=()=>[],n.lastResortDefaultValue=()=>i,n}static extend(t,e,i){let o=t=>e.get(null!=t?t:i),n=y`var(${g(t)}, ${o(i)})`;return n.name=t,n.category=e.category,n.fallbackVariable=e,n.defaultValue=i,n.defaultCssValue=o,n.get=e=>y`var(${g(t)}, ${o(e)})`,n.breadcrumb=()=>[e.name,...e.breadcrumb()],n.lastResortDefaultValue=()=>i,n}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):g(null!=e?e:t.defaultValue),o=y`var(${g(t.name)}, ${i(t.defaultValue)})`;return o.name=t.name,o.category=t.category,o.fallbackVariable=t.fallbackVariable,o.defaultValue=t.defaultValue,o.context=e,o.defaultCssValue=i,o.get=e=>y`var(${g(t.name)}, ${i(e)})`,o.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],o.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},o}}function yt(t,e){return g(`${t.name}: ${e}`)}const mt={colorPrimary:gt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:gt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:gt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:gt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:gt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:gt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:gt.create("--ft-color-error","COLOR","#B00020"),colorOutline:gt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:gt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:gt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:gt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:gt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:gt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:gt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:gt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:gt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:gt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:gt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:gt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:gt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:gt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:gt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:gt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:gt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:gt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:gt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:gt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:gt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:gt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:gt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:gt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:gt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:gt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:gt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:gt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:gt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:gt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:gt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:gt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:gt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:gt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:gt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:gt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:gt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:gt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:gt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:gt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:gt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:gt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:gt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:gt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:gt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:gt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:gt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:gt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:gt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:gt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:gt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:gt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:gt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:gt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:gt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2021 Google LLC
|
|
73
73
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
74
|
-
*/var $t=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class wt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const n=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return m(n,this.constructor.elementStyles),n}}}(
|
|
74
|
+
*/var $t=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class wt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const n=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return m(n,this.constructor.elementStyles),n}}}(bt)){constructor(){super(),this.exportpartsDebouncer=new e(5),this.constructorName=this.constructor.name,this.constructorPrototype=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this.constructorName&&Object.setPrototypeOf(this,this.constructorPrototype)}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),X`
|
|
75
75
|
${t.map((t=>X`
|
|
76
76
|
<style>${t}</style>
|
|
77
77
|
`))}
|
|
@@ -123,7 +123,7 @@ class Lt extends Mt{constructor(t){if(super(t),this.it=G,t.type!==Rt)throw Error
|
|
|
123
123
|
* @license
|
|
124
124
|
* Copyright 2018 Google LLC
|
|
125
125
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
126
|
-
*/var Jt;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Jt||(Jt={}));const qt=gt.extend("--ft-typography-font-family",mt.titleFont),Xt=gt.extend("--ft-typography-font-family",mt.contentFont),Yt={fontFamily:Xt,fontSize:gt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:gt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:gt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:gt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:gt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Gt=gt.extend("--ft-typography-title-font-family",qt),Qt=gt.extend("--ft-typography-title-font-size",Yt.fontSize,"20px"),te=gt.extend("--ft-typography-title-font-weight",Yt.fontWeight,"normal"),ee=gt.extend("--ft-typography-title-letter-spacing",Yt.letterSpacing,"0.15px"),ie=gt.extend("--ft-typography-title-line-height",Yt.lineHeight,"1.2"),oe=gt.extend("--ft-typography-title-text-transform",Yt.textTransform,"inherit"),ne=gt.extend("--ft-typography-title-dense-font-family",qt),se=gt.extend("--ft-typography-title-dense-font-size",Yt.fontSize,"14px"),re=gt.extend("--ft-typography-title-dense-font-weight",Yt.fontWeight,"normal"),le=gt.extend("--ft-typography-title-dense-letter-spacing",Yt.letterSpacing,"0.105px"),ae=gt.extend("--ft-typography-title-dense-line-height",Yt.lineHeight,"1.7"),pe=gt.extend("--ft-typography-title-dense-text-transform",Yt.textTransform,"inherit"),ce=gt.extend("--ft-typography-subtitle1-font-family",Xt),de=gt.extend("--ft-typography-subtitle1-font-size",Yt.fontSize,"16px"),fe=gt.extend("--ft-typography-subtitle1-font-weight",Yt.fontWeight,"600"),he=gt.extend("--ft-typography-subtitle1-letter-spacing",Yt.letterSpacing,"0.144px"),ue=gt.extend("--ft-typography-subtitle1-line-height",Yt.lineHeight,"1.5"),ve=gt.extend("--ft-typography-subtitle1-text-transform",Yt.textTransform,"inherit"),
|
|
126
|
+
*/var Jt;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Jt||(Jt={}));const qt=gt.extend("--ft-typography-font-family",mt.titleFont),Xt=gt.extend("--ft-typography-font-family",mt.contentFont),Yt={fontFamily:Xt,fontSize:gt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:gt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:gt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:gt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:gt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Gt=gt.extend("--ft-typography-title-font-family",qt),Qt=gt.extend("--ft-typography-title-font-size",Yt.fontSize,"20px"),te=gt.extend("--ft-typography-title-font-weight",Yt.fontWeight,"normal"),ee=gt.extend("--ft-typography-title-letter-spacing",Yt.letterSpacing,"0.15px"),ie=gt.extend("--ft-typography-title-line-height",Yt.lineHeight,"1.2"),oe=gt.extend("--ft-typography-title-text-transform",Yt.textTransform,"inherit"),ne=gt.extend("--ft-typography-title-dense-font-family",qt),se=gt.extend("--ft-typography-title-dense-font-size",Yt.fontSize,"14px"),re=gt.extend("--ft-typography-title-dense-font-weight",Yt.fontWeight,"normal"),le=gt.extend("--ft-typography-title-dense-letter-spacing",Yt.letterSpacing,"0.105px"),ae=gt.extend("--ft-typography-title-dense-line-height",Yt.lineHeight,"1.7"),pe=gt.extend("--ft-typography-title-dense-text-transform",Yt.textTransform,"inherit"),ce=gt.extend("--ft-typography-subtitle1-font-family",Xt),de=gt.extend("--ft-typography-subtitle1-font-size",Yt.fontSize,"16px"),fe=gt.extend("--ft-typography-subtitle1-font-weight",Yt.fontWeight,"600"),he=gt.extend("--ft-typography-subtitle1-letter-spacing",Yt.letterSpacing,"0.144px"),ue=gt.extend("--ft-typography-subtitle1-line-height",Yt.lineHeight,"1.5"),ve=gt.extend("--ft-typography-subtitle1-text-transform",Yt.textTransform,"inherit"),be=gt.extend("--ft-typography-subtitle2-font-family",Xt),xe=gt.extend("--ft-typography-subtitle2-font-size",Yt.fontSize,"14px"),ge=gt.extend("--ft-typography-subtitle2-font-weight",Yt.fontWeight,"normal"),ye=gt.extend("--ft-typography-subtitle2-letter-spacing",Yt.letterSpacing,"0.098px"),me=gt.extend("--ft-typography-subtitle2-line-height",Yt.lineHeight,"1.7"),$e=gt.extend("--ft-typography-subtitle2-text-transform",Yt.textTransform,"inherit"),we={fontFamily:gt.extend("--ft-typography-body1-font-family",Xt),fontSize:gt.extend("--ft-typography-body1-font-size",Yt.fontSize,"16px"),fontWeight:gt.extend("--ft-typography-body1-font-weight",Yt.fontWeight,"normal"),letterSpacing:gt.extend("--ft-typography-body1-letter-spacing",Yt.letterSpacing,"0.496px"),lineHeight:gt.extend("--ft-typography-body1-line-height",Yt.lineHeight,"1.5"),textTransform:gt.extend("--ft-typography-body1-text-transform",Yt.textTransform,"inherit")},Oe=gt.extend("--ft-typography-body2-font-family",Xt),ke=gt.extend("--ft-typography-body2-font-size",Yt.fontSize,"14px"),Se=gt.extend("--ft-typography-body2-font-weight",Yt.fontWeight,"normal"),Ce=gt.extend("--ft-typography-body2-letter-spacing",Yt.letterSpacing,"0.252px"),Ee=gt.extend("--ft-typography-body2-line-height",Yt.lineHeight,"1.4"),Ne=gt.extend("--ft-typography-body2-text-transform",Yt.textTransform,"inherit"),Re={fontFamily:gt.extend("--ft-typography-caption-font-family",Xt),fontSize:gt.extend("--ft-typography-caption-font-size",Yt.fontSize,"12px"),fontWeight:gt.extend("--ft-typography-caption-font-weight",Yt.fontWeight,"normal"),letterSpacing:gt.extend("--ft-typography-caption-letter-spacing",Yt.letterSpacing,"0.396px"),lineHeight:gt.extend("--ft-typography-caption-line-height",Yt.lineHeight,"1.33"),textTransform:gt.extend("--ft-typography-caption-text-transform",Yt.textTransform,"inherit")},ze=gt.extend("--ft-typography-breadcrumb-font-family",Xt),Me=gt.extend("--ft-typography-breadcrumb-font-size",Yt.fontSize,"10px"),Fe=gt.extend("--ft-typography-breadcrumb-font-weight",Yt.fontWeight,"normal"),Ue=gt.extend("--ft-typography-breadcrumb-letter-spacing",Yt.letterSpacing,"0.33px"),je=gt.extend("--ft-typography-breadcrumb-line-height",Yt.lineHeight,"1.6"),Be=gt.extend("--ft-typography-breadcrumb-text-transform",Yt.textTransform,"inherit"),De=gt.extend("--ft-typography-overline-font-family",Xt),Ae=gt.extend("--ft-typography-overline-font-size",Yt.fontSize,"10px"),Ie=gt.extend("--ft-typography-overline-font-weight",Yt.fontWeight,"normal"),Te=gt.extend("--ft-typography-overline-letter-spacing",Yt.letterSpacing,"1.5px"),Le=gt.extend("--ft-typography-overline-line-height",Yt.lineHeight,"1.6"),Pe=gt.extend("--ft-typography-overline-text-transform",Yt.textTransform,"uppercase"),_e={fontFamily:gt.extend("--ft-typography-button-font-family",Xt),fontSize:gt.extend("--ft-typography-button-font-size",Yt.fontSize,"14px"),fontWeight:gt.extend("--ft-typography-button-font-weight",Yt.fontWeight,"600"),letterSpacing:gt.extend("--ft-typography-button-letter-spacing",Yt.letterSpacing,"1.246px"),lineHeight:gt.extend("--ft-typography-button-line-height",Yt.lineHeight,"1.15"),textTransform:gt.extend("--ft-typography-button-text-transform",Yt.textTransform,"uppercase")},He=y`
|
|
127
127
|
.ft-typography--title {
|
|
128
128
|
font-family: ${Gt};
|
|
129
129
|
font-size: ${Qt};
|
|
@@ -152,8 +152,8 @@ class Lt extends Mt{constructor(t){if(super(t),this.it=G,t.type!==Rt)throw Error
|
|
|
152
152
|
}
|
|
153
153
|
`,Ke=y`
|
|
154
154
|
.ft-typography--subtitle2 {
|
|
155
|
-
font-family: ${
|
|
156
|
-
font-size: ${
|
|
155
|
+
font-family: ${be};
|
|
156
|
+
font-size: ${xe};
|
|
157
157
|
font-weight: ${ge};
|
|
158
158
|
letter-spacing: ${ye};
|
|
159
159
|
line-height: ${me};
|
|
@@ -439,7 +439,7 @@ class Lt extends Mt{constructor(t){if(super(t),this.it=G,t.type!==Rt)throw Error
|
|
|
439
439
|
opacity: ${li.opacityContentOnSurfacePressed};
|
|
440
440
|
transform: translate(-50%, -50%) scale(1);
|
|
441
441
|
}
|
|
442
|
-
`;var vi,xi
|
|
442
|
+
`;var vi,bi,xi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class gi extends wt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),s=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-s.x:s.width/2),this.originY=Math.round(null!=n?n-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return X`
|
|
443
443
|
<style>
|
|
444
444
|
.ft-ripple .ft-ripple--effect,
|
|
445
445
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -456,7 +456,7 @@ class Lt extends Mt{constructor(t){if(super(t),this.it=G,t.type!==Rt)throw Error
|
|
|
456
456
|
<div class="ft-ripple--background"></div>
|
|
457
457
|
<div class="ft-ripple--effect"></div>
|
|
458
458
|
</div>
|
|
459
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}gi.elementDefinitions={},gi.styles=ui,bi([o({type:Boolean})],gi.prototype,"primary",void 0),bi([o({type:Boolean})],gi.prototype,"secondary",void 0),bi([o({type:Boolean})],gi.prototype,"unbounded",void 0),bi([o({type:Boolean})],gi.prototype,"activated",void 0),bi([o({type:Boolean})],gi.prototype,"selected",void 0),bi([o({type:Boolean})],gi.prototype,"disabled",void 0),bi([n()],gi.prototype,"hovered",void 0),bi([n()],gi.prototype,"focused",void 0),bi([n()],gi.prototype,"pressed",void 0),bi([n()],gi.prototype,"rippling",void 0),bi([n()],gi.prototype,"rippleSize",void 0),bi([n()],gi.prototype,"originX",void 0),bi([n()],gi.prototype,"originY",void 0),bi([r(".ft-ripple")],gi.prototype,"ripple",void 0),bi([r(".ft-ripple--effect")],gi.prototype,"rippleEffect",void 0),d("ft-ripple")(gi),function(t){t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(vi||(vi={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(xi||(xi={})),new Map([...["abw"].map((t=>[t,xi.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,xi.AUDIO])),...["avi"].map((t=>[t,xi.AVI])),...["chm","xhs"].map((t=>[t,xi.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,xi.CODE])),...["csv"].map((t=>[t,xi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,xi.DITA])),...["epub"].map((t=>[t,xi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,xi.EXCEL])),...["flac"].map((t=>[t,xi.FLAC])),...["gif"].map((t=>[t,xi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,xi.GZIP])),...["html","htm","xhtml"].map((t=>[t,xi.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,xi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,xi.JPEG])),...["json"].map((t=>[t,xi.JSON])),...["m4a","m4p"].map((t=>[t,xi.M4A])),...["mov","qt"].map((t=>[t,xi.MOV])),...["mp3"].map((t=>[t,xi.MP3])),...["mp4","m4v"].map((t=>[t,xi.MP4])),...["ogg","oga"].map((t=>[t,xi.OGG])),...["pdf","ps"].map((t=>[t,xi.PDF])),...["png"].map((t=>[t,xi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,xi.POWERPOINT])),...["rar"].map((t=>[t,xi.RAR])),...["stp"].map((t=>[t,xi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,xi.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,xi.VIDEO])),...["wav"].map((t=>[t,xi.WAV])),...["wma"].map((t=>[t,xi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,xi.WORD])),...["xml","xsl","rdf"].map((t=>[t,xi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,xi.YAML])),...["zip"].map((t=>[t,xi.ZIP]))]);const yi={size:gt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:gt.extend("--ft-icon-fluid-topics-font-family",gt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:gt.extend("--ft-icon-file-format-font-family",gt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:gt.extend("--ft-icon-material-font-family",gt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:gt.create("--ft-icon-vertical-align","UNKNOWN","unset")},mi=y`
|
|
459
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}gi.elementDefinitions={},gi.styles=ui,xi([o({type:Boolean})],gi.prototype,"primary",void 0),xi([o({type:Boolean})],gi.prototype,"secondary",void 0),xi([o({type:Boolean})],gi.prototype,"unbounded",void 0),xi([o({type:Boolean})],gi.prototype,"activated",void 0),xi([o({type:Boolean})],gi.prototype,"selected",void 0),xi([o({type:Boolean})],gi.prototype,"disabled",void 0),xi([n()],gi.prototype,"hovered",void 0),xi([n()],gi.prototype,"focused",void 0),xi([n()],gi.prototype,"pressed",void 0),xi([n()],gi.prototype,"rippling",void 0),xi([n()],gi.prototype,"rippleSize",void 0),xi([n()],gi.prototype,"originX",void 0),xi([n()],gi.prototype,"originY",void 0),xi([r(".ft-ripple")],gi.prototype,"ripple",void 0),xi([r(".ft-ripple--effect")],gi.prototype,"rippleEffect",void 0),d("ft-ripple")(gi),function(t){t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(vi||(vi={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(bi||(bi={})),new Map([...["abw"].map((t=>[t,bi.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,bi.AUDIO])),...["avi"].map((t=>[t,bi.AVI])),...["chm","xhs"].map((t=>[t,bi.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,bi.CODE])),...["csv"].map((t=>[t,bi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,bi.DITA])),...["epub"].map((t=>[t,bi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,bi.EXCEL])),...["flac"].map((t=>[t,bi.FLAC])),...["gif"].map((t=>[t,bi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,bi.GZIP])),...["html","htm","xhtml"].map((t=>[t,bi.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,bi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,bi.JPEG])),...["json"].map((t=>[t,bi.JSON])),...["m4a","m4p"].map((t=>[t,bi.M4A])),...["mov","qt"].map((t=>[t,bi.MOV])),...["mp3"].map((t=>[t,bi.MP3])),...["mp4","m4v"].map((t=>[t,bi.MP4])),...["ogg","oga"].map((t=>[t,bi.OGG])),...["pdf","ps"].map((t=>[t,bi.PDF])),...["png"].map((t=>[t,bi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,bi.POWERPOINT])),...["rar"].map((t=>[t,bi.RAR])),...["stp"].map((t=>[t,bi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,bi.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,bi.VIDEO])),...["wav"].map((t=>[t,bi.WAV])),...["wma"].map((t=>[t,bi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,bi.WORD])),...["xml","xsl","rdf"].map((t=>[t,bi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,bi.YAML])),...["zip"].map((t=>[t,bi.ZIP]))]);const yi={size:gt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:gt.extend("--ft-icon-fluid-topics-font-family",gt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:gt.extend("--ft-icon-file-format-font-family",gt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:gt.extend("--ft-icon-material-font-family",gt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:gt.create("--ft-icon-vertical-align","UNKNOWN","unset")},mi=y`
|
|
460
460
|
:host {
|
|
461
461
|
display: inline-block;
|
|
462
462
|
}
|
|
@@ -498,7 +498,7 @@ class Lt extends Mt{constructor(t){if(super(t),this.it=G,t.type!==Rt)throw Error
|
|
|
498
498
|
${Pt(this.resolvedIcon)}
|
|
499
499
|
<slot ?hidden=${t}></slot>
|
|
500
500
|
</i>
|
|
501
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case $i.file_format:this.resolvedIcon=null!==(t=
|
|
501
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case $i.file_format:this.resolvedIcon=null!==(t=bi[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case $i.fluid_topics:this.resolvedIcon=null!==(e=vi[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||G}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Oi.elementDefinitions={},Oi.styles=mi,wi([o()],Oi.prototype,"variant",void 0),wi([o()],Oi.prototype,"value",void 0),wi([n()],Oi.prototype,"resolvedIcon",void 0),wi([r("slot")],Oi.prototype,"slottedContent",void 0),d("ft-icon")(Oi);const ki={labelSize:gt.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:gt.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:gt.create("--ft-select-vertical-spacing","SIZE","4px"),optionsHeight:gt.create("--ft-select-options-height","SIZE","unset"),selectedOptionColor:gt.extend("--ft-select-selected-option-color",mt.colorOnSurface),helperColor:gt.extend("--ft-select-helper-color",mt.colorOnSurfaceMedium),optionsColor:gt.extend("--ft-select-options-color",mt.colorOnSurface),optionsZIndex:gt.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:gt.external(mt.colorSurface,"Design system"),colorOnSurfaceDisabled:gt.external(mt.colorOnSurfaceDisabled,"Design system"),colorPrimary:gt.external(mt.colorPrimary,"Design system"),borderRadiusS:gt.external(mt.borderRadiusS,"Design system"),elevation02:gt.external(mt.elevation02,"Design system"),colorError:gt.external(mt.colorError,"Design system")},Si=y`
|
|
502
502
|
*:focus {
|
|
503
503
|
outline: none;
|
|
504
504
|
}
|
|
@@ -1201,7 +1201,7 @@ class Lt extends Mt{constructor(t){if(super(t),this.it=G,t.type!==Rt)throw Error
|
|
|
1201
1201
|
</ft-tooltip>
|
|
1202
1202
|
`:t}resolveIcon(){return this.loading?X`
|
|
1203
1203
|
<ft-loader></ft-loader> `:this.icon?X`
|
|
1204
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:G}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}io.elementDefinitions={"ft-ripple":gi,"ft-tooltip":Zi,"ft-typography":ei,"ft-icon":Oi,"ft-loader":Ji},io.styles=to,eo([o({type:Boolean})],io.prototype,"primary",void 0),eo([o({type:Boolean})],io.prototype,"outlined",void 0),eo([o({type:Boolean})],io.prototype,"disabled",void 0),eo([o({type:Boolean})],io.prototype,"dense",void 0),eo([o({type:Boolean})],io.prototype,"round",void 0),eo([o({type:String})],io.prototype,"label",void 0),eo([o({type:String})],io.prototype,"icon",void 0),eo([o({type:String})],io.prototype,"iconVariant",void 0),eo([o({type:Boolean})],io.prototype,"trailingIcon",void 0),eo([o({type:Boolean})],io.prototype,"loading",void 0),eo([o({type:String})],io.prototype,"tooltipPosition",void 0),eo([o({type:Boolean})],io.prototype,"hideTooltip",void 0),eo([o({type:Boolean})],io.prototype,"forceTooltip",void 0),eo([r(".ft-button")],io.prototype,"button",void 0),eo([r(".ft-button--label slot")],io.prototype,"slottedContent",void 0),d("ft-button")(io);class oo extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const no={headerBackground:gt.create("--ft-filterable-table-header-background","COLOR","whitesmoke"),oddRowBackground:gt.create("--ft-filterable-table-odd-row-background","COLOR","#FFFFFF"),evenRowBackground:gt.create("--ft-filterable-table-even-row-background","COLOR","#fdfdfd"),rowHoverBackground:gt.create("--ft-filterable-table-row-hover-background","COLOR","#fafafa"),stickyHeaderZIndex:gt.create("--ft-filterable-table-sticky-header-zindex","NUMBER","100"),colorOnSurfaceHigh:gt.external(mt.colorOnSurfaceHigh,"Design system"),titleFont:gt.external(mt.titleFont,"Design system"),contentFont:gt.external(mt.contentFont,"Design system")},so=y`
|
|
1204
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:G}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}io.elementDefinitions={"ft-ripple":gi,"ft-tooltip":Zi,"ft-typography":ei,"ft-icon":Oi,"ft-loader":Ji},io.styles=to,eo([o({type:Boolean})],io.prototype,"primary",void 0),eo([o({type:Boolean})],io.prototype,"outlined",void 0),eo([o({type:Boolean})],io.prototype,"disabled",void 0),eo([o({type:Boolean})],io.prototype,"dense",void 0),eo([o({type:Boolean})],io.prototype,"round",void 0),eo([o({type:String})],io.prototype,"label",void 0),eo([o({type:String})],io.prototype,"icon",void 0),eo([o({type:String})],io.prototype,"iconVariant",void 0),eo([o({type:Boolean})],io.prototype,"trailingIcon",void 0),eo([o({type:Boolean})],io.prototype,"loading",void 0),eo([o({type:String})],io.prototype,"tooltipPosition",void 0),eo([o({type:Boolean})],io.prototype,"hideTooltip",void 0),eo([o({type:Boolean})],io.prototype,"forceTooltip",void 0),eo([r(".ft-button")],io.prototype,"button",void 0),eo([r(".ft-button--label slot")],io.prototype,"slottedContent",void 0),d("ft-button")(io);class oo extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const no={headerBackground:gt.create("--ft-filterable-table-header-background","COLOR","whitesmoke"),oddRowBackground:gt.create("--ft-filterable-table-odd-row-background","COLOR","#FFFFFF"),evenRowBackground:gt.create("--ft-filterable-table-even-row-background","COLOR","#fdfdfd"),rowHoverBackground:gt.create("--ft-filterable-table-row-hover-background","COLOR","#fafafa"),stickyHeaderZIndex:gt.create("--ft-filterable-table-sticky-header-zindex","NUMBER","100"),cellVerticalBorderWidth:gt.create("--ft-filterable-table-cell-vertical-border-width","SIZE","1px"),colorOnSurfaceHigh:gt.external(mt.colorOnSurfaceHigh,"Design system"),titleFont:gt.external(mt.titleFont,"Design system"),contentFont:gt.external(mt.contentFont,"Design system")},so=y`
|
|
1205
1205
|
:host {
|
|
1206
1206
|
display: block;
|
|
1207
1207
|
}
|
|
@@ -1273,7 +1273,9 @@ class Lt extends Mt{constructor(t){if(super(t),this.it=G,t.type!==Rt)throw Error
|
|
|
1273
1273
|
|
|
1274
1274
|
.cell {
|
|
1275
1275
|
padding: 1rem;
|
|
1276
|
-
border-left:
|
|
1276
|
+
border-left-color: ${no.headerBackground};
|
|
1277
|
+
border-left-style: solid;
|
|
1278
|
+
border-left-width: ${no.cellVerticalBorderWidth};
|
|
1277
1279
|
border-bottom: 1px solid ${no.headerBackground};
|
|
1278
1280
|
overflow-x: auto;
|
|
1279
1281
|
display: flex;
|
|
@@ -1322,20 +1324,21 @@ class Lt extends Mt{constructor(t){if(super(t),this.it=G,t.type!==Rt)throw Error
|
|
|
1322
1324
|
${Tt(t,((t,e)=>"row-"+e),((t,e)=>X`
|
|
1323
1325
|
<div class="row"
|
|
1324
1326
|
@click=${()=>this.dispatchEvent(new oo(t))}>
|
|
1325
|
-
${Tt(this.columns,((t,i)=>"cell-"+
|
|
1327
|
+
${Tt(this.columns,((t,i)=>"cell-"+i+"-"+e),((i,o)=>this.renderCell(i,o,t,e)))}
|
|
1326
1328
|
</div>
|
|
1327
1329
|
`))}
|
|
1328
1330
|
</div>
|
|
1329
|
-
`}filterData(){
|
|
1330
|
-
<div class="${_t(i)}"
|
|
1331
|
+
`}filterData(){return this.filters.reduce(((t,e,i)=>{var o;const n=this.columns[i];if(e&&e.value)switch(null!==(o=n.filter)&&void 0!==o?o:"text"){case"text":return t.filter((t=>this.getValueAsString(n,t,i).toLowerCase().includes(e.value.toLowerCase())));case"select":return t.filter((t=>this.getValueAsString(n,t,i)===e.value))}return t}),this.data)}sortData(t){var e;if(this.currentSort){const i=this.columns[this.currentSort.column],o=null!==(e=i.comparator)&&void 0!==e?e:ao,n="asc"===this.currentSort.order?o:(t,e)=>-o(t,e);return t.sort(((t,e)=>n(this.getValue(i,t),this.getValue(i,e))))}return t}update(t){super.update(t),t.has("sort")&&(this.currentSort=this.sort),(t.has("data")||t.has("columns"))&&this.updateSelectData()}updateSelectData(){this.selectData=[];const t=this.data,e=this.columns;for(let i in e){const o=e[i];"select"===o.filter&&(this.selectData[i]=[...new Set(t.map(((t,e)=>this.getValueAsString(o,t,e))))].sort(((t,e)=>t.localeCompare(e))))}this.requestUpdate()}renderHeader(t,e){const i={"header-cell":!0,"header-cell--sticky":this.stickyHeaders};return X`
|
|
1332
|
+
<div class="${_t(i)}"
|
|
1333
|
+
part="${this.columnPart("header-cell",e)}">
|
|
1331
1334
|
<div class="column-title-container">
|
|
1332
|
-
<span class="column-title"
|
|
1335
|
+
<span class="column-title"
|
|
1336
|
+
part="${this.columnPart("title",e)}">
|
|
1337
|
+
${t.title}
|
|
1338
|
+
</span>
|
|
1333
1339
|
${this.renderColumnSort(t,e)}
|
|
1334
1340
|
</div>
|
|
1335
|
-
${t
|
|
1336
|
-
<div class="column-filter">
|
|
1337
|
-
${this.renderColumnFilter(t,e)}
|
|
1338
|
-
</div>`:null}
|
|
1341
|
+
${this.renderColumnFilter(t,e)}
|
|
1339
1342
|
</div>
|
|
1340
1343
|
`}renderColumnSort(t,e){var i;const o=this.currentSort&&this.currentSort.column===e,n=o?"asc"===this.currentSort.order?"expand_more":"expand_less":"unfold_more";return X`
|
|
1341
1344
|
<ft-button
|
|
@@ -1345,19 +1348,30 @@ class Lt extends Mt{constructor(t){if(super(t),this.it=G,t.type!==Rt)throw Error
|
|
|
1345
1348
|
icon="${n}"
|
|
1346
1349
|
label="Sort ${t.title}"
|
|
1347
1350
|
@click=${()=>{var t;o?"asc"===(null===(t=this.currentSort)||void 0===t?void 0:t.order)?this.currentSort={column:e,order:"desc"}:this.currentSort=void 0:this.currentSort={column:e,order:"asc"}}}
|
|
1351
|
+
part="${this.columnPart("sort-button",e)}"
|
|
1348
1352
|
></ft-button>
|
|
1349
1353
|
`}renderColumnFilter(t,e){var i,o;const n=t=>{this.filters[e]={value:t.detail},this.requestUpdate()};switch(null!==(i=t.filter)&&void 0!==i?i:"text"){case"text":return X`
|
|
1350
|
-
<
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
+
<div class="column-filter" part="${this.columnPart("filter-container",e)}">
|
|
1355
|
+
<ft-text-field
|
|
1356
|
+
label="Search ${t.title}"
|
|
1357
|
+
@live-change="${n}"
|
|
1358
|
+
part="${this.columnPart("filter",e)}"
|
|
1359
|
+
></ft-text-field>
|
|
1360
|
+
</div>
|
|
1354
1361
|
`;case"select":const i=null!==(o=this.selectData[e])&&void 0!==o?o:[];return i.length?X`
|
|
1355
|
-
<
|
|
1356
|
-
<ft-select
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1362
|
+
<div class="column-filter" part="${this.columnPart("filter-container",e)}">
|
|
1363
|
+
<ft-select label="Filter ${t.title}"
|
|
1364
|
+
@change=${n}
|
|
1365
|
+
part="${this.columnPart("filter",e)}">
|
|
1366
|
+
<ft-select-option></ft-select-option>
|
|
1367
|
+
${i.map((t=>X`
|
|
1368
|
+
<ft-select-option value="${t}" label="${t}"></ft-select-option>
|
|
1369
|
+
`))}
|
|
1370
|
+
</ft-select>
|
|
1371
|
+
</div>
|
|
1372
|
+
`:G}return G}columnPart(t,e){return`${t} ${t}-column-${e}`}renderCell(t,e,i,o){var n;const s=null!==(n=t.render)&&void 0!==n?n:lo;return X`
|
|
1373
|
+
<div class="cell"
|
|
1374
|
+
part="${this.columnPart("cell",e)} cell-row-${o} cell-column-${e}-row-${o}">
|
|
1375
|
+
${(t=>{const e=s(t,o);return"string"==typeof e?Pt(e):e})(this.getValue(t,i))}
|
|
1376
|
+
</div>
|
|
1363
1377
|
`}getValue(t,e){return"string"==typeof t.getter?e[t.getter]:t.getter(e)}getValueAsString(t,e,i){const o=this.getValue(t,e);return"function"==typeof t.stringify?t.stringify(o,i):(t=>""+t)(o)}}po.styles=so,ro([o({attribute:!1})],po.prototype,"data",void 0),ro([o({attribute:!1})],po.prototype,"columns",void 0),ro([o({attribute:!1})],po.prototype,"sort",void 0),ro([o()],po.prototype,"stickyHeaders",void 0),ro([n()],po.prototype,"currentSort",void 0),d("ft-filterable-table")(po),t.FtFilterableTable=po,t.FtFilterableTableCssVariables=no,t.RowClickEvent=oo,t.styles=so,Object.defineProperty(t,"i",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-filterable-table",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.45",
|
|
4
4
|
"description": "A dynamic table with filters",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@fluid-topics/ft-button": "0.3.
|
|
26
|
-
"@fluid-topics/ft-select": "0.3.
|
|
27
|
-
"@fluid-topics/ft-text-field": "0.3.
|
|
28
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
25
|
+
"@fluid-topics/ft-button": "0.3.45",
|
|
26
|
+
"@fluid-topics/ft-select": "0.3.45",
|
|
27
|
+
"@fluid-topics/ft-text-field": "0.3.45",
|
|
28
|
+
"@fluid-topics/ft-wc-utils": "0.3.45",
|
|
29
29
|
"lit": "2.2.8"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "92ebb6d750d61b08811c669cbf82a52c3c89b4d9"
|
|
32
32
|
}
|