@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.
@@ -1,3 +1,4 @@
1
+ import { ForwardedRef } from "react";
1
2
  export interface GridNoRowsOverlayProps {
2
3
  loading: boolean;
3
4
  rowCount: number | undefined | null;
@@ -6,4 +7,5 @@ export interface GridNoRowsOverlayProps {
6
7
  noRowsMatchingOverlayText: string | undefined;
7
8
  headerRowHeight: number;
8
9
  }
9
- export declare const GridNoRowsOverlay: (props: GridNoRowsOverlayProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const GridNoRowsOverlayFr: (props: GridNoRowsOverlayProps, externalRef: ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const GridNoRowsOverlay: import("react").ForwardRefExoticComponent<GridNoRowsOverlayProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -264,7 +264,7 @@ const sanitiseFileName = (filename) => {
264
264
  return valid.slice(0, -fileExt.length - 1).slice(0, 64) + "." + fileExt;
265
265
  };
266
266
 
267
- const GridLoadingOverlayComponent = (props) => (jsxRuntime.jsx("div", { style: {
267
+ const GridLoadingOverlayComponentFr = (props, externalRef) => (jsxRuntime.jsx("div", { ref: externalRef, style: {
268
268
  left: 0,
269
269
  top: 0,
270
270
  bottom: 0,
@@ -272,15 +272,20 @@ const GridLoadingOverlayComponent = (props) => (jsxRuntime.jsx("div", { style: {
272
272
  position: "absolute",
273
273
  backgroundColor: "rgba(255,255,255,0.5)",
274
274
  }, children: jsxRuntime.jsx("div", { style: { height: "100%", position: "relative" }, children: jsxRuntime.jsx("div", { style: { position: "absolute", left: 0, top: props.headerRowHeight, right: 0, bottom: 0 }, children: jsxRuntime.jsx(lui.LuiStatusSpinner, {}) }) }) }));
275
- const GridNoRowsOverlay = (props) => {
276
- if (props.loading)
277
- return jsxRuntime.jsx(GridLoadingOverlayComponent, { headerRowHeight: props.headerRowHeight });
278
- if (props.rowCount === 0)
279
- return jsxRuntime.jsx("div", { children: props.noRowsOverlayText ?? "There are currently no rows" });
280
- if (props.filteredRowCount === 0)
281
- return jsxRuntime.jsx("div", { children: props.noRowsMatchingOverlayText ?? "All rows have been filtered" });
282
- return jsxRuntime.jsx("span", {});
275
+ const GridLoadingOverlayComponent = React.forwardRef(GridLoadingOverlayComponentFr);
276
+ const GridNoRowsOverlayFr = (props, externalRef) => {
277
+ if (props.loading) {
278
+ return jsxRuntime.jsx(GridLoadingOverlayComponent, { ref: externalRef, headerRowHeight: props.headerRowHeight });
279
+ }
280
+ if (props.rowCount === 0) {
281
+ return jsxRuntime.jsx("div", { ref: externalRef, children: props.noRowsOverlayText ?? "There are currently no rows" });
282
+ }
283
+ if (props.filteredRowCount === 0) {
284
+ return jsxRuntime.jsx("div", { ref: externalRef, children: props.noRowsMatchingOverlayText ?? "All rows have been filtered" });
285
+ }
286
+ return jsxRuntime.jsx("div", { ref: externalRef });
283
287
  };
288
+ const GridNoRowsOverlay = React.forwardRef(GridNoRowsOverlayFr);
284
289
 
285
290
  /**
286
291
  * Retains last sort order from via <AgGrid postRowSort>.
@@ -4459,8 +4464,8 @@ const GridPopoutEditMultiSelect = (colDef, props) => GridCell(colDef, {
4459
4464
  editor: GridFormMultiSelect,
4460
4465
  ...props,
4461
4466
  editorParams: {
4462
- className: "GridMultiSelect-containerMedium",
4463
4467
  ...props.editorParams,
4468
+ className: clsx("GridMultiSelect-containerMedium", props.editorParams?.className),
4464
4469
  },
4465
4470
  });
4466
4471
 
@@ -4468,8 +4473,8 @@ const GridPopoutEditMultiSelectGrid = (colDef, props) => GridCell(colDef, {
4468
4473
  editor: GridFormMultiSelectGrid,
4469
4474
  ...props,
4470
4475
  editorParams: {
4471
- className: "GridMultiSelect-containerMedium",
4472
4476
  ...props.editorParams,
4477
+ className: clsx("GridMultiSelect-containerMedium", props.editorParams?.className),
4473
4478
  },
4474
4479
  });
4475
4480
 
@@ -4537,9 +4542,8 @@ const GridPopoverEditDropDown = (colDef, props) => GridCell(colDef, {
4537
4542
  editor: GridFormDropDown,
4538
4543
  ...props,
4539
4544
  editorParams: {
4540
- // Defaults to large size container
4541
- className: "GridPopoverEditDropDown-containerLarge",
4542
4545
  ...props.editorParams,
4546
+ className: clsx("GridPopoverEditDropDown-containerLarge", props.editorParams?.className),
4543
4547
  },
4544
4548
  });
4545
4549
 
@@ -5325,6 +5329,7 @@ exports.GridHeaderSelect = GridHeaderSelect;
5325
5329
  exports.GridIcon = GridIcon;
5326
5330
  exports.GridLoadableCell = GridLoadableCell;
5327
5331
  exports.GridNoRowsOverlay = GridNoRowsOverlay;
5332
+ exports.GridNoRowsOverlayFr = GridNoRowsOverlayFr;
5328
5333
  exports.GridPopoutEditMultiSelect = GridPopoutEditMultiSelect;
5329
5334
  exports.GridPopoutEditMultiSelectGrid = GridPopoutEditMultiSelectGrid;
5330
5335
  exports.GridPopoverContext = GridPopoverContext;