@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.
- package/dist/src/components/GridNoRowsOverlay.d.ts +3 -1
- package/dist/step-ag-grid.cjs.js +18 -13
- package/dist/step-ag-grid.cjs.js.map +1 -1
- package/dist/step-ag-grid.esm.js +19 -15
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/GridNoRowsOverlay.tsx +21 -7
- package/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.ts +2 -1
- package/src/components/gridPopoverEdit/GridPopoutEditMultiSelectGrid.ts +2 -1
- package/src/components/gridPopoverEdit/GridPopoverEditDropDown.ts +2 -2
|
@@ -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>.
|
|
@@ -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;
|