@linzjs/step-ag-grid 21.1.1 → 21.1.2
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/dist/src/components/GridNoRowsOverlay.d.ts +3 -1
- package/dist/step-ag-grid.cjs.js +15 -9
- package/dist/step-ag-grid.cjs.js.map +1 -1
- package/dist/step-ag-grid.esm.js +16 -11
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/GridNoRowsOverlay.tsx +21 -7
|
@@ -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
|
|
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>>;
|
package/dist/step-ag-grid.cjs.js
CHANGED
|
@@ -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
|
|
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
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
if (props.
|
|
281
|
-
return jsxRuntime.jsx("div", { children: props.
|
|
282
|
-
|
|
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>.
|
|
@@ -5325,6 +5330,7 @@ exports.GridHeaderSelect = GridHeaderSelect;
|
|
|
5325
5330
|
exports.GridIcon = GridIcon;
|
|
5326
5331
|
exports.GridLoadableCell = GridLoadableCell;
|
|
5327
5332
|
exports.GridNoRowsOverlay = GridNoRowsOverlay;
|
|
5333
|
+
exports.GridNoRowsOverlayFr = GridNoRowsOverlayFr;
|
|
5328
5334
|
exports.GridPopoutEditMultiSelect = GridPopoutEditMultiSelect;
|
|
5329
5335
|
exports.GridPopoutEditMultiSelectGrid = GridPopoutEditMultiSelectGrid;
|
|
5330
5336
|
exports.GridPopoverContext = GridPopoverContext;
|