@gridsuite/commons-ui 0.65.2 → 0.66.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/dist/components/filter/constants/FilterConstants.d.ts +3 -6
- package/dist/components/filter/constants/FilterConstants.js +10 -1
- package/dist/components/filter/criteriaBased/CriteriaBasedFilterEditionDialog.d.ts +4 -11
- package/dist/components/filter/criteriaBased/CriteriaBasedFilterEditionDialog.js +6 -13
- package/dist/components/filter/expert/ExpertFilterEditionDialog.d.ts +3 -2
- package/dist/components/filter/expert/ExpertFilterEditionDialog.js +3 -4
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterEditionDialog.d.ts +3 -2
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js +3 -4
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.js +1 -1
- package/dist/components/filter/filter.type.d.ts +14 -0
- package/dist/components/filter/filter.type.js +1 -0
- package/dist/hooks/customStates/useStateBoolean.d.ts +11 -0
- package/dist/hooks/customStates/useStateBoolean.js +11 -0
- package/dist/hooks/customStates/useStateNumber.d.ts +11 -0
- package/dist/hooks/customStates/useStateNumber.js +11 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +77 -72
- package/dist/utils/mapper/elementIcon.js +3 -1
- package/dist/utils/types/elementType.d.ts +2 -1
- package/dist/utils/types/elementType.js +1 -0
- package/dist/utils/types/equipmentTypes.d.ts +0 -6
- package/dist/utils/types/equipmentTypes.js +1 -8
- package/package.json +1 -1
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
*/
|
|
1
|
+
import { SelectionForCopy } from '../filter.type';
|
|
2
|
+
|
|
7
3
|
export declare const DISTRIBUTION_KEY = "distributionKey";
|
|
8
4
|
export declare const FilterType: {
|
|
9
5
|
CRITERIA_BASED: {
|
|
@@ -19,3 +15,4 @@ export declare const FilterType: {
|
|
|
19
15
|
label: string;
|
|
20
16
|
};
|
|
21
17
|
};
|
|
18
|
+
export declare const NO_SELECTION_FOR_COPY: SelectionForCopy;
|
|
@@ -4,7 +4,16 @@ const FilterType = {
|
|
|
4
4
|
EXPLICIT_NAMING: { id: "IDENTIFIER_LIST", label: "filter.explicitNaming" },
|
|
5
5
|
EXPERT: { id: "EXPERT", label: "filter.expert" }
|
|
6
6
|
};
|
|
7
|
+
const NO_SELECTION_FOR_COPY = {
|
|
8
|
+
sourceItemUuid: null,
|
|
9
|
+
nameItem: null,
|
|
10
|
+
descriptionItem: null,
|
|
11
|
+
parentDirectoryUuid: null,
|
|
12
|
+
typeItem: null,
|
|
13
|
+
specificTypeItem: null
|
|
14
|
+
};
|
|
7
15
|
export {
|
|
8
16
|
DISTRIBUTION_KEY,
|
|
9
|
-
FilterType
|
|
17
|
+
FilterType,
|
|
18
|
+
NO_SELECTION_FOR_COPY
|
|
10
19
|
};
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
+
import { SelectionForCopy } from '../filter.type';
|
|
1
2
|
import { ElementExistsType } from '../../../utils/types/elementType';
|
|
2
3
|
import { UUID } from 'crypto';
|
|
3
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
4
4
|
|
|
5
|
-
export type SelectionCopy = {
|
|
6
|
-
sourceItemUuid: UUID | null;
|
|
7
|
-
name: string | null;
|
|
8
|
-
description: string | null;
|
|
9
|
-
parentDirectoryUuid: UUID | null;
|
|
10
|
-
};
|
|
11
|
-
export declare const noSelectionForCopy: SelectionCopy;
|
|
12
5
|
export interface CriteriaBasedFilterEditionDialogProps {
|
|
13
6
|
id: string;
|
|
14
7
|
name: string;
|
|
@@ -17,11 +10,11 @@ export interface CriteriaBasedFilterEditionDialogProps {
|
|
|
17
10
|
onClose: () => void;
|
|
18
11
|
broadcastChannel: BroadcastChannel;
|
|
19
12
|
getFilterById: (id: string) => Promise<any>;
|
|
20
|
-
selectionForCopy:
|
|
21
|
-
|
|
13
|
+
selectionForCopy: SelectionForCopy;
|
|
14
|
+
setSelectionForCopy: (selection: SelectionForCopy) => void;
|
|
22
15
|
activeDirectory?: UUID;
|
|
23
16
|
elementExists?: ElementExistsType;
|
|
24
17
|
language?: string;
|
|
25
18
|
}
|
|
26
|
-
declare function CriteriaBasedFilterEditionDialog({ id, name, titleId, open, onClose, broadcastChannel, getFilterById, selectionForCopy,
|
|
19
|
+
declare function CriteriaBasedFilterEditionDialog({ id, name, titleId, open, onClose, broadcastChannel, getFilterById, selectionForCopy, setSelectionForCopy, activeDirectory, elementExists, language, }: Readonly<CriteriaBasedFilterEditionDialogProps>): import("react/jsx-runtime").JSX.Element;
|
|
27
20
|
export default CriteriaBasedFilterEditionDialog;
|
|
@@ -8,17 +8,11 @@ import CustomMuiDialog from "../../dialogs/customMuiDialog/CustomMuiDialog.js";
|
|
|
8
8
|
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
9
9
|
import { criteriaBasedFilterSchema } from "./CriteriaBasedFilterForm.js";
|
|
10
10
|
import "../../../utils/yupConfig.js";
|
|
11
|
-
import { FilterType } from "../constants/FilterConstants.js";
|
|
11
|
+
import { FilterType, NO_SELECTION_FOR_COPY } from "../constants/FilterConstants.js";
|
|
12
12
|
import FetchStatus from "../../../utils/constants/fetchStatus.js";
|
|
13
13
|
import { saveFilter } from "../../../services/explore.js";
|
|
14
14
|
import FilterForm from "../FilterForm.js";
|
|
15
15
|
import * as yup from "yup";
|
|
16
|
-
const noSelectionForCopy = {
|
|
17
|
-
sourceItemUuid: null,
|
|
18
|
-
name: null,
|
|
19
|
-
description: null,
|
|
20
|
-
parentDirectoryUuid: null
|
|
21
|
-
};
|
|
22
16
|
const formSchema = yup.object().shape({
|
|
23
17
|
[FieldConstants.NAME]: yup.string().trim().required("nameEmpty"),
|
|
24
18
|
[FieldConstants.FILTER_TYPE]: yup.string().required(),
|
|
@@ -34,7 +28,7 @@ function CriteriaBasedFilterEditionDialog({
|
|
|
34
28
|
broadcastChannel,
|
|
35
29
|
getFilterById,
|
|
36
30
|
selectionForCopy,
|
|
37
|
-
|
|
31
|
+
setSelectionForCopy,
|
|
38
32
|
activeDirectory,
|
|
39
33
|
elementExists,
|
|
40
34
|
language
|
|
@@ -74,9 +68,9 @@ function CriteriaBasedFilterEditionDialog({
|
|
|
74
68
|
(filterForm) => {
|
|
75
69
|
saveFilter(frontToBackTweak(id, filterForm), filterForm[FieldConstants.NAME]).then(() => {
|
|
76
70
|
if (selectionForCopy.sourceItemUuid === id) {
|
|
77
|
-
|
|
71
|
+
setSelectionForCopy(NO_SELECTION_FOR_COPY);
|
|
78
72
|
broadcastChannel.postMessage({
|
|
79
|
-
|
|
73
|
+
NO_SELECTION_FOR_COPY
|
|
80
74
|
});
|
|
81
75
|
}
|
|
82
76
|
}).catch((error) => {
|
|
@@ -85,7 +79,7 @@ function CriteriaBasedFilterEditionDialog({
|
|
|
85
79
|
});
|
|
86
80
|
});
|
|
87
81
|
},
|
|
88
|
-
[broadcastChannel, id, selectionForCopy.sourceItemUuid, snackError,
|
|
82
|
+
[broadcastChannel, id, selectionForCopy.sourceItemUuid, snackError, setSelectionForCopy]
|
|
89
83
|
);
|
|
90
84
|
const isDataReady = dataFetchStatus === FetchStatus.FETCH_SUCCESS;
|
|
91
85
|
return /* @__PURE__ */ jsx(
|
|
@@ -106,6 +100,5 @@ function CriteriaBasedFilterEditionDialog({
|
|
|
106
100
|
);
|
|
107
101
|
}
|
|
108
102
|
export {
|
|
109
|
-
CriteriaBasedFilterEditionDialog as default
|
|
110
|
-
noSelectionForCopy
|
|
103
|
+
CriteriaBasedFilterEditionDialog as default
|
|
111
104
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SelectionForCopy } from '../filter.type';
|
|
1
2
|
import { ElementExistsType } from '../../../utils/types/elementType';
|
|
2
3
|
import { UUID } from 'crypto';
|
|
3
4
|
|
|
@@ -8,11 +9,11 @@ export interface ExpertFilterEditionDialogProps {
|
|
|
8
9
|
open: boolean;
|
|
9
10
|
onClose: () => void;
|
|
10
11
|
broadcastChannel: BroadcastChannel;
|
|
11
|
-
selectionForCopy:
|
|
12
|
+
selectionForCopy: SelectionForCopy;
|
|
12
13
|
getFilterById: (id: string) => Promise<{
|
|
13
14
|
[prop: string]: any;
|
|
14
15
|
}>;
|
|
15
|
-
setSelectionForCopy: (selection:
|
|
16
|
+
setSelectionForCopy: (selection: SelectionForCopy) => void;
|
|
16
17
|
activeDirectory?: UUID;
|
|
17
18
|
elementExists?: ElementExistsType;
|
|
18
19
|
language?: string;
|
|
@@ -3,7 +3,6 @@ import { useState, useEffect, useCallback } from "react";
|
|
|
3
3
|
import { useForm } from "react-hook-form";
|
|
4
4
|
import { yupResolver } from "@hookform/resolvers/yup";
|
|
5
5
|
import FieldConstants from "../../../utils/constants/fieldConstants.js";
|
|
6
|
-
import { noSelectionForCopy } from "../../../utils/types/equipmentTypes.js";
|
|
7
6
|
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
8
7
|
import CustomMuiDialog from "../../dialogs/customMuiDialog/CustomMuiDialog.js";
|
|
9
8
|
import "../../../utils/yupConfig.js";
|
|
@@ -11,7 +10,7 @@ import FilterForm from "../FilterForm.js";
|
|
|
11
10
|
import { expertFilterSchema, EXPERT_FILTER_QUERY } from "./ExpertFilterForm.js";
|
|
12
11
|
import { saveExpertFilter } from "../utils/filterApi.js";
|
|
13
12
|
import { importExpertRules } from "./expertFilterUtils.js";
|
|
14
|
-
import { FilterType } from "../constants/FilterConstants.js";
|
|
13
|
+
import { FilterType, NO_SELECTION_FOR_COPY } from "../constants/FilterConstants.js";
|
|
15
14
|
import FetchStatus from "../../../utils/constants/fetchStatus.js";
|
|
16
15
|
import * as yup from "yup";
|
|
17
16
|
const formSchema = yup.object().shape({
|
|
@@ -85,9 +84,9 @@ function ExpertFilterEditionDialog({
|
|
|
85
84
|
}
|
|
86
85
|
);
|
|
87
86
|
if (selectionForCopy.sourceItemUuid === id) {
|
|
88
|
-
setSelectionForCopy(
|
|
87
|
+
setSelectionForCopy(NO_SELECTION_FOR_COPY);
|
|
89
88
|
broadcastChannel.postMessage({
|
|
90
|
-
|
|
89
|
+
NO_SELECTION_FOR_COPY
|
|
91
90
|
});
|
|
92
91
|
}
|
|
93
92
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SelectionForCopy } from '../filter.type';
|
|
1
2
|
import { ElementExistsType } from '../../../utils/types/elementType';
|
|
2
3
|
import { UUID } from 'crypto';
|
|
3
4
|
|
|
@@ -8,8 +9,8 @@ export interface ExplicitNamingFilterEditionDialogProps {
|
|
|
8
9
|
open: boolean;
|
|
9
10
|
onClose: () => void;
|
|
10
11
|
broadcastChannel: BroadcastChannel;
|
|
11
|
-
selectionForCopy:
|
|
12
|
-
setSelectionForCopy: (selection:
|
|
12
|
+
selectionForCopy: SelectionForCopy;
|
|
13
|
+
setSelectionForCopy: (selection: SelectionForCopy) => void;
|
|
13
14
|
getFilterById: (id: string) => Promise<any>;
|
|
14
15
|
activeDirectory?: UUID;
|
|
15
16
|
elementExists?: ElementExistsType;
|
|
@@ -11,8 +11,7 @@ import "../../../utils/yupConfig.js";
|
|
|
11
11
|
import { explicitNamingFilterSchema, FILTER_EQUIPMENTS_ATTRIBUTES } from "./ExplicitNamingFilterForm.js";
|
|
12
12
|
import FieldConstants from "../../../utils/constants/fieldConstants.js";
|
|
13
13
|
import FilterForm from "../FilterForm.js";
|
|
14
|
-
import {
|
|
15
|
-
import { FilterType } from "../constants/FilterConstants.js";
|
|
14
|
+
import { FilterType, NO_SELECTION_FOR_COPY } from "../constants/FilterConstants.js";
|
|
16
15
|
import FetchStatus from "../../../utils/constants/fetchStatus.js";
|
|
17
16
|
import * as yup from "yup";
|
|
18
17
|
const formSchema = yup.object().shape({
|
|
@@ -88,9 +87,9 @@ function ExplicitNamingFilterEditionDialog({
|
|
|
88
87
|
onClose
|
|
89
88
|
);
|
|
90
89
|
if (selectionForCopy.sourceItemUuid === id) {
|
|
91
|
-
setSelectionForCopy(
|
|
90
|
+
setSelectionForCopy(NO_SELECTION_FOR_COPY);
|
|
92
91
|
broadcastChannel.postMessage({
|
|
93
|
-
|
|
92
|
+
NO_SELECTION_FOR_COPY
|
|
94
93
|
});
|
|
95
94
|
}
|
|
96
95
|
},
|
|
@@ -163,7 +163,7 @@ function ExplicitNamingFilterForm({ sourceFilterForExplicitNamingConversion }) {
|
|
|
163
163
|
Input: SelectInput,
|
|
164
164
|
name: FieldConstants.EQUIPMENT_TYPE,
|
|
165
165
|
options: Object.values(FILTER_EQUIPMENTS),
|
|
166
|
-
disabled: sourceFilterForExplicitNamingConversion,
|
|
166
|
+
disabled: !!sourceFilterForExplicitNamingConversion,
|
|
167
167
|
label: "equipmentType",
|
|
168
168
|
shouldOpenPopup: openConfirmationPopup,
|
|
169
169
|
resetOnConfirmation: handleResetOnConfirmation,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024, 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 type SelectionForCopy = {
|
|
8
|
+
sourceItemUuid: string | null;
|
|
9
|
+
typeItem: string | null;
|
|
10
|
+
nameItem: string | null;
|
|
11
|
+
descriptionItem: string | null;
|
|
12
|
+
parentDirectoryUuid: string | null;
|
|
13
|
+
specificTypeItem: string | null;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
|
|
3
|
+
export type UseStateBooleanReturn = {
|
|
4
|
+
value: boolean;
|
|
5
|
+
setTrue: () => void;
|
|
6
|
+
setFalse: () => void;
|
|
7
|
+
invert: () => void;
|
|
8
|
+
setValue: Dispatch<SetStateAction<boolean>>;
|
|
9
|
+
};
|
|
10
|
+
declare const useStateBoolean: (initialState: boolean | (() => boolean)) => UseStateBooleanReturn;
|
|
11
|
+
export default useStateBoolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useState, useCallback } from "react";
|
|
2
|
+
const useStateBoolean = (initialState) => {
|
|
3
|
+
const [value, setValue] = useState(initialState);
|
|
4
|
+
const setTrue = useCallback(() => setValue(true), []);
|
|
5
|
+
const setFalse = useCallback(() => setValue(false), []);
|
|
6
|
+
const invert = useCallback(() => setValue((prevState) => !prevState), []);
|
|
7
|
+
return { value, setTrue, setFalse, invert, setValue };
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
useStateBoolean as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
|
|
3
|
+
export type UseStateNumberReturn = {
|
|
4
|
+
value: number;
|
|
5
|
+
setValue: Dispatch<SetStateAction<number>>;
|
|
6
|
+
increment: (step?: number) => void;
|
|
7
|
+
decrement: (step?: number) => void;
|
|
8
|
+
reset: () => void;
|
|
9
|
+
};
|
|
10
|
+
declare const useStateNumber: (initialState?: number | (() => number)) => UseStateNumberReturn;
|
|
11
|
+
export default useStateNumber;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useState, useCallback } from "react";
|
|
2
|
+
const useStateNumber = (initialState = 0) => {
|
|
3
|
+
const [value, setValue] = useState(initialState);
|
|
4
|
+
const increment = useCallback((step = 1) => setValue((prevState) => prevState + step), []);
|
|
5
|
+
const decrement = useCallback((step = 1) => setValue((prevState) => prevState - step), []);
|
|
6
|
+
const reset = useCallback(() => setValue(initialState), [initialState]);
|
|
7
|
+
return { value, increment, decrement, reset, setValue };
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
useStateNumber as default
|
|
11
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -41,7 +41,8 @@ export type { BottomRightButtonsProps } from './components/inputs/reactHookForm/
|
|
|
41
41
|
export { default as CustomAgGridTable } from './components/inputs/reactHookForm/agGridTable/CustomAgGridTable';
|
|
42
42
|
export type { CustomAgGridTableProps } from './components/inputs/reactHookForm/agGridTable/CustomAgGridTable';
|
|
43
43
|
export { ROW_DRAGGING_SELECTION_COLUMN_DEF } from './components/inputs/reactHookForm/agGridTable/CustomAgGridTable';
|
|
44
|
-
export { Line, Generator, Load, Battery, SVC, DanglingLine, LCC, VSC, Hvdc, BusBar, TwoWindingTransfo, ThreeWindingTransfo, ShuntCompensator, VoltageLevel, Substation,
|
|
44
|
+
export { Line, Generator, Load, Battery, SVC, DanglingLine, LCC, VSC, Hvdc, BusBar, TwoWindingTransfo, ThreeWindingTransfo, ShuntCompensator, VoltageLevel, Substation, } from './utils/types/equipmentTypes';
|
|
45
|
+
export { NO_SELECTION_FOR_COPY as noSelectionForCopy } from './components/filter/constants/FilterConstants';
|
|
45
46
|
export { default as FieldConstants } from './utils/constants/fieldConstants';
|
|
46
47
|
export { fields as EXPERT_FILTER_FIELDS } from './components/filter/expert/expertFilterConstants';
|
|
47
48
|
export { default as CustomReactQueryBuilder } from './components/inputs/reactQueryBuilder/CustomReactQueryBuilder';
|
|
@@ -107,6 +108,10 @@ export { default as useDebounce } from './hooks/useDebounce';
|
|
|
107
108
|
export { default as usePrevious } from './hooks/usePrevious';
|
|
108
109
|
export { default as useConfidentialityWarning } from './hooks/useConfidentialityWarning';
|
|
109
110
|
export { default as usePredefinedProperties } from './hooks/usePredefinedProperties';
|
|
111
|
+
export { default as useStateBoolean } from './hooks/customStates/useStateBoolean';
|
|
112
|
+
export type { UseStateBooleanReturn } from './hooks/customStates/useStateBoolean';
|
|
113
|
+
export { default as useStateNumber } from './hooks/customStates/useStateNumber';
|
|
114
|
+
export type { UseStateNumberReturn } from './hooks/customStates/useStateNumber';
|
|
110
115
|
export { default as SelectClearable } from './components/inputs/SelectClearable';
|
|
111
116
|
export type { SelectClearableProps } from './components/inputs/SelectClearable';
|
|
112
117
|
export { default as useCustomFormContext } from './components/inputs/reactHookForm/provider/useCustomFormContext';
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,8 @@ import { default as default21 } from "./components/filter/criteriaBased/Criteria
|
|
|
36
36
|
import { default as default22 } from "./components/dialogs/popupConfirmationDialog/PopupConfirmationDialog.js";
|
|
37
37
|
import { default as default23 } from "./components/inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
38
38
|
import { default as default24, ROW_DRAGGING_SELECTION_COLUMN_DEF } from "./components/inputs/reactHookForm/agGridTable/CustomAgGridTable.js";
|
|
39
|
-
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel
|
|
39
|
+
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./utils/types/equipmentTypes.js";
|
|
40
|
+
import { NO_SELECTION_FOR_COPY } from "./components/filter/constants/FilterConstants.js";
|
|
40
41
|
import { default as default25 } from "./utils/constants/fieldConstants.js";
|
|
41
42
|
import { fields } from "./components/filter/expert/expertFilterConstants.js";
|
|
42
43
|
import { default as default26 } from "./components/inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -91,45 +92,47 @@ import { default as default64 } from "./hooks/useDebounce.js";
|
|
|
91
92
|
import { usePrevious } from "./hooks/usePrevious.js";
|
|
92
93
|
import { default as default65 } from "./hooks/useConfidentialityWarning.js";
|
|
93
94
|
import { default as default66 } from "./hooks/usePredefinedProperties.js";
|
|
94
|
-
import { default as default67 } from "./
|
|
95
|
-
import { default as default68 } from "./
|
|
96
|
-
import { default as default69 } from "./components/inputs/
|
|
97
|
-
import { default as default70 } from "./components/inputs/reactHookForm/
|
|
98
|
-
import { default as default71 } from "./components/inputs/reactHookForm/
|
|
99
|
-
import { default as default72 } from "./components/inputs/reactHookForm/
|
|
100
|
-
import { default as default73 } from "./components/inputs/reactHookForm/
|
|
101
|
-
import { default as default74 } from "./components/inputs/reactHookForm/
|
|
102
|
-
import { default as default75 } from "./components/inputs/reactHookForm/
|
|
103
|
-
import { default as default76 } from "./components/inputs/reactHookForm/numbers/
|
|
104
|
-
import { default as default77 } from "./components/inputs/reactHookForm/
|
|
105
|
-
import { default as default78 } from "./components/inputs/reactHookForm/
|
|
106
|
-
import { default as default79 } from "./components/inputs/reactHookForm/
|
|
107
|
-
import { default as default80 } from "./components/inputs/reactHookForm/
|
|
108
|
-
import { default as default81 } from "./components/inputs/reactHookForm/
|
|
109
|
-
import { default as default82 } from "./components/inputs/reactHookForm/errorManagement/
|
|
110
|
-
import { default as default83 } from "./components/inputs/reactHookForm/
|
|
111
|
-
import { default as default84 } from "./components/inputs/reactHookForm/
|
|
112
|
-
import { default as default85 } from "./components/inputs/reactHookForm/utils/
|
|
113
|
-
import { default as default86 } from "./components/inputs/reactHookForm/utils/
|
|
95
|
+
import { default as default67 } from "./hooks/customStates/useStateBoolean.js";
|
|
96
|
+
import { default as default68 } from "./hooks/customStates/useStateNumber.js";
|
|
97
|
+
import { default as default69 } from "./components/inputs/SelectClearable.js";
|
|
98
|
+
import { default as default70 } from "./components/inputs/reactHookForm/provider/useCustomFormContext.js";
|
|
99
|
+
import { default as default71 } from "./components/inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
100
|
+
import { default as default72 } from "./components/inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js";
|
|
101
|
+
import { default as default73 } from "./components/inputs/reactHookForm/text/TextInput.js";
|
|
102
|
+
import { default as default74 } from "./components/inputs/reactHookForm/text/ExpandingTextField.js";
|
|
103
|
+
import { default as default75 } from "./components/inputs/reactHookForm/booleans/RadioInput.js";
|
|
104
|
+
import { default as default76 } from "./components/inputs/reactHookForm/numbers/SliderInput.js";
|
|
105
|
+
import { default as default77 } from "./components/inputs/reactHookForm/numbers/FloatInput.js";
|
|
106
|
+
import { default as default78 } from "./components/inputs/reactHookForm/numbers/IntegerInput.js";
|
|
107
|
+
import { default as default79 } from "./components/inputs/reactHookForm/selectInputs/SelectInput.js";
|
|
108
|
+
import { default as default80 } from "./components/inputs/reactHookForm/booleans/CheckboxInput.js";
|
|
109
|
+
import { default as default81 } from "./components/inputs/reactHookForm/booleans/SwitchInput.js";
|
|
110
|
+
import { default as default82 } from "./components/inputs/reactHookForm/errorManagement/ErrorInput.js";
|
|
111
|
+
import { default as default83 } from "./components/inputs/reactHookForm/errorManagement/FieldErrorAlert.js";
|
|
112
|
+
import { default as default84 } from "./components/inputs/reactHookForm/errorManagement/MidFormError.js";
|
|
113
|
+
import { default as default85 } from "./components/inputs/reactHookForm/utils/TextFieldWithAdornment.js";
|
|
114
|
+
import { default as default86 } from "./components/inputs/reactHookForm/utils/FieldLabel.js";
|
|
115
|
+
import { default as default87 } from "./components/inputs/reactHookForm/utils/SubmitButton.js";
|
|
116
|
+
import { default as default88 } from "./components/inputs/reactHookForm/utils/CancelButton.js";
|
|
114
117
|
import { genHelperError, genHelperPreviousValue, gridItem, identity, isFieldRequired, isFloatNumber, toFloatOrNullValue } from "./components/inputs/reactHookForm/utils/functions.js";
|
|
115
118
|
import { areArrayElementsUnique, isObjectEmpty, keyGenerator } from "./utils/functions.js";
|
|
116
|
-
import { default as
|
|
117
|
-
import { default as
|
|
118
|
-
import { default as
|
|
119
|
-
import { default as
|
|
120
|
-
import { default as
|
|
121
|
-
import { default as
|
|
122
|
-
import { default as
|
|
123
|
-
import { default as
|
|
119
|
+
import { default as default89 } from "./components/inputs/reactHookForm/DirectoryItemsInput.js";
|
|
120
|
+
import { default as default90 } from "./components/directoryItemSelector/DirectoryItemSelector.js";
|
|
121
|
+
import { default as default91 } from "./components/customAGGrid/customAggrid.js";
|
|
122
|
+
import { default as default92 } from "./components/inputs/reactHookForm/RawReadOnlyInput.js";
|
|
123
|
+
import { default as default93 } from "./components/filter/FilterCreationDialog.js";
|
|
124
|
+
import { default as default94 } from "./components/filter/expert/ExpertFilterEditionDialog.js";
|
|
125
|
+
import { default as default95 } from "./components/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
126
|
+
import { default as default96 } from "./components/filter/criteriaBased/CriteriaBasedFilterEditionDialog.js";
|
|
124
127
|
import { saveCriteriaBasedFilter, saveExpertFilter, saveExplicitNamingFilter } from "./components/filter/utils/filterApi.js";
|
|
125
|
-
import { DEFAULT_RANGE_VALUE, default as
|
|
126
|
-
import { default as
|
|
127
|
-
import { default as
|
|
128
|
-
import { default as
|
|
128
|
+
import { DEFAULT_RANGE_VALUE, default as default97, getRangeInputDataForm, getRangeInputSchema } from "./components/inputs/reactHookForm/numbers/RangeInput.js";
|
|
129
|
+
import { default as default98 } from "./components/inputs/reactHookForm/selectInputs/InputWithPopupConfirmation.js";
|
|
130
|
+
import { default as default99 } from "./components/inputs/reactHookForm/selectInputs/MuiSelectInput.js";
|
|
131
|
+
import { default as default100 } from "./components/inputs/reactHookForm/selectInputs/CountriesInput.js";
|
|
129
132
|
import { getComputedLanguage, getSystemLanguage, useLocalizedCountries } from "./hooks/useLocalizedCountries.js";
|
|
130
|
-
import { default as
|
|
131
|
-
import { default as
|
|
132
|
-
import { default as
|
|
133
|
+
import { default as default101 } from "./components/inputs/reactHookForm/autocompleteInputs/MultipleAutocompleteInput.js";
|
|
134
|
+
import { default as default102 } from "./components/inputs/reactHookForm/agGridTable/csvUploader/CsvUploader.js";
|
|
135
|
+
import { default as default103 } from "./components/inputs/reactHookForm/text/UniqueNameInput.js";
|
|
133
136
|
import { CONTINGENCY_LIST_EQUIPMENTS, FILTER_EQUIPMENTS } from "./components/filter/utils/filterFormUtils.js";
|
|
134
137
|
import { getCriteriaBasedFormData, getCriteriaBasedSchema } from "./components/filter/criteriaBased/criteriaBasedFilterUtils.js";
|
|
135
138
|
import { setCommonStore } from "./redux/commonStore.js";
|
|
@@ -143,23 +146,23 @@ export {
|
|
|
143
146
|
default4 as AboutDialog,
|
|
144
147
|
default6 as AuthenticationRouter,
|
|
145
148
|
default7 as AuthenticationRouterErrorDisplay,
|
|
146
|
-
|
|
149
|
+
default72 as AutocompleteInput,
|
|
147
150
|
Battery,
|
|
148
151
|
default23 as BottomRightButtons,
|
|
149
152
|
BusBar,
|
|
150
153
|
CONTINGENCY_LIST_EQUIPMENTS,
|
|
151
|
-
|
|
154
|
+
default88 as CancelButton,
|
|
152
155
|
default62 as CardErrorBoundary,
|
|
153
156
|
ChangeWays,
|
|
154
|
-
|
|
157
|
+
default80 as CheckboxInput,
|
|
155
158
|
CheckBoxList as CheckboxList,
|
|
156
|
-
|
|
157
|
-
|
|
159
|
+
default100 as CountriesInput,
|
|
160
|
+
default96 as CriteriaBasedFilterEditionDialog,
|
|
158
161
|
default21 as CriteriaBasedForm,
|
|
159
|
-
|
|
160
|
-
|
|
162
|
+
default102 as CsvUploader,
|
|
163
|
+
default91 as CustomAGGrid,
|
|
161
164
|
default24 as CustomAgGridTable,
|
|
162
|
-
|
|
165
|
+
default71 as CustomFormProvider,
|
|
163
166
|
default17 as CustomMuiDialog,
|
|
164
167
|
default26 as CustomReactQueryBuilder,
|
|
165
168
|
DARK_THEME,
|
|
@@ -170,8 +173,8 @@ export {
|
|
|
170
173
|
DanglingLine,
|
|
171
174
|
default19 as DescriptionField,
|
|
172
175
|
default18 as DescriptionModificationDialog,
|
|
173
|
-
|
|
174
|
-
|
|
176
|
+
default90 as DirectoryItemSelector,
|
|
177
|
+
default89 as DirectoryItemsInput,
|
|
175
178
|
EQUIPMENT_TYPE,
|
|
176
179
|
fields as EXPERT_FILTER_FIELDS,
|
|
177
180
|
EXPERT_FILTER_QUERY,
|
|
@@ -182,23 +185,23 @@ export {
|
|
|
182
185
|
EquipmentType,
|
|
183
186
|
ErrorInLogoutAlert,
|
|
184
187
|
ErrorInUserValidationAlert,
|
|
185
|
-
|
|
188
|
+
default82 as ErrorInput,
|
|
186
189
|
default15 as ExpandableGroup,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
+
default74 as ExpandingTextField,
|
|
191
|
+
default94 as ExpertFilterEditionDialog,
|
|
192
|
+
default95 as ExplicitNamingFilterEditionDialog,
|
|
190
193
|
FILTER_EQUIPMENTS,
|
|
191
194
|
default25 as FieldConstants,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
+
default83 as FieldErrorAlert,
|
|
196
|
+
default86 as FieldLabel,
|
|
197
|
+
default93 as FilterCreationDialog,
|
|
195
198
|
FlatParameters,
|
|
196
|
-
|
|
199
|
+
default77 as FloatInput,
|
|
197
200
|
GRIDSUITE_DEFAULT_PRECISION,
|
|
198
201
|
Generator,
|
|
199
202
|
Hvdc,
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
default98 as InputWithPopupConfirmation,
|
|
204
|
+
default78 as IntegerInput,
|
|
202
205
|
KeyedColumnsRowIndexer,
|
|
203
206
|
LANG_ENGLISH,
|
|
204
207
|
LANG_FRENCH,
|
|
@@ -210,35 +213,35 @@ export {
|
|
|
210
213
|
Load,
|
|
211
214
|
default8 as Login,
|
|
212
215
|
default9 as Logout,
|
|
213
|
-
|
|
216
|
+
default84 as MidFormError,
|
|
214
217
|
default20 as ModifyElementSelection,
|
|
215
|
-
|
|
218
|
+
default99 as MuiSelectInput,
|
|
216
219
|
default12 as MuiVirtualizedTable,
|
|
217
|
-
|
|
220
|
+
default101 as MultipleAutocompleteInput,
|
|
218
221
|
default16 as MultipleSelectionDialog,
|
|
219
222
|
OverflowableText,
|
|
220
223
|
default22 as PopupConfirmationDialog,
|
|
221
224
|
RESET_AUTHENTICATION_ROUTER_ERROR,
|
|
222
225
|
ROW_DRAGGING_SELECTION_COLUMN_DEF,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
+
default75 as RadioInput,
|
|
227
|
+
default97 as RangeInput,
|
|
228
|
+
default92 as RawReadOnlyInput,
|
|
226
229
|
SHOW_AUTH_INFO_LOGIN,
|
|
227
230
|
SIGNIN_CALLBACK_ERROR,
|
|
228
231
|
SVC,
|
|
229
|
-
|
|
230
|
-
|
|
232
|
+
default69 as SelectClearable,
|
|
233
|
+
default79 as SelectInput,
|
|
231
234
|
ShuntCompensator,
|
|
232
235
|
default10 as SignInCallbackHandler,
|
|
233
236
|
default11 as SilentRenewCallbackHandler,
|
|
234
|
-
|
|
237
|
+
default76 as SliderInput,
|
|
235
238
|
default5 as SnackbarProvider,
|
|
236
|
-
|
|
239
|
+
default87 as SubmitButton,
|
|
237
240
|
Substation,
|
|
238
|
-
|
|
241
|
+
default81 as SwitchInput,
|
|
239
242
|
default13 as TagRenderer,
|
|
240
|
-
|
|
241
|
-
|
|
243
|
+
default85 as TextFieldWithAdornment,
|
|
244
|
+
default73 as TextInput,
|
|
242
245
|
ThreeWindingTransfo,
|
|
243
246
|
default3 as TopBar,
|
|
244
247
|
default2 as TreeViewFinder,
|
|
@@ -247,7 +250,7 @@ export {
|
|
|
247
250
|
USER,
|
|
248
251
|
USER_VALIDATION_ERROR,
|
|
249
252
|
UnauthorizedAccessAlert,
|
|
250
|
-
|
|
253
|
+
default103 as UniqueNameInput,
|
|
251
254
|
UserManagerMock,
|
|
252
255
|
VSC,
|
|
253
256
|
VoltageLevel,
|
|
@@ -324,7 +327,7 @@ export {
|
|
|
324
327
|
microUnitToUnit,
|
|
325
328
|
default56 as multiple_selection_dialog_en,
|
|
326
329
|
default57 as multiple_selection_dialog_fr,
|
|
327
|
-
noSelectionForCopy,
|
|
330
|
+
NO_SELECTION_FOR_COPY as noSelectionForCopy,
|
|
328
331
|
default28 as report_viewer_en,
|
|
329
332
|
default29 as report_viewer_fr,
|
|
330
333
|
roundToDefaultPrecision,
|
|
@@ -346,7 +349,7 @@ export {
|
|
|
346
349
|
default37 as treeview_finder_fr,
|
|
347
350
|
unitToMicroUnit,
|
|
348
351
|
default65 as useConfidentialityWarning,
|
|
349
|
-
|
|
352
|
+
default70 as useCustomFormContext,
|
|
350
353
|
default64 as useDebounce,
|
|
351
354
|
default14 as useElementSearch,
|
|
352
355
|
default63 as useIntlRef,
|
|
@@ -354,5 +357,7 @@ export {
|
|
|
354
357
|
default66 as usePredefinedProperties,
|
|
355
358
|
usePrevious,
|
|
356
359
|
useSnackMessage,
|
|
360
|
+
default67 as useStateBoolean,
|
|
361
|
+
default68 as useStateNumber,
|
|
357
362
|
yup
|
|
358
363
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Settings, Article, NoteAlt, OfflineBolt, Photo, PhotoLibrary } from "@mui/icons-material";
|
|
2
|
+
import { Calculate, Settings, Article, NoteAlt, OfflineBolt, Photo, PhotoLibrary } from "@mui/icons-material";
|
|
3
3
|
import { ElementType } from "../types/elementType.js";
|
|
4
4
|
function getFileIcon(type, style) {
|
|
5
5
|
switch (type) {
|
|
@@ -20,6 +20,8 @@ function getFileIcon(type, style) {
|
|
|
20
20
|
case ElementType.SENSITIVITY_PARAMETERS:
|
|
21
21
|
case ElementType.SHORT_CIRCUIT_PARAMETERS:
|
|
22
22
|
return /* @__PURE__ */ jsx(Settings, { sx: style });
|
|
23
|
+
case ElementType.SPREADSHEET_CONFIG:
|
|
24
|
+
return /* @__PURE__ */ jsx(Calculate, { sx: style });
|
|
23
25
|
case ElementType.DIRECTORY:
|
|
24
26
|
return void 0;
|
|
25
27
|
default:
|
|
@@ -12,6 +12,7 @@ export declare enum ElementType {
|
|
|
12
12
|
SECURITY_ANALYSIS_PARAMETERS = "SECURITY_ANALYSIS_PARAMETERS",
|
|
13
13
|
LOADFLOW_PARAMETERS = "LOADFLOW_PARAMETERS",
|
|
14
14
|
SENSITIVITY_PARAMETERS = "SENSITIVITY_PARAMETERS",
|
|
15
|
-
SHORT_CIRCUIT_PARAMETERS = "SHORT_CIRCUIT_PARAMETERS"
|
|
15
|
+
SHORT_CIRCUIT_PARAMETERS = "SHORT_CIRCUIT_PARAMETERS",
|
|
16
|
+
SPREADSHEET_CONFIG = "SPREADSHEET_CONFIG"
|
|
16
17
|
}
|
|
17
18
|
export type ElementExistsType = (directory: UUID, value: string, elementType: ElementType) => Promise<boolean>;
|
|
@@ -11,6 +11,7 @@ var ElementType = /* @__PURE__ */ ((ElementType2) => {
|
|
|
11
11
|
ElementType2["LOADFLOW_PARAMETERS"] = "LOADFLOW_PARAMETERS";
|
|
12
12
|
ElementType2["SENSITIVITY_PARAMETERS"] = "SENSITIVITY_PARAMETERS";
|
|
13
13
|
ElementType2["SHORT_CIRCUIT_PARAMETERS"] = "SHORT_CIRCUIT_PARAMETERS";
|
|
14
|
+
ElementType2["SPREADSHEET_CONFIG"] = "SPREADSHEET_CONFIG";
|
|
14
15
|
return ElementType2;
|
|
15
16
|
})(ElementType || {});
|
|
16
17
|
export {
|
|
@@ -37,12 +37,6 @@ const Substation = {
|
|
|
37
37
|
label: "Substations",
|
|
38
38
|
type: "SUBSTATION"
|
|
39
39
|
};
|
|
40
|
-
const noSelectionForCopy = {
|
|
41
|
-
sourceCaseUuid: null,
|
|
42
|
-
name: null,
|
|
43
|
-
description: null,
|
|
44
|
-
parentDirectoryUuid: null
|
|
45
|
-
};
|
|
46
40
|
export {
|
|
47
41
|
Battery,
|
|
48
42
|
BusBar,
|
|
@@ -58,6 +52,5 @@ export {
|
|
|
58
52
|
ThreeWindingTransfo,
|
|
59
53
|
TwoWindingTransfo,
|
|
60
54
|
VSC,
|
|
61
|
-
VoltageLevel
|
|
62
|
-
noSelectionForCopy
|
|
55
|
+
VoltageLevel
|
|
63
56
|
};
|