@gridsuite/commons-ui 0.229.0 → 0.230.0
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,14 +1,16 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useMemo } from "react";
|
|
3
|
-
import { AgGridReact } from "ag-grid-react";
|
|
3
|
+
import { AgGridProvider, AgGridReact } from "ag-grid-react";
|
|
4
4
|
import "ag-grid-community/styles/ag-grid.css";
|
|
5
5
|
import "ag-grid-community/styles/ag-theme-alpine.css";
|
|
6
|
+
import { AllCommunityModule } from "ag-grid-community";
|
|
6
7
|
import { AG_GRID_LOCALE_EN, AG_GRID_LOCALE_FR } from "@ag-grid-community/locale";
|
|
7
8
|
import { useIntl } from "react-intl";
|
|
8
9
|
import { useTheme, Box } from "@mui/material";
|
|
9
10
|
import { mergeSx } from "../../../utils/styles.js";
|
|
10
11
|
import { CUSTOM_AGGRID_THEME, styles } from "./customAggrid.style.js";
|
|
11
12
|
import { LANG_ENGLISH, LANG_FRENCH } from "../../../utils/langs.js";
|
|
13
|
+
const modules = [AllCommunityModule];
|
|
12
14
|
function useAgGridLocale(overrideLocales) {
|
|
13
15
|
const intl = useIntl();
|
|
14
16
|
return useMemo(() => {
|
|
@@ -43,7 +45,7 @@ const CustomAGGrid = forwardRef(
|
|
|
43
45
|
component: "div",
|
|
44
46
|
sx: mergeSx(styles.grid, sx),
|
|
45
47
|
className: `${theme.aggrid.theme} ${CUSTOM_AGGRID_THEME}`,
|
|
46
|
-
children: /* @__PURE__ */ jsx(
|
|
48
|
+
children: /* @__PURE__ */ jsx(AgGridProvider, { modules, children: /* @__PURE__ */ jsx(
|
|
47
49
|
AgGridReact,
|
|
48
50
|
{
|
|
49
51
|
ref,
|
|
@@ -53,7 +55,7 @@ const CustomAGGrid = forwardRef(
|
|
|
53
55
|
theme: "legacy",
|
|
54
56
|
...agGridReactProps
|
|
55
57
|
}
|
|
56
|
-
)
|
|
58
|
+
) })
|
|
57
59
|
}
|
|
58
60
|
);
|
|
59
61
|
}
|
|
@@ -118,7 +118,7 @@ function ElementSaveDialog({
|
|
|
118
118
|
onClose();
|
|
119
119
|
}, [onClose, reset, initialOperation]);
|
|
120
120
|
useEffect(() => {
|
|
121
|
-
if (!isCreateMode) {
|
|
121
|
+
if (!isCreateMode || !defaultName && !prefixIdForGeneratedName) {
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
const name = defaultName ?? `${intl.formatMessage({ id: prefixIdForGeneratedName })}-${(/* @__PURE__ */ new Date()).toISOString()}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridsuite/commons-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.230.0",
|
|
4
4
|
"description": "common react components for gridsuite applications",
|
|
5
5
|
"author": "gridsuite team",
|
|
6
6
|
"homepage": "https://github.com/gridsuite",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"licenses-check": "license-checker --summary --excludePrivatePackages --production --onlyAllow \"$( jq -r .onlyAllow[] license-checker-config.json | tr '\n' ';')\" --excludePackages \"$( jq -r .excludePackages[] license-checker-config.json | tr '\n' ';')\""
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@ag-grid-community/locale": "^
|
|
49
|
+
"@ag-grid-community/locale": "^35.3.1",
|
|
50
50
|
"@hello-pangea/dnd": "^18.0.1",
|
|
51
51
|
"@material-symbols/svg-400": "^0.31.9",
|
|
52
52
|
"@react-querybuilder/dnd": "^8.11.0",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"@mui/lab": "6.0.1-beta.36",
|
|
78
78
|
"@mui/material": "^6.5.0",
|
|
79
79
|
"@mui/x-tree-view": "^8.21.0",
|
|
80
|
-
"ag-grid-community": "^
|
|
81
|
-
"ag-grid-react": "^
|
|
80
|
+
"ag-grid-community": "^35.3.1",
|
|
81
|
+
"ag-grid-react": "^35.3.1",
|
|
82
82
|
"notistack": "^3.0.2",
|
|
83
83
|
"react": "^19.2.0",
|
|
84
84
|
"react-dom": "^19.2.0",
|
|
@@ -120,8 +120,8 @@
|
|
|
120
120
|
"@types/react-resizable": "^3.0.8",
|
|
121
121
|
"@types/react-window": "^1.8.8",
|
|
122
122
|
"@vitejs/plugin-react": "^5.0.4",
|
|
123
|
-
"ag-grid-community": "^
|
|
124
|
-
"ag-grid-react": "^
|
|
123
|
+
"ag-grid-community": "^35.3.1",
|
|
124
|
+
"ag-grid-react": "^35.3.1",
|
|
125
125
|
"babel-eslint": "^10.1.0",
|
|
126
126
|
"babel-preset-airbnb": "^5.0.0",
|
|
127
127
|
"babel-preset-vite": "^1.1.3",
|