@gridsuite/commons-ui 0.116.2 → 0.116.4
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/components/contingencyList/criteriaBased/CriteriaBasedForm.js +3 -0
- package/dist/components/dialogs/customMuiDialog/CustomMuiDialog.js +4 -3
- package/dist/components/dialogs/elementSaveDialog/ElementSaveDialog.js +35 -26
- package/dist/components/dialogs/elementSaveDialog/utils.d.ts +23 -0
- package/dist/components/dialogs/elementSaveDialog/utils.js +33 -0
- package/dist/components/directoryItemSelector/DirectoryItemSelector.d.ts +1 -1
- package/dist/components/directoryItemSelector/DirectoryItemSelector.js +72 -15
- package/dist/components/directoryItemSelector/utils.d.ts +52 -0
- package/dist/components/directoryItemSelector/utils.js +95 -0
- package/dist/components/dnd-table/dnd-table-add-rows-dialog.js +2 -2
- package/dist/components/filter/FilterForm.js +3 -0
- package/dist/components/filter/expert/ExpertFilterForm.js +3 -0
- package/dist/components/icons/ArrowsOutputIcon.d.ts +2 -0
- package/dist/components/icons/ArrowsOutputIcon.js +9 -0
- package/dist/components/icons/index.d.ts +1 -0
- package/dist/components/icons/index.js +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/inputs/reactHookForm/autocompleteInputs/AutocompleteInput.d.ts +3 -2
- package/dist/components/inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js +9 -2
- package/dist/components/inputs/reactHookForm/selectInputs/SelectInput.d.ts +3 -2
- package/dist/components/inputs/reactHookForm/selectInputs/SelectInput.js +2 -0
- package/dist/components/parameters/common/ProviderParam.js +2 -2
- package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.js +2 -2
- package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.js +2 -2
- package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.js +1 -1
- package/dist/components/parameters/common/parameters-creation-dialog.js +2 -0
- package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +2 -2
- package/dist/components/parameters/common/widget/parameter-float.js +2 -2
- package/dist/components/parameters/common/widget/parameter-line-slider.js +2 -2
- package/dist/components/parameters/loadflow/load-flow-general-parameters.js +2 -2
- package/dist/components/parameters/loadflow/load-flow-parameter-field.js +2 -2
- package/dist/components/parameters/loadflow/load-flow-parameters-content.js +2 -2
- package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +4 -4
- package/dist/components/parameters/loadflow/load-flow-parameters-form.js +2 -2
- package/dist/components/parameters/loadflow/load-flow-parameters-header.js +2 -2
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +3 -3
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +2 -2
- package/dist/components/parameters/network-visualizations/map-parameters.js +2 -2
- package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +2 -2
- package/dist/components/parameters/network-visualizations/network-visualizations-form.js +2 -2
- package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +2 -2
- package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.js +1 -1
- package/dist/components/parameters/security-analysis/security-analysis-parameters-dialog.js +2 -2
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +2 -2
- package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js +2 -2
- package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.js +2 -2
- package/dist/components/parameters/sensi/sensitivity-Flow-parameters.js +2 -2
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +2 -2
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +2 -2
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.js +2 -2
- package/dist/components/parameters/sensi/sensitivity-table.js +2 -2
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +2 -2
- package/dist/components/parameters/short-circuit/short-circuit-fields.js +2 -2
- package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +2 -2
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +1 -1
- package/dist/components/parameters/voltage-init/equipment-selection-parameters.js +2 -2
- package/dist/components/parameters/voltage-init/general-parameters.js +2 -2
- package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.js +1 -1
- package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +2 -2
- package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +2 -2
- package/dist/components/treeViewFinder/TreeViewFinder.js +14 -13
- package/dist/hooks/useModificationLabelComputer.js +1 -0
- package/dist/index.js +9 -1
- package/dist/services/directory.d.ts +1 -0
- package/dist/services/directory.js +10 -2
- package/dist/services/index.js +2 -1
- package/dist/translations/en/networkModificationsEn.d.ts +1 -0
- package/dist/translations/en/networkModificationsEn.js +2 -1
- package/dist/translations/fr/networkModificationsFr.d.ts +1 -0
- package/dist/translations/fr/networkModificationsFr.js +2 -1
- package/dist/utils/constants/configConstants.d.ts +4 -0
- package/dist/utils/constants/configConstants.js +10 -0
- package/dist/utils/constants/index.d.ts +1 -0
- package/dist/utils/constants/index.js +5 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/types/modificationType.d.ts +5 -1
- package/dist/utils/types/modificationType.js +5 -0
- package/package.json +1 -1
|
@@ -18,6 +18,7 @@ import * as yup from "yup";
|
|
|
18
18
|
import "../../overflowableText/OverflowableText.js";
|
|
19
19
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
20
20
|
import "../../treeViewFinder/TreeViewFinder.js";
|
|
21
|
+
import "../../../utils/conversionUtils.js";
|
|
21
22
|
import { DESCRIPTION, NAME } from "../../inputs/reactHookForm/constants.js";
|
|
22
23
|
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
23
24
|
import "../../customAGGrid/customAggrid.js";
|
|
@@ -25,7 +26,6 @@ import "ag-grid-community";
|
|
|
25
26
|
import "react-papaparse";
|
|
26
27
|
import "react-csv-downloader";
|
|
27
28
|
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
28
|
-
import "../../../utils/conversionUtils.js";
|
|
29
29
|
import "@react-querybuilder/material";
|
|
30
30
|
import "../../filter/expert/expertFilterConstants.js";
|
|
31
31
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -14,6 +14,8 @@ import "yup";
|
|
|
14
14
|
import "../../overflowableText/OverflowableText.js";
|
|
15
15
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
16
16
|
import "../../treeViewFinder/TreeViewFinder.js";
|
|
17
|
+
import "../../../utils/conversionUtils.js";
|
|
18
|
+
import "../../../utils/yupConfig.js";
|
|
17
19
|
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
18
20
|
import "../../customAGGrid/customAggrid.js";
|
|
19
21
|
import "ag-grid-community";
|
|
@@ -21,8 +23,6 @@ import "react-papaparse";
|
|
|
21
23
|
import "react-csv-downloader";
|
|
22
24
|
import { RadioInput } from "../../inputs/reactHookForm/booleans/RadioInput.js";
|
|
23
25
|
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
24
|
-
import "../../../utils/conversionUtils.js";
|
|
25
|
-
import "../../../utils/yupConfig.js";
|
|
26
26
|
import "@react-querybuilder/material";
|
|
27
27
|
import "../../filter/expert/expertFilterConstants.js";
|
|
28
28
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -17,6 +17,8 @@ import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialo
|
|
|
17
17
|
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
18
18
|
import "@mui/icons-material";
|
|
19
19
|
import "../../treeViewFinder/TreeViewFinder.js";
|
|
20
|
+
import "../../../utils/conversionUtils.js";
|
|
21
|
+
import "../../../utils/yupConfig.js";
|
|
20
22
|
import "yup";
|
|
21
23
|
import "../../overflowableText/OverflowableText.js";
|
|
22
24
|
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
@@ -25,8 +27,6 @@ import "ag-grid-community";
|
|
|
25
27
|
import "react-papaparse";
|
|
26
28
|
import "react-csv-downloader";
|
|
27
29
|
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
28
|
-
import "../../../utils/conversionUtils.js";
|
|
29
|
-
import "../../../utils/yupConfig.js";
|
|
30
30
|
import "@react-querybuilder/material";
|
|
31
31
|
import "../../filter/expert/expertFilterConstants.js";
|
|
32
32
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -19,6 +19,7 @@ import * as yup from "yup";
|
|
|
19
19
|
import "../../overflowableText/OverflowableText.js";
|
|
20
20
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
21
21
|
import "../../treeViewFinder/TreeViewFinder.js";
|
|
22
|
+
import { isBlankOrEmpty } from "../../../utils/conversionUtils.js";
|
|
22
23
|
import { NAME, DESCRIPTION } from "../../inputs/reactHookForm/constants.js";
|
|
23
24
|
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
24
25
|
import "../../customAGGrid/customAggrid.js";
|
|
@@ -26,7 +27,6 @@ import "ag-grid-community";
|
|
|
26
27
|
import "react-papaparse";
|
|
27
28
|
import "react-csv-downloader";
|
|
28
29
|
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
29
|
-
import { isBlankOrEmpty } from "../../../utils/conversionUtils.js";
|
|
30
30
|
import "@react-querybuilder/material";
|
|
31
31
|
import "../../filter/expert/expertFilterConstants.js";
|
|
32
32
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -15,6 +15,8 @@ import "@mui/icons-material";
|
|
|
15
15
|
import "yup";
|
|
16
16
|
import "../../overflowableText/OverflowableText.js";
|
|
17
17
|
import "../../treeViewFinder/TreeViewFinder.js";
|
|
18
|
+
import "../../../utils/conversionUtils.js";
|
|
19
|
+
import "../../../utils/yupConfig.js";
|
|
18
20
|
import { NAME } from "../../inputs/reactHookForm/constants.js";
|
|
19
21
|
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
20
22
|
import "../../customAGGrid/customAggrid.js";
|
|
@@ -22,8 +24,6 @@ import "ag-grid-community";
|
|
|
22
24
|
import "react-papaparse";
|
|
23
25
|
import "react-csv-downloader";
|
|
24
26
|
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
25
|
-
import "../../../utils/conversionUtils.js";
|
|
26
|
-
import "../../../utils/yupConfig.js";
|
|
27
27
|
import "@react-querybuilder/material";
|
|
28
28
|
import "../../filter/expert/expertFilterConstants.js";
|
|
29
29
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -14,14 +14,14 @@ import "@mui/icons-material";
|
|
|
14
14
|
import "yup";
|
|
15
15
|
import "../../overflowableText/OverflowableText.js";
|
|
16
16
|
import "../../treeViewFinder/TreeViewFinder.js";
|
|
17
|
+
import "../../../utils/conversionUtils.js";
|
|
18
|
+
import "../../../utils/yupConfig.js";
|
|
17
19
|
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
18
20
|
import "../../customAGGrid/customAggrid.js";
|
|
19
21
|
import "ag-grid-community";
|
|
20
22
|
import "react-papaparse";
|
|
21
23
|
import "react-csv-downloader";
|
|
22
24
|
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
23
|
-
import "../../../utils/conversionUtils.js";
|
|
24
|
-
import "../../../utils/yupConfig.js";
|
|
25
25
|
import "@react-querybuilder/material";
|
|
26
26
|
import "../../filter/expert/expertFilterConstants.js";
|
|
27
27
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -153,20 +153,20 @@ function TreeViewFinderComponant(props) {
|
|
|
153
153
|
}
|
|
154
154
|
}, [expandedProp]);
|
|
155
155
|
useEffect(() => {
|
|
156
|
-
|
|
156
|
+
const hasSelected = selectedProp && selectedProp.length > 0;
|
|
157
|
+
const hasExpanded = expandedProp && expandedProp.length > 0;
|
|
158
|
+
if (!hasSelected && !hasExpanded || !autoScrollAllowed) {
|
|
157
159
|
return;
|
|
158
160
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
setAutoScrollAllowed(false);
|
|
169
|
-
}
|
|
161
|
+
const isNodeExpanded = expandedProp == null ? void 0 : expandedProp.every((itemId) => expanded == null ? void 0 : expanded.includes(itemId));
|
|
162
|
+
const lastScrollRef = scrollRef.current[scrollRef.current.length - 1];
|
|
163
|
+
if (isNodeExpanded && lastScrollRef) {
|
|
164
|
+
lastScrollRef.scrollIntoView({
|
|
165
|
+
behavior: "smooth",
|
|
166
|
+
block: "center",
|
|
167
|
+
inline: "center"
|
|
168
|
+
});
|
|
169
|
+
setAutoScrollAllowed(false);
|
|
170
170
|
}
|
|
171
171
|
}, [expanded, selectedProp, expandedProp, data, autoScrollAllowed]);
|
|
172
172
|
const handleNodeSelect = (_e, values) => {
|
|
@@ -247,7 +247,8 @@ function TreeViewFinderComponant(props) {
|
|
|
247
247
|
}
|
|
248
248
|
},
|
|
249
249
|
ref: (element) => {
|
|
250
|
-
|
|
250
|
+
const shouldAddToScrollRef = selectedProp && selectedProp.length > 0 ? selectedProp.includes(node.id) : (expandedProp == null ? void 0 : expandedProp.includes(node.id)) ?? false;
|
|
251
|
+
if (shouldAddToScrollRef) {
|
|
251
252
|
scrollRef.current.push(element);
|
|
252
253
|
}
|
|
253
254
|
},
|
|
@@ -53,6 +53,7 @@ const useModificationLabelComputer = () => {
|
|
|
53
53
|
id: `network_modifications.tabular.${modificationMetadata.tabularCreationType}`
|
|
54
54
|
});
|
|
55
55
|
case MODIFICATION_TYPES.CREATE_COUPLING_DEVICE.type:
|
|
56
|
+
case MODIFICATION_TYPES.CREATE_VOLTAGE_LEVEL_TOPOLOGY.type:
|
|
56
57
|
return modificationMetadata.voltageLevelId;
|
|
57
58
|
default:
|
|
58
59
|
return modificationMetadata.equipmentId || "";
|
package/dist/index.js
CHANGED
|
@@ -126,6 +126,7 @@ import { NotificationsContext } from "./components/notifications/contexts/Notifi
|
|
|
126
126
|
import { useNotificationsListener } from "./components/notifications/hooks/useNotificationsListener.js";
|
|
127
127
|
import { useListenerManager } from "./components/notifications/hooks/useListenerManager.js";
|
|
128
128
|
import { LeftPanelOpenIcon } from "./components/icons/LeftPanelOpenIcon.js";
|
|
129
|
+
import { ArrowsOutputIcon } from "./components/icons/ArrowsOutputIcon.js";
|
|
129
130
|
import { LeftPanelCloseIcon } from "./components/icons/LeftPanelCloseIcon.js";
|
|
130
131
|
import { DeviceHubIcon } from "./components/icons/DeviceHubIcon.js";
|
|
131
132
|
import { ComputingType, formatComputingTypeLabel, isValidComputingType } from "./components/parameters/common/computing-type.js";
|
|
@@ -187,7 +188,7 @@ import { getUserToken, setCommonStore } from "./redux/commonStore.js";
|
|
|
187
188
|
import { backendFetch, backendFetchJson, backendFetchText, catchErrorHandler, getRequestParamFromList } from "./services/utils.js";
|
|
188
189
|
import { createFilter, createParameter, fetchElementsInfos, saveFilter, updateParameter } from "./services/explore.js";
|
|
189
190
|
import { fetchAppsMetadata, fetchDefaultCountry, fetchEnv, fetchFavoriteAndDefaultCountries, fetchStudyMetadata, isStudyMetadata } from "./services/appsMetadata.js";
|
|
190
|
-
import { elementAlreadyExists, fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders } from "./services/directory.js";
|
|
191
|
+
import { elementAlreadyExists, fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders, updateConfigParameter } from "./services/directory.js";
|
|
191
192
|
import { PREFIX_STUDY_QUERIES, fetchLoadFlowParameters, getDefaultLoadFlowProvider, getLoadFlowDefaultLimitReductions, getLoadFlowProviders, getLoadFlowSpecificParametersDescription, getLoadFlowUrl, setLoadFlowParameters } from "./services/loadflow.js";
|
|
192
193
|
import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizationsParameters, getStudyShortCircuitParameters, invalidateStudyShortCircuitStatus, setStudyNetworkVisualizationParameters, setStudyShortCircuitParameters, updateVoltageInitParameters } from "./services/study.js";
|
|
193
194
|
import { getNetworkVisualizationsParameters } from "./services/study-config.js";
|
|
@@ -199,6 +200,7 @@ import { FetchStatus } from "./utils/constants/fetchStatus.js";
|
|
|
199
200
|
import { FieldConstants } from "./utils/constants/fieldConstants.js";
|
|
200
201
|
import { MAX_CHAR_DESCRIPTION } from "./utils/constants/uiConstants.js";
|
|
201
202
|
import { AMPERE, DEGREE, KILO_AMPERE, KILO_METER, KILO_VOLT, MEGA_VAR, MEGA_VOLT_AMPERE, MEGA_WATT, MICRO_SIEMENS, OHM, PERCENTAGE, SIEMENS } from "./utils/constants/unitsConstants.js";
|
|
203
|
+
import { LAST_SELECTED_DIRECTORY, PARAM_DEVELOPER_MODE, PARAM_LANGUAGE, PARAM_THEME } from "./utils/constants/configConstants.js";
|
|
202
204
|
import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, unitToKiloUnit, unitToMicroUnit } from "./utils/conversionUtils.js";
|
|
203
205
|
import { areArrayElementsUnique, isObjectEmpty, keyGenerator } from "./utils/functions.js";
|
|
204
206
|
import { LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM } from "./utils/langs.js";
|
|
@@ -275,6 +277,7 @@ export {
|
|
|
275
277
|
AnnouncementBanner,
|
|
276
278
|
AnnouncementNotification,
|
|
277
279
|
AnnouncementSeverity,
|
|
280
|
+
ArrowsOutputIcon,
|
|
278
281
|
AuthenticationRouter,
|
|
279
282
|
default3 as AuthenticationRouterErrorDisplay,
|
|
280
283
|
AutocompleteInput,
|
|
@@ -425,6 +428,7 @@ export {
|
|
|
425
428
|
LANG_ENGLISH,
|
|
426
429
|
LANG_FRENCH,
|
|
427
430
|
LANG_SYSTEM,
|
|
431
|
+
LAST_SELECTED_DIRECTORY,
|
|
428
432
|
LCC,
|
|
429
433
|
LEG_SIDE,
|
|
430
434
|
LIGHT_THEME,
|
|
@@ -489,8 +493,10 @@ export {
|
|
|
489
493
|
OverflowableText,
|
|
490
494
|
PARAM_CENTER_LABEL,
|
|
491
495
|
PARAM_COMPONENT_LIBRARY,
|
|
496
|
+
PARAM_DEVELOPER_MODE,
|
|
492
497
|
PARAM_DIAGONAL_LABEL,
|
|
493
498
|
PARAM_INIT_NAD_WITH_GEO_DATA,
|
|
499
|
+
PARAM_LANGUAGE,
|
|
494
500
|
PARAM_LIMIT_REDUCTION,
|
|
495
501
|
PARAM_LINE_FLOW_MODE,
|
|
496
502
|
PARAM_LINE_FULL_PATH,
|
|
@@ -505,6 +511,7 @@ export {
|
|
|
505
511
|
PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD,
|
|
506
512
|
PARAM_SA_PROVIDER,
|
|
507
513
|
PARAM_SUBSTATION_LAYOUT,
|
|
514
|
+
PARAM_THEME,
|
|
508
515
|
PERCENTAGE,
|
|
509
516
|
PHASE_REGULATION_MODE_OPTIONS,
|
|
510
517
|
PHASE_SHIFTER_REGULATION_ON,
|
|
@@ -807,6 +814,7 @@ export {
|
|
|
807
814
|
unitToKiloUnit,
|
|
808
815
|
unitToMicroUnit,
|
|
809
816
|
unscrollableDialogStyles,
|
|
817
|
+
updateConfigParameter,
|
|
810
818
|
updateParameter,
|
|
811
819
|
updateSecurityAnalysisParameters,
|
|
812
820
|
updateSecurityAnalysisProvider,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UUID } from 'crypto';
|
|
2
2
|
import { ElementAttributes } from '../utils';
|
|
3
|
+
export declare function updateConfigParameter(name: string, value: string): Promise<Response>;
|
|
3
4
|
export declare function fetchRootFolders(types: string[]): Promise<ElementAttributes[]>;
|
|
4
5
|
export declare function fetchDirectoryContent(directoryUuid: UUID, types?: string[]): Promise<ElementAttributes[]>;
|
|
5
6
|
export declare function fetchDirectoryElementPath(elementUuid: UUID): Promise<ElementAttributes[]>;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import { getRequestParamFromList, backendFetchJson
|
|
1
|
+
import { backendFetch, getRequestParamFromList, backendFetchJson } from "./utils.js";
|
|
2
2
|
const PREFIX_EXPLORE_SERVER_QUERIES = `${"api/gateway"}/explore`;
|
|
3
|
+
const PREFIX_CONFIG_QUERIES = `${"api/gateway"}/config`;
|
|
4
|
+
function updateConfigParameter(name, value) {
|
|
5
|
+
const appName = "common";
|
|
6
|
+
console.info("Updating config parameter '%s=%s' for app '%s' ", name, value, appName);
|
|
7
|
+
const updateParams = `${PREFIX_CONFIG_QUERIES}/v1/applications/${appName}/parameters/${name}?value=${encodeURIComponent(value)}`;
|
|
8
|
+
return backendFetch(updateParams, { method: "put" });
|
|
9
|
+
}
|
|
3
10
|
function fetchRootFolders(types) {
|
|
4
11
|
console.info("Fetching Root Directories");
|
|
5
12
|
const urlSearchParams = getRequestParamFromList("elementTypes", types).toString();
|
|
@@ -42,5 +49,6 @@ export {
|
|
|
42
49
|
elementAlreadyExists,
|
|
43
50
|
fetchDirectoryContent,
|
|
44
51
|
fetchDirectoryElementPath,
|
|
45
|
-
fetchRootFolders
|
|
52
|
+
fetchRootFolders,
|
|
53
|
+
updateConfigParameter
|
|
46
54
|
};
|
package/dist/services/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { backendFetch, backendFetchJson, backendFetchText, catchErrorHandler, getRequestParamFromList } from "./utils.js";
|
|
2
2
|
import { createFilter, createParameter, fetchElementsInfos, saveFilter, updateParameter } from "./explore.js";
|
|
3
3
|
import { fetchAppsMetadata, fetchDefaultCountry, fetchEnv, fetchFavoriteAndDefaultCountries, fetchStudyMetadata, isStudyMetadata } from "./appsMetadata.js";
|
|
4
|
-
import { elementAlreadyExists, fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders } from "./directory.js";
|
|
4
|
+
import { elementAlreadyExists, fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders, updateConfigParameter } from "./directory.js";
|
|
5
5
|
import { PREFIX_STUDY_QUERIES, fetchLoadFlowParameters, getDefaultLoadFlowProvider, getLoadFlowDefaultLimitReductions, getLoadFlowProviders, getLoadFlowSpecificParametersDescription, getLoadFlowUrl, setLoadFlowParameters } from "./loadflow.js";
|
|
6
6
|
import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizationsParameters, getStudyShortCircuitParameters, invalidateStudyShortCircuitStatus, setStudyNetworkVisualizationParameters, setStudyShortCircuitParameters, updateVoltageInitParameters } from "./study.js";
|
|
7
7
|
import { getNetworkVisualizationsParameters } from "./study-config.js";
|
|
@@ -56,6 +56,7 @@ export {
|
|
|
56
56
|
setSecurityAnalysisParameters,
|
|
57
57
|
setStudyNetworkVisualizationParameters,
|
|
58
58
|
setStudyShortCircuitParameters,
|
|
59
|
+
updateConfigParameter,
|
|
59
60
|
updateParameter,
|
|
60
61
|
updateSecurityAnalysisParameters,
|
|
61
62
|
updateSecurityAnalysisProvider,
|
|
@@ -68,4 +68,5 @@ export declare const networkModificationsEn: {
|
|
|
68
68
|
'network_modifications.VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION': string;
|
|
69
69
|
'network_modifications.CREATE_COUPLING_DEVICE': string;
|
|
70
70
|
'network_modifications.BALANCES_ADJUSTMENT_MODIFICATION': string;
|
|
71
|
+
'network_modifications.CREATE_VOLTAGE_LEVEL_TOPOLOGY': string;
|
|
71
72
|
};
|
|
@@ -61,7 +61,8 @@ const networkModificationsEn = {
|
|
|
61
61
|
"network_modifications.VOLTAGE_LEVEL_CREATION_SUBSTATION_CREATION": "Creating voltage level {voltageLevelEquipmentId} and substation {substationEquipmentId}",
|
|
62
62
|
"network_modifications.VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION": "Modifying voltage level topology {computedLabel}",
|
|
63
63
|
"network_modifications.CREATE_COUPLING_DEVICE": "Creating a coupling device in voltage level {computedLabel}",
|
|
64
|
-
"network_modifications.BALANCES_ADJUSTMENT_MODIFICATION": "Balances adjustment modification"
|
|
64
|
+
"network_modifications.BALANCES_ADJUSTMENT_MODIFICATION": "Balances adjustment modification",
|
|
65
|
+
"network_modifications.CREATE_VOLTAGE_LEVEL_TOPOLOGY": "Creating a bus bar in voltage level {computedLabel}"
|
|
65
66
|
};
|
|
66
67
|
export {
|
|
67
68
|
networkModificationsEn
|
|
@@ -68,4 +68,5 @@ export declare const networkModificationsFr: {
|
|
|
68
68
|
'network_modifications.VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION': string;
|
|
69
69
|
'network_modifications.CREATE_COUPLING_DEVICE': string;
|
|
70
70
|
'network_modifications.BALANCES_ADJUSTMENT_MODIFICATION': string;
|
|
71
|
+
'network_modifications.CREATE_VOLTAGE_LEVEL_TOPOLOGY': string;
|
|
71
72
|
};
|
|
@@ -61,7 +61,8 @@ const networkModificationsFr = {
|
|
|
61
61
|
"network_modifications.VOLTAGE_LEVEL_CREATION_SUBSTATION_CREATION": "Création du poste {voltageLevelEquipmentId} et du site {substationEquipmentId}",
|
|
62
62
|
"network_modifications.VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION": "Modification de la topologie du poste {computedLabel}",
|
|
63
63
|
"network_modifications.CREATE_COUPLING_DEVICE": "Création de couplage / omnibus dans le poste {computedLabel}",
|
|
64
|
-
"network_modifications.BALANCES_ADJUSTMENT_MODIFICATION": "Modification d'équilibrage bilan"
|
|
64
|
+
"network_modifications.BALANCES_ADJUSTMENT_MODIFICATION": "Modification d'équilibrage bilan",
|
|
65
|
+
"network_modifications.CREATE_VOLTAGE_LEVEL_TOPOLOGY": "Ajout d'un jeu de barre dans le poste {computedLabel}"
|
|
65
66
|
};
|
|
66
67
|
export {
|
|
67
68
|
networkModificationsFr
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const PARAM_THEME = "theme";
|
|
2
|
+
const PARAM_LANGUAGE = "language";
|
|
3
|
+
const PARAM_DEVELOPER_MODE = "enableDeveloperMode";
|
|
4
|
+
const LAST_SELECTED_DIRECTORY = "lastSelectedDirectory";
|
|
5
|
+
export {
|
|
6
|
+
LAST_SELECTED_DIRECTORY,
|
|
7
|
+
PARAM_DEVELOPER_MODE,
|
|
8
|
+
PARAM_LANGUAGE,
|
|
9
|
+
PARAM_THEME
|
|
10
|
+
};
|
|
@@ -2,6 +2,7 @@ import { FetchStatus } from "./fetchStatus.js";
|
|
|
2
2
|
import { FieldConstants } from "./fieldConstants.js";
|
|
3
3
|
import { MAX_CHAR_DESCRIPTION } from "./uiConstants.js";
|
|
4
4
|
import { AMPERE, DEGREE, KILO_AMPERE, KILO_METER, KILO_VOLT, MEGA_VAR, MEGA_VOLT_AMPERE, MEGA_WATT, MICRO_SIEMENS, OHM, PERCENTAGE, SIEMENS } from "./unitsConstants.js";
|
|
5
|
+
import { LAST_SELECTED_DIRECTORY, PARAM_DEVELOPER_MODE, PARAM_LANGUAGE, PARAM_THEME } from "./configConstants.js";
|
|
5
6
|
export {
|
|
6
7
|
AMPERE,
|
|
7
8
|
DEGREE,
|
|
@@ -10,12 +11,16 @@ export {
|
|
|
10
11
|
KILO_AMPERE,
|
|
11
12
|
KILO_METER,
|
|
12
13
|
KILO_VOLT,
|
|
14
|
+
LAST_SELECTED_DIRECTORY,
|
|
13
15
|
MAX_CHAR_DESCRIPTION,
|
|
14
16
|
MEGA_VAR,
|
|
15
17
|
MEGA_VOLT_AMPERE,
|
|
16
18
|
MEGA_WATT,
|
|
17
19
|
MICRO_SIEMENS,
|
|
18
20
|
OHM,
|
|
21
|
+
PARAM_DEVELOPER_MODE,
|
|
22
|
+
PARAM_LANGUAGE,
|
|
23
|
+
PARAM_THEME,
|
|
19
24
|
PERCENTAGE,
|
|
20
25
|
SIEMENS
|
|
21
26
|
};
|
package/dist/utils/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { FetchStatus } from "./constants/fetchStatus.js";
|
|
|
3
3
|
import { FieldConstants } from "./constants/fieldConstants.js";
|
|
4
4
|
import { MAX_CHAR_DESCRIPTION } from "./constants/uiConstants.js";
|
|
5
5
|
import { AMPERE, DEGREE, KILO_AMPERE, KILO_METER, KILO_VOLT, MEGA_VAR, MEGA_VOLT_AMPERE, MEGA_WATT, MICRO_SIEMENS, OHM, PERCENTAGE, SIEMENS } from "./constants/unitsConstants.js";
|
|
6
|
+
import { LAST_SELECTED_DIRECTORY, PARAM_DEVELOPER_MODE, PARAM_LANGUAGE, PARAM_THEME } from "./constants/configConstants.js";
|
|
6
7
|
import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, unitToKiloUnit, unitToMicroUnit } from "./conversionUtils.js";
|
|
7
8
|
import { areArrayElementsUnique, isObjectEmpty, keyGenerator } from "./functions.js";
|
|
8
9
|
import { LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM } from "./langs.js";
|
|
@@ -51,6 +52,7 @@ export {
|
|
|
51
52
|
LANG_ENGLISH,
|
|
52
53
|
LANG_FRENCH,
|
|
53
54
|
LANG_SYSTEM,
|
|
55
|
+
LAST_SELECTED_DIRECTORY,
|
|
54
56
|
LCC,
|
|
55
57
|
LIGHT_THEME,
|
|
56
58
|
Line,
|
|
@@ -65,6 +67,9 @@ export {
|
|
|
65
67
|
NotificationsUrlKeys,
|
|
66
68
|
OHM,
|
|
67
69
|
OperatingStatus,
|
|
70
|
+
PARAM_DEVELOPER_MODE,
|
|
71
|
+
PARAM_LANGUAGE,
|
|
72
|
+
PARAM_THEME,
|
|
68
73
|
PERCENTAGE,
|
|
69
74
|
PREFIX_CONFIG_NOTIFICATION_WS,
|
|
70
75
|
PREFIX_DIRECTORY_NOTIFICATION_WS,
|
|
@@ -52,7 +52,8 @@ export declare enum ModificationType {
|
|
|
52
52
|
LCC_MODIFICATION = "LCC_MODIFICATION",
|
|
53
53
|
VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION = "VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION",
|
|
54
54
|
CREATE_COUPLING_DEVICE = "CREATE_COUPLING_DEVICE",
|
|
55
|
-
BALANCES_ADJUSTMENT = "BALANCES_ADJUSTMENT_MODIFICATION"
|
|
55
|
+
BALANCES_ADJUSTMENT = "BALANCES_ADJUSTMENT_MODIFICATION",
|
|
56
|
+
CREATE_VOLTAGE_LEVEL_TOPOLOGY = "CREATE_VOLTAGE_LEVEL_TOPOLOGY"
|
|
56
57
|
}
|
|
57
58
|
export declare const MODIFICATION_TYPES: {
|
|
58
59
|
GROOVY_SCRIPT: {
|
|
@@ -202,4 +203,7 @@ export declare const MODIFICATION_TYPES: {
|
|
|
202
203
|
BALANCES_ADJUSTMENT: {
|
|
203
204
|
type: ModificationType;
|
|
204
205
|
};
|
|
206
|
+
CREATE_VOLTAGE_LEVEL_TOPOLOGY: {
|
|
207
|
+
type: ModificationType;
|
|
208
|
+
};
|
|
205
209
|
};
|
|
@@ -47,6 +47,7 @@ var ModificationType = /* @__PURE__ */ ((ModificationType2) => {
|
|
|
47
47
|
ModificationType2["VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION"] = "VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION";
|
|
48
48
|
ModificationType2["CREATE_COUPLING_DEVICE"] = "CREATE_COUPLING_DEVICE";
|
|
49
49
|
ModificationType2["BALANCES_ADJUSTMENT"] = "BALANCES_ADJUSTMENT_MODIFICATION";
|
|
50
|
+
ModificationType2["CREATE_VOLTAGE_LEVEL_TOPOLOGY"] = "CREATE_VOLTAGE_LEVEL_TOPOLOGY";
|
|
50
51
|
return ModificationType2;
|
|
51
52
|
})(ModificationType || {});
|
|
52
53
|
const MODIFICATION_TYPES = {
|
|
@@ -243,6 +244,10 @@ const MODIFICATION_TYPES = {
|
|
|
243
244
|
BALANCES_ADJUSTMENT: {
|
|
244
245
|
type: "BALANCES_ADJUSTMENT_MODIFICATION"
|
|
245
246
|
/* BALANCES_ADJUSTMENT */
|
|
247
|
+
},
|
|
248
|
+
CREATE_VOLTAGE_LEVEL_TOPOLOGY: {
|
|
249
|
+
type: "CREATE_VOLTAGE_LEVEL_TOPOLOGY"
|
|
250
|
+
/* CREATE_VOLTAGE_LEVEL_TOPOLOGY */
|
|
246
251
|
}
|
|
247
252
|
};
|
|
248
253
|
export {
|