@linzjs/step-ag-grid 17.4.5 → 17.4.7
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/GridTheme.scss +126 -74
- package/dist/index.css +5 -51
- package/dist/step-ag-grid.cjs.js +10 -1
- package/dist/step-ag-grid.cjs.js.map +1 -1
- package/dist/step-ag-grid.esm.js +10 -1
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/stories/grid/GridDragRow.stories.tsx +1 -1
- package/src/styles/Grid.scss +6 -54
- package/src/styles/GridTheme.scss +126 -74
- package/src/utils/testUtil.ts +20 -2
package/dist/GridTheme.scss
CHANGED
|
@@ -47,98 +47,150 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
|
|
|
47
47
|
)
|
|
48
48
|
);
|
|
49
49
|
|
|
50
|
+
.ag-theme-step-default,
|
|
51
|
+
.ag-theme-step-compact {
|
|
52
|
+
.ag-cell[col-id="selection"] {
|
|
53
|
+
display: flex; // Fix that when you click below checkbox it doesn't process a click
|
|
54
|
+
}
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
// fix alignment of cell content when grabber is present
|
|
57
|
+
.ag-header-cell-comp-wrapper {
|
|
58
|
+
justify-content: end;
|
|
59
|
+
}
|
|
54
60
|
|
|
55
|
-
//
|
|
56
|
-
.ag-
|
|
57
|
-
|
|
58
|
-
}
|
|
61
|
+
// Fix that when you click below checkbox it doesn't process a click
|
|
62
|
+
.ag-cell-wrapper > *:not(.ag-cell-value, .ag-group-value) {
|
|
63
|
+
height: auto;
|
|
64
|
+
}
|
|
59
65
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
66
|
+
.ag-row:last-of-type {
|
|
67
|
+
border-bottom: 1px solid lui.$dew;
|
|
68
|
+
}
|
|
64
69
|
|
|
65
|
-
.ag-
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
.ag-header-cell {
|
|
71
|
+
font-size: 14px;
|
|
72
|
+
font-weight: 600;
|
|
73
|
+
|
|
74
|
+
// fix: Display descender line
|
|
75
|
+
padding: 0 11px;
|
|
68
76
|
|
|
69
|
-
.
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
.LuiIcon {
|
|
78
|
+
fill: lui.$surfie;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
72
81
|
|
|
73
|
-
|
|
74
|
-
|
|
82
|
+
.ag-cell-label-container {
|
|
83
|
+
padding: 8px 0;
|
|
75
84
|
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
// Help ag-grid to calculate column height in react portal
|
|
86
|
+
height: fit-content;
|
|
78
87
|
}
|
|
79
|
-
}
|
|
80
88
|
|
|
81
|
-
.ag-cell-
|
|
82
|
-
|
|
89
|
+
.ag-header .ag-header-cell[aria-colindex="1"] {
|
|
90
|
+
padding-left: 17px;
|
|
91
|
+
padding-right: 15px;
|
|
92
|
+
}
|
|
83
93
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
94
|
+
.ag-cell[role="gridcell"] {
|
|
95
|
+
border-right: none;
|
|
96
|
+
border-left: 1px var(--ag-cell-horizontal-border);
|
|
97
|
+
}
|
|
87
98
|
|
|
88
|
-
.ag-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
99
|
+
.ag-cell[aria-colindex="1"] {
|
|
100
|
+
border-left: 1px solid transparent;
|
|
101
|
+
padding-left: lui.$unit-rg;
|
|
102
|
+
}
|
|
92
103
|
|
|
93
|
-
.ag-cell
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
104
|
+
.ag-cell {
|
|
105
|
+
padding-left: 11px;
|
|
106
|
+
padding-right: 11px;
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
}
|
|
97
110
|
|
|
98
|
-
.ag-cell
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
111
|
+
.ag-cell-wrap-text {
|
|
112
|
+
word-break: break-word;
|
|
113
|
+
}
|
|
102
114
|
|
|
103
|
-
.ag-cell
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
115
|
+
.ag-cell.ag-cell-popup-editing,
|
|
116
|
+
.ag-cell.ag-selected-for-edit,
|
|
117
|
+
.ag-cell-inline-editing {
|
|
118
|
+
padding-left: 9px;
|
|
119
|
+
padding-right: 9px;
|
|
120
|
+
background: rgb(72 160 244 / 20%);
|
|
109
121
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
122
|
+
// These are important, it needs to override ag-grid to work
|
|
123
|
+
border: 3px solid #48a0f4 !important;
|
|
124
|
+
border-right: 3px solid #48a0f4 !important;
|
|
125
|
+
}
|
|
113
126
|
|
|
114
|
-
.ag-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
padding-right: 9px;
|
|
119
|
-
background: rgb(72 160 244 / 20%);
|
|
127
|
+
.ag-row .ag-cell-data-changed {
|
|
128
|
+
// ag-grid natively has !important on this style so we have to use it here :(
|
|
129
|
+
background-color: lightgoldenrodyellow;
|
|
130
|
+
}
|
|
120
131
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
132
|
+
.ag-center-cols-clipper {
|
|
133
|
+
// when using domLayout={"autoHeight"}, ag grid has a default min-height
|
|
134
|
+
// set to 150px so the !important is necessary here
|
|
135
|
+
min-height: 40px !important;
|
|
136
|
+
}
|
|
125
137
|
|
|
126
|
-
.ag-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
138
|
+
.ag-body-horizontal-scroll-viewport {
|
|
139
|
+
// It's set to scroll by default, but this causes issues with selecting the last row
|
|
140
|
+
overflow-x: auto;
|
|
141
|
+
}
|
|
130
142
|
|
|
131
|
-
.ag-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
min-height: 40px !important;
|
|
135
|
-
}
|
|
143
|
+
.ag-cell {
|
|
144
|
+
font-weight: 400;
|
|
145
|
+
}
|
|
136
146
|
|
|
137
|
-
.ag-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
147
|
+
.ag-cell-value {
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.ag-cell .GridCell-editableIcon {
|
|
153
|
+
fill: lui.$silver;
|
|
154
|
+
visibility: hidden;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.ag-cell:hover .GridCell-editableIcon,
|
|
158
|
+
.ag-cell.ag-cell-focus .GridCell-editableIcon {
|
|
159
|
+
visibility: visible;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.ag-drag-handle.ag-row-drag {
|
|
163
|
+
opacity: 0;
|
|
141
164
|
|
|
142
|
-
.
|
|
143
|
-
|
|
144
|
-
|
|
165
|
+
.ag-icon-grip {
|
|
166
|
+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%239999B3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2Zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2Zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z' /%3E%3C/svg%3E");
|
|
167
|
+
background-repeat: no-repeat no-repeat;
|
|
168
|
+
background-position: center center;
|
|
169
|
+
background-size: cover;
|
|
170
|
+
color: transparent;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.ag-row:hover {
|
|
175
|
+
.ag-drag-handle.ag-row-drag {
|
|
176
|
+
opacity: 1;
|
|
177
|
+
transition: opacity 0.2s ease-in-out;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.GridCell-readonly {
|
|
182
|
+
color: lui.$fuscous;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.ag-cell:not(.ag-cell-focus) .Grid-displayWhenCellFocused {
|
|
186
|
+
visibility: hidden;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.ag-cell:hover .Grid-displayWhenCellFocused {
|
|
190
|
+
visibility: inherit;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.ag-cell-wrapper {
|
|
194
|
+
width: 100%;
|
|
195
|
+
}
|
|
196
|
+
}
|
package/dist/index.css
CHANGED
|
@@ -383,57 +383,6 @@
|
|
|
383
383
|
padding: 0.375rem 0.75rem;
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
-
.ag-cell-value {
|
|
387
|
-
display: flex;
|
|
388
|
-
align-items: center;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.ag-cell .GridCell-editableIcon {
|
|
392
|
-
fill: #beb9b4;
|
|
393
|
-
visibility: hidden;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
.ag-cell:hover .GridCell-editableIcon, .ag-cell.ag-cell-focus .GridCell-editableIcon {
|
|
397
|
-
visibility: visible;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
.ag-drag-handle.ag-row-drag {
|
|
401
|
-
opacity: 0;
|
|
402
|
-
}
|
|
403
|
-
.ag-drag-handle.ag-row-drag .ag-icon-grip {
|
|
404
|
-
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%239999B3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2Zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2Zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z' /%3E%3C/svg%3E");
|
|
405
|
-
background-repeat: no-repeat no-repeat;
|
|
406
|
-
background-position: center center;
|
|
407
|
-
background-size: cover;
|
|
408
|
-
color: transparent;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.ag-row:hover .ag-drag-handle.ag-row-drag {
|
|
412
|
-
opacity: 1;
|
|
413
|
-
transition: opacity 0.2s ease-in-out;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.GridFormMessage-container {
|
|
417
|
-
padding: 4px 8px;
|
|
418
|
-
max-width: 400px;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
.GridCell-readonly {
|
|
422
|
-
color: #6b6966;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
.Grid-container.ag-theme-alpine .ag-cell:not(.ag-cell-focus) .Grid-displayWhenCellFocused {
|
|
426
|
-
visibility: hidden;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
.Grid-container.ag-theme-alpine .ag-cell:hover .Grid-displayWhenCellFocused {
|
|
430
|
-
visibility: inherit;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.Grid-container.ag-theme-alpine .ag-cell-wrapper {
|
|
434
|
-
width: 100%;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
386
|
.flex-col-center {
|
|
438
387
|
display: flex;
|
|
439
388
|
flex-direction: column;
|
|
@@ -446,6 +395,11 @@
|
|
|
446
395
|
align-items: center;
|
|
447
396
|
}
|
|
448
397
|
|
|
398
|
+
.GridFormMessage-container {
|
|
399
|
+
padding: 4px 8px;
|
|
400
|
+
max-width: 400px;
|
|
401
|
+
}
|
|
402
|
+
|
|
449
403
|
.GridCell-container {
|
|
450
404
|
overflow: hidden;
|
|
451
405
|
text-overflow: ellipsis;
|
package/dist/step-ag-grid.cjs.js
CHANGED
|
@@ -25593,7 +25593,16 @@ const findRow = async (rowId, within) => {
|
|
|
25593
25593
|
await waitForWrapper(async () => {
|
|
25594
25594
|
expect(getAllQuick({ classes: ".ag-row" }).length > 0).toBe(true);
|
|
25595
25595
|
});
|
|
25596
|
-
|
|
25596
|
+
//if this is not wrapped in an act console errors are logged during testing
|
|
25597
|
+
let row;
|
|
25598
|
+
await act(async () => {
|
|
25599
|
+
row = await findQuick({ tagName: `.ag-center-cols-container div[row-id='${rowId}']:not(:empty)` }, within);
|
|
25600
|
+
const leftCols = await findQuick({ tagName: `.ag-pinned-left-cols-container div[row-id='${rowId}']` }, within);
|
|
25601
|
+
const rightCols = await findQuick({ tagName: `.ag-pinned-right-cols-container div[row-id='${rowId}']` }, within);
|
|
25602
|
+
const combineChildren = [...leftCols.children, ...row.children, ...rightCols.children];
|
|
25603
|
+
row.replaceChildren(...combineChildren);
|
|
25604
|
+
});
|
|
25605
|
+
return row;
|
|
25597
25606
|
};
|
|
25598
25607
|
const queryRow = async (rowId, within) => {
|
|
25599
25608
|
return queryQuick({ tagName: `div[row-id='${rowId}']:not(:empty)` }, within);
|