@linzjs/step-ag-grid 2.4.5 → 2.4.6

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.
@@ -22,5 +22,5 @@ export interface MenuOption<RowType> {
22
22
  * NOTE: If the popout menu doesn't appear on single click when also selecting row it's because
23
23
  * you need a useMemo around your columnDefs
24
24
  */
25
- export declare const GridFormPopoutMenu: <RowType extends GridBaseRow>(_props: GridFormPopoutMenuProps<RowType>) => JSX.Element;
25
+ export declare const GridFormPopoverMenu: <RowType extends GridBaseRow>(_props: GridFormPopoutMenuProps<RowType>) => JSX.Element;
26
26
  export {};
@@ -1,7 +1,7 @@
1
1
  import "./GridPopoverMenu.scss";
2
2
  import { GridBaseRow } from "../Grid";
3
3
  import { ColDefT, GenericCellEditorProps } from "../GridCell";
4
- import { GridFormPopoutMenuProps } from "../gridForm/GridFormPopoutMenu";
4
+ import { GridFormPopoutMenuProps } from "../gridForm/GridFormPopoverMenu";
5
5
  import { GenericCellColDef } from "../gridRender/GridRenderGenericCell";
6
6
  /**
7
7
  * Popout burger menu
@@ -26,7 +26,7 @@ export { GridPopoverTextInput } from "./components/gridPopoverEdit/GridPopoverTe
26
26
  export { GridFormSubComponentTextInput } from "./components/gridForm/GridFormSubComponentTextInput";
27
27
  export * from "./components/gridForm/GridFormDropDown";
28
28
  export * from "./components/gridForm/GridFormMultiSelect";
29
- export * from "./components/gridForm/GridFormPopoutMenu";
29
+ export * from "./components/gridForm/GridFormPopoverMenu";
30
30
  export { GridHeaderSelect } from "./components/gridHeader/GridHeaderSelect";
31
31
  export { TextAreaInput } from "./lui/TextAreaInput";
32
32
  export { TextInputFormatted } from "./lui/TextInputFormatted";
@@ -12,5 +12,5 @@ export interface MenuProps extends RootMenuProps, UncontrolledMenuProps {
12
12
  */
13
13
  menuButton: RenderProp<MenuButtonModifiers, ReactElement>;
14
14
  }
15
- export declare function MenuFr({ "aria-label": ariaLabel, menuButton, instanceRef, onMenuChange, ...restProps }: MenuProps, externalRef: ForwardedRef<any>): JSX.Element;
16
- export declare const Menu: import("react").ForwardRefExoticComponent<Pick<MenuProps, "className" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "menuButton" | "containerProps" | "boundingBoxRef" | "boundingBoxPadding" | "viewScroll" | "portal" | "reposition" | "repositionFlag" | "submenuOpenDelay" | "submenuCloseDelay" | "theming" | "onItemClick" | "dontShrinkIfDirectionIsTop" | "menuClassName" | "menuStyle" | "arrowClassName" | "arrowStyle" | "arrow" | "offsetX" | "offsetY" | "align" | "direction" | "position" | "overflow" | "setDownOverflow" | "initialMounted" | "unmountOnClose" | "transition" | "transitionTimeout" | "instanceRef" | "onMenuChange"> & import("react").RefAttributes<any>>;
15
+ export declare function MenuFr({ "aria-label": ariaLabel, menuButton, instanceRef, onMenuChange, ...restProps }: MenuProps, externalRef: ForwardedRef<ReactElement>): JSX.Element;
16
+ export declare const Menu: import("react").ForwardRefExoticComponent<Pick<MenuProps, "className" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "menuButton" | "containerProps" | "boundingBoxRef" | "boundingBoxPadding" | "viewScroll" | "portal" | "reposition" | "repositionFlag" | "submenuOpenDelay" | "submenuCloseDelay" | "theming" | "onItemClick" | "dontShrinkIfDirectionIsTop" | "menuClassName" | "menuStyle" | "arrowClassName" | "arrowStyle" | "arrow" | "offsetX" | "offsetY" | "align" | "direction" | "position" | "overflow" | "setDownOverflow" | "initialMounted" | "unmountOnClose" | "transition" | "transitionTimeout" | "instanceRef" | "onMenuChange"> & import("react").RefAttributes<ReactElement<any, string | import("react").JSXElementConstructor<any>>>>;
@@ -1311,7 +1311,7 @@ var ControlledMenuFr = function (_a, externalRef) {
1311
1311
  if (!isWithinMenu(ev.target)) {
1312
1312
  ev.preventDefault();
1313
1313
  ev.stopPropagation();
1314
- // FIXME There's an issue in React17
1314
+ // Note: There's an issue in React17
1315
1315
  // the cell doesn't refresh during update if save is invoked from a native event
1316
1316
  // This doesn't happen in React18
1317
1317
  // To work around it, I invoke the save by clicking on a passed in invisible button ref
@@ -1459,7 +1459,7 @@ function MenuFr(_a, externalRef) {
1459
1459
  }
1460
1460
  e.preventDefault();
1461
1461
  };
1462
- // FIXME erk! button seems to be many types
1462
+ // Too many mixed types here to figure out what to pick for button. Bad code.
1463
1463
  var button = safeCall(menuButton, { open: isOpen });
1464
1464
  if (!button || !button.type)
1465
1465
  throw new Error("Menu requires a menuButton prop.");
@@ -1485,7 +1485,6 @@ var SubMenuFr = function (_a) {
1485
1485
  var _d = useContext(MenuListContext), parentMenuRef = _d.parentMenuRef, parentDir = _d.parentDir, parentOverflow = _d.overflow;
1486
1486
  var _e = useContext(MenuListItemContext), isParentOpen = _e.isParentOpen, isSubmenuOpen = _e.isSubmenuOpen, setOpenSubmenuCount = _e.setOpenSubmenuCount, dispatch = _e.dispatch, updateItems = _e.updateItems;
1487
1487
  var isPortal = parentOverflow !== "visible";
1488
- // FIXME Matt no idea what's going on here
1489
1488
  var _f = useMenuStateAndFocus(settings), stateProps = _f[0], toggleMenu = _f[1], _openMenu = _f[2];
1490
1489
  var state = stateProps.state;
1491
1490
  var isDisabled = !!disabled;
@@ -1631,11 +1630,17 @@ var MenuItemFr = function (_a) {
1631
1630
  var isCheckBox = type === "checkbox";
1632
1631
  var isAnchor = !!href && !isDisabled && !isRadio && !isCheckBox;
1633
1632
  var isChecked = isRadio ? radioGroup.value === value : isCheckBox ? !!checked : false;
1634
- // FIXME handle click seems to be a combination of multiple event types
1633
+ // handle click seems to be a combination of multiple event types, bad code.
1635
1634
  var handleClick = function (e) {
1636
1635
  if (isDisabled) {
1637
- e.stopPropagation();
1638
- e.preventDefault();
1636
+ if (e.syntheticEvent) {
1637
+ e.syntheticEvent.stopPropagation();
1638
+ e.syntheticEvent.preventDefault();
1639
+ }
1640
+ else {
1641
+ e.stopPropagation();
1642
+ e.preventDefault();
1643
+ }
1639
1644
  return;
1640
1645
  }
1641
1646
  var event = {
@@ -1729,7 +1734,6 @@ var MenuGroupFr = function (_a, externalRef) {
1729
1734
  useIsomorphicLayoutEffect(function () {
1730
1735
  var maxHeight;
1731
1736
  if (takeOverflow && overflowAmt != null && overflowAmt >= 0 && ref.current) {
1732
- // FIXME Matt added && ref.current
1733
1737
  maxHeight = ref.current.getBoundingClientRect().height - overflowAmt;
1734
1738
  if (maxHeight < 0)
1735
1739
  maxHeight = 0;
@@ -3264,7 +3268,7 @@ var PopoutMenuSeparator = Object.freeze({ __isMenuSeparator__: true });
3264
3268
  * NOTE: If the popout menu doesn't appear on single click when also selecting row it's because
3265
3269
  * you need a useMemo around your columnDefs
3266
3270
  */
3267
- var GridFormPopoutMenu = function (_props) {
3271
+ var GridFormPopoverMenu = function (_props) {
3268
3272
  var props = _props;
3269
3273
  var updatingCells = useContext(GridContext).updatingCells;
3270
3274
  var optionsInitialising = useRef(false);
@@ -3337,7 +3341,7 @@ var GridPopoverMenu = function (colDef, custom) {
3337
3341
  return GridCell(__assign(__assign({ maxWidth: 40, editable: colDef.editable != null ? colDef.editable : true, cellStyle: { "justify-content": "flex-end" }, cellRenderer: GridRenderPopoutMenuCell, cellClass: (custom === null || custom === void 0 ? void 0 : custom.multiEdit) ? GenericMultiEditCellClass : undefined }, colDef), { cellRendererParams: {
3338
3342
  // Menus open on single click, this parameter is picked up in Grid.tsx
3339
3343
  singleClickEdit: true
3340
- } }), __assign({ editor: GridFormPopoutMenu }, custom));
3344
+ } }), __assign({ editor: GridFormPopoverMenu }, custom));
3341
3345
  };
3342
3346
 
3343
3347
  var bearingValueFormatter = function (params) {
@@ -3896,5 +3900,5 @@ var ActionButton = function (_a) {
3896
3900
  } })) : (jsx(LuiIcon, { name: icon, alt: (_c = ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : name) !== null && _c !== void 0 ? _c : "", size: size })), jsxs("span", __assign({ className: "ActionButton-minimalArea" }, { children: [jsx("span", __assign({ className: "ActionButton-minimalAreaDisplay" }, { children: (_d = (localInProgress ? inProgressName : name)) !== null && _d !== void 0 ? _d : name })), jsx("span", __assign({ className: "ActionButton-minimalAreaExpand" }, { children: name }))] }))] })));
3897
3901
  };
3898
3902
 
3899
- export { ActionButton, ComponentLoadingWrapper, ControlledMenu, FocusableItem, GenericCellEditorComponent, GenericMultiEditCellClass, Grid, GridCell, GridCellRenderer, GridContext, GridContextProvider, GridFormDropDown, GridFormMultiSelect, GridFormPopoutMenu, GridFormSubComponentTextInput, GridHeaderSelect, GridIcon, GridLoadableCell, GridPopoutEditMultiSelect, GridPopoverEditBearing, GridPopoverEditBearingCorrection, GridPopoverEditDropDown, GridPopoverMenu, GridPopoverMessage, GridPopoverTextArea, GridPopoverTextInput, GridRenderPopoutMenuCell, GridRendererGenericCell, GridSubComponentTextArea, GridUpdatingContext, GridUpdatingContextProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuHeader, MenuHeaderItem, MenuHeaderString, MenuItem, MenuRadioGroup, MenuSeparator, MenuSeparatorString, PopoutMenuSeparator, SubMenu, TextAreaInput, TextInputFormatted, bearingCorrectionValueFormatter, bearingNumberParser, bearingStringValidator, bearingValueFormatter, convertDDToDMS, hasParentClass, isFloat, isNotEmpty, useGridPopoverHook, useMenuState, usePostSortRowsHook, wait };
3903
+ export { ActionButton, ComponentLoadingWrapper, ControlledMenu, FocusableItem, GenericCellEditorComponent, GenericMultiEditCellClass, Grid, GridCell, GridCellRenderer, GridContext, GridContextProvider, GridFormDropDown, GridFormMultiSelect, GridFormPopoverMenu, GridFormSubComponentTextInput, GridHeaderSelect, GridIcon, GridLoadableCell, GridPopoutEditMultiSelect, GridPopoverEditBearing, GridPopoverEditBearingCorrection, GridPopoverEditDropDown, GridPopoverMenu, GridPopoverMessage, GridPopoverTextArea, GridPopoverTextInput, GridRenderPopoutMenuCell, GridRendererGenericCell, GridSubComponentTextArea, GridUpdatingContext, GridUpdatingContextProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuHeader, MenuHeaderItem, MenuHeaderString, MenuItem, MenuRadioGroup, MenuSeparator, MenuSeparatorString, PopoutMenuSeparator, SubMenu, TextAreaInput, TextInputFormatted, bearingCorrectionValueFormatter, bearingNumberParser, bearingStringValidator, bearingValueFormatter, convertDDToDMS, hasParentClass, isFloat, isNotEmpty, useGridPopoverHook, useMenuState, usePostSortRowsHook, wait };
3900
3904
  //# sourceMappingURL=step-ag-grid.esm.js.map