@gridsuite/commons-ui 0.118.1 → 0.119.1

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.
@@ -67,8 +67,7 @@ function DescriptionModificationDialog({
67
67
  name: FieldConstants.DESCRIPTION,
68
68
  label: "descriptionProperty",
69
69
  minRows: 3,
70
- rows: 3,
71
- "data-testid": "DescriptionInputField"
70
+ rows: 3
72
71
  }
73
72
  ) })
74
73
  }
@@ -106,7 +106,8 @@ function ExpertFilterForm() {
106
106
  resetOnConfirmation: handleResetOnConfirmation,
107
107
  message: "changeTypeMessage",
108
108
  validateButtonLabel: "button.changeType",
109
- sx: filterStyles.textField
109
+ sx: filterStyles.textField,
110
+ "data-testid": "EquipmentTypeSelector"
110
111
  }
111
112
  ) }),
112
113
  /* @__PURE__ */ jsx(Box, { sx: unscrollableDialogStyles.scrollableContent, children: watchEquipmentType && isSupportedEquipmentType(watchEquipmentType) && /* @__PURE__ */ jsx(CustomReactQueryBuilder, { name: EXPERT_FILTER_QUERY, fields: translatedFields }) })
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright (c) 2025, RTE (http://www.rte-france.com)
3
+ * This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+ */
7
+ export declare function PhotoLibraryIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import PhotoLibrary from "@material-symbols/svg-400/outlined/photo_library-fill.svg?react";
3
+ import { useTheme } from "@mui/material";
4
+ function PhotoLibraryIcon() {
5
+ const theme = useTheme();
6
+ return /* @__PURE__ */ jsx(
7
+ PhotoLibrary,
8
+ {
9
+ style: {
10
+ width: 14.4,
11
+ height: 14.4,
12
+ fill: theme.palette.text.primary
13
+ }
14
+ }
15
+ );
16
+ }
17
+ export {
18
+ PhotoLibraryIcon
19
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright (c) 2025, RTE (http://www.rte-france.com)
3
+ * This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+ */
7
+ export declare function TuneIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import Tune from "@material-symbols/svg-400/outlined/tune.svg?react";
3
+ import { useTheme } from "@mui/material";
4
+ function TuneIcon() {
5
+ const theme = useTheme();
6
+ return /* @__PURE__ */ jsx(
7
+ Tune,
8
+ {
9
+ style: {
10
+ width: 14.4,
11
+ height: 14.4,
12
+ fill: theme.palette.text.primary
13
+ }
14
+ }
15
+ );
16
+ }
17
+ export {
18
+ TuneIcon
19
+ };
@@ -8,3 +8,5 @@ export { LeftPanelOpenIcon } from './LeftPanelOpenIcon';
8
8
  export { ArrowsOutputIcon } from './ArrowsOutputIcon';
9
9
  export { LeftPanelCloseIcon } from './LeftPanelCloseIcon';
10
10
  export { DeviceHubIcon } from './DeviceHubIcon';
11
+ export { TuneIcon } from './TuneIcon';
12
+ export { PhotoLibraryIcon } from './PhotoLibraryIcon';
@@ -2,9 +2,13 @@ import { LeftPanelOpenIcon } from "./LeftPanelOpenIcon.js";
2
2
  import { ArrowsOutputIcon } from "./ArrowsOutputIcon.js";
3
3
  import { LeftPanelCloseIcon } from "./LeftPanelCloseIcon.js";
4
4
  import { DeviceHubIcon } from "./DeviceHubIcon.js";
5
+ import { TuneIcon } from "./TuneIcon.js";
6
+ import { PhotoLibraryIcon } from "./PhotoLibraryIcon.js";
5
7
  export {
6
8
  ArrowsOutputIcon,
7
9
  DeviceHubIcon,
8
10
  LeftPanelCloseIcon,
9
- LeftPanelOpenIcon
11
+ LeftPanelOpenIcon,
12
+ PhotoLibraryIcon,
13
+ TuneIcon
10
14
  };
@@ -128,6 +128,8 @@ import { LeftPanelOpenIcon } from "./icons/LeftPanelOpenIcon.js";
128
128
  import { ArrowsOutputIcon } from "./icons/ArrowsOutputIcon.js";
129
129
  import { LeftPanelCloseIcon } from "./icons/LeftPanelCloseIcon.js";
130
130
  import { DeviceHubIcon } from "./icons/DeviceHubIcon.js";
131
+ import { TuneIcon } from "./icons/TuneIcon.js";
132
+ import { PhotoLibraryIcon } from "./icons/PhotoLibraryIcon.js";
131
133
  import { ComputingType, formatComputingTypeLabel, isValidComputingType } from "./parameters/common/computing-type.js";
132
134
  import { PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, ReactivePowerAdornment, VOLTAGE_LEVEL, VoltageAdornment } from "./parameters/common/constant.js";
133
135
  import { LineSeparator } from "./parameters/common/line-separator.js";
@@ -374,6 +376,7 @@ export {
374
376
  ParameterLineDirectoryItemsInput,
375
377
  ParameterLineSlider,
376
378
  ParameterSwitch,
379
+ PhotoLibraryIcon,
377
380
  PopupConfirmationDialog,
378
381
  PredefinedParameters,
379
382
  PropertyValueEditor,
@@ -447,6 +450,7 @@ export {
447
450
  TopBar,
448
451
  TranslatedValueEditor,
449
452
  TreeViewFinder,
453
+ TuneIcon,
450
454
  UPDATE_BUS_VOLTAGE,
451
455
  USE_REACTIVE_LIMITS,
452
456
  UnauthorizedAccessAlert,
@@ -22,7 +22,7 @@ function DescriptionField({ expandingTextSx }) {
22
22
  setIsDescriptionFieldVisible(true);
23
23
  }
24
24
  }, [description]);
25
- return /* @__PURE__ */ jsx(Box, { children: !isDescriptionFieldVisible ? /* @__PURE__ */ jsx(Button, { startIcon: /* @__PURE__ */ jsx(ControlPoint, {}), onClick: handleOpenDescription, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "AddDescription" }) }) : /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "flex-start" }, children: [
25
+ return /* @__PURE__ */ jsx(Box, { children: !isDescriptionFieldVisible ? /* @__PURE__ */ jsx(Button, { startIcon: /* @__PURE__ */ jsx(ControlPoint, {}), onClick: handleOpenDescription, "data-testid": "AddDescriptionButton", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "AddDescription" }) }) : /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "flex-start" }, children: [
26
26
  /* @__PURE__ */ jsx(
27
27
  ExpandingTextField,
28
28
  {
@@ -30,8 +30,7 @@ function DescriptionField({ expandingTextSx }) {
30
30
  label: "descriptionProperty",
31
31
  minRows: 3,
32
32
  rows: 3,
33
- sx: expandingTextSx,
34
- "data-testid": "DescriptionInputField"
33
+ sx: expandingTextSx
35
34
  }
36
35
  ),
37
36
  /* @__PURE__ */ jsx(
@@ -43,7 +43,8 @@ function ExpandingTextField({
43
43
  whiteSpace: "pre",
44
44
  resize: "none"
45
45
  // or 'horizontal' for horizontal resizing
46
- }
46
+ },
47
+ inputProps: { "data-testid": "DescriptionInputField" }
47
48
  },
48
49
  helperText: /* @__PURE__ */ jsx(Typography, { variant: "caption", children: descriptionCounter }),
49
50
  FormHelperTextProps: {
@@ -56,7 +56,12 @@ function UniqueNameInput({
56
56
  fullWidth,
57
57
  error: !!error,
58
58
  helperText: translatedError,
59
- InputProps: { endAdornment },
59
+ InputProps: {
60
+ endAdornment,
61
+ inputProps: {
62
+ "data-testid": "NameInputField"
63
+ }
64
+ },
60
65
  ...formProps
61
66
  }
62
67
  );
package/dist/index.js CHANGED
@@ -129,6 +129,8 @@ import { LeftPanelOpenIcon } from "./components/icons/LeftPanelOpenIcon.js";
129
129
  import { ArrowsOutputIcon } from "./components/icons/ArrowsOutputIcon.js";
130
130
  import { LeftPanelCloseIcon } from "./components/icons/LeftPanelCloseIcon.js";
131
131
  import { DeviceHubIcon } from "./components/icons/DeviceHubIcon.js";
132
+ import { TuneIcon } from "./components/icons/TuneIcon.js";
133
+ import { PhotoLibraryIcon } from "./components/icons/PhotoLibraryIcon.js";
132
134
  import { ComputingType, formatComputingTypeLabel, isValidComputingType } from "./components/parameters/common/computing-type.js";
133
135
  import { PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, ReactivePowerAdornment, VOLTAGE_LEVEL, VoltageAdornment } from "./components/parameters/common/constant.js";
134
136
  import { LineSeparator } from "./components/parameters/common/line-separator.js";
@@ -528,6 +530,7 @@ export {
528
530
  ParameterLineSlider,
529
531
  ParameterSwitch,
530
532
  ParameterType,
533
+ PhotoLibraryIcon,
531
534
  PopupConfirmationDialog,
532
535
  PredefinedParameters,
533
536
  PropertyValueEditor,
@@ -613,6 +616,7 @@ export {
613
616
  TopBar,
614
617
  TranslatedValueEditor,
615
618
  TreeViewFinder,
619
+ TuneIcon,
616
620
  TwoWindingTransfo,
617
621
  UNAUTHORIZED_USER_INFO,
618
622
  UPDATE_BUS_VOLTAGE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.118.1",
3
+ "version": "0.119.1",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",