xv-webcomponents 2.0.0-beta.2 → 2.0.0-beta.28
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/README.md +3 -2
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +3 -4
- package/dist/angular/proxies.d.ts +60 -34
- package/dist/angular/proxies.js +51 -67
- package/dist/angular/web-components.module.d.ts +1 -1
- package/dist/angular/web-components.module.js +10 -13
- package/dist/cjs/{index-Cfa6bBQW.js → index-DaTpiyaU.js} +1 -1
- package/dist/cjs/{index-Cixkr3sz.js → index-Dwhgrew8.js} +15 -10
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{xv-accordion-v2_50.cjs.entry.js → xv-accordion-v2_49.cjs.entry.js} +1529 -147
- package/dist/cjs/xv-header-next.cjs.entry.js +2 -2
- package/dist/cjs/xv-mega-menu-next.cjs.entry.js +2 -2
- package/dist/cjs/xv-webcomponents.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +9 -8
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.css +129 -61
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +277 -78
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.css +138 -24
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +334 -168
- package/dist/collection/components/xv-table/xv-table.css +240 -99
- package/dist/collection/components/xv-table/xv-table.js +2056 -63
- package/dist/collection/components/xv-table/xv-table.model.js +10 -0
- package/dist/collection/components/xv-table/xv-table.utils.js +243 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +1 -1
- package/dist/collection/components/xv-tag/xv-tag.js +1 -1
- package/dist/collection/components/xv-tag-combobox/xv-tag-combobox.js +2 -2
- package/dist/collection/components/xv-text-input/xv-text-input.js +2 -2
- package/dist/collection/components/xv-textarea/xv-textarea.js +2 -2
- package/dist/collection/components/xv-tile/xv-tile.js +2 -2
- package/dist/collection/components/xv-toggle/xv-toggle.js +1 -1
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +1 -1
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +2 -2
- package/dist/collection/utils/table-layout.js +130 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-B0kwaJ8n.js +1 -0
- package/dist/components/{p-CbVZCn2p.js → p-BEoh0dZI.js} +1 -1
- package/dist/components/{p-ZYJfCCwX.js → p-BaZ-srfu.js} +1 -1
- package/dist/components/{p-DyGMZIub.js → p-Bej2l-wN.js} +1 -1
- package/dist/components/{p-Ddx5DwV5.js → p-BfhvpeQh.js} +1 -1
- package/dist/components/{p-kQVUwJXZ.js → p-CSYnNMKb.js} +1 -1
- package/dist/components/{p-BNP2Lw34.js → p-CspyoLL9.js} +1 -1
- package/dist/components/p-CvgDDcjp.js +1 -0
- package/dist/components/{p-COoj5JkZ.js → p-D4FwGeDJ.js} +1 -1
- package/dist/components/p-DCvH_Br_.js +1 -0
- package/dist/components/{p-CEjlxnKY.js → p-DFe9Mtw_.js} +1 -1
- package/dist/components/{p-BRZwUlfE.js → p-DFtMwE-h.js} +1 -1
- package/dist/components/p-DIvi4fI3.js +1 -0
- package/dist/components/{p-DTwz9Fsh.js → p-DNRISLNf.js} +1 -1
- package/dist/components/p-DPnvoOYj.js +1 -0
- package/dist/components/{p-Dzz9jxLm.js → p-Dwbe941A.js} +1 -1
- package/dist/components/{p-CMAJWZsP.js → p-JClekcEh.js} +1 -1
- package/dist/components/{p-DtUNYh73.js → p-NoM9oIJn.js} +1 -1
- package/dist/components/{p-DlLBjhuH.js → p-XEk4dHG3.js} +1 -1
- package/dist/components/p-i7_81si-.js +1 -0
- package/dist/components/{p-BRYrLHiz.js → p-i82EFiq6.js} +1 -1
- package/dist/components/{p-BXB4D7j4.js → p-jD7nSJaM.js} +1 -1
- package/dist/components/xv-accordion-v2-item.js +1 -1
- package/dist/components/xv-accordion-v2.js +1 -1
- package/dist/components/xv-breadcrumbs-v2.js +1 -1
- package/dist/components/xv-button-group-v2.js +1 -1
- package/dist/components/xv-button-v2.js +1 -1
- package/dist/components/xv-card-v2.js +1 -1
- package/dist/components/xv-checkbox-v2.js +1 -1
- package/dist/components/xv-content-switcher-item-v2.js +1 -1
- package/dist/components/xv-content-switcher-v2.js +1 -1
- package/dist/components/xv-data-table-cell.js +1 -1
- package/dist/components/xv-data-table-collapse.js +1 -1
- package/dist/components/xv-data-table-row.js +1 -1
- package/dist/components/xv-data-table.js +2 -2
- package/dist/components/xv-date-picker.js +1 -1
- package/dist/components/xv-datepicker.js +1 -1
- package/dist/components/xv-dropdown-v2-item.js +1 -1
- package/dist/components/xv-dropdown-v2.js +1 -1
- package/dist/components/xv-file-uploader.js +1 -1
- package/dist/components/xv-footer.js +1 -1
- package/dist/components/xv-geo-map-v2.js +1 -1
- package/dist/components/xv-header-next.js +1 -1
- package/dist/components/xv-header.js +1 -1
- package/dist/components/xv-image-viewer.js +1 -1
- package/dist/components/xv-link-v2.js +1 -1
- package/dist/components/xv-loader-v2.js +1 -1
- package/dist/components/xv-login-modal.js +1 -1
- package/dist/components/xv-mega-menu-next.js +1 -1
- package/dist/components/xv-mega-menu.js +1 -1
- package/dist/components/xv-modal-v2.js +1 -1
- package/dist/components/xv-notification-v2.js +1 -1
- package/dist/components/xv-number-input-v2.js +1 -1
- package/dist/components/xv-overflow-menu-v2-item.js +1 -1
- package/dist/components/xv-overflow-menu-v2.js +1 -1
- package/dist/components/xv-pagination.js +1 -1
- package/dist/components/xv-progress-indicator-v2-item.js +1 -1
- package/dist/components/xv-progress-indicator-v2.js +1 -1
- package/dist/components/xv-radio-v2.js +1 -1
- package/dist/components/xv-slider-v2.js +1 -1
- package/dist/components/xv-tab-v2.js +1 -1
- package/dist/components/{xv-table-v2-row.d.ts → xv-table-cell.d.ts} +4 -4
- package/dist/components/xv-table-cell.js +1 -0
- package/dist/components/{xv-table-v2-cell.d.ts → xv-table-row.d.ts} +4 -4
- package/dist/components/xv-table-row.js +1 -0
- package/dist/components/{xv-table-v2.d.ts → xv-table.d.ts} +4 -4
- package/dist/components/xv-table.js +1 -0
- package/dist/components/xv-tabs-v2.js +1 -1
- package/dist/components/xv-tag-combobox.js +1 -1
- package/dist/components/xv-tag-v2.js +1 -1
- package/dist/components/xv-text-input-v2.js +1 -1
- package/dist/components/xv-textarea.js +1 -1
- package/dist/components/xv-tile.js +1 -1
- package/dist/components/xv-toggle-tip.js +1 -1
- package/dist/components/xv-toggle.js +1 -1
- package/dist/components/xv-tooltip-v2.js +1 -1
- package/dist/custom-elements.json +1765 -294
- package/dist/docs.json +2749 -443
- package/dist/esm/{index-B6cY-_U1.js → index-ClusqSO5.js} +1 -1
- package/dist/esm/{index-Bu8SrOeR.js → index-DJC3-dS3.js} +15 -10
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{xv-accordion-v2_50.entry.js → xv-accordion-v2_49.entry.js} +1527 -144
- package/dist/esm/xv-header-next.entry.js +2 -2
- package/dist/esm/xv-mega-menu-next.entry.js +2 -2
- package/dist/esm/xv-webcomponents.js +4 -4
- package/dist/react/components.d.ts +3 -4
- package/dist/react/components.js +3 -4
- package/dist/react/{xv-table-v2-expand.d.ts → xv-table-cell.d.ts} +3 -3
- package/dist/react/xv-table-cell.js +14 -0
- package/dist/react/{xv-table-v2.d.ts → xv-table-row.d.ts} +3 -3
- package/dist/react/{xv-table-v2.js → xv-table-row.js} +5 -5
- package/dist/react/xv-table.d.ts +18 -0
- package/dist/react/xv-table.js +22 -0
- package/dist/types/components/xv-table/xv-table-cell/xv-table-cell.d.ts +43 -8
- package/dist/types/components/xv-table/xv-table-row/xv-table-row.d.ts +57 -18
- package/dist/types/components/xv-table/xv-table.d.ts +298 -9
- package/dist/types/components/xv-table/xv-table.model.d.ts +78 -0
- package/dist/types/components/xv-table/xv-table.utils.d.ts +47 -0
- package/dist/types/components.d.ts +899 -118
- package/dist/types/stencil-public-runtime.d.ts +61 -55
- package/dist/types/utils/table-layout.d.ts +7 -0
- package/dist/vscode-data.json +347 -56
- package/dist/xv-webcomponents/index.esm.js +1 -1
- package/dist/xv-webcomponents/{p-1ffb0b4f.entry.js → p-0c30d09f.entry.js} +1 -1
- package/dist/xv-webcomponents/{p-eb9d7750.entry.js → p-6b58979e.entry.js} +2 -2
- package/dist/xv-webcomponents/{p-Bu8SrOeR.js → p-DJC3-dS3.js} +2 -2
- package/dist/xv-webcomponents/{p-DB4KqDJz.js → p-DSFVdw3w.js} +1 -1
- package/dist/xv-webcomponents/{p-d4d26ff2.entry.js → p-c4173686.entry.js} +1 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/package.json +139 -139
- package/dist/collection/components/xv-table/_vars.js +0 -2
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.css +0 -58
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +0 -75
- package/dist/components/p-CHtssNO9.js +0 -1
- package/dist/components/p-CILNPUHH.js +0 -1
- package/dist/components/p-DVZ2BlIP.js +0 -1
- package/dist/components/p-bdaoJ1tx.js +0 -1
- package/dist/components/xv-table-v2-cell.js +0 -1
- package/dist/components/xv-table-v2-expand.d.ts +0 -11
- package/dist/components/xv-table-v2-expand.js +0 -1
- package/dist/components/xv-table-v2-row.js +0 -1
- package/dist/components/xv-table-v2.js +0 -1
- package/dist/react/xv-table-v2-cell.d.ts +0 -12
- package/dist/react/xv-table-v2-cell.js +0 -14
- package/dist/react/xv-table-v2-expand.js +0 -14
- package/dist/react/xv-table-v2-row.d.ts +0 -13
- package/dist/react/xv-table-v2-row.js +0 -17
- package/dist/types/components/xv-table/_vars.d.ts +0 -15
- package/dist/types/components/xv-table/xv-table-expand/xv-table-expand.d.ts +0 -8
|
@@ -1,30 +1,65 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forEach, uidGenerator } from "../../../utils/utils";
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
3
2
|
import { XV_SORT_DIR } from "../../../types/enum";
|
|
3
|
+
/**
|
|
4
|
+
* One cell of a table row. It holds arbitrary markup — buttons, links, tags, nested components —
|
|
5
|
+
* which is why the table stays composed rather than driven only by data.
|
|
6
|
+
*
|
|
7
|
+
* In a header row it also carries the column affordances: the sort arrow, the drag grip and the
|
|
8
|
+
* resize handle. The table renders this same component in both modes, so a header written as
|
|
9
|
+
* markup can do everything a header built from `columns` can.
|
|
10
|
+
*
|
|
11
|
+
* @slot - The cell content.
|
|
12
|
+
* @part cell - The cell host.
|
|
13
|
+
* @part content - The wrapper the overflow rules are applied to.
|
|
14
|
+
* @part tooltip - The tooltip wrapper, present only when `tooltip` is set.
|
|
15
|
+
* @part grip - The column drag grip, in a header cell.
|
|
16
|
+
* @part resize - The column resize handle, in a header cell.
|
|
17
|
+
*/
|
|
4
18
|
export class XvTableCell {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
this.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.
|
|
19
|
+
constructor() {
|
|
20
|
+
/** Column this cell belongs to. Identifies it for sorting, resizing and the stored layout. */
|
|
21
|
+
this.columnId = '';
|
|
22
|
+
/** Horizontal alignment of the content. */
|
|
23
|
+
this.align = 'start';
|
|
24
|
+
/** How content wider than the column behaves. */
|
|
25
|
+
this.overflow = 'ellipsis';
|
|
26
|
+
/** Lines kept before clamping, when `overflow` is `clamp`. */
|
|
27
|
+
this.clampLines = 2;
|
|
28
|
+
/** Tooltip shown on hover. Only a cell that sets it pays for the tooltip component. */
|
|
29
|
+
this.tooltip = '';
|
|
30
|
+
/** Column width. Read off the header row when the table has no `columns`. Any CSS length. */
|
|
31
|
+
this.width = '';
|
|
32
|
+
/** Renders the cell as a column header. Set by the table from the row it sits in. */
|
|
33
|
+
this.header = false;
|
|
34
|
+
/** Offers the sort affordance. A header cell only. */
|
|
35
|
+
this.sortable = false;
|
|
36
|
+
/** Direction currently sorted by; empty when this column is not the active one. */
|
|
37
|
+
this.sortDirection = '';
|
|
38
|
+
/** Lets the column picker hide this column. A header cell only. */
|
|
39
|
+
this.hideable = false;
|
|
40
|
+
/** Offers the resize handle. A header cell only. */
|
|
41
|
+
this.resizable = false;
|
|
42
|
+
/** Offers the drag grip. A header cell only. */
|
|
43
|
+
this.reorderable = false;
|
|
44
|
+
/** Accessible name of the drag grip. */
|
|
45
|
+
this.reorderLabel = 'Drag to reorder';
|
|
46
|
+
}
|
|
47
|
+
get ariaSort() {
|
|
48
|
+
if (!this.header || !this.sortable)
|
|
49
|
+
return null;
|
|
50
|
+
if (this.sortDirection === XV_SORT_DIR.ASC)
|
|
51
|
+
return 'ascending';
|
|
52
|
+
if (this.sortDirection === XV_SORT_DIR.DESC)
|
|
53
|
+
return 'descending';
|
|
54
|
+
return 'none';
|
|
22
55
|
}
|
|
23
|
-
;
|
|
24
56
|
render() {
|
|
25
|
-
|
|
57
|
+
const content = (h("div", { key: 'eefd1609b456cdcc9e802c27e524613b64a9ce39', class: "content", part: "content", style: this.overflow === 'clamp' ? { '--xv-table-cell-clamp': `${this.clampLines}` } : undefined }, h("slot", { key: 'a00460b7e2fbf775c7607af68b078a4fcff70c11' })));
|
|
58
|
+
return (h(Host, { key: '54976b9c9740d576bb4a81a15af65aa79a2f0888', role: this.header ? 'columnheader' : 'cell', part: "cell", "aria-sort": this.ariaSort, tabindex: this.header && this.sortable ? 0 : null }, this.header && this.reorderable && h("span", { key: 'f443393d1ea62a0c94bfa59b77c377bf5fc04a66', class: "grip", part: "grip", "aria-label": this.reorderLabel }), this.tooltip ? (
|
|
59
|
+
// Popper puts the panel on document.body, so the scroll container cannot clip it.
|
|
60
|
+
h("xv-tooltip-v2", { part: "tooltip", dashed: true, position: "top-start", message: this.tooltip }, content)) : (content), this.header && this.sortable && h("span", { key: 'c26fa895c0a9a17cbe6c33c68f9e14b05781554e', class: "sort", "aria-hidden": "true" }), this.header && this.resizable && h("span", { key: '37fa59799c363ed83f2dd0052b3203aa3bf01a6c', class: "resize", part: "resize", "aria-hidden": "true" })));
|
|
26
61
|
}
|
|
27
|
-
static get is() { return "xv-table-
|
|
62
|
+
static get is() { return "xv-table-cell"; }
|
|
28
63
|
static get encapsulation() { return "shadow"; }
|
|
29
64
|
static get originalStyleUrls() {
|
|
30
65
|
return {
|
|
@@ -38,66 +73,183 @@ export class XvTableCell {
|
|
|
38
73
|
}
|
|
39
74
|
static get properties() {
|
|
40
75
|
return {
|
|
41
|
-
"
|
|
42
|
-
"type": "
|
|
76
|
+
"columnId": {
|
|
77
|
+
"type": "string",
|
|
43
78
|
"mutable": false,
|
|
44
79
|
"complexType": {
|
|
45
|
-
"original": "
|
|
46
|
-
"resolved": "
|
|
80
|
+
"original": "string",
|
|
81
|
+
"resolved": "string",
|
|
47
82
|
"references": {}
|
|
48
83
|
},
|
|
49
84
|
"required": false,
|
|
50
|
-
"optional":
|
|
85
|
+
"optional": false,
|
|
86
|
+
"docs": {
|
|
87
|
+
"tags": [],
|
|
88
|
+
"text": "Column this cell belongs to. Identifies it for sorting, resizing and the stored layout."
|
|
89
|
+
},
|
|
90
|
+
"getter": false,
|
|
91
|
+
"setter": false,
|
|
92
|
+
"reflect": true,
|
|
93
|
+
"attribute": "column-id",
|
|
94
|
+
"defaultValue": "''"
|
|
95
|
+
},
|
|
96
|
+
"align": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"mutable": false,
|
|
99
|
+
"complexType": {
|
|
100
|
+
"original": "XvCellAlign",
|
|
101
|
+
"resolved": "\"center\" | \"end\" | \"start\"",
|
|
102
|
+
"references": {
|
|
103
|
+
"XvCellAlign": {
|
|
104
|
+
"location": "import",
|
|
105
|
+
"path": "../xv-table.model",
|
|
106
|
+
"id": "src/components/xv-table/xv-table.model.ts::XvCellAlign",
|
|
107
|
+
"referenceLocation": "XvCellAlign"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"required": false,
|
|
112
|
+
"optional": false,
|
|
113
|
+
"docs": {
|
|
114
|
+
"tags": [],
|
|
115
|
+
"text": "Horizontal alignment of the content."
|
|
116
|
+
},
|
|
117
|
+
"getter": false,
|
|
118
|
+
"setter": false,
|
|
119
|
+
"reflect": true,
|
|
120
|
+
"attribute": "align",
|
|
121
|
+
"defaultValue": "'start'"
|
|
122
|
+
},
|
|
123
|
+
"overflow": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"mutable": false,
|
|
126
|
+
"complexType": {
|
|
127
|
+
"original": "XvCellOverflow",
|
|
128
|
+
"resolved": "\"clamp\" | \"ellipsis\" | \"wrap\"",
|
|
129
|
+
"references": {
|
|
130
|
+
"XvCellOverflow": {
|
|
131
|
+
"location": "import",
|
|
132
|
+
"path": "../xv-table.model",
|
|
133
|
+
"id": "src/components/xv-table/xv-table.model.ts::XvCellOverflow",
|
|
134
|
+
"referenceLocation": "XvCellOverflow"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": false,
|
|
139
|
+
"optional": false,
|
|
51
140
|
"docs": {
|
|
52
141
|
"tags": [],
|
|
53
|
-
"text": ""
|
|
142
|
+
"text": "How content wider than the column behaves."
|
|
54
143
|
},
|
|
55
144
|
"getter": false,
|
|
56
145
|
"setter": false,
|
|
57
146
|
"reflect": true,
|
|
58
|
-
"attribute": "
|
|
147
|
+
"attribute": "overflow",
|
|
148
|
+
"defaultValue": "'ellipsis'"
|
|
59
149
|
},
|
|
60
|
-
"
|
|
150
|
+
"clampLines": {
|
|
151
|
+
"type": "number",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "number",
|
|
155
|
+
"resolved": "number",
|
|
156
|
+
"references": {}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": false,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": "Lines kept before clamping, when `overflow` is `clamp`."
|
|
163
|
+
},
|
|
164
|
+
"getter": false,
|
|
165
|
+
"setter": false,
|
|
166
|
+
"reflect": false,
|
|
167
|
+
"attribute": "clamp-lines",
|
|
168
|
+
"defaultValue": "2"
|
|
169
|
+
},
|
|
170
|
+
"tooltip": {
|
|
61
171
|
"type": "string",
|
|
62
|
-
"mutable":
|
|
172
|
+
"mutable": false,
|
|
63
173
|
"complexType": {
|
|
64
174
|
"original": "string",
|
|
65
175
|
"resolved": "string",
|
|
66
176
|
"references": {}
|
|
67
177
|
},
|
|
68
178
|
"required": false,
|
|
69
|
-
"optional":
|
|
179
|
+
"optional": false,
|
|
70
180
|
"docs": {
|
|
71
181
|
"tags": [],
|
|
72
|
-
"text": ""
|
|
182
|
+
"text": "Tooltip shown on hover. Only a cell that sets it pays for the tooltip component."
|
|
73
183
|
},
|
|
74
184
|
"getter": false,
|
|
75
185
|
"setter": false,
|
|
76
|
-
"reflect":
|
|
77
|
-
"attribute": "
|
|
186
|
+
"reflect": false,
|
|
187
|
+
"attribute": "tooltip",
|
|
188
|
+
"defaultValue": "''"
|
|
78
189
|
},
|
|
79
|
-
"
|
|
190
|
+
"width": {
|
|
80
191
|
"type": "string",
|
|
81
192
|
"mutable": false,
|
|
82
193
|
"complexType": {
|
|
83
|
-
"original": "
|
|
84
|
-
"resolved": "
|
|
194
|
+
"original": "string",
|
|
195
|
+
"resolved": "string",
|
|
196
|
+
"references": {}
|
|
197
|
+
},
|
|
198
|
+
"required": false,
|
|
199
|
+
"optional": false,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": "Column width. Read off the header row when the table has no `columns`. Any CSS length."
|
|
203
|
+
},
|
|
204
|
+
"getter": false,
|
|
205
|
+
"setter": false,
|
|
206
|
+
"reflect": false,
|
|
207
|
+
"attribute": "width",
|
|
208
|
+
"defaultValue": "''"
|
|
209
|
+
},
|
|
210
|
+
"header": {
|
|
211
|
+
"type": "boolean",
|
|
212
|
+
"mutable": false,
|
|
213
|
+
"complexType": {
|
|
214
|
+
"original": "boolean",
|
|
215
|
+
"resolved": "boolean",
|
|
216
|
+
"references": {}
|
|
217
|
+
},
|
|
218
|
+
"required": false,
|
|
219
|
+
"optional": false,
|
|
220
|
+
"docs": {
|
|
221
|
+
"tags": [],
|
|
222
|
+
"text": "Renders the cell as a column header. Set by the table from the row it sits in."
|
|
223
|
+
},
|
|
224
|
+
"getter": false,
|
|
225
|
+
"setter": false,
|
|
226
|
+
"reflect": true,
|
|
227
|
+
"attribute": "header",
|
|
228
|
+
"defaultValue": "false"
|
|
229
|
+
},
|
|
230
|
+
"sortable": {
|
|
231
|
+
"type": "boolean",
|
|
232
|
+
"mutable": false,
|
|
233
|
+
"complexType": {
|
|
234
|
+
"original": "boolean",
|
|
235
|
+
"resolved": "boolean",
|
|
85
236
|
"references": {}
|
|
86
237
|
},
|
|
87
238
|
"required": false,
|
|
88
|
-
"optional":
|
|
239
|
+
"optional": false,
|
|
89
240
|
"docs": {
|
|
90
241
|
"tags": [],
|
|
91
|
-
"text": ""
|
|
242
|
+
"text": "Offers the sort affordance. A header cell only."
|
|
92
243
|
},
|
|
93
244
|
"getter": false,
|
|
94
245
|
"setter": false,
|
|
95
246
|
"reflect": true,
|
|
96
|
-
"attribute": "
|
|
247
|
+
"attribute": "sortable",
|
|
248
|
+
"defaultValue": "false"
|
|
97
249
|
},
|
|
98
|
-
"
|
|
250
|
+
"sortDirection": {
|
|
99
251
|
"type": "string",
|
|
100
|
-
"mutable":
|
|
252
|
+
"mutable": false,
|
|
101
253
|
"complexType": {
|
|
102
254
|
"original": "XV_SORT_DIR | ''",
|
|
103
255
|
"resolved": "\"\" | XV_SORT_DIR.ASC | XV_SORT_DIR.DESC | XV_SORT_DIR.NONE",
|
|
@@ -111,51 +263,98 @@ export class XvTableCell {
|
|
|
111
263
|
}
|
|
112
264
|
},
|
|
113
265
|
"required": false,
|
|
114
|
-
"optional":
|
|
266
|
+
"optional": false,
|
|
115
267
|
"docs": {
|
|
116
268
|
"tags": [],
|
|
117
|
-
"text": ""
|
|
269
|
+
"text": "Direction currently sorted by; empty when this column is not the active one."
|
|
118
270
|
},
|
|
119
271
|
"getter": false,
|
|
120
272
|
"setter": false,
|
|
121
273
|
"reflect": true,
|
|
122
|
-
"attribute": "sort"
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
274
|
+
"attribute": "sort-direction",
|
|
275
|
+
"defaultValue": "''"
|
|
276
|
+
},
|
|
277
|
+
"hideable": {
|
|
278
|
+
"type": "boolean",
|
|
279
|
+
"mutable": false,
|
|
280
|
+
"complexType": {
|
|
281
|
+
"original": "boolean",
|
|
282
|
+
"resolved": "boolean",
|
|
283
|
+
"references": {}
|
|
284
|
+
},
|
|
285
|
+
"required": false,
|
|
286
|
+
"optional": false,
|
|
133
287
|
"docs": {
|
|
134
288
|
"tags": [],
|
|
135
|
-
"text": ""
|
|
289
|
+
"text": "Lets the column picker hide this column. A header cell only."
|
|
136
290
|
},
|
|
291
|
+
"getter": false,
|
|
292
|
+
"setter": false,
|
|
293
|
+
"reflect": true,
|
|
294
|
+
"attribute": "hideable",
|
|
295
|
+
"defaultValue": "false"
|
|
296
|
+
},
|
|
297
|
+
"resizable": {
|
|
298
|
+
"type": "boolean",
|
|
299
|
+
"mutable": false,
|
|
137
300
|
"complexType": {
|
|
138
|
-
"original": "
|
|
139
|
-
"resolved": "
|
|
140
|
-
"references": {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
301
|
+
"original": "boolean",
|
|
302
|
+
"resolved": "boolean",
|
|
303
|
+
"references": {}
|
|
304
|
+
},
|
|
305
|
+
"required": false,
|
|
306
|
+
"optional": false,
|
|
307
|
+
"docs": {
|
|
308
|
+
"tags": [],
|
|
309
|
+
"text": "Offers the resize handle. A header cell only."
|
|
310
|
+
},
|
|
311
|
+
"getter": false,
|
|
312
|
+
"setter": false,
|
|
313
|
+
"reflect": true,
|
|
314
|
+
"attribute": "resizable",
|
|
315
|
+
"defaultValue": "false"
|
|
316
|
+
},
|
|
317
|
+
"reorderable": {
|
|
318
|
+
"type": "boolean",
|
|
319
|
+
"mutable": false,
|
|
320
|
+
"complexType": {
|
|
321
|
+
"original": "boolean",
|
|
322
|
+
"resolved": "boolean",
|
|
323
|
+
"references": {}
|
|
324
|
+
},
|
|
325
|
+
"required": false,
|
|
326
|
+
"optional": false,
|
|
327
|
+
"docs": {
|
|
328
|
+
"tags": [],
|
|
329
|
+
"text": "Offers the drag grip. A header cell only."
|
|
330
|
+
},
|
|
331
|
+
"getter": false,
|
|
332
|
+
"setter": false,
|
|
333
|
+
"reflect": true,
|
|
334
|
+
"attribute": "reorderable",
|
|
335
|
+
"defaultValue": "false"
|
|
336
|
+
},
|
|
337
|
+
"reorderLabel": {
|
|
338
|
+
"type": "string",
|
|
339
|
+
"mutable": false,
|
|
340
|
+
"complexType": {
|
|
341
|
+
"original": "string",
|
|
342
|
+
"resolved": "string",
|
|
343
|
+
"references": {}
|
|
344
|
+
},
|
|
345
|
+
"required": false,
|
|
346
|
+
"optional": false,
|
|
347
|
+
"docs": {
|
|
348
|
+
"tags": [],
|
|
349
|
+
"text": "Accessible name of the drag grip."
|
|
350
|
+
},
|
|
351
|
+
"getter": false,
|
|
352
|
+
"setter": false,
|
|
353
|
+
"reflect": false,
|
|
354
|
+
"attribute": "reorder-label",
|
|
355
|
+
"defaultValue": "'Drag to reorder'"
|
|
356
|
+
}
|
|
357
|
+
};
|
|
150
358
|
}
|
|
151
359
|
static get elementRef() { return "el"; }
|
|
152
|
-
static get listeners() {
|
|
153
|
-
return [{
|
|
154
|
-
"name": "click",
|
|
155
|
-
"method": "handleSort",
|
|
156
|
-
"target": undefined,
|
|
157
|
-
"capture": false,
|
|
158
|
-
"passive": false
|
|
159
|
-
}];
|
|
160
|
-
}
|
|
161
360
|
}
|
|
@@ -1,39 +1,153 @@
|
|
|
1
1
|
:host {
|
|
2
|
+
/**
|
|
3
|
+
* @prop --xv-table-row-bg: Row background. Switched by hover, selected and group.
|
|
4
|
+
* @prop --xv-table-row-height: Minimum row height. Inherited from the table's size ladder.
|
|
5
|
+
* @prop --xv-table-row-disabled-opacity: How far a disabled row fades.
|
|
6
|
+
*/
|
|
7
|
+
--xv-table-row-bg: var(--layer-02);
|
|
8
|
+
--xv-table-row-height: var(--xv-table-height, 40px);
|
|
9
|
+
--xv-table-row-disabled-opacity: 0.5;
|
|
10
|
+
grid-column: 1/-1;
|
|
2
11
|
display: grid;
|
|
3
|
-
grid-template-columns:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
align-items: center;
|
|
9
|
-
align-content: center;
|
|
10
|
-
transition: 0.25s ease-in-out background-color;
|
|
12
|
+
grid-template-columns: subgrid;
|
|
13
|
+
align-items: stretch;
|
|
14
|
+
min-height: var(--xv-table-row-height);
|
|
15
|
+
background: var(--xv-table-row-bg);
|
|
16
|
+
box-shadow: inset 0 -1px 0 0 var(--border-subtle-00);
|
|
11
17
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
|
|
19
|
+
@supports not (grid-template-columns: subgrid) {
|
|
20
|
+
:host {
|
|
21
|
+
display: contents;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
:host([hover]:not([disabled]):hover) {
|
|
25
|
+
--xv-table-row-bg: var(--layer-hover-01);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([selected]) {
|
|
29
|
+
--xv-table-row-bg: var(--layer-selected-01);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host([selected][hover]:hover) {
|
|
33
|
+
--xv-table-row-bg: var(--layer-selected-hover-01);
|
|
17
34
|
}
|
|
18
35
|
|
|
19
|
-
:host([
|
|
20
|
-
|
|
36
|
+
:host([row-reorderable][draggable=true]) {
|
|
37
|
+
cursor: grab;
|
|
21
38
|
}
|
|
22
39
|
|
|
23
|
-
:host(
|
|
24
|
-
|
|
40
|
+
:host(.is-dragging) {
|
|
41
|
+
opacity: 0.4;
|
|
25
42
|
}
|
|
26
43
|
|
|
27
|
-
:host(
|
|
28
|
-
|
|
44
|
+
:host(.drop-above) {
|
|
45
|
+
box-shadow: inset 0 2px 0 0 var(--interactive-01);
|
|
29
46
|
}
|
|
30
47
|
|
|
31
|
-
:host(
|
|
32
|
-
|
|
48
|
+
:host(.drop-below) {
|
|
49
|
+
box-shadow: inset 0 -2px 0 0 var(--interactive-01);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host([group]) {
|
|
53
|
+
--xv-table-row-bg: var(--layer-accent-01);
|
|
54
|
+
font-weight: 600;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:host(.has-children) {
|
|
58
|
+
--xv-table-row-bg: var(--layer-accent-01);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:host(.has-children[hover]:hover) {
|
|
62
|
+
--xv-table-row-bg: var(--layer-accent-hover-01);
|
|
33
63
|
}
|
|
34
64
|
|
|
35
65
|
:host([header]) {
|
|
36
|
-
|
|
37
|
-
box-shadow: 0 0 0
|
|
38
|
-
|
|
66
|
+
--xv-table-row-bg: var(--xv-table-header-bg, var(--layer-accent-01));
|
|
67
|
+
box-shadow: inset 0 -1px 0 0 var(--border-subtle-01);
|
|
68
|
+
font-weight: 600;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host([disabled]:not([header])) {
|
|
72
|
+
cursor: not-allowed;
|
|
73
|
+
color: var(--text-disabled);
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
opacity: var(--xv-table-row-disabled-opacity);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.control {
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
padding: 0 var(--spacing-03);
|
|
83
|
+
}
|
|
84
|
+
.control--grip {
|
|
85
|
+
order: -3;
|
|
86
|
+
}
|
|
87
|
+
.control--expand {
|
|
88
|
+
order: -2;
|
|
89
|
+
}
|
|
90
|
+
.control--lead {
|
|
91
|
+
order: -1;
|
|
92
|
+
}
|
|
93
|
+
.control_grip {
|
|
94
|
+
width: 8px;
|
|
95
|
+
height: 14px;
|
|
96
|
+
opacity: 0.4;
|
|
97
|
+
cursor: grab;
|
|
98
|
+
background-image: radial-gradient(currentColor 1px, transparent 1px);
|
|
99
|
+
background-size: 4px 4px;
|
|
100
|
+
}
|
|
101
|
+
.control_grip:active {
|
|
102
|
+
cursor: grabbing;
|
|
103
|
+
}
|
|
104
|
+
.control_expand {
|
|
105
|
+
width: 24px;
|
|
106
|
+
height: 24px;
|
|
107
|
+
padding: 0;
|
|
108
|
+
border: 0;
|
|
109
|
+
background: none;
|
|
110
|
+
color: var(--icon-primary);
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
}
|
|
113
|
+
.control_expand::before {
|
|
114
|
+
content: "";
|
|
115
|
+
display: block;
|
|
116
|
+
width: 8px;
|
|
117
|
+
height: 8px;
|
|
118
|
+
margin: 0 auto;
|
|
119
|
+
border-right: 1px solid currentColor;
|
|
120
|
+
border-bottom: 1px solid currentColor;
|
|
121
|
+
transform: rotate(45deg) translate(-2px, -2px);
|
|
122
|
+
transition: transform 0.15s ease;
|
|
123
|
+
}
|
|
124
|
+
.control_expand.open::before {
|
|
125
|
+
transform: rotate(-135deg) translate(-2px, -2px);
|
|
126
|
+
}
|
|
127
|
+
.control_expand:disabled {
|
|
128
|
+
color: var(--icon-disabled);
|
|
129
|
+
cursor: not-allowed;
|
|
130
|
+
}
|
|
131
|
+
.control_expand:focus-visible {
|
|
132
|
+
outline: 2px solid var(--focus);
|
|
133
|
+
outline-offset: 0;
|
|
134
|
+
}
|
|
135
|
+
.control_expand:focus-visible {
|
|
136
|
+
outline-offset: -2px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.expand {
|
|
140
|
+
order: 10000;
|
|
141
|
+
grid-column: 1/-1;
|
|
142
|
+
padding: var(--spacing-05);
|
|
143
|
+
background: var(--layer-01);
|
|
144
|
+
box-shadow: inset 0 1px 0 0 var(--border-subtle-00);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.expand[hidden] {
|
|
148
|
+
display: none;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
:host([hidden]) {
|
|
152
|
+
display: none;
|
|
39
153
|
}
|