@linzjs/step-ag-grid 12.1.1 → 13.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 +14 -12
- package/dist/src/components/GridCell.d.ts +2 -2
- package/dist/src/components/GridCellMultiEditor.d.ts +4 -4
- package/dist/src/components/gridFilter/GridFilterButtons.d.ts +3 -3
- package/dist/src/components/gridFilter/index.d.ts +3 -0
- package/dist/src/components/gridForm/GridFormSubComponentTextArea.d.ts +1 -1
- 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/components/gridForm/index.d.ts +9 -0
- package/dist/src/components/gridHeader/index.d.ts +1 -0
- package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.d.ts +1 -1
- package/dist/src/components/gridPopoverEdit/GridPopoverEditBearing.d.ts +1 -1
- package/dist/src/components/gridPopoverEdit/GridPopoverEditDropDown.d.ts +1 -1
- package/dist/src/components/gridPopoverEdit/GridPopoverMessage.d.ts +1 -1
- package/dist/src/components/gridPopoverEdit/GridPopoverTextArea.d.ts +1 -1
- package/dist/src/components/gridPopoverEdit/GridPopoverTextInput.d.ts +1 -1
- package/dist/src/components/gridPopoverEdit/index.d.ts +8 -0
- package/dist/src/components/gridRender/GridRenderGenericCell.d.ts +1 -1
- package/dist/src/components/gridRender/index.d.ts +2 -0
- package/dist/src/components/index.d.ts +16 -0
- package/dist/src/contexts/GridPopoverContextProvider.d.ts +1 -1
- package/dist/src/index.d.ts +6 -38
- package/dist/src/lui/ActionButton.d.ts +2 -2
- package/dist/src/lui/TextInputFormatted.d.ts +1 -1
- package/dist/src/react-menu3/components/ControlledMenu.d.ts +1 -1
- package/dist/src/react-menu3/components/Menu.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useCombinedRef.d.ts +1 -1
- package/dist/src/react-menu3/positionUtils/placeLeftorRight.d.ts +1 -1
- package/dist/src/react-menu3/positionUtils/placeToporBottom.d.ts +1 -1
- package/dist/src/react-menu3/positionUtils/positionContextMenu.d.ts +1 -1
- package/dist/src/react-menu3/positionUtils/positionMenu.d.ts +1 -1
- package/dist/src/react-menu3/utils/utils.d.ts +1 -1
- package/dist/step-ag-grid.esm.js +3652 -59498
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +5 -2
- package/src/components/Grid.tsx +8 -7
- package/src/components/GridCell.tsx +8 -7
- package/src/components/GridCellMultiEditor.tsx +5 -4
- package/src/components/GridFilter.ts +1 -0
- package/src/components/GridIcon.tsx +1 -0
- package/src/components/GridLoadableCell.tsx +1 -0
- package/src/components/GridPopoverHook.tsx +3 -2
- package/src/components/PostSortRowsHook.ts +4 -3
- package/src/components/gridFilter/GridFilterButtons.tsx +4 -2
- package/src/components/gridFilter/GridFilterQuick.tsx +1 -0
- package/src/components/gridFilter/index.ts +3 -0
- package/src/components/gridForm/GridFormDropDown.tsx +10 -9
- package/src/components/gridForm/GridFormEditBearing.tsx +4 -3
- package/src/components/gridForm/GridFormMessage.tsx +3 -2
- package/src/components/gridForm/GridFormMultiSelect.tsx +15 -13
- package/src/components/gridForm/GridFormPopoverMenu.tsx +7 -6
- package/src/components/gridForm/GridFormSubComponentTextArea.tsx +3 -2
- package/src/components/gridForm/GridFormSubComponentTextInput.tsx +2 -1
- package/src/components/gridForm/GridFormTextArea.tsx +4 -3
- package/src/components/gridForm/GridFormTextInput.tsx +4 -3
- package/src/components/gridForm/index.ts +9 -0
- package/src/components/gridHeader/GridHeaderSelect.tsx +1 -1
- package/src/components/gridHeader/index.ts +1 -0
- package/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.ts +1 -1
- package/src/components/gridPopoverEdit/GridPopoverEditBearing.ts +3 -2
- package/src/components/gridPopoverEdit/GridPopoverEditDropDown.ts +1 -1
- package/src/components/gridPopoverEdit/GridPopoverMenu.tsx +1 -1
- package/src/components/gridPopoverEdit/GridPopoverMessage.ts +1 -1
- package/src/components/gridPopoverEdit/GridPopoverTextArea.ts +1 -1
- package/src/components/gridPopoverEdit/GridPopoverTextInput.ts +1 -1
- package/src/components/gridPopoverEdit/index.ts +8 -0
- package/src/components/gridRender/GridRenderGenericCell.tsx +3 -2
- package/src/components/gridRender/GridRenderPopoutMenuCell.tsx +2 -0
- package/src/components/gridRender/index.ts +2 -0
- package/src/components/index.ts +16 -0
- package/src/contexts/GridContext.tsx +2 -1
- package/src/contexts/GridContextProvider.tsx +5 -4
- package/src/contexts/GridPopoverContext.tsx +2 -1
- package/src/contexts/GridPopoverContextProvider.tsx +4 -3
- package/src/contexts/GridUpdatingContextProvider.tsx +2 -1
- package/src/index.ts +7 -45
- package/src/lui/ActionButton.tsx +5 -4
- package/src/lui/TextAreaInput.tsx +3 -2
- package/src/lui/TextInputFormatted.tsx +3 -4
- package/src/lui/reactUtils.test.tsx +4 -3
- package/src/lui/stateDeferredHook.tsx +1 -0
- package/src/lui/timeoutHook.test.tsx +2 -1
- package/src/react-menu3/components/ControlledMenu.tsx +7 -6
- package/src/react-menu3/components/FocusableItem.tsx +3 -2
- package/src/react-menu3/components/Menu.tsx +8 -7
- package/src/react-menu3/components/MenuButton.tsx +3 -2
- package/src/react-menu3/components/MenuDivider.tsx +3 -2
- package/src/react-menu3/components/MenuGroup.tsx +5 -4
- package/src/react-menu3/components/MenuHeader.tsx +3 -2
- package/src/react-menu3/components/MenuItem.tsx +5 -4
- package/src/react-menu3/components/MenuList.tsx +11 -10
- package/src/react-menu3/components/MenuRadioGroup.tsx +4 -3
- package/src/react-menu3/components/SubMenu.tsx +26 -25
- package/src/react-menu3/contexts/EventHandlersContext.ts +1 -0
- package/src/react-menu3/contexts/MenuListContext.ts +2 -1
- package/src/react-menu3/contexts/MenuListItemContext.ts +2 -1
- package/src/react-menu3/contexts/RadioGroupContext.ts +1 -0
- package/src/react-menu3/contexts/SettingsContext.ts +2 -1
- package/src/react-menu3/hooks/useBEM.ts +1 -0
- package/src/react-menu3/hooks/useCombinedRef.ts +1 -1
- package/src/react-menu3/hooks/useItemEffect.ts +1 -0
- package/src/react-menu3/hooks/useItemState.ts +4 -3
- package/src/react-menu3/hooks/useItems.ts +3 -2
- package/src/react-menu3/hooks/useMenuChange.ts +3 -2
- package/src/react-menu3/hooks/useMenuState.ts +2 -1
- package/src/react-menu3/hooks/useMenuStateAndFocus.ts +2 -1
- package/src/react-menu3/positionUtils/getPositionHelpers.ts +2 -1
- package/src/react-menu3/positionUtils/placeLeftorRight.ts +3 -2
- package/src/react-menu3/positionUtils/placeToporBottom.ts +3 -2
- package/src/react-menu3/positionUtils/positionContextMenu.ts +1 -1
- package/src/react-menu3/positionUtils/positionMenu.ts +4 -3
- package/src/react-menu3/style-utils/index.ts +4 -4
- package/src/react-menu3/utils/propTypes2.ts +1 -1
- package/src/react-menu3/utils/utils.ts +3 -2
- package/src/react-menu3/utils/withHovering.tsx +2 -1
- package/src/stories/components/ActionButton.stories.tsx +4 -3
- package/src/stories/grid/FormTest.tsx +4 -7
- package/src/stories/grid/GridFilterButtons.stories.tsx +110 -0
- package/src/stories/grid/GridKeyboardInteractions.stories.tsx +23 -18
- package/src/stories/grid/GridNonEditableRow.stories.tsx +22 -17
- package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +7 -9
- package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +25 -18
- package/src/stories/grid/GridPopoverEditBearing.stories.tsx +14 -11
- package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +22 -15
- package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +20 -15
- package/src/stories/grid/GridReadOnly.stories.tsx +25 -20
- package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +10 -9
- package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +7 -8
- package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +7 -8
- package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +11 -10
- package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +12 -11
- package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +7 -7
- package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +7 -7
- package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +5 -6
- package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +10 -6
- package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +10 -6
- package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +5 -5
- package/src/stories/grid/gridFormStatic/GridFormMultiSelect.stories.tsx +5 -6
- package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +8 -7
- package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +5 -6
- package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +5 -6
- package/src/stories/react-menu/ReactMenu.stories.tsx +3 -2
- package/src/utils/testQuick.ts +1 -0
- package/src/utils/testUtil.ts +2 -1
- package/src/utils/textValidator.test.ts +1 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@linzjs/step-ag-grid",
|
|
3
3
|
"repository": "github:linz/step-ag-grid.git",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "13.0.0",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"aggrid",
|
|
8
8
|
"ag-grid",
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@linzjs/lui": ">=17",
|
|
31
|
+
"ag-grid-community": ">=27",
|
|
32
|
+
"ag-grid-react": ">=27",
|
|
31
33
|
"lodash-es": ">=4",
|
|
32
34
|
"react": ">=17",
|
|
33
35
|
"react-dom": ">=17"
|
|
@@ -84,8 +86,8 @@
|
|
|
84
86
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
85
87
|
"@semantic-release/changelog": "^6.0.2",
|
|
86
88
|
"@semantic-release/git": "^10.0.1",
|
|
87
|
-
"@storybook/addon-interactions": "^6.5.16",
|
|
88
89
|
"@storybook/addon-essentials": "^6.5.16",
|
|
90
|
+
"@storybook/addon-interactions": "^6.5.16",
|
|
89
91
|
"@storybook/builder-webpack5": "^6.5.16",
|
|
90
92
|
"@storybook/jest": "^0.0.10",
|
|
91
93
|
"@storybook/manager-webpack5": "^6.5.16",
|
|
@@ -97,6 +99,7 @@
|
|
|
97
99
|
"@testing-library/jest-dom": "^5.16.5",
|
|
98
100
|
"@testing-library/react": "^12.1.5",
|
|
99
101
|
"@testing-library/user-event": "^13.5.0",
|
|
102
|
+
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
|
|
100
103
|
"@types/debounce-promise": "^3.1.6",
|
|
101
104
|
"@types/jest": "^29.4.0",
|
|
102
105
|
"@types/lodash-es": "^4.17.6",
|
package/src/components/Grid.tsx
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import clsx from "clsx";
|
|
2
|
-
import { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
-
import { AgGridReact } from "ag-grid-react";
|
|
4
1
|
import { CellClickedEvent, ColDef, ModelUpdatedEvent } from "ag-grid-community";
|
|
5
|
-
import {
|
|
2
|
+
import { CellClassParams, EditableCallback, EditableCallbackParams } from "ag-grid-community/dist/lib/entities/colDef";
|
|
6
3
|
import { GridOptions } from "ag-grid-community/dist/lib/entities/gridOptions";
|
|
4
|
+
import { AgGridEvent, CellEvent, GridReadyEvent, SelectionChangedEvent } from "ag-grid-community/dist/lib/events";
|
|
5
|
+
import { AgGridReact } from "ag-grid-react";
|
|
6
|
+
import clsx from "clsx";
|
|
7
7
|
import { difference, isEmpty, last, xorBy } from "lodash-es";
|
|
8
|
+
import { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
9
|
+
|
|
8
10
|
import { GridContext } from "../contexts/GridContext";
|
|
9
|
-
import {
|
|
11
|
+
import { GridUpdatingContext } from "../contexts/GridUpdatingContext";
|
|
10
12
|
import { fnOrVar, isNotEmpty } from "../utils/util";
|
|
13
|
+
import { usePostSortRowsHook } from "./PostSortRowsHook";
|
|
11
14
|
import { GridHeaderSelect } from "./gridHeader/GridHeaderSelect";
|
|
12
|
-
import { GridUpdatingContext } from "../contexts/GridUpdatingContext";
|
|
13
|
-
import { CellClassParams, EditableCallback, EditableCallbackParams } from "ag-grid-community/dist/lib/entities/colDef";
|
|
14
15
|
|
|
15
16
|
export interface GridBaseRow {
|
|
16
17
|
id: string | number;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
import { ColDef, ICellEditorParams, ICellRendererParams } from "ag-grid-community";
|
|
2
|
+
import { SuppressKeyboardEventParams, ValueFormatterParams } from "ag-grid-community/dist/lib/entities/colDef";
|
|
1
3
|
import { forwardRef, useContext } from "react";
|
|
2
|
-
|
|
4
|
+
|
|
5
|
+
import { GridPopoverContextProvider } from "../contexts/GridPopoverContextProvider";
|
|
3
6
|
import { GridUpdatingContext } from "../contexts/GridUpdatingContext";
|
|
7
|
+
import { fnOrVar } from "../utils/util";
|
|
8
|
+
import { GridBaseRow } from "./Grid";
|
|
4
9
|
import { GridCellMultiSelectClassRules } from "./GridCellMultiSelectClassRules";
|
|
10
|
+
import { GridIcon } from "./GridIcon";
|
|
11
|
+
import { GridLoadableCell } from "./GridLoadableCell";
|
|
5
12
|
import {
|
|
6
13
|
GenericCellColDef,
|
|
7
14
|
GenericCellRendererParams,
|
|
8
15
|
RowValueFormatterParams,
|
|
9
16
|
RowValueGetterParams,
|
|
10
17
|
} from "./gridRender/GridRenderGenericCell";
|
|
11
|
-
import { ColDef, ICellEditorParams, ICellRendererParams } from "ag-grid-community";
|
|
12
|
-
import { GridLoadableCell } from "./GridLoadableCell";
|
|
13
|
-
import { GridIcon } from "./GridIcon";
|
|
14
|
-
import { SuppressKeyboardEventParams, ValueFormatterParams } from "ag-grid-community/dist/lib/entities/colDef";
|
|
15
|
-
import { GridPopoverContextProvider } from "../contexts/GridPopoverContextProvider";
|
|
16
|
-
import { fnOrVar } from "../utils/util";
|
|
17
18
|
|
|
18
19
|
export interface GenericCellEditorProps<E> {
|
|
19
20
|
multiEdit?: boolean;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { CellEditorSelectorResult, ValueFormatterParams } from "ag-grid-community/dist/lib/entities/colDef";
|
|
2
|
+
import { ICellEditorParams } from "ag-grid-community/dist/lib/interfaces/iCellEditor";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
|
|
1
5
|
import { GridBaseRow } from "./Grid";
|
|
6
|
+
import { ColDefT, GenericCellEditorComponentWrapper, GridCellRenderer, suppressCellKeyboardEvents } from "./GridCell";
|
|
2
7
|
import { GridCellMultiSelectClassRules } from "./GridCellMultiSelectClassRules";
|
|
3
8
|
import { GenericCellColDef } from "./gridRender/GridRenderGenericCell";
|
|
4
|
-
import { CellEditorSelectorResult, ValueFormatterParams } from "ag-grid-community/dist/lib/entities/colDef";
|
|
5
|
-
import { ColDefT, GenericCellEditorComponentWrapper, GridCellRenderer, suppressCellKeyboardEvents } from "./GridCell";
|
|
6
|
-
import { ComponentProps } from "react";
|
|
7
|
-
import { ICellEditorParams } from "ag-grid-community/dist/lib/interfaces/iCellEditor";
|
|
8
9
|
|
|
9
10
|
export const Editor = <FN extends (param: any) => JSX.Element>(props: {
|
|
10
11
|
multiEdit: boolean;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
2
|
+
|
|
2
3
|
import { GridContext } from "../contexts/GridContext";
|
|
3
|
-
import { GridBaseRow } from "./Grid";
|
|
4
|
-
import { ControlledMenu } from "../react-menu3";
|
|
5
4
|
import { useGridPopoverContext } from "../contexts/GridPopoverContext";
|
|
5
|
+
import { ControlledMenu } from "../react-menu3";
|
|
6
6
|
import { MenuCloseEvent } from "../react-menu3/types";
|
|
7
7
|
import { CloseReason } from "../react-menu3/utils";
|
|
8
|
+
import { GridBaseRow } from "./Grid";
|
|
8
9
|
|
|
9
10
|
export interface GridPopoverHookProps<RowType> {
|
|
10
11
|
className: string | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PostSortRowsParams } from "ag-grid-community/dist/lib/entities/iCallbackParams";
|
|
1
|
+
import { RowNode } from "ag-grid-community";
|
|
3
2
|
import { ColumnState } from "ag-grid-community/dist/lib/columns/columnModel";
|
|
3
|
+
import { PostSortRowsParams } from "ag-grid-community/dist/lib/entities/iCallbackParams";
|
|
4
4
|
import { isEmpty } from "lodash-es";
|
|
5
|
-
import {
|
|
5
|
+
import { useCallback, useContext, useRef } from "react";
|
|
6
|
+
|
|
6
7
|
import { GridContext } from "../contexts/GridContext";
|
|
7
8
|
|
|
8
9
|
interface PostSortRowsHookProps {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import clsx, { ClassValue } from "clsx";
|
|
2
2
|
import { useMemo, useState } from "react";
|
|
3
|
+
|
|
3
4
|
import { LuiButton, LuiButtonGroup } from "@linzjs/lui";
|
|
4
5
|
import { LuiButtonProps } from "@linzjs/lui/dist/components/LuiButton/LuiButton";
|
|
5
|
-
|
|
6
|
+
|
|
6
7
|
import { GridFilterExternal } from "../../contexts/GridContext";
|
|
8
|
+
import { GridBaseRow } from "../Grid";
|
|
7
9
|
import { useGridFilter } from "../GridFilter";
|
|
8
10
|
|
|
9
|
-
interface GridFilterButtonsOption<RowType extends GridBaseRow> {
|
|
11
|
+
export interface GridFilterButtonsOption<RowType extends GridBaseRow> {
|
|
10
12
|
defaultSelected?: boolean;
|
|
11
13
|
filter?: GridFilterExternal<RowType>;
|
|
12
14
|
label: string;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { FocusableItem, MenuDivider, MenuHeader, MenuItem } from "../../react-menu3";
|
|
2
|
-
import { Fragment, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
-
import { GridBaseRow } from "../Grid";
|
|
4
|
-
import { ComponentLoadingWrapper } from "../ComponentLoadingWrapper";
|
|
5
|
-
import { isEmpty } from "lodash-es";
|
|
6
1
|
import debounce from "debounce-promise";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { isEmpty } from "lodash-es";
|
|
3
|
+
import { Fragment, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
+
|
|
9
5
|
import { useGridPopoverContext } from "../../contexts/GridPopoverContext";
|
|
10
6
|
import { GridSubComponentContext } from "../../contexts/GridSubComponentContext";
|
|
11
|
-
import { ClickEvent } from "../../react-menu3/types";
|
|
12
7
|
import { FormError } from "../../lui/FormError";
|
|
13
|
-
import {
|
|
8
|
+
import { FocusableItem, MenuDivider, MenuHeader, MenuItem } from "../../react-menu3";
|
|
9
|
+
import { ClickEvent } from "../../react-menu3/types";
|
|
14
10
|
import { textMatch } from "../../utils/textMatcher";
|
|
11
|
+
import { isNotEmpty } from "../../utils/util";
|
|
12
|
+
import { ComponentLoadingWrapper } from "../ComponentLoadingWrapper";
|
|
13
|
+
import { GridBaseRow } from "../Grid";
|
|
14
|
+
import { CellEditorCommon } from "../GridCell";
|
|
15
|
+
import { useGridPopoverHook } from "../GridPopoverHook";
|
|
15
16
|
|
|
16
17
|
export interface GridPopoutEditDropDownSelectedItem<RowType> {
|
|
17
18
|
// Note the row that was clicked on will be first
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from "react";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { useGridPopoverContext } from "../../contexts/GridPopoverContext";
|
|
3
4
|
import { TextInputFormatted } from "../../lui/TextInputFormatted";
|
|
4
5
|
import { bearingNumberParser, bearingStringValidator } from "../../utils/bearing";
|
|
5
|
-
import {
|
|
6
|
+
import { GridBaseRow } from "../Grid";
|
|
6
7
|
import { CellEditorCommon } from "../GridCell";
|
|
7
|
-
import {
|
|
8
|
+
import { useGridPopoverHook } from "../GridPopoverHook";
|
|
8
9
|
|
|
9
10
|
export interface GridFormEditBearingProps<RowType extends GridBaseRow> extends CellEditorCommon {
|
|
10
11
|
formatValue?: (value: any) => string;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
|
+
|
|
4
|
+
import { useGridPopoverContext } from "../../contexts/GridPopoverContext";
|
|
3
5
|
import { ComponentLoadingWrapper } from "../ComponentLoadingWrapper";
|
|
4
6
|
import { GridBaseRow } from "../Grid";
|
|
5
|
-
import { useGridPopoverHook } from "../GridPopoverHook";
|
|
6
7
|
import { CellEditorCommon } from "../GridCell";
|
|
7
|
-
import {
|
|
8
|
+
import { useGridPopoverHook } from "../GridPopoverHook";
|
|
8
9
|
|
|
9
10
|
export interface GridFormMessageProps<RowType extends GridBaseRow> extends CellEditorCommon {
|
|
10
11
|
message: (selectedRows: RowType[]) => Promise<string | JSX.Element> | string | JSX.Element;
|
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fromPairs, groupBy, isEmpty, pick, toPairs } from "lodash-es";
|
|
2
2
|
import {
|
|
3
|
+
Dispatch,
|
|
4
|
+
Fragment,
|
|
5
|
+
KeyboardEvent,
|
|
6
|
+
SetStateAction,
|
|
3
7
|
useCallback,
|
|
4
8
|
useEffect,
|
|
5
9
|
useMemo,
|
|
6
10
|
useRef,
|
|
7
11
|
useState,
|
|
8
|
-
KeyboardEvent,
|
|
9
|
-
SetStateAction,
|
|
10
|
-
Dispatch,
|
|
11
|
-
Fragment,
|
|
12
12
|
} from "react";
|
|
13
|
-
|
|
14
|
-
import { ComponentLoadingWrapper } from "../ComponentLoadingWrapper";
|
|
15
|
-
import { fromPairs, groupBy, isEmpty, pick, toPairs } from "lodash-es";
|
|
13
|
+
|
|
16
14
|
import { LuiCheckboxInput } from "@linzjs/lui";
|
|
17
|
-
|
|
18
|
-
import { MenuSeparatorString } from "./GridFormDropDown";
|
|
19
|
-
import { CellEditorCommon } from "../GridCell";
|
|
20
|
-
import { ClickEvent } from "../../react-menu3/types";
|
|
21
|
-
import { GridSubComponentContext } from "../../contexts/GridSubComponentContext";
|
|
15
|
+
|
|
22
16
|
import { useGridPopoverContext } from "../../contexts/GridPopoverContext";
|
|
17
|
+
import { GridSubComponentContext } from "../../contexts/GridSubComponentContext";
|
|
23
18
|
import { FormError } from "../../lui/FormError";
|
|
19
|
+
import { FocusableItem, MenuDivider, MenuHeader, MenuItem } from "../../react-menu3";
|
|
20
|
+
import { ClickEvent } from "../../react-menu3/types";
|
|
24
21
|
import { textMatch } from "../../utils/textMatcher";
|
|
22
|
+
import { ComponentLoadingWrapper } from "../ComponentLoadingWrapper";
|
|
23
|
+
import { GridBaseRow } from "../Grid";
|
|
24
|
+
import { CellEditorCommon } from "../GridCell";
|
|
25
25
|
import { GridIcon } from "../GridIcon";
|
|
26
|
+
import { useGridPopoverHook } from "../GridPopoverHook";
|
|
27
|
+
import { MenuSeparatorString } from "./GridFormDropDown";
|
|
26
28
|
|
|
27
29
|
type HeaderGroupType = Record<string, MultiSelectOption[]> | undefined;
|
|
28
30
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { GridBaseRow } from "../Grid";
|
|
2
1
|
import { Fragment, useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import { useGridPopoverHook } from "../GridPopoverHook";
|
|
6
|
-
import { CellEditorCommon } from "../GridCell";
|
|
2
|
+
|
|
3
|
+
import { useGridPopoverContext } from "../../contexts/GridPopoverContext";
|
|
7
4
|
import { GridSubComponentContext } from "../../contexts/GridSubComponentContext";
|
|
5
|
+
import { FocusableItem, MenuDivider, MenuItem } from "../../react-menu3";
|
|
8
6
|
import { ClickEvent } from "../../react-menu3/types";
|
|
9
|
-
import {
|
|
7
|
+
import { ComponentLoadingWrapper } from "../ComponentLoadingWrapper";
|
|
8
|
+
import { GridBaseRow } from "../Grid";
|
|
9
|
+
import { CellEditorCommon } from "../GridCell";
|
|
10
|
+
import { useGridPopoverHook } from "../GridPopoverHook";
|
|
10
11
|
|
|
11
12
|
export interface GridFormPopoverMenuProps<RowType extends GridBaseRow> extends CellEditorCommon {
|
|
12
13
|
options: (selectedRows: RowType[]) => Promise<MenuOption<RowType>[]>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
1
2
|
import { useCallback, useContext, useEffect } from "react";
|
|
3
|
+
|
|
2
4
|
import { GridSubComponentContext } from "../../contexts/GridSubComponentContext";
|
|
3
|
-
import { CellEditorCommon } from "../GridCell";
|
|
4
|
-
import clsx from "clsx";
|
|
5
5
|
import { TextAreaInput } from "../../lui/TextAreaInput";
|
|
6
6
|
import { TextInputValidator, TextInputValidatorProps } from "../../utils/textValidator";
|
|
7
7
|
import { GridBaseRow } from "../Grid";
|
|
8
|
+
import { CellEditorCommon } from "../GridCell";
|
|
8
9
|
|
|
9
10
|
export interface GridSubComponentTextAreaProps<RowType extends GridBaseRow>
|
|
10
11
|
extends TextInputValidatorProps<RowType>,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { useCallback, useContext, useEffect } from "react";
|
|
2
|
+
|
|
2
3
|
import { GridSubComponentContext } from "../../contexts/GridSubComponentContext";
|
|
3
4
|
import { TextInputFormatted } from "../../lui/TextInputFormatted";
|
|
4
5
|
import { TextInputValidator, TextInputValidatorProps } from "../../utils/textValidator";
|
|
5
|
-
import { CellEditorCommon } from "../GridCell";
|
|
6
6
|
import { GridBaseRow } from "../Grid";
|
|
7
|
+
import { CellEditorCommon } from "../GridCell";
|
|
7
8
|
|
|
8
9
|
export interface GridFormSubComponentTextInputProps<RowType extends GridBaseRow>
|
|
9
10
|
extends TextInputValidatorProps<RowType>,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from "react";
|
|
2
|
+
|
|
3
|
+
import { useGridPopoverContext } from "../../contexts/GridPopoverContext";
|
|
2
4
|
import { TextAreaInput } from "../../lui/TextAreaInput";
|
|
3
|
-
import {
|
|
5
|
+
import { TextInputValidator, TextInputValidatorProps } from "../../utils/textValidator";
|
|
4
6
|
import { GridBaseRow } from "../Grid";
|
|
5
7
|
import { CellEditorCommon } from "../GridCell";
|
|
6
|
-
import {
|
|
7
|
-
import { TextInputValidator, TextInputValidatorProps } from "../../utils/textValidator";
|
|
8
|
+
import { useGridPopoverHook } from "../GridPopoverHook";
|
|
8
9
|
|
|
9
10
|
export interface GridFormTextAreaProps<RowType extends GridBaseRow>
|
|
10
11
|
extends TextInputValidatorProps<RowType>,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from "react";
|
|
2
|
+
|
|
3
|
+
import { useGridPopoverContext } from "../../contexts/GridPopoverContext";
|
|
2
4
|
import { TextInputFormatted } from "../../lui/TextInputFormatted";
|
|
3
|
-
import {
|
|
5
|
+
import { TextInputValidator, TextInputValidatorProps } from "../../utils/textValidator";
|
|
4
6
|
import { GridBaseRow } from "../Grid";
|
|
5
7
|
import { CellEditorCommon } from "../GridCell";
|
|
6
|
-
import {
|
|
7
|
-
import { TextInputValidator, TextInputValidatorProps } from "../../utils/textValidator";
|
|
8
|
+
import { useGridPopoverHook } from "../GridPopoverHook";
|
|
8
9
|
|
|
9
10
|
export interface GridFormTextInputProps<RowType extends GridBaseRow>
|
|
10
11
|
extends TextInputValidatorProps<RowType>,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./GridFormDropDown";
|
|
2
|
+
export * from "./GridFormEditBearing";
|
|
3
|
+
export * from "./GridFormMessage";
|
|
4
|
+
export * from "./GridFormMultiSelect";
|
|
5
|
+
export * from "./GridFormPopoverMenu";
|
|
6
|
+
export * from "./GridFormSubComponentTextArea";
|
|
7
|
+
export * from "./GridFormSubComponentTextInput";
|
|
8
|
+
export * from "./GridFormTextArea";
|
|
9
|
+
export * from "./GridFormTextInput";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GridHeaderSelect";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ColDefT, GenericCellEditorProps, GridCell } from "../GridCell";
|
|
2
1
|
import { GridBaseRow } from "../Grid";
|
|
2
|
+
import { ColDefT, GenericCellEditorProps, GridCell } from "../GridCell";
|
|
3
3
|
import { GridFormMultiSelect, GridFormMultiSelectProps } from "../gridForm/GridFormMultiSelect";
|
|
4
4
|
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
5
|
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { ValueFormatterParams } from "ag-grid-community/dist/lib/entities/colDef";
|
|
2
|
+
|
|
1
3
|
import {
|
|
2
4
|
bearingCorrectionRangeValidator,
|
|
3
5
|
bearingCorrectionValueFormatter,
|
|
4
6
|
bearingRangeValidator,
|
|
5
7
|
bearingValueFormatter,
|
|
6
8
|
} from "../../utils/bearing";
|
|
9
|
+
import { GridBaseRow } from "../Grid";
|
|
7
10
|
import { ColDefT, GenericCellEditorProps, GridCell } from "../GridCell";
|
|
8
11
|
import { GridFormEditBearing, GridFormEditBearingProps } from "../gridForm/GridFormEditBearing";
|
|
9
|
-
import { GridBaseRow } from "../Grid";
|
|
10
12
|
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
11
|
-
import { ValueFormatterParams } from "ag-grid-community/dist/lib/entities/colDef";
|
|
12
13
|
|
|
13
14
|
const GridPopoverEditBearingLike = <RowType extends GridBaseRow>(
|
|
14
15
|
colDef: GenericCellColDef<RowType>,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ColDefT, GenericCellEditorProps, GridCell } from "../GridCell";
|
|
2
1
|
import { GridBaseRow } from "../Grid";
|
|
2
|
+
import { ColDefT, GenericCellEditorProps, GridCell } from "../GridCell";
|
|
3
3
|
import { GridFormDropDown, GridFormDropDownProps } from "../gridForm/GridFormDropDown";
|
|
4
4
|
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GridBaseRow } from "../Grid";
|
|
2
2
|
import { ColDefT, GenericCellEditorProps, GridCell } from "../GridCell";
|
|
3
3
|
import { GridFormPopoverMenu, GridFormPopoverMenuProps } from "../gridForm/GridFormPopoverMenu";
|
|
4
|
-
import { GridRenderPopoutMenuCell } from "../gridRender/GridRenderPopoutMenuCell";
|
|
5
4
|
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
|
+
import { GridRenderPopoutMenuCell } from "../gridRender/GridRenderPopoutMenuCell";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Popout burger menu
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { GridBaseRow } from "../Grid";
|
|
1
2
|
import { ColDefT, GenericCellEditorProps, GridCell } from "../GridCell";
|
|
2
3
|
import { GridFormMessage, GridFormMessageProps } from "../gridForm/GridFormMessage";
|
|
3
|
-
import { GridBaseRow } from "../Grid";
|
|
4
4
|
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
5
|
|
|
6
6
|
export const GridPopoverMessage = <RowType extends GridBaseRow>(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ColDefT, GenericCellEditorProps, GridCell } from "../GridCell";
|
|
2
1
|
import { GridBaseRow } from "../Grid";
|
|
2
|
+
import { ColDefT, GenericCellEditorProps, GridCell } from "../GridCell";
|
|
3
3
|
import { GridFormTextArea, GridFormTextAreaProps } from "../gridForm/GridFormTextArea";
|
|
4
4
|
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ColDefT, GenericCellEditorProps, GridCell } from "../GridCell";
|
|
2
1
|
import { GridBaseRow } from "../Grid";
|
|
2
|
+
import { ColDefT, GenericCellEditorProps, GridCell } from "../GridCell";
|
|
3
3
|
import { GridFormTextInput, GridFormTextInputProps } from "../gridForm/GridFormTextInput";
|
|
4
4
|
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
5
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./GridPopoutEditMultiSelect";
|
|
2
|
+
export * from "./GridPopoverMenu";
|
|
3
|
+
export * from "./GridPopoverEditBearing";
|
|
4
|
+
export * from "./GridPopoverEditBearing";
|
|
5
|
+
export * from "./GridPopoverEditDropDown";
|
|
6
|
+
export * from "./GridPopoverMessage";
|
|
7
|
+
export * from "./GridPopoverTextArea";
|
|
8
|
+
export * from "./GridPopoverTextInput";
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ICellRendererParams } from "ag-grid-community";
|
|
2
|
-
import { GridBaseRow } from "../Grid";
|
|
3
|
-
import { ColDefT } from "../GridCell";
|
|
4
2
|
import {
|
|
5
3
|
EditableCallbackParams,
|
|
6
4
|
SuppressKeyboardEventParams,
|
|
@@ -8,6 +6,9 @@ import {
|
|
|
8
6
|
ValueGetterParams,
|
|
9
7
|
} from "ag-grid-community/dist/lib/entities/colDef";
|
|
10
8
|
|
|
9
|
+
import { GridBaseRow } from "../Grid";
|
|
10
|
+
import { ColDefT } from "../GridCell";
|
|
11
|
+
|
|
11
12
|
export interface RowICellRendererParams<RowType extends GridBaseRow> extends ICellRendererParams {
|
|
12
13
|
data: RowType;
|
|
13
14
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./ComponentLoadingWrapper";
|
|
2
|
+
export * from "./Grid";
|
|
3
|
+
export * from "./GridCell";
|
|
4
|
+
export * from "./GridCellMultiEditor";
|
|
5
|
+
export * from "./GridCellMultiSelectClassRules";
|
|
6
|
+
export * from "./gridFilter";
|
|
7
|
+
export * from "./GridFilter";
|
|
8
|
+
export * from "./gridForm";
|
|
9
|
+
export * from "./gridHeader";
|
|
10
|
+
export * from "./GridIcon";
|
|
11
|
+
export * from "./GridLoadableCell";
|
|
12
|
+
export * from "./gridPopoverEdit";
|
|
13
|
+
export * from "./GridPopoverHook";
|
|
14
|
+
export * from "./gridRender";
|
|
15
|
+
export * from "./GridWrapper";
|
|
16
|
+
export * from "./PostSortRowsHook";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { createContext, useContext } from "react";
|
|
2
1
|
import { GridApi, RowNode } from "ag-grid-community";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
|
|
3
4
|
import { GridBaseRow } from "../components/Grid";
|
|
4
5
|
|
|
5
6
|
export type GridFilterExternal<RowType extends GridBaseRow> = (data: RowType, rowNode: RowNode) => boolean;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { ReactElement, ReactNode, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
2
1
|
import { ColDef, GridApi, RowNode } from "ag-grid-community";
|
|
3
|
-
import {
|
|
2
|
+
import { CellPosition } from "ag-grid-community/dist/lib/entities/cellPosition";
|
|
4
3
|
import { debounce, defer, delay, difference, isEmpty, last, remove, sortBy } from "lodash-es";
|
|
4
|
+
import { ReactElement, ReactNode, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
5
|
+
|
|
6
|
+
import { GridBaseRow } from "../components/Grid";
|
|
5
7
|
import { isNotEmpty, wait } from "../utils/util";
|
|
8
|
+
import { GridContext, GridFilterExternal } from "./GridContext";
|
|
6
9
|
import { GridUpdatingContext } from "./GridUpdatingContext";
|
|
7
|
-
import { GridBaseRow } from "../components/Grid";
|
|
8
|
-
import { CellPosition } from "ag-grid-community/dist/lib/entities/cellPosition";
|
|
9
10
|
|
|
10
11
|
interface GridContextProps {
|
|
11
12
|
children: ReactNode;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ReactNode, RefObject, useCallback, useContext, useMemo, useRef, useState } from "react";
|
|
2
|
-
import { GridPopoverContext } from "./GridPopoverContext";
|
|
3
1
|
import { ICellEditorParams } from "ag-grid-community";
|
|
4
|
-
import { GridContext } from "./GridContext";
|
|
5
2
|
import { sortBy } from "lodash-es";
|
|
3
|
+
import { ReactNode, RefObject, useCallback, useContext, useMemo, useRef, useState } from "react";
|
|
4
|
+
|
|
6
5
|
import { GridBaseRow } from "../components/Grid";
|
|
6
|
+
import { GridContext } from "./GridContext";
|
|
7
|
+
import { GridPopoverContext } from "./GridPopoverContext";
|
|
7
8
|
|
|
8
9
|
interface GridPopoverContextProps {
|
|
9
10
|
props: ICellEditorParams;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ReactNode, useRef, useState } from "react";
|
|
2
1
|
import { castArray, flatten, remove } from "lodash-es";
|
|
2
|
+
import { ReactNode, useRef, useState } from "react";
|
|
3
|
+
|
|
3
4
|
import { GridUpdatingContext } from "./GridUpdatingContext";
|
|
4
5
|
|
|
5
6
|
interface UpdatingContextProviderProps {
|