@semcore/data-table 16.0.0-prerelease.2 → 16.0.0-prerelease.21
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/CHANGELOG.md +25 -1
- package/lib/cjs/components/Body/Body.js +439 -0
- package/lib/cjs/components/Body/Body.js.map +1 -0
- package/lib/cjs/components/Body/Body.types.js +2 -0
- package/lib/cjs/components/Body/Body.types.js.map +1 -0
- package/lib/cjs/components/Body/Cell.js +195 -0
- package/lib/cjs/components/Body/Cell.js.map +1 -0
- package/lib/cjs/components/Body/Cell.types.js +2 -0
- package/lib/cjs/components/Body/Cell.types.js.map +1 -0
- package/lib/cjs/components/Body/MergedCells.js +29 -0
- package/lib/cjs/components/Body/MergedCells.js.map +1 -0
- package/lib/cjs/components/Body/Row.js +252 -0
- package/lib/cjs/components/Body/Row.js.map +1 -0
- package/lib/cjs/components/Body/Row.types.js +4 -0
- package/lib/cjs/components/Body/Row.types.js.map +1 -0
- package/lib/cjs/components/Body/style.shadow.css +263 -0
- package/lib/cjs/components/DataTable/DataTable.js +1025 -0
- package/lib/cjs/components/DataTable/DataTable.js.map +1 -0
- package/lib/cjs/{types.js → components/DataTable/DataTable.types.js} +1 -1
- package/lib/cjs/components/DataTable/DataTable.types.js.map +1 -0
- package/lib/cjs/components/DataTable/dataTable.shadow.css +17 -0
- package/lib/cjs/components/Head/Column.js +311 -0
- package/lib/cjs/components/Head/Column.js.map +1 -0
- package/lib/cjs/components/Head/Column.types.js +2 -0
- package/lib/cjs/components/Head/Column.types.js.map +1 -0
- package/lib/cjs/components/Head/Group.js +116 -0
- package/lib/cjs/components/Head/Group.js.map +1 -0
- package/lib/cjs/components/Head/Group.type.js +2 -0
- package/lib/cjs/components/Head/Group.type.js.map +1 -0
- package/lib/cjs/components/Head/Head.js +207 -0
- package/lib/cjs/components/Head/Head.js.map +1 -0
- package/lib/cjs/components/Head/Head.types.js +2 -0
- package/lib/cjs/components/Head/Head.types.js.map +1 -0
- package/lib/cjs/components/Head/style.shadow.css +180 -0
- package/lib/cjs/index.js +25 -15
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/scroll-shadows.shadow.css +45 -5
- package/lib/cjs/translations/en.json +6 -1
- package/lib/es6/components/Body/Body.js +432 -0
- package/lib/es6/components/Body/Body.js.map +1 -0
- package/lib/es6/components/Body/Body.types.js +2 -0
- package/lib/es6/components/Body/Body.types.js.map +1 -0
- package/lib/es6/components/Body/Cell.js +188 -0
- package/lib/es6/components/Body/Cell.js.map +1 -0
- package/lib/es6/components/Body/Cell.types.js +2 -0
- package/lib/es6/components/Body/Cell.types.js.map +1 -0
- package/lib/es6/components/Body/MergedCells.js +20 -0
- package/lib/es6/components/Body/MergedCells.js.map +1 -0
- package/lib/es6/components/Body/Row.js +245 -0
- package/lib/es6/components/Body/Row.js.map +1 -0
- package/lib/es6/components/Body/Row.types.js +2 -0
- package/lib/es6/components/Body/Row.types.js.map +1 -0
- package/lib/es6/components/Body/style.shadow.css +263 -0
- package/lib/es6/components/DataTable/DataTable.js +1013 -0
- package/lib/es6/components/DataTable/DataTable.js.map +1 -0
- package/lib/es6/components/DataTable/DataTable.types.js +2 -0
- package/lib/es6/components/DataTable/DataTable.types.js.map +1 -0
- package/lib/es6/components/DataTable/dataTable.shadow.css +17 -0
- package/lib/es6/components/Head/Column.js +304 -0
- package/lib/es6/components/Head/Column.js.map +1 -0
- package/lib/es6/components/Head/Column.types.js +2 -0
- package/lib/es6/components/Head/Column.types.js.map +1 -0
- package/lib/es6/components/Head/Group.js +109 -0
- package/lib/es6/components/Head/Group.js.map +1 -0
- package/lib/es6/components/Head/Group.type.js +2 -0
- package/lib/es6/components/Head/Group.type.js.map +1 -0
- package/lib/es6/components/Head/Head.js +201 -0
- package/lib/es6/components/Head/Head.js.map +1 -0
- package/lib/es6/components/Head/Head.types.js +2 -0
- package/lib/es6/components/Head/Head.types.js.map +1 -0
- package/lib/es6/components/Head/style.shadow.css +180 -0
- package/lib/es6/index.js +5 -2
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/scroll-shadows.shadow.css +45 -5
- package/lib/es6/translations/en.json +6 -1
- package/lib/esm/components/Body/Body.mjs +394 -0
- package/lib/esm/components/Body/Cell.mjs +186 -0
- package/lib/esm/components/Body/MergedCells.mjs +23 -0
- package/lib/esm/components/Body/Row.mjs +224 -0
- package/lib/esm/components/Body/style.shadow.css +263 -0
- package/lib/esm/components/DataTable/DataTable.mjs +944 -0
- package/lib/esm/components/DataTable/dataTable.shadow.css +17 -0
- package/lib/esm/components/Head/Column.mjs +296 -0
- package/lib/esm/components/Head/Group.mjs +103 -0
- package/lib/esm/components/Head/Head.mjs +181 -0
- package/lib/esm/components/Head/style.shadow.css +180 -0
- package/lib/esm/index.mjs +9 -6
- package/lib/esm/style/scroll-shadows.shadow.css +47 -0
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +30 -30
- package/lib/esm/translations/de.json.mjs +5 -4
- package/lib/esm/translations/en.json.mjs +10 -4
- package/lib/esm/translations/es.json.mjs +5 -4
- package/lib/esm/translations/fr.json.mjs +5 -4
- package/lib/esm/translations/it.json.mjs +5 -4
- package/lib/esm/translations/ja.json.mjs +5 -4
- package/lib/esm/translations/ko.json.mjs +5 -4
- package/lib/esm/translations/nl.json.mjs +5 -4
- package/lib/esm/translations/pl.json.mjs +5 -4
- package/lib/esm/translations/pt.json.mjs +5 -4
- package/lib/esm/translations/sv.json.mjs +5 -4
- package/lib/esm/translations/tr.json.mjs +5 -4
- package/lib/esm/translations/vi.json.mjs +5 -4
- package/lib/esm/translations/zh.json.mjs +5 -4
- package/lib/types/components/Body/Body.d.ts +8 -0
- package/lib/types/components/Body/Body.types.d.ts +57 -0
- package/lib/types/components/Body/Cell.d.ts +3 -0
- package/lib/types/components/Body/Cell.types.d.ts +20 -0
- package/lib/types/components/Body/MergedCells.d.ts +14 -0
- package/lib/types/components/Body/Row.d.ts +3 -0
- package/lib/types/components/Body/Row.types.d.ts +43 -0
- package/lib/types/components/DataTable/DataTable.d.ts +13 -0
- package/lib/types/components/DataTable/DataTable.types.d.ts +125 -0
- package/lib/types/components/Head/Column.d.ts +30 -0
- package/lib/types/components/Head/Column.types.d.ts +71 -0
- package/lib/types/components/Head/Group.d.ts +15 -0
- package/lib/types/components/Head/Group.type.d.ts +16 -0
- package/lib/types/components/Head/Head.d.ts +98 -0
- package/lib/types/components/Head/Head.types.d.ts +40 -0
- package/lib/types/index.d.ts +10 -2
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +5 -0
- package/package.json +11 -6
- package/vite.config.ts +0 -3
- package/lib/cjs/Body.js +0 -475
- package/lib/cjs/Body.js.map +0 -1
- package/lib/cjs/DataTable.js +0 -622
- package/lib/cjs/DataTable.js.map +0 -1
- package/lib/cjs/Head.js +0 -399
- package/lib/cjs/Head.js.map +0 -1
- package/lib/cjs/style/data-table.shadow.css +0 -394
- package/lib/cjs/types.js.map +0 -1
- package/lib/cjs/utils.js +0 -57
- package/lib/cjs/utils.js.map +0 -1
- package/lib/es6/Body.js +0 -468
- package/lib/es6/Body.js.map +0 -1
- package/lib/es6/DataTable.js +0 -614
- package/lib/es6/DataTable.js.map +0 -1
- package/lib/es6/Head.js +0 -391
- package/lib/es6/Head.js.map +0 -1
- package/lib/es6/style/data-table.shadow.css +0 -394
- package/lib/es6/types.js +0 -2
- package/lib/es6/types.js.map +0 -1
- package/lib/es6/utils.js +0 -48
- package/lib/es6/utils.js.map +0 -1
- package/lib/esm/Body.mjs +0 -320
- package/lib/esm/DataTable.mjs +0 -439
- package/lib/esm/Head.mjs +0 -258
- package/lib/esm/utils.mjs +0 -37
- package/lib/types/Body.d.ts +0 -61
- package/lib/types/DataTable.d.ts +0 -205
- package/lib/types/Head.d.ts +0 -45
- package/lib/types/types.d.ts +0 -73
- package/lib/types/utils.d.ts +0 -4
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
SHead, SGroupContainer {
|
|
2
|
+
display: contents;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
SHead[sticky] SColumn, SHead[sticky] SGroup {
|
|
6
|
+
position: sticky;
|
|
7
|
+
top: 0;
|
|
8
|
+
z-index: 2;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
SHead[sticky] SGroupContainer > SColumn {
|
|
12
|
+
position: sticky;
|
|
13
|
+
z-index: 2;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
SHead[compact] SColumn {
|
|
17
|
+
padding: var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-2x, 8px);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
SGroup, SColumn {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: flex-start;
|
|
23
|
+
font-size: var(--intergalactic-fs-100, 12px);
|
|
24
|
+
color: var(--intergalactic-text-primary, #191b23);
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
height: 100%;
|
|
27
|
+
position: relative;
|
|
28
|
+
transition: width calc(var(--intergalactic-duration-extra-fast, 100) * 1ms) ease-in-out, min-width calc(var(--intergalactic-duration-extra-fast, 100) * 1ms) ease-in-out, max-width calc(var(--intergalactic-duration-extra-fast, 100) * 1ms) ease-in-out;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
SGroup {
|
|
33
|
+
justify-content: center;
|
|
34
|
+
text-align: center;
|
|
35
|
+
background-color: var(--intergalactic-table-th-primary-cell, #f4f5f9);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
SGroup[use='primary'] {
|
|
39
|
+
padding: var(--intergalactic-spacing-3x, 12px);
|
|
40
|
+
|
|
41
|
+
&:has(~ SColumn[visibleSort]) {
|
|
42
|
+
background-color: var(--intergalactic-table-th-primary-cell-hover, #e0e1e9);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
SGroup[use='secondary'] {
|
|
46
|
+
padding: var(--intergalactic-spacing-2x, 8px);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
SGroup[borders='both'], SColumn[borders='both'], SGroup[borders='left'], SColumn[borders='left'] {
|
|
50
|
+
border-left: 1px solid var(--intergalactic-border-secondary, #e0e1e9);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
SGroup[borders='both'], SColumn[borders='both'], SGroup[borders='right'], SColumn[borders='right'] {
|
|
54
|
+
border-right: 1px solid var(--intergalactic-border-secondary, #e0e1e9);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
SColumn[use='primary'] {
|
|
58
|
+
padding: var(--intergalactic-spacing-3x, 12px);
|
|
59
|
+
border-bottom: 1px solid var(--intergalactic-border-secondary, #e0e1e9);
|
|
60
|
+
background-color: var(--intergalactic-table-th-primary-cell, #f4f5f9);
|
|
61
|
+
|
|
62
|
+
SSortWrapper::before {
|
|
63
|
+
background: linear-gradient(
|
|
64
|
+
270deg,
|
|
65
|
+
var(--intergalactic-table-th-primary-cell-hover, #e0e1e9) 67.5%,
|
|
66
|
+
rgba(224, 225, 233, 0) 105%
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&[visibleSort] {
|
|
71
|
+
background-color: var(--intergalactic-table-th-primary-cell-hover, #e0e1e9);
|
|
72
|
+
|
|
73
|
+
SSortWrapper {
|
|
74
|
+
flex-basis: calc(var(--intergalactic-spacing-1x, 4px) + 16px);
|
|
75
|
+
opacity: 1;
|
|
76
|
+
|
|
77
|
+
&::before {
|
|
78
|
+
display: flex;
|
|
79
|
+
opacity: 1;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
SSortButton {
|
|
84
|
+
display: flex;
|
|
85
|
+
opacity: 1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
SColumn[use='secondary'] {
|
|
91
|
+
padding: var(--intergalactic-spacing-2x, 8px);
|
|
92
|
+
border-bottom: 1px solid var(--intergalactic-border-table-accent, #a9abb6);
|
|
93
|
+
background-color: var(--intergalactic-table-th-secondary-cell, #ffffff);
|
|
94
|
+
|
|
95
|
+
SSortWrapper::before {
|
|
96
|
+
background: linear-gradient(
|
|
97
|
+
270deg,
|
|
98
|
+
var(--intergalactic-table-th-secondary-cell, #ffffff) 67.5%,
|
|
99
|
+
rgba(255, 255, 255, 0) 105%
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&[visibleSort] {
|
|
104
|
+
SSortWrapper {
|
|
105
|
+
flex-basis: calc(var(--intergalactic-spacing-1x, 4px) + 16px);
|
|
106
|
+
opacity: 1;
|
|
107
|
+
|
|
108
|
+
&::before {
|
|
109
|
+
display: flex;
|
|
110
|
+
opacity: 1;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
SSortButton {
|
|
115
|
+
display: flex;
|
|
116
|
+
opacity: 1;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
SColumn[gridArea], SGroup[gridArea], SGroupTitle[gridArea] {
|
|
122
|
+
grid-area: var(--gridArea);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
SHead[sticky] SColumn[fixed], SHead SColumn[fixed], SHead[sticky] SGroup, SHead SGroup[fixed] {
|
|
126
|
+
position: sticky;
|
|
127
|
+
/* because up resizable */
|
|
128
|
+
z-index: 3;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
SColumn[sortable]:hover {
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
SSortWrapper {
|
|
136
|
+
align-items: center;
|
|
137
|
+
display: flex;
|
|
138
|
+
flex-shrink: 1;
|
|
139
|
+
position: relative;
|
|
140
|
+
flex-basis: 0;
|
|
141
|
+
min-height: 16px;
|
|
142
|
+
opacity: 0;
|
|
143
|
+
transition: all calc(var(--intergalactic-duration-extra-fast, 100) * 1ms) ease-in-out;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
SSortWrapper:before {
|
|
147
|
+
display: none;
|
|
148
|
+
content: '';
|
|
149
|
+
position: absolute;
|
|
150
|
+
top: 0;
|
|
151
|
+
right: 0;
|
|
152
|
+
width: 20px;
|
|
153
|
+
height: 100%;
|
|
154
|
+
opacity: 0;
|
|
155
|
+
transition: opacity 0.3s ease;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
SSortButton {
|
|
159
|
+
display: none;
|
|
160
|
+
fill: var(--intergalactic-icon-secondary-neutral-hover-active, #878992);
|
|
161
|
+
position: absolute;
|
|
162
|
+
top: calc(-1 * (1em * 1.25 - 16px));
|
|
163
|
+
right: 0;
|
|
164
|
+
margin-left: var(--intergalactic-spacing-1x, 4px);
|
|
165
|
+
opacity: 0;
|
|
166
|
+
transition: opacity 0.3s ease;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
SHead[sideIndents='wide'] {
|
|
170
|
+
SColumn:first-child {
|
|
171
|
+
padding-left: var(--intergalactic-spacing-5x, 20px);
|
|
172
|
+
}
|
|
173
|
+
SColumn:last-child {
|
|
174
|
+
padding-right: var(--intergalactic-spacing-5x, 20px);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
SHeadCheckboxCol {
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
}
|
package/lib/esm/index.mjs
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ACCORDION, DataTable, ROW_GROUP, UNIQ_ROW_KEY } from "./components/DataTable/DataTable.mjs";
|
|
2
|
+
var wrapDataTable = function wrapDataTable2(wrapper) {
|
|
3
|
+
return wrapper;
|
|
4
|
+
};
|
|
2
5
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
ACCORDION,
|
|
7
|
+
DataTable,
|
|
8
|
+
ROW_GROUP,
|
|
9
|
+
UNIQ_ROW_KEY,
|
|
10
|
+
wrapDataTable
|
|
8
11
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
SScrollArea {
|
|
2
|
+
width: fit-content;
|
|
3
|
+
|
|
4
|
+
SContainer {
|
|
5
|
+
overflow: unset;
|
|
6
|
+
|
|
7
|
+
&[scrollDirection='both'] {
|
|
8
|
+
overflow: auto;
|
|
9
|
+
}
|
|
10
|
+
&[scrollDirection='horizontal'] {
|
|
11
|
+
overflow-x: auto;
|
|
12
|
+
overflow-y: unset;
|
|
13
|
+
}
|
|
14
|
+
&[scrollDirection='vertical'] {
|
|
15
|
+
overflow-x: unset;
|
|
16
|
+
overflow-y: auto;
|
|
17
|
+
}
|
|
18
|
+
&[loading] {
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&[headerHeight] {
|
|
23
|
+
scroll-padding-top: var(--headerHeight);
|
|
24
|
+
}
|
|
25
|
+
&[leftScrollPadding] {
|
|
26
|
+
scroll-padding-left: var(--leftScrollPadding);
|
|
27
|
+
}
|
|
28
|
+
&[rightScrollPadding] {
|
|
29
|
+
scroll-padding-right: var(--rightScrollPadding);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
SShadowVertical {
|
|
34
|
+
&:before {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
&:after {
|
|
38
|
+
z-index: 2;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
SShadowHorizontal {
|
|
42
|
+
&:before,
|
|
43
|
+
&:after {
|
|
44
|
+
z-index: 2;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
var
|
|
16
|
-
de
|
|
17
|
-
en
|
|
18
|
-
es
|
|
19
|
-
fr
|
|
20
|
-
it
|
|
21
|
-
ja
|
|
22
|
-
ko
|
|
23
|
-
nl
|
|
24
|
-
pt
|
|
25
|
-
tr
|
|
26
|
-
vi
|
|
27
|
-
zh
|
|
28
|
-
pl
|
|
29
|
-
sv
|
|
1
|
+
import de from "./de.json.mjs";
|
|
2
|
+
import en from "./en.json.mjs";
|
|
3
|
+
import es from "./es.json.mjs";
|
|
4
|
+
import fr from "./fr.json.mjs";
|
|
5
|
+
import it from "./it.json.mjs";
|
|
6
|
+
import ja from "./ja.json.mjs";
|
|
7
|
+
import ko from "./ko.json.mjs";
|
|
8
|
+
import nl from "./nl.json.mjs";
|
|
9
|
+
import pt from "./pt.json.mjs";
|
|
10
|
+
import tr from "./tr.json.mjs";
|
|
11
|
+
import vi from "./vi.json.mjs";
|
|
12
|
+
import zh from "./zh.json.mjs";
|
|
13
|
+
import pl from "./pl.json.mjs";
|
|
14
|
+
import sv from "./sv.json.mjs";
|
|
15
|
+
var localizedMessages = {
|
|
16
|
+
de,
|
|
17
|
+
en,
|
|
18
|
+
es,
|
|
19
|
+
fr,
|
|
20
|
+
it,
|
|
21
|
+
ja,
|
|
22
|
+
ko,
|
|
23
|
+
nl,
|
|
24
|
+
pt,
|
|
25
|
+
tr,
|
|
26
|
+
vi,
|
|
27
|
+
zh,
|
|
28
|
+
pl,
|
|
29
|
+
sv
|
|
30
30
|
};
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
localizedMessages
|
|
33
33
|
};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const sortableColumn = "Sortable";
|
|
2
|
+
const en = {
|
|
3
|
+
sortableColumn,
|
|
4
|
+
"DataTable.Cell.AccordionToggle.expand:aria-label": "Show details",
|
|
5
|
+
"DataTable.Cell.AccordionToggle.collapse:aria-label": "Hide details",
|
|
6
|
+
"DataTable.Header.selectAllCheckbox:aria-label": "All items",
|
|
7
|
+
"DataTable.allItemsSelected:aria-live": "All items selected",
|
|
8
|
+
"DataTable.allItemsDeselected:aria-live": "All items deselected"
|
|
3
9
|
};
|
|
4
10
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
en as default,
|
|
12
|
+
sortableColumn
|
|
7
13
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Component, Intergalactic } from '@semcore/core';
|
|
2
|
+
import { DataTableBodyProps } from './Body.types';
|
|
3
|
+
import { DataTableRowProps } from './Row.types';
|
|
4
|
+
import { DataTableCellProps } from './Cell.types';
|
|
5
|
+
export declare const Body: (<Tag extends Intergalactic.InternalTypings.ComponentTag = "div", Props extends DataTableBodyProps = DataTableBodyProps>(props: Intergalactic.InternalTypings.ComponentProps<Tag, "div", Props, {}, never[]>) => Intergalactic.InternalTypings.ComponentRenderingResults) & Intergalactic.InternalTypings.ComponentAdditive<"div", Intergalactic.InternalTypings.ComponentTag, DataTableBodyProps, {}, never[]> & {
|
|
6
|
+
Row: Intergalactic.Component<'div', DataTableRowProps>;
|
|
7
|
+
Cell: Intergalactic.Component<'div', DataTableCellProps>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DTRow } from './Row.types';
|
|
3
|
+
import { DTColumn } from '../Head/Column.types';
|
|
4
|
+
import { DTUse, VirtualScroll } from '../DataTable/DataTable.types';
|
|
5
|
+
import { Theme } from './Cell.types';
|
|
6
|
+
export type CellRenderProps = {
|
|
7
|
+
dataKey: string;
|
|
8
|
+
row: DTRow;
|
|
9
|
+
column: DTColumn;
|
|
10
|
+
rowIndex: number;
|
|
11
|
+
columnIndex: number;
|
|
12
|
+
columnName: string;
|
|
13
|
+
value: string | React.ReactElement;
|
|
14
|
+
defaultRender: () => React.ReactNode;
|
|
15
|
+
isMergedRows: boolean;
|
|
16
|
+
isMergedColumns: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type DataTableBodyProps = {
|
|
19
|
+
renderCell?: (props: CellRenderProps) => React.ReactNode | (Record<string, any> & {
|
|
20
|
+
theme?: Theme;
|
|
21
|
+
});
|
|
22
|
+
rowProps?: (row: DTRow, rowIndex: number) => (Record<string, any> & {
|
|
23
|
+
theme?: Theme;
|
|
24
|
+
}) | undefined;
|
|
25
|
+
};
|
|
26
|
+
export type BodyPropsInner = DataTableBodyProps & {
|
|
27
|
+
rows: Array<DTRow | DTRow[]>;
|
|
28
|
+
flatRows: DTRow[];
|
|
29
|
+
columns: DTColumn[];
|
|
30
|
+
use: DTUse;
|
|
31
|
+
compact: boolean;
|
|
32
|
+
gridTemplateColumns: string[];
|
|
33
|
+
gridTemplateAreas: string[];
|
|
34
|
+
loading?: boolean;
|
|
35
|
+
headerHeight: number;
|
|
36
|
+
getI18nText: (key: string) => string;
|
|
37
|
+
expandedRows: Set<string>;
|
|
38
|
+
onExpandRow: (row: DTRow) => void;
|
|
39
|
+
spinnerRef: React.RefObject<HTMLDivElement>;
|
|
40
|
+
tableContainerRef: React.RefObject<HTMLDivElement>;
|
|
41
|
+
tableRef: React.RefObject<HTMLDivElement>;
|
|
42
|
+
scrollAreaRef: React.RefObject<HTMLDivElement>;
|
|
43
|
+
scrollTop: number;
|
|
44
|
+
scrollDirection: 'down' | 'up';
|
|
45
|
+
virtualScroll?: VirtualScroll;
|
|
46
|
+
hasGroups: boolean;
|
|
47
|
+
uid: string;
|
|
48
|
+
rowProps?: (row: DTRow, rowIndex: number) => Record<string, any> | undefined;
|
|
49
|
+
renderCell?: (props: CellRenderProps) => React.ReactNode | Record<string, any>;
|
|
50
|
+
onBackFromAccordion: (colIndex: number) => void;
|
|
51
|
+
stickyHeader?: boolean;
|
|
52
|
+
selectedRows?: number[];
|
|
53
|
+
onSelectRow?: (isSelect: boolean, selectedRowIndex: number, row: DTRow, event?: React.SyntheticEvent<HTMLElement>) => void;
|
|
54
|
+
renderEmptyData: () => React.ReactNode;
|
|
55
|
+
sideIndents?: 'wide';
|
|
56
|
+
getFixedStyle: (cell: Pick<DTColumn, 'name' | 'fixed'>) => [side: 'left' | 'right', style: string | number] | [side: undefined, style: undefined];
|
|
57
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DTRow } from './Row.types';
|
|
3
|
+
import { DTUse } from '../DataTable/DataTable.types';
|
|
4
|
+
import { DTColumn } from '../Head/Column.types';
|
|
5
|
+
export type Theme = 'muted' | 'info' | 'success' | 'warning' | 'danger';
|
|
6
|
+
export type DataTableCellProps = {
|
|
7
|
+
id: string;
|
|
8
|
+
accordionId: string;
|
|
9
|
+
row: DTRow;
|
|
10
|
+
rowIndex: number;
|
|
11
|
+
column: DTColumn;
|
|
12
|
+
columnIndex: number;
|
|
13
|
+
gridRowIndex: number;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
export type CellPropsInner = {
|
|
17
|
+
use: DTUse;
|
|
18
|
+
virtualScroll: boolean;
|
|
19
|
+
tableRef: React.RefObject<HTMLDivElement>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class MergedRowsCell {
|
|
2
|
+
readonly value: any;
|
|
3
|
+
readonly rowsCount: number;
|
|
4
|
+
constructor(value: any, rowsCount: number);
|
|
5
|
+
}
|
|
6
|
+
export declare class MergedColumnsCell {
|
|
7
|
+
readonly value: any;
|
|
8
|
+
readonly columnsCount: number;
|
|
9
|
+
readonly dataKey: string;
|
|
10
|
+
constructor(value: any, options: {
|
|
11
|
+
size: number;
|
|
12
|
+
dataKey: string;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DTValue, DTUse, DataTableData } from '../DataTable/DataTable.types';
|
|
3
|
+
import { DTColumn } from '../Head/Column.types';
|
|
4
|
+
import { MergedColumnsCell, MergedRowsCell } from './MergedCells';
|
|
5
|
+
import { ACCORDION, ROW_INDEX, UNIQ_ROW_KEY } from '../DataTable/DataTable';
|
|
6
|
+
export type DTRow = {
|
|
7
|
+
[UNIQ_ROW_KEY]: string;
|
|
8
|
+
[ROW_INDEX]: number;
|
|
9
|
+
[key: string]: DTValue | MergedRowsCell | MergedColumnsCell;
|
|
10
|
+
[ACCORDION]?: React.ReactNode | DataTableData | undefined;
|
|
11
|
+
};
|
|
12
|
+
export type DTRows = Array<DTRow | DTRow[]>;
|
|
13
|
+
export type DataTableRowProps = {
|
|
14
|
+
row: DTRow;
|
|
15
|
+
offset?: number;
|
|
16
|
+
};
|
|
17
|
+
export type RowPropsInner = JSX.IntrinsicElements['div'] & {
|
|
18
|
+
use: DTUse;
|
|
19
|
+
/**
|
|
20
|
+
* Expanded flag for rows with accordion
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
expanded?: boolean;
|
|
24
|
+
columns: DTColumn[];
|
|
25
|
+
row: DTRow | DTRow[];
|
|
26
|
+
rows: DTRows;
|
|
27
|
+
rowIndex: number;
|
|
28
|
+
ariaRowIndex: number;
|
|
29
|
+
gridRowIndex: number;
|
|
30
|
+
expandedRows: Set<string>;
|
|
31
|
+
onExpandRow: (expandedRow: DTRow) => void;
|
|
32
|
+
gridTemplateAreas: string[];
|
|
33
|
+
gridTemplateColumns: string[];
|
|
34
|
+
accordionDataGridArea: string;
|
|
35
|
+
selectedRows?: number[];
|
|
36
|
+
onSelectRow?: (isSelect: boolean, selectedRowIndex: number, row: DTRow, event?: React.SyntheticEvent<HTMLElement>) => void;
|
|
37
|
+
inert?: '';
|
|
38
|
+
onBackFromAccordion: (colIndex: number) => void;
|
|
39
|
+
scrollAreaRef: React.RefObject<HTMLDivElement>;
|
|
40
|
+
uid: string;
|
|
41
|
+
sideIndents?: 'wide';
|
|
42
|
+
getFixedStyle: (cell: Pick<DTColumn, 'name' | 'fixed'>) => [side: 'left' | 'right', style: string | number] | [side: undefined, style: undefined];
|
|
43
|
+
};
|