@linzjs/step-ag-grid 28.2.0 → 28.2.1
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/step-ag-grid.cjs +0 -1
- package/dist/step-ag-grid.cjs.map +1 -1
- package/dist/step-ag-grid.esm.js +0 -1
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/react-menu3/components/ControlledMenu.tsx +0 -1
- package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +11 -4
- package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +2 -8
package/package.json
CHANGED
|
@@ -8,7 +8,13 @@ import { GridPopoverContext } from 'contexts/GridPopoverContext';
|
|
|
8
8
|
import { useRef } from 'react';
|
|
9
9
|
import { expect, fn, userEvent, within } from 'storybook/test';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
GridBaseRow,
|
|
13
|
+
GridContext,
|
|
14
|
+
GridFormDropDown,
|
|
15
|
+
GridFormDropDownProps,
|
|
16
|
+
GridFormSubComponentTextInput,
|
|
17
|
+
} from '../../..';
|
|
12
18
|
|
|
13
19
|
export default {
|
|
14
20
|
title: 'GridForm / Interactions',
|
|
@@ -22,8 +28,10 @@ const updateValue = fn(async (saveFn: (selectedRows: any[]) => Promise<boolean>,
|
|
|
22
28
|
|
|
23
29
|
const onSelectedItem = fn(async () => {});
|
|
24
30
|
|
|
25
|
-
const Template: StoryFn<typeof GridFormDropDown
|
|
26
|
-
|
|
31
|
+
const Template: StoryFn<typeof GridFormDropDown<GridBaseRow, number>> = (
|
|
32
|
+
props: GridFormDropDownProps<GridBaseRow, number>,
|
|
33
|
+
) => {
|
|
34
|
+
const config: GridFormDropDownProps<GridBaseRow, number> = {
|
|
27
35
|
filtered: 'local',
|
|
28
36
|
onSelectedItem,
|
|
29
37
|
options: [
|
|
@@ -72,7 +80,6 @@ const Template: StoryFn<typeof GridFormDropDown> = (props: GridFormDropDownProps
|
|
|
72
80
|
);
|
|
73
81
|
};
|
|
74
82
|
|
|
75
|
-
//console.log({ extendedExpect });
|
|
76
83
|
export const GridFormDropDownInteractions_: typeof Template = Template.bind({});
|
|
77
84
|
GridFormDropDownInteractions_.play = async ({ canvasElement }) => {
|
|
78
85
|
const canvas = within(canvasElement);
|
|
@@ -10,14 +10,12 @@ import * as test from 'storybook/test';
|
|
|
10
10
|
import { expect, userEvent, within } from 'storybook/test';
|
|
11
11
|
|
|
12
12
|
import {
|
|
13
|
-
GridBaseRow,
|
|
14
13
|
GridContext,
|
|
15
14
|
GridFormPopoverMenu,
|
|
16
15
|
GridFormPopoverMenuProps,
|
|
17
16
|
GridFormSubComponentTextArea,
|
|
18
17
|
GridFormSubComponentTextInput,
|
|
19
18
|
PopoutMenuSeparator,
|
|
20
|
-
SelectedMenuOptionResult,
|
|
21
19
|
} from '../../..';
|
|
22
20
|
|
|
23
21
|
export default {
|
|
@@ -30,13 +28,9 @@ const updateValue = test.fn((saveFn: (selectedRows: any[]) => Promise<boolean>,
|
|
|
30
28
|
saveFn([]),
|
|
31
29
|
);
|
|
32
30
|
|
|
33
|
-
const enabledAction = test
|
|
34
|
-
.fn<[{ selectedRows: GridBaseRow[]; menuOption: SelectedMenuOptionResult<GridBaseRow> }], Promise<void>>()
|
|
35
|
-
.mockResolvedValue(undefined);
|
|
31
|
+
const enabledAction = test.fn().mockResolvedValue(undefined);
|
|
36
32
|
|
|
37
|
-
const disabledAction = test
|
|
38
|
-
.fn<[{ selectedRows: GridBaseRow[]; menuOption: SelectedMenuOptionResult<GridBaseRow> }], Promise<void>>()
|
|
39
|
-
.mockResolvedValue(undefined);
|
|
33
|
+
const disabledAction = test.fn().mockResolvedValue(undefined);
|
|
40
34
|
|
|
41
35
|
const Template: StoryFn<typeof GridFormPopoverMenu> = (props: GridFormPopoverMenuProps<any>) => {
|
|
42
36
|
const anchorRef = useRef<HTMLHeadingElement>(null);
|