@linzjs/step-ag-grid 2.4.11 → 3.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/dist/index.js +301 -249
- package/dist/index.js.map +1 -1
- package/dist/src/components/GridCell.d.ts +4 -7
- package/dist/src/components/gridForm/GridFormDropDown.d.ts +1 -1
- package/dist/src/components/gridForm/GridFormEditBearing.d.ts +1 -1
- package/dist/src/components/gridForm/GridFormMessage.d.ts +3 -3
- package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +2 -2
- package/dist/src/components/gridForm/GridFormPopoverMenu.d.ts +7 -3
- package/dist/src/components/gridForm/GridFormSubComponentTextInput.d.ts +1 -1
- package/dist/src/components/gridForm/GridFormTextArea.d.ts +1 -1
- package/dist/src/components/gridForm/GridFormTextInput.d.ts +1 -1
- package/dist/src/contexts/GridPopoverContext.d.ts +5 -3
- package/dist/src/contexts/GridPopoverContextProvider.d.ts +3 -1
- package/dist/src/lui/TextInputFormatted.d.ts +3 -2
- package/dist/step-ag-grid.esm.js +302 -250
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/GridCell.tsx +9 -33
- package/src/components/GridPopoverHook.tsx +3 -7
- package/src/components/GridSubComponentTextArea.tsx +0 -6
- package/src/components/gridForm/GridFormDropDown.tsx +23 -30
- package/src/components/gridForm/GridFormEditBearing.tsx +10 -8
- package/src/components/gridForm/GridFormMessage.tsx +9 -7
- package/src/components/gridForm/GridFormMultiSelect.tsx +56 -48
- package/src/components/gridForm/GridFormPopoverMenu.tsx +94 -29
- package/src/components/gridForm/GridFormSubComponentTextInput.tsx +2 -1
- package/src/components/gridForm/GridFormTextArea.tsx +8 -8
- package/src/components/gridForm/GridFormTextInput.tsx +12 -16
- package/src/contexts/GridPopoverContext.tsx +10 -5
- package/src/contexts/GridPopoverContextProvider.tsx +24 -27
- package/src/lui/TextAreaInput.tsx +13 -1
- package/src/lui/TextInputFormatted.tsx +14 -3
- package/src/react-menu3/components/MenuList.tsx +42 -10
- package/src/react-menu3/contexts/SettingsContext.ts +1 -1
- package/src/stories/grid/FormTest.tsx +18 -16
- package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +0 -1
- package/src/stories/grid/GridPopoutEditMultiSelect.stories.tsx +3 -3
- package/src/stories/grid/GridReadOnly.stories.tsx +15 -5
|
@@ -62,7 +62,7 @@ const GridEditMultiSelectTemplate: ComponentStory<typeof Grid> = (props: GridPro
|
|
|
62
62
|
{
|
|
63
63
|
field: "position",
|
|
64
64
|
initialWidth: 65,
|
|
65
|
-
maxWidth:
|
|
65
|
+
maxWidth: 300,
|
|
66
66
|
headerName: "Position",
|
|
67
67
|
},
|
|
68
68
|
{
|
|
@@ -81,7 +81,7 @@ const GridEditMultiSelectTemplate: ComponentStory<typeof Grid> = (props: GridPro
|
|
|
81
81
|
{
|
|
82
82
|
value: "other",
|
|
83
83
|
label: "Other",
|
|
84
|
-
subComponent: () => <GridSubComponentTextArea maxLength={
|
|
84
|
+
subComponent: () => <GridSubComponentTextArea maxLength={5} defaultValue={""} />,
|
|
85
85
|
},
|
|
86
86
|
],
|
|
87
87
|
initialSelectedValues: () => ({
|
|
@@ -105,7 +105,7 @@ const GridEditMultiSelectTemplate: ComponentStory<typeof Grid> = (props: GridPro
|
|
|
105
105
|
field: "position2",
|
|
106
106
|
initialWidth: 65,
|
|
107
107
|
maxWidth: 150,
|
|
108
|
-
headerName: "
|
|
108
|
+
headerName: "Initial editor values ",
|
|
109
109
|
valueGetter: (props) => positionTwoMap[props.data.position2],
|
|
110
110
|
},
|
|
111
111
|
{
|
|
@@ -12,6 +12,8 @@ import { wait } from "../../utils/util";
|
|
|
12
12
|
import { GridPopoverMenu } from "../../components/gridPopoverEdit/GridPopoverMenu";
|
|
13
13
|
import { ColDefT, GridCell } from "../../components/GridCell";
|
|
14
14
|
import { GridPopoverMessage } from "../../components/gridPopoverEdit/GridPopoverMessage";
|
|
15
|
+
import { GridSubComponentTextArea } from "../../components/GridSubComponentTextArea";
|
|
16
|
+
import { MenuOption } from "../../components/gridForm/GridFormPopoverMenu";
|
|
15
17
|
|
|
16
18
|
export default {
|
|
17
19
|
title: "Components / Grids",
|
|
@@ -84,9 +86,9 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
|
|
|
84
86
|
{
|
|
85
87
|
multiEdit: true,
|
|
86
88
|
editorParams: {
|
|
87
|
-
message: async (
|
|
89
|
+
message: async (selectedRows): Promise<string> => {
|
|
88
90
|
await wait(1000);
|
|
89
|
-
return `There are ${
|
|
91
|
+
return `There are ${selectedRows.length} row(s) selected`;
|
|
90
92
|
},
|
|
91
93
|
},
|
|
92
94
|
},
|
|
@@ -105,7 +107,6 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
|
|
|
105
107
|
action: async (selectedRows) => {
|
|
106
108
|
alert(`Single-edit: ${selectedRows.length} rows`);
|
|
107
109
|
await wait(1500);
|
|
108
|
-
return true;
|
|
109
110
|
},
|
|
110
111
|
supportsMultiEdit: false,
|
|
111
112
|
},
|
|
@@ -114,7 +115,6 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
|
|
|
114
115
|
action: async (selectedRows) => {
|
|
115
116
|
alert(`Multi-edit: ${selectedRows.length} rows`);
|
|
116
117
|
await wait(1500);
|
|
117
|
-
return true;
|
|
118
118
|
},
|
|
119
119
|
supportsMultiEdit: true,
|
|
120
120
|
},
|
|
@@ -128,7 +128,17 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
|
|
|
128
128
|
hidden: selectedItems.some((x) => x.position != "Developer"),
|
|
129
129
|
supportsMultiEdit: true,
|
|
130
130
|
},
|
|
131
|
-
|
|
131
|
+
{
|
|
132
|
+
label: "Other",
|
|
133
|
+
supportsMultiEdit: true,
|
|
134
|
+
action: (_, menuOptionResult) => {
|
|
135
|
+
alert(`Sub selected value was ${JSON.stringify(menuOptionResult.subValue)}`);
|
|
136
|
+
},
|
|
137
|
+
subComponent: () => (
|
|
138
|
+
<GridSubComponentTextArea placeholder={"Other"} maxLength={2} required defaultValue={""} />
|
|
139
|
+
),
|
|
140
|
+
},
|
|
141
|
+
] as MenuOption<ITestRow>[];
|
|
132
142
|
},
|
|
133
143
|
},
|
|
134
144
|
},
|