xv-webcomponents 0.1.29 → 0.1.31
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/dist/cjs/{index-782b9733.js → index-5ee1b884.js} +43 -2
- package/dist/cjs/index-5ee1b884.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{utils-aa46f72a.js → utils-22c0eda0.js} +1 -16
- package/dist/cjs/utils-22c0eda0.js.map +1 -0
- package/dist/cjs/{xv-accordion-v2_28.cjs.entry.js → xv-accordion-v2_26.cjs.entry.js} +124 -429
- package/dist/cjs/xv-accordion-v2_26.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js +1 -1
- package/dist/cjs/xv-webcomponents.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -3
- package/dist/collection/components/xv-checkbox/xv-checkbox.css +4 -1
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +1 -1
- package/dist/collection/components/xv-checkbox/xv-checkbox.js.map +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.css +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +1 -2
- package/dist/collection/components/xv-dropdown/xv-dropdown.js.map +1 -1
- package/dist/collection/components/xv-footer/xv-footer.js +1 -1
- package/dist/collection/components/xv-header/xv-header.js +1 -1
- package/dist/collection/components/xv-link/xv-link.js +1 -1
- package/dist/collection/components/xv-modal/xv-modal.css +5 -4
- package/dist/collection/components/xv-modal/xv-modal.js +1 -1
- package/dist/collection/components/xv-modal/xv-modal.js.map +1 -1
- package/dist/collection/components/xv-notification/xv-notification.js +1 -1
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +1 -1
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +2 -2
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js.map +1 -1
- package/dist/collection/components/xv-table/_vars.js +9 -0
- package/dist/collection/components/xv-table/_vars.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.css +86 -0
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +160 -0
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.css +55 -114
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +28 -151
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js.map +1 -1
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.css +22 -36
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +146 -118
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js.map +1 -1
- package/dist/collection/components/xv-table/xv-table.css +83 -141
- package/dist/collection/components/xv-table/xv-table.js +56 -208
- package/dist/collection/components/xv-table/xv-table.js.map +1 -1
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +3 -3
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js.map +1 -1
- package/dist/collection/components/xv-tabs/xv-tabs.css +5 -3
- package/dist/collection/components/xv-tabs/xv-tabs.js +8 -36
- package/dist/collection/components/xv-tabs/xv-tabs.js.map +1 -1
- package/dist/collection/components/xv-tag/xv-tag.js +1 -1
- package/dist/collection/components/xv-text-input/xv-text-input.js +10 -10
- package/dist/collection/components/xv-text-input/xv-text-input.js.map +1 -1
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +1 -1
- package/dist/esm/{index-83ab73b7.js → index-590eb7d2.js} +43 -3
- package/dist/esm/index-590eb7d2.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-0d1c18d5.js → utils-a9c71376.js} +2 -16
- package/dist/esm/utils-a9c71376.js.map +1 -0
- package/dist/esm/{xv-accordion-v2_28.entry.js → xv-accordion-v2_26.entry.js} +124 -427
- package/dist/esm/xv-accordion-v2_26.entry.js.map +1 -0
- package/dist/esm/xv-breadcrumbs-v2.entry.js +1 -1
- package/dist/esm/xv-webcomponents.js +3 -3
- package/dist/types/components/xv-table/_vars.d.ts +15 -0
- package/dist/types/components/xv-table/xv-table-cell/xv-table-cell.d.ts +15 -0
- package/dist/types/components/xv-table/xv-table-expand/xv-table-expand.d.ts +4 -20
- package/dist/types/components/xv-table/xv-table-row/xv-table-row.d.ts +15 -46
- package/dist/types/components/xv-table/xv-table.d.ts +9 -32
- package/dist/types/components/xv-tabs/xv-tabs.d.ts +1 -10
- package/dist/types/components.d.ts +57 -273
- package/dist/xv-webcomponents/index.esm.js +1 -1
- package/dist/xv-webcomponents/p-612356e6.js +3 -0
- package/dist/xv-webcomponents/p-612356e6.js.map +1 -0
- package/dist/xv-webcomponents/p-c09a0bfe.entry.js +2 -0
- package/dist/xv-webcomponents/p-e750290d.entry.js +2 -0
- package/dist/xv-webcomponents/p-e750290d.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-f98a1845.js +2 -0
- package/dist/xv-webcomponents/p-f98a1845.js.map +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/index-782b9733.js.map +0 -1
- package/dist/cjs/utils-aa46f72a.js.map +0 -1
- package/dist/cjs/xv-accordion-v2_28.cjs.entry.js.map +0 -1
- package/dist/collection/components/xv-table/defs.js +0 -28
- package/dist/collection/components/xv-table/defs.js.map +0 -1
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.css +0 -13
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.js +0 -111
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.js.map +0 -1
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.css +0 -80
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.js +0 -172
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.js.map +0 -1
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.css +0 -47
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.js +0 -78
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.js.map +0 -1
- package/dist/esm/index-83ab73b7.js.map +0 -1
- package/dist/esm/utils-0d1c18d5.js.map +0 -1
- package/dist/esm/xv-accordion-v2_28.entry.js.map +0 -1
- package/dist/types/components/xv-table/defs.d.ts +0 -38
- package/dist/types/components/xv-table/xv-table-col/xv-table-col.d.ts +0 -9
- package/dist/types/components/xv-table/xv-table-header-row/xv-table-header-row.d.ts +0 -28
- package/dist/types/components/xv-table/xv-table-toolbar/xv-table-toolbar.d.ts +0 -6
- package/dist/xv-webcomponents/p-39bf1511.js +0 -2
- package/dist/xv-webcomponents/p-39bf1511.js.map +0 -1
- package/dist/xv-webcomponents/p-5f18d718.entry.js +0 -2
- package/dist/xv-webcomponents/p-840929c5.js +0 -3
- package/dist/xv-webcomponents/p-840929c5.js.map +0 -1
- package/dist/xv-webcomponents/p-cc83f7ea.entry.js +0 -2
- package/dist/xv-webcomponents/p-cc83f7ea.entry.js.map +0 -1
- /package/dist/xv-webcomponents/{p-5f18d718.entry.js.map → p-c09a0bfe.entry.js.map} +0 -0
|
@@ -1,116 +1,57 @@
|
|
|
1
|
-
:host
|
|
2
|
-
:
|
|
3
|
-
:
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
:host
|
|
7
|
-
:
|
|
8
|
-
:
|
|
9
|
-
--xv-table-
|
|
10
|
-
|
|
11
|
-
:
|
|
12
|
-
:
|
|
13
|
-
:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
:
|
|
17
|
-
:
|
|
18
|
-
:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
:
|
|
22
|
-
:
|
|
23
|
-
:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
:
|
|
27
|
-
|
|
28
|
-
:host
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
:host
|
|
33
|
-
:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
:host ::slotted(xv-table-v2-header-row[cols="8"]),
|
|
37
|
-
:host ::slotted(xv-table-v2-row[cols="8"]),
|
|
38
|
-
:host ::slotted(xv-table-v2-expand[cols="8"]) {
|
|
39
|
-
--xv-table-cols: 8;
|
|
40
|
-
}
|
|
41
|
-
:host ::slotted(xv-table-v2-header-row[cols="9"]),
|
|
42
|
-
:host ::slotted(xv-table-v2-row[cols="9"]),
|
|
43
|
-
:host ::slotted(xv-table-v2-expand[cols="9"]) {
|
|
44
|
-
--xv-table-cols: 9;
|
|
45
|
-
}
|
|
46
|
-
:host ::slotted(xv-table-v2-header-row[cols="10"]),
|
|
47
|
-
:host ::slotted(xv-table-v2-row[cols="10"]),
|
|
48
|
-
:host ::slotted(xv-table-v2-expand[cols="10"]) {
|
|
49
|
-
--xv-table-cols: 10;
|
|
50
|
-
}
|
|
51
|
-
:host ::slotted(xv-table-v2-header-row[cols="11"]),
|
|
52
|
-
:host ::slotted(xv-table-v2-row[cols="11"]),
|
|
53
|
-
:host ::slotted(xv-table-v2-expand[cols="11"]) {
|
|
54
|
-
--xv-table-cols: 11;
|
|
55
|
-
}
|
|
56
|
-
:host ::slotted(xv-table-v2-header-row[cols="12"]),
|
|
57
|
-
:host ::slotted(xv-table-v2-row[cols="12"]),
|
|
58
|
-
:host ::slotted(xv-table-v2-expand[cols="12"]) {
|
|
59
|
-
--xv-table-cols: 12;
|
|
60
|
-
}
|
|
61
|
-
:host ::slotted(xv-table-v2-header-row[cols="13"]),
|
|
62
|
-
:host ::slotted(xv-table-v2-row[cols="13"]),
|
|
63
|
-
:host ::slotted(xv-table-v2-expand[cols="13"]) {
|
|
64
|
-
--xv-table-cols: 13;
|
|
65
|
-
}
|
|
66
|
-
:host ::slotted(xv-table-v2-header-row[cols="14"]),
|
|
67
|
-
:host ::slotted(xv-table-v2-row[cols="14"]),
|
|
68
|
-
:host ::slotted(xv-table-v2-expand[cols="14"]) {
|
|
69
|
-
--xv-table-cols: 14;
|
|
70
|
-
}
|
|
71
|
-
:host ::slotted(xv-table-v2-header-row[cols="15"]),
|
|
72
|
-
:host ::slotted(xv-table-v2-row[cols="15"]),
|
|
73
|
-
:host ::slotted(xv-table-v2-expand[cols="15"]) {
|
|
74
|
-
--xv-table-cols: 15;
|
|
75
|
-
}
|
|
76
|
-
:host ::slotted(xv-table-v2-header-row[cols="16"]),
|
|
77
|
-
:host ::slotted(xv-table-v2-row[cols="16"]),
|
|
78
|
-
:host ::slotted(xv-table-v2-expand[cols="16"]) {
|
|
79
|
-
--xv-table-cols: 16;
|
|
80
|
-
}
|
|
81
|
-
:host ::slotted(xv-table-v2-header-row[cols="17"]),
|
|
82
|
-
:host ::slotted(xv-table-v2-row[cols="17"]),
|
|
83
|
-
:host ::slotted(xv-table-v2-expand[cols="17"]) {
|
|
84
|
-
--xv-table-cols: 17;
|
|
85
|
-
}
|
|
86
|
-
:host ::slotted(xv-table-v2-header-row[cols="18"]),
|
|
87
|
-
:host ::slotted(xv-table-v2-row[cols="18"]),
|
|
88
|
-
:host ::slotted(xv-table-v2-expand[cols="18"]) {
|
|
89
|
-
--xv-table-cols: 18;
|
|
90
|
-
}
|
|
91
|
-
:host ::slotted(xv-table-v2-header-row[cols="19"]),
|
|
92
|
-
:host ::slotted(xv-table-v2-row[cols="19"]),
|
|
93
|
-
:host ::slotted(xv-table-v2-expand[cols="19"]) {
|
|
94
|
-
--xv-table-cols: 19;
|
|
95
|
-
}
|
|
96
|
-
:host ::slotted(xv-table-v2-header-row[cols="20"]),
|
|
97
|
-
:host ::slotted(xv-table-v2-row[cols="20"]),
|
|
98
|
-
:host ::slotted(xv-table-v2-expand[cols="20"]) {
|
|
99
|
-
--xv-table-cols: 20;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
:host(xv-table-v2-expand) ::slotted(xv-table-v2-row) {
|
|
103
|
-
block-size: auto;
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
position: relative;
|
|
4
|
+
transition: 0.25s ease-in-out background-color;
|
|
5
|
+
}
|
|
6
|
+
:host .expand-btn {
|
|
7
|
+
z-index: 9;
|
|
8
|
+
position: absolute;
|
|
9
|
+
left: max(10px, var(--xv-table-padding-x));
|
|
10
|
+
top: max(2px, var(--xv-table-padding-y) + 2px);
|
|
11
|
+
background-color: transparent;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
outline: none;
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
display: block;
|
|
18
|
+
width: 8.5px;
|
|
19
|
+
height: 8.5px;
|
|
20
|
+
border-top: none;
|
|
21
|
+
border-left: none;
|
|
22
|
+
border-right: 2px solid var(--icon-primary, #333);
|
|
23
|
+
border-bottom: 2px solid var(--icon-primary, #333);
|
|
24
|
+
transform: rotate(45deg);
|
|
25
|
+
transform-origin: center center;
|
|
26
|
+
transition: 0.2s ease-in-out transform;
|
|
27
|
+
}
|
|
28
|
+
:host .expand-btn:disabled {
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
opacity: 0.5;
|
|
31
|
+
}
|
|
32
|
+
:host .expand-btn.open {
|
|
33
|
+
transform: rotate(-135deg);
|
|
34
|
+
}
|
|
35
|
+
:host .expandableContent {
|
|
104
36
|
overflow: hidden;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
:
|
|
115
|
-
|
|
37
|
+
margin: 0;
|
|
38
|
+
padding: 0;
|
|
39
|
+
max-height: 0;
|
|
40
|
+
transition: 250ms ease max-height;
|
|
41
|
+
}
|
|
42
|
+
:host .expandableContent.open {
|
|
43
|
+
max-height: 600px;
|
|
44
|
+
}
|
|
45
|
+
:host ::slotted([slot=expandable]) {
|
|
46
|
+
display: grid;
|
|
47
|
+
align-items: center;
|
|
48
|
+
}
|
|
49
|
+
:host ::slotted(xv-table-v2-row),
|
|
50
|
+
:host ::slotted([slot=expandable]) {
|
|
51
|
+
padding-inline-start: calc(max(10px, var(--xv-table-padding-x)) * 2 + 10px);
|
|
52
|
+
}
|
|
53
|
+
:host ::slotted([disabled]) {
|
|
54
|
+
opacity: 0.4;
|
|
55
|
+
cursor: not-allowed;
|
|
56
|
+
user-select: none;
|
|
116
57
|
}
|
|
@@ -1,104 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { XV_EXPANDABLE_KEY } from "../_vars";
|
|
3
|
+
import { setAttr } from "../../../utils/utils";
|
|
4
4
|
export class XvTableExpand {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.
|
|
7
|
-
this.
|
|
8
|
-
this.
|
|
9
|
-
|
|
10
|
-
this.selectedRows = new Set();
|
|
11
|
-
// Expand group ID
|
|
12
|
-
this.groupId = uidGenerator();
|
|
13
|
-
this.setExpandAttrs = (expanded) => {
|
|
14
|
-
forEach(this.el.children, (row, i) => {
|
|
15
|
-
// set group id
|
|
16
|
-
this.setAttr(row, 'group-id', this.groupId);
|
|
17
|
-
// If it's Main selection row
|
|
18
|
-
if (!i) {
|
|
19
|
-
this.setAttr(row, 'expandable', true);
|
|
20
|
-
this.setAttr(row, 'expanded', expanded);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
6
|
+
this.open = false;
|
|
7
|
+
this.disabled = false;
|
|
8
|
+
this.handleExpand = () => {
|
|
9
|
+
this.open = !this.open;
|
|
24
10
|
};
|
|
25
|
-
this.onSlotChange = () => {
|
|
26
|
-
this.cols = this.el.firstElementChild.childElementCount;
|
|
27
|
-
this.setExpandAttrs(this.expanded);
|
|
28
|
-
};
|
|
29
|
-
this.emitChangeSelectionEvent = debounce(() => {
|
|
30
|
-
var _a, _b;
|
|
31
|
-
return this.checkedChange.emit(Object.assign(Object.assign({ name: ((_a = this.mainRowData) === null || _a === void 0 ? void 0 : _a.name) || this.el.firstElementChild.getAttribute('selection-name') }, (this.mainRowData || {})), { checked: !!this.selectedRows.size, group: Object.assign(Object.assign({ id: this.groupId }, (((_b = this.mainRowData) === null || _b === void 0 ? void 0 : _b.group) || {})), { data: Array.from(this.selectedRows.values()) }) }));
|
|
32
|
-
}, 100);
|
|
33
|
-
this.handleCheckedChange = (e) => {
|
|
34
|
-
const { group, checked, name } = e.detail;
|
|
35
|
-
if ((group === null || group === void 0 ? void 0 : group.id) !== this.groupId)
|
|
36
|
-
return;
|
|
37
|
-
if (group === null || group === void 0 ? void 0 : group.isMainRow) {
|
|
38
|
-
this.mainRowData = e.detail;
|
|
39
|
-
// clear group selection
|
|
40
|
-
if (!checked)
|
|
41
|
-
this.selectedRows.clear();
|
|
42
|
-
// Change all group except first row
|
|
43
|
-
forEach(this.el.children, (row, i) => {
|
|
44
|
-
if (!i || row.hasAttribute('disabled'))
|
|
45
|
-
return;
|
|
46
|
-
this.setAttr(row, 'checked', checked);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
if (checked) {
|
|
51
|
-
this.selectedRows.add(e.detail);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
this.selectedRows
|
|
55
|
-
.forEach(item => item.name === name && this.selectedRows.delete(item));
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const isNoSelected = !this.selectedRows.size;
|
|
59
|
-
const isAllSelected = this.selectedRows.size == this.el.childElementCount - 1;
|
|
60
|
-
const isPartialSelected = !isNoSelected && (this.selectedRows.size < this.el.childElementCount - 1);
|
|
61
|
-
if (isAllSelected) {
|
|
62
|
-
this.setAttr(this.el.firstElementChild, 'checked', true);
|
|
63
|
-
}
|
|
64
|
-
else if (isNoSelected) {
|
|
65
|
-
this.setAttr(this.el.firstElementChild, 'checked', false);
|
|
66
|
-
}
|
|
67
|
-
this.setAttr(this.el.firstElementChild, 'partial', isPartialSelected);
|
|
68
|
-
this.emitChangeSelectionEvent();
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
async toggleExpand(expanded) {
|
|
72
|
-
this.expanded = !!expanded;
|
|
73
|
-
}
|
|
74
|
-
setAttr(node, name, value) {
|
|
75
|
-
if (typeof value === 'string') {
|
|
76
|
-
!node.hasAttribute(name) && node.setAttribute(name, value);
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
if (value) {
|
|
80
|
-
!node.hasAttribute(name) && node.setAttribute(name, '');
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
node.hasAttribute(name) && node.removeAttribute(name);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
setInitialExpandStatus() {
|
|
87
|
-
const table = this.el.parentElement;
|
|
88
|
-
if (table.tagName === TABLE_TAG.TABLE)
|
|
89
|
-
this.setAttr(table, 'expandable', true);
|
|
90
11
|
}
|
|
91
12
|
render() {
|
|
92
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: '03fe6f6aeccdd968034eb8ca2f927ef47e7864d8' }, h("button", { key: 'c6fd847183f1ce75de771c1138de6ed058f555b2', class: { 'expand-btn': true, open: this.open }, disabled: this.disabled, onClick: this.handleExpand }), h("slot", { key: '4d7d466275d3cb55552d5b7df60e28bbe75cb058', name: XV_EXPANDABLE_KEY }), h("div", { key: '5fdaa8095fc4cd05ce98549228200a739dadc2a3', class: { expandableContent: true, open: this.open } }, h("slot", { key: '3c04cf53d2a7c3989a4511f3d407e8e0e7597a7e' }))));
|
|
93
14
|
}
|
|
94
|
-
|
|
95
|
-
this.
|
|
96
|
-
}
|
|
97
|
-
connectedCallback() {
|
|
98
|
-
this.el.childNodes.forEach(row => row.addEventListener('checkedGroupChange', this.handleCheckedChange));
|
|
99
|
-
}
|
|
100
|
-
disconnectedCallback() {
|
|
101
|
-
this.el.childNodes.forEach(row => row.removeEventListener('checkedGroupChange', this.handleCheckedChange));
|
|
15
|
+
componentDidLoad() {
|
|
16
|
+
setAttr(this.el.parentElement, XV_EXPANDABLE_KEY, true);
|
|
102
17
|
}
|
|
103
18
|
static get is() { return "xv-table-v2-expand"; }
|
|
104
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -114,7 +29,7 @@ export class XvTableExpand {
|
|
|
114
29
|
}
|
|
115
30
|
static get properties() {
|
|
116
31
|
return {
|
|
117
|
-
"
|
|
32
|
+
"open": {
|
|
118
33
|
"type": "boolean",
|
|
119
34
|
"mutable": true,
|
|
120
35
|
"complexType": {
|
|
@@ -130,67 +45,29 @@ export class XvTableExpand {
|
|
|
130
45
|
},
|
|
131
46
|
"getter": false,
|
|
132
47
|
"setter": false,
|
|
133
|
-
"attribute": "
|
|
48
|
+
"attribute": "open",
|
|
134
49
|
"reflect": true,
|
|
135
50
|
"defaultValue": "false"
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
static get events() {
|
|
149
|
-
return [{
|
|
150
|
-
"method": "checkedChange",
|
|
151
|
-
"name": "checkedChange",
|
|
152
|
-
"bubbles": true,
|
|
153
|
-
"cancelable": true,
|
|
154
|
-
"composed": true,
|
|
51
|
+
},
|
|
52
|
+
"disabled": {
|
|
53
|
+
"type": "boolean",
|
|
54
|
+
"mutable": false,
|
|
55
|
+
"complexType": {
|
|
56
|
+
"original": "boolean",
|
|
57
|
+
"resolved": "boolean",
|
|
58
|
+
"references": {}
|
|
59
|
+
},
|
|
60
|
+
"required": false,
|
|
61
|
+
"optional": false,
|
|
155
62
|
"docs": {
|
|
156
63
|
"tags": [],
|
|
157
64
|
"text": ""
|
|
158
65
|
},
|
|
159
|
-
"
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
"location": "import",
|
|
165
|
-
"path": "../defs",
|
|
166
|
-
"id": "src/components/xv-table/defs.ts::TableSelectionEventData"
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}];
|
|
171
|
-
}
|
|
172
|
-
static get methods() {
|
|
173
|
-
return {
|
|
174
|
-
"toggleExpand": {
|
|
175
|
-
"complexType": {
|
|
176
|
-
"signature": "(expanded: boolean) => Promise<void>",
|
|
177
|
-
"parameters": [{
|
|
178
|
-
"name": "expanded",
|
|
179
|
-
"type": "boolean",
|
|
180
|
-
"docs": ""
|
|
181
|
-
}],
|
|
182
|
-
"references": {
|
|
183
|
-
"Promise": {
|
|
184
|
-
"location": "global",
|
|
185
|
-
"id": "global::Promise"
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
"return": "Promise<void>"
|
|
189
|
-
},
|
|
190
|
-
"docs": {
|
|
191
|
-
"text": "",
|
|
192
|
-
"tags": []
|
|
193
|
-
}
|
|
66
|
+
"getter": false,
|
|
67
|
+
"setter": false,
|
|
68
|
+
"attribute": "disabled",
|
|
69
|
+
"reflect": true,
|
|
70
|
+
"defaultValue": "false"
|
|
194
71
|
}
|
|
195
72
|
};
|
|
196
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xv-table-expand.js","sourceRoot":"","sources":["../../../../src/components/xv-table/xv-table-expand/xv-table-expand.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"xv-table-expand.js","sourceRoot":"","sources":["../../../../src/components/xv-table/xv-table-expand/xv-table-expand.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAO/C,MAAM,OAAO,aAAa;IAL1B;QAO0C,SAAI,GAAY,KAAK,CAAC;QACrC,aAAQ,GAAY,KAAK,CAAC;QAE3C,iBAAY,GAAG,GAAG,EAAE;YAC1B,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;QACzB,CAAC,CAAC;KAoBH;IAlBC,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,+DACE,KAAK,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAC9C,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,YAAY,GAC1B;YACF,6DAAM,IAAI,EAAE,iBAAiB,GAAI;YAEjC,4DAAK,KAAK,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;gBAAE,8DAAQ,CAAM,CACnE,CACR,CAAC;IACJ,CAAC;IAED,gBAAgB;QACd,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Element, Prop } from '@stencil/core';\nimport { XV_EXPANDABLE_KEY } from '../_vars';\nimport { setAttr } from '../../../utils/utils';\n\n@Component({\n tag: 'xv-table-v2-expand',\n styleUrl: 'xv-table-expand.scss',\n shadow: true,\n})\nexport class XvTableExpand {\n @Element() el: HTMLElement;\n @Prop({ reflect: true, mutable: true }) open: boolean = false;\n @Prop({ reflect: true }) disabled: boolean = false;\n\n private handleExpand = () => {\n this.open = !this.open;\n };\n\n render() {\n return (\n <Host>\n <button\n class={{ 'expand-btn': true, open: this.open }}\n disabled={this.disabled}\n onClick={this.handleExpand}\n />\n <slot name={XV_EXPANDABLE_KEY} />\n\n <div class={{ expandableContent: true, open: this.open }}><slot /></div>\n </Host>\n );\n }\n\n componentDidLoad() {\n setAttr(this.el.parentElement, XV_EXPANDABLE_KEY, true);\n }\n}\n"]}
|
|
@@ -1,46 +1,32 @@
|
|
|
1
|
-
:host
|
|
1
|
+
:host {
|
|
2
2
|
display: grid;
|
|
3
3
|
align-items: center;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
padding-top: var(--xv-table-padding, 16px);
|
|
8
|
-
padding-bottom: var(--xv-table-padding, 16px);
|
|
9
|
-
grid-template-columns: var(--xv-table-first-col-size, 0) repeat(var(--xv-table-cols, 1), 1fr);
|
|
4
|
+
grid-template-columns: var(--xv-table-cols-template, repeat(auto-fit, minmax(0, 1fr)));
|
|
5
|
+
border-bottom: 1px solid #E3E3E3;
|
|
6
|
+
transition: 0.25s ease-in-out background-color;
|
|
10
7
|
}
|
|
11
|
-
:host
|
|
12
|
-
height:
|
|
13
|
-
display: flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: flex-end;
|
|
16
|
-
gap: 16px;
|
|
17
|
-
padding: 0 16px;
|
|
8
|
+
:host .cell-control {
|
|
9
|
+
min-height: 20px;
|
|
18
10
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
display: block;
|
|
23
|
-
margin: 0 auto;
|
|
24
|
-
border: solid var(--icon-primary, #131313);
|
|
25
|
-
border-width: 0 1px 1px 0;
|
|
26
|
-
padding: 3px;
|
|
27
|
-
transform: rotate(45deg);
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
transition: opacity 300ms ease-in-out, transform 200ms ease-in-out;
|
|
11
|
+
|
|
12
|
+
:host([variant]) {
|
|
13
|
+
grid-template-columns: minmax(47.97px, min-content) var(--xv-table-cols-template, repeat(auto-fit, minmax(0, 1fr)));
|
|
30
14
|
}
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
|
|
16
|
+
:host([hover]:not([header]):hover) {
|
|
17
|
+
background-color: var(--layer-hover-01, #E9E9E9);
|
|
33
18
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
19
|
+
|
|
20
|
+
:host([checked]) {
|
|
21
|
+
background-color: var(--layer-selected-01, #E3E3E3);
|
|
37
22
|
}
|
|
38
23
|
|
|
39
|
-
:host([
|
|
40
|
-
|
|
41
|
-
pointer-events: none;
|
|
42
|
-
cursor: not-allowed;
|
|
24
|
+
:host([checked]:hover) {
|
|
25
|
+
background-color: var(--layer-selected-hover-01, #DADADA);
|
|
43
26
|
}
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
|
|
28
|
+
:host([header]) {
|
|
29
|
+
background-color: var(--layer-accent-01, #F7F7F7);
|
|
30
|
+
box-shadow: 0 0 0 1px #E3E3E3 inset;
|
|
31
|
+
border-bottom: none;
|
|
46
32
|
}
|