@linzjs/step-ag-grid 1.4.8 → 1.4.10

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/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": "1.4.8",
5
+ "version": "1.4.10",
6
6
  "main": "dist/index.js",
7
7
  "typings": "dist/index.d.ts",
8
8
  "module": "dist/step-ag-grid.esm.js",
@@ -29,7 +29,6 @@
29
29
  "ag-grid-react": ">=27",
30
30
  "debounce-promise": "^3.1.2",
31
31
  "lodash-es": "^4.17.21",
32
- "prop-types": "^15.8.1",
33
32
  "react": ">=17",
34
33
  "react-dom": ">=17",
35
34
  "react-transition-state": "^1.1.5",
@@ -236,7 +236,7 @@ export const ControlledMenuFr = (
236
236
  </div>
237
237
  );
238
238
 
239
- if (portal === true && anchorRef?.current !== undefined) {
239
+ if (portal === true && anchorRef?.current != null) {
240
240
  portal = { target: anchorRef.current.ownerDocument.body } as PortalFieldType;
241
241
  }
242
242
 
@@ -1,9 +1,12 @@
1
1
  import { memo, forwardRef, ForwardedRef } from "react";
2
2
  import { useBEM } from "../hooks";
3
3
  import { menuClass, menuHeaderClass } from "../utils";
4
- import { BaseProps } from "../types";
4
+ import { BasePropsWithChildren } from "../types";
5
5
 
6
- export const MenuHeaderFr = ({ className, ...restProps }: BaseProps, externalRef: ForwardedRef<HTMLLIElement>) => {
6
+ export const MenuHeaderFr = (
7
+ { className, ...restProps }: BasePropsWithChildren,
8
+ externalRef: ForwardedRef<HTMLLIElement>,
9
+ ) => {
7
10
  return (
8
11
  <li
9
12
  role="presentation"
@@ -8,7 +8,7 @@ interface positionMenuProps {
8
8
  offsetX: number;
9
9
  offsetY: number;
10
10
  arrowRef: MutableRefObject<HTMLDivElement | null>;
11
- anchorRef: MutableRefObject<HTMLElement | null>;
11
+ anchorRef: MutableRefObject<Element | null>;
12
12
  arrow?: boolean;
13
13
  direction: MenuDirection;
14
14
  position: "auto" | "anchor" | "initial";
@@ -31,6 +31,14 @@ export interface BaseProps<M = undefined> extends Omit<React.HTMLAttributes<HTML
31
31
  className?: ClassNameProp<M>;
32
32
  }
33
33
 
34
+ export interface BasePropsWithChildren<M = undefined> extends Omit<React.HTMLAttributes<HTMLElement>, "className"> {
35
+ ref?: React.Ref<any>;
36
+ /**
37
+ * Can be a string or a function which receives a modifier object and returns a CSS `class` string.
38
+ */
39
+ className?: ClassNameProp<M>;
40
+ }
41
+
34
42
  export interface Event {
35
43
  /**
36
44
  * The `value` prop passed to the `MenuItem` being clicked.
@@ -397,7 +405,7 @@ export interface ControlledMenuProps extends RootMenuProps, ExtraMenuProps {
397
405
  *
398
406
  * *Don't set this prop for context menu*
399
407
  */
400
- anchorRef?: React.MutableRefObject<HTMLElement>;
408
+ anchorRef?: React.RefObject<Element>;
401
409
  skipOpen?: React.MutableRefObject<boolean>;
402
410
  /**
403
411
  * If `true`, the menu list element will gain focus after menu is open.