@linzjs/step-ag-grid 17.1.0 → 17.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.
package/README.md CHANGED
@@ -266,7 +266,7 @@ test("click Delete menu option removes row from the table", async () => {
266
266
  await screen.findByText("My component header");
267
267
  expect((await findRow(12345)).getAttribute("row-index")).toBe("1");
268
268
  await openAndClickMenuOption(12345, "actions", "Delete");
269
- await waitFor(async () => expect((await queryRow(12345)).not.toBeDefined());
269
+ await waitFor(async () => expect((await queryRow(12345)).not.toBeDefined()));
270
270
  });
271
271
  ```
272
272
 
@@ -278,4 +278,3 @@ This will throw an exception if the row id is not found.
278
278
  ```tsx
279
279
  window.__stepAgGrid.grids[dataTestId].scrollRowIntoViewById("1000")
280
280
  ```
281
-
@@ -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, closeMenuExclusionClassName, ...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> | undefined;
5
5
  }, externalRef: ForwardedRef<HTMLUListElement>) => import("react/jsx-runtime").JSX.Element | null;
6
6
  export declare const ControlledMenu: import("react").ForwardRefExoticComponent<Omit<ControlledMenuProps & {
@@ -397,9 +397,5 @@ export interface ControlledMenuProps extends RootMenuProps, ExtraMenuProps {
397
397
  * Event fired when menu is about to close.
398
398
  */
399
399
  onClose?: EventHandler<MenuCloseEvent>;
400
- /**
401
- * When clicking outside the menu to close, anything with this class will not cause a close.
402
- */
403
- closeMenuExclusionClassName?: string;
404
400
  }
405
401
  export {};
@@ -1709,7 +1709,7 @@ const MenuList = ({ ariaLabel, menuClassName, menuStyle, arrowClassName, arrowSt
1709
1709
  }, ref: arrowRef })), jsxRuntime.jsx(MenuListContext.Provider, { value: listContext, children: jsxRuntime.jsx(MenuListItemContext.Provider, { value: itemContext, children: jsxRuntime.jsx(HoverItemContext.Provider, { value: hoverItem, children: children }) }) })] }));
1710
1710
  };
1711
1711
 
1712
- const ControlledMenuFr = ({ "aria-label": ariaLabel, className, containerProps, initialMounted, unmountOnClose, transition, transitionTimeout, boundingBoxRef, boundingBoxPadding, reposition = "auto", submenuOpenDelay = 300, submenuCloseDelay = 150, skipOpen, viewScroll = "initial", portal, theming, onItemClick, onClose, saveButtonRef, closeMenuExclusionClassName, ...restProps }, externalRef) => {
1712
+ const ControlledMenuFr = ({ "aria-label": ariaLabel, className, containerProps, initialMounted, unmountOnClose, transition, transitionTimeout, boundingBoxRef, boundingBoxPadding, reposition = "auto", submenuOpenDelay = 300, submenuCloseDelay = 150, skipOpen, viewScroll = "initial", portal, theming, onItemClick, onClose, saveButtonRef, ...restProps }, externalRef) => {
1713
1713
  const containerRef = React.useRef();
1714
1714
  const scrollNodesRef = React.useRef({});
1715
1715
  const { anchorRef, state } = restProps;
@@ -1736,8 +1736,7 @@ const ControlledMenuFr = ({ "aria-label": ariaLabel, className, containerProps,
1736
1736
  reposition,
1737
1737
  viewScroll,
1738
1738
  ]);
1739
- const isWithinMenu = React.useCallback((target) => hasParentClass("szh-menu--state-open", target) ||
1740
- (closeMenuExclusionClassName && hasParentClass(closeMenuExclusionClassName, target)), [closeMenuExclusionClassName]);
1739
+ const isWithinMenu = React.useCallback((target) => hasParentClass("szh-menu--state-open", target), []);
1741
1740
  const handleScreenEventForSave = React.useCallback((ev) => {
1742
1741
  if (!isWithinMenu(ev.target)) {
1743
1742
  ev.preventDefault();
@@ -3429,7 +3428,7 @@ const useGridPopoverHook = (props) => {
3429
3428
  if (event.reason === CloseReason.BLUR)
3430
3429
  return;
3431
3430
  triggerSave(event.reason).then();
3432
- }, viewScroll: "auto", dontShrinkIfDirectionIsTop: true, className: props.className, closeMenuExclusionClassName: "ReactModal__Content", children: [saving && ( // This is the overlay that prevents editing when the editor is saving
3431
+ }, viewScroll: "auto", dontShrinkIfDirectionIsTop: true, className: props.className, children: [saving && ( // This is the overlay that prevents editing when the editor is saving
3433
3432
  jsxRuntime.jsx("div", { className: "ComponentLoadingWrapper-saveOverlay" })), children, jsxRuntime.jsx("button", { ref: saveButtonRef, "data-reason": "", onClick: (e) => {
3434
3433
  let reason = e.currentTarget.getAttribute("data-reason") ?? undefined;
3435
3434
  if (props.dontSaveOnExternalClick && reason === CloseReason.BLUR) {