@gridsuite/commons-ui 0.205.0 → 0.206.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.
Files changed (64) hide show
  1. package/dist/components/announcement/AnnouncementBanner.d.ts +1 -1
  2. package/dist/components/announcement/AnnouncementBanner.js +3 -2
  3. package/dist/components/announcement/AnnouncementNotification.d.ts +1 -1
  4. package/dist/components/announcement/useGlobalAnnouncement.d.ts +1 -1
  5. package/dist/components/authentication/SignInCallbackHandler.d.ts +1 -1
  6. package/dist/components/authentication/SilentRenewCallbackHandler.d.ts +1 -1
  7. package/dist/components/authentication/authenticationType.d.ts +1 -1
  8. package/dist/components/authentication/utils/authService.d.ts +1 -6
  9. package/dist/components/authentication/utils/authService.js +18 -9
  10. package/dist/components/authentication/utils/userManagerMock.d.ts +7 -9
  11. package/dist/components/authentication/utils/userManagerMock.js +23 -27
  12. package/dist/components/customAGGrid/cell-renderers.js +7 -6
  13. package/dist/components/dnd-table/dnd-table-bottom-left-buttons.js +4 -5
  14. package/dist/components/dnd-table/dnd-table-bottom-right-buttons.js +6 -9
  15. package/dist/components/dnd-table/dnd-table.js +3 -3
  16. package/dist/components/dnd-table-v2/deletable-table-row.js +3 -2
  17. package/dist/components/dnd-table-v2/dnd-table-bottom-left-buttons.js +4 -5
  18. package/dist/components/dnd-table-v2/dnd-table-bottom-right-buttons.js +6 -9
  19. package/dist/components/dnd-table-v2/dnd-table-row.js +3 -3
  20. package/dist/components/dnd-table-v2/dnd-table.js +3 -2
  21. package/dist/components/flatParameters/FlatParameters.js +3 -3
  22. package/dist/components/grid/grid-item.js +3 -2
  23. package/dist/components/index.d.ts +1 -0
  24. package/dist/components/index.js +2 -0
  25. package/dist/components/inputs/ActivableChip.js +3 -2
  26. package/dist/components/inputs/reactHookForm/DirectoryItemsInput.js +3 -2
  27. package/dist/components/inputs/reactHookForm/agGridTable/BottomRightButtons.js +3 -3
  28. package/dist/components/inputs/reactHookForm/expandableInput/DeletableRow.js +3 -2
  29. package/dist/components/inputs/reactHookForm/text/DescriptionInput.js +3 -2
  30. package/dist/components/inputs/reactHookForm/utils/HelperPreviousValue.js +3 -4
  31. package/dist/components/network-modification-table/renderers/name-cell.js +3 -2
  32. package/dist/components/network-modifications/common/activePowerControl/ActivePowerControlForm.js +3 -2
  33. package/dist/components/network-modifications/common/connectivity/PositionForm.js +3 -2
  34. package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +3 -2
  35. package/dist/components/overflowableText/OverflowableText.js +3 -2
  36. package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.js +3 -2
  37. package/dist/components/parameters/common/parameter-field.js +3 -2
  38. package/dist/components/parameters/common/parameter-table/parameter-table.js +3 -2
  39. package/dist/components/parameters/common/parameter-table/table-row.js +3 -2
  40. package/dist/components/parameters/common/parameter-table-field/parameter-table-field.js +3 -3
  41. package/dist/components/parameters/common/parameters-edition-dialog-props.d.ts +1 -1
  42. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table.js +3 -2
  43. package/dist/components/parameters/common/widget/parameter-float.js +3 -2
  44. package/dist/components/parameters/dynamic-simulation/curve/common/grid-buttons.js +4 -5
  45. package/dist/components/parameters/dynamic-simulation/curve/dialog/curve-selector-dialog.js +4 -5
  46. package/dist/components/parameters/network-visualizations/network-visualizations-form.d.ts +1 -1
  47. package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.d.ts +1 -1
  48. package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.js +4 -4
  49. package/dist/components/parameters/short-circuit/short-circuit-icc-cluster-table-row.js +3 -2
  50. package/dist/components/parameters/short-circuit/short-circuit-icc-cluster-table.js +4 -3
  51. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table.js +3 -2
  52. package/dist/components/parameters/voltage-init/voltage-limits-parameters.js +3 -3
  53. package/dist/components/tooltip/CustomTooltip.d.ts +2 -0
  54. package/dist/components/tooltip/CustomTooltip.js +9 -0
  55. package/dist/components/tooltip/index.d.ts +1 -0
  56. package/dist/components/tooltip/index.js +4 -0
  57. package/dist/components/topBar/AboutDialog.js +3 -5
  58. package/dist/components/topBar/TopBar.d.ts +1 -1
  59. package/dist/components/topBar/UserInformationDialog.d.ts +1 -1
  60. package/dist/hooks/use-parameters-backend.d.ts +1 -1
  61. package/dist/index.js +2 -0
  62. package/dist/redux/actions/authActions.d.ts +1 -1
  63. package/dist/redux/commonStore.d.ts +1 -1
  64. package/package.json +2 -2
@@ -1,9 +1,10 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { TableContainer, Table, TableHead, TableRow, Tooltip, TableCell, IconButton, TableBody } from "@mui/material";
2
+ import { TableContainer, Table, TableHead, TableRow, TableCell, IconButton, TableBody } from "@mui/material";
3
3
  import { AddCircle } from "@mui/icons-material";
4
4
  import { useFieldArray } from "react-hook-form";
5
5
  import { FormattedMessage } from "react-intl";
6
6
  import { useCallback } from "react";
7
+ import { CustomTooltip } from "../../tooltip/CustomTooltip.js";
7
8
  import { ShortCircuitIccClusterTableRow } from "./short-circuit-icc-cluster-table-row.js";
8
9
  const styles = {
9
10
  tableContainer: (theme) => ({
@@ -39,8 +40,8 @@ function ShortCircuitIccClusterTable({
39
40
  );
40
41
  return /* @__PURE__ */ jsx(TableContainer, { sx: styles.tableContainer, children: /* @__PURE__ */ jsxs(Table, { stickyHeader: true, size: "small", sx: styles.table, children: [
41
42
  /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
42
- columnsDefinition.map((column) => /* @__PURE__ */ jsx(Tooltip, { title: column.tooltip, children: /* @__PURE__ */ jsx(TableCell, { align: "center", sx: { width: column.width }, children: column.label }) }, column.dataKey)),
43
- /* @__PURE__ */ jsx(TableCell, { align: "center", sx: { width: "5%" }, children: /* @__PURE__ */ jsx(Tooltip, { title: /* @__PURE__ */ jsx(FormattedMessage, { id: "AddRows" }), children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(IconButton, { size: "small", disabled: false, onClick: handleAddRowsButton, children: /* @__PURE__ */ jsx(AddCircle, { fontSize: "small" }) }) }) }) })
43
+ columnsDefinition.map((column) => /* @__PURE__ */ jsx(CustomTooltip, { title: column.tooltip, children: /* @__PURE__ */ jsx(TableCell, { align: "center", sx: { width: column.width }, children: column.label }) }, column.dataKey)),
44
+ /* @__PURE__ */ jsx(TableCell, { align: "center", sx: { width: "5%" }, children: /* @__PURE__ */ jsx(CustomTooltip, { title: /* @__PURE__ */ jsx(FormattedMessage, { id: "AddRows" }), children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(IconButton, { size: "small", disabled: false, onClick: handleAddRowsButton, children: /* @__PURE__ */ jsx(AddCircle, { fontSize: "small" }) }) }) }) })
44
45
  ] }) }),
45
46
  /* @__PURE__ */ jsx(TableBody, { children: rows.map((row, index) => /* @__PURE__ */ jsx(
46
47
  ShortCircuitIccClusterTableRow,
@@ -1,6 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { TableContainer, Table, TableHead, TableRow, Tooltip, TableCell, TableBody } from "@mui/material";
2
+ import { TableContainer, Table, TableHead, TableRow, TableCell, TableBody } from "@mui/material";
3
3
  import { useFieldArray } from "react-hook-form";
4
+ import { CustomTooltip } from "../../tooltip/CustomTooltip.js";
4
5
  import { ShortCircuitIccMaterialTableRow } from "./short-circuit-icc-material-table-row.js";
5
6
  const styles = {
6
7
  tableContainer: (theme) => ({
@@ -23,7 +24,7 @@ function ShortCircuitIccMaterialTable({
23
24
  });
24
25
  return /* @__PURE__ */ jsx(TableContainer, { sx: styles.tableContainer, children: /* @__PURE__ */ jsxs(Table, { stickyHeader: true, size: "small", sx: styles.table, children: [
25
26
  /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
26
- columnsDefinition.map((column) => /* @__PURE__ */ jsx(Tooltip, { title: column.tooltip, children: /* @__PURE__ */ jsx(TableCell, { align: "center", sx: { width: column.width }, children: column.label }) }, column.dataKey)),
27
+ columnsDefinition.map((column) => /* @__PURE__ */ jsx(CustomTooltip, { title: column.tooltip, children: /* @__PURE__ */ jsx(TableCell, { align: "center", sx: { width: column.width }, children: column.label }) }, column.dataKey)),
27
28
  /* @__PURE__ */ jsx(TableCell, { align: "center", sx: { visibility: "hidden", width: "5%" } })
28
29
  ] }) }),
29
30
  /* @__PURE__ */ jsx(TableBody, { children: rows.map((row, index) => /* @__PURE__ */ jsx(
@@ -1,8 +1,9 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
3
  import { Info } from "@mui/icons-material";
4
- import { Tooltip, Grid } from "@mui/material";
4
+ import { Grid } from "@mui/material";
5
5
  import { useIntl } from "react-intl";
6
+ import { CustomTooltip } from "../../tooltip/CustomTooltip.js";
6
7
  import { LOW_VOLTAGE_LIMIT, HIGH_VOLTAGE_LIMIT, VOLTAGE_LIMITS_MODIFICATION, VOLTAGE_LIMITS_DEFAULT } from "./constants.js";
7
8
  import { VoltageAdornment } from "../../../utils/constants/adornments.js";
8
9
  import { FILTERS } from "../../../utils/constants/filterConstant.js";
@@ -46,12 +47,11 @@ function VoltageLimitsParameters() {
46
47
  const intl = useIntl();
47
48
  const VoltageLevelFilterTooltip = useMemo(() => {
48
49
  return /* @__PURE__ */ jsx(
49
- Tooltip,
50
+ CustomTooltip,
50
51
  {
51
52
  title: intl.formatMessage({
52
53
  id: "VoltageLevelFilterTooltip"
53
54
  }),
54
- placement: "right-start",
55
55
  sx: { marginLeft: 1 },
56
56
  children: /* @__PURE__ */ jsx(Info, {})
57
57
  }
@@ -0,0 +1,2 @@
1
+ import { TooltipProps } from '@mui/material';
2
+ export declare function CustomTooltip(props: Readonly<TooltipProps>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Tooltip } from "@mui/material";
3
+ function CustomTooltip(props) {
4
+ const { children, ...tooltipProps } = props;
5
+ return /* @__PURE__ */ jsx(Tooltip, { arrow: true, enterDelay: 250, ...tooltipProps, children });
6
+ }
7
+ export {
8
+ CustomTooltip
9
+ };
@@ -0,0 +1 @@
1
+ export * from './CustomTooltip';
@@ -0,0 +1,4 @@
1
+ import { CustomTooltip } from "./CustomTooltip.js";
2
+ export {
3
+ CustomTooltip
4
+ };
@@ -1,9 +1,10 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useCallback } from "react";
3
- import { useTheme, Dialog, useMediaQuery, DialogTitle, Collapse, Alert, Box, Fade, CircularProgress, Typography, DialogContent, Accordion, AccordionSummary, AccordionDetails, Grid, DialogActions, Button, Tooltip, Zoom, Stack, tooltipClasses } from "@mui/material";
3
+ import { useTheme, Dialog, useMediaQuery, DialogTitle, Collapse, Alert, Box, Fade, CircularProgress, Typography, DialogContent, Accordion, AccordionSummary, AccordionDetails, Grid, DialogActions, Button, Zoom, Stack, tooltipClasses } from "@mui/material";
4
4
  import { LoadingButton } from "@mui/lab";
5
5
  import { Refresh, Gavel, ExpandMore, Apps, QuestionMark, DnsOutlined, WidgetsOutlined } from "@mui/icons-material";
6
6
  import { FormattedMessage } from "react-intl";
7
+ import { CustomTooltip } from "../tooltip/CustomTooltip.js";
7
8
  import { LogoText } from "./GridLogo.js";
8
9
  import { mergeSx } from "../../utils/styles.js";
9
10
  const styles = {
@@ -133,14 +134,11 @@ function Module({ type, name, version, gitTag }) {
133
134
  }
134
135
  },
135
136
  children: /* @__PURE__ */ jsx(
136
- Tooltip,
137
+ CustomTooltip,
137
138
  {
138
139
  TransitionComponent: Zoom,
139
- enterDelay: 2500,
140
140
  enterNextDelay: 350,
141
141
  leaveDelay: 200,
142
- placement: "bottom-start",
143
- arrow: true,
144
142
  sx: moduleStyles.tooltip,
145
143
  title: /* @__PURE__ */ jsxs(Fragment, { children: [
146
144
  /* @__PURE__ */ jsx(Typography, { variant: "body1", children: name || "<?>" }),
@@ -1,5 +1,5 @@
1
1
  import { PropsWithChildren, ReactNode } from 'react';
2
- import { User } from 'oidc-client';
2
+ import { User } from 'oidc-client-ts';
3
3
  import { GridLogoProps } from './GridLogo';
4
4
  import { AboutDialogProps } from './AboutDialog';
5
5
  import { LogoutProps } from '../authentication/Logout';
@@ -1,4 +1,4 @@
1
- import { User } from 'oidc-client';
1
+ import { User } from 'oidc-client-ts';
2
2
  interface UserInformationDialogProps {
3
3
  openDialog: boolean;
4
4
  onClose: () => void;
@@ -1,5 +1,5 @@
1
1
  import { UUID } from 'node:crypto';
2
- import { User } from 'oidc-client';
2
+ import { User } from 'oidc-client-ts';
3
3
  import { ComputingType } from '../components/parameters/common/computing-type';
4
4
  import { BackendFunctions, UseParametersBackendReturnProps } from '../utils/types/parameters.type';
5
5
  export declare enum OptionalServicesStatus {
package/dist/index.js CHANGED
@@ -56,6 +56,7 @@ import { CONTINGENCY_LIST_EQUIPMENTS, FILTER_EQUIPMENTS } from "./components/fil
56
56
  import { FlatParameters, extractDefault } from "./components/flatParameters/FlatParameters.js";
57
57
  import "react/jsx-runtime";
58
58
  import "@mui/material";
59
+ import { CustomTooltip } from "./components/tooltip/CustomTooltip.js";
59
60
  import "react-intl";
60
61
  import { SelectClearable } from "./components/inputs/SelectClearable.js";
61
62
  import { OverflowableChip } from "./components/inputs/reactHookForm/OverflowableChip.js";
@@ -492,6 +493,7 @@ export {
492
493
  CustomMuiDialog,
493
494
  CustomNestedMenuItem,
494
495
  CustomReactQueryBuilder,
496
+ CustomTooltip,
495
497
  CustomVoltageLevelTable,
496
498
  CustomVoltageLevelTableCell,
497
499
  CustomVoltageLevelTableRow,
@@ -1,4 +1,4 @@
1
- import { User } from 'oidc-client';
1
+ import { User } from 'oidc-client-ts';
2
2
  export interface Action<T> {
3
3
  type: T;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { User } from 'oidc-client';
1
+ import { User } from 'oidc-client-ts';
2
2
  export type CommonStoreState = {
3
3
  user: User | null;
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.205.0",
3
+ "version": "0.206.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",
@@ -47,7 +47,7 @@
47
47
  "jwt-decode": "^4.0.0",
48
48
  "localized-countries": "^2.0.0",
49
49
  "mui-nested-menu": "^4.0.1",
50
- "oidc-client": "^1.11.5",
50
+ "oidc-client-ts": "^3.5.0",
51
51
  "prop-types": "^15.8.1",
52
52
  "react-csv-downloader": "^3.3.0",
53
53
  "react-dnd": "^16.0.1",