@linzjs/step-ag-grid 23.0.0 → 24.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/src/components/ComponentLoadingWrapper.d.ts +1 -1
- package/dist/src/components/Grid.d.ts +17 -17
- package/dist/src/components/GridCell.d.ts +9 -9
- package/dist/src/components/GridCellFiller.d.ts +2 -2
- package/dist/src/components/GridCellMultiEditor.d.ts +6 -6
- package/dist/src/components/GridCellMultiSelectClassRules.d.ts +1 -1
- package/dist/src/components/GridIcon.d.ts +2 -2
- package/dist/src/components/GridNoRowsOverlay.d.ts +1 -1
- package/dist/src/components/GridPopoverHook.d.ts +2 -2
- package/dist/src/components/GridWrapper.d.ts +1 -1
- package/dist/src/components/PostSortRowsHook.d.ts +1 -1
- package/dist/src/components/clickInputWhenContainingCellClicked.d.ts +1 -1
- package/dist/src/components/gridFilter/GridFilterButtons.d.ts +5 -5
- package/dist/src/components/gridFilter/GridFilterColumnsToggle.d.ts +1 -1
- package/dist/src/components/gridFilter/GridFilterDownloadCsvButton.d.ts +1 -1
- package/dist/src/components/gridFilter/GridFilterHeaderIconButton.d.ts +2 -2
- package/dist/src/components/gridFilter/GridFilters.d.ts +1 -1
- package/dist/src/components/gridFilter/index.d.ts +7 -7
- package/dist/src/components/gridFilter/useGridFilter.d.ts +2 -2
- package/dist/src/components/gridForm/GridFormDropDown.d.ts +8 -8
- package/dist/src/components/gridForm/GridFormEditBearing.d.ts +2 -2
- package/dist/src/components/gridForm/GridFormMessage.d.ts +3 -3
- package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +4 -4
- package/dist/src/components/gridForm/GridFormMultiSelectGrid.d.ts +4 -4
- package/dist/src/components/gridForm/GridFormPopoverMenu.d.ts +5 -5
- package/dist/src/components/gridForm/GridFormSubComponentTextArea.d.ts +4 -4
- package/dist/src/components/gridForm/GridFormSubComponentTextInput.d.ts +4 -4
- package/dist/src/components/gridForm/GridFormTextArea.d.ts +4 -4
- package/dist/src/components/gridForm/GridFormTextInput.d.ts +3 -3
- package/dist/src/components/gridForm/index.d.ts +10 -10
- package/dist/src/components/gridHeader/GridHeaderSelect.d.ts +1 -1
- package/dist/src/components/gridHeader/index.d.ts +1 -1
- package/dist/src/components/gridHook/index.d.ts +1 -1
- package/dist/src/components/gridHook/useGridContextMenu.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridButton.d.ts +5 -5
- package/dist/src/components/gridPopoverEdit/GridEditBoolean.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelectGrid.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoverEditBearing.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoverEditDropDown.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoverMenu.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoverMessage.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoverTextArea.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/GridPopoverTextInput.d.ts +4 -4
- package/dist/src/components/gridPopoverEdit/index.d.ts +11 -11
- package/dist/src/components/gridRender/GridRenderGenericCell.d.ts +5 -5
- package/dist/src/components/gridRender/GridRenderPopoutMenuCell.d.ts +1 -1
- package/dist/src/components/gridRender/index.d.ts +2 -2
- package/dist/src/components/gridUtil.d.ts +1 -1
- package/dist/src/components/index.d.ts +19 -19
- package/dist/src/contexts/GridContext.d.ts +4 -4
- package/dist/src/contexts/GridContextProvider.d.ts +3 -3
- package/dist/src/contexts/GridPopoverContext.d.ts +3 -3
- package/dist/src/contexts/GridPopoverContextProvider.d.ts +4 -4
- package/dist/src/contexts/GridUpdatingContextProvider.d.ts +1 -1
- package/dist/src/index.d.ts +17 -17
- package/dist/src/lui/ActionButton.d.ts +9 -9
- package/dist/src/lui/FormError.d.ts +2 -2
- package/dist/src/lui/TextAreaInput.d.ts +1 -1
- package/dist/src/lui/TextInputFormatted.d.ts +2 -2
- package/dist/src/lui/reactUtils.d.ts +1 -1
- package/dist/src/lui/stateDeferredHook.d.ts +1 -1
- package/dist/src/react-menu3/components/ControlledMenu.d.ts +2 -2
- package/dist/src/react-menu3/components/FocusableItem.d.ts +3 -3
- package/dist/src/react-menu3/components/Menu.d.ts +3 -3
- package/dist/src/react-menu3/components/MenuButton.d.ts +2 -2
- package/dist/src/react-menu3/components/MenuDivider.d.ts +1 -1
- package/dist/src/react-menu3/components/MenuGroup.d.ts +2 -2
- package/dist/src/react-menu3/components/MenuHeader.d.ts +2 -2
- package/dist/src/react-menu3/components/MenuItem.d.ts +3 -3
- package/dist/src/react-menu3/components/MenuList.d.ts +1 -1
- package/dist/src/react-menu3/components/MenuRadioGroup.d.ts +2 -2
- package/dist/src/react-menu3/components/SubMenu.d.ts +5 -5
- package/dist/src/react-menu3/contexts/EventHandlersContext.d.ts +1 -1
- package/dist/src/react-menu3/contexts/MenuListContext.d.ts +2 -2
- package/dist/src/react-menu3/contexts/MenuListItemContext.d.ts +1 -1
- package/dist/src/react-menu3/contexts/RadioGroupContext.d.ts +1 -1
- package/dist/src/react-menu3/contexts/SettingsContext.d.ts +2 -2
- package/dist/src/react-menu3/hooks/index.d.ts +9 -9
- package/dist/src/react-menu3/hooks/useBEM.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useCombinedRef.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useIsomorphicLayoutEffect.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useItemEffect.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useItemState.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useItems.d.ts +2 -2
- package/dist/src/react-menu3/hooks/useMenuChange.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useMenuState.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useMenuStateAndFocus.d.ts +1 -1
- package/dist/src/react-menu3/index.d.ts +11 -11
- package/dist/src/react-menu3/positionUtils/getPositionHelpers.d.ts +1 -1
- package/dist/src/react-menu3/positionUtils/index.d.ts +3 -3
- package/dist/src/react-menu3/positionUtils/placeArrowHorizontal.d.ts +1 -1
- package/dist/src/react-menu3/positionUtils/placeArrowVertical.d.ts +1 -1
- package/dist/src/react-menu3/positionUtils/placeLeftorRight.d.ts +4 -4
- package/dist/src/react-menu3/positionUtils/placeToporBottom.d.ts +5 -5
- package/dist/src/react-menu3/positionUtils/positionContextMenu.d.ts +2 -2
- package/dist/src/react-menu3/positionUtils/positionMenu.d.ts +5 -5
- package/dist/src/react-menu3/style-utils/index.d.ts +1 -1
- package/dist/src/react-menu3/types.d.ts +15 -15
- package/dist/src/react-menu3/utils/constants.d.ts +1 -1
- package/dist/src/react-menu3/utils/index.d.ts +3 -3
- package/dist/src/react-menu3/utils/utils.d.ts +5 -5
- package/dist/src/react-menu3/utils/withHovering.d.ts +1 -1
- package/dist/src/utils/testQuick.d.ts +2 -2
- package/dist/src/utils/testUtil.d.ts +2 -2
- package/dist/src/utils/textValidator.d.ts +2 -2
- package/dist/step-ag-grid.cjs.js +966 -952
- package/dist/step-ag-grid.cjs.js.map +1 -1
- package/dist/step-ag-grid.esm.js +968 -954
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +26 -41
- package/src/components/ComponentLoadingWrapper.tsx +5 -6
- package/src/components/Grid.tsx +85 -83
- package/src/components/GridCell.test.tsx +15 -15
- package/src/components/GridCell.tsx +46 -44
- package/src/components/GridCellFiller.tsx +5 -4
- package/src/components/GridCellMultiEditor.tsx +7 -7
- package/src/components/GridCellMultiSelectClassRules.tsx +3 -3
- package/src/components/GridIcon.tsx +6 -7
- package/src/components/GridLoadableCell.tsx +2 -2
- package/src/components/GridNoRowsOverlay.tsx +8 -8
- package/src/components/GridPopoverHook.tsx +16 -16
- package/src/components/GridWrapper.tsx +2 -2
- package/src/components/PostSortRowsHook.ts +11 -11
- package/src/components/clickInputWhenContainingCellClicked.tsx +5 -5
- package/src/components/gridFilter/GridFilterButtons.tsx +8 -9
- package/src/components/gridFilter/GridFilterColumnsToggle.tsx +25 -26
- package/src/components/gridFilter/GridFilterDownloadCsvButton.tsx +12 -13
- package/src/components/gridFilter/GridFilterHeaderIconButton.tsx +9 -10
- package/src/components/gridFilter/GridFilterQuick.tsx +6 -6
- package/src/components/gridFilter/GridFilters.tsx +1 -1
- package/src/components/gridFilter/index.ts +7 -7
- package/src/components/gridFilter/useGridFilter.ts +3 -3
- package/src/components/gridForm/GridFormDropDown.tsx +56 -52
- package/src/components/gridForm/GridFormEditBearing.tsx +12 -12
- package/src/components/gridForm/GridFormMessage.tsx +10 -10
- package/src/components/gridForm/GridFormMultiSelect.tsx +53 -51
- package/src/components/gridForm/GridFormMultiSelectGrid.tsx +25 -26
- package/src/components/gridForm/GridFormPopoverMenu.tsx +32 -29
- package/src/components/gridForm/GridFormSubComponentTextArea.tsx +10 -10
- package/src/components/gridForm/GridFormSubComponentTextInput.tsx +8 -8
- package/src/components/gridForm/GridFormTextArea.tsx +11 -11
- package/src/components/gridForm/GridFormTextInput.tsx +11 -11
- package/src/components/gridForm/index.ts +10 -10
- package/src/components/gridHeader/GridHeaderSelect.tsx +9 -9
- package/src/components/gridHeader/index.ts +1 -1
- package/src/components/gridHook/index.ts +1 -1
- package/src/components/gridHook/useGridContextMenu.tsx +7 -7
- package/src/components/gridPopoverEdit/GridButton.tsx +13 -12
- package/src/components/gridPopoverEdit/GridEditBoolean.tsx +19 -18
- package/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.ts +7 -6
- package/src/components/gridPopoverEdit/GridPopoutEditMultiSelectGrid.ts +7 -6
- package/src/components/gridPopoverEdit/GridPopoverEditBearing.ts +9 -9
- package/src/components/gridPopoverEdit/GridPopoverEditDropDown.ts +8 -7
- package/src/components/gridPopoverEdit/GridPopoverMenu.tsx +6 -6
- package/src/components/gridPopoverEdit/GridPopoverMessage.ts +4 -4
- package/src/components/gridPopoverEdit/GridPopoverTextArea.ts +4 -4
- package/src/components/gridPopoverEdit/GridPopoverTextInput.ts +4 -4
- package/src/components/gridPopoverEdit/index.ts +11 -11
- package/src/components/gridRender/GridRenderGenericCell.tsx +5 -5
- package/src/components/gridRender/GridRenderPopoutMenuCell.tsx +8 -9
- package/src/components/gridRender/index.ts +2 -2
- package/src/components/gridUtil.ts +3 -3
- package/src/components/index.ts +19 -19
- package/src/contexts/GridContext.tsx +52 -46
- package/src/contexts/GridContextProvider.test.tsx +14 -14
- package/src/contexts/GridContextProvider.tsx +42 -41
- package/src/contexts/GridPopoverContext.tsx +10 -7
- package/src/contexts/GridPopoverContextProvider.tsx +12 -10
- package/src/contexts/GridSubComponentContext.ts +6 -5
- package/src/contexts/GridUpdatingContext.tsx +5 -4
- package/src/contexts/GridUpdatingContextProvider.tsx +3 -3
- package/src/index.ts +17 -21
- package/src/lui/ActionButton.tsx +42 -41
- package/src/lui/FormError.tsx +4 -4
- package/src/lui/TextAreaInput.tsx +9 -9
- package/src/lui/TextInputFormatted.tsx +11 -11
- package/src/lui/reactUtils.test.tsx +8 -8
- package/src/lui/reactUtils.tsx +2 -2
- package/src/lui/stateDeferredHook.tsx +3 -5
- package/src/lui/timeoutHook.test.tsx +5 -5
- package/src/lui/timeoutHook.tsx +1 -1
- package/src/react-app-env.d.ts +1 -1
- package/src/react-menu3/components/ControlledMenu.tsx +48 -48
- package/src/react-menu3/components/FocusableItem.tsx +7 -7
- package/src/react-menu3/components/Menu.tsx +11 -11
- package/src/react-menu3/components/MenuButton.tsx +4 -4
- package/src/react-menu3/components/MenuDivider.tsx +4 -4
- package/src/react-menu3/components/MenuGroup.tsx +5 -5
- package/src/react-menu3/components/MenuHeader.tsx +4 -4
- package/src/react-menu3/components/MenuItem.tsx +14 -14
- package/src/react-menu3/components/MenuList.tsx +55 -55
- package/src/react-menu3/components/MenuRadioGroup.tsx +7 -7
- package/src/react-menu3/components/SubMenu.tsx +24 -24
- package/src/react-menu3/contexts/EventHandlersContext.ts +2 -2
- package/src/react-menu3/contexts/HoverItemContext.ts +1 -1
- package/src/react-menu3/contexts/ItemSettingsContext.ts +1 -1
- package/src/react-menu3/contexts/MenuListContext.ts +2 -2
- package/src/react-menu3/contexts/MenuListItemContext.ts +2 -2
- package/src/react-menu3/contexts/RadioGroupContext.ts +2 -2
- package/src/react-menu3/contexts/SettingsContext.ts +2 -2
- package/src/react-menu3/hooks/index.ts +9 -9
- package/src/react-menu3/hooks/useBEM.ts +4 -4
- package/src/react-menu3/hooks/useCombinedRef.ts +2 -2
- package/src/react-menu3/hooks/useIsomorphicLayoutEffect.ts +4 -4
- package/src/react-menu3/hooks/useItemEffect.ts +3 -3
- package/src/react-menu3/hooks/useItemState.ts +5 -5
- package/src/react-menu3/hooks/useItems.ts +8 -8
- package/src/react-menu3/hooks/useMenuChange.ts +3 -3
- package/src/react-menu3/hooks/useMenuState.ts +5 -5
- package/src/react-menu3/hooks/useMenuStateAndFocus.ts +4 -4
- package/src/react-menu3/index.ts +11 -11
- package/src/react-menu3/positionUtils/getPositionHelpers.ts +2 -2
- package/src/react-menu3/positionUtils/index.ts +3 -3
- package/src/react-menu3/positionUtils/placeArrowHorizontal.ts +1 -1
- package/src/react-menu3/positionUtils/placeArrowVertical.ts +1 -1
- package/src/react-menu3/positionUtils/placeLeftorRight.ts +13 -13
- package/src/react-menu3/positionUtils/placeToporBottom.ts +15 -15
- package/src/react-menu3/positionUtils/positionContextMenu.ts +4 -4
- package/src/react-menu3/positionUtils/positionMenu.ts +14 -14
- package/src/react-menu3/style-utils/index.ts +24 -24
- package/src/react-menu3/types.ts +15 -15
- package/src/react-menu3/utils/constants.ts +33 -33
- package/src/react-menu3/utils/index.ts +3 -4
- package/src/react-menu3/utils/propTypes2.ts +10 -10
- package/src/react-menu3/utils/utils.ts +14 -14
- package/src/react-menu3/utils/withHovering.tsx +3 -3
- package/src/stories/components/ActionButton.stories.tsx +23 -24
- package/src/stories/grid/FormTest.tsx +15 -16
- package/src/stories/grid/GridDragRow.stories.tsx +33 -34
- package/src/stories/grid/GridFilterButtons.stories.tsx +32 -33
- package/src/stories/grid/GridNoRowsOverlay.stories.tsx +9 -10
- package/src/stories/grid/GridNonEditableRow.stories.tsx +40 -41
- package/src/stories/grid/GridPinnedRow.stories.tsx +25 -26
- package/src/stories/grid/GridPopoutContextMenu.stories.tsx +33 -32
- package/src/stories/grid/GridPopoutEditBoolean.stories.tsx +21 -22
- package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +18 -19
- package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +50 -49
- package/src/stories/grid/GridPopoverEditBearing.stories.tsx +25 -26
- package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +93 -94
- package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +62 -63
- package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +28 -28
- package/src/stories/grid/GridReadOnly.stories.tsx +66 -67
- package/src/stories/grid/GridViewList.stories.tsx +37 -38
- package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +37 -38
- package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +25 -26
- package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +25 -26
- package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +31 -31
- package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +47 -48
- package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +44 -45
- package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +19 -20
- package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +21 -22
- package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +40 -41
- package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +14 -15
- package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +14 -15
- package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +10 -11
- package/src/stories/grid/gridFormStatic/GridFormMultiSelect.stories.tsx +20 -21
- package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +16 -17
- package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +13 -14
- package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +13 -14
- package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +68 -71
- package/src/stories/react-menu/ReactMenu.stories.tsx +26 -26
- package/src/utils/bearing.test.ts +44 -44
- package/src/utils/bearing.ts +20 -20
- package/src/utils/deferredPromise.ts +1 -1
- package/src/utils/storybookTestUtil.ts +2 -2
- package/src/utils/testQuick.ts +15 -14
- package/src/utils/testUtil.ts +31 -36
- package/src/utils/textMatcher.test.ts +9 -9
- package/src/utils/textMatcher.ts +8 -8
- package/src/utils/textValidator.test.ts +56 -56
- package/src/utils/textValidator.ts +11 -11
- package/src/utils/util.test.ts +20 -20
- package/src/utils/util.ts +7 -7
|
@@ -1,77 +1,76 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import '../../../react-menu3/styles/index.scss';
|
|
2
|
+
import '../../../styles/index.scss';
|
|
3
|
+
import '@linzjs/lui/dist/scss/base.scss';
|
|
4
|
+
import '@linzjs/lui/dist/fonts';
|
|
4
5
|
|
|
5
|
-
import { Meta, StoryFn } from
|
|
6
|
-
import { GridPopoverContext, GridPopoverContextType } from
|
|
7
|
-
import { useRef } from
|
|
6
|
+
import { Meta, StoryFn } from '@storybook/react';
|
|
7
|
+
import { GridPopoverContext, GridPopoverContextType } from 'contexts/GridPopoverContext';
|
|
8
|
+
import { useRef } from 'react';
|
|
8
9
|
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import { GridBaseRow, GridContextProvider, GridFormDropDown, GridFormDropDownProps, MenuHeaderItem } from "../../..";
|
|
10
|
+
import { GridBaseRow, GridContextProvider, GridFormDropDown, GridFormDropDownProps, MenuHeaderItem } from '../../..';
|
|
12
11
|
|
|
13
12
|
export default {
|
|
14
|
-
title:
|
|
13
|
+
title: 'GridForm / Static Tests',
|
|
15
14
|
component: GridFormDropDown,
|
|
16
15
|
args: {},
|
|
17
16
|
} as Meta<typeof GridFormDropDown>;
|
|
18
17
|
|
|
19
18
|
const Template: StoryFn<typeof GridFormDropDown> = (props: GridFormDropDownProps<any>) => {
|
|
20
19
|
const configs: [string, GridFormDropDownProps<GridBaseRow>, string?][] = [
|
|
21
|
-
[
|
|
22
|
-
[
|
|
20
|
+
['No options', { options: [] }],
|
|
21
|
+
['Custom no options', { options: [], noOptionsMessage: 'Custom no options' }],
|
|
23
22
|
[
|
|
24
|
-
|
|
23
|
+
'Enabled and disabled',
|
|
25
24
|
{
|
|
26
25
|
options: [
|
|
27
|
-
{ label:
|
|
28
|
-
{ label:
|
|
26
|
+
{ label: 'Enabled', value: 1 },
|
|
27
|
+
{ label: 'Disabled', value: 0, disabled: true },
|
|
29
28
|
],
|
|
30
29
|
},
|
|
31
30
|
],
|
|
32
31
|
[
|
|
33
|
-
|
|
32
|
+
'Headers',
|
|
34
33
|
{
|
|
35
34
|
options: [
|
|
36
|
-
MenuHeaderItem(
|
|
37
|
-
{ label:
|
|
38
|
-
MenuHeaderItem(
|
|
39
|
-
{ label:
|
|
35
|
+
MenuHeaderItem('Header 1'),
|
|
36
|
+
{ label: 'Option 1', value: 1 },
|
|
37
|
+
MenuHeaderItem('Header 2'),
|
|
38
|
+
{ label: 'Option 2', value: 2 },
|
|
40
39
|
],
|
|
41
40
|
},
|
|
42
41
|
],
|
|
43
42
|
[
|
|
44
|
-
|
|
43
|
+
'Filter',
|
|
45
44
|
{
|
|
46
|
-
filtered:
|
|
45
|
+
filtered: 'local',
|
|
47
46
|
options: [
|
|
48
|
-
MenuHeaderItem(
|
|
49
|
-
{ label:
|
|
50
|
-
MenuHeaderItem(
|
|
51
|
-
{ label:
|
|
47
|
+
MenuHeaderItem('Header 1'),
|
|
48
|
+
{ label: 'Option 1', value: 1 },
|
|
49
|
+
MenuHeaderItem('Header 2'),
|
|
50
|
+
{ label: 'Option 2', value: 2 },
|
|
52
51
|
],
|
|
53
52
|
},
|
|
54
53
|
],
|
|
55
54
|
[
|
|
56
|
-
|
|
55
|
+
'Filter custom placeholder',
|
|
57
56
|
{
|
|
58
|
-
filtered:
|
|
59
|
-
filterPlaceholder:
|
|
60
|
-
filterHelpText:
|
|
61
|
-
options: [MenuHeaderItem(
|
|
57
|
+
filtered: 'local',
|
|
58
|
+
filterPlaceholder: 'Custom placeholder',
|
|
59
|
+
filterHelpText: 'Filter help text',
|
|
60
|
+
options: [MenuHeaderItem('Header 1'), { label: 'Option 1', value: 1 }],
|
|
62
61
|
},
|
|
63
62
|
],
|
|
64
63
|
[
|
|
65
|
-
|
|
64
|
+
'Filter help text and default filter text',
|
|
66
65
|
{
|
|
67
|
-
filtered:
|
|
68
|
-
filterHelpText:
|
|
69
|
-
filterDefaultValue:
|
|
66
|
+
filtered: 'local',
|
|
67
|
+
filterHelpText: 'Filter help text',
|
|
68
|
+
filterDefaultValue: 'filter',
|
|
70
69
|
options: [
|
|
71
|
-
MenuHeaderItem(
|
|
72
|
-
{ label:
|
|
73
|
-
MenuHeaderItem(
|
|
74
|
-
{ label:
|
|
70
|
+
MenuHeaderItem('Header 1'),
|
|
71
|
+
{ label: 'Filter match', value: 1 },
|
|
72
|
+
MenuHeaderItem('ERROR! this header should not be visible'),
|
|
73
|
+
{ label: 'ERROR! this option should not be visible', value: 2 },
|
|
75
74
|
],
|
|
76
75
|
},
|
|
77
76
|
],
|
|
@@ -80,7 +79,7 @@ const Template: StoryFn<typeof GridFormDropDown> = (props: GridFormDropDownProps
|
|
|
80
79
|
const anchorRefs = configs.map(() => useRef<HTMLHeadingElement>(null));
|
|
81
80
|
|
|
82
81
|
return (
|
|
83
|
-
<div className={
|
|
82
|
+
<div className={'react-menu-inline-test'}>
|
|
84
83
|
<GridContextProvider>
|
|
85
84
|
{configs.map((config, index) => (
|
|
86
85
|
<div key={`${index}`}>
|
|
@@ -91,7 +90,7 @@ const Template: StoryFn<typeof GridFormDropDown> = (props: GridFormDropDownProps
|
|
|
91
90
|
anchorRef: anchorRefs[index],
|
|
92
91
|
data: { value: config[2] },
|
|
93
92
|
value: config[2],
|
|
94
|
-
field:
|
|
93
|
+
field: 'value',
|
|
95
94
|
} as any as GridPopoverContextType<any>
|
|
96
95
|
}
|
|
97
96
|
>
|
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import '../../../react-menu3/styles/index.scss';
|
|
2
|
+
import '../../../styles/index.scss';
|
|
3
|
+
import '@linzjs/lui/dist/scss/base.scss';
|
|
4
|
+
import '@linzjs/lui/dist/fonts';
|
|
4
5
|
|
|
5
|
-
import { Meta, StoryFn } from
|
|
6
|
-
import { GridPopoverContext, GridPopoverContextType } from
|
|
7
|
-
import { useRef } from
|
|
8
|
-
|
|
9
|
-
import "@linzjs/lui/dist/fonts";
|
|
6
|
+
import { Meta, StoryFn } from '@storybook/react';
|
|
7
|
+
import { GridPopoverContext, GridPopoverContextType } from 'contexts/GridPopoverContext';
|
|
8
|
+
import { useRef } from 'react';
|
|
10
9
|
|
|
11
10
|
import {
|
|
12
11
|
GridContextProvider,
|
|
13
12
|
GridFormEditBearing,
|
|
14
13
|
GridFormEditBearingProps,
|
|
15
14
|
GridPopoverEditBearingEditorParams,
|
|
16
|
-
} from
|
|
15
|
+
} from '../../..';
|
|
17
16
|
|
|
18
17
|
export default {
|
|
19
|
-
title:
|
|
18
|
+
title: 'GridForm / Static Tests',
|
|
20
19
|
component: GridFormEditBearing,
|
|
21
20
|
args: {},
|
|
22
21
|
} as Meta<typeof GridFormEditBearing>;
|
|
23
22
|
|
|
24
23
|
const Template: StoryFn<typeof GridFormEditBearing> = (props: GridFormEditBearingProps<any>) => {
|
|
25
24
|
const values: [string, GridFormEditBearingProps<any>, number | null][] = [
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
25
|
+
['Null value', {}, null],
|
|
26
|
+
['Custom placeholder', { placeHolder: 'Custom placeholder' }, null],
|
|
27
|
+
['Valid value', {}, 90],
|
|
28
|
+
['With error', {}, 1.234567],
|
|
30
29
|
];
|
|
31
30
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
32
31
|
const anchorRefs = values.map(() => useRef<HTMLHeadingElement>(null));
|
|
33
32
|
|
|
34
33
|
return (
|
|
35
|
-
<div className={
|
|
34
|
+
<div className={'react-menu-inline-test'}>
|
|
36
35
|
<GridContextProvider>
|
|
37
36
|
{values.map((value, index) => (
|
|
38
37
|
<>
|
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import '../../../react-menu3/styles/index.scss';
|
|
2
|
+
import '../../../styles/index.scss';
|
|
3
|
+
import '@linzjs/lui/dist/scss/base.scss';
|
|
4
|
+
import '@linzjs/lui/dist/fonts';
|
|
4
5
|
|
|
5
|
-
import { Meta, StoryFn } from
|
|
6
|
-
import { GridPopoverContext, GridPopoverContextType } from
|
|
7
|
-
import { useRef } from
|
|
8
|
-
|
|
9
|
-
import "@linzjs/lui/dist/fonts";
|
|
6
|
+
import { Meta, StoryFn } from '@storybook/react';
|
|
7
|
+
import { GridPopoverContext, GridPopoverContextType } from 'contexts/GridPopoverContext';
|
|
8
|
+
import { useRef } from 'react';
|
|
10
9
|
|
|
11
10
|
import {
|
|
12
11
|
GridContextProvider,
|
|
13
12
|
GridFormEditBearing,
|
|
14
13
|
GridFormEditBearingProps,
|
|
15
14
|
GridPopoverEditBearingCorrectionEditorParams,
|
|
16
|
-
} from
|
|
15
|
+
} from '../../..';
|
|
17
16
|
|
|
18
17
|
export default {
|
|
19
|
-
title:
|
|
18
|
+
title: 'GridForm / Static Tests',
|
|
20
19
|
component: GridFormEditBearing,
|
|
21
20
|
args: {},
|
|
22
21
|
} as Meta<typeof GridFormEditBearing>;
|
|
23
22
|
|
|
24
23
|
const Template: StoryFn<typeof GridFormEditBearing> = (props: GridFormEditBearingProps<any>) => {
|
|
25
24
|
const values: [string, GridFormEditBearingProps<any>, number | null][] = [
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
25
|
+
['Null value', {}, null],
|
|
26
|
+
['Custom placeholder', { placeHolder: 'Custom placeholder' }, null],
|
|
27
|
+
['Valid value', {}, -10],
|
|
28
|
+
['With error', {}, 360],
|
|
30
29
|
];
|
|
31
30
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
32
31
|
const anchorRefs = values.map(() => useRef<HTMLHeadingElement>(null));
|
|
33
32
|
|
|
34
33
|
return (
|
|
35
|
-
<div className={
|
|
34
|
+
<div className={'react-menu-inline-test'}>
|
|
36
35
|
<GridContextProvider>
|
|
37
36
|
{values.map((value, index) => (
|
|
38
37
|
<>
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import '../../../react-menu3/styles/index.scss';
|
|
2
|
+
import '../../../styles/index.scss';
|
|
3
|
+
import '@linzjs/lui/dist/scss/base.scss';
|
|
4
|
+
import '@linzjs/lui/dist/fonts';
|
|
4
5
|
|
|
5
|
-
import { Meta, StoryFn } from
|
|
6
|
-
import { GridPopoverContext, GridPopoverContextType } from
|
|
7
|
-
import { useRef } from
|
|
6
|
+
import { Meta, StoryFn } from '@storybook/react';
|
|
7
|
+
import { GridPopoverContext, GridPopoverContextType } from 'contexts/GridPopoverContext';
|
|
8
|
+
import { useRef } from 'react';
|
|
8
9
|
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import { GridContextProvider, GridFormMessage, GridFormMessageProps } from "../../..";
|
|
10
|
+
import { GridContextProvider, GridFormMessage, GridFormMessageProps } from '../../..';
|
|
12
11
|
|
|
13
12
|
export default {
|
|
14
|
-
title:
|
|
13
|
+
title: 'GridForm / Static Tests',
|
|
15
14
|
component: GridFormMessage,
|
|
16
15
|
args: {},
|
|
17
16
|
} as Meta<typeof GridFormMessage>;
|
|
@@ -20,7 +19,7 @@ const Template: StoryFn<typeof GridFormMessage> = (props: GridFormMessageProps<a
|
|
|
20
19
|
const anchorRef1 = useRef<HTMLHeadingElement>(null);
|
|
21
20
|
|
|
22
21
|
return (
|
|
23
|
-
<div className={
|
|
22
|
+
<div className={'react-menu-inline-test'}>
|
|
24
23
|
<GridContextProvider>
|
|
25
24
|
<h6 ref={anchorRef1}>Standard Message</h6>
|
|
26
25
|
<GridPopoverContext.Provider value={{ anchorRef: anchorRef1 } as any as GridPopoverContextType<any>}>
|
|
@@ -1,42 +1,41 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import '../../../react-menu3/styles/index.scss';
|
|
2
|
+
import '../../../styles/index.scss';
|
|
3
|
+
import '@linzjs/lui/dist/scss/base.scss';
|
|
4
|
+
import '@linzjs/lui/dist/fonts';
|
|
4
5
|
|
|
5
|
-
import { Meta, StoryFn } from
|
|
6
|
-
import { GridPopoverContext, GridPopoverContextType } from
|
|
7
|
-
import { useRef } from
|
|
6
|
+
import { Meta, StoryFn } from '@storybook/react';
|
|
7
|
+
import { GridPopoverContext, GridPopoverContextType } from 'contexts/GridPopoverContext';
|
|
8
|
+
import { useRef } from 'react';
|
|
8
9
|
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import { GridBaseRow, GridContextProvider, GridFormMultiSelect, GridFormMultiSelectProps } from "../../..";
|
|
10
|
+
import { GridBaseRow, GridContextProvider, GridFormMultiSelect, GridFormMultiSelectProps } from '../../..';
|
|
12
11
|
|
|
13
12
|
export default {
|
|
14
|
-
title:
|
|
13
|
+
title: 'GridForm / Static Tests',
|
|
15
14
|
component: GridFormMultiSelect,
|
|
16
15
|
args: {},
|
|
17
16
|
} as Meta<typeof GridFormMultiSelect>;
|
|
18
17
|
|
|
19
18
|
const Template: StoryFn<typeof GridFormMultiSelect> = (props) => {
|
|
20
19
|
const configs: [string, GridFormMultiSelectProps<GridBaseRow>, string?][] = [
|
|
21
|
-
[
|
|
22
|
-
[
|
|
20
|
+
['No options', { options: [] }],
|
|
21
|
+
['Custom no options', { options: [], noOptionsMessage: 'Custom no options' }],
|
|
23
22
|
[
|
|
24
|
-
|
|
23
|
+
'With options',
|
|
25
24
|
{
|
|
26
25
|
options: [
|
|
27
|
-
{ label:
|
|
28
|
-
{ label:
|
|
26
|
+
{ label: 'One', value: 0, checked: true },
|
|
27
|
+
{ label: 'Two', value: 1 },
|
|
29
28
|
],
|
|
30
29
|
},
|
|
31
30
|
],
|
|
32
31
|
[
|
|
33
|
-
|
|
32
|
+
'With filter',
|
|
34
33
|
{
|
|
35
34
|
filtered: true,
|
|
36
35
|
options: [
|
|
37
|
-
{ label:
|
|
38
|
-
{ label:
|
|
39
|
-
{ label:
|
|
36
|
+
{ label: 'One', value: 0 },
|
|
37
|
+
{ label: 'With warning', value: 1, warning: 'Test warning' },
|
|
38
|
+
{ label: 'Three', value: 2, checked: true },
|
|
40
39
|
],
|
|
41
40
|
},
|
|
42
41
|
],
|
|
@@ -45,7 +44,7 @@ const Template: StoryFn<typeof GridFormMultiSelect> = (props) => {
|
|
|
45
44
|
const anchorRefs = configs.map(() => useRef<HTMLHeadingElement>(null));
|
|
46
45
|
|
|
47
46
|
return (
|
|
48
|
-
<div className={
|
|
47
|
+
<div className={'react-menu-inline-test'}>
|
|
49
48
|
<GridContextProvider>
|
|
50
49
|
{configs.map((config, index) => (
|
|
51
50
|
<div key={`${index}`}>
|
|
@@ -56,7 +55,7 @@ const Template: StoryFn<typeof GridFormMultiSelect> = (props) => {
|
|
|
56
55
|
anchorRef: anchorRefs[index],
|
|
57
56
|
data: { value: config[2] },
|
|
58
57
|
value: config[2],
|
|
59
|
-
field:
|
|
58
|
+
field: 'value',
|
|
60
59
|
} as any as GridPopoverContextType<any>
|
|
61
60
|
}
|
|
62
61
|
>
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import '../../../react-menu3/styles/index.scss';
|
|
2
|
+
import '../../../styles/index.scss';
|
|
3
|
+
import '@linzjs/lui/dist/scss/base.scss';
|
|
4
|
+
import '@linzjs/lui/dist/fonts';
|
|
4
5
|
|
|
5
|
-
import { Meta, StoryFn } from
|
|
6
|
-
import { GridPopoverContext, GridPopoverContextType } from
|
|
7
|
-
import { useRef } from
|
|
8
|
-
|
|
9
|
-
import "@linzjs/lui/dist/fonts";
|
|
6
|
+
import { Meta, StoryFn } from '@storybook/react';
|
|
7
|
+
import { GridPopoverContext, GridPopoverContextType } from 'contexts/GridPopoverContext';
|
|
8
|
+
import { useRef } from 'react';
|
|
10
9
|
|
|
11
10
|
import {
|
|
12
11
|
GridBaseRow,
|
|
@@ -14,25 +13,25 @@ import {
|
|
|
14
13
|
GridFormPopoverMenu,
|
|
15
14
|
GridFormPopoverMenuProps,
|
|
16
15
|
PopoutMenuSeparator,
|
|
17
|
-
} from
|
|
16
|
+
} from '../../..';
|
|
18
17
|
|
|
19
18
|
export default {
|
|
20
|
-
title:
|
|
19
|
+
title: 'GridForm / Static Tests',
|
|
21
20
|
component: GridFormPopoverMenu,
|
|
22
21
|
args: {},
|
|
23
22
|
} as Meta<typeof GridFormPopoverMenu>;
|
|
24
23
|
|
|
25
24
|
const Template: StoryFn<typeof GridFormPopoverMenu> = (props) => {
|
|
26
25
|
const configs: [string, GridFormPopoverMenuProps<GridBaseRow>][] = [
|
|
27
|
-
[
|
|
26
|
+
['No options', { options: () => [] }],
|
|
28
27
|
[
|
|
29
|
-
|
|
28
|
+
'Enabled/disabled/hidden and divider',
|
|
30
29
|
{
|
|
31
|
-
options:
|
|
32
|
-
{ label:
|
|
30
|
+
options: () => [
|
|
31
|
+
{ label: 'Enabled', value: 1 },
|
|
33
32
|
PopoutMenuSeparator,
|
|
34
|
-
{ label:
|
|
35
|
-
{ label:
|
|
33
|
+
{ label: 'Disabled', value: 0, disabled: true },
|
|
34
|
+
{ label: 'ERROR! this should be hidden', value: 3, hidden: true },
|
|
36
35
|
],
|
|
37
36
|
},
|
|
38
37
|
],
|
|
@@ -41,7 +40,7 @@ const Template: StoryFn<typeof GridFormPopoverMenu> = (props) => {
|
|
|
41
40
|
const anchorRefs = configs.map(() => useRef<HTMLHeadingElement>(null));
|
|
42
41
|
|
|
43
42
|
return (
|
|
44
|
-
<div className={
|
|
43
|
+
<div className={'react-menu-inline-test'}>
|
|
45
44
|
<GridContextProvider>
|
|
46
45
|
{configs.map((config, index) => (
|
|
47
46
|
<>
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import '../../../react-menu3/styles/index.scss';
|
|
2
|
+
import '../../../styles/index.scss';
|
|
3
|
+
import '@linzjs/lui/dist/scss/base.scss';
|
|
4
|
+
import '@linzjs/lui/dist/fonts';
|
|
4
5
|
|
|
5
|
-
import { Meta, StoryFn } from
|
|
6
|
-
import { GridPopoverContext, GridPopoverContextType } from
|
|
7
|
-
import { useRef } from
|
|
6
|
+
import { Meta, StoryFn } from '@storybook/react';
|
|
7
|
+
import { GridPopoverContext, GridPopoverContextType } from 'contexts/GridPopoverContext';
|
|
8
|
+
import { useRef } from 'react';
|
|
8
9
|
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import { GridBaseRow, GridContextProvider, GridFormTextArea, GridFormTextAreaProps } from "../../..";
|
|
10
|
+
import { GridBaseRow, GridContextProvider, GridFormTextArea, GridFormTextAreaProps } from '../../..';
|
|
12
11
|
|
|
13
12
|
export default {
|
|
14
|
-
title:
|
|
13
|
+
title: 'GridForm / Static Tests',
|
|
15
14
|
component: GridFormTextArea,
|
|
16
15
|
args: {},
|
|
17
16
|
} as Meta<typeof GridFormTextArea>;
|
|
18
17
|
|
|
19
18
|
const Template: StoryFn<typeof GridFormTextArea> = (props: GridFormTextAreaProps<any>) => {
|
|
20
19
|
const configs: [string, GridFormTextAreaProps<GridBaseRow>, string?][] = [
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
20
|
+
['Text area', {}],
|
|
21
|
+
['Text area with text', {}, 'Some text'],
|
|
22
|
+
['Text area with error & placeholder', { required: true, placeholder: 'Custom placeholder' }],
|
|
24
23
|
];
|
|
25
24
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
26
25
|
const anchorRefs = configs.map(() => useRef<HTMLHeadingElement>(null));
|
|
27
26
|
|
|
28
27
|
return (
|
|
29
|
-
<div className={
|
|
28
|
+
<div className={'react-menu-inline-test'}>
|
|
30
29
|
<GridContextProvider>
|
|
31
30
|
{configs.map((config, index) => (
|
|
32
31
|
<>
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import '../../../react-menu3/styles/index.scss';
|
|
2
|
+
import '../../../styles/index.scss';
|
|
3
|
+
import '@linzjs/lui/dist/scss/base.scss';
|
|
4
|
+
import '@linzjs/lui/dist/fonts';
|
|
4
5
|
|
|
5
|
-
import { Meta, StoryFn } from
|
|
6
|
-
import { GridPopoverContext, GridPopoverContextType } from
|
|
7
|
-
import { useRef } from
|
|
6
|
+
import { Meta, StoryFn } from '@storybook/react';
|
|
7
|
+
import { GridPopoverContext, GridPopoverContextType } from 'contexts/GridPopoverContext';
|
|
8
|
+
import { useRef } from 'react';
|
|
8
9
|
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import { GridBaseRow, GridContextProvider, GridFormTextInput, GridFormTextInputProps } from "../../..";
|
|
10
|
+
import { GridBaseRow, GridContextProvider, GridFormTextInput, GridFormTextInputProps } from '../../..';
|
|
12
11
|
|
|
13
12
|
export default {
|
|
14
|
-
title:
|
|
13
|
+
title: 'GridForm / Static Tests',
|
|
15
14
|
component: GridFormTextInput,
|
|
16
15
|
args: {},
|
|
17
16
|
} as Meta<typeof GridFormTextInput>;
|
|
18
17
|
|
|
19
18
|
const Template: StoryFn<typeof GridFormTextInput> = (props: GridFormTextInputProps<any>) => {
|
|
20
19
|
const configs: [string, GridFormTextInputProps<GridBaseRow>, string?][] = [
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
20
|
+
['Text input', {}],
|
|
21
|
+
['Text input with text', {}, 'Some text'],
|
|
22
|
+
['Text input with error & placeholder', { required: true, placeholder: 'Custom placeholder' }],
|
|
24
23
|
];
|
|
25
24
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
26
25
|
const anchorRefs = configs.map(() => useRef<HTMLHeadingElement>(null));
|
|
27
26
|
|
|
28
27
|
return (
|
|
29
|
-
<div className={
|
|
28
|
+
<div className={'react-menu-inline-test'}>
|
|
30
29
|
<GridContextProvider>
|
|
31
30
|
{configs.map((config, index) => (
|
|
32
31
|
<>
|