@linzjs/step-ag-grid 21.3.0 → 22.0.1

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.
@@ -1,9 +1,9 @@
1
- import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { LuiMiniSpinner, LuiStatusSpinner, LuiIcon, LuiButton, LuiCheckboxInput, LuiButtonGroup } from '@linzjs/lui';
3
3
  import { RowHighlightPosition } from 'ag-grid-community';
4
4
  import { AgGridReact } from 'ag-grid-react';
5
5
  import { negate, isEmpty, findIndex, defer as defer$1, debounce as debounce$1, xorBy, last, difference, omit, sortBy, delay, partition, pick, groupBy, fromPairs, toPairs, isEqual, compact, filter, sumBy, pull, remove, castArray, flatten } from 'lodash-es';
6
- import React, { useRef, useEffect, useLayoutEffect, createContext, useContext, forwardRef, useCallback, useState, useMemo, memo, useReducer, cloneElement, useImperativeHandle, Fragment } from 'react';
6
+ import React, { useRef, useEffect, useLayoutEffect, createContext, useContext, forwardRef, useCallback, useState, useMemo, memo, useReducer, cloneElement, useImperativeHandle, Fragment as Fragment$1, useId } from 'react';
7
7
  import { unstable_batchedUpdates, flushSync, createPortal } from 'react-dom';
8
8
 
9
9
  /**
@@ -334,9 +334,9 @@ const usePostSortRowsHook = ({ setStaleGrid }) => {
334
334
  }
335
335
  const newSortOrder = JSON.stringify(copyCurrentSortSettings());
336
336
  let sortOrderChanged = newSortOrder != lastSortOrderHash.current;
337
- const quickFilter = api.filterManager.quickFilter;
337
+ const quickFilter = api.getQuickFilter();
338
338
  if (previousQuickFilter.current != quickFilter) {
339
- previousQuickFilter.current = quickFilter;
339
+ previousQuickFilter.current = quickFilter ?? "";
340
340
  sortOrderChanged = true;
341
341
  }
342
342
  if (isEmpty(previousRowSortIndex)) {
@@ -658,7 +658,7 @@ const withHovering = (name, WrappedComponent) => {
658
658
  const Component = memo(WrappedComponent);
659
659
  const WithHovering = forwardRef((props, ref) => {
660
660
  const menuItemRef = useRef(null);
661
- return (jsx(Component, { ...props, menuItemRef: menuItemRef, externalRef: ref, isHovering: useContext(HoverItemContext) === menuItemRef.current }));
661
+ return (jsx(Fragment, { children: jsx(Component, { ...props, menuItemRef: menuItemRef, externalRef: ref, isHovering: useContext(HoverItemContext) === menuItemRef.current }) }));
662
662
  });
663
663
  WithHovering.displayName = `WithHovering(${name})`;
664
664
  return WithHovering;
@@ -1993,7 +1993,7 @@ function MenuFr({ "aria-label": ariaLabel, menuButton, instanceRef, onMenuChange
1993
1993
  openMenu,
1994
1994
  closeMenu: () => toggleMenu(false),
1995
1995
  }));
1996
- return (jsxs(Fragment, { children: [renderButton, jsx(ControlledMenu, { ...restProps, ...stateProps, "aria-label": ariaLabel || (typeof button.props.children === "string" ? button.props.children : "Menu"), anchorRef: buttonRef, ref: externalRef, onClose: handleClose, skipOpen: skipOpen })] }));
1996
+ return (jsxs(Fragment$1, { children: [renderButton, jsx(ControlledMenu, { ...restProps, ...stateProps, "aria-label": ariaLabel || (typeof button.props.children === "string" ? button.props.children : "Menu"), anchorRef: buttonRef, ref: externalRef, onClose: handleClose, skipOpen: skipOpen })] }));
1997
1997
  }
1998
1998
  const Menu = forwardRef(MenuFr);
1999
1999
 
@@ -2329,7 +2329,7 @@ const useGridContextMenu = ({ contextMenuSelectRow, contextMenu: ContextMenu, })
2329
2329
  return {
2330
2330
  openMenu,
2331
2331
  cellContextMenu,
2332
- component: ContextMenu ? (jsx(Fragment$1, { children: jsx(ControlledMenu, { anchorPoint: anchorPoint, state: isOpen ? "open" : "closed", direction: "right", onClose: closeMenu, children: isOpen && (jsx(ContextMenu, { selectedRows: selectedRowsRef.current, clickedRow: clickedRowRef.current, colDef: clickedColDefRef.current, close: closeMenu })) }) })) : null,
2332
+ component: ContextMenu ? (jsx(Fragment, { children: jsx(ControlledMenu, { anchorPoint: anchorPoint, state: isOpen ? "open" : "closed", direction: "right", onClose: closeMenu, children: isOpen && (jsx(ContextMenu, { selectedRows: selectedRowsRef.current, clickedRow: clickedRowRef.current, colDef: clickedColDefRef.current, close: closeMenu })) }) })) : null,
2333
2333
  };
2334
2334
  };
2335
2335
 
@@ -2539,6 +2539,7 @@ const Grid = ({ "data-testid": dataTestId, defaultPostSort = true, rowSelection
2539
2539
  exportable: false,
2540
2540
  },
2541
2541
  checkboxSelection: params.selectable,
2542
+ headerClass: params.onRowDragEnd ? "ag-header-select-draggable" : undefined,
2542
2543
  headerComponent: rowSelection === "multiple" ? GridHeaderSelect : null,
2543
2544
  suppressHeaderKeyboardEvent: (e) => {
2544
2545
  if (!params.selectable)
@@ -2811,7 +2812,7 @@ const Grid = ({ "data-testid": dataTestId, defaultPostSort = true, rowSelection
2811
2812
  // This is setting a ref in the GridContext so won't be triggering an update loop
2812
2813
  setOnCellEditingComplete(params.onCellEditingComplete);
2813
2814
  const headerRowCount = columnDefs.some((c) => c.children) ? 2 : 1;
2814
- return (jsxs("div", { "data-testid": dataTestId, className: clsx("Grid-container", theme, "theme-specific", staleGrid && "Grid-sortIsStale", gridReady && rowData && autoSized && "Grid-ready"), children: [gridContextMenu.component, jsx("div", { style: { flex: 1 }, ref: gridDivRef, children: jsx(AgGridReact, { reactiveCustomComponents: true, rowHeight: rowHeight, animateRows: params.animateRows ?? false, rowClassRules: params.rowClassRules, getRowId: (params) => `${params.data.id}`, suppressRowClickSelection: true, rowSelection: rowSelection, suppressBrowserResizeObserver: true, onGridSizeChanged: onGridSizeChanged, suppressColumnVirtualisation: suppressColumnVirtualization, suppressClickEdit: true, onColumnVisible: () => {
2815
+ return (jsxs("div", { "data-testid": dataTestId, className: clsx("Grid-container", theme, "theme-specific", staleGrid && "Grid-sortIsStale", gridReady && rowData && autoSized && "Grid-ready"), children: [gridContextMenu.component, jsx("div", { style: { flex: 1 }, ref: gridDivRef, children: jsx(AgGridReact, { rowHeight: rowHeight, animateRows: params.animateRows ?? false, rowClassRules: params.rowClassRules, getRowId: (params) => `${params.data.id}`, suppressRowClickSelection: true, rowSelection: rowSelection, suppressBrowserResizeObserver: true, onGridSizeChanged: onGridSizeChanged, suppressColumnVirtualisation: suppressColumnVirtualization, suppressClickEdit: true, onColumnVisible: () => {
2815
2816
  setInitialContentSize();
2816
2817
  }, onRowDataUpdated: onRowDataChanged, onCellKeyDown: onCellKeyPress, onCellClicked: onCellClicked, onCellDoubleClicked: onCellDoubleClick, onCellEditingStarted: refreshSelectedRows, domLayout: params.domLayout, onColumnResized: onColumnResized, defaultColDef: { minWidth: 48, ...omit(params.defaultColDef, ["editable"]) }, columnDefs: columnDefsAdjusted, rowData: rowData, noRowsOverlayComponent: (event) => {
2817
2818
  let rowCount = 0;
@@ -2897,14 +2898,14 @@ const GridCellRenderer = (props) => {
2897
2898
  warningText = warningText.join("\n");
2898
2899
  if (Array.isArray(infoText))
2899
2900
  infoText = infoText.join("\n");
2900
- return checkUpdating(colDef.field ?? colDef.colId ?? "", props.data.id) ? (jsx(GridLoadableCell, {})) : (jsxs(Fragment$1, { children: [!!warningText && (jsx(GridIcon, { icon: "ic_warning_outline", title: typeof warningText === "string" ? warningText : "Warning" })), !!infoText && jsx(GridIcon, { icon: "ic_info_outline", title: typeof infoText === "string" ? infoText : "Info" }), jsx("div", { className: "GridCell-container", children: colDef.cellRendererParams?.originalCellRenderer ? (jsx(colDef.cellRendererParams.originalCellRenderer, { ...props })) : (jsx("span", { title: props.valueFormatted ?? undefined, children: props.valueFormatted })) }), fnOrVar(colDef.editable, props) && rendererParams?.rightHoverElement && (jsx("div", { className: "GridCell-hoverRight", children: rendererParams?.rightHoverElement }))] }));
2901
+ return checkUpdating(colDef.field ?? colDef.colId ?? "", props.data.id) ? (jsx(GridLoadableCell, {})) : (jsxs(Fragment, { children: [!!warningText && (jsx(GridIcon, { icon: "ic_warning_outline", title: typeof warningText === "string" ? warningText : "Warning" })), !!infoText && jsx(GridIcon, { icon: "ic_info_outline", title: typeof infoText === "string" ? infoText : "Info" }), jsx("div", { className: "GridCell-container", children: colDef.cellRendererParams?.originalCellRenderer ? (jsx(colDef.cellRendererParams.originalCellRenderer, { ...props })) : (jsx("span", { title: props.valueFormatted ?? undefined, children: props.valueFormatted })) }), fnOrVar(colDef.editable, props) && rendererParams?.rightHoverElement && (jsx("div", { className: "GridCell-hoverRight", children: rendererParams?.rightHoverElement }))] }));
2901
2902
  };
2902
2903
  const suppressCellKeyboardEvents = (e) => {
2903
2904
  const shortcutKeys = e.colDef.cellRendererParams?.shortcutKeys ?? {};
2904
2905
  const exec = shortcutKeys[e.event.key];
2905
2906
  if (exec && !e.editing && !e.event.repeat && e.event.type === "keydown") {
2906
2907
  const editable = fnOrVar(e.colDef?.editable, e);
2907
- return editable ? exec(e) ?? true : true;
2908
+ return editable ? (exec(e) ?? true) : true;
2908
2909
  }
2909
2910
  // It's important that aggrid doesn't trigger edit on enter
2910
2911
  // as the incorrect selected rows will be returned
@@ -3325,7 +3326,7 @@ var css_248z$2 = ".FormError-helpText{color:#6b6966;font-size:.75rem;font-weight
3325
3326
  styleInject(css_248z$2);
3326
3327
 
3327
3328
  const FormError = (props) => {
3328
- return (jsxs(Fragment$1, { children: [props.error && (jsx("span", { className: "LuiTextInput-error", style: { paddingLeft: 0 }, children: props.error })), props.helpText && !props.error && jsx("span", { className: "FormError-helpText", children: props.helpText })] }));
3329
+ return (jsxs(Fragment, { children: [props.error && (jsx("span", { className: "LuiTextInput-error", style: { paddingLeft: 0 }, children: props.error })), props.helpText && !props.error && jsx("span", { className: "FormError-helpText", children: props.helpText })] }));
3329
3330
  };
3330
3331
 
3331
3332
  function escapeStringRegexp(string) {
@@ -3513,7 +3514,7 @@ const useGridPopoverHook = (props) => {
3513
3514
  }
3514
3515
  }, [cancelEdit, props, stopEditing, updateValue]);
3515
3516
  const popoverWrapper = useCallback((children) => {
3516
- return (jsx(Fragment$1, { children: anchorRef.current && (jsxs(ControlledMenu, { state: isOpen ? "open" : "closed", portal: true, unmountOnClose: true, anchorRef: anchorRef, saveButtonRef: saveButtonRef, menuClassName: "step-ag-grid-react-menu", onClose: (event) => {
3517
+ return (jsx(Fragment, { children: anchorRef.current && (jsxs(ControlledMenu, { state: isOpen ? "open" : "closed", portal: true, unmountOnClose: true, anchorRef: anchorRef, saveButtonRef: saveButtonRef, menuClassName: "step-ag-grid-react-menu", onClose: (event) => {
3517
3518
  // Prevent menu from closing when modals are invoked
3518
3519
  if (event.reason === CloseReason.BLUR)
3519
3520
  return;
@@ -3649,19 +3650,19 @@ const GridFormDropDown = (props) => {
3649
3650
  });
3650
3651
  let lastHeader = null;
3651
3652
  let showHeader = null;
3652
- return popoverWrapper(jsxs(Fragment$1, { children: [props.filtered && (jsxs("div", { className: "GridFormDropDown-filter", children: [jsx(FocusableItem, { className: "filter-item", onFocus: () => {
3653
+ return popoverWrapper(jsxs(Fragment, { children: [props.filtered && (jsxs("div", { className: "GridFormDropDown-filter", children: [jsx(FocusableItem, { className: "filter-item", onFocus: () => {
3653
3654
  setSelectedItem(null);
3654
3655
  setSubSelectedValue(null);
3655
3656
  subComponentIsValid.current = true;
3656
3657
  }, children: ({ ref }) => (jsxs("div", { style: { display: "flex", flexDirection: "column", width: "100%" }, children: [jsx("input", { className: "LuiTextInput-input", ref: ref, type: "text", placeholder: props.filterPlaceholder ?? "Filter...", "data-testid": "filteredMenu-free-text-input", defaultValue: filter, "data-allowtabtosave": true, "data-disableenterautosave": !props.onSelectFilter &&
3657
- !(filteredValues && filteredValues.length === 1 && !filteredValues[0].subComponent), onChange: (e) => setFilter(e.target.value) }), props.filterHelpText && isNotEmpty(filter) && (jsx(FormError, { error: null, helpText: props.filterHelpText }))] })) }), jsx(MenuDivider, {}, `$$divider_filter`)] })), jsx(ComponentLoadingWrapper, { loading: !options, className: "GridFormDropDown-options", children: jsxs(Fragment$1, { children: [options && (isEmpty(options) || (filteredValues && isEmpty(filteredValues))) && (jsx(MenuItem, { className: "GridPopoverEditDropDown-noOptions", disabled: true, children: props.noOptionsMessage ?? "No Options" }, `${fieldToString(field)}-empty`)), options?.map((item, index) => {
3658
+ !(filteredValues && filteredValues.length === 1 && !filteredValues[0].subComponent), onChange: (e) => setFilter(e.target.value) }), props.filterHelpText && isNotEmpty(filter) && (jsx(FormError, { error: null, helpText: props.filterHelpText }))] })) }), jsx(MenuDivider, {}, `$$divider_filter`)] })), jsx(ComponentLoadingWrapper, { loading: !options, className: "GridFormDropDown-options", children: jsxs(Fragment, { children: [options && (isEmpty(options) || (filteredValues && isEmpty(filteredValues))) && (jsx(MenuItem, { className: "GridPopoverEditDropDown-noOptions", disabled: true, children: props.noOptionsMessage ?? "No Options" }, `${fieldToString(field)}-empty`)), options?.map((item, index) => {
3658
3659
  showHeader = null;
3659
3660
  if (item.value === MenuSeparatorString) {
3660
3661
  return jsx(MenuDivider, {}, `$$divider_${index}`);
3661
3662
  }
3662
3663
  else if (item.value === MenuHeaderString) {
3663
3664
  lastHeader = jsx(MenuHeader, { children: item.label }, `$$header_${index}`);
3664
- return jsx(Fragment$1, {});
3665
+ return jsx(Fragment, {});
3665
3666
  }
3666
3667
  else {
3667
3668
  if (lastHeader) {
@@ -3669,7 +3670,7 @@ const GridFormDropDown = (props) => {
3669
3670
  lastHeader = null;
3670
3671
  }
3671
3672
  }
3672
- return ((!filteredValues || filteredValues.includes(item)) && (jsxs(Fragment, { children: [showHeader, jsxs("div", { children: [jsxs(MenuItem, { disabled: !!item.disabled, title: item.disabled && typeof item.disabled !== "boolean" ? item.disabled : "", value: item.value, onFocus: () => {
3673
+ return ((!filteredValues || filteredValues.includes(item)) && (jsxs(Fragment$1, { children: [showHeader, jsxs("div", { children: [jsxs(MenuItem, { disabled: !!item.disabled, title: item.disabled && typeof item.disabled !== "boolean" ? item.disabled : "", value: item.value, onFocus: () => {
3673
3674
  if (selectedItem !== item) {
3674
3675
  setSelectedItem(item);
3675
3676
  setSubSelectedValue(null);
@@ -3862,7 +3863,7 @@ const GridFormMessage = (props) => {
3862
3863
  setMessage(await props.message(selectedRows));
3863
3864
  })().then();
3864
3865
  }, [props, selectedRows]);
3865
- return popoverWrapper(jsx(ComponentLoadingWrapper, { loading: message === null, className: clsx("GridFormMessage-container", props.className), children: jsx(Fragment$1, { children: message }) }));
3866
+ return popoverWrapper(jsx(ComponentLoadingWrapper, { loading: message === null, className: clsx("GridFormMessage-container", props.className), children: jsx(Fragment, { children: message }) }));
3866
3867
  };
3867
3868
 
3868
3869
  const GridFormMultiSelect = (props) => {
@@ -3942,10 +3943,10 @@ const GridFormMultiSelect = (props) => {
3942
3943
  invalid,
3943
3944
  save,
3944
3945
  });
3945
- return popoverWrapper(jsx(ComponentLoadingWrapper, { loading: !options, className: "GridFormMultiSelect-container", children: options && (jsxs(Fragment$1, { children: [props.filtered && (jsx(FilterInput, { headerGroups, options, setOptions, filter, setFilter, triggerSave, filterHelpText: props.filterHelpText, onSelectFilter: props.onSelectFilter, filterPlaceholder: props.filterPlaceholder })), headerGroups &&
3946
+ return popoverWrapper(jsx(ComponentLoadingWrapper, { loading: !options, className: "GridFormMultiSelect-container", children: options && (jsxs(Fragment, { children: [props.filtered && (jsx(FilterInput, { headerGroups, options, setOptions, filter, setFilter, triggerSave, filterHelpText: props.filterHelpText, onSelectFilter: props.onSelectFilter, filterPlaceholder: props.filterPlaceholder })), headerGroups &&
3946
3947
  (isEmpty(headerGroups) || !toPairs(headerGroups).some(([_, options]) => !isEmpty(options))) && (jsx(MenuItem, { className: "GridMultiSelect-noOptions", disabled: true, children: props.noOptionsMessage ?? "No Options" }, "noOptions")), headerGroups && !isEmpty(headerGroups) && (jsx("div", { className: "GridFormMultiSelect-options", children: headers.map((header, index) => {
3947
3948
  const subOptions = headerGroups[`${header.filter}`];
3948
- return (!isEmpty(subOptions) && (jsxs(Fragment, { children: [header.header && jsx(MenuHeader, { children: header.header }), subOptions.map((item, index) => item.value === MenuSeparatorString ? (jsx(MenuDivider, {}, `div_${index}`)) : (jsxs(Fragment, { children: [jsx(MenuRadioItem, { item: item, options: options, setOptions: setOptions, onChecked: () => {
3949
+ return (!isEmpty(subOptions) && (jsxs(Fragment$1, { children: [header.header && jsx(MenuHeader, { children: header.header }), subOptions.map((item, index) => item.value === MenuSeparatorString ? (jsx(MenuDivider, {}, `div_${index}`)) : (jsxs(Fragment$1, { children: [jsx(MenuRadioItem, { item: item, options: options, setOptions: setOptions, onChecked: () => {
3949
3950
  // Default to focus on first input in subComponent
3950
3951
  defer$1(() => {
3951
3952
  firstInputSubComponent.current?.focus();
@@ -4025,7 +4026,7 @@ const FilterInput = (props) => {
4025
4026
  lastKeyWasEnter.current = false;
4026
4027
  }
4027
4028
  }, [addCustomFilterValue, filter, onSelectFilter, setFilter, toggleSelectAllVisible, triggerSave]);
4028
- return (jsxs(Fragment$1, { children: [jsx(FocusableItem, { className: "filter-item", children: (_) => (jsxs("div", { style: { width: "100%" }, className: "GridFormMultiSelect-filter", children: [jsx("input", { className: "LuiTextInput-input", type: "text", placeholder: filterPlaceholder ?? "Filter...", "data-testid": "filteredMenu-free-text-input", value: filter, "data-disableenterautosave": true, "data-allowtabtosave": true, onChange: (e) => setFilter(e.target.value), onKeyDown: handleKeyDown, onKeyUp: handleKeyUp }), filterHelpText && (jsx(FormError, { error: null, helpText: typeof filterHelpText === "function" ? filterHelpText(filter.trim(), options) : filterHelpText }))] })) }, "filter"), jsx(MenuDivider, {}, `$$divider_filter`)] }));
4029
+ return (jsxs(Fragment, { children: [jsx(FocusableItem, { className: "filter-item", children: (_) => (jsxs("div", { style: { width: "100%" }, className: "GridFormMultiSelect-filter", children: [jsx("input", { className: "LuiTextInput-input", type: "text", placeholder: filterPlaceholder ?? "Filter...", "data-testid": "filteredMenu-free-text-input", value: filter, "data-disableenterautosave": true, "data-allowtabtosave": true, onChange: (e) => setFilter(e.target.value), onKeyDown: handleKeyDown, onKeyUp: handleKeyUp }), filterHelpText && (jsx(FormError, { error: null, helpText: typeof filterHelpText === "function" ? filterHelpText(filter.trim(), options) : filterHelpText }))] })) }, "filter"), jsx(MenuDivider, {}, `$$divider_filter`)] }));
4029
4030
  };
4030
4031
  const MenuRadioItem = (props) => {
4031
4032
  const { item, options, setOptions } = props;
@@ -4040,7 +4041,7 @@ const MenuRadioItem = (props) => {
4040
4041
  toggleValue(item);
4041
4042
  }
4042
4043
  item.checked && props.onChecked && props.onChecked();
4043
- }, children: jsx(LuiCheckboxInput, { isChecked: item.checked ?? false, value: `${item.value}`, label: jsxs(Fragment$1, { children: [item.warning && jsx(GridIcon, { icon: "ic_warning_outline", title: item.warning }), item.label ?? (item.value == null ? `<${item.value}>` : `${item.value}`)] }), inputProps: {
4044
+ }, children: jsx(LuiCheckboxInput, { isChecked: item.checked ?? false, value: `${item.value}`, label: jsxs(Fragment, { children: [item.warning && jsx(GridIcon, { icon: "ic_warning_outline", title: item.warning }), item.label ?? (item.value == null ? `<${item.value}>` : `${item.value}`)] }), inputProps: {
4044
4045
  onClick: (e) => {
4045
4046
  // Click is handled by MenuItem onClick
4046
4047
  e.preventDefault();
@@ -4135,20 +4136,20 @@ const GridFormMultiSelectGrid = (props) => {
4135
4136
  setOptions([...options]);
4136
4137
  }
4137
4138
  }, [options, setOptions]);
4138
- return popoverWrapper(jsx(Fragment$1, { children: jsx("div", { className: "Grid-popoverContainer", children: jsx("div", { style: {
4139
+ return popoverWrapper(jsx(Fragment, { children: jsx("div", { className: "Grid-popoverContainer", children: jsx("div", { style: {
4139
4140
  display: "grid",
4140
4141
  gridAutoFlow: "column",
4141
4142
  gridTemplateRows: `repeat(${props.maxRowCount ?? 10}, auto)`,
4142
4143
  maxWidth: "calc(min(100vw,500px))",
4143
4144
  overflowX: "auto",
4144
4145
  }, children: options &&
4145
- options.map((o) => (jsx(Fragment$1, { children: jsx(MenuItem, { onClick: (e) => {
4146
+ options.map((o) => (jsx(Fragment, { children: jsx(MenuItem, { onClick: (e) => {
4146
4147
  // Global react-menu MenuItem handler handles tabs
4147
4148
  if (e.key !== "Tab" && e.key !== "Enter") {
4148
4149
  e.keepOpen = true;
4149
4150
  toggleValue(o);
4150
4151
  }
4151
- }, children: jsx(LuiCheckboxInput, { isChecked: !!o.checked ?? false, isIndeterminate: o.checked === "partial", value: `${o.value}`, label: jsxs(Fragment$1, { children: [o.warning && jsx(GridIcon, { icon: "ic_warning_outline", title: o.warning }, "$$icon$$"), jsx("span", { className: "GridMultiSelectGrid-Label", children: o.label ?? (o.value == null ? `<${o.value}>` : `${o.value}`) }, "$$label$$")] }), inputProps: {
4152
+ }, children: jsx(LuiCheckboxInput, { isChecked: !!o.checked ?? false, isIndeterminate: o.checked === "partial", value: `${o.value}`, label: jsxs(Fragment, { children: [o.warning && jsx(GridIcon, { icon: "ic_warning_outline", title: o.warning }, "$$icon$$"), jsx("span", { className: "GridMultiSelectGrid-Label", children: o.label ?? (o.value == null ? `<${o.value}>` : `${o.value}`) }, "$$label$$")] }), inputProps: {
4152
4153
  onClick: (e) => {
4153
4154
  // Click is handled by MenuItem onClick
4154
4155
  e.preventDefault();
@@ -4234,7 +4235,7 @@ const GridFormPopoverMenu = (props) => {
4234
4235
  invalid: () => subComponentSelected && !subComponentIsValid.current,
4235
4236
  save,
4236
4237
  });
4237
- return popoverWrapper(jsx(ComponentLoadingWrapper, { loading: !options, className: "GridFormPopupMenu", children: jsx(Fragment$1, { children: isEmpty(options) ? (jsx(MenuItem, { className: "GridPopoverMenu-noOptions", disabled: true, children: "No actions" }, `GridPopoverMenu-empty`)) : (options?.map((item, index) => item.label === "__isMenuSeparator__" ? (jsx(MenuDivider, {}, `$$divider_${index}`)) : (!item.hidden && (jsxs(Fragment, { children: [item.subMenu ? (jsx(SubMenu, { disabled: !!item.disabled, label: item.label, title: item.disabled && typeof item.disabled !== "boolean" ? item.disabled : "", children: jsx(item.subMenu, {}) }, `${item.label}`)) : (jsx(MenuItem, { onClick: (e) => onMenuItemClick(e, item), disabled: !!item.disabled, title: item.disabled && typeof item.disabled !== "boolean" ? item.disabled : "", children: item.label }, `${item.label}`)), item.subComponent && subComponentSelected === item && (jsx(FocusableItem, { className: "LuiDeprecatedForms", children: () => (jsx(GridSubComponentContext.Provider, { value: {
4238
+ return popoverWrapper(jsx(ComponentLoadingWrapper, { loading: !options, className: "GridFormPopupMenu", children: jsx(Fragment, { children: isEmpty(options) ? (jsx(MenuItem, { className: "GridPopoverMenu-noOptions", disabled: true, children: "No actions" }, `GridPopoverMenu-empty`)) : (options?.map((item, index) => item.label === "__isMenuSeparator__" ? (jsx(MenuDivider, {}, `$$divider_${index}`)) : (!item.hidden && (jsxs(Fragment$1, { children: [item.subMenu ? (jsx(SubMenu, { disabled: !!item.disabled, label: item.label, title: item.disabled && typeof item.disabled !== "boolean" ? item.disabled : "", children: jsx(item.subMenu, {}) }, `${item.label}`)) : (jsx(MenuItem, { onClick: (e) => onMenuItemClick(e, item), disabled: !!item.disabled, title: item.disabled && typeof item.disabled !== "boolean" ? item.disabled : "", children: item.label }, `${item.label}`)), item.subComponent && subComponentSelected === item && (jsx(FocusableItem, { className: "LuiDeprecatedForms", children: () => (jsx(GridSubComponentContext.Provider, { value: {
4238
4239
  context: {},
4239
4240
  data,
4240
4241
  value: subSelectedValue,
@@ -4248,65 +4249,9 @@ const GridFormPopoverMenu = (props) => {
4248
4249
  }, children: jsx("div", { className: "subComponent", children: item.subComponent && jsx(item.subComponent, {}) }) })) }, `${item.label}_subcomponent`))] }, `${item.label}`))))) }) }));
4249
4250
  };
4250
4251
 
4251
- /**
4252
- * Convert array of 16 byte values to UUID string format of the form:
4253
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
4254
- */
4255
- var byteToHex = [];
4256
- for (var i = 0; i < 256; ++i) {
4257
- byteToHex.push((i + 0x100).toString(16).slice(1));
4258
- }
4259
- function unsafeStringify(arr, offset = 0) {
4260
- // Note: Be careful editing this code! It's been tuned for performance
4261
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
4262
- //
4263
- // Note to future-self: No, you can't remove the `toLowerCase()` call.
4264
- // REF: https://github.com/uuidjs/uuid/pull/677#issuecomment-1757351351
4265
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
4266
- }
4267
-
4268
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
4269
- // require the crypto API and do not support built-in fallback to lower quality random number
4270
- // generators (like Math.random()).
4271
-
4272
- var getRandomValues;
4273
- var rnds8 = new Uint8Array(16);
4274
- function rng() {
4275
- // lazy load so that environments that need to polyfill have a chance to do so
4276
- if (!getRandomValues) {
4277
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
4278
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
4279
- if (!getRandomValues) {
4280
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
4281
- }
4282
- }
4283
- return getRandomValues(rnds8);
4284
- }
4285
-
4286
- var randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
4287
- var native = {
4288
- randomUUID
4289
- };
4290
-
4291
- function v4(options, buf, offset) {
4292
- if (native.randomUUID && !buf && !options) {
4293
- return native.randomUUID();
4294
- }
4295
- options = options || {};
4296
- var rnds = options.random || (options.rng || rng)();
4297
-
4298
- // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
4299
- rnds[6] = rnds[6] & 0x0f | 0x40;
4300
- rnds[8] = rnds[8] & 0x3f | 0x80;
4301
- return unsafeStringify(rnds);
4302
- }
4303
-
4304
- const useGenerateOrDefaultId = (idFromProps) => {
4305
- const [id] = useState(idFromProps ? idFromProps : v4());
4306
- return id;
4307
- };
4308
4252
  const TextAreaInput = (props) => {
4309
- const id = useGenerateOrDefaultId(props?.id);
4253
+ const reactId = useId();
4254
+ const id = props?.id ?? reactId;
4310
4255
  return (jsxs("div", { className: clsx("LuiTextAreaInput Grid-popoverContainer", props.disabled ? "isDisabled" : "", props.error ? "hasError" : "", props.className), children: [jsxs("label", { htmlFor: id, children: [props.mandatory != null && jsx("span", { className: "LuiTextAreaInput-mandatory", children: "*" }), props.label != null && jsx("span", { className: "LuiTextAreaInput-label", children: props.label }), jsx("div", { className: "LuiTextAreaInput-wrapper", children: jsx("textarea", { rows: 5, ...omit(props, ["error", "value", "helpText", "formatted", "className", "allowTabToSave"]), id: id, value: props.value ?? "", spellCheck: true, onMouseEnter: (e) => {
4311
4256
  if (document.activeElement != e.currentTarget) {
4312
4257
  e.currentTarget.focus();
@@ -5310,5 +5255,5 @@ const useDeferredPromise = () => {
5310
5255
  };
5311
5256
  };
5312
5257
 
5313
- export { ActionButton, ComponentLoadingWrapper, ControlledMenu, Editor, FocusableItem, FormError, GenericCellEditorComponentWrapper, Grid, GridCell, GridCellFiller, GridCellFillerColId, GridCellMultiEditor, GridCellMultiSelectClassRules, GridCellRenderer, GridContext, GridContextProvider, GridFilterButtons, GridFilterColumnsToggle, GridFilterDownloadCsvButton, GridFilterHeaderIconButton, GridFilterQuick, GridFilters, GridFormDropDown, GridFormEditBearing, GridFormMessage, GridFormMultiSelect, GridFormMultiSelectGrid, GridFormPopoverMenu, GridFormSubComponentTextArea, GridFormSubComponentTextInput, GridFormTextArea, GridFormTextInput, GridHeaderSelect, GridIcon, GridLoadableCell, GridNoRowsOverlay, GridNoRowsOverlayFr, GridPopoutEditMultiSelect, GridPopoutEditMultiSelectGrid, GridPopoverContext, GridPopoverContextProvider, GridPopoverEditBearing, GridPopoverEditBearingCorrection, GridPopoverEditBearingCorrectionEditorParams, GridPopoverEditBearingEditorParams, GridPopoverEditDropDown, GridPopoverMenu, GridPopoverMessage, GridPopoverTextArea, GridPopoverTextInput, GridRenderPopoutMenuCell, GridSubComponentContext, GridUpdatingContext, GridUpdatingContextProvider, GridWrapper, Menu, MenuButton, MenuDivider, MenuGroup, MenuHeader, MenuHeaderItem, MenuHeaderString, MenuItem, MenuRadioGroup, MenuSeparator, MenuSeparatorString, PopoutMenuSeparator, SubMenu, TextAreaInput, TextInputFormatted, bearingCorrectionRangeValidator, bearingCorrectionValueFormatter, bearingNumberParser, bearingRangeValidator, bearingStringValidator, bearingValueFormatter, convertDDToDMS, downloadCsvUseValueFormattersProcessCellCallback, findParentWithClass, fnOrVar, generateFilterGetter, hasParentClass, isFloat, isGridCellFiller, isNotEmpty, sanitiseFileName, stringByteLengthIsInvalid, suppressCellKeyboardEvents, useDeferredPromise, useGenerateOrDefaultId, useGridContext, useGridContextMenu, useGridFilter, useGridPopoverContext, useGridPopoverHook, useMenuState, usePostSortRowsHook, wait };
5258
+ export { ActionButton, ComponentLoadingWrapper, ControlledMenu, Editor, FocusableItem, FormError, GenericCellEditorComponentWrapper, Grid, GridCell, GridCellFiller, GridCellFillerColId, GridCellMultiEditor, GridCellMultiSelectClassRules, GridCellRenderer, GridContext, GridContextProvider, GridFilterButtons, GridFilterColumnsToggle, GridFilterDownloadCsvButton, GridFilterHeaderIconButton, GridFilterQuick, GridFilters, GridFormDropDown, GridFormEditBearing, GridFormMessage, GridFormMultiSelect, GridFormMultiSelectGrid, GridFormPopoverMenu, GridFormSubComponentTextArea, GridFormSubComponentTextInput, GridFormTextArea, GridFormTextInput, GridHeaderSelect, GridIcon, GridLoadableCell, GridNoRowsOverlay, GridNoRowsOverlayFr, GridPopoutEditMultiSelect, GridPopoutEditMultiSelectGrid, GridPopoverContext, GridPopoverContextProvider, GridPopoverEditBearing, GridPopoverEditBearingCorrection, GridPopoverEditBearingCorrectionEditorParams, GridPopoverEditBearingEditorParams, GridPopoverEditDropDown, GridPopoverMenu, GridPopoverMessage, GridPopoverTextArea, GridPopoverTextInput, GridRenderPopoutMenuCell, GridSubComponentContext, GridUpdatingContext, GridUpdatingContextProvider, GridWrapper, Menu, MenuButton, MenuDivider, MenuGroup, MenuHeader, MenuHeaderItem, MenuHeaderString, MenuItem, MenuRadioGroup, MenuSeparator, MenuSeparatorString, PopoutMenuSeparator, SubMenu, TextAreaInput, TextInputFormatted, bearingCorrectionRangeValidator, bearingCorrectionValueFormatter, bearingNumberParser, bearingRangeValidator, bearingStringValidator, bearingValueFormatter, convertDDToDMS, downloadCsvUseValueFormattersProcessCellCallback, findParentWithClass, fnOrVar, generateFilterGetter, hasParentClass, isFloat, isGridCellFiller, isNotEmpty, sanitiseFileName, stringByteLengthIsInvalid, suppressCellKeyboardEvents, useDeferredPromise, useGridContext, useGridContextMenu, useGridFilter, useGridPopoverContext, useGridPopoverHook, useMenuState, usePostSortRowsHook, wait };
5314
5259
  //# sourceMappingURL=step-ag-grid.esm.js.map