@gridsuite/commons-ui 0.154.0 → 0.156.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.
- package/README.md +0 -1
- package/dist/components/icons/index.d.ts +0 -3
- package/dist/components/icons/index.js +1 -7
- package/dist/components/index.js +2 -6
- package/dist/components/inputs/reactHookForm/agGridTable/csvUploader/CsvUploader.js +1 -0
- package/dist/components/parameters/index.js +2 -0
- package/dist/components/parameters/pcc-min/index.d.ts +1 -0
- package/dist/components/parameters/pcc-min/index.js +2 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-dialog.d.ts +2 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-dialog.js +97 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-inline.js +67 -7
- package/dist/components/parameters/pcc-min/use-pcc-min-parameters-form.d.ts +10 -3
- package/dist/components/parameters/pcc-min/use-pcc-min-parameters-form.js +37 -9
- package/dist/index.js +4 -7
- package/dist/services/index.js +2 -1
- package/dist/services/pcc-min.d.ts +1 -0
- package/dist/services/pcc-min.js +11 -0
- package/dist/translations/en/parameters.js +1 -0
- package/dist/utils/mapper/getFileIcon.js +1 -0
- package/dist/utils/types/elementType.d.ts +1 -0
- package/dist/utils/types/elementType.js +1 -0
- package/package.json +1 -1
- package/dist/components/icons/DeviceHubIcon.d.ts +0 -11
- package/dist/components/icons/DeviceHubIcon.js +0 -15
- package/dist/components/icons/PhotoLibraryIcon.d.ts +0 -7
- package/dist/components/icons/PhotoLibraryIcon.js +0 -19
- package/dist/components/icons/TuneIcon.d.ts +0 -13
- package/dist/components/icons/TuneIcon.js +0 -20
package/README.md
CHANGED
|
@@ -46,7 +46,6 @@ Only in this case, you need to follow the steps below:
|
|
|
46
46
|
- [Make a release action](https://github.com/gridsuite/commons-ui/actions/workflows/release.yml)
|
|
47
47
|
- In the 'run workflow' combobox select, let the branch on main
|
|
48
48
|
- Enter the type of evolution (major | minor | patch)
|
|
49
|
-
- Enter your NPM access token (when you create it, check the **Bypass two-factor authentication** checkbox to bypass 2FA, set **Packages and scopes** → **Permissions** to **Read and write** and let **Organizations** → **Permissions** to **No access**, see the [access token documentation](https://docs.npmjs.com/creating-and-viewing-access-tokens) for details)
|
|
50
49
|
- Click 'run workflow'
|
|
51
50
|
|
|
52
51
|
Otherwise ask someone who has the permission.
|
|
@@ -7,7 +7,4 @@
|
|
|
7
7
|
export { LeftPanelOpenIcon } from './LeftPanelOpenIcon';
|
|
8
8
|
export { ArrowsOutputIcon } from './ArrowsOutputIcon';
|
|
9
9
|
export { LeftPanelCloseIcon } from './LeftPanelCloseIcon';
|
|
10
|
-
export { DeviceHubIcon } from './DeviceHubIcon';
|
|
11
|
-
export { TuneIcon } from './TuneIcon';
|
|
12
|
-
export { PhotoLibraryIcon } from './PhotoLibraryIcon';
|
|
13
10
|
export { EditNoteIcon } from './EditNoteIcon';
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { LeftPanelOpenIcon } from "./LeftPanelOpenIcon.js";
|
|
2
2
|
import { ArrowsOutputIcon } from "./ArrowsOutputIcon.js";
|
|
3
3
|
import { LeftPanelCloseIcon } from "./LeftPanelCloseIcon.js";
|
|
4
|
-
import { DeviceHubIcon } from "./DeviceHubIcon.js";
|
|
5
|
-
import { TuneIcon } from "./TuneIcon.js";
|
|
6
|
-
import { PhotoLibraryIcon } from "./PhotoLibraryIcon.js";
|
|
7
4
|
import { EditNoteIcon } from "./EditNoteIcon.js";
|
|
8
5
|
export {
|
|
9
6
|
ArrowsOutputIcon,
|
|
10
|
-
DeviceHubIcon,
|
|
11
7
|
EditNoteIcon,
|
|
12
8
|
LeftPanelCloseIcon,
|
|
13
|
-
LeftPanelOpenIcon
|
|
14
|
-
PhotoLibraryIcon,
|
|
15
|
-
TuneIcon
|
|
9
|
+
LeftPanelOpenIcon
|
|
16
10
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -131,9 +131,6 @@ import { useListenerManager } from "./notifications/hooks/useListenerManager.js"
|
|
|
131
131
|
import { LeftPanelOpenIcon } from "./icons/LeftPanelOpenIcon.js";
|
|
132
132
|
import { ArrowsOutputIcon } from "./icons/ArrowsOutputIcon.js";
|
|
133
133
|
import { LeftPanelCloseIcon } from "./icons/LeftPanelCloseIcon.js";
|
|
134
|
-
import { DeviceHubIcon } from "./icons/DeviceHubIcon.js";
|
|
135
|
-
import { TuneIcon } from "./icons/TuneIcon.js";
|
|
136
|
-
import { PhotoLibraryIcon } from "./icons/PhotoLibraryIcon.js";
|
|
137
134
|
import { EditNoteIcon } from "./icons/EditNoteIcon.js";
|
|
138
135
|
import { ComputingType, formatComputingTypeLabel, isValidComputingType } from "./parameters/common/computing-type.js";
|
|
139
136
|
import { COMMON_PARAMETERS, 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, SPECIFIC_PARAMETERS, VERSION_PARAMETER, VOLTAGE_LEVEL, VoltageAdornment } from "./parameters/common/constant.js";
|
|
@@ -169,6 +166,7 @@ import { EquipmentsSelectionType } from "./parameters/voltage-init/voltage-init.
|
|
|
169
166
|
import { VoltageInitParametersEditionDialog } from "./parameters/voltage-init/voltage-init-parameters-dialog.js";
|
|
170
167
|
import { VoltageInitParametersInLine } from "./parameters/voltage-init/voltage-init-parameters-inline.js";
|
|
171
168
|
import { PccMinParametersInLine } from "./parameters/pcc-min/pcc-min-parameters-inline.js";
|
|
169
|
+
import { PccMinParametersEditionDialog } from "./parameters/pcc-min/pcc-min-parameters-dialog.js";
|
|
172
170
|
import { SecurityAnalysisParametersInline } from "./parameters/security-analysis/security-analysis-parameters-inline.js";
|
|
173
171
|
import { SecurityAnalysisParametersDialog } from "./parameters/security-analysis/security-analysis-parameters-dialog.js";
|
|
174
172
|
import { SensitivityAnalysisParametersInline } from "./parameters/sensi/sensitivity-analysis-parameters-inline.js";
|
|
@@ -253,7 +251,6 @@ export {
|
|
|
253
251
|
DescriptionField,
|
|
254
252
|
DescriptionModificationDialog,
|
|
255
253
|
DevModeBanner,
|
|
256
|
-
DeviceHubIcon,
|
|
257
254
|
DirectoryItemSelector,
|
|
258
255
|
DirectoryItemsInput,
|
|
259
256
|
DndColumnType,
|
|
@@ -394,8 +391,8 @@ export {
|
|
|
394
391
|
ParameterLineDirectoryItemsInput,
|
|
395
392
|
ParameterLineSlider,
|
|
396
393
|
ParameterSwitch,
|
|
394
|
+
PccMinParametersEditionDialog,
|
|
397
395
|
PccMinParametersInLine,
|
|
398
|
-
PhotoLibraryIcon,
|
|
399
396
|
PopupConfirmationDialog,
|
|
400
397
|
PredefinedParameters,
|
|
401
398
|
PropertyValueEditor,
|
|
@@ -475,7 +472,6 @@ export {
|
|
|
475
472
|
TopBar,
|
|
476
473
|
TranslatedValueEditor,
|
|
477
474
|
TreeViewFinder,
|
|
478
|
-
TuneIcon,
|
|
479
475
|
UPDATE_BUS_VOLTAGE,
|
|
480
476
|
USE_REACTIVE_LIMITS,
|
|
481
477
|
UnauthorizedAccessAlert,
|
|
@@ -169,6 +169,7 @@ function CsvUploader({
|
|
|
169
169
|
variant: "outlined",
|
|
170
170
|
onClick: () => handleOpenCSVConfirmationDataDialog(),
|
|
171
171
|
disabled: createError !== "",
|
|
172
|
+
"data-testid": "ValidateButton",
|
|
172
173
|
children: /* @__PURE__ */ jsx(FormattedMessage, { id: "validate" })
|
|
173
174
|
}
|
|
174
175
|
)
|
|
@@ -32,6 +32,7 @@ import { EquipmentsSelectionType } from "./voltage-init/voltage-init.type.js";
|
|
|
32
32
|
import { VoltageInitParametersEditionDialog } from "./voltage-init/voltage-init-parameters-dialog.js";
|
|
33
33
|
import { VoltageInitParametersInLine } from "./voltage-init/voltage-init-parameters-inline.js";
|
|
34
34
|
import { PccMinParametersInLine } from "./pcc-min/pcc-min-parameters-inline.js";
|
|
35
|
+
import { PccMinParametersEditionDialog } from "./pcc-min/pcc-min-parameters-dialog.js";
|
|
35
36
|
import { SecurityAnalysisParametersInline } from "./security-analysis/security-analysis-parameters-inline.js";
|
|
36
37
|
import { SecurityAnalysisParametersDialog } from "./security-analysis/security-analysis-parameters-dialog.js";
|
|
37
38
|
import { SensitivityAnalysisParametersInline } from "./sensi/sensitivity-analysis-parameters-inline.js";
|
|
@@ -136,6 +137,7 @@ export {
|
|
|
136
137
|
ParameterLineDirectoryItemsInput,
|
|
137
138
|
ParameterLineSlider,
|
|
138
139
|
ParameterSwitch,
|
|
140
|
+
PccMinParametersEditionDialog,
|
|
139
141
|
PccMinParametersInLine,
|
|
140
142
|
PredefinedParameters,
|
|
141
143
|
ProviderParam,
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CustomMuiDialog } from "../../dialogs/customMuiDialog/CustomMuiDialog.js";
|
|
3
|
+
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
4
|
+
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
5
|
+
import "../../../utils/conversionUtils.js";
|
|
6
|
+
import { ElementType } from "../../../utils/types/elementType.js";
|
|
7
|
+
import "../../../utils/types/equipmentType.js";
|
|
8
|
+
import "@mui/icons-material";
|
|
9
|
+
import "../../../utils/yupConfig.js";
|
|
10
|
+
import "react";
|
|
11
|
+
import "@mui/material";
|
|
12
|
+
import "react-intl";
|
|
13
|
+
import "react-hook-form";
|
|
14
|
+
import "../../treeViewFinder/TreeViewFinder.js";
|
|
15
|
+
import "notistack";
|
|
16
|
+
import { NameElementEditorForm } from "../common/name-element-editor/name-element-editor-form.js";
|
|
17
|
+
import "../../overflowableText/OverflowableText.js";
|
|
18
|
+
import "localized-countries";
|
|
19
|
+
import "localized-countries/data/fr";
|
|
20
|
+
import "localized-countries/data/en";
|
|
21
|
+
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
22
|
+
import "yup";
|
|
23
|
+
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
24
|
+
import "../../customAGGrid/customAggrid.js";
|
|
25
|
+
import "ag-grid-community";
|
|
26
|
+
import "react-papaparse";
|
|
27
|
+
import "react-csv-downloader";
|
|
28
|
+
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
29
|
+
import "@react-querybuilder/material";
|
|
30
|
+
import "../../filter/expert/expertFilterConstants.js";
|
|
31
|
+
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
32
|
+
import "uuid";
|
|
33
|
+
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
34
|
+
import "react-querybuilder";
|
|
35
|
+
import { UsePccMinParametersForm } from "./use-pcc-min-parameters-form.js";
|
|
36
|
+
import { PccMinParametersForm } from "./pcc-min-parameters-form.js";
|
|
37
|
+
function PccMinParametersEditionDialog({
|
|
38
|
+
id,
|
|
39
|
+
open,
|
|
40
|
+
onClose,
|
|
41
|
+
titleId,
|
|
42
|
+
name,
|
|
43
|
+
description,
|
|
44
|
+
activeDirectory,
|
|
45
|
+
language
|
|
46
|
+
}) {
|
|
47
|
+
const pccMinMethods = UsePccMinParametersForm({
|
|
48
|
+
parametersUuid: id,
|
|
49
|
+
name,
|
|
50
|
+
description,
|
|
51
|
+
studyUuid: null,
|
|
52
|
+
parameters: null
|
|
53
|
+
});
|
|
54
|
+
const {
|
|
55
|
+
formState: { errors, dirtyFields }
|
|
56
|
+
} = pccMinMethods.formMethods;
|
|
57
|
+
const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
|
|
58
|
+
return /* @__PURE__ */ jsx(
|
|
59
|
+
CustomMuiDialog,
|
|
60
|
+
{
|
|
61
|
+
open,
|
|
62
|
+
onClose,
|
|
63
|
+
onSave: pccMinMethods.onSaveDialog,
|
|
64
|
+
formSchema: pccMinMethods.formSchema,
|
|
65
|
+
formMethods: pccMinMethods.formMethods,
|
|
66
|
+
titleId,
|
|
67
|
+
removeOptional: true,
|
|
68
|
+
language,
|
|
69
|
+
disabledSave: disableSave,
|
|
70
|
+
PaperProps: {
|
|
71
|
+
sx: {
|
|
72
|
+
height: "90vh"
|
|
73
|
+
// we want the dialog height to be fixed even when switching tabs
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
children: /* @__PURE__ */ jsx(
|
|
77
|
+
PccMinParametersForm,
|
|
78
|
+
{
|
|
79
|
+
pccMinMethods,
|
|
80
|
+
renderTitleFields: () => {
|
|
81
|
+
return /* @__PURE__ */ jsx(
|
|
82
|
+
NameElementEditorForm,
|
|
83
|
+
{
|
|
84
|
+
initialElementName: name,
|
|
85
|
+
activeDirectory,
|
|
86
|
+
elementType: ElementType.PCC_MIN_PARAMETERS
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
PccMinParametersEditionDialog
|
|
97
|
+
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useCallback, useEffect } from "react";
|
|
3
3
|
import { Box, Grid } from "@mui/material";
|
|
4
|
-
import { FormattedMessage } from "react-intl";
|
|
4
|
+
import { useIntl, FormattedMessage } from "react-intl";
|
|
5
5
|
import "../../../utils/conversionUtils.js";
|
|
6
|
-
import "../../../utils/
|
|
6
|
+
import { snackWithFallback } from "../../../utils/error.js";
|
|
7
7
|
import "@mui/icons-material";
|
|
8
|
+
import { ElementType } from "../../../utils/types/elementType.js";
|
|
9
|
+
import "../../../utils/types/equipmentType.js";
|
|
8
10
|
import "../../../utils/yupConfig.js";
|
|
9
|
-
import { updatePccMinParameters } from "../../../services/pcc-min.js";
|
|
11
|
+
import { updatePccMinParameters, fetchPccMinParameters } from "../../../services/pcc-min.js";
|
|
10
12
|
import "localized-countries";
|
|
11
13
|
import "localized-countries/data/fr";
|
|
12
14
|
import "localized-countries/data/en";
|
|
@@ -16,7 +18,7 @@ import "../../overflowableText/OverflowableText.js";
|
|
|
16
18
|
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
17
19
|
import { SubmitButton } from "../../inputs/reactHookForm/utils/SubmitButton.js";
|
|
18
20
|
import "yup";
|
|
19
|
-
import "../../
|
|
21
|
+
import { DirectoryItemSelector } from "../../directoryItemSelector/DirectoryItemSelector.js";
|
|
20
22
|
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
21
23
|
import "../../customAGGrid/customAggrid.js";
|
|
22
24
|
import "ag-grid-community";
|
|
@@ -31,12 +33,14 @@ import "uuid";
|
|
|
31
33
|
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
32
34
|
import "react-querybuilder";
|
|
33
35
|
import { LabelledButton } from "../common/parameters.js";
|
|
34
|
-
import "
|
|
35
|
-
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
36
|
+
import { CreateParameterDialog } from "../common/parameters-creation-dialog.js";
|
|
36
37
|
import "../common/widget/parameter-line-slider.js";
|
|
37
38
|
import "../common/limitreductions/columns-definitions.js";
|
|
39
|
+
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
40
|
+
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
38
41
|
import { UsePccMinParametersForm } from "./use-pcc-min-parameters-form.js";
|
|
39
42
|
import { PccMinParametersForm } from "./pcc-min-parameters-form.js";
|
|
43
|
+
import { fromPccMinParamsDataToFormValues, fromPccMinParametersFormToParamValues } from "./pcc-min-form-utils.js";
|
|
40
44
|
function PccMinParametersInLine({
|
|
41
45
|
studyUuid,
|
|
42
46
|
setHaveDirtyFields,
|
|
@@ -44,12 +48,17 @@ function PccMinParametersInLine({
|
|
|
44
48
|
}) {
|
|
45
49
|
const pccMinMethods = UsePccMinParametersForm({
|
|
46
50
|
parametersUuid: null,
|
|
51
|
+
name: null,
|
|
52
|
+
description: null,
|
|
47
53
|
studyUuid,
|
|
48
54
|
parameters: pccMinParameters
|
|
49
55
|
});
|
|
50
56
|
const [openResetConfirmation, setOpenResetConfirmation] = useState(false);
|
|
51
57
|
const { snackError } = useSnackMessage();
|
|
52
|
-
const
|
|
58
|
+
const intl = useIntl();
|
|
59
|
+
const [openSelectParameterDialog, setOpenSelectParameterDialog] = useState(false);
|
|
60
|
+
const { formState, handleSubmit, reset, getValues } = pccMinMethods.formMethods;
|
|
61
|
+
const [openCreateParameterDialog, setOpenCreateParameterDialog] = useState(false);
|
|
53
62
|
const resetPccMinParameters = useCallback(() => {
|
|
54
63
|
updatePccMinParameters(studyUuid, null).catch((error) => {
|
|
55
64
|
snackError({
|
|
@@ -68,6 +77,23 @@ function PccMinParametersInLine({
|
|
|
68
77
|
useEffect(() => {
|
|
69
78
|
setHaveDirtyFields(!!Object.keys(formState.dirtyFields).length);
|
|
70
79
|
}, [formState, setHaveDirtyFields]);
|
|
80
|
+
const handleLoadParameters = useCallback(
|
|
81
|
+
(newParams) => {
|
|
82
|
+
if (newParams?.length) {
|
|
83
|
+
setOpenSelectParameterDialog(false);
|
|
84
|
+
const parametersUuid = newParams[0].id;
|
|
85
|
+
fetchPccMinParameters(parametersUuid).then((params) => {
|
|
86
|
+
reset(fromPccMinParamsDataToFormValues(params), {
|
|
87
|
+
keepDefaultValues: true
|
|
88
|
+
});
|
|
89
|
+
}).catch((error) => {
|
|
90
|
+
snackWithFallback(snackError, error, { headerId: "paramsRetrievingError" });
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
setOpenSelectParameterDialog(false);
|
|
94
|
+
},
|
|
95
|
+
[reset, snackError]
|
|
96
|
+
);
|
|
71
97
|
return /* @__PURE__ */ jsx(
|
|
72
98
|
PccMinParametersForm,
|
|
73
99
|
{
|
|
@@ -75,9 +101,43 @@ function PccMinParametersInLine({
|
|
|
75
101
|
renderActions: () => {
|
|
76
102
|
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
77
103
|
/* @__PURE__ */ jsxs(Grid, { container: true, item: true, children: [
|
|
104
|
+
/* @__PURE__ */ jsx(
|
|
105
|
+
LabelledButton,
|
|
106
|
+
{
|
|
107
|
+
callback: () => setOpenSelectParameterDialog(true),
|
|
108
|
+
label: "settings.button.chooseSettings"
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ jsx(LabelledButton, { callback: () => setOpenCreateParameterDialog(true), label: "save" }),
|
|
78
112
|
/* @__PURE__ */ jsx(LabelledButton, { callback: handleResetClick, label: "resetToDefault" }),
|
|
79
113
|
/* @__PURE__ */ jsx(SubmitButton, { onClick: handleSubmit(pccMinMethods.onSaveInline), variant: "outlined", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "validate" }) })
|
|
80
114
|
] }),
|
|
115
|
+
openCreateParameterDialog && /* @__PURE__ */ jsx(
|
|
116
|
+
CreateParameterDialog,
|
|
117
|
+
{
|
|
118
|
+
studyUuid,
|
|
119
|
+
open: openCreateParameterDialog,
|
|
120
|
+
onClose: () => setOpenCreateParameterDialog(false),
|
|
121
|
+
parameterValues: getValues,
|
|
122
|
+
parameterFormatter: (params) => fromPccMinParametersFormToParamValues(params),
|
|
123
|
+
parameterType: ElementType.PCC_MIN_PARAMETERS
|
|
124
|
+
}
|
|
125
|
+
),
|
|
126
|
+
openSelectParameterDialog && /* @__PURE__ */ jsx(
|
|
127
|
+
DirectoryItemSelector,
|
|
128
|
+
{
|
|
129
|
+
open: openSelectParameterDialog,
|
|
130
|
+
onClose: handleLoadParameters,
|
|
131
|
+
types: [ElementType.PCC_MIN_PARAMETERS],
|
|
132
|
+
title: intl.formatMessage({
|
|
133
|
+
id: "showSelectParameterDialog"
|
|
134
|
+
}),
|
|
135
|
+
multiSelect: false,
|
|
136
|
+
validationButtonText: intl.formatMessage({
|
|
137
|
+
id: "validate"
|
|
138
|
+
})
|
|
139
|
+
}
|
|
140
|
+
),
|
|
81
141
|
openResetConfirmation && /* @__PURE__ */ jsx(
|
|
82
142
|
PopupConfirmationDialog,
|
|
83
143
|
{
|
|
@@ -7,13 +7,20 @@ export interface UsePccMinParametersFormReturn {
|
|
|
7
7
|
formSchema: ObjectSchema<any>;
|
|
8
8
|
paramsLoading: boolean;
|
|
9
9
|
onSaveInline: (formData: Record<string, any>) => void;
|
|
10
|
+
onSaveDialog: (formData: Record<string, any>) => void;
|
|
10
11
|
}
|
|
11
12
|
type UsePccMinParametersFormProps = {
|
|
12
|
-
parametersUuid: UUID
|
|
13
|
-
name: string
|
|
13
|
+
parametersUuid: UUID;
|
|
14
|
+
name: string;
|
|
14
15
|
description: string | null;
|
|
16
|
+
studyUuid: null;
|
|
17
|
+
parameters: null;
|
|
18
|
+
} | {
|
|
19
|
+
parametersUuid: null;
|
|
20
|
+
name: null;
|
|
21
|
+
description: null;
|
|
15
22
|
studyUuid: UUID | null;
|
|
16
23
|
parameters: PccMinParameters | null;
|
|
17
24
|
};
|
|
18
|
-
export declare const UsePccMinParametersForm: ({ parametersUuid, studyUuid, parameters, }: UsePccMinParametersFormProps) => UsePccMinParametersFormReturn;
|
|
25
|
+
export declare const UsePccMinParametersForm: ({ name, description, parametersUuid, studyUuid, parameters, }: UsePccMinParametersFormProps) => UsePccMinParametersFormReturn;
|
|
19
26
|
export {};
|
|
@@ -7,9 +7,12 @@ import "react/jsx-runtime";
|
|
|
7
7
|
import "react-intl";
|
|
8
8
|
import { FILTERS, ID } from "../../../utils/constants/filterConstant.js";
|
|
9
9
|
import "../../../utils/conversionUtils.js";
|
|
10
|
-
import "../../../utils/
|
|
10
|
+
import { snackWithFallback } from "../../../utils/error.js";
|
|
11
11
|
import "@mui/icons-material";
|
|
12
|
-
import {
|
|
12
|
+
import { ElementType } from "../../../utils/types/elementType.js";
|
|
13
|
+
import "../../../utils/types/equipmentType.js";
|
|
14
|
+
import { updateParameter } from "../../../services/explore.js";
|
|
15
|
+
import { updatePccMinParameters, fetchPccMinParameters } from "../../../services/pcc-min.js";
|
|
13
16
|
import "@mui/material";
|
|
14
17
|
import "localized-countries";
|
|
15
18
|
import "localized-countries/data/fr";
|
|
@@ -19,7 +22,7 @@ import "../../overflowableText/OverflowableText.js";
|
|
|
19
22
|
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
20
23
|
import * as yup from "yup";
|
|
21
24
|
import "../../treeViewFinder/TreeViewFinder.js";
|
|
22
|
-
import { NAME } from "../../inputs/reactHookForm/constants.js";
|
|
25
|
+
import { NAME, DESCRIPTION } from "../../inputs/reactHookForm/constants.js";
|
|
23
26
|
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
24
27
|
import "../../customAGGrid/customAggrid.js";
|
|
25
28
|
import "ag-grid-community";
|
|
@@ -32,7 +35,11 @@ import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
|
32
35
|
import "uuid";
|
|
33
36
|
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
34
37
|
import "react-querybuilder";
|
|
38
|
+
import "../../filter/HeaderFilterForm.js";
|
|
39
|
+
import { getNameElementEditorSchema, getNameElementEditorEmptyFormData } from "../common/name-element-editor/name-element-editor-utils.js";
|
|
35
40
|
const UsePccMinParametersForm = ({
|
|
41
|
+
name,
|
|
42
|
+
description,
|
|
36
43
|
parametersUuid,
|
|
37
44
|
studyUuid,
|
|
38
45
|
parameters
|
|
@@ -47,10 +54,11 @@ const UsePccMinParametersForm = ({
|
|
|
47
54
|
[NAME]: yup.string().required()
|
|
48
55
|
})
|
|
49
56
|
)
|
|
50
|
-
});
|
|
51
|
-
}, []);
|
|
57
|
+
}).concat(getNameElementEditorSchema(name));
|
|
58
|
+
}, [name]);
|
|
52
59
|
const formMethods = useForm({
|
|
53
60
|
defaultValues: {
|
|
61
|
+
...getNameElementEditorEmptyFormData(name, description),
|
|
54
62
|
[FILTERS]: []
|
|
55
63
|
},
|
|
56
64
|
resolver: yupResolver(formSchema)
|
|
@@ -69,13 +77,32 @@ const UsePccMinParametersForm = ({
|
|
|
69
77
|
},
|
|
70
78
|
[snackError, studyUuid]
|
|
71
79
|
);
|
|
80
|
+
const onSaveDialog = useCallback(
|
|
81
|
+
(formData) => {
|
|
82
|
+
if (parametersUuid) {
|
|
83
|
+
updateParameter(
|
|
84
|
+
parametersUuid,
|
|
85
|
+
fromPccMinParametersFormToParamValues(formData),
|
|
86
|
+
formData[NAME],
|
|
87
|
+
ElementType.PCC_MIN_PARAMETERS,
|
|
88
|
+
formData[DESCRIPTION] ?? ""
|
|
89
|
+
).catch((error) => {
|
|
90
|
+
snackWithFallback(snackError, error, { headerId: "updatePccMinParametersError" });
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
[parametersUuid, snackError]
|
|
95
|
+
);
|
|
72
96
|
useEffect(() => {
|
|
73
97
|
if (parametersUuid) {
|
|
74
98
|
const timer = setTimeout(() => {
|
|
75
99
|
setParamsLoading(true);
|
|
76
100
|
}, 700);
|
|
77
|
-
|
|
78
|
-
reset(
|
|
101
|
+
fetchPccMinParameters(parametersUuid).then((params) => {
|
|
102
|
+
reset({
|
|
103
|
+
...getNameElementEditorEmptyFormData(name, description),
|
|
104
|
+
...fromPccMinParamsDataToFormValues(params)
|
|
105
|
+
});
|
|
79
106
|
}).catch((error) => {
|
|
80
107
|
snackError({
|
|
81
108
|
messageTxt: error.message,
|
|
@@ -86,7 +113,7 @@ const UsePccMinParametersForm = ({
|
|
|
86
113
|
setParamsLoading(false);
|
|
87
114
|
});
|
|
88
115
|
}
|
|
89
|
-
}, [parametersUuid, reset, snackError]);
|
|
116
|
+
}, [description, name, parametersUuid, reset, snackError]);
|
|
90
117
|
useEffect(() => {
|
|
91
118
|
if (parameters) {
|
|
92
119
|
reset(fromStudyPccMinParamsDataToFormValues(parameters));
|
|
@@ -96,7 +123,8 @@ const UsePccMinParametersForm = ({
|
|
|
96
123
|
formMethods,
|
|
97
124
|
formSchema,
|
|
98
125
|
paramsLoading,
|
|
99
|
-
onSaveInline
|
|
126
|
+
onSaveInline,
|
|
127
|
+
onSaveDialog
|
|
100
128
|
};
|
|
101
129
|
};
|
|
102
130
|
export {
|
package/dist/index.js
CHANGED
|
@@ -132,9 +132,6 @@ import { useListenerManager } from "./components/notifications/hooks/useListener
|
|
|
132
132
|
import { LeftPanelOpenIcon } from "./components/icons/LeftPanelOpenIcon.js";
|
|
133
133
|
import { ArrowsOutputIcon } from "./components/icons/ArrowsOutputIcon.js";
|
|
134
134
|
import { LeftPanelCloseIcon } from "./components/icons/LeftPanelCloseIcon.js";
|
|
135
|
-
import { DeviceHubIcon } from "./components/icons/DeviceHubIcon.js";
|
|
136
|
-
import { TuneIcon } from "./components/icons/TuneIcon.js";
|
|
137
|
-
import { PhotoLibraryIcon } from "./components/icons/PhotoLibraryIcon.js";
|
|
138
135
|
import { EditNoteIcon } from "./components/icons/EditNoteIcon.js";
|
|
139
136
|
import { ComputingType, formatComputingTypeLabel, isValidComputingType } from "./components/parameters/common/computing-type.js";
|
|
140
137
|
import { COMMON_PARAMETERS, 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, SPECIFIC_PARAMETERS, VERSION_PARAMETER, VOLTAGE_LEVEL, VoltageAdornment } from "./components/parameters/common/constant.js";
|
|
@@ -170,6 +167,7 @@ import { EquipmentsSelectionType } from "./components/parameters/voltage-init/vo
|
|
|
170
167
|
import { VoltageInitParametersEditionDialog } from "./components/parameters/voltage-init/voltage-init-parameters-dialog.js";
|
|
171
168
|
import { VoltageInitParametersInLine } from "./components/parameters/voltage-init/voltage-init-parameters-inline.js";
|
|
172
169
|
import { PccMinParametersInLine } from "./components/parameters/pcc-min/pcc-min-parameters-inline.js";
|
|
170
|
+
import { PccMinParametersEditionDialog } from "./components/parameters/pcc-min/pcc-min-parameters-dialog.js";
|
|
173
171
|
import { SecurityAnalysisParametersInline } from "./components/parameters/security-analysis/security-analysis-parameters-inline.js";
|
|
174
172
|
import { SecurityAnalysisParametersDialog } from "./components/parameters/security-analysis/security-analysis-parameters-dialog.js";
|
|
175
173
|
import { SensitivityAnalysisParametersInline } from "./components/parameters/sensi/sensitivity-analysis-parameters-inline.js";
|
|
@@ -201,7 +199,7 @@ import { fetchConfigParameter, fetchConfigParameters, getAppName, updateConfigPa
|
|
|
201
199
|
import { PermissionType, elementAlreadyExists, fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders, hasElementPermission } from "./services/directory.js";
|
|
202
200
|
import { createFilter, createParameter, fetchElementsInfos, saveFilter, updateParameter } from "./services/explore.js";
|
|
203
201
|
import { PREFIX_STUDY_QUERIES, fetchLoadFlowParameters, getDefaultLoadFlowProvider, getLoadFlowDefaultLimitReductions, getLoadFlowProviders, getLoadFlowSpecificParametersDescription, getLoadFlowUrl, setLoadFlowParameters } from "./services/loadflow.js";
|
|
204
|
-
import { getPccMinStudyParameters, updatePccMinParameters } from "./services/pcc-min.js";
|
|
202
|
+
import { fetchPccMinParameters, getPccMinStudyParameters, updatePccMinParameters } from "./services/pcc-min.js";
|
|
205
203
|
import { fetchDefaultSecurityAnalysisProvider, fetchSecurityAnalysisParameters, fetchSecurityAnalysisProviders, getSecurityAnalysisDefaultLimitReductions, getSecurityAnalysisParameters, getStudyUrl, safeEncodeURIComponent, setSecurityAnalysisParameters, updateSecurityAnalysisParameters, updateSecurityAnalysisProvider } from "./services/security-analysis.js";
|
|
206
204
|
import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizationsParameters, getStudyShortCircuitParameters, setStudyNetworkVisualizationParameters, updateVoltageInitParameters } from "./services/study.js";
|
|
207
205
|
import { getNetworkVisualizationsParameters } from "./services/study-config.js";
|
|
@@ -386,7 +384,6 @@ export {
|
|
|
386
384
|
DescriptionField,
|
|
387
385
|
DescriptionModificationDialog,
|
|
388
386
|
DevModeBanner,
|
|
389
|
-
DeviceHubIcon,
|
|
390
387
|
DirectoryItemSelector,
|
|
391
388
|
DirectoryItemsInput,
|
|
392
389
|
DistributionType,
|
|
@@ -575,9 +572,9 @@ export {
|
|
|
575
572
|
ParameterLineSlider,
|
|
576
573
|
ParameterSwitch,
|
|
577
574
|
ParameterType,
|
|
575
|
+
PccMinParametersEditionDialog,
|
|
578
576
|
PccMinParametersInLine,
|
|
579
577
|
PermissionType,
|
|
580
|
-
PhotoLibraryIcon,
|
|
581
578
|
PopupConfirmationDialog,
|
|
582
579
|
PredefinedParameters,
|
|
583
580
|
ProblemDetailError,
|
|
@@ -670,7 +667,6 @@ export {
|
|
|
670
667
|
TopBar,
|
|
671
668
|
TranslatedValueEditor,
|
|
672
669
|
TreeViewFinder,
|
|
673
|
-
TuneIcon,
|
|
674
670
|
TwoWindingTransfo,
|
|
675
671
|
UNAUTHORIZED_USER_INFO,
|
|
676
672
|
UPDATE_BUS_VOLTAGE,
|
|
@@ -767,6 +763,7 @@ export {
|
|
|
767
763
|
fetchEnv,
|
|
768
764
|
fetchFavoriteAndDefaultCountries,
|
|
769
765
|
fetchLoadFlowParameters,
|
|
766
|
+
fetchPccMinParameters,
|
|
770
767
|
fetchRootFolders,
|
|
771
768
|
fetchSecurityAnalysisParameters,
|
|
772
769
|
fetchSecurityAnalysisProviders,
|
package/dist/services/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { fetchConfigParameter, fetchConfigParameters, getAppName, updateConfigPa
|
|
|
3
3
|
import { PermissionType, elementAlreadyExists, fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders, hasElementPermission } from "./directory.js";
|
|
4
4
|
import { createFilter, createParameter, fetchElementsInfos, saveFilter, updateParameter } from "./explore.js";
|
|
5
5
|
import { PREFIX_STUDY_QUERIES, fetchLoadFlowParameters, getDefaultLoadFlowProvider, getLoadFlowDefaultLimitReductions, getLoadFlowProviders, getLoadFlowSpecificParametersDescription, getLoadFlowUrl, setLoadFlowParameters } from "./loadflow.js";
|
|
6
|
-
import { getPccMinStudyParameters, updatePccMinParameters } from "./pcc-min.js";
|
|
6
|
+
import { fetchPccMinParameters, getPccMinStudyParameters, updatePccMinParameters } from "./pcc-min.js";
|
|
7
7
|
import { fetchDefaultSecurityAnalysisProvider, fetchSecurityAnalysisParameters, fetchSecurityAnalysisProviders, getSecurityAnalysisDefaultLimitReductions, getSecurityAnalysisParameters, getStudyUrl, safeEncodeURIComponent, setSecurityAnalysisParameters, updateSecurityAnalysisParameters, updateSecurityAnalysisProvider } from "./security-analysis.js";
|
|
8
8
|
import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizationsParameters, getStudyShortCircuitParameters, setStudyNetworkVisualizationParameters, updateVoltageInitParameters } from "./study.js";
|
|
9
9
|
import { getNetworkVisualizationsParameters } from "./study-config.js";
|
|
@@ -36,6 +36,7 @@ export {
|
|
|
36
36
|
fetchEnv,
|
|
37
37
|
fetchFavoriteAndDefaultCountries,
|
|
38
38
|
fetchLoadFlowParameters,
|
|
39
|
+
fetchPccMinParameters,
|
|
39
40
|
fetchRootFolders,
|
|
40
41
|
fetchSecurityAnalysisParameters,
|
|
41
42
|
fetchSecurityAnalysisProviders,
|
|
@@ -4,4 +4,5 @@ export type PccMinParameters = {
|
|
|
4
4
|
[FILTERS]: FilterIdentifier[];
|
|
5
5
|
};
|
|
6
6
|
export declare function getPccMinStudyParameters(studyUuid: UUID): Promise<PccMinParameters | null>;
|
|
7
|
+
export declare function fetchPccMinParameters(parameterUuid: UUID): Promise<PccMinParameters>;
|
|
7
8
|
export declare function updatePccMinParameters(studyUuid: UUID | null, newParams: PccMinParameters | null): Promise<Response>;
|
package/dist/services/pcc-min.js
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { backendFetchJson, backendFetch } from "./utils.js";
|
|
2
2
|
import { getStudyUrl } from "./security-analysis.js";
|
|
3
|
+
const PREFIX_PCC_MIN_SERVER_QUERIES = `${"api/gateway"}/pcc-min`;
|
|
4
|
+
function getPccMinUrl() {
|
|
5
|
+
return `${PREFIX_PCC_MIN_SERVER_QUERIES}/v1/`;
|
|
6
|
+
}
|
|
3
7
|
function getPccMinStudyParameters(studyUuid) {
|
|
4
8
|
console.info("get pcc min study parameters");
|
|
5
9
|
const getPccMintParams = `${getStudyUrl(studyUuid)}/pcc-min/parameters`;
|
|
6
10
|
console.debug(getPccMintParams);
|
|
7
11
|
return backendFetchJson(getPccMintParams);
|
|
8
12
|
}
|
|
13
|
+
function fetchPccMinParameters(parameterUuid) {
|
|
14
|
+
console.info("fetch pcc min parameters");
|
|
15
|
+
const url = `${getPccMinUrl()}parameters/${encodeURIComponent(parameterUuid)}`;
|
|
16
|
+
console.debug(url);
|
|
17
|
+
return backendFetchJson(url);
|
|
18
|
+
}
|
|
9
19
|
function updatePccMinParameters(studyUuid, newParams) {
|
|
10
20
|
console.info("set study pcc min parameters");
|
|
11
21
|
const url = `${getStudyUrl(studyUuid)}/pcc-min/parameters`;
|
|
@@ -20,6 +30,7 @@ function updatePccMinParameters(studyUuid, newParams) {
|
|
|
20
30
|
});
|
|
21
31
|
}
|
|
22
32
|
export {
|
|
33
|
+
fetchPccMinParameters,
|
|
23
34
|
getPccMinStudyParameters,
|
|
24
35
|
updatePccMinParameters
|
|
25
36
|
};
|
|
@@ -244,6 +244,7 @@ const parametersEn = {
|
|
|
244
244
|
getSensitivityAnalysisFactorsCountError: "An error occured while estimating sensitivity analysis computations",
|
|
245
245
|
// Other
|
|
246
246
|
resetLoadFlowParametersWarning: "Impossible to retrieve the load flow parameters defined in the user profile (default values are used)",
|
|
247
|
+
// pccMin
|
|
247
248
|
PccMinParametersError: "An error occurred while updating the pcc min parameters",
|
|
248
249
|
updatePccMinParametersError: "An error occurred while updating the pcc min parameters",
|
|
249
250
|
pccMinParamFilter: "Definition of contingencies on voltage levels"
|
|
@@ -19,6 +19,7 @@ function getFileIcon(type, style) {
|
|
|
19
19
|
case ElementType.SENSITIVITY_PARAMETERS:
|
|
20
20
|
case ElementType.SHORT_CIRCUIT_PARAMETERS:
|
|
21
21
|
case ElementType.NETWORK_VISUALIZATIONS_PARAMETERS:
|
|
22
|
+
case ElementType.PCC_MIN_PARAMETERS:
|
|
22
23
|
return /* @__PURE__ */ jsx(Settings, { sx: style });
|
|
23
24
|
case ElementType.SPREADSHEET_CONFIG:
|
|
24
25
|
return /* @__PURE__ */ jsx(Calculate, { sx: style });
|
|
@@ -16,6 +16,7 @@ export declare enum ElementType {
|
|
|
16
16
|
CONTINGENCY_LIST = "CONTINGENCY_LIST",
|
|
17
17
|
VOLTAGE_INIT_PARAMETERS = "VOLTAGE_INIT_PARAMETERS",
|
|
18
18
|
SECURITY_ANALYSIS_PARAMETERS = "SECURITY_ANALYSIS_PARAMETERS",
|
|
19
|
+
PCC_MIN_PARAMETERS = "PCC_MIN_PARAMETERS",
|
|
19
20
|
LOADFLOW_PARAMETERS = "LOADFLOW_PARAMETERS",
|
|
20
21
|
SENSITIVITY_PARAMETERS = "SENSITIVITY_PARAMETERS",
|
|
21
22
|
SHORT_CIRCUIT_PARAMETERS = "SHORT_CIRCUIT_PARAMETERS",
|
|
@@ -7,6 +7,7 @@ var ElementType = /* @__PURE__ */ ((ElementType2) => {
|
|
|
7
7
|
ElementType2["CONTINGENCY_LIST"] = "CONTINGENCY_LIST";
|
|
8
8
|
ElementType2["VOLTAGE_INIT_PARAMETERS"] = "VOLTAGE_INIT_PARAMETERS";
|
|
9
9
|
ElementType2["SECURITY_ANALYSIS_PARAMETERS"] = "SECURITY_ANALYSIS_PARAMETERS";
|
|
10
|
+
ElementType2["PCC_MIN_PARAMETERS"] = "PCC_MIN_PARAMETERS";
|
|
10
11
|
ElementType2["LOADFLOW_PARAMETERS"] = "LOADFLOW_PARAMETERS";
|
|
11
12
|
ElementType2["SENSITIVITY_PARAMETERS"] = "SENSITIVITY_PARAMETERS";
|
|
12
13
|
ElementType2["SHORT_CIRCUIT_PARAMETERS"] = "SHORT_CIRCUIT_PARAMETERS";
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
interface DeviceHubProps {
|
|
8
|
-
style?: React.CSSProperties;
|
|
9
|
-
}
|
|
10
|
-
export declare function DeviceHubIcon({ style }: DeviceHubProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import DeviceHub from "@material-symbols/svg-400/outlined/device_hub.svg?react";
|
|
3
|
-
import { useTheme } from "@mui/material";
|
|
4
|
-
function DeviceHubIcon({ style }) {
|
|
5
|
-
const theme = useTheme();
|
|
6
|
-
const defaultStyle = {
|
|
7
|
-
width: 15,
|
|
8
|
-
height: 15,
|
|
9
|
-
fill: theme.palette.text.primary
|
|
10
|
-
};
|
|
11
|
-
return /* @__PURE__ */ jsx(DeviceHub, { style: { ...defaultStyle, ...style } });
|
|
12
|
-
}
|
|
13
|
-
export {
|
|
14
|
-
DeviceHubIcon
|
|
15
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
type TuneIconProps = {
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
size?: number;
|
|
10
|
-
color?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare function TuneIcon({ disabled, size, color }: TuneIconProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
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({ disabled = false, size = 14.4, color }) {
|
|
5
|
-
const theme = useTheme();
|
|
6
|
-
const fillColor = color ?? (disabled ? theme.palette.action.disabled : theme.palette.text.primary);
|
|
7
|
-
return /* @__PURE__ */ jsx(
|
|
8
|
-
Tune,
|
|
9
|
-
{
|
|
10
|
-
style: {
|
|
11
|
-
width: size,
|
|
12
|
-
height: size,
|
|
13
|
-
fill: fillColor
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
TuneIcon
|
|
20
|
-
};
|