@gridsuite/commons-ui 0.56.0 → 0.58.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/_mocks_/svg.d.ts +4 -0
- package/dist/_mocks_/svg.js +8 -0
- package/dist/chunks/{criteria-based-filter-edition-dialog.DxqH-mLe.js → criteria-based-filter-edition-dialog.CbhgOSRk.js} +140 -111
- package/dist/chunks/{filter-properties.GRon8-ML.js → filter-properties.B7-q_yPf.js} +4 -4
- package/dist/components/DirectoryItemSelector/directory-item-selector.js +2 -1
- package/dist/components/ElementSearchDialog/element-search-dialog.d.ts +18 -15
- package/dist/components/ElementSearchDialog/element-search-dialog.js +28 -65
- package/dist/components/ElementSearchDialog/equipment-item.js +4 -3
- package/dist/components/OverflowableText/overflowable-text.js +39 -9
- package/dist/components/TopBar/TopBar.js +371 -429
- package/dist/components/TreeViewFinder/TreeViewFinder.js +1 -1
- package/dist/components/TreeViewFinder/index.d.ts +7 -0
- package/dist/components/dialogs/custom-mui-dialog.d.ts +2 -1
- package/dist/components/dialogs/custom-mui-dialog.js +6 -4
- package/dist/components/dialogs/description-modification-dialog.js +2 -2
- package/dist/components/dialogs/modify-element-selection.d.ts +14 -0
- package/dist/components/dialogs/modify-element-selection.js +108 -0
- package/dist/components/dialogs/popup-confirmation-dialog.js +1 -1
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.d.ts +1 -2
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.js +4 -4
- package/dist/components/filter/criteria-based/criteria-based-filter-form.js +5 -3
- package/dist/components/filter/criteria-based/criteria-based-filter-utils.d.ts +12 -6
- package/dist/components/filter/criteria-based/criteria-based-filter-utils.js +44 -4
- package/dist/components/filter/criteria-based/criteria-based-form.d.ts +2 -0
- package/dist/components/filter/criteria-based/criteria-based-form.js +6 -6
- package/dist/components/filter/criteria-based/filter-free-properties.js +5 -5
- package/dist/components/filter/criteria-based/filter-properties.js +3 -3
- package/dist/components/filter/criteria-based/filter-property.js +3 -3
- package/dist/components/filter/{constants → expert}/expert-filter-constants.d.ts +5 -0
- package/dist/components/filter/{constants → expert}/expert-filter-constants.js +12 -6
- package/dist/components/filter/expert/expert-filter-edition-dialog.d.ts +3 -3
- package/dist/components/filter/expert/expert-filter-edition-dialog.js +5 -6
- package/dist/components/filter/expert/expert-filter-form.js +5 -5
- package/dist/components/filter/expert/expert-filter-utils.d.ts +73 -1
- package/dist/components/filter/expert/expert-filter-utils.js +8 -6
- package/dist/components/filter/expert/expert-filter.type.d.ts +1 -0
- package/dist/components/filter/expert/expert-filter.type.js +1 -0
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.d.ts +0 -2
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +4 -4
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.d.ts +10 -2
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +12 -8
- package/dist/components/filter/filter-context.d.ts +1 -0
- package/dist/components/filter/filter-context.js +2 -1
- package/dist/components/filter/filter-creation-dialog.d.ts +5 -2
- package/dist/components/filter/filter-creation-dialog.js +3 -3
- package/dist/components/filter/filter-form.d.ts +4 -0
- package/dist/components/filter/filter-form.js +6 -5
- package/dist/components/filter/utils/filter-api.d.ts +5 -0
- package/dist/components/filter/utils/{filters-utils.js → filter-api.js} +16 -10
- package/dist/components/filter/utils/filter-form-utils.d.ts +17 -0
- package/dist/components/filter/utils/{criteria-based-utils.js → filter-form-utils.js} +5 -45
- package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/bottom-right-buttons.js +1 -1
- package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/csv-uploader/csv-uploader.js +23 -23
- package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/custom-ag-grid-table.js +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form/autocomplete-inputs}/autocomplete-input.d.ts +3 -3
- package/dist/components/{react-hook-form → inputs/react-hook-form/autocomplete-inputs}/autocomplete-input.js +4 -4
- package/dist/components/{react-hook-form → inputs/react-hook-form}/autocomplete-inputs/multiple-autocomplete-input.js +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/directory-items-input.js +5 -5
- package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/integer-input.d.ts +3 -3
- package/dist/components/{react-hook-form → inputs/react-hook-form}/provider/custom-form-provider.js +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/range-input.d.ts +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/range-input.js +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/countries-input.d.ts +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/countries-input.js +2 -3
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/input-with-popup-confirmation.js +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/select-input.d.ts +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/select-input.js +4 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/text-input.d.ts +1 -1
- package/dist/components/{react-hook-form → inputs/react-hook-form}/unique-name-input.d.ts +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form}/unique-name-input.js +2 -2
- package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/text-field-with-adornment.d.ts +1 -1
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/combinator-selector.js +1 -1
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/country-value-editor.js +1 -1
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/custom-react-query-builder.js +3 -3
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/element-value-editor.js +22 -22
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/property-value-editor.js +3 -3
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/remove-button.js +2 -2
- package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/use-convert-value.js +1 -1
- package/dist/components/inputs/react-query-builder/value-editor.js +18 -0
- package/dist/components/inputs/select-clearable.js +1 -1
- package/dist/components/translations/filter-en.d.ts +22 -0
- package/dist/components/translations/filter-en.js +23 -0
- package/dist/components/translations/filter-fr.d.ts +22 -0
- package/dist/components/translations/filter-fr.js +23 -0
- package/dist/hooks/useDebounce.d.ts +1 -1
- package/dist/hooks/useSnackMessage.d.ts +4 -7
- package/dist/hooks/useSnackMessage.js +36 -43
- package/dist/index.d.ts +53 -39
- package/dist/index.js +129 -116
- package/dist/redux/commonStore.d.ts +15 -0
- package/dist/redux/commonStore.js +11 -0
- package/dist/services/explore.d.ts +4 -0
- package/dist/services/explore.js +34 -0
- package/dist/services/study.d.ts +3 -0
- package/dist/services/study.js +16 -0
- package/dist/services/utils.d.ts +8 -0
- package/dist/services/utils.js +58 -0
- package/dist/utils/AuthService.js +1 -1
- package/dist/utils/types.d.ts +1 -1
- package/package.json +9 -9
- package/dist/components/filter/utils/criteria-based-utils.d.ts +0 -28
- package/dist/components/filter/utils/filters-utils.d.ts +0 -5
- package/dist/components/react-query-builder-inputs/value-editor.js +0 -18
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/ExpandingTextField.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/ExpandingTextField.js +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/bottom-right-buttons.d.ts +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/cell-editors/numericEditor.d.ts +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/cell-editors/numericEditor.js +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/csv-uploader/csv-uploader.d.ts +0 -0
- /package/dist/components/{react-hook-form/ag-grid-table-rhf → inputs/react-hook-form/ag-grid-table}/custom-ag-grid-table.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/autocomplete-inputs/multiple-autocomplete-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/boolean-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/boolean-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/checkbox-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/checkbox-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/switch-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/booleans/switch-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/directory-items-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/error-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/error-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/field-error-alert.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/field-error-alert.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/mid-form-error.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/error-management/mid-form-error.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/float-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/float-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/integer-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/utils.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/numbers/utils.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/provider/custom-form-provider.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/provider/use-custom-form-context.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/provider/use-custom-form-context.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/radio-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/radio-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/raw-read-only-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/raw-read-only-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/input-with-popup-confirmation.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/mui-select-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/select-inputs/mui-select-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/slider-input.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/slider-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/text-input.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/cancel-button.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/cancel-button.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/field-label.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/field-label.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/functions.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/functions.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/submit-button.d.ts +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/submit-button.js +0 -0
- /package/dist/components/{react-hook-form → inputs/react-hook-form}/utils/text-field-with-adornment.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/add-button.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/add-button.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/combinator-selector.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/country-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/custom-react-query-builder.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/element-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/property-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/remove-button.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/text-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/text-value-editor.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/translated-value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/translated-value-editor.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/use-convert-value.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/use-valid.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/use-valid.js +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/value-editor.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/value-selector.d.ts +0 -0
- /package/dist/components/{react-query-builder-inputs → inputs/react-query-builder}/value-selector.js +0 -0
- /package/dist/{utils → redux}/actions.d.ts +0 -0
- /package/dist/{utils → redux}/actions.js +0 -0
- /package/dist/{components/filter/constants → utils}/equipment-types.d.ts +0 -0
- /package/dist/{components/filter/constants → utils}/equipment-types.js +0 -0
- /package/dist/{components/filter/constants → utils}/field-constants.d.ts +0 -0
- /package/dist/{components/filter/constants → utils}/field-constants.js +0 -0
|
@@ -6,7 +6,7 @@ import { styled } from "@mui/system";
|
|
|
6
6
|
import { Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button, Typography } from "@mui/material";
|
|
7
7
|
import { TreeView, TreeItem } from "@mui/x-tree-view";
|
|
8
8
|
import { ChevronRight, ExpandMore, Check } from "@mui/icons-material";
|
|
9
|
-
import CancelButton from "../react-hook-form/utils/cancel-button.js";
|
|
9
|
+
import CancelButton from "../inputs/react-hook-form/utils/cancel-button.js";
|
|
10
10
|
const cssDialogPaper = "dialogPaper";
|
|
11
11
|
const cssLabelRoot = "labelRoot";
|
|
12
12
|
const cssLabelText = "labelText";
|
|
@@ -1 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021, 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
|
+
*/
|
|
1
7
|
export { default, generateTreeViewFinderClass } from './TreeViewFinder';
|
|
8
|
+
export type { TreeViewFinderProps, TreeViewFinderNodeProps, } from './TreeViewFinder';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MergedFormContextProps } from '../react-hook-form/provider/custom-form-provider';
|
|
1
|
+
import { MergedFormContextProps } from '../inputs/react-hook-form/provider/custom-form-provider';
|
|
2
2
|
import { FieldErrors, UseFormReturn } from 'react-hook-form';
|
|
3
3
|
import { default as React, FunctionComponent } from 'react';
|
|
4
4
|
|
|
@@ -16,6 +16,7 @@ interface ICustomMuiDialog {
|
|
|
16
16
|
onCancel?: () => void;
|
|
17
17
|
children: React.ReactNode;
|
|
18
18
|
isDataFetching?: boolean;
|
|
19
|
+
language?: string;
|
|
19
20
|
}
|
|
20
21
|
declare const CustomMuiDialog: FunctionComponent<ICustomMuiDialog>;
|
|
21
22
|
export default CustomMuiDialog;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FormattedMessage } from "react-intl";
|
|
3
3
|
import { Dialog, LinearProgress, DialogTitle, Grid, DialogContent, DialogActions } from "@mui/material";
|
|
4
|
-
import SubmitButton from "../react-hook-form/utils/submit-button.js";
|
|
5
|
-
import CancelButton from "../react-hook-form/utils/cancel-button.js";
|
|
6
|
-
import CustomFormProvider from "../react-hook-form/provider/custom-form-provider.js";
|
|
4
|
+
import SubmitButton from "../inputs/react-hook-form/utils/submit-button.js";
|
|
5
|
+
import CancelButton from "../inputs/react-hook-form/utils/cancel-button.js";
|
|
6
|
+
import CustomFormProvider from "../inputs/react-hook-form/provider/custom-form-provider.js";
|
|
7
7
|
const styles = {
|
|
8
8
|
dialogPaper: {
|
|
9
9
|
".MuiDialog-paper": {
|
|
@@ -25,7 +25,8 @@ const CustomMuiDialog = ({
|
|
|
25
25
|
disabledSave,
|
|
26
26
|
removeOptional = false,
|
|
27
27
|
onCancel,
|
|
28
|
-
children
|
|
28
|
+
children,
|
|
29
|
+
language
|
|
29
30
|
}) => {
|
|
30
31
|
const { handleSubmit } = formMethods;
|
|
31
32
|
const handleCancel = (event) => {
|
|
@@ -51,6 +52,7 @@ const CustomMuiDialog = ({
|
|
|
51
52
|
...formMethods,
|
|
52
53
|
validationSchema: formSchema,
|
|
53
54
|
removeOptional,
|
|
55
|
+
language,
|
|
54
56
|
children: /* @__PURE__ */ jsxs(
|
|
55
57
|
Dialog,
|
|
56
58
|
{
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback } from "react";
|
|
3
3
|
import "../../utils/yup-config.js";
|
|
4
|
-
import { FieldConstants } from "
|
|
4
|
+
import { FieldConstants } from "../../utils/field-constants.js";
|
|
5
5
|
import { useForm } from "react-hook-form";
|
|
6
6
|
import { yupResolver } from "@hookform/resolvers/yup";
|
|
7
7
|
import { useSnackMessage } from "../../hooks/useSnackMessage.js";
|
|
8
8
|
import CustomMuiDialog from "./custom-mui-dialog.js";
|
|
9
|
-
import ExpandingTextField from "../react-hook-form/ExpandingTextField.js";
|
|
9
|
+
import ExpandingTextField from "../inputs/react-hook-form/ExpandingTextField.js";
|
|
10
10
|
import { Box } from "@mui/material";
|
|
11
11
|
import * as yup from "yup";
|
|
12
12
|
const schema = yup.object().shape({
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ElementType } from '../../utils/ElementType.ts';
|
|
2
|
+
import { UUID } from 'crypto';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface ModifyElementSelectionProps {
|
|
6
|
+
elementType: ElementType;
|
|
7
|
+
dialogOpeningButtonLabel: string;
|
|
8
|
+
dialogTitleLabel: string;
|
|
9
|
+
dialogMessageLabel: string;
|
|
10
|
+
noElementMessageLabel?: string;
|
|
11
|
+
onElementValidated?: (elementId: UUID) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const ModifyElementSelection: React.FunctionComponent<ModifyElementSelectionProps>;
|
|
14
|
+
export default ModifyElementSelection;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useContext, useEffect } from "react";
|
|
3
|
+
import { Grid, Button, Typography } from "@mui/material";
|
|
4
|
+
import { useIntl, FormattedMessage } from "react-intl";
|
|
5
|
+
import { useController } from "react-hook-form";
|
|
6
|
+
import { FilterContext } from "../filter/filter-context.js";
|
|
7
|
+
import { FieldConstants } from "../../utils/field-constants.js";
|
|
8
|
+
import DirectoryItemSelector from "../DirectoryItemSelector/directory-item-selector.js";
|
|
9
|
+
import { ElementType } from "../../utils/ElementType.js";
|
|
10
|
+
const ModifyElementSelection = (props) => {
|
|
11
|
+
const intl = useIntl();
|
|
12
|
+
const [open, setOpen] = useState(false);
|
|
13
|
+
const [activeDirectoryName, setActiveDirectoryName] = useState("");
|
|
14
|
+
const {
|
|
15
|
+
fetchDirectoryContent,
|
|
16
|
+
fetchRootFolders,
|
|
17
|
+
fetchElementsInfos,
|
|
18
|
+
fetchPath
|
|
19
|
+
} = useContext(FilterContext);
|
|
20
|
+
const {
|
|
21
|
+
field: { onChange, value: directory }
|
|
22
|
+
} = useController({
|
|
23
|
+
name: FieldConstants.DIRECTORY
|
|
24
|
+
});
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (directory) {
|
|
27
|
+
fetchPath && fetchPath(directory).then((res) => {
|
|
28
|
+
setActiveDirectoryName(
|
|
29
|
+
res.map((element) => element.elementName.trim()).reverse().join("/")
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}, [directory, fetchPath]);
|
|
34
|
+
const handleSelectFolder = () => {
|
|
35
|
+
setOpen(true);
|
|
36
|
+
};
|
|
37
|
+
const handleClose = (nodes) => {
|
|
38
|
+
if (nodes.length) {
|
|
39
|
+
onChange(nodes[0].id);
|
|
40
|
+
if (props.onElementValidated) {
|
|
41
|
+
props.onElementValidated(nodes[0].id);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
setOpen(false);
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ jsxs(
|
|
47
|
+
Grid,
|
|
48
|
+
{
|
|
49
|
+
sx: {
|
|
50
|
+
marginTop: "10px",
|
|
51
|
+
display: "flex",
|
|
52
|
+
alignItems: "center"
|
|
53
|
+
},
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ jsx(
|
|
56
|
+
Button,
|
|
57
|
+
{
|
|
58
|
+
onClick: handleSelectFolder,
|
|
59
|
+
variant: "contained",
|
|
60
|
+
sx: {
|
|
61
|
+
padding: "10px 30px"
|
|
62
|
+
},
|
|
63
|
+
color: "primary",
|
|
64
|
+
component: "label",
|
|
65
|
+
children: /* @__PURE__ */ jsx(FormattedMessage, { id: props.dialogOpeningButtonLabel })
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ jsx(
|
|
69
|
+
Typography,
|
|
70
|
+
{
|
|
71
|
+
sx: {
|
|
72
|
+
marginLeft: "10px",
|
|
73
|
+
fontWeight: "bold"
|
|
74
|
+
},
|
|
75
|
+
children: activeDirectoryName ? activeDirectoryName : (props == null ? void 0 : props.noElementMessageLabel) ? intl.formatMessage({
|
|
76
|
+
id: props.noElementMessageLabel
|
|
77
|
+
}) : ""
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
/* @__PURE__ */ jsx(
|
|
81
|
+
DirectoryItemSelector,
|
|
82
|
+
{
|
|
83
|
+
open,
|
|
84
|
+
onClose: handleClose,
|
|
85
|
+
types: [props.elementType],
|
|
86
|
+
onlyLeaves: props.elementType !== ElementType.DIRECTORY,
|
|
87
|
+
multiSelect: false,
|
|
88
|
+
validationButtonText: intl.formatMessage({
|
|
89
|
+
id: "confirmDirectoryDialog"
|
|
90
|
+
}),
|
|
91
|
+
title: intl.formatMessage({
|
|
92
|
+
id: props.dialogTitleLabel
|
|
93
|
+
}),
|
|
94
|
+
contentText: intl.formatMessage({
|
|
95
|
+
id: props.dialogMessageLabel
|
|
96
|
+
}),
|
|
97
|
+
fetchDirectoryContent,
|
|
98
|
+
fetchRootFolders,
|
|
99
|
+
fetchElementsInfos
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
};
|
|
106
|
+
export {
|
|
107
|
+
ModifyElementSelection as default
|
|
108
|
+
};
|
|
@@ -6,7 +6,7 @@ import { DialogContentText } from "@mui/material";
|
|
|
6
6
|
import DialogActions from "@mui/material/DialogActions";
|
|
7
7
|
import Button from "@mui/material/Button";
|
|
8
8
|
import { FormattedMessage } from "react-intl";
|
|
9
|
-
import CancelButton from "../react-hook-form/utils/cancel-button.js";
|
|
9
|
+
import CancelButton from "../inputs/react-hook-form/utils/cancel-button.js";
|
|
10
10
|
const PopupConfirmationDialog = ({
|
|
11
11
|
message,
|
|
12
12
|
validateButtonLabel,
|
|
@@ -18,12 +18,11 @@ interface CriteriaBasedFilterEditionDialogProps {
|
|
|
18
18
|
onClose: () => void;
|
|
19
19
|
broadcastChannel: BroadcastChannel;
|
|
20
20
|
getFilterById: (id: string) => Promise<any>;
|
|
21
|
-
saveFilter: (value: any, t: Record<string, any>) => Promise<void>;
|
|
22
21
|
selectionForCopy: SelectionCopy;
|
|
23
22
|
setSelelectionForCopy: (selection: SelectionCopy) => Dispatch<SetStateAction<SelectionCopy>>;
|
|
24
23
|
activeDirectory?: UUID;
|
|
25
24
|
elementExists?: elementExistsType;
|
|
26
25
|
language?: string;
|
|
27
26
|
}
|
|
28
|
-
|
|
27
|
+
declare const CriteriaBasedFilterEditionDialog: FunctionComponent<CriteriaBasedFilterEditionDialogProps>;
|
|
29
28
|
export default CriteriaBasedFilterEditionDialog;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "
|
|
3
|
+
import "../../../utils/field-constants.js";
|
|
4
4
|
import "./criteria-based-filter-utils.js";
|
|
5
5
|
import "../../dialogs/custom-mui-dialog.js";
|
|
6
6
|
import "../../../hooks/useSnackMessage.js";
|
|
@@ -8,12 +8,12 @@ import "react-hook-form";
|
|
|
8
8
|
import "@hookform/resolvers/yup";
|
|
9
9
|
import "./criteria-based-filter-form.js";
|
|
10
10
|
import "../../../utils/yup-config.js";
|
|
11
|
-
import { b,
|
|
11
|
+
import { b, p } from "../../../chunks/criteria-based-filter-edition-dialog.CbhgOSRk.js";
|
|
12
12
|
import "../constants/filter-constants.js";
|
|
13
13
|
import "../../../utils/FetchStatus.js";
|
|
14
|
+
import "../../../services/explore.js";
|
|
14
15
|
import "yup";
|
|
15
16
|
export {
|
|
16
|
-
b as
|
|
17
|
-
b2 as default,
|
|
17
|
+
b as default,
|
|
18
18
|
p as noSelectionForCopy
|
|
19
19
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { f as filterPropertiesYupSchema, F as FreePropertiesTypes, a as FilterProperties } from "../../../chunks/filter-properties.
|
|
3
|
-
import { FieldConstants } from "
|
|
2
|
+
import { f as filterPropertiesYupSchema, F as FreePropertiesTypes, a as FilterProperties } from "../../../chunks/filter-properties.B7-q_yPf.js";
|
|
3
|
+
import { FieldConstants } from "../../../utils/field-constants.js";
|
|
4
4
|
import "../../../utils/yup-config.js";
|
|
5
5
|
import CriteriaBasedForm from "./criteria-based-form.js";
|
|
6
6
|
import Grid from "@mui/material/Grid";
|
|
7
|
-
import { getCriteriaBasedSchema, getCriteriaBasedFormData } from "
|
|
7
|
+
import { getCriteriaBasedSchema, getCriteriaBasedFormData } from "./criteria-based-filter-utils.js";
|
|
8
|
+
import { FILTER_EQUIPMENTS } from "../utils/filter-form-utils.js";
|
|
8
9
|
import * as yup from "yup";
|
|
9
10
|
const criteriaBasedFilterSchema = getCriteriaBasedSchema({
|
|
10
11
|
[FieldConstants.ENERGY_SOURCE]: yup.string().nullable(),
|
|
@@ -20,6 +21,7 @@ const CriteriaBasedFilterForm = () => {
|
|
|
20
21
|
/* @__PURE__ */ jsx(
|
|
21
22
|
CriteriaBasedForm,
|
|
22
23
|
{
|
|
24
|
+
equipments: FILTER_EQUIPMENTS,
|
|
23
25
|
defaultValues: criteriaBasedFilterEmptyFormData[FieldConstants.CRITERIA_BASED]
|
|
24
26
|
}
|
|
25
27
|
),
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { default as yup } from '../../../utils/yup-config';
|
|
2
|
+
|
|
3
|
+
export declare const getCriteriaBasedSchema: (extraFields: any) => {
|
|
4
|
+
criteriaBased: yup.ObjectSchema<{
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
}, yup.AnyObject, {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
}, "">;
|
|
9
|
+
};
|
|
10
|
+
export declare const getCriteriaBasedFormData: (criteriaValues: any, extraFields: any) => {
|
|
11
|
+
criteriaBased: any;
|
|
12
|
+
};
|
|
7
13
|
/**
|
|
8
14
|
* Transform
|
|
9
15
|
* from obj.equipmentFilterForm.{
|
|
@@ -1,8 +1,46 @@
|
|
|
1
|
-
import { FieldConstants } from "
|
|
2
|
-
import { F as FreePropertiesTypes } from "../../../chunks/filter-properties.
|
|
1
|
+
import { FieldConstants } from "../../../utils/field-constants.js";
|
|
2
|
+
import { F as FreePropertiesTypes } from "../../../chunks/filter-properties.B7-q_yPf.js";
|
|
3
3
|
import { PROPERTY_VALUES, PROPERTY_VALUES_1, PROPERTY_VALUES_2, PROPERTY_NAME } from "./filter-property.js";
|
|
4
|
-
import { getCriteriaBasedFormData } from "../utils/criteria-based-utils.js";
|
|
5
4
|
import { FilterType } from "../constants/filter-constants.js";
|
|
5
|
+
import "../../../utils/yup-config.js";
|
|
6
|
+
import { getRangeInputSchema, getRangeInputDataForm, DEFAULT_RANGE_VALUE } from "../../inputs/react-hook-form/range-input.js";
|
|
7
|
+
import * as yup from "yup";
|
|
8
|
+
const getCriteriaBasedSchema = (extraFields) => ({
|
|
9
|
+
[FieldConstants.CRITERIA_BASED]: yup.object().shape({
|
|
10
|
+
[FieldConstants.COUNTRIES]: yup.array().of(yup.string()),
|
|
11
|
+
[FieldConstants.COUNTRIES_1]: yup.array().of(yup.string()),
|
|
12
|
+
[FieldConstants.COUNTRIES_2]: yup.array().of(yup.string()),
|
|
13
|
+
...getRangeInputSchema(FieldConstants.NOMINAL_VOLTAGE),
|
|
14
|
+
...getRangeInputSchema(FieldConstants.NOMINAL_VOLTAGE_1),
|
|
15
|
+
...getRangeInputSchema(FieldConstants.NOMINAL_VOLTAGE_2),
|
|
16
|
+
...getRangeInputSchema(FieldConstants.NOMINAL_VOLTAGE_3),
|
|
17
|
+
...extraFields
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
const getCriteriaBasedFormData = (criteriaValues, extraFields) => ({
|
|
21
|
+
[FieldConstants.CRITERIA_BASED]: {
|
|
22
|
+
[FieldConstants.COUNTRIES]: (criteriaValues == null ? void 0 : criteriaValues[FieldConstants.COUNTRIES]) ?? [],
|
|
23
|
+
[FieldConstants.COUNTRIES_1]: (criteriaValues == null ? void 0 : criteriaValues[FieldConstants.COUNTRIES_1]) ?? [],
|
|
24
|
+
[FieldConstants.COUNTRIES_2]: (criteriaValues == null ? void 0 : criteriaValues[FieldConstants.COUNTRIES_2]) ?? [],
|
|
25
|
+
...getRangeInputDataForm(
|
|
26
|
+
FieldConstants.NOMINAL_VOLTAGE,
|
|
27
|
+
(criteriaValues == null ? void 0 : criteriaValues[FieldConstants.NOMINAL_VOLTAGE]) ?? DEFAULT_RANGE_VALUE
|
|
28
|
+
),
|
|
29
|
+
...getRangeInputDataForm(
|
|
30
|
+
FieldConstants.NOMINAL_VOLTAGE_1,
|
|
31
|
+
(criteriaValues == null ? void 0 : criteriaValues[FieldConstants.NOMINAL_VOLTAGE_1]) ?? DEFAULT_RANGE_VALUE
|
|
32
|
+
),
|
|
33
|
+
...getRangeInputDataForm(
|
|
34
|
+
FieldConstants.NOMINAL_VOLTAGE_2,
|
|
35
|
+
(criteriaValues == null ? void 0 : criteriaValues[FieldConstants.NOMINAL_VOLTAGE_2]) ?? DEFAULT_RANGE_VALUE
|
|
36
|
+
),
|
|
37
|
+
...getRangeInputDataForm(
|
|
38
|
+
FieldConstants.NOMINAL_VOLTAGE_3,
|
|
39
|
+
(criteriaValues == null ? void 0 : criteriaValues[FieldConstants.NOMINAL_VOLTAGE_3]) ?? DEFAULT_RANGE_VALUE
|
|
40
|
+
),
|
|
41
|
+
...extraFields
|
|
42
|
+
}
|
|
43
|
+
});
|
|
6
44
|
const backToFrontTweak = (response) => {
|
|
7
45
|
const subProps = response.equipmentFilterForm.substationFreeProperties;
|
|
8
46
|
const freeProps = response.equipmentFilterForm.freeProperties;
|
|
@@ -123,5 +161,7 @@ function isNominalVoltageEmpty(nominalVoltage) {
|
|
|
123
161
|
}
|
|
124
162
|
export {
|
|
125
163
|
backToFrontTweak,
|
|
126
|
-
frontToBackTweak
|
|
164
|
+
frontToBackTweak,
|
|
165
|
+
getCriteriaBasedFormData,
|
|
166
|
+
getCriteriaBasedSchema
|
|
127
167
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { FormEquipment } from '../utils/filter-form-utils';
|
|
1
2
|
import { FunctionComponent } from 'react';
|
|
2
3
|
|
|
3
4
|
export interface CriteriaBasedFormProps {
|
|
5
|
+
equipments: Record<string, FormEquipment>;
|
|
4
6
|
defaultValues: Record<string, any>;
|
|
5
7
|
}
|
|
6
8
|
declare const CriteriaBasedForm: FunctionComponent<CriteriaBasedFormProps>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FieldConstants } from "
|
|
2
|
+
import { FieldConstants } from "../../../utils/field-constants.js";
|
|
3
3
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
4
4
|
import { Grid } from "@mui/material";
|
|
5
|
-
import SelectInput from "../../react-hook-form/select-inputs/select-input.js";
|
|
6
|
-
import InputWithPopupConfirmation from "../../react-hook-form/select-inputs/input-with-popup-confirmation.js";
|
|
7
|
-
import { FILTER_EQUIPMENTS } from "../utils/criteria-based-utils.js";
|
|
5
|
+
import SelectInput from "../../inputs/react-hook-form/select-inputs/select-input.js";
|
|
6
|
+
import InputWithPopupConfirmation from "../../inputs/react-hook-form/select-inputs/input-with-popup-confirmation.js";
|
|
8
7
|
const CriteriaBasedForm = ({
|
|
8
|
+
equipments,
|
|
9
9
|
defaultValues
|
|
10
10
|
}) => {
|
|
11
11
|
const { getValues, setValue } = useFormContext();
|
|
@@ -29,7 +29,7 @@ const CriteriaBasedForm = ({
|
|
|
29
29
|
{
|
|
30
30
|
Input: SelectInput,
|
|
31
31
|
name: FieldConstants.EQUIPMENT_TYPE,
|
|
32
|
-
options: Object.values(
|
|
32
|
+
options: Object.values(equipments),
|
|
33
33
|
label: "equipmentType",
|
|
34
34
|
shouldOpenPopup: openConfirmationPopup,
|
|
35
35
|
resetOnConfirmation: handleResetOnConfirmation,
|
|
@@ -37,7 +37,7 @@ const CriteriaBasedForm = ({
|
|
|
37
37
|
validateButtonLabel: "button.changeType"
|
|
38
38
|
}
|
|
39
39
|
) }),
|
|
40
|
-
watchEquipmentType &&
|
|
40
|
+
watchEquipmentType && equipments[watchEquipmentType].fields.map(
|
|
41
41
|
(equipment, index) => {
|
|
42
42
|
const EquipmentForm = equipment.renderer;
|
|
43
43
|
return /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, flexGrow: 1, children: /* @__PURE__ */ jsx(EquipmentForm, { ...equipment.props }) }, index);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "../../react-hook-form/error-management/error-input.js";
|
|
3
|
-
import "../../react-hook-form/error-management/field-error-alert.js";
|
|
2
|
+
import "../../inputs/react-hook-form/error-management/error-input.js";
|
|
3
|
+
import "../../inputs/react-hook-form/error-management/field-error-alert.js";
|
|
4
4
|
import "@mui/material";
|
|
5
|
-
import "
|
|
5
|
+
import "../../../utils/field-constants.js";
|
|
6
6
|
import "react-hook-form";
|
|
7
7
|
import "react-intl";
|
|
8
|
-
import { b } from "../../../chunks/filter-properties.
|
|
8
|
+
import { b } from "../../../chunks/filter-properties.B7-q_yPf.js";
|
|
9
9
|
import "./filter-property.js";
|
|
10
10
|
import "@mui/icons-material/Add";
|
|
11
11
|
import "react";
|
|
12
|
-
import "
|
|
12
|
+
import "../../../utils/equipment-types.js";
|
|
13
13
|
export {
|
|
14
14
|
b as default
|
|
15
15
|
};
|
|
@@ -3,11 +3,11 @@ import "@mui/material/Grid";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import "react-hook-form";
|
|
5
5
|
import "react-intl";
|
|
6
|
-
import "
|
|
6
|
+
import "../../../utils/equipment-types.js";
|
|
7
7
|
import "../../../utils/functions.js";
|
|
8
|
-
import "
|
|
8
|
+
import "../../../utils/field-constants.js";
|
|
9
9
|
import "../../../utils/yup-config.js";
|
|
10
|
-
import { F, a, f } from "../../../chunks/filter-properties.
|
|
10
|
+
import { F, a, f } from "../../../chunks/filter-properties.B7-q_yPf.js";
|
|
11
11
|
import "./filter-property.js";
|
|
12
12
|
import "../../../hooks/predefined-properties-hook.js";
|
|
13
13
|
import "../constants/filter-constants.js";
|
|
@@ -4,9 +4,9 @@ import DeleteIcon from "@mui/icons-material/Delete";
|
|
|
4
4
|
import IconButton from "@mui/material/IconButton";
|
|
5
5
|
import Grid from "@mui/material/Grid";
|
|
6
6
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
7
|
-
import AutocompleteInput from "../../react-hook-form/autocomplete-input.js";
|
|
8
|
-
import MultipleAutocompleteInput from "../../react-hook-form/autocomplete-inputs/multiple-autocomplete-input.js";
|
|
9
|
-
import { FieldConstants } from "
|
|
7
|
+
import AutocompleteInput from "../../inputs/react-hook-form/autocomplete-inputs/autocomplete-input.js";
|
|
8
|
+
import MultipleAutocompleteInput from "../../inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.js";
|
|
9
|
+
import { FieldConstants } from "../../../utils/field-constants.js";
|
|
10
10
|
const PROPERTY_NAME = "name_property";
|
|
11
11
|
const PROPERTY_VALUES = "prop_values";
|
|
12
12
|
const PROPERTY_VALUES_1 = "prop_values1";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OperatorType, CombinatorType, FieldType, DataType } from "
|
|
1
|
+
import { OperatorType, CombinatorType, FieldType, DataType } from "./expert-filter.type.js";
|
|
2
2
|
var RULES = /* @__PURE__ */ ((RULES2) => {
|
|
3
3
|
RULES2["EMPTY_RULE"] = "emptyRule";
|
|
4
4
|
RULES2["EMPTY_GROUP"] = "emptyGroup";
|
|
@@ -79,6 +79,11 @@ const OPERATOR_OPTIONS = {
|
|
|
79
79
|
customName: OperatorType.EXISTS,
|
|
80
80
|
label: "exists"
|
|
81
81
|
},
|
|
82
|
+
NOT_EXISTS: {
|
|
83
|
+
name: OperatorType.NOT_EXISTS,
|
|
84
|
+
customName: OperatorType.NOT_EXISTS,
|
|
85
|
+
label: "not_exists"
|
|
86
|
+
},
|
|
82
87
|
// Number
|
|
83
88
|
LOWER: { name: "<", customName: OperatorType.LOWER, label: "lessThan" },
|
|
84
89
|
LOWER_OR_EQUALS: {
|
|
@@ -555,20 +560,20 @@ const fields = {
|
|
|
555
560
|
TWO_WINDINGS_TRANSFORMER: [
|
|
556
561
|
FIELDS_OPTIONS.ID,
|
|
557
562
|
FIELDS_OPTIONS.NAME,
|
|
563
|
+
FIELDS_OPTIONS.COUNTRY,
|
|
564
|
+
FIELDS_OPTIONS.VOLTAGE_LEVEL_ID_1,
|
|
565
|
+
FIELDS_OPTIONS.VOLTAGE_LEVEL_ID_2,
|
|
558
566
|
FIELDS_OPTIONS.NOMINAL_VOLTAGE_1,
|
|
559
567
|
FIELDS_OPTIONS.NOMINAL_VOLTAGE_2,
|
|
560
568
|
FIELDS_OPTIONS.RATED_VOLTAGE_1,
|
|
561
569
|
FIELDS_OPTIONS.RATED_VOLTAGE_2,
|
|
570
|
+
FIELDS_OPTIONS.CONNECTED_1,
|
|
571
|
+
FIELDS_OPTIONS.CONNECTED_2,
|
|
562
572
|
FIELDS_OPTIONS.RATED_S,
|
|
563
573
|
FIELDS_OPTIONS.SERIE_RESISTANCE,
|
|
564
574
|
FIELDS_OPTIONS.SERIE_REACTANCE,
|
|
565
575
|
FIELDS_OPTIONS.MAGNETIZING_CONDUCTANCE,
|
|
566
576
|
FIELDS_OPTIONS.MAGNETIZING_SUSCEPTANCE,
|
|
567
|
-
FIELDS_OPTIONS.CONNECTED_1,
|
|
568
|
-
FIELDS_OPTIONS.CONNECTED_2,
|
|
569
|
-
FIELDS_OPTIONS.VOLTAGE_LEVEL_ID_1,
|
|
570
|
-
FIELDS_OPTIONS.VOLTAGE_LEVEL_ID_2,
|
|
571
|
-
FIELDS_OPTIONS.COUNTRY,
|
|
572
577
|
FIELDS_OPTIONS.HAS_RATIO_TAP_CHANGER,
|
|
573
578
|
FIELDS_OPTIONS.LOAD_TAP_CHANGING_CAPABILITIES,
|
|
574
579
|
FIELDS_OPTIONS.RATIO_REGULATION_MODE,
|
|
@@ -607,6 +612,7 @@ const fields = {
|
|
|
607
612
|
LOAD: [
|
|
608
613
|
FIELDS_OPTIONS.ID,
|
|
609
614
|
FIELDS_OPTIONS.NAME,
|
|
615
|
+
FIELDS_OPTIONS.LOAD_TYPE,
|
|
610
616
|
FIELDS_OPTIONS.COUNTRY,
|
|
611
617
|
FIELDS_OPTIONS.VOLTAGE_LEVEL_ID,
|
|
612
618
|
FIELDS_OPTIONS.NOMINAL_VOLTAGE,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { StudyMetadata } from '../../../hooks/predefined-properties-hook.ts';
|
|
1
2
|
import { ElementAttributes } from '../../../utils/types.ts';
|
|
2
3
|
import { elementExistsType } from '../criteria-based/criteria-based-filter-edition-dialog';
|
|
3
4
|
import { UUID } from 'crypto';
|
|
@@ -15,14 +16,13 @@ export interface ExpertFilterEditionDialogProps {
|
|
|
15
16
|
[prop: string]: any;
|
|
16
17
|
}>;
|
|
17
18
|
setSelectionForCopy: (selection: any) => void;
|
|
18
|
-
createFilter: (filter: any, name: string, description: string, activeDirectory: any) => Promise<void>;
|
|
19
|
-
saveFilter: (filter: any, name: string) => Promise<void>;
|
|
20
19
|
activeDirectory?: UUID;
|
|
21
20
|
elementExists?: elementExistsType;
|
|
22
21
|
language?: string;
|
|
23
22
|
fetchDirectoryContent: (directoryUuid: UUID, elementTypes: string[]) => Promise<ElementAttributes[]>;
|
|
24
23
|
fetchRootFolders: (types: string[]) => Promise<ElementAttributes[]>;
|
|
25
24
|
fetchElementsInfos: (ids: UUID[], elementTypes?: string[], equipmentTypes?: string[]) => Promise<ElementAttributes[]>;
|
|
25
|
+
fetchAppsAndUrls: () => Promise<StudyMetadata[]>;
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
declare const ExpertFilterEditionDialog: FunctionComponent<ExpertFilterEditionDialogProps>;
|
|
28
28
|
export default ExpertFilterEditionDialog;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
3
|
+
import "../../../utils/field-constants.js";
|
|
4
|
+
import "../../../utils/equipment-types.js";
|
|
5
5
|
import "react-hook-form";
|
|
6
6
|
import "@hookform/resolvers/yup";
|
|
7
7
|
import "../../../hooks/useSnackMessage.js";
|
|
8
8
|
import "../../dialogs/custom-mui-dialog.js";
|
|
9
9
|
import "../../../utils/yup-config.js";
|
|
10
|
-
import { E
|
|
11
|
-
import "../utils/
|
|
10
|
+
import { E } from "../../../chunks/criteria-based-filter-edition-dialog.CbhgOSRk.js";
|
|
11
|
+
import "../utils/filter-api.js";
|
|
12
12
|
import "./expert-filter-utils.js";
|
|
13
13
|
import "../filter-context.js";
|
|
14
14
|
import "../constants/filter-constants.js";
|
|
15
15
|
import "../../../utils/FetchStatus.js";
|
|
16
16
|
import "yup";
|
|
17
17
|
export {
|
|
18
|
-
E as
|
|
19
|
-
E2 as default
|
|
18
|
+
E as default
|
|
20
19
|
};
|
|
@@ -2,17 +2,17 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "@mui/material/Grid";
|
|
4
4
|
import "react-querybuilder";
|
|
5
|
-
import { k, n, l, m } from "../../../chunks/criteria-based-filter-edition-dialog.
|
|
5
|
+
import { k, n, l, m } from "../../../chunks/criteria-based-filter-edition-dialog.CbhgOSRk.js";
|
|
6
6
|
import "react-hook-form";
|
|
7
7
|
import "./expert-filter-utils.js";
|
|
8
|
-
import "
|
|
8
|
+
import "./expert-filter-constants.js";
|
|
9
9
|
import "yup";
|
|
10
10
|
import "./expert-filter.type.js";
|
|
11
11
|
import "uuid";
|
|
12
12
|
import "react-intl";
|
|
13
|
-
import "
|
|
14
|
-
import "../../react-hook-form/select-inputs/input-with-popup-confirmation.js";
|
|
15
|
-
import "../../react-hook-form/select-inputs/select-input.js";
|
|
13
|
+
import "../../../utils/field-constants.js";
|
|
14
|
+
import "../../inputs/react-hook-form/select-inputs/input-with-popup-confirmation.js";
|
|
15
|
+
import "../../inputs/react-hook-form/select-inputs/select-input.js";
|
|
16
16
|
import "../constants/filter-constants.js";
|
|
17
17
|
export {
|
|
18
18
|
k as EXPERT_FILTER_QUERY,
|