@linzjs/step-ag-grid 20.0.0 → 21.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 +9 -9
- package/dist/src/components/Grid.d.ts +80 -80
- package/dist/src/components/GridCell.d.ts +63 -27
- package/dist/src/components/GridCell.test.d.ts +1 -1
- package/dist/src/components/GridCellFiller.d.ts +5 -4
- package/dist/src/components/GridCellMultiEditor.d.ts +18 -18
- package/dist/src/components/GridCellMultiSelectClassRules.d.ts +2 -2
- package/dist/src/components/GridIcon.d.ts +9 -9
- package/dist/src/components/GridLoadableCell.d.ts +1 -1
- package/dist/src/components/GridNoRowsOverlay.d.ts +9 -9
- package/dist/src/components/GridPopoverHook.d.ts +12 -12
- package/dist/src/components/GridWrapper.d.ts +5 -5
- package/dist/src/components/PostSortRowsHook.d.ts +11 -11
- package/dist/src/components/gridFilter/GridFilterButtons.d.ts +16 -16
- package/dist/src/components/gridFilter/GridFilterColumnsToggle.d.ts +5 -5
- package/dist/src/components/gridFilter/GridFilterDownloadCsvButton.d.ts +2 -2
- package/dist/src/components/gridFilter/GridFilterHeaderIconButton.d.ts +11 -11
- package/dist/src/components/gridFilter/GridFilterQuick.d.ts +5 -5
- package/dist/src/components/gridFilter/GridFilters.d.ts +2 -2
- package/dist/src/components/gridFilter/index.d.ts +7 -7
- package/dist/src/components/gridFilter/useGridFilter.d.ts +3 -3
- package/dist/src/components/gridForm/GridFormDropDown.d.ts +37 -37
- package/dist/src/components/gridForm/GridFormEditBearing.d.ts +12 -12
- package/dist/src/components/gridForm/GridFormMessage.d.ts +7 -7
- package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +36 -36
- package/dist/src/components/gridForm/GridFormMultiSelectGrid.d.ts +24 -24
- package/dist/src/components/gridForm/GridFormPopoverMenu.d.ts +36 -36
- package/dist/src/components/gridForm/GridFormSubComponentTextArea.d.ts +12 -12
- package/dist/src/components/gridForm/GridFormSubComponentTextInput.d.ts +11 -11
- package/dist/src/components/gridForm/GridFormTextArea.d.ts +14 -14
- package/dist/src/components/gridForm/GridFormTextInput.d.ts +14 -14
- package/dist/src/components/gridForm/index.d.ts +10 -10
- package/dist/src/components/gridHeader/GridHeaderSelect.d.ts +7 -7
- 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 +19 -19
- package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.d.ts +5 -5
- package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelectGrid.d.ts +5 -5
- package/dist/src/components/gridPopoverEdit/GridPopoverEditBearing.d.ts +16 -16
- package/dist/src/components/gridPopoverEdit/GridPopoverEditDropDown.d.ts +5 -5
- package/dist/src/components/gridPopoverEdit/GridPopoverMenu.d.ts +8 -8
- package/dist/src/components/gridPopoverEdit/GridPopoverMessage.d.ts +5 -5
- package/dist/src/components/gridPopoverEdit/GridPopoverTextArea.d.ts +5 -5
- package/dist/src/components/gridPopoverEdit/GridPopoverTextInput.d.ts +5 -5
- package/dist/src/components/gridPopoverEdit/index.d.ts +9 -9
- package/dist/src/components/gridRender/GridRenderGenericCell.d.ts +16 -37
- package/dist/src/components/gridRender/GridRenderPopoutMenuCell.d.ts +2 -2
- package/dist/src/components/gridRender/index.d.ts +2 -2
- package/dist/src/components/gridUtil.d.ts +3 -3
- package/dist/src/components/index.d.ts +18 -18
- package/dist/src/contexts/GridContext.d.ts +67 -67
- package/dist/src/contexts/GridContextProvider.d.ts +15 -15
- package/dist/src/contexts/GridContextProvider.test.d.ts +1 -1
- package/dist/src/contexts/GridPopoverContext.d.ts +15 -15
- package/dist/src/contexts/GridPopoverContextProvider.d.ts +7 -7
- package/dist/src/contexts/GridSubComponentContext.d.ts +10 -10
- package/dist/src/contexts/GridUpdatingContext.d.ts +8 -8
- package/dist/src/contexts/GridUpdatingContextProvider.d.ts +3 -3
- package/dist/src/index.d.ts +17 -17
- package/dist/src/lui/ActionButton.d.ts +20 -20
- package/dist/src/lui/FormError.d.ts +7 -7
- package/dist/src/lui/TextAreaInput.d.ts +11 -11
- package/dist/src/lui/TextInputFormatted.d.ts +10 -10
- package/dist/src/lui/reactUtils.d.ts +6 -6
- package/dist/src/lui/reactUtils.test.d.ts +1 -1
- package/dist/src/lui/stateDeferredHook.d.ts +4 -4
- package/dist/src/lui/timeoutHook.d.ts +14 -14
- package/dist/src/lui/timeoutHook.test.d.ts +1 -1
- package/dist/src/react-menu3/components/ControlledMenu.d.ts +8 -8
- package/dist/src/react-menu3/components/FocusableItem.d.ts +9 -9
- package/dist/src/react-menu3/components/Menu.d.ts +16 -16
- package/dist/src/react-menu3/components/MenuButton.d.ts +8 -8
- package/dist/src/react-menu3/components/MenuDivider.d.ts +3 -3
- package/dist/src/react-menu3/components/MenuGroup.d.ts +12 -12
- package/dist/src/react-menu3/components/MenuHeader.d.ts +4 -4
- package/dist/src/react-menu3/components/MenuItem.d.ts +59 -59
- package/dist/src/react-menu3/components/MenuList.d.ts +2 -2
- package/dist/src/react-menu3/components/MenuRadioGroup.d.ts +25 -25
- package/dist/src/react-menu3/components/SubMenu.d.ts +110 -110
- package/dist/src/react-menu3/contexts/EventHandlersContext.d.ts +7 -7
- package/dist/src/react-menu3/contexts/HoverItemContext.d.ts +2 -2
- package/dist/src/react-menu3/contexts/ItemSettingsContext.d.ts +5 -5
- package/dist/src/react-menu3/contexts/MenuListContext.d.ts +9 -9
- package/dist/src/react-menu3/contexts/MenuListItemContext.d.ts +11 -11
- package/dist/src/react-menu3/contexts/RadioGroupContext.d.ts +7 -7
- package/dist/src/react-menu3/contexts/SettingsContext.d.ts +20 -20
- package/dist/src/react-menu3/hooks/index.d.ts +9 -9
- package/dist/src/react-menu3/hooks/useBEM.d.ts +10 -10
- package/dist/src/react-menu3/hooks/useCombinedRef.d.ts +2 -2
- package/dist/src/react-menu3/hooks/useIsomorphicLayoutEffect.d.ts +3 -3
- package/dist/src/react-menu3/hooks/useItemEffect.d.ts +2 -2
- package/dist/src/react-menu3/hooks/useItemState.d.ts +7 -7
- package/dist/src/react-menu3/hooks/useItems.d.ts +7 -7
- package/dist/src/react-menu3/hooks/useMenuChange.d.ts +2 -2
- package/dist/src/react-menu3/hooks/useMenuState.d.ts +23 -14
- package/dist/src/react-menu3/hooks/useMenuStateAndFocus.d.ts +2 -2
- package/dist/src/react-menu3/index.d.ts +11 -11
- package/dist/src/react-menu3/positionUtils/getPositionHelpers.d.ts +11 -11
- package/dist/src/react-menu3/positionUtils/index.d.ts +3 -3
- package/dist/src/react-menu3/positionUtils/placeArrowHorizontal.d.ts +8 -8
- package/dist/src/react-menu3/positionUtils/placeArrowVertical.d.ts +8 -8
- package/dist/src/react-menu3/positionUtils/placeLeftorRight.d.ts +19 -19
- package/dist/src/react-menu3/positionUtils/placeToporBottom.d.ts +19 -19
- package/dist/src/react-menu3/positionUtils/positionContextMenu.d.ts +13 -13
- package/dist/src/react-menu3/positionUtils/positionMenu.d.ts +26 -26
- package/dist/src/react-menu3/style-utils/index.d.ts +11 -11
- package/dist/src/react-menu3/types.d.ts +401 -401
- package/dist/src/react-menu3/utils/constants.d.ts +54 -54
- package/dist/src/react-menu3/utils/index.d.ts +3 -3
- package/dist/src/react-menu3/utils/propTypes2.d.ts +56 -56
- package/dist/src/react-menu3/utils/utils.d.ts +37 -37
- package/dist/src/react-menu3/utils/withHovering.d.ts +7 -7
- package/dist/src/utils/bearing.d.ts +19 -19
- package/dist/src/utils/bearing.test.d.ts +1 -1
- package/dist/src/utils/deferredPromise.d.ts +5 -5
- package/dist/src/utils/storybookTestUtil.d.ts +3 -3
- package/dist/src/utils/testQuick.d.ts +62 -62
- package/dist/src/utils/testUtil.d.ts +46 -45
- package/dist/src/utils/textMatcher.d.ts +13 -13
- package/dist/src/utils/textMatcher.test.d.ts +1 -1
- package/dist/src/utils/textValidator.d.ts +18 -18
- package/dist/src/utils/textValidator.test.d.ts +1 -1
- package/dist/src/utils/util.d.ts +8 -8
- package/dist/src/utils/util.test.d.ts +1 -1
- package/dist/step-ag-grid.cjs.js +4652 -4651
- package/dist/step-ag-grid.cjs.js.map +1 -1
- package/dist/step-ag-grid.esm.js +4652 -4651
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/dist/vite.config.d.ts +2 -0
- package/package.json +21 -20
- package/src/components/Grid.tsx +4 -4
- package/src/components/GridCell.test.tsx +2 -3
- package/src/components/GridCell.tsx +75 -23
- package/src/components/GridCellFiller.tsx +2 -1
- package/src/components/GridCellMultiEditor.tsx +9 -9
- package/src/components/GridCellMultiSelectClassRules.tsx +4 -4
- package/src/components/GridPopoverHook.tsx +4 -4
- package/src/components/PostSortRowsHook.ts +2 -2
- package/src/components/gridFilter/GridFilterButtons.tsx +6 -6
- package/src/components/gridFilter/GridFilterColumnsToggle.tsx +2 -5
- package/src/components/gridFilter/GridFilterDownloadCsvButton.tsx +1 -1
- package/src/components/gridFilter/useGridFilter.ts +1 -1
- package/src/components/gridForm/GridFormDropDown.tsx +9 -9
- package/src/components/gridForm/GridFormEditBearing.tsx +5 -5
- package/src/components/gridForm/GridFormMessage.tsx +4 -4
- package/src/components/gridForm/GridFormMultiSelect.tsx +9 -9
- package/src/components/gridForm/GridFormMultiSelectGrid.tsx +11 -11
- package/src/components/gridForm/GridFormPopoverMenu.tsx +13 -13
- package/src/components/gridForm/GridFormSubComponentTextArea.tsx +4 -4
- package/src/components/gridForm/GridFormSubComponentTextInput.tsx +4 -4
- package/src/components/gridForm/GridFormTextArea.tsx +6 -6
- package/src/components/gridForm/GridFormTextInput.tsx +7 -7
- package/src/components/gridHook/useGridContextMenu.tsx +8 -8
- package/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.ts +6 -6
- package/src/components/gridPopoverEdit/GridPopoutEditMultiSelectGrid.ts +6 -6
- package/src/components/gridPopoverEdit/GridPopoverEditBearing.ts +16 -16
- package/src/components/gridPopoverEdit/GridPopoverEditDropDown.ts +6 -6
- package/src/components/gridPopoverEdit/GridPopoverMenu.tsx +5 -5
- package/src/components/gridPopoverEdit/GridPopoverMessage.ts +5 -5
- package/src/components/gridPopoverEdit/GridPopoverTextArea.ts +5 -4
- package/src/components/gridPopoverEdit/GridPopoverTextInput.ts +5 -5
- package/src/components/gridRender/GridRenderGenericCell.tsx +6 -36
- package/src/contexts/GridContext.tsx +7 -7
- package/src/contexts/GridContextProvider.test.tsx +1 -1
- package/src/contexts/GridContextProvider.tsx +10 -10
- package/src/contexts/GridPopoverContext.tsx +6 -6
- package/src/stories/grid/GridDragRow.stories.tsx +4 -4
- package/src/stories/grid/GridNonEditableRow.stories.tsx +2 -3
- package/src/stories/grid/GridPopoutContextMenu.stories.tsx +2 -2
- package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +1 -1
- package/src/stories/grid/GridPopoverEditBearing.stories.tsx +2 -2
- package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +3 -3
- package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +2 -2
- package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +2 -2
- package/src/stories/grid/GridReadOnly.stories.tsx +6 -6
- package/src/stories/grid/GridViewList.stories.tsx +5 -7
- package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +3 -3
- package/src/utils/testUtil.ts +49 -7
- package/src/utils/textValidator.ts +5 -5
- package/src/utils/util.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GridBaseRow } from "../Grid";
|
|
2
|
-
import { ColDefT, GenericCellEditorProps } from "../GridCell";
|
|
3
|
-
import { GridFormTextAreaProps } from "../gridForm/GridFormTextArea";
|
|
4
|
-
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
|
-
export declare const GridPopoverTextArea: <
|
|
1
|
+
import { GridBaseRow } from "../Grid";
|
|
2
|
+
import { ColDefT, GenericCellEditorProps } from "../GridCell";
|
|
3
|
+
import { GridFormTextAreaProps } from "../gridForm/GridFormTextArea";
|
|
4
|
+
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
|
+
export declare const GridPopoverTextArea: <TData extends GridBaseRow, TValue = any>(colDef: GenericCellColDef<TData, TValue>, params: GenericCellEditorProps<GridFormTextAreaProps<TData>>) => ColDefT<TData, TValue>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GridBaseRow } from "../Grid";
|
|
2
|
-
import { ColDefT, GenericCellEditorProps } from "../GridCell";
|
|
3
|
-
import { GridFormTextInputProps } from "../gridForm/GridFormTextInput";
|
|
4
|
-
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
|
-
export declare const GridPopoverTextInput: <
|
|
1
|
+
import { GridBaseRow } from "../Grid";
|
|
2
|
+
import { ColDefT, GenericCellEditorProps } from "../GridCell";
|
|
3
|
+
import { GridFormTextInputProps } from "../gridForm/GridFormTextInput";
|
|
4
|
+
import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
|
|
5
|
+
export declare const GridPopoverTextInput: <TData extends GridBaseRow, TValue = any>(colDef: GenericCellColDef<TData, TValue>, params: GenericCellEditorProps<GridFormTextInputProps<TData>>) => ColDefT<TData, TValue>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from "./GridPopoutEditMultiSelect";
|
|
2
|
-
export * from "./GridPopoutEditMultiSelectGrid";
|
|
3
|
-
export * from "./GridPopoverMenu";
|
|
4
|
-
export * from "./GridPopoverEditBearing";
|
|
5
|
-
export * from "./GridPopoverEditBearing";
|
|
6
|
-
export * from "./GridPopoverEditDropDown";
|
|
7
|
-
export * from "./GridPopoverMessage";
|
|
8
|
-
export * from "./GridPopoverTextArea";
|
|
9
|
-
export * from "./GridPopoverTextInput";
|
|
1
|
+
export * from "./GridPopoutEditMultiSelect";
|
|
2
|
+
export * from "./GridPopoutEditMultiSelectGrid";
|
|
3
|
+
export * from "./GridPopoverMenu";
|
|
4
|
+
export * from "./GridPopoverEditBearing";
|
|
5
|
+
export * from "./GridPopoverEditBearing";
|
|
6
|
+
export * from "./GridPopoverEditDropDown";
|
|
7
|
+
export * from "./GridPopoverMessage";
|
|
8
|
+
export * from "./GridPopoverTextArea";
|
|
9
|
+
export * from "./GridPopoverTextInput";
|
|
@@ -1,37 +1,16 @@
|
|
|
1
|
-
import { ICellRendererParams } from "ag-grid-community";
|
|
2
|
-
import {
|
|
3
|
-
import { ReactElement } from "react";
|
|
4
|
-
import { GridBaseRow } from "../Grid";
|
|
5
|
-
import { ColDefT } from "../GridCell";
|
|
6
|
-
export interface
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
export interface
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
export interface RowValueGetterParams<RowType extends GridBaseRow> extends ValueGetterParams {
|
|
19
|
-
data: RowType;
|
|
20
|
-
}
|
|
21
|
-
export interface GenericCellColDef<RowType extends GridBaseRow> extends ColDefT<RowType> {
|
|
22
|
-
cellRenderer?: (params: RowICellRendererParams<RowType>) => any;
|
|
23
|
-
cellRendererParams?: GenericCellRendererParams<RowType>;
|
|
24
|
-
valueGetter?: string | ((params: RowValueGetterParams<RowType>) => any);
|
|
25
|
-
valueFormatter?: string | ((params: RowValueFormatterParams<RowType>) => string);
|
|
26
|
-
filterValueGetter?: string | ((params: RowValueGetterParams<RowType>) => string);
|
|
27
|
-
editable?: boolean | ((params: RowEditableCallbackParams<RowType>) => boolean);
|
|
28
|
-
exportable?: boolean;
|
|
29
|
-
}
|
|
30
|
-
export interface GenericCellRendererParams<RowType extends GridBaseRow> {
|
|
31
|
-
singleClickEdit?: boolean;
|
|
32
|
-
rightHoverElement?: ReactElement | undefined;
|
|
33
|
-
editAction?: (selectedRows: RowType[]) => void;
|
|
34
|
-
shortcutKeys?: Record<string, ((params: SuppressKeyboardEventParams) => boolean | void) | undefined>;
|
|
35
|
-
warning?: (props: RowICellRendererParams<RowType>) => string | string[] | boolean | null | undefined;
|
|
36
|
-
info?: (props: RowICellRendererParams<RowType>) => string | string[] | boolean | null | undefined;
|
|
37
|
-
}
|
|
1
|
+
import { ICellRendererParams } from "ag-grid-community";
|
|
2
|
+
import { SuppressKeyboardEventParams } from "ag-grid-community";
|
|
3
|
+
import { ReactElement } from "react";
|
|
4
|
+
import { GridBaseRow } from "../Grid";
|
|
5
|
+
import { ColDefT } from "../GridCell";
|
|
6
|
+
export interface GenericCellColDef<TData extends GridBaseRow, TValue = any> extends ColDefT<TData, TValue> {
|
|
7
|
+
exportable?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface GenericCellRendererParams<TData extends GridBaseRow> {
|
|
10
|
+
singleClickEdit?: boolean;
|
|
11
|
+
rightHoverElement?: ReactElement | undefined;
|
|
12
|
+
editAction?: (selectedRows: TData[]) => void;
|
|
13
|
+
shortcutKeys?: Record<string, ((params: SuppressKeyboardEventParams) => boolean | void) | undefined>;
|
|
14
|
+
warning?: (props: ICellRendererParams<TData>) => string | string[] | boolean | null | undefined;
|
|
15
|
+
info?: (props: ICellRendererParams<TData>) => string | string[] | boolean | null | undefined;
|
|
16
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ICellRendererParams } from "ag-grid-community";
|
|
2
|
-
export declare const GridRenderPopoutMenuCell: (props: ICellRendererParams) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { ICellRendererParams } from "ag-grid-community";
|
|
2
|
+
export declare const GridRenderPopoutMenuCell: (props: ICellRendererParams) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./GridRenderGenericCell";
|
|
2
|
-
export * from "./GridRenderPopoutMenuCell";
|
|
1
|
+
export * from "./GridRenderGenericCell";
|
|
2
|
+
export * from "./GridRenderPopoutMenuCell";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ColDef } from "ag-grid-community";
|
|
2
|
-
export declare const getColId: (colDef: ColDef) => string;
|
|
3
|
-
export declare const isFlexColumn: (colDef: ColDef) => boolean;
|
|
1
|
+
import { ColDef } from "ag-grid-community";
|
|
2
|
+
export declare const getColId: (colDef: ColDef) => string;
|
|
3
|
+
export declare const isFlexColumn: (colDef: ColDef) => boolean;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export * from "./ComponentLoadingWrapper";
|
|
2
|
-
export * from "./Grid";
|
|
3
|
-
export * from "./GridCell";
|
|
4
|
-
export * from "./GridCellFiller";
|
|
5
|
-
export * from "./GridCellMultiEditor";
|
|
6
|
-
export * from "./GridCellMultiSelectClassRules";
|
|
7
|
-
export * from "./gridFilter";
|
|
8
|
-
export * from "./gridForm";
|
|
9
|
-
export * from "./gridHeader";
|
|
10
|
-
export * from "./gridHook";
|
|
11
|
-
export * from "./GridIcon";
|
|
12
|
-
export * from "./GridLoadableCell";
|
|
13
|
-
export * from "./GridNoRowsOverlay";
|
|
14
|
-
export * from "./gridPopoverEdit";
|
|
15
|
-
export * from "./GridPopoverHook";
|
|
16
|
-
export * from "./gridRender";
|
|
17
|
-
export * from "./GridWrapper";
|
|
18
|
-
export * from "./PostSortRowsHook";
|
|
1
|
+
export * from "./ComponentLoadingWrapper";
|
|
2
|
+
export * from "./Grid";
|
|
3
|
+
export * from "./GridCell";
|
|
4
|
+
export * from "./GridCellFiller";
|
|
5
|
+
export * from "./GridCellMultiEditor";
|
|
6
|
+
export * from "./GridCellMultiSelectClassRules";
|
|
7
|
+
export * from "./gridFilter";
|
|
8
|
+
export * from "./gridForm";
|
|
9
|
+
export * from "./gridHeader";
|
|
10
|
+
export * from "./gridHook";
|
|
11
|
+
export * from "./GridIcon";
|
|
12
|
+
export * from "./GridLoadableCell";
|
|
13
|
+
export * from "./GridNoRowsOverlay";
|
|
14
|
+
export * from "./gridPopoverEdit";
|
|
15
|
+
export * from "./GridPopoverHook";
|
|
16
|
+
export * from "./gridRender";
|
|
17
|
+
export * from "./GridWrapper";
|
|
18
|
+
export * from "./PostSortRowsHook";
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ColDef, ColumnApi, GridApi, IRowNode } from "ag-grid-community";
|
|
3
|
-
import { CsvExportParams } from "ag-grid-community
|
|
4
|
-
import { ColDefT, GridBaseRow } from "../components";
|
|
5
|
-
export type GridFilterExternal<
|
|
6
|
-
export interface AutoSizeColumnsProps {
|
|
7
|
-
skipHeader?: boolean;
|
|
8
|
-
colIds?: Set<string> | string[];
|
|
9
|
-
userSizedColIds?: Set<string>;
|
|
10
|
-
includeFlex?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export type AutoSizeColumnsResult = {
|
|
13
|
-
width: number;
|
|
14
|
-
} | null;
|
|
15
|
-
export interface GridContextType<
|
|
16
|
-
gridReady: boolean;
|
|
17
|
-
gridRenderState: () => null | "empty" | "rows-visible";
|
|
18
|
-
getColDef: (colId?: string) => ColDef | undefined;
|
|
19
|
-
getColumns: (filter?: keyof ColDef | ((r: ColDef) => boolean | undefined | null | number | string)) => ColDefT<
|
|
20
|
-
getColumnIds: (filter?: keyof ColDef | ((r: ColDef) => boolean | undefined | null | number | string)) => string[];
|
|
21
|
-
setApis: (gridApi: GridApi | undefined, columnApi: ColumnApi | undefined, dataTestId?: string) => void;
|
|
22
|
-
prePopupOps: () => void;
|
|
23
|
-
postPopupOps: () => void;
|
|
24
|
-
setQuickFilter: (quickFilter: string) => void;
|
|
25
|
-
editingCells: () => boolean;
|
|
26
|
-
getSelectedRows: <T extends GridBaseRow>() => T[];
|
|
27
|
-
getFilteredSelectedRows: <T extends GridBaseRow>() => T[];
|
|
28
|
-
getSelectedRowIds: () => number[];
|
|
29
|
-
getFilteredSelectedRowIds: () => number[];
|
|
30
|
-
selectRowsDiff: (updateFn: () => Promise<any>) => Promise<void>;
|
|
31
|
-
selectRowsWithFlashDiff: (updateFn: () => Promise<any>) => Promise<void>;
|
|
32
|
-
selectRowsById: (rowIds?: number[]) => void;
|
|
33
|
-
selectRowsByIdWithFlash: (rowIds?: number[]) => void;
|
|
34
|
-
flashRows: (rowIds?: number[]) => void;
|
|
35
|
-
flashRowsDiff: (updateFn: () => Promise<any>) => Promise<void>;
|
|
36
|
-
focusByRowById: (rowId: number, ifNoCellFocused?: boolean) => void;
|
|
37
|
-
ensureRowVisible: (id: number | string) => boolean;
|
|
38
|
-
ensureSelectedRowIsVisible: () => void;
|
|
39
|
-
getFirstRowId: () => number;
|
|
40
|
-
autoSizeColumns: (props?: AutoSizeColumnsProps) => AutoSizeColumnsResult;
|
|
41
|
-
sizeColumnsToFit: () => void;
|
|
42
|
-
cancelEdit: () => void;
|
|
43
|
-
startCellEditing: ({ rowId, colId }: {
|
|
44
|
-
rowId: number;
|
|
45
|
-
colId: string;
|
|
46
|
-
}) => void;
|
|
47
|
-
stopEditing: () => void;
|
|
48
|
-
updatingCells: (props: {
|
|
49
|
-
selectedRows: GridBaseRow[];
|
|
50
|
-
field?: string;
|
|
51
|
-
}, fnUpdate: (selectedRows: any[]) => Promise<boolean>, setSaving?: (saving: boolean) => void, tabDirection?: 1 | 0 | -1) => Promise<boolean>;
|
|
52
|
-
redrawRows: (rowNodes?: IRowNode[]) => void;
|
|
53
|
-
externallySelectedItemsAreInSync: boolean;
|
|
54
|
-
setExternallySelectedItemsAreInSync: (inSync: boolean) => void;
|
|
55
|
-
waitForExternallySelectedItemsToBeInSync: () => Promise<void>;
|
|
56
|
-
addExternalFilter: (filter: GridFilterExternal<
|
|
57
|
-
removeExternalFilter: (filter: GridFilterExternal<
|
|
58
|
-
isExternalFilterPresent: () => boolean;
|
|
59
|
-
doesExternalFilterPass: (node: IRowNode) => boolean;
|
|
60
|
-
invisibleColumnIds: string[] | undefined;
|
|
61
|
-
setInvisibleColumnIds: (colIds: string[]) => void;
|
|
62
|
-
downloadCsv: (csvExportParams?: CsvExportParams) => void;
|
|
63
|
-
setOnCellEditingComplete: (callback: (() => void) | undefined) => void;
|
|
64
|
-
showNoRowsOverlay: () => void;
|
|
65
|
-
}
|
|
66
|
-
export declare const GridContext: import("react").Context<GridContextType<any>>;
|
|
67
|
-
export declare const useGridContext: <
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ColDef, ColumnApi, GridApi, IRowNode } from "ag-grid-community";
|
|
3
|
+
import { CsvExportParams } from "ag-grid-community";
|
|
4
|
+
import { ColDefT, GridBaseRow } from "../components";
|
|
5
|
+
export type GridFilterExternal<TData extends GridBaseRow> = (data: TData, rowNode: IRowNode) => boolean;
|
|
6
|
+
export interface AutoSizeColumnsProps {
|
|
7
|
+
skipHeader?: boolean;
|
|
8
|
+
colIds?: Set<string> | string[];
|
|
9
|
+
userSizedColIds?: Set<string>;
|
|
10
|
+
includeFlex?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type AutoSizeColumnsResult = {
|
|
13
|
+
width: number;
|
|
14
|
+
} | null;
|
|
15
|
+
export interface GridContextType<TData extends GridBaseRow> {
|
|
16
|
+
gridReady: boolean;
|
|
17
|
+
gridRenderState: () => null | "empty" | "rows-visible";
|
|
18
|
+
getColDef: (colId?: string) => ColDef | undefined;
|
|
19
|
+
getColumns: (filter?: keyof ColDef | ((r: ColDef) => boolean | undefined | null | number | string)) => ColDefT<TData, any>[];
|
|
20
|
+
getColumnIds: (filter?: keyof ColDef | ((r: ColDef) => boolean | undefined | null | number | string)) => string[];
|
|
21
|
+
setApis: (gridApi: GridApi | undefined, columnApi: ColumnApi | undefined, dataTestId?: string) => void;
|
|
22
|
+
prePopupOps: () => void;
|
|
23
|
+
postPopupOps: () => void;
|
|
24
|
+
setQuickFilter: (quickFilter: string) => void;
|
|
25
|
+
editingCells: () => boolean;
|
|
26
|
+
getSelectedRows: <T extends GridBaseRow>() => T[];
|
|
27
|
+
getFilteredSelectedRows: <T extends GridBaseRow>() => T[];
|
|
28
|
+
getSelectedRowIds: () => number[];
|
|
29
|
+
getFilteredSelectedRowIds: () => number[];
|
|
30
|
+
selectRowsDiff: (updateFn: () => Promise<any>) => Promise<void>;
|
|
31
|
+
selectRowsWithFlashDiff: (updateFn: () => Promise<any>) => Promise<void>;
|
|
32
|
+
selectRowsById: (rowIds?: number[]) => void;
|
|
33
|
+
selectRowsByIdWithFlash: (rowIds?: number[]) => void;
|
|
34
|
+
flashRows: (rowIds?: number[]) => void;
|
|
35
|
+
flashRowsDiff: (updateFn: () => Promise<any>) => Promise<void>;
|
|
36
|
+
focusByRowById: (rowId: number, ifNoCellFocused?: boolean) => void;
|
|
37
|
+
ensureRowVisible: (id: number | string) => boolean;
|
|
38
|
+
ensureSelectedRowIsVisible: () => void;
|
|
39
|
+
getFirstRowId: () => number;
|
|
40
|
+
autoSizeColumns: (props?: AutoSizeColumnsProps) => AutoSizeColumnsResult;
|
|
41
|
+
sizeColumnsToFit: () => void;
|
|
42
|
+
cancelEdit: () => void;
|
|
43
|
+
startCellEditing: ({ rowId, colId }: {
|
|
44
|
+
rowId: number;
|
|
45
|
+
colId: string;
|
|
46
|
+
}) => void;
|
|
47
|
+
stopEditing: () => void;
|
|
48
|
+
updatingCells: (props: {
|
|
49
|
+
selectedRows: GridBaseRow[];
|
|
50
|
+
field?: string;
|
|
51
|
+
}, fnUpdate: (selectedRows: any[]) => Promise<boolean>, setSaving?: (saving: boolean) => void, tabDirection?: 1 | 0 | -1) => Promise<boolean>;
|
|
52
|
+
redrawRows: (rowNodes?: IRowNode[]) => void;
|
|
53
|
+
externallySelectedItemsAreInSync: boolean;
|
|
54
|
+
setExternallySelectedItemsAreInSync: (inSync: boolean) => void;
|
|
55
|
+
waitForExternallySelectedItemsToBeInSync: () => Promise<void>;
|
|
56
|
+
addExternalFilter: (filter: GridFilterExternal<TData>) => void;
|
|
57
|
+
removeExternalFilter: (filter: GridFilterExternal<TData>) => void;
|
|
58
|
+
isExternalFilterPresent: () => boolean;
|
|
59
|
+
doesExternalFilterPass: (node: IRowNode) => boolean;
|
|
60
|
+
invisibleColumnIds: string[] | undefined;
|
|
61
|
+
setInvisibleColumnIds: (colIds: string[]) => void;
|
|
62
|
+
downloadCsv: (csvExportParams?: CsvExportParams) => void;
|
|
63
|
+
setOnCellEditingComplete: (callback: (() => void) | undefined) => void;
|
|
64
|
+
showNoRowsOverlay: () => void;
|
|
65
|
+
}
|
|
66
|
+
export declare const GridContext: import("react").Context<GridContextType<any>>;
|
|
67
|
+
export declare const useGridContext: <TData extends GridBaseRow>() => GridContextType<TData>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ProcessCellForExportParams } from "ag-grid-community
|
|
2
|
-
import { PropsWithChildren, ReactElement } from "react";
|
|
3
|
-
import { GridBaseRow } from "../components";
|
|
4
|
-
/**
|
|
5
|
-
* Context for AgGrid operations.
|
|
6
|
-
* Make sure you wrap AgGrid in this.
|
|
7
|
-
* Also, make sure the provider is created in a separate component, otherwise it won't be found.
|
|
8
|
-
*/
|
|
9
|
-
export declare const GridContextProvider: <
|
|
10
|
-
/**
|
|
11
|
-
* Aggrid defaults to using getters and ignores formatters.
|
|
12
|
-
* step-ag-grid by default has a valueFormatter for every column that defaults to the getter if no valueFormatter
|
|
13
|
-
* This function uses valueFormatter by default
|
|
14
|
-
*/
|
|
15
|
-
export declare const downloadCsvUseValueFormattersProcessCellCallback: (params: ProcessCellForExportParams) => string;
|
|
1
|
+
import { ProcessCellForExportParams } from "ag-grid-community";
|
|
2
|
+
import { PropsWithChildren, ReactElement } from "react";
|
|
3
|
+
import { GridBaseRow } from "../components";
|
|
4
|
+
/**
|
|
5
|
+
* Context for AgGrid operations.
|
|
6
|
+
* Make sure you wrap AgGrid in this.
|
|
7
|
+
* Also, make sure the provider is created in a separate component, otherwise it won't be found.
|
|
8
|
+
*/
|
|
9
|
+
export declare const GridContextProvider: <TData extends GridBaseRow>(props: PropsWithChildren) => ReactElement;
|
|
10
|
+
/**
|
|
11
|
+
* Aggrid defaults to using getters and ignores formatters.
|
|
12
|
+
* step-ag-grid by default has a valueFormatter for every column that defaults to the getter if no valueFormatter
|
|
13
|
+
* This function uses valueFormatter by default
|
|
14
|
+
*/
|
|
15
|
+
export declare const downloadCsvUseValueFormattersProcessCellCallback: (params: ProcessCellForExportParams) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { RefObject } from "react";
|
|
2
|
-
import { GridBaseRow } from "../components/Grid";
|
|
3
|
-
export interface GridPopoverContextType<
|
|
4
|
-
anchorRef: RefObject<Element>;
|
|
5
|
-
saving: boolean;
|
|
6
|
-
setSaving: (saving: boolean) => void;
|
|
7
|
-
field: keyof
|
|
8
|
-
value: any;
|
|
9
|
-
data:
|
|
10
|
-
selectedRows:
|
|
11
|
-
updateValue: (saveFn: (selectedRows: any[]) => Promise<boolean>, tabDirection: 1 | 0 | -1) => Promise<boolean>;
|
|
12
|
-
formatValue: (value: any) => any;
|
|
13
|
-
}
|
|
14
|
-
export declare const GridPopoverContext: import("react").Context<GridPopoverContextType<any>>;
|
|
15
|
-
export declare const useGridPopoverContext: <
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
import { GridBaseRow } from "../components/Grid";
|
|
3
|
+
export interface GridPopoverContextType<TData extends GridBaseRow> {
|
|
4
|
+
anchorRef: RefObject<Element>;
|
|
5
|
+
saving: boolean;
|
|
6
|
+
setSaving: (saving: boolean) => void;
|
|
7
|
+
field: keyof TData;
|
|
8
|
+
value: any;
|
|
9
|
+
data: TData;
|
|
10
|
+
selectedRows: TData[];
|
|
11
|
+
updateValue: (saveFn: (selectedRows: any[]) => Promise<boolean>, tabDirection: 1 | 0 | -1) => Promise<boolean>;
|
|
12
|
+
formatValue: (value: any) => any;
|
|
13
|
+
}
|
|
14
|
+
export declare const GridPopoverContext: import("react").Context<GridPopoverContextType<any>>;
|
|
15
|
+
export declare const useGridPopoverContext: <TData extends GridBaseRow>() => GridPopoverContextType<TData>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ICellEditorParams } from "ag-grid-community";
|
|
2
|
-
import { PropsWithChildren } from "react";
|
|
3
|
-
interface GridPopoverContextProps {
|
|
4
|
-
props: ICellEditorParams;
|
|
5
|
-
}
|
|
6
|
-
export declare const GridPopoverContextProvider: ({ props, children }: PropsWithChildren<GridPopoverContextProps>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
1
|
+
import { ICellEditorParams } from "ag-grid-community";
|
|
2
|
+
import { PropsWithChildren } from "react";
|
|
3
|
+
interface GridPopoverContextProps {
|
|
4
|
+
props: ICellEditorParams;
|
|
5
|
+
}
|
|
6
|
+
export declare const GridPopoverContextProvider: ({ props, children }: PropsWithChildren<GridPopoverContextProps>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface GridSubComponentContextType {
|
|
3
|
-
value: any;
|
|
4
|
-
data: any;
|
|
5
|
-
setValue: (value: string) => void;
|
|
6
|
-
setValid: (valid: boolean) => void;
|
|
7
|
-
triggerSave: () => Promise<void>;
|
|
8
|
-
context: any;
|
|
9
|
-
}
|
|
10
|
-
export declare const GridSubComponentContext: import("react").Context<GridSubComponentContextType>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface GridSubComponentContextType {
|
|
3
|
+
value: any;
|
|
4
|
+
data: any;
|
|
5
|
+
setValue: (value: string) => void;
|
|
6
|
+
setValid: (valid: boolean) => void;
|
|
7
|
+
triggerSave: () => Promise<void>;
|
|
8
|
+
context: any;
|
|
9
|
+
}
|
|
10
|
+
export declare const GridSubComponentContext: import("react").Context<GridSubComponentContextType>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export type GridUpdatingContextType = {
|
|
3
|
-
checkUpdating: (fields: string | string[], id: number | string) => boolean;
|
|
4
|
-
modifyUpdating: (fields: string | string[], ids: (number | string)[], fn: () => void | Promise<void>) => Promise<void>;
|
|
5
|
-
updatedDep: number;
|
|
6
|
-
updatingCols: () => string[];
|
|
7
|
-
};
|
|
8
|
-
export declare const GridUpdatingContext: import("react").Context<GridUpdatingContextType>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type GridUpdatingContextType = {
|
|
3
|
+
checkUpdating: (fields: string | string[], id: number | string) => boolean;
|
|
4
|
+
modifyUpdating: (fields: string | string[], ids: (number | string)[], fn: () => void | Promise<void>) => Promise<void>;
|
|
5
|
+
updatedDep: number;
|
|
6
|
+
updatingCols: () => string[];
|
|
7
|
+
};
|
|
8
|
+
export declare const GridUpdatingContext: import("react").Context<GridUpdatingContextType>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PropsWithChildren } from "react";
|
|
2
|
-
export type GridUpdatingContextStatus = Record<string, (number | string)[] | undefined>;
|
|
3
|
-
export declare const GridUpdatingContextProvider: (props: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
export type GridUpdatingContextStatus = Record<string, (number | string)[] | undefined>;
|
|
3
|
+
export declare const GridUpdatingContextProvider: (props: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export * from "./components";
|
|
2
|
-
export * from "./contexts/GridContext";
|
|
3
|
-
export * from "./contexts/GridContextProvider";
|
|
4
|
-
export * from "./contexts/GridUpdatingContext";
|
|
5
|
-
export * from "./contexts/GridUpdatingContextProvider";
|
|
6
|
-
export * from "./contexts/GridPopoverContext";
|
|
7
|
-
export * from "./contexts/GridPopoverContextProvider";
|
|
8
|
-
export * from "./contexts/GridSubComponentContext";
|
|
9
|
-
export * from "./lui/ActionButton";
|
|
10
|
-
export * from "./lui/FormError";
|
|
11
|
-
export * from "./lui/TextAreaInput";
|
|
12
|
-
export * from "./lui/TextInputFormatted";
|
|
13
|
-
export * from "./react-menu3/index";
|
|
14
|
-
export * from "./react-menu3/types";
|
|
15
|
-
export * from "./utils/bearing";
|
|
16
|
-
export * from "./utils/util";
|
|
17
|
-
export * from "./utils/deferredPromise";
|
|
1
|
+
export * from "./components";
|
|
2
|
+
export * from "./contexts/GridContext";
|
|
3
|
+
export * from "./contexts/GridContextProvider";
|
|
4
|
+
export * from "./contexts/GridUpdatingContext";
|
|
5
|
+
export * from "./contexts/GridUpdatingContextProvider";
|
|
6
|
+
export * from "./contexts/GridPopoverContext";
|
|
7
|
+
export * from "./contexts/GridPopoverContextProvider";
|
|
8
|
+
export * from "./contexts/GridSubComponentContext";
|
|
9
|
+
export * from "./lui/ActionButton";
|
|
10
|
+
export * from "./lui/FormError";
|
|
11
|
+
export * from "./lui/TextAreaInput";
|
|
12
|
+
export * from "./lui/TextInputFormatted";
|
|
13
|
+
export * from "./react-menu3/index";
|
|
14
|
+
export * from "./react-menu3/types";
|
|
15
|
+
export * from "./utils/bearing";
|
|
16
|
+
export * from "./utils/util";
|
|
17
|
+
export * from "./utils/deferredPromise";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import "./ActionButton.scss";
|
|
2
|
-
import { CSSProperties, ReactElement } from "react";
|
|
3
|
-
import { LuiButtonProps } from "@linzjs/lui/dist/components/LuiButton/LuiButton";
|
|
4
|
-
import { IconName } from "@linzjs/lui/dist/components/LuiIcon/LuiIcon";
|
|
5
|
-
export interface ActionButtonProps {
|
|
6
|
-
icon: IconName;
|
|
7
|
-
name?: string;
|
|
8
|
-
"aria-label"?: string;
|
|
9
|
-
inProgressName?: string;
|
|
10
|
-
title?: string;
|
|
11
|
-
dataTestId?: string;
|
|
12
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | "ns";
|
|
13
|
-
iconPosition?: "left" | "right";
|
|
14
|
-
className?: "ActionButton-fill" | "ActionButton-tight" | string;
|
|
15
|
-
onClick: () => Promise<void> | void;
|
|
16
|
-
level?: LuiButtonProps["level"];
|
|
17
|
-
style?: CSSProperties;
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export declare const ActionButton: ({ icon, name, inProgressName, disabled, dataTestId, style, className, title, onClick, size, iconPosition, level, "aria-label": ariaLabel, }: ActionButtonProps) => ReactElement;
|
|
1
|
+
import "./ActionButton.scss";
|
|
2
|
+
import { CSSProperties, ReactElement } from "react";
|
|
3
|
+
import { LuiButtonProps } from "@linzjs/lui/dist/components/LuiButton/LuiButton";
|
|
4
|
+
import { IconName } from "@linzjs/lui/dist/components/LuiIcon/LuiIcon";
|
|
5
|
+
export interface ActionButtonProps {
|
|
6
|
+
icon: IconName;
|
|
7
|
+
name?: string;
|
|
8
|
+
"aria-label"?: string;
|
|
9
|
+
inProgressName?: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
dataTestId?: string;
|
|
12
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "ns";
|
|
13
|
+
iconPosition?: "left" | "right";
|
|
14
|
+
className?: "ActionButton-fill" | "ActionButton-tight" | string;
|
|
15
|
+
onClick: () => Promise<void> | void;
|
|
16
|
+
level?: LuiButtonProps["level"];
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const ActionButton: ({ icon, name, inProgressName, disabled, dataTestId, style, className, title, onClick, size, iconPosition, level, "aria-label": ariaLabel, }: ActionButtonProps) => ReactElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./FormError.scss";
|
|
2
|
-
import { ReactElement } from "react";
|
|
3
|
-
export interface FormErrorProps {
|
|
4
|
-
helpText?: string;
|
|
5
|
-
error?: ReactElement | string | boolean | null;
|
|
6
|
-
}
|
|
7
|
-
export declare const FormError: (props: FormErrorProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import "./FormError.scss";
|
|
2
|
+
import { ReactElement } from "react";
|
|
3
|
+
export interface FormErrorProps {
|
|
4
|
+
helpText?: string;
|
|
5
|
+
error?: ReactElement | string | boolean | null;
|
|
6
|
+
}
|
|
7
|
+
export declare const FormError: (props: FormErrorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { InputHTMLAttributes, ReactElement } from "react";
|
|
2
|
-
export declare const useGenerateOrDefaultId: (idFromProps?: string) => string;
|
|
3
|
-
export interface LuiTextAreaInputProps extends InputHTMLAttributes<HTMLTextAreaElement> {
|
|
4
|
-
value: string;
|
|
5
|
-
label?: ReactElement | string;
|
|
6
|
-
mandatory?: boolean;
|
|
7
|
-
helpText?: string;
|
|
8
|
-
error?: ReactElement | string | boolean | null;
|
|
9
|
-
allowTabToSave?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const TextAreaInput: (props: LuiTextAreaInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { InputHTMLAttributes, ReactElement } from "react";
|
|
2
|
+
export declare const useGenerateOrDefaultId: (idFromProps?: string) => string;
|
|
3
|
+
export interface LuiTextAreaInputProps extends InputHTMLAttributes<HTMLTextAreaElement> {
|
|
4
|
+
value: string;
|
|
5
|
+
label?: ReactElement | string;
|
|
6
|
+
mandatory?: boolean;
|
|
7
|
+
helpText?: string;
|
|
8
|
+
error?: ReactElement | string | boolean | null;
|
|
9
|
+
allowTabToSave?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const TextAreaInput: (props: LuiTextAreaInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./TextInputFormatted.scss";
|
|
2
|
-
import { DetailedHTMLProps, InputHTMLAttributes, ReactElement } from "react";
|
|
3
|
-
export interface LuiTextInputProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
4
|
-
value: string;
|
|
5
|
-
helpText?: string;
|
|
6
|
-
error?: ReactElement | string | boolean | null;
|
|
7
|
-
formatted?: string;
|
|
8
|
-
allowTabToSave?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const TextInputFormatted: (props: LuiTextInputProps) => ReactElement;
|
|
1
|
+
import "./TextInputFormatted.scss";
|
|
2
|
+
import { DetailedHTMLProps, InputHTMLAttributes, ReactElement } from "react";
|
|
3
|
+
export interface LuiTextInputProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
4
|
+
value: string;
|
|
5
|
+
helpText?: string;
|
|
6
|
+
error?: ReactElement | string | boolean | null;
|
|
7
|
+
formatted?: string;
|
|
8
|
+
allowTabToSave?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const TextInputFormatted: (props: LuiTextInputProps) => ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Track previous values of states.
|
|
3
|
-
*
|
|
4
|
-
* @param value Value to track.
|
|
5
|
-
*/
|
|
6
|
-
export declare const usePrevious: <T extends unknown>(value: T) => T | undefined;
|
|
1
|
+
/**
|
|
2
|
+
* Track previous values of states.
|
|
3
|
+
*
|
|
4
|
+
* @param value Value to track.
|
|
5
|
+
*/
|
|
6
|
+
export declare const usePrevious: <T extends unknown>(value: T) => T | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Defers state change up to a minimum time since last state change.
|
|
3
|
-
*/
|
|
4
|
-
export declare const useStateDeferred: <T extends unknown>(initialValue: T) => [T, (v: T) => void, (v: T, w: number) => void];
|
|
1
|
+
/**
|
|
2
|
+
* Defers state change up to a minimum time since last state change.
|
|
3
|
+
*/
|
|
4
|
+
export declare const useStateDeferred: <T extends unknown>(initialValue: T) => [T, (v: T) => void, (v: T, w: number) => void];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cancels timeouts on scope being destroyed.
|
|
3
|
-
*
|
|
4
|
-
* This could almost be a debounce, but debounce tracks by function reference, this tracks by hook reference.
|
|
5
|
-
* This could have been implemented using debounce if the callers function was wrapped in useCallback,
|
|
6
|
-
* but there's no way to enforce that, so it would lead to bugs.
|
|
7
|
-
*/
|
|
8
|
-
export declare const useTimeoutHook: () => (fn: () => void, waitTimeMs: number) => void;
|
|
9
|
-
interface IntervalHookProps {
|
|
10
|
-
timeoutMs: number;
|
|
11
|
-
callback: () => void;
|
|
12
|
-
}
|
|
13
|
-
export declare const useIntervalHook: ({ callback, timeoutMs }: IntervalHookProps) => void;
|
|
14
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* Cancels timeouts on scope being destroyed.
|
|
3
|
+
*
|
|
4
|
+
* This could almost be a debounce, but debounce tracks by function reference, this tracks by hook reference.
|
|
5
|
+
* This could have been implemented using debounce if the callers function was wrapped in useCallback,
|
|
6
|
+
* but there's no way to enforce that, so it would lead to bugs.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useTimeoutHook: () => (fn: () => void, waitTimeMs: number) => void;
|
|
9
|
+
interface IntervalHookProps {
|
|
10
|
+
timeoutMs: number;
|
|
11
|
+
callback: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const useIntervalHook: ({ callback, timeoutMs }: IntervalHookProps) => void;
|
|
14
|
+
export {};
|