@linzjs/step-ag-grid 32.1.1 → 32.3.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.
Files changed (31) hide show
  1. package/dist/src/components/Grid.d.ts +1 -1
  2. package/dist/src/components/gridPopoverEdit/GridEditBoolean.d.ts +1 -0
  3. package/dist/src/components/gridPopoverEdit/GridPopoverEditBearing.d.ts +5 -4
  4. package/dist/src/lui/ActionButton.d.ts +1 -1
  5. package/dist/src/lui/TextInputFormatted.d.ts +1 -0
  6. package/dist/src/lui/TextInputFormatted.test.d.ts +1 -0
  7. package/dist/src/react-menu3/components/ControlledMenu.d.ts +1 -1
  8. package/dist/src/react-menu3/components/MenuRadioGroup.d.ts +1 -1
  9. package/dist/src/react-menu3/components/SubMenu.d.ts +1 -1
  10. package/dist/src/react-menu3/utils/propTypes2.d.ts +12 -12
  11. package/dist/src/react-menu3/utils/utils.d.ts +1 -1
  12. package/dist/src/utils/bearing.d.ts +1 -1
  13. package/dist/src/utils/textValidator.d.ts +1 -0
  14. package/dist/src/utils/useIsomorphicLayoutEffect.d.ts +2 -2
  15. package/dist/step-ag-grid.cjs +6789 -6382
  16. package/dist/step-ag-grid.cjs.map +1 -1
  17. package/dist/step-ag-grid.esm.js +6789 -6383
  18. package/dist/step-ag-grid.esm.js.map +1 -1
  19. package/package.json +27 -28
  20. package/src/components/Grid.tsx +1 -0
  21. package/src/components/gridForm/GridFormSubComponentTextInput.tsx +6 -1
  22. package/src/components/gridForm/GridFormTextInput.tsx +6 -1
  23. package/src/components/gridPopoverEdit/GridEditBoolean.tsx +25 -5
  24. package/src/global.d.ts +1 -0
  25. package/src/lui/TextInputFormatted.test.tsx +22 -0
  26. package/src/lui/TextInputFormatted.tsx +11 -1
  27. package/src/stories/grid/GridPopoutEditBoolean.stories.tsx +94 -30
  28. package/src/utils/textValidator.test.ts +45 -1
  29. package/src/utils/textValidator.ts +21 -0
  30. package/src/utils/util.ts +1 -1
  31. package/dist/vite.config.d.ts +0 -2
@@ -65,4 +65,4 @@ export interface GridProps<TData extends GridBaseRow = GridBaseRow> {
65
65
  /**
66
66
  * Wrapper for AgGrid to add commonly used functionality.
67
67
  */
68
- export declare const Grid: <TData extends GridBaseRow = GridBaseRow>({ theme, "data-testid": dataTestId, suppressReadOnlyStyle, defaultPostSort, rowData, rowHeight, rowSelection, sizeColumns, autoSelectFirstRow, enableRangeSelection, externalSelectedIds, externalSelectedItems, selectColumnPinned, selectable, setExternalSelectedIds, setExternalSelectedItems, singleClickEdit, enableMultilineBulkEdit, contextMenuSelectRow, contextMenu, onCellFocused: paramsOnCellFocused, onColumnMoved, suppressColumnVirtualization, maxInitialWidth, ...params }: GridProps<TData>) => ReactElement;
68
+ export declare const Grid: <TData extends GridBaseRow = GridBaseRow>({ theme, 'data-testid': dataTestId, suppressReadOnlyStyle, defaultPostSort, rowData, rowHeight, rowSelection, sizeColumns, autoSelectFirstRow, enableRangeSelection, externalSelectedIds, externalSelectedItems, selectColumnPinned, selectable, setExternalSelectedIds, setExternalSelectedItems, singleClickEdit, enableMultilineBulkEdit, contextMenuSelectRow, contextMenu, onCellFocused: paramsOnCellFocused, onColumnMoved, suppressColumnVirtualization, maxInitialWidth, ...params }: GridProps<TData>) => ReactElement;
@@ -2,6 +2,7 @@ import { CellEditorCommon } from '../GridCell';
2
2
  import { GenericCellColDef } from '../gridRender';
3
3
  import { ColDefT, GridBaseRow } from '../types';
4
4
  export interface GridEditBooleanEditorProps<TData extends GridBaseRow> extends CellEditorCommon {
5
+ multiEdit?: boolean;
5
6
  onClick: (props: {
6
7
  selectedRows: TData[];
7
8
  selectedRowIds: TData['id'][];
@@ -1,4 +1,5 @@
1
1
  import { ValueFormatterParams } from 'ag-grid-community';
2
+ import { bearingCorrectionRangeValidator, bearingCorrectionValueFormatter, bearingRangeValidator, bearingValueFormatter } from '../../utils/bearing';
2
3
  import { GenericCellEditorProps } from '../GridCell';
3
4
  import { GridFormEditBearingProps } from '../gridForm/GridFormEditBearing';
4
5
  import { GenericCellColDef } from '../gridRender/GridRenderGenericCell';
@@ -6,13 +7,13 @@ import { ColDefT, GridBaseRow } from '../types';
6
7
  export declare const GridCellBearingValueFormatter: (params: ValueFormatterParams) => string;
7
8
  export declare const GridPopoverEditBearingEditorParams: {
8
9
  placeHolder: string;
9
- formatValue: (value: any) => string;
10
- range: (value: number | null) => "Bearing is required" | "Bearing must be less than 360 degrees" | "Bearing must not be negative" | null;
10
+ formatValue: typeof bearingValueFormatter;
11
+ range: typeof bearingRangeValidator;
11
12
  };
12
13
  export declare const GridPopoverEditBearing: <TData extends GridBaseRow, TValue = any>(colDef: GenericCellColDef<TData, TValue>, props: GenericCellEditorProps<GridFormEditBearingProps<TData>>) => ColDefT<TData, TValue>;
13
14
  export declare const GridPopoverEditBearingCorrectionEditorParams: {
14
15
  placeHolder: string;
15
- formatValue: (value: any) => string;
16
- range: (value: number | null) => "Bearing correction is required" | "Bearing correction must be less than 360 degrees" | "Bearing correction must be greater then -180 degrees" | null;
16
+ formatValue: typeof bearingCorrectionValueFormatter;
17
+ range: typeof bearingCorrectionRangeValidator;
17
18
  };
18
19
  export declare const GridPopoverEditBearingCorrection: <TData extends GridBaseRow, TValue = any>(colDef: GenericCellColDef<TData, TValue>, props: GenericCellEditorProps<GridFormEditBearingProps<TData>>) => ColDefT<TData, TValue>;
@@ -18,4 +18,4 @@ export interface ActionButtonProps {
18
18
  style?: CSSProperties;
19
19
  disabled?: boolean;
20
20
  }
21
- export declare const ActionButton: ({ icon, name, inProgressName, disabled, dataTestId, style, className, title, onClick, size, iconPosition, level, intent, "aria-label": ariaLabel, }: ActionButtonProps) => ReactElement;
21
+ export declare const ActionButton: ({ icon, name, inProgressName, disabled, dataTestId, style, className, title, onClick, size, iconPosition, level, intent, 'aria-label': ariaLabel, }: ActionButtonProps) => ReactElement;
@@ -6,5 +6,6 @@ export interface LuiTextInputProps extends DetailedHTMLProps<InputHTMLAttributes
6
6
  error?: ReactElement | string | boolean | null;
7
7
  formatted?: string;
8
8
  allowTabToSave?: boolean;
9
+ validationSummary?: string;
9
10
  }
10
11
  export declare const TextInputFormatted: (props: LuiTextInputProps) => ReactElement;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { ForwardedRef, MutableRefObject } from 'react';
2
2
  import { ControlledMenuProps } from '../types';
3
- export declare const ControlledMenuFr: ({ "aria-label": ariaLabel, className, containerProps, initialMounted, unmountOnClose, transition, transitionTimeout, boundingBoxRef, boundingBoxPadding, reposition, submenuOpenDelay, submenuCloseDelay, skipOpen, viewScroll, portal, theming, onItemClick, onClose, saveButtonRef, ...restProps }: ControlledMenuProps & {
3
+ export declare const ControlledMenuFr: ({ 'aria-label': ariaLabel, className, containerProps, initialMounted, unmountOnClose, transition, transitionTimeout, boundingBoxRef, boundingBoxPadding, reposition, submenuOpenDelay, submenuCloseDelay, skipOpen, viewScroll, portal, theming, onItemClick, onClose, saveButtonRef, ...restProps }: ControlledMenuProps & {
4
4
  saveButtonRef?: MutableRefObject<HTMLButtonElement | null>;
5
5
  }, externalRef: ForwardedRef<HTMLUListElement>) => import("react").JSX.Element | null;
6
6
  export declare const ControlledMenu: import("react").ForwardRefExoticComponent<Omit<ControlledMenuProps & {
@@ -21,5 +21,5 @@ export interface MenuRadioGroupProps extends BaseProps {
21
21
  */
22
22
  onRadioChange?: EventHandler<RadioChangeEvent>;
23
23
  }
24
- export declare const MenuRadioGroupFr: ({ "aria-label": ariaLabel, className, name, value, onRadioChange, ...restProps }: MenuRadioGroupProps, externalRef: ForwardedRef<HTMLUListElement>) => import("react").JSX.Element;
24
+ export declare const MenuRadioGroupFr: ({ 'aria-label': ariaLabel, className, name, value, onRadioChange, ...restProps }: MenuRadioGroupProps, externalRef: ForwardedRef<HTMLUListElement>) => import("react").JSX.Element;
25
25
  export declare const MenuRadioGroup: import("react").ForwardRefExoticComponent<Omit<MenuRadioGroupProps, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
@@ -105,6 +105,6 @@ export interface SubMenuProps extends BaseMenuProps, Hoverable, UncontrolledMenu
105
105
  */
106
106
  openTrigger?: 'none' | 'clickOnly';
107
107
  }
108
- export declare const SubMenuFr: ({ "aria-label": ariaLabel, className, disabled, direction, label, openTrigger, onMenuChange, isHovering, instanceRef, menuItemRef, itemProps, ...restProps }: SubMenuProps) => import("react").JSX.Element;
108
+ export declare const SubMenuFr: ({ 'aria-label': ariaLabel, className, disabled, direction, label, openTrigger, onMenuChange, isHovering, instanceRef, menuItemRef, itemProps, ...restProps }: SubMenuProps) => import("react").JSX.Element;
109
109
  export declare const SubMenu: import("react").ForwardRefExoticComponent<Omit<SubMenuProps, "ref"> & import("react").RefAttributes<any>>;
110
110
  export {};
@@ -3,6 +3,7 @@ export declare const stylePropTypes: (name?: string) => {
3
3
  };
4
4
  export declare const Direction: import("prop-types").Requireable<string>;
5
5
  export declare const menuPropTypes: {
6
+ className: import("prop-types").Requireable<string>;
6
7
  menuStyle: import("prop-types").Requireable<object>;
7
8
  arrowStyle: import("prop-types").Requireable<object>;
8
9
  arrow: import("prop-types").Requireable<boolean>;
@@ -13,9 +14,19 @@ export declare const menuPropTypes: {
13
14
  direction: import("prop-types").Requireable<string>;
14
15
  position: import("prop-types").Requireable<string>;
15
16
  overflow: import("prop-types").Requireable<string>;
16
- className: import("prop-types").Requireable<string>;
17
17
  };
18
18
  export declare const rootMenuPropTypes: {
19
+ className: import("prop-types").Requireable<string>;
20
+ menuStyle: import("prop-types").Requireable<object>;
21
+ arrowStyle: import("prop-types").Requireable<object>;
22
+ arrow: import("prop-types").Requireable<boolean>;
23
+ setDownOverflow: import("prop-types").Requireable<boolean>;
24
+ offsetX: import("prop-types").Requireable<number>;
25
+ offsetY: import("prop-types").Requireable<number>;
26
+ align: import("prop-types").Requireable<string>;
27
+ direction: import("prop-types").Requireable<string>;
28
+ position: import("prop-types").Requireable<string>;
29
+ overflow: import("prop-types").Requireable<string>;
19
30
  containerProps: import("prop-types").Requireable<object>;
20
31
  initialMounted: import("prop-types").Requireable<boolean>;
21
32
  unmountOnClose: import("prop-types").Requireable<boolean>;
@@ -38,17 +49,6 @@ export declare const rootMenuPropTypes: {
38
49
  }>> | null | undefined>>;
39
50
  theming: import("prop-types").Requireable<string>;
40
51
  onItemClick: import("prop-types").Requireable<(...args: any[]) => any>;
41
- menuStyle: import("prop-types").Requireable<object>;
42
- arrowStyle: import("prop-types").Requireable<object>;
43
- arrow: import("prop-types").Requireable<boolean>;
44
- setDownOverflow: import("prop-types").Requireable<boolean>;
45
- offsetX: import("prop-types").Requireable<number>;
46
- offsetY: import("prop-types").Requireable<number>;
47
- align: import("prop-types").Requireable<string>;
48
- direction: import("prop-types").Requireable<string>;
49
- position: import("prop-types").Requireable<string>;
50
- overflow: import("prop-types").Requireable<string>;
51
- className: import("prop-types").Requireable<string>;
52
52
  };
53
53
  export declare const uncontrolledMenuPropTypes: {
54
54
  instanceRef: import("prop-types").Requireable<object>;
@@ -15,7 +15,7 @@ export type TransitionMap = {
15
15
  close?: boolean;
16
16
  item?: boolean;
17
17
  };
18
- export declare const getTransition: (transition: MenuStateOptions["transition"], name: keyof TransitionMap) => boolean;
18
+ export declare const getTransition: (transition: MenuStateOptions['transition'], name: keyof TransitionMap) => boolean;
19
19
  export declare function safeCall<T, R>(fn: (arg?: T) => R, arg?: T): R;
20
20
  export declare function safeCall<T, R>(fn: T, arg: R): T;
21
21
  export declare const getName: (component: Record<string, any>) => any;
@@ -16,4 +16,4 @@ export declare const bearingStringValidator: (value: string, customInvalid?: (va
16
16
  */
17
17
  export declare const convertDDToDMS: (dd: number | null, showPositiveSymbol?: boolean, trailingZeroDp?: 2 | 4 | 5) => string;
18
18
  export declare const bearingRangeValidator: (value: number | null) => "Bearing is required" | "Bearing must be less than 360 degrees" | "Bearing must not be negative" | null;
19
- export declare const bearingCorrectionRangeValidator: (value: number | null) => "Bearing correction is required" | "Bearing correction must be less than 360 degrees" | "Bearing correction must be greater then -180 degrees" | null;
19
+ export declare const bearingCorrectionRangeValidator: (value: number | null) => "Bearing correction is required" | "Bearing correction must be greater then -180 degrees" | "Bearing correction must be less than 360 degrees" | null;
@@ -16,3 +16,4 @@ export interface TextInputValidatorProps<TData extends GridBaseRow> {
16
16
  };
17
17
  }
18
18
  export declare const TextInputValidator: <TData extends GridBaseRow>(props: TextInputValidatorProps<TData>, value: string | null, data: TData, context: any) => string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
19
+ export declare const textInputValidatorPropsToSummary: <TData extends GridBaseRow>(props: TextInputValidatorProps<TData>) => string;
@@ -1,4 +1,4 @@
1
- import { useEffect } from 'react';
1
+ import { useLayoutEffect } from 'react';
2
2
  /**
3
3
  * Copied from usehooks-ts
4
4
  *
@@ -14,4 +14,4 @@ import { useEffect } from 'react';
14
14
  * }, [dependency1, dependency2]);
15
15
  * ```
16
16
  */
17
- export declare const useIsomorphicLayoutEffect: typeof useEffect;
17
+ export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;