es-grid-template 1.9.26 → 1.9.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/es/grid-component/type.d.ts +4 -1
- package/es/table-component/InternalTable.js +31 -1
- package/es/table-component/TableContainerEdit.js +59 -23
- package/es/table-component/body/EditableCell.js +68 -27
- package/es/table-component/body/TableBody.js +1 -1
- package/es/table-component/body/TableBodyCell.js +6 -2
- package/es/table-component/body/TableBodyCellEdit.js +7 -5
- package/es/table-component/footer/TableFooterRow.js +1 -1
- package/es/table-component/header/TableHeadCell2.js +2 -1
- package/es/table-component/style.js +12 -9
- package/es/table-component/style.scss +40 -232
- package/es/table-component/table/Grid.js +2 -1
- package/es/table-virtuoso/body/TableBodyCell.js +4 -1
- package/es/table-virtuoso/body/TableBodyRow.js +6 -7
- package/es/table-virtuoso/style.js +1 -1
- package/es/table-virtuoso/table/TableWrapper.js +3 -1
- package/lib/grid-component/type.d.ts +4 -1
- package/lib/table-component/InternalTable.js +31 -1
- package/lib/table-component/TableContainerEdit.js +84 -48
- package/lib/table-component/body/EditableCell.js +68 -27
- package/lib/table-component/body/TableBody.js +1 -1
- package/lib/table-component/body/TableBodyCell.js +6 -2
- package/lib/table-component/body/TableBodyCellEdit.js +7 -5
- package/lib/table-component/footer/TableFooterRow.js +1 -1
- package/lib/table-component/header/TableHeadCell2.js +3 -2
- package/lib/table-component/style.js +11 -8
- package/lib/table-component/style.scss +40 -232
- package/lib/table-component/table/Grid.js +2 -1
- package/lib/table-virtuoso/body/TableBodyCell.js +4 -1
- package/lib/table-virtuoso/body/TableBodyRow.js +6 -7
- package/lib/table-virtuoso/style.js +1 -1
- package/lib/table-virtuoso/table/TableWrapper.js +3 -1
- package/package.json +1 -1
|
@@ -9,10 +9,12 @@ $primary: #eb4619 !default;
|
|
|
9
9
|
$rowHoverBg: #FBDED6 !default;
|
|
10
10
|
$rowSelectedBg: #FEF2EF !default;
|
|
11
11
|
$tableBorderColor: #e0e0e0 !default;
|
|
12
|
-
$border-selected-color: #
|
|
12
|
+
$border-selected-color: #e63706 !default;
|
|
13
13
|
$body-color: #ffffff !default;
|
|
14
|
-
$cell-selected-bg: #F3F8FF !default;
|
|
15
|
-
$cell-
|
|
14
|
+
// $cell-selected-bg: #F3F8FF !default;
|
|
15
|
+
$cell-selected-bg: #fcf5f2 !default;
|
|
16
|
+
// $cell-index-selected-bg: #1869E6 !default;
|
|
17
|
+
$cell-index-selected-bg: #eb4619 !default;
|
|
16
18
|
$cell-index-focus-bg: #E6EFFD !default;
|
|
17
19
|
|
|
18
20
|
// 404071
|
|
@@ -33,233 +35,53 @@ $cell-selected-bg-Dark: #F3F8FF !default;
|
|
|
33
35
|
$cell-index-focus-bg-Dark: #E6EFFD !default;
|
|
34
36
|
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
38
|
* {
|
|
40
39
|
box-sizing: border-box;
|
|
41
40
|
}
|
|
42
41
|
|
|
42
|
+
.rs-picker-daterange-panel {
|
|
43
|
+
--rs-input-focus-border: #eb4619;
|
|
44
|
+
--rs-btn-link-text: #f0552b;
|
|
45
|
+
--rs-btn-link-hover-text: #eb4619;
|
|
46
|
+
--rs-btn-primary-bg: #e47253;
|
|
47
|
+
--rs-text-active: #eb4619;
|
|
48
|
+
--rs-listbox-option-hover-text: #eb4619;
|
|
49
|
+
--rs-bg-active: #f06842;
|
|
50
|
+
--rs-calendar-cell-selected-hover-bg: #eb4619;
|
|
51
|
+
--rs-btn-primary-hover-bg: #eb4619;
|
|
52
|
+
--rs-calendar-range-bg: #faf2ef;
|
|
53
|
+
--rs-listbox-option-hover-bg: #faf2ef;
|
|
43
54
|
|
|
44
|
-
|
|
55
|
+
}
|
|
45
56
|
|
|
46
|
-
|
|
57
|
+
.ui-rc-picker-now {
|
|
58
|
+
--bs-link-color-rgb: 235, 70, 25;
|
|
59
|
+
}
|
|
47
60
|
|
|
48
|
-
|
|
49
|
-
|
|
61
|
+
.ui-rc-pagination-options {
|
|
62
|
+
.ui-rc-select-selection-item {
|
|
63
|
+
font-size: 12px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.#{$prefix}-grid {
|
|
50
68
|
|
|
51
|
-
font-size: 14px;
|
|
52
69
|
.toolbar-icon {
|
|
53
70
|
cursor: pointer;
|
|
71
|
+
|
|
54
72
|
&:focus {
|
|
55
73
|
outline: none;
|
|
56
74
|
}
|
|
57
75
|
}
|
|
58
76
|
|
|
59
77
|
table {
|
|
60
|
-
// border-collapse: collapse;
|
|
61
78
|
border-collapse: separate;
|
|
62
79
|
border-spacing: 0;
|
|
63
80
|
table-layout: fixed;
|
|
64
|
-
// border: 1px solid $tableBorderColor;
|
|
65
81
|
}
|
|
66
82
|
|
|
67
83
|
.#{$prefix}-grid-container {
|
|
68
84
|
|
|
69
|
-
// border: 1px solid $tableBorderColor;
|
|
70
|
-
// border-right: 0;
|
|
71
|
-
// font-size: 13px;
|
|
72
|
-
|
|
73
|
-
// &::after {
|
|
74
|
-
// content: "";
|
|
75
|
-
// position: absolute;
|
|
76
|
-
// top: 0px;
|
|
77
|
-
// right: 0;
|
|
78
|
-
// height: 100%;
|
|
79
|
-
// border-right: 1px solid $tableBorderColor;
|
|
80
|
-
// pointer-events: none;
|
|
81
|
-
// z-index: 1;
|
|
82
|
-
// }
|
|
83
|
-
|
|
84
|
-
.#{$prefix}-grid-cell {
|
|
85
|
-
|
|
86
|
-
padding: 7px 8px;
|
|
87
|
-
|
|
88
|
-
&.#{$prefix}-grid-cell-text-center {
|
|
89
|
-
text-align: center;
|
|
90
|
-
justify-content: center;
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&.#{$prefix}-grid-cell-text-right {
|
|
95
|
-
justify-content: flex-end;
|
|
96
|
-
text-align: right;
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
&.#{$prefix}-grid-cell-ellipsis {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
.ui-rc_cell-content {
|
|
104
|
-
width: 100%;
|
|
105
|
-
overflow: hidden;
|
|
106
|
-
white-space: nowrap;
|
|
107
|
-
text-overflow: ellipsis;
|
|
108
|
-
word-break: keep-all;
|
|
109
|
-
|
|
110
|
-
&.select-cell {
|
|
111
|
-
padding-right: 18px;
|
|
112
|
-
position: relative;
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.caret-down {
|
|
117
|
-
float: right;
|
|
118
|
-
position: absolute;
|
|
119
|
-
right: 0;
|
|
120
|
-
|
|
121
|
-
&::before {
|
|
122
|
-
content: '';
|
|
123
|
-
display: inline-block;
|
|
124
|
-
margin-left: 4px;
|
|
125
|
-
vertical-align: middle;
|
|
126
|
-
width: 0;
|
|
127
|
-
height: 0;
|
|
128
|
-
border-left: 5px solid transparent;
|
|
129
|
-
border-right: 5px solid transparent;
|
|
130
|
-
border-top: 5px solid #6f7777;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&.#{$prefix}-grid-cell-wrap {
|
|
139
|
-
white-space: normal;
|
|
140
|
-
// overflow: hidden;
|
|
141
|
-
text-overflow: ellipsis;
|
|
142
|
-
word-break: break-word;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.#{$prefix}-grid-header-text-wrap {
|
|
146
|
-
white-space: normal;
|
|
147
|
-
overflow: hidden;
|
|
148
|
-
text-overflow: ellipsis;
|
|
149
|
-
word-break: break-word;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.#{$prefix}-grid-thead {
|
|
155
|
-
background-color: #ffffff;
|
|
156
|
-
// background-color: inherit;
|
|
157
|
-
font-weight: 500;
|
|
158
|
-
|
|
159
|
-
.#{$prefix}-grid-cell {
|
|
160
|
-
font-weight: inherit;
|
|
161
|
-
color: #000000E0;
|
|
162
|
-
|
|
163
|
-
background-color: inherit;
|
|
164
|
-
border-inline-end: 1px solid $tableBorderColor;
|
|
165
|
-
border-bottom: 1px solid $tableBorderColor;
|
|
166
|
-
|
|
167
|
-
&.ui-rc-grid-cell-ellipsis {
|
|
168
|
-
|
|
169
|
-
.ui-rc-table-column-title,
|
|
170
|
-
.#{$prefix}-grid-cell-ellipsis {
|
|
171
|
-
width: 100%;
|
|
172
|
-
overflow: hidden;
|
|
173
|
-
white-space: nowrap;
|
|
174
|
-
text-overflow: ellipsis;
|
|
175
|
-
word-break: keep-all;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
&.ui-rc-grid-cell-wrap {
|
|
181
|
-
|
|
182
|
-
.ui-rc-table-column-title,
|
|
183
|
-
.#{$prefix}-grid-cell-text-wrap {
|
|
184
|
-
white-space: normal;
|
|
185
|
-
word-break: break-word;
|
|
186
|
-
overflow: hidden;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
&:hover {
|
|
192
|
-
.ui-rc-header-trigger {
|
|
193
|
-
|
|
194
|
-
.ui-rc-table-column-sorter-cancel {
|
|
195
|
-
opacity: 1;
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
.#{$prefix}-grid-filter-column {
|
|
204
|
-
display: flex;
|
|
205
|
-
justify-content: space-between;
|
|
206
|
-
width: 100%;
|
|
207
|
-
align-items: center;
|
|
208
|
-
position: relative;
|
|
209
|
-
z-index: 3;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.ui-rc-header-trigger {
|
|
213
|
-
padding-left: 6px;
|
|
214
|
-
display: flex;
|
|
215
|
-
align-items: center;
|
|
216
|
-
|
|
217
|
-
.ui-rc-table-column-sorter-cancel {
|
|
218
|
-
opacity: 0;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.resizer {
|
|
224
|
-
|
|
225
|
-
/* background: rgba(0, 0, 0, 0.5); */
|
|
226
|
-
cursor: col-resize;
|
|
227
|
-
height: 100%;
|
|
228
|
-
position: absolute;
|
|
229
|
-
right: 0;
|
|
230
|
-
top: 0;
|
|
231
|
-
z-index: 3;
|
|
232
|
-
touch-action: none;
|
|
233
|
-
user-select: none;
|
|
234
|
-
width: 5px;
|
|
235
|
-
|
|
236
|
-
// &::before {
|
|
237
|
-
// content: '';
|
|
238
|
-
// border-left: 2px solid blue;
|
|
239
|
-
// }
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.resizer.isResizing {
|
|
243
|
-
// &::before {
|
|
244
|
-
// content: '';
|
|
245
|
-
// // border-left: 2px solid gray;
|
|
246
|
-
// border-left: 2px solid rgb(70, 115, 228);
|
|
247
|
-
// position: absolute;
|
|
248
|
-
// // height: 50%;
|
|
249
|
-
// height: 100%;
|
|
250
|
-
// // top: 25%
|
|
251
|
-
// }
|
|
252
|
-
|
|
253
|
-
// background: blue;
|
|
254
|
-
opacity: 1;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
}
|
|
263
85
|
|
|
264
86
|
.#{$prefix}-grid-tbody {
|
|
265
87
|
|
|
@@ -271,8 +93,6 @@ $cell-index-focus-bg-Dark: #E6EFFD !default;
|
|
|
271
93
|
display: flex;
|
|
272
94
|
position: absolute;
|
|
273
95
|
width: 100%;
|
|
274
|
-
// background-color: #ffffff;
|
|
275
|
-
// background-color: inherit;
|
|
276
96
|
|
|
277
97
|
&:hover {
|
|
278
98
|
.#{$prefix}-grid-cell:not(.editable) {
|
|
@@ -317,7 +137,7 @@ $cell-index-focus-bg-Dark: #E6EFFD !default;
|
|
|
317
137
|
|
|
318
138
|
&.#{$prefix}-grid-cell-text-wrap {
|
|
319
139
|
.ui-rc_cell-content {
|
|
320
|
-
|
|
140
|
+
word-break: break-word;
|
|
321
141
|
}
|
|
322
142
|
|
|
323
143
|
}
|
|
@@ -655,7 +475,7 @@ $cell-index-focus-bg-Dark: #E6EFFD !default;
|
|
|
655
475
|
|
|
656
476
|
|
|
657
477
|
&.cell-border-top {
|
|
658
|
-
|
|
478
|
+
|
|
659
479
|
&.ui-rc-grid-cell-fix-left-last {
|
|
660
480
|
&::after {
|
|
661
481
|
left: -100%;
|
|
@@ -807,15 +627,20 @@ $cell-index-focus-bg-Dark: #E6EFFD !default;
|
|
|
807
627
|
border-left: 1px solid #e0e0e0;
|
|
808
628
|
|
|
809
629
|
.be-toolbar-item {
|
|
630
|
+
.ui-rc-btn {
|
|
631
|
+
font-size: 12px;
|
|
632
|
+
}
|
|
633
|
+
|
|
810
634
|
.toolbar-dropdown-button {
|
|
811
|
-
|
|
635
|
+
font-size: 12px;
|
|
636
|
+
.ui-rc-btn.ui-rc-btn-default.ui-rc-btn-variant-outlined.ui-rc-btn-compact-item.ui-rc-btn-compact-first-item {
|
|
812
637
|
border-color: #28c76f;
|
|
813
638
|
}
|
|
814
639
|
|
|
815
|
-
.
|
|
640
|
+
.ui-rc-btn.ui-rc-btn-default.ui-rc-btn-variant-outlined.ui-rc-btn-compact-item.ui-rc-btn-compact-last-item {
|
|
816
641
|
border-color: #28c76f;
|
|
817
642
|
|
|
818
|
-
.
|
|
643
|
+
.ui-rc-btn-icon {
|
|
819
644
|
color: #28c76f;
|
|
820
645
|
}
|
|
821
646
|
}
|
|
@@ -896,24 +721,7 @@ $cell-index-focus-bg-Dark: #E6EFFD !default;
|
|
|
896
721
|
.#{$prefix}-grid {
|
|
897
722
|
|
|
898
723
|
.#{$prefix}-pagination {
|
|
899
|
-
// &::before {
|
|
900
|
-
// content: "";
|
|
901
|
-
// position: absolute;
|
|
902
|
-
// border-left: 1px solid $tableBorderColor;
|
|
903
|
-
// height: 55px;
|
|
904
|
-
// bottom: 0;
|
|
905
|
-
// left: 0;
|
|
906
|
-
// }
|
|
907
724
|
|
|
908
|
-
// &::after {
|
|
909
|
-
// content: "";
|
|
910
|
-
// position: absolute;
|
|
911
|
-
// border-left: 1px solid $tableBorderColor;
|
|
912
|
-
// height: 55px;
|
|
913
|
-
// bottom: 0;
|
|
914
|
-
// visibility: visible;
|
|
915
|
-
// right: 0;
|
|
916
|
-
// }
|
|
917
725
|
|
|
918
726
|
&.top-pagination {
|
|
919
727
|
border: none;
|
|
@@ -925,7 +733,7 @@ $cell-index-focus-bg-Dark: #E6EFFD !default;
|
|
|
925
733
|
}
|
|
926
734
|
}
|
|
927
735
|
|
|
928
|
-
padding:
|
|
736
|
+
padding: 5px;
|
|
929
737
|
|
|
930
738
|
border-bottom: 1px solid $tableBorderColor;
|
|
931
739
|
border-inline: 1px solid $tableBorderColor;
|
|
@@ -383,7 +383,8 @@ const Grid = props => {
|
|
|
383
383
|
},
|
|
384
384
|
className: classNames(`${prefix}-grid ${tableClassNames}`, {
|
|
385
385
|
[`${prefix}-grid-light`]: !theme || theme.theme === 'light',
|
|
386
|
-
[`${prefix}-grid-dark`]: theme?.theme === 'dark'
|
|
386
|
+
[`${prefix}-grid-dark`]: theme?.theme === 'dark',
|
|
387
|
+
[`table-striped`]: true
|
|
387
388
|
}),
|
|
388
389
|
style: {
|
|
389
390
|
// minHeight: minHeight ?? undefined,
|
|
@@ -349,7 +349,7 @@ const TableBodyCell = props => {
|
|
|
349
349
|
// display: 'flex',
|
|
350
350
|
width: cell.column.getSize(),
|
|
351
351
|
minWidth: cell.column.getSize(),
|
|
352
|
-
minHeight:
|
|
352
|
+
minHeight: 32,
|
|
353
353
|
...getCommonPinningStyles(cell.column)
|
|
354
354
|
},
|
|
355
355
|
onMouseEnter: e => {
|
|
@@ -403,6 +403,9 @@ const TableBodyCell = props => {
|
|
|
403
403
|
}
|
|
404
404
|
},
|
|
405
405
|
onClick: e => {
|
|
406
|
+
if (e.detail === 2) {
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
406
409
|
const selection = window.getSelection();
|
|
407
410
|
const text = selection ? selection.toString() : "";
|
|
408
411
|
if (text.length > 0 || enableClick === false) {} else {
|
|
@@ -115,7 +115,7 @@ const TableBodyRow = ({
|
|
|
115
115
|
rowData: row.original,
|
|
116
116
|
value: cellValue
|
|
117
117
|
}) : /*#__PURE__*/React.createElement(React.Fragment, null, headertext, headertext ? ': ' : '', " ", cellContent);
|
|
118
|
-
return /*#__PURE__*/React.createElement(TableBodyCell, _extends({
|
|
118
|
+
return /*#__PURE__*/React.createElement(TableBodyCell, _extends({}, otherCellAttributes, {
|
|
119
119
|
table: table,
|
|
120
120
|
tableId: tableId,
|
|
121
121
|
key: cell.id,
|
|
@@ -124,8 +124,7 @@ const TableBodyRow = ({
|
|
|
124
124
|
virtualRow: virtualRow,
|
|
125
125
|
isEditing: false,
|
|
126
126
|
colSpan: colSpanGroup ?? 1,
|
|
127
|
-
rowSpan: 1
|
|
128
|
-
}, otherCellAttributes, {
|
|
127
|
+
rowSpan: 1,
|
|
129
128
|
groupValue: groupValue
|
|
130
129
|
}));
|
|
131
130
|
}
|
|
@@ -149,7 +148,7 @@ const TableBodyRow = ({
|
|
|
149
148
|
const childrenData = row.subRows.map(it => it.original);
|
|
150
149
|
const sumValue = sumByField(childrenData, cell.column.id);
|
|
151
150
|
const sumValueFormat = numericFormatter(sumValue.toString(), numericFormatProps);
|
|
152
|
-
return /*#__PURE__*/React.createElement(TableBodyCellRowGroup, _extends({
|
|
151
|
+
return /*#__PURE__*/React.createElement(TableBodyCellRowGroup, _extends({}, otherCellAttributes, {
|
|
153
152
|
table: table,
|
|
154
153
|
tableId: tableId,
|
|
155
154
|
key: cell.id,
|
|
@@ -160,9 +159,9 @@ const TableBodyRow = ({
|
|
|
160
159
|
colSpan: onCellColSpan ?? 1,
|
|
161
160
|
rowSpan: onCellRowSpan ?? 1,
|
|
162
161
|
sumValue: sumValueFormat
|
|
163
|
-
}
|
|
162
|
+
}));
|
|
164
163
|
}
|
|
165
|
-
return /*#__PURE__*/React.createElement(TableBodyCell, _extends({
|
|
164
|
+
return /*#__PURE__*/React.createElement(TableBodyCell, _extends({}, otherCellAttributes, {
|
|
166
165
|
table: table,
|
|
167
166
|
tableId: tableId,
|
|
168
167
|
key: cell.id,
|
|
@@ -172,7 +171,7 @@ const TableBodyRow = ({
|
|
|
172
171
|
isEditing: false,
|
|
173
172
|
colSpan: onCellColSpan ?? 1,
|
|
174
173
|
rowSpan: onCellRowSpan ?? 1
|
|
175
|
-
}
|
|
174
|
+
}));
|
|
176
175
|
}));
|
|
177
176
|
};
|
|
178
177
|
export default TableBodyRow;
|
|
@@ -11,4 +11,4 @@ const colorDark = "#e6e4f3e6";
|
|
|
11
11
|
export const GridStyle = styled.div.withConfig({
|
|
12
12
|
displayName: "GridStyle",
|
|
13
13
|
componentId: "es-grid-template__sc-rs980s-0"
|
|
14
|
-
})(["&.", "-grid{color:", ";font-size:13px;background-color:", ";table{table-layout:fixed;border-collapse:separate;border-spacing:0;}.", "-grid-container{border:1px solid ", ";.", "-grid-thead{&:has(.resizer.isResizing){.", "-grid-cell{touch-action:none;user-select:none;}}.", "-grid-cell{background-color:#ffffff;&:has(.resizer.isResizing){touch-action:none;user-select:none;}.resizer{cursor:col-resize;height:100%;position:absolute;right:0;top:0;touch-action:none;user-select:none;width:5px;}}}tbody{.", "-grid-row{&.", "-grid-row-parent{.", "-grid-cell{font-weight:600;background-color:#f5f5f5;}}}}.", "-grid-tfoot{z-index:3 !important;.ui-rc-grid-footer-row{.ui-rc-grid-cell{border-top:1px solid ", ";border-bottom:1px solid ", ";font-weight:500;}}}.", "-grid-cell{padding:
|
|
14
|
+
})(["&.", "-grid{color:", ";font-size:13px;background-color:", ";table{table-layout:fixed;border-collapse:separate;border-spacing:0;}.", "-grid-container{border:1px solid ", ";.", "-grid-thead{&:has(.resizer.isResizing){.", "-grid-cell{touch-action:none;user-select:none;}}.", "-grid-cell{background-color:#ffffff;&:has(.resizer.isResizing){touch-action:none;user-select:none;}.resizer{cursor:col-resize;height:100%;position:absolute;right:0;top:0;touch-action:none;user-select:none;width:5px;}}}tbody{.", "-grid-row{&.", "-grid-row-parent{.", "-grid-cell{font-weight:600;background-color:#f5f5f5;}}}}.", "-grid-tfoot{z-index:3 !important;.ui-rc-grid-footer-row{.ui-rc-grid-cell{border-top:1px solid ", ";border-bottom:1px solid ", ";font-weight:500;}}}.", "-grid-cell{padding:5px 8px;.class-content:has(*){background:lightblue;}.class-content:not(:has(*)){background:lightgreen;}&.", "-grid-cell-text-center{text-align:center;justify-content:center;}&.", "-grid-cell-text-righ{text-align:right;justify-content:flex-end;}}.", "-grid-cell:not(:has(*)){&.", "-grid-cell-text-center{text-align:center;justify-content:center;}&.", "-grid-cell-text-right{text-align:right;justify-content:flex-end;}&.", "-grid-cell-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}}&.", "-grid-light{.", "-grid-container{.", "-grid-thead{z-index:3 !important;background-color:", ";font-weight:500;.", "-grid-cell{font-weight:inherit;color:", ";background-color:#ffffff;border-inline-end:1px solid ", ";border-bottom:1px solid ", ";&.ui-rc-grid-cell-ellipsis{.ui-rc-table-column-title,.", "-grid-cell-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}&.ui-rc-grid-cell-wrap{.ui-rc-table-column-title,.", "-grid-cell-text-wrap{white-space:normal;word-break:break-word;overflow:hidden;}}&:hover{.ui-rc-header-trigger{.ui-rc-table-column-sorter-cancel{opacity:1;}}}.", "-grid-filter-column{display:flex;justify-content:space-between;width:100%;align-items:center;position:relative;}.ui-rc-header-trigger{padding-left:6px;display:flex;align-items:center;.ui-rc-table-column-sorter-cancel{opacity:0;}}.resizer{cursor:col-resize;height:100%;position:absolute;right:0;top:0;touch-action:none;user-select:none;width:5px;}.resizer.isResizing{opacity:1;}}}.", "-grid-tbody{.", "-grid-row{background-color:", ";color:", ";}}tbody{background-color:", ";color:", ";.", "-grid-row{&.ui-rc-grid-row-selected{.", "-grid-cell{background-color:", ";}}}.", "-grid-cell{outline:none;background-color:#ffffff;border-inline-end:1px solid ", ";border-bottom:1px solid ", ";&.ui-rc-grid-cell-selected{background-color:", " !important;}&.disable{background-color:#f0f0f0;}&.cell-editable{user-select:none;&.cell-border-top{&::after{content:\"\";position:absolute;top:0px;left:0;height:1px;width:100%;border-top:1px solid ", ";pointer-events:none;z-index:1;}}&.cell-border-bottom{border-bottom:1px solid ", ";}&.cell-border-left{&::before{content:\"\";position:absolute;top:0;left:0;height:102%;width:1px;border-left:1px solid ", ";pointer-events:none;z-index:1;}}&.cell-border-right{border-inline-end:1px solid ", ";}&.cell-paste-border-top{&::after{content:\"\";position:absolute;top:0px;left:0;height:1px;width:100%;border-top:1px dashed #949494;pointer-events:none;z-index:1;}&.ui-rc-grid-cell-fix-left-last{&::after{left:-100%;}}&.ui-rc-grid-cell-fix-right-first{&::after{left:100%;}}}&.cell-paste-border-bottom{border-bottom:1px dashed #949494;}&.cell-paste-border-left{&::before{content:\"\";position:absolute;top:0;left:0;height:102%;width:1px;border-left:1px dashed #949494;pointer-events:none;z-index:1;}}&.cell-paste-border-right{border-inline-end:1px dashed #949494;}.dragging-point{width:6px;height:6px;position:absolute;cursor:crosshair;right:0px;bottom:0px;&.hidden{display:none;}.dot-point{position:absolute;width:6px;height:6px;border-radius:0px;background-color:", ";bottom:0;right:0;}}}&.cell-editing{padding:0;&:focus-visible{outline:none;}.ant-form-item,.ant-row.ant-form-item-row,.ant-col.ant-form-item-control,.ant-form-item-control-input,.ant-form-item-control-input-content,.ant-input{height:100% !important;&:focus-visible{outline:none;}}textarea.ant-input{line-height:1.8;height:36px !important;min-height:36px !important;}input.be-cell-editing,.ant-picker,.ui-rc-select-selector,.ui-rc-table-select-selector{padding-inline:7px;}.", "-checkbox-wrapper{.", "-checkbox{background-color:red;}.", "-checkbox-input{&:focus-visible{outline:none;}}}.ant-input,.ant-picker{border-radius:0;}.ant-color-picker-trigger{height:100%;border-radius:0;.ant-color-picker-color-block{height:100%;width:100%;}}.", "-table-select-single .", "-table-select-selector,.", "-select-single .", "-select-selector,.ui-rc-table-select-selector{border-radius:0 !important;}.", "-table-select-single:not(.", "-table-select-customize-input){.", "-table-select-selector{.", "-table-select-selection-search-input{height:auto;}}}}}}.", "-grid-tfoot{.", "-grid-footer-row{border-bottom-width:1px;border-bottom-color:", ";border-bottom-style:solid;border-top-width:1px;border-top-color:", ";border-top-style:solid;background-color:#fafafa;}.", "-grid-cell{background-color:inherit;border-inline-end:1px solid ", ";}}}}&.", "-grid-dark{background-color:", ";color:", ";.", "-grid-container{border-color:", ";&::after{border-right-color:", ";}}}}"], props => props.$prefix, color, BgColor, props => props.$prefix, tableBorderColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, tableBorderColor, tableBorderColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => props.$prefix, props => `${props.$theme.color ? props.$theme.color : color}`, tableBorderColor, tableBorderColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => `${props.$theme.color ? props.$theme.color : color}`, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => `${props.$theme.color ? props.$theme.color : color}`, props => props.$prefix, props => props.$prefix, rowSelectedBg, props => props.$prefix, tableBorderColor, tableBorderColor, cellSelectedBg, borderSelectedColor, borderSelectedColor, borderSelectedColor, borderSelectedColor, borderSelectedColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, tableBorderColor, tableBorderColor, props => props.$prefix, tableBorderColor, props => props.$prefix, BgColorDark, colorDark, props => props.$prefix, tableBorderColorDark, tableBorderColorDark);
|
|
@@ -124,7 +124,9 @@ const TableWrapper = props => {
|
|
|
124
124
|
}
|
|
125
125
|
}, /*#__PURE__*/React.createElement(TableVirtuoso, {
|
|
126
126
|
data: table.getRowModel().rows,
|
|
127
|
-
totalCount: rows.length
|
|
127
|
+
totalCount: rows.length
|
|
128
|
+
// isScrolling={}
|
|
129
|
+
,
|
|
128
130
|
components: {
|
|
129
131
|
Table: ({
|
|
130
132
|
style,
|
|
@@ -491,7 +491,10 @@ export type TableProps<RecordType = AnyObject> = {
|
|
|
491
491
|
/** Cho phép chỉnh sửa dữ liệu */
|
|
492
492
|
editAble?: boolean;
|
|
493
493
|
/** Callback khi data thay đổi */
|
|
494
|
-
onDataChange?: (data: RecordType[]
|
|
494
|
+
onDataChange?: (data: RecordType[], args?: {
|
|
495
|
+
type: string;
|
|
496
|
+
row?: number;
|
|
497
|
+
}) => void;
|
|
495
498
|
/** Giá trị mặc định khi thêm mới */
|
|
496
499
|
defaultValue?: AnyObject | (() => AnyObject);
|
|
497
500
|
/** Callback xử lý paste dữ liệu */
|
|
@@ -176,7 +176,37 @@ const InternalTable = props => {
|
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
178
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_rcMasterUi.ConfigProvider, {
|
|
179
|
-
locale: language
|
|
179
|
+
locale: language,
|
|
180
|
+
theme: {
|
|
181
|
+
token: {
|
|
182
|
+
colorPrimary: '#eb4619',
|
|
183
|
+
colorLink: '#eb4619'
|
|
184
|
+
},
|
|
185
|
+
components: {
|
|
186
|
+
Input: {
|
|
187
|
+
activeBorderColor: '#1677ff',
|
|
188
|
+
hoverBorderColor: '#1677ff'
|
|
189
|
+
},
|
|
190
|
+
Button: {
|
|
191
|
+
colorLink: '#eb4619',
|
|
192
|
+
colorLinkHover: '#eb4619'
|
|
193
|
+
},
|
|
194
|
+
Select: {
|
|
195
|
+
activeBorderColor: '#1677ff',
|
|
196
|
+
hoverBorderColor: '#1677ff'
|
|
197
|
+
// colorPrimary: '#eb4619',
|
|
198
|
+
// colorBgBase: 'red'
|
|
199
|
+
},
|
|
200
|
+
DatePicker: {
|
|
201
|
+
colorPrimary: '#eb4619',
|
|
202
|
+
activeBorderColor: '#1677ff',
|
|
203
|
+
hoverBorderColor: '#1677ff'
|
|
204
|
+
},
|
|
205
|
+
Pagination: {
|
|
206
|
+
fontSize: 12
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
180
210
|
}, /*#__PURE__*/_react.default.createElement(_rcMasterUi.CustomProvider, {
|
|
181
211
|
locale: languages
|
|
182
212
|
}, /*#__PURE__*/_react.default.createElement(_Grid.default, (0, _extends2.default)({}, rest, {
|