@linzjs/step-ag-grid 17.4.6 → 17.4.8
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 +122 -76
- package/dist/index.css +5 -51
- package/dist/step-ag-grid.cjs.js +1 -1
- package/dist/step-ag-grid.cjs.js.map +1 -1
- package/dist/step-ag-grid.esm.js +1 -1
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Grid.tsx +1 -0
- package/src/stories/grid/GridDragRow.stories.tsx +1 -1
- package/src/styles/Grid.scss +6 -54
- package/src/styles/GridTheme.scss +122 -76
package/dist/GridTheme.scss
CHANGED
|
@@ -8,13 +8,13 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
|
|
|
8
8
|
@include ag.grid-styles(
|
|
9
9
|
(
|
|
10
10
|
themes: (
|
|
11
|
-
step-compact: (
|
|
11
|
+
'step-compact.theme-specific': (
|
|
12
12
|
extend-theme: alpine,
|
|
13
13
|
--ag-row-height: 36px,
|
|
14
14
|
--ag-header-height: 36px,
|
|
15
15
|
--ag-font-size: calc($grid-base-font-size - 2px),
|
|
16
16
|
),
|
|
17
|
-
step-default: (
|
|
17
|
+
'step-default.theme-specific': (
|
|
18
18
|
extend-theme: alpine,
|
|
19
19
|
--ag-row-height: 40px,
|
|
20
20
|
--ag-header-height: 40px,
|
|
@@ -47,98 +47,144 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
|
|
|
47
47
|
)
|
|
48
48
|
);
|
|
49
49
|
|
|
50
|
+
.ag-theme-step-default.theme-specific,
|
|
51
|
+
.ag-theme-step-compact.theme-specific {
|
|
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[aria-colindex="1"] {
|
|
95
|
+
padding-left: lui.$unit-rg;
|
|
96
|
+
}
|
|
87
97
|
|
|
88
|
-
.ag-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
98
|
+
.ag-cell {
|
|
99
|
+
padding-left: 11px;
|
|
100
|
+
padding-right: 11px;
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
}
|
|
92
104
|
|
|
93
|
-
.ag-cell
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
105
|
+
.ag-cell-wrap-text {
|
|
106
|
+
word-break: break-word;
|
|
107
|
+
}
|
|
97
108
|
|
|
98
|
-
.ag-cell
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
109
|
+
.ag-cell.ag-cell-popup-editing,
|
|
110
|
+
.ag-cell.ag-selected-for-edit,
|
|
111
|
+
.ag-cell-inline-editing {
|
|
112
|
+
padding-left: 9px;
|
|
113
|
+
padding-right: 9px;
|
|
114
|
+
background: rgb(72 160 244 / 20%);
|
|
102
115
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
align-items: center;
|
|
108
|
-
}
|
|
116
|
+
// These are important, it needs to override ag-grid to work
|
|
117
|
+
border: 3px solid #48a0f4 !important;
|
|
118
|
+
border-right: 3px solid #48a0f4 !important;
|
|
119
|
+
}
|
|
109
120
|
|
|
110
|
-
.ag-cell-
|
|
111
|
-
|
|
112
|
-
|
|
121
|
+
.ag-row .ag-cell-data-changed {
|
|
122
|
+
// ag-grid natively has !important on this style so we have to use it here :(
|
|
123
|
+
background-color: lightgoldenrodyellow;
|
|
124
|
+
}
|
|
113
125
|
|
|
114
|
-
.ag-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
background: rgb(72 160 244 / 20%);
|
|
126
|
+
.ag-center-cols-clipper {
|
|
127
|
+
// when using domLayout={"autoHeight"}, ag grid has a default min-height
|
|
128
|
+
// set to 150px so the !important is necessary here
|
|
129
|
+
min-height: 40px !important;
|
|
130
|
+
}
|
|
120
131
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
132
|
+
.ag-body-horizontal-scroll-viewport {
|
|
133
|
+
// It's set to scroll by default, but this causes issues with selecting the last row
|
|
134
|
+
overflow-x: auto;
|
|
135
|
+
}
|
|
125
136
|
|
|
126
|
-
.ag-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
137
|
+
.ag-cell {
|
|
138
|
+
font-weight: 400;
|
|
139
|
+
}
|
|
130
140
|
|
|
131
|
-
.ag-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
141
|
+
.ag-cell-value {
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
}
|
|
136
145
|
|
|
137
|
-
.ag-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
146
|
+
.ag-cell .GridCell-editableIcon {
|
|
147
|
+
fill: lui.$silver;
|
|
148
|
+
visibility: hidden;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.ag-cell:hover .GridCell-editableIcon,
|
|
152
|
+
.ag-cell.ag-cell-focus .GridCell-editableIcon {
|
|
153
|
+
visibility: visible;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.ag-drag-handle.ag-row-drag {
|
|
157
|
+
opacity: 0;
|
|
141
158
|
|
|
142
|
-
.
|
|
143
|
-
|
|
144
|
-
|
|
159
|
+
.ag-icon-grip {
|
|
160
|
+
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");
|
|
161
|
+
background-repeat: no-repeat no-repeat;
|
|
162
|
+
background-position: center center;
|
|
163
|
+
background-size: cover;
|
|
164
|
+
color: transparent;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.ag-row:hover {
|
|
169
|
+
.ag-drag-handle.ag-row-drag {
|
|
170
|
+
opacity: 1;
|
|
171
|
+
transition: opacity 0.2s ease-in-out;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.GridCell-readonly {
|
|
176
|
+
color: lui.$fuscous;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.ag-cell:not(.ag-cell-focus) .Grid-displayWhenCellFocused {
|
|
180
|
+
visibility: hidden;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.ag-cell:hover .Grid-displayWhenCellFocused {
|
|
184
|
+
visibility: inherit;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.ag-cell-wrapper {
|
|
188
|
+
width: 100%;
|
|
189
|
+
}
|
|
190
|
+
}
|
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
|
@@ -2791,7 +2791,7 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
|
|
|
2791
2791
|
}, [params]);
|
|
2792
2792
|
// This is setting a ref in the GridContext so won't be triggering an update loop
|
|
2793
2793
|
setOnCellEditingComplete(params.onCellEditingComplete);
|
|
2794
|
-
return (jsxRuntime.jsxs("div", { "data-testid": dataTestId, className: clsx("Grid-container", theme, staleGrid && "Grid-sortIsStale", gridReady && params.rowData && autoSized && "Grid-ready"), children: [gridContextMenu.component, jsxRuntime.jsx("div", { style: { flex: 1 }, ref: gridDivRef, children: jsxRuntime.jsx(agGridReact.AgGridReact, { rowHeight: rowHeight, animateRows: params.animateRows, rowClassRules: params.rowClassRules, getRowId: (params) => `${params.data.id}`, suppressRowClickSelection: true, rowSelection: rowSelection, suppressBrowserResizeObserver: true, onGridSizeChanged: onGridSizeChanged, suppressColumnVirtualisation: suppressColumnVirtualization, suppressClickEdit: true, onColumnVisible: () => {
|
|
2794
|
+
return (jsxRuntime.jsxs("div", { "data-testid": dataTestId, className: clsx("Grid-container", theme, "theme-specific", staleGrid && "Grid-sortIsStale", gridReady && params.rowData && autoSized && "Grid-ready"), children: [gridContextMenu.component, jsxRuntime.jsx("div", { style: { flex: 1 }, ref: gridDivRef, children: jsxRuntime.jsx(agGridReact.AgGridReact, { rowHeight: rowHeight, animateRows: params.animateRows, rowClassRules: params.rowClassRules, getRowId: (params) => `${params.data.id}`, suppressRowClickSelection: true, rowSelection: rowSelection, suppressBrowserResizeObserver: true, onGridSizeChanged: onGridSizeChanged, suppressColumnVirtualisation: suppressColumnVirtualization, suppressClickEdit: true, onColumnVisible: () => {
|
|
2795
2795
|
setInitialContentSize();
|
|
2796
2796
|
}, 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: params.rowData, noRowsOverlayComponent: (event) => {
|
|
2797
2797
|
let rowCount = 0;
|