@linzjs/step-ag-grid 17.11.0 → 17.13.0
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 +70 -23
- package/dist/src/components/Grid.d.ts +1 -0
- package/dist/src/components/GridNoRowsOverlay.d.ts +1 -0
- package/dist/step-ag-grid.cjs.js +2 -2
- package/dist/step-ag-grid.cjs.js.map +1 -1
- package/dist/step-ag-grid.esm.js +2 -2
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Grid.tsx +2 -0
- package/src/components/GridNoRowsOverlay.tsx +3 -1
- package/src/stories/grid/GridViewList.stories.tsx +124 -0
- package/src/styles/GridTheme.scss +70 -23
package/dist/GridTheme.scss
CHANGED
|
@@ -20,6 +20,14 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
|
|
|
20
20
|
header-height: 40px,
|
|
21
21
|
font-size: calc($grid-base-font-size),
|
|
22
22
|
),
|
|
23
|
+
'step-view-list-default.theme-specific': (
|
|
24
|
+
extend-theme: alpine,
|
|
25
|
+
row-height: 60px,
|
|
26
|
+
header-height: 40px,
|
|
27
|
+
font-size: calc($grid-base-font-size),
|
|
28
|
+
header-background-color: lui.$iceberg,
|
|
29
|
+
cell-horizontal-border: none,
|
|
30
|
+
),
|
|
23
31
|
),
|
|
24
32
|
|
|
25
33
|
input-focus-border-color: lui.$sea,
|
|
@@ -52,28 +60,12 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
|
|
|
52
60
|
|
|
53
61
|
.ag-theme-step-default.theme-specific,
|
|
54
62
|
.ag-theme-step-compact.theme-specific {
|
|
55
|
-
.ag-text-area-input:focus {
|
|
56
|
-
border-color: lui.$sea;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.ag-cell[col-id="selection"] {
|
|
60
|
-
display: flex; // Fix that when you click below checkbox it doesn't process a click
|
|
61
|
-
}
|
|
62
63
|
|
|
63
64
|
// fix alignment of cell content when grabber is present
|
|
64
65
|
.ag-header-cell-comp-wrapper {
|
|
65
66
|
justify-content: end;
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
// Fix that when you click below checkbox it doesn't process a click
|
|
69
|
-
.ag-cell-wrapper > *:not(.ag-cell-value, .ag-group-value) {
|
|
70
|
-
height: auto;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.ag-row:last-of-type {
|
|
74
|
-
border-bottom: 1px solid lui.$dew;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
69
|
.ag-header-cell {
|
|
78
70
|
font-size: 14px;
|
|
79
71
|
font-weight: 600;
|
|
@@ -86,6 +78,28 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
|
|
|
86
78
|
}
|
|
87
79
|
}
|
|
88
80
|
|
|
81
|
+
.ag-header .ag-header-cell[aria-colindex="1"] {
|
|
82
|
+
padding-left: 17px;
|
|
83
|
+
padding-right: 15px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ag-text-area-input:focus {
|
|
87
|
+
border-color: lui.$sea;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ag-cell[col-id="selection"] {
|
|
91
|
+
display: flex; // Fix that when you click below checkbox it doesn't process a click
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Fix that when you click below checkbox it doesn't process a click
|
|
95
|
+
.ag-cell-wrapper > *:not(.ag-cell-value, .ag-group-value) {
|
|
96
|
+
height: auto;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ag-row:last-of-type {
|
|
100
|
+
border-bottom: 1px solid lui.$dew;
|
|
101
|
+
}
|
|
102
|
+
|
|
89
103
|
.ag-cell-label-container {
|
|
90
104
|
padding: 8px 0;
|
|
91
105
|
|
|
@@ -93,10 +107,6 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
|
|
|
93
107
|
height: fit-content;
|
|
94
108
|
}
|
|
95
109
|
|
|
96
|
-
.ag-header .ag-header-cell[aria-colindex="1"] {
|
|
97
|
-
padding-left: 17px;
|
|
98
|
-
padding-right: 15px;
|
|
99
|
-
}
|
|
100
110
|
|
|
101
111
|
.ag-cell[aria-colindex="1"] {
|
|
102
112
|
padding-left: lui.$unit-rg;
|
|
@@ -200,14 +210,14 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
|
|
|
200
210
|
height: 2px;
|
|
201
211
|
background-color: transparent;
|
|
202
212
|
}
|
|
203
|
-
|
|
213
|
+
|
|
204
214
|
.ag-row-highlight-above::after {
|
|
205
215
|
top:-3px; // moves the top highlight to the position of the bottom highlight
|
|
206
216
|
border-top: 2px dashed lui.$andrea;
|
|
207
217
|
}
|
|
208
218
|
|
|
209
219
|
.ag-row-highlight-above:first-of-type::after {
|
|
210
|
-
top:
|
|
220
|
+
top:0; // the first row highlight needs to in the normal position otherwise it is cut off by the top of the table
|
|
211
221
|
}
|
|
212
222
|
|
|
213
223
|
.ag-row-highlight-below::after {
|
|
@@ -225,7 +235,7 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
|
|
|
225
235
|
// box-shadow: -4px 0px 15px -4px rgba(0, 0, 0, 0.1);
|
|
226
236
|
// right: -4px;
|
|
227
237
|
// }
|
|
228
|
-
|
|
238
|
+
|
|
229
239
|
// div:after {
|
|
230
240
|
// box-shadow: 15px 0 15px -15px inset;
|
|
231
241
|
// right: -15px;
|
|
@@ -249,3 +259,40 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
|
|
|
249
259
|
clip-path: polygon(-20% 0%, 100% 0%, 100% 100%, -20% 100%);
|
|
250
260
|
}
|
|
251
261
|
}
|
|
262
|
+
|
|
263
|
+
.ag-theme-step-view-list-default.theme-specific {
|
|
264
|
+
|
|
265
|
+
.ag-header-cell {
|
|
266
|
+
font-size: 14px;
|
|
267
|
+
font-weight: 600;
|
|
268
|
+
|
|
269
|
+
// fix: Display descender line
|
|
270
|
+
padding: 0 12px;
|
|
271
|
+
|
|
272
|
+
.LuiIcon {
|
|
273
|
+
fill: lui.$surfie;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.ag-header .ag-header-cell[aria-colindex="1"] {
|
|
278
|
+
padding-left: 32px;
|
|
279
|
+
padding-right: 12px;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.ag-header-group-cell {
|
|
283
|
+
font-weight: normal;
|
|
284
|
+
font-size: 22px;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.ag-header-cell {
|
|
288
|
+
font-size: 14px;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.ag-row .ag-cell:first-of-type {
|
|
292
|
+
padding-left: 32px;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.ag-row .ag-cell:last-of-type {
|
|
296
|
+
padding-right: 32px;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
@@ -3,6 +3,7 @@ export interface GridNoRowsOverlayProps {
|
|
|
3
3
|
rowCount: number | undefined | null;
|
|
4
4
|
filteredRowCount: number;
|
|
5
5
|
noRowsOverlayText: string | undefined;
|
|
6
|
+
noRowsMatchingOverlayText: string | undefined;
|
|
6
7
|
headerRowHeight: number;
|
|
7
8
|
}
|
|
8
9
|
export declare const GridNoRowsOverlay: (props: GridNoRowsOverlayProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/step-ag-grid.cjs.js
CHANGED
|
@@ -311,7 +311,7 @@ const GridNoRowsOverlay = (props) => {
|
|
|
311
311
|
if (props.rowCount === 0)
|
|
312
312
|
return jsxRuntime.jsx("div", { children: props.noRowsOverlayText ?? "There are currently no rows" });
|
|
313
313
|
if (props.filteredRowCount === 0)
|
|
314
|
-
return jsxRuntime.jsx("div", { children: "All rows have been filtered" });
|
|
314
|
+
return jsxRuntime.jsx("div", { children: props.noRowsMatchingOverlayText ?? "All rows have been filtered" });
|
|
315
315
|
return jsxRuntime.jsx("span", {});
|
|
316
316
|
};
|
|
317
317
|
|
|
@@ -2825,7 +2825,7 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
|
|
|
2825
2825
|
}, onRowDataUpdated: onRowDataChanged, onCellKeyDown: onCellKeyPress, onCellClicked: onCellClicked, onCellDoubleClicked: onCellDoubleClick, onCellEditingStarted: refreshSelectedRows, domLayout: params.domLayout, onColumnResized: onColumnResized, defaultColDef: { minWidth: 48, ...lodashEs.omit(params.defaultColDef, ["editable"]) }, columnDefs: columnDefsAdjusted, rowData: rowData, noRowsOverlayComponent: (event) => {
|
|
2826
2826
|
let rowCount = 0;
|
|
2827
2827
|
event.api.forEachNode(() => rowCount++);
|
|
2828
|
-
return (jsxRuntime.jsx(GridNoRowsOverlay, { loading: !rowData || params.loading === true, rowCount: rowCount, headerRowHeight: headerRowCount * rowHeight, filteredRowCount: event.api.getDisplayedRowCount(), noRowsOverlayText: params.noRowsOverlayText }));
|
|
2828
|
+
return (jsxRuntime.jsx(GridNoRowsOverlay, { loading: !rowData || params.loading === true, rowCount: rowCount, headerRowHeight: headerRowCount * rowHeight, filteredRowCount: event.api.getDisplayedRowCount(), noRowsOverlayText: params.noRowsOverlayText, noRowsMatchingOverlayText: params.noRowsMatchingOverlayText }));
|
|
2829
2829
|
}, onModelUpdated: onModelUpdated, onGridReady: onGridReady, onSortChanged: ensureSelectedRowIsVisible, postSortRows: params.onRowDragEnd ? undefined : postSortRows, onSelectionChanged: synchroniseExternalStateToGridSelection, onColumnMoved: params.onColumnMoved, alwaysShowVerticalScroll: params.alwaysShowVerticalScroll, isExternalFilterPresent: isExternalFilterPresent, doesExternalFilterPass: doesExternalFilterPass, maintainColumnOrder: true, preventDefaultOnContextMenu: true, onCellContextMenu: gridContextMenu.cellContextMenu, rowDragText: params.rowDragText, onRowDragMove: onRowDragMove, onRowDragEnd: onRowDragEnd, onRowDragLeave: onRowDragLeave, suppressCellFocus: params.suppressCellFocus }) })] }));
|
|
2830
2830
|
};
|
|
2831
2831
|
|