@linzjs/step-ag-grid 13.5.1 → 14.0.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/README.md +12 -7
- package/dist/index.css +33 -3
- package/dist/src/components/Grid.d.ts +21 -1
- package/dist/src/components/GridCellMultiEditor.d.ts +4 -1
- package/dist/src/components/GridLoadableCell.d.ts +1 -5
- package/dist/src/contexts/GridContext.d.ts +5 -0
- package/dist/src/react-menu3/components/ControlledMenu.d.ts +1 -1
- package/dist/src/react-menu3/components/FocusableItem.d.ts +1 -1
- package/dist/src/react-menu3/components/Menu.d.ts +1 -1
- package/dist/src/react-menu3/components/MenuButton.d.ts +1 -1
- package/dist/src/react-menu3/components/MenuDivider.d.ts +1 -1
- package/dist/src/react-menu3/components/MenuGroup.d.ts +1 -1
- package/dist/src/react-menu3/components/MenuHeader.d.ts +1 -1
- package/dist/src/react-menu3/components/MenuItem.d.ts +1 -1
- package/dist/src/react-menu3/components/MenuRadioGroup.d.ts +1 -1
- package/dist/src/react-menu3/components/SubMenu.d.ts +1 -1
- package/dist/src/react-menu3/utils/utils.d.ts +1 -1
- package/dist/step-ag-grid.esm.js +3383 -625
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +34 -34
- package/src/components/ComponentLoadingWrapper.tsx +1 -13
- package/src/components/Grid.tsx +87 -13
- package/src/components/GridCell.tsx +20 -19
- package/src/components/GridCellMultiEditor.tsx +9 -27
- package/src/components/GridLoadableCell.tsx +5 -10
- package/src/components/GridPopoverHook.tsx +1 -11
- package/src/components/gridForm/GridFormPopoverMenu.tsx +2 -1
- package/src/components/gridPopoverEdit/GridPopoverEditBearing.ts +0 -2
- package/src/components/gridPopoverEdit/GridPopoverMenu.tsx +1 -1
- package/src/components/gridRender/GridRenderPopoutMenuCell.tsx +2 -1
- package/src/contexts/GridContext.tsx +7 -1
- package/src/contexts/GridContextProvider.tsx +18 -6
- package/src/stories/grid/GridFilterButtons.stories.tsx +8 -2
- package/src/stories/grid/GridNonEditableRow.stories.tsx +0 -8
- package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +0 -3
- package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +1 -7
- package/src/stories/grid/GridPopoverEditBearing.stories.tsx +0 -2
- package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +0 -15
- package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +0 -6
- package/src/stories/grid/GridReadOnly.stories.tsx +3 -24
- package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +0 -8
- package/src/styles/ComponentLoadingWrapper.scss +9 -0
- package/src/styles/Grid.scss +5 -0
- package/src/styles/GridCell.scss +12 -0
- package/src/styles/GridLoadableCell.scss +1 -0
- package/src/styles/GridPopoverMenu.scss +3 -2
- package/src/styles/index.scss +2 -0
|
@@ -36,14 +36,11 @@ const GridPopoutEditGenericTemplate: ComponentStory<typeof Grid> = (props: GridP
|
|
|
36
36
|
GridCell({
|
|
37
37
|
field: "id",
|
|
38
38
|
headerName: "Id",
|
|
39
|
-
initialWidth: 65,
|
|
40
|
-
maxWidth: 85,
|
|
41
39
|
}),
|
|
42
40
|
GridCell(
|
|
43
41
|
{
|
|
44
42
|
field: "name",
|
|
45
43
|
headerName: "Popout Generic Edit",
|
|
46
|
-
maxWidth: 140,
|
|
47
44
|
},
|
|
48
45
|
{
|
|
49
46
|
multiEdit: true,
|
|
@@ -60,14 +60,11 @@ const GridPopoutEditGenericTemplate: ComponentStory<typeof Grid> = (props: GridP
|
|
|
60
60
|
GridCell({
|
|
61
61
|
field: "id",
|
|
62
62
|
headerName: "Id",
|
|
63
|
-
initialWidth: 65,
|
|
64
|
-
maxWidth: 85,
|
|
65
63
|
}),
|
|
66
64
|
GridPopoverTextInput(
|
|
67
65
|
{
|
|
68
66
|
field: "name",
|
|
69
67
|
headerName: "Text input",
|
|
70
|
-
maxWidth: 140,
|
|
71
68
|
},
|
|
72
69
|
{
|
|
73
70
|
multiEdit: true,
|
|
@@ -91,7 +88,6 @@ const GridPopoutEditGenericTemplate: ComponentStory<typeof Grid> = (props: GridP
|
|
|
91
88
|
{
|
|
92
89
|
field: "distance",
|
|
93
90
|
headerName: "Number input",
|
|
94
|
-
maxWidth: 140,
|
|
95
91
|
valueFormatter: (params) => {
|
|
96
92
|
const v = params.data.distance;
|
|
97
93
|
return v != null ? `${v}${params.colDef.cellEditorParams.units}` : "–";
|
|
@@ -121,7 +117,6 @@ const GridPopoutEditGenericTemplate: ComponentStory<typeof Grid> = (props: GridP
|
|
|
121
117
|
{
|
|
122
118
|
field: "plan",
|
|
123
119
|
headerName: "Text area",
|
|
124
|
-
maxWidth: 140,
|
|
125
120
|
},
|
|
126
121
|
{
|
|
127
122
|
multiEdit: true,
|
|
@@ -146,7 +141,6 @@ const GridPopoutEditGenericTemplate: ComponentStory<typeof Grid> = (props: GridP
|
|
|
146
141
|
colId: "plan2",
|
|
147
142
|
field: "plan",
|
|
148
143
|
headerName: "Multi-editor",
|
|
149
|
-
maxWidth: 140,
|
|
150
144
|
},
|
|
151
145
|
(_params) =>
|
|
152
146
|
_params.rowIndex == 0
|
|
@@ -169,7 +163,7 @@ const GridPopoutEditGenericTemplate: ComponentStory<typeof Grid> = (props: GridP
|
|
|
169
163
|
),
|
|
170
164
|
GridPopoverMenu(
|
|
171
165
|
{
|
|
172
|
-
headerName: "
|
|
166
|
+
headerName: "",
|
|
173
167
|
},
|
|
174
168
|
{
|
|
175
169
|
multiEdit: true,
|
|
@@ -96,13 +96,10 @@ const GridEditDropDownTemplate: ComponentStory<typeof Grid> = (props: GridProps)
|
|
|
96
96
|
GridCell({
|
|
97
97
|
field: "id",
|
|
98
98
|
headerName: "Id",
|
|
99
|
-
initialWidth: 65,
|
|
100
|
-
maxWidth: 85,
|
|
101
99
|
}),
|
|
102
100
|
GridPopoverEditDropDown(
|
|
103
101
|
{
|
|
104
102
|
field: "position2",
|
|
105
|
-
maxWidth: 100,
|
|
106
103
|
headerName: "Multi-edit",
|
|
107
104
|
},
|
|
108
105
|
{
|
|
@@ -125,8 +122,6 @@ const GridEditDropDownTemplate: ComponentStory<typeof Grid> = (props: GridProps)
|
|
|
125
122
|
GridPopoverEditDropDown(
|
|
126
123
|
{
|
|
127
124
|
field: "position3",
|
|
128
|
-
initialWidth: 65,
|
|
129
|
-
maxWidth: 150,
|
|
130
125
|
headerName: "Custom callback",
|
|
131
126
|
},
|
|
132
127
|
{
|
|
@@ -145,8 +140,6 @@ const GridEditDropDownTemplate: ComponentStory<typeof Grid> = (props: GridProps)
|
|
|
145
140
|
GridPopoverEditDropDown(
|
|
146
141
|
{
|
|
147
142
|
field: "position",
|
|
148
|
-
initialWidth: 65,
|
|
149
|
-
maxWidth: 150,
|
|
150
143
|
headerName: "Options Fn",
|
|
151
144
|
},
|
|
152
145
|
{
|
|
@@ -161,8 +154,6 @@ const GridEditDropDownTemplate: ComponentStory<typeof Grid> = (props: GridProps)
|
|
|
161
154
|
GridPopoverEditDropDown(
|
|
162
155
|
{
|
|
163
156
|
field: "position3",
|
|
164
|
-
initialWidth: 65,
|
|
165
|
-
maxWidth: 150,
|
|
166
157
|
headerName: "Filtered",
|
|
167
158
|
},
|
|
168
159
|
{
|
|
@@ -177,8 +168,6 @@ const GridEditDropDownTemplate: ComponentStory<typeof Grid> = (props: GridProps)
|
|
|
177
168
|
GridPopoverEditDropDown(
|
|
178
169
|
{
|
|
179
170
|
field: "position4",
|
|
180
|
-
initialWidth: 65,
|
|
181
|
-
maxWidth: 150,
|
|
182
171
|
headerName: "Filtered (object)",
|
|
183
172
|
valueGetter: (params) => params.data.position4?.desc,
|
|
184
173
|
},
|
|
@@ -196,8 +185,6 @@ const GridEditDropDownTemplate: ComponentStory<typeof Grid> = (props: GridProps)
|
|
|
196
185
|
GridPopoverEditDropDown(
|
|
197
186
|
{
|
|
198
187
|
field: "code",
|
|
199
|
-
initialWidth: 65,
|
|
200
|
-
maxWidth: 150,
|
|
201
188
|
headerName: "Filter Selectable",
|
|
202
189
|
},
|
|
203
190
|
{
|
|
@@ -225,8 +212,6 @@ const GridEditDropDownTemplate: ComponentStory<typeof Grid> = (props: GridProps)
|
|
|
225
212
|
GridPopoverEditDropDown(
|
|
226
213
|
{
|
|
227
214
|
field: "sub",
|
|
228
|
-
initialWidth: 65,
|
|
229
|
-
maxWidth: 150,
|
|
230
215
|
headerName: "Subcomponent",
|
|
231
216
|
valueGetter: (params) => params.data.sub,
|
|
232
217
|
},
|
|
@@ -65,14 +65,10 @@ const GridEditMultiSelectTemplate: ComponentStory<typeof Grid> = (props: GridPro
|
|
|
65
65
|
GridCell({
|
|
66
66
|
field: "id",
|
|
67
67
|
headerName: "Id",
|
|
68
|
-
initialWidth: 65,
|
|
69
|
-
maxWidth: 85,
|
|
70
68
|
}),
|
|
71
69
|
GridPopoutEditMultiSelect(
|
|
72
70
|
{
|
|
73
71
|
field: "position",
|
|
74
|
-
initialWidth: 65,
|
|
75
|
-
maxWidth: 250,
|
|
76
72
|
headerName: "Position",
|
|
77
73
|
valueFormatter: ({ value }) => {
|
|
78
74
|
if (value == null) return "";
|
|
@@ -117,8 +113,6 @@ const GridEditMultiSelectTemplate: ComponentStory<typeof Grid> = (props: GridPro
|
|
|
117
113
|
GridPopoutEditMultiSelect(
|
|
118
114
|
{
|
|
119
115
|
field: "position",
|
|
120
|
-
initialWidth: 65,
|
|
121
|
-
maxWidth: 250,
|
|
122
116
|
headerName: "Parcel picker",
|
|
123
117
|
valueFormatter: ({ value }) => {
|
|
124
118
|
if (value == null) return "";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
wait,
|
|
25
25
|
} from "../..";
|
|
26
26
|
import { GridFilterColumnsToggle } from "../../components";
|
|
27
|
-
import { GridFilterDownloadCsvButton } from "../../components
|
|
27
|
+
import { GridFilterDownloadCsvButton } from "../../components";
|
|
28
28
|
import "../../styles/GridTheme.scss";
|
|
29
29
|
import "../../styles/index.scss";
|
|
30
30
|
|
|
@@ -40,7 +40,7 @@ export default {
|
|
|
40
40
|
},
|
|
41
41
|
decorators: [
|
|
42
42
|
(Story) => (
|
|
43
|
-
<div style={{
|
|
43
|
+
<div style={{ maxWidth: 1024, height: 400, display: "flex", flexDirection: "column" }}>
|
|
44
44
|
<GridUpdatingContextProvider>
|
|
45
45
|
<GridContextProvider>
|
|
46
46
|
<Story />
|
|
@@ -66,15 +66,11 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
|
|
|
66
66
|
GridCell({
|
|
67
67
|
field: "id",
|
|
68
68
|
headerName: "Id",
|
|
69
|
-
initialWidth: 65,
|
|
70
|
-
maxWidth: 85,
|
|
71
69
|
lockVisible: true,
|
|
72
70
|
}),
|
|
73
71
|
GridCell({
|
|
74
72
|
field: "position",
|
|
75
73
|
headerName: "Position",
|
|
76
|
-
initialWidth: 65,
|
|
77
|
-
maxWidth: 150,
|
|
78
74
|
cellRendererParams: {
|
|
79
75
|
warning: (props) => props.value === "Tester" && "Testers are testing",
|
|
80
76
|
info: (props) => props.value === "Developer" && "Developers are awesome",
|
|
@@ -83,19 +79,15 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
|
|
|
83
79
|
GridCell({
|
|
84
80
|
field: "age",
|
|
85
81
|
headerName: "Age",
|
|
86
|
-
initialWidth: 65,
|
|
87
|
-
maxWidth: 85,
|
|
88
82
|
}),
|
|
89
83
|
GridCell({
|
|
90
84
|
field: "desc",
|
|
91
85
|
headerName: "Description",
|
|
92
|
-
|
|
93
|
-
maxWidth: 200,
|
|
86
|
+
flex: 1,
|
|
94
87
|
}),
|
|
95
88
|
GridPopoverMessage(
|
|
96
89
|
{
|
|
97
90
|
headerName: "Popout message",
|
|
98
|
-
maxWidth: 150,
|
|
99
91
|
cellRenderer: () => <>Single Click me!</>,
|
|
100
92
|
exportable: false,
|
|
101
93
|
},
|
|
@@ -111,7 +103,6 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
|
|
|
111
103
|
),
|
|
112
104
|
GridCell({
|
|
113
105
|
headerName: "Custom edit",
|
|
114
|
-
maxWidth: 100,
|
|
115
106
|
editable: true,
|
|
116
107
|
valueFormatter: () => "Press E",
|
|
117
108
|
cellRendererParams: {
|
|
@@ -191,18 +182,6 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
|
|
|
191
182
|
},
|
|
192
183
|
},
|
|
193
184
|
),
|
|
194
|
-
GridPopoverMenu(
|
|
195
|
-
{
|
|
196
|
-
editable: () => false,
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
editorParams: {
|
|
200
|
-
options: async () => {
|
|
201
|
-
return [];
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
},
|
|
205
|
-
),
|
|
206
185
|
],
|
|
207
186
|
[],
|
|
208
187
|
);
|
|
@@ -68,14 +68,10 @@ const GridKeyboardInteractionsTemplate: ComponentStory<typeof Grid> = (props: Gr
|
|
|
68
68
|
GridCell({
|
|
69
69
|
field: "id",
|
|
70
70
|
headerName: "Id",
|
|
71
|
-
initialWidth: 65,
|
|
72
|
-
maxWidth: 85,
|
|
73
71
|
}),
|
|
74
72
|
GridCell({
|
|
75
73
|
field: "position",
|
|
76
74
|
headerName: "Position",
|
|
77
|
-
initialWidth: 65,
|
|
78
|
-
maxWidth: 150,
|
|
79
75
|
cellRendererParams: {
|
|
80
76
|
warning: (props) => props.value === "Tester" && "Testers are testing",
|
|
81
77
|
info: (props) => props.value === "Developer" && "Developers are awesome",
|
|
@@ -84,14 +80,10 @@ const GridKeyboardInteractionsTemplate: ComponentStory<typeof Grid> = (props: Gr
|
|
|
84
80
|
GridCell({
|
|
85
81
|
field: "age",
|
|
86
82
|
headerName: "Age",
|
|
87
|
-
initialWidth: 65,
|
|
88
|
-
maxWidth: 85,
|
|
89
83
|
}),
|
|
90
84
|
GridCell({
|
|
91
85
|
field: "desc",
|
|
92
86
|
headerName: "Description",
|
|
93
|
-
initialWidth: 150,
|
|
94
|
-
maxWidth: 200,
|
|
95
87
|
}),
|
|
96
88
|
GridPopoverMessage(
|
|
97
89
|
{
|
package/src/styles/Grid.scss
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
@use "../../node_modules/@linzjs/lui/dist/scss/Foundation/Variables/ColorVars" as colors;
|
|
2
2
|
|
|
3
|
-
.GridPopoutMenu-burger {
|
|
3
|
+
.ag-cell .GridPopoutMenu-burger {
|
|
4
4
|
cursor: pointer;
|
|
5
|
+
display: block;
|
|
5
6
|
|
|
6
7
|
svg {
|
|
7
8
|
fill: colors.$sea;
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
.GridPopoutMenu-burgerDisabled svg {
|
|
12
|
+
.ag-cell .GridPopoutMenu-burgerDisabled svg {
|
|
12
13
|
fill: colors.$disabled-color;
|
|
13
14
|
}
|
package/src/styles/index.scss
CHANGED