@linzjs/step-ag-grid 21.1.1 → 21.1.3

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.
@@ -3,7 +3,7 @@ import { LuiMiniSpinner, LuiStatusSpinner, LuiIcon, LuiButton, LuiCheckboxInput,
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, useCallback, useState, useMemo, memo, forwardRef, useReducer, cloneElement, useImperativeHandle, Fragment } from 'react';
6
+ import React, { useRef, useEffect, useLayoutEffect, createContext, useContext, forwardRef, useCallback, useState, useMemo, memo, useReducer, cloneElement, useImperativeHandle, Fragment } from 'react';
7
7
  import { unstable_batchedUpdates, flushSync, createPortal } from 'react-dom';
8
8
 
9
9
  /**
@@ -262,7 +262,7 @@ const sanitiseFileName = (filename) => {
262
262
  return valid.slice(0, -fileExt.length - 1).slice(0, 64) + "." + fileExt;
263
263
  };
264
264
 
265
- const GridLoadingOverlayComponent = (props) => (jsx("div", { style: {
265
+ const GridLoadingOverlayComponentFr = (props, externalRef) => (jsx("div", { ref: externalRef, style: {
266
266
  left: 0,
267
267
  top: 0,
268
268
  bottom: 0,
@@ -270,15 +270,20 @@ const GridLoadingOverlayComponent = (props) => (jsx("div", { style: {
270
270
  position: "absolute",
271
271
  backgroundColor: "rgba(255,255,255,0.5)",
272
272
  }, children: jsx("div", { style: { height: "100%", position: "relative" }, children: jsx("div", { style: { position: "absolute", left: 0, top: props.headerRowHeight, right: 0, bottom: 0 }, children: jsx(LuiStatusSpinner, {}) }) }) }));
273
- const GridNoRowsOverlay = (props) => {
274
- if (props.loading)
275
- return jsx(GridLoadingOverlayComponent, { headerRowHeight: props.headerRowHeight });
276
- if (props.rowCount === 0)
277
- return jsx("div", { children: props.noRowsOverlayText ?? "There are currently no rows" });
278
- if (props.filteredRowCount === 0)
279
- return jsx("div", { children: props.noRowsMatchingOverlayText ?? "All rows have been filtered" });
280
- return jsx("span", {});
273
+ const GridLoadingOverlayComponent = forwardRef(GridLoadingOverlayComponentFr);
274
+ const GridNoRowsOverlayFr = (props, externalRef) => {
275
+ if (props.loading) {
276
+ return jsx(GridLoadingOverlayComponent, { ref: externalRef, headerRowHeight: props.headerRowHeight });
277
+ }
278
+ if (props.rowCount === 0) {
279
+ return jsx("div", { ref: externalRef, children: props.noRowsOverlayText ?? "There are currently no rows" });
280
+ }
281
+ if (props.filteredRowCount === 0) {
282
+ return jsx("div", { ref: externalRef, children: props.noRowsMatchingOverlayText ?? "All rows have been filtered" });
283
+ }
284
+ return jsx("div", { ref: externalRef });
281
285
  };
286
+ const GridNoRowsOverlay = forwardRef(GridNoRowsOverlayFr);
282
287
 
283
288
  /**
284
289
  * Retains last sort order from via <AgGrid postRowSort>.
@@ -4457,8 +4462,8 @@ const GridPopoutEditMultiSelect = (colDef, props) => GridCell(colDef, {
4457
4462
  editor: GridFormMultiSelect,
4458
4463
  ...props,
4459
4464
  editorParams: {
4460
- className: "GridMultiSelect-containerMedium",
4461
4465
  ...props.editorParams,
4466
+ className: clsx("GridMultiSelect-containerMedium", props.editorParams?.className),
4462
4467
  },
4463
4468
  });
4464
4469
 
@@ -4466,8 +4471,8 @@ const GridPopoutEditMultiSelectGrid = (colDef, props) => GridCell(colDef, {
4466
4471
  editor: GridFormMultiSelectGrid,
4467
4472
  ...props,
4468
4473
  editorParams: {
4469
- className: "GridMultiSelect-containerMedium",
4470
4474
  ...props.editorParams,
4475
+ className: clsx("GridMultiSelect-containerMedium", props.editorParams?.className),
4471
4476
  },
4472
4477
  });
4473
4478
 
@@ -4535,9 +4540,8 @@ const GridPopoverEditDropDown = (colDef, props) => GridCell(colDef, {
4535
4540
  editor: GridFormDropDown,
4536
4541
  ...props,
4537
4542
  editorParams: {
4538
- // Defaults to large size container
4539
- className: "GridPopoverEditDropDown-containerLarge",
4540
4543
  ...props.editorParams,
4544
+ className: clsx("GridPopoverEditDropDown-containerLarge", props.editorParams?.className),
4541
4545
  },
4542
4546
  });
4543
4547
 
@@ -5287,5 +5291,5 @@ const useDeferredPromise = () => {
5287
5291
  };
5288
5292
  };
5289
5293
 
5290
- 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, 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 };
5294
+ 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 };
5291
5295
  //# sourceMappingURL=step-ag-grid.esm.js.map