@gridsuite/commons-ui 0.256.0 → 0.258.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/composite/filter/FilterCreationDialog.js +6 -2
- package/dist/components/composite/filter/FilterForm.js +10 -0
- package/dist/components/composite/filter/HeaderFilterForm.d.ts +0 -10
- package/dist/components/composite/filter/HeaderFilterForm.js +7 -16
- package/dist/components/composite/filter/expert/ExpertFilterForm.js +3 -3
- package/dist/components/index.js +8 -0
- package/dist/components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js +2 -1
- package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +2 -1
- package/dist/components/ui/dialogs/index.d.ts +1 -0
- package/dist/components/ui/dialogs/index.js +8 -0
- package/dist/{features/parameters/common → components/ui/dialogs}/name-element-editor/index.d.ts +2 -1
- package/dist/components/ui/dialogs/name-element-editor/index.js +10 -0
- package/dist/{features/parameters/common → components/ui/dialogs}/name-element-editor/name-element-editor-form.js +5 -5
- package/dist/{features/parameters/common → components/ui/dialogs}/name-element-editor/name-element-editor-utils.d.ts +13 -3
- package/dist/{features/parameters/common → components/ui/dialogs}/name-element-editor/name-element-editor-utils.js +27 -22
- package/dist/components/ui/dialogs/name-element-editor/named-element-edition-dialog.d.ts +17 -0
- package/dist/components/ui/dialogs/name-element-editor/named-element-edition-dialog.js +49 -0
- package/dist/components/ui/index.js +8 -0
- package/dist/features/global-filter/context/global-filter-context-provider.d.ts +2 -0
- package/dist/features/global-filter/context/global-filter-context-provider.js +41 -0
- package/dist/features/global-filter/context/global-filter-context.d.ts +3 -0
- package/dist/features/global-filter/context/global-filter-context.js +13 -0
- package/dist/features/global-filter/context/global-filter-context.type.d.ts +14 -0
- package/dist/features/global-filter/context/global-filter-context.type.js +1 -0
- package/dist/features/global-filter/context/index.d.ts +8 -0
- package/dist/features/global-filter/context/index.js +4 -0
- package/dist/features/global-filter/global-filter.style.d.ts +162 -0
- package/dist/features/global-filter/global-filter.style.js +190 -0
- package/dist/features/global-filter/index.d.ts +10 -0
- package/dist/features/global-filter/index.js +31 -0
- package/dist/features/global-filter/types/global-filter.type.d.ts +51 -0
- package/dist/features/global-filter/types/global-filter.type.js +19 -0
- package/dist/features/global-filter/types/index.d.ts +8 -0
- package/dist/features/global-filter/types/index.js +8 -0
- package/dist/features/global-filter/types/limit-violation.type.d.ts +11 -0
- package/dist/features/global-filter/types/limit-violation.type.js +9 -0
- package/dist/features/global-filter/ui/global-filter-dropdown-panel.d.ts +10 -0
- package/dist/features/global-filter/ui/global-filter-dropdown-panel.js +251 -0
- package/dist/features/global-filter/ui/global-filter-panel.d.ts +9 -0
- package/dist/features/global-filter/ui/global-filter-panel.js +391 -0
- package/dist/features/global-filter/ui/label-with-info-tooltip.d.ts +12 -0
- package/dist/features/global-filter/ui/label-with-info-tooltip.js +24 -0
- package/dist/features/global-filter/ui/selected-global-filters.d.ts +4 -0
- package/dist/features/global-filter/ui/selected-global-filters.js +114 -0
- package/dist/features/global-filter/utils/build-valid-global-filters.d.ts +8 -0
- package/dist/features/global-filter/utils/build-valid-global-filters.js +51 -0
- package/dist/features/global-filter/utils/editing-global-filter-sync.d.ts +9 -0
- package/dist/features/global-filter/utils/editing-global-filter-sync.js +15 -0
- package/dist/features/global-filter/utils/global-filter-state.utils.d.ts +14 -0
- package/dist/features/global-filter/utils/global-filter-state.utils.js +71 -0
- package/dist/features/global-filter/utils/global-filter-sync.utils.d.ts +9 -0
- package/dist/features/global-filter/utils/global-filter-sync.utils.js +26 -0
- package/dist/features/global-filter/utils/global-filter-utils.d.ts +7 -0
- package/dist/features/global-filter/utils/global-filter-utils.js +44 -0
- package/dist/features/global-filter/utils/index.d.ts +11 -0
- package/dist/features/global-filter/utils/index.js +21 -0
- package/dist/features/index.d.ts +1 -0
- package/dist/features/index.js +42 -8
- package/dist/features/network-modification-table/renderers/description-cell.js +4 -0
- package/dist/features/network-modifications/battery/creation/batteryCreation.utils.js +3 -2
- package/dist/features/network-modifications/battery/modification/batteryModification.utils.js +2 -1
- package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-form.js +2 -1
- package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-utils.js +2 -2
- package/dist/features/network-modifications/by-filter/formula/formula/formula-utils.js +5 -5
- package/dist/features/network-modifications/common/activePowerControl/activePowerControlForm.utils.js +2 -1
- package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.js +2 -1
- package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.js +2 -1
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.js +2 -1
- package/dist/features/network-modifications/common/reactiveLimits/reactiveLimits.utils.js +3 -2
- package/dist/features/network-modifications/common/voltageRegulation/voltageRegulation.utils.js +3 -2
- package/dist/features/network-modifications/generator/creation/generatorCreation.utils.js +4 -3
- package/dist/features/network-modifications/generator/modification/generatorModification.utils.js +5 -4
- package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.js +7 -6
- package/dist/features/network-modifications/shunt-compensator/common/characteristicsForm.utils.js +7 -6
- package/dist/features/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js +10 -9
- package/dist/features/network-modifications/voltageLevel/modification/voltageLevelModification.utils.js +6 -5
- package/dist/features/parameters/common/hook/use-parameters-form.js +1 -2
- package/dist/features/parameters/common/limitreductions/columns-definitions.js +3 -2
- package/dist/features/parameters/common/parameters-creation-dialog.js +9 -0
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +0 -1
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +0 -1
- package/dist/features/parameters/dynamic-margin-calculation/loads-variations-parameters.js +2 -2
- package/dist/features/parameters/dynamic-security-analysis/contingency-parameters.js +0 -1
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +0 -1
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +0 -1
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-inline.js +0 -1
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.js +0 -1
- package/dist/features/parameters/dynamic-simulation/mapping/mapping-parameters.js +0 -1
- package/dist/features/parameters/loadflow/load-flow-advanced-parameters.js +0 -1
- package/dist/features/parameters/loadflow/load-flow-general-parameters.js +0 -1
- package/dist/features/parameters/loadflow/load-flow-parameters-content.js +0 -1
- package/dist/features/parameters/loadflow/load-flow-parameters-dialog.js +4 -8
- package/dist/features/parameters/loadflow/load-flow-parameters-header.js +0 -1
- package/dist/features/parameters/loadflow/load-flow-parameters-inline.js +0 -1
- package/dist/features/parameters/loadflow/load-flow-parameters-utils.js +0 -1
- package/dist/features/parameters/loadflow/load-flow-provider-specific-parameters.js +0 -1
- package/dist/features/parameters/loadflow/use-load-flow-parameters-form.js +1 -2
- package/dist/features/parameters/network-visualizations/network-visualizations-form.js +0 -1
- package/dist/features/parameters/network-visualizations/network-visualizations-parameters-dialog.js +3 -7
- package/dist/features/parameters/network-visualizations/network-visualizations-parameters-inline.js +0 -1
- package/dist/features/parameters/network-visualizations/use-network-visualizations-parameters-form.js +1 -2
- package/dist/features/parameters/pcc-min/pcc-min-parameters-dialog.js +1 -5
- package/dist/features/parameters/pcc-min/pcc-min-parameters-inline.js +0 -1
- package/dist/features/parameters/pcc-min/use-pcc-min-parameters-form.js +1 -2
- package/dist/features/parameters/security-analysis/columns-definitions.js +5 -5
- package/dist/features/parameters/security-analysis/security-analysis-parameters-content.js +0 -1
- package/dist/features/parameters/security-analysis/security-analysis-parameters-dialog.js +2 -6
- package/dist/features/parameters/security-analysis/security-analysis-parameters-form.js +0 -1
- package/dist/features/parameters/security-analysis/security-analysis-parameters-inline.js +0 -1
- package/dist/features/parameters/security-analysis/security-analysis-parameters-utils.js +0 -1
- package/dist/features/parameters/security-analysis/use-security-analysis-parameters-form.js +1 -2
- package/dist/features/parameters/sensi/columns-definitions.js +0 -1
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-dialog.js +1 -5
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.js +0 -1
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-inline.js +0 -1
- package/dist/features/parameters/sensi/sensitivity-parameters-selector.js +0 -1
- package/dist/features/parameters/sensi/use-sensitivity-analysis-parameters.js +1 -2
- package/dist/features/parameters/sensi/utils.js +1 -2
- package/dist/features/parameters/short-circuit/short-circuit-general-tab-panel.js +0 -1
- package/dist/features/parameters/short-circuit/short-circuit-parameters-content.js +0 -1
- package/dist/features/parameters/short-circuit/short-circuit-parameters-dialog.js +1 -5
- package/dist/features/parameters/short-circuit/short-circuit-parameters-inline.js +0 -1
- package/dist/features/parameters/short-circuit/short-circuit-parameters-utils.js +0 -1
- package/dist/features/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +0 -1
- package/dist/features/parameters/short-circuit/short-circuit-study-area-tab-panel.js +0 -1
- package/dist/features/parameters/short-circuit/use-short-circuit-parameters-form.js +1 -2
- package/dist/features/parameters/voltage-init/equipment-selection-parameters.js +0 -1
- package/dist/features/parameters/voltage-init/general-parameters.js +0 -1
- package/dist/features/parameters/voltage-init/use-voltage-init-parameters-form.js +4 -5
- package/dist/features/parameters/voltage-init/voltage-init-parameters-dialog.js +1 -5
- package/dist/features/parameters/voltage-init/voltage-init-parameters-form.js +0 -1
- package/dist/features/parameters/voltage-init/voltage-init-parameters-inline.js +0 -1
- package/dist/features/process-configs/common/index.d.ts +9 -0
- package/dist/features/process-configs/common/index.js +11 -0
- package/dist/features/process-configs/common/process-config-modifications-edition.d.ts +3 -0
- package/dist/features/process-configs/common/process-config-modifications-edition.js +129 -0
- package/dist/features/process-configs/common/process-config-modifications-edition.utils.d.ts +53 -0
- package/dist/features/process-configs/common/process-config-modifications-edition.utils.js +50 -0
- package/dist/features/process-configs/common/process-config.type.d.ts +14 -0
- package/dist/features/process-configs/index.d.ts +6 -3
- package/dist/features/process-configs/index.js +13 -8
- package/dist/features/process-configs/lf-process-config-edition-dialog.d.ts +3 -0
- package/dist/features/process-configs/lf-process-config-edition-dialog.js +136 -0
- package/dist/features/process-configs/loadflow/index.d.ts +9 -0
- package/dist/features/process-configs/loadflow/index.js +9 -0
- package/dist/features/process-configs/loadflow/lf-process-config-edition.d.ts +1 -0
- package/dist/features/process-configs/loadflow/lf-process-config-edition.js +91 -0
- package/dist/features/process-configs/loadflow/lf-process-config-edition.utils.d.ts +39 -0
- package/dist/features/process-configs/{security-analysis/update-sa-process-config-dialog.js → loadflow/lf-process-config-edition.utils.js} +53 -81
- package/dist/features/process-configs/loadflow/lf-process-config.type.d.ts +6 -0
- package/dist/features/process-configs/loadflow/lf-process-config.type.js +1 -0
- package/dist/features/process-configs/process-config-edition.utils.d.ts +13 -0
- package/dist/features/process-configs/process-config-edition.utils.js +1 -0
- package/dist/features/process-configs/process-config.type.d.ts +14 -0
- package/dist/features/process-configs/process-config.type.js +1 -0
- package/dist/features/process-configs/process-config.utils.d.ts +2 -0
- package/dist/features/process-configs/{update-process-config-modifications.js → process-config.utils.js} +11 -74
- package/dist/features/process-configs/sa-process-config-edition-dialog.d.ts +3 -0
- package/dist/features/process-configs/sa-process-config-edition-dialog.js +136 -0
- package/dist/features/process-configs/security-analysis/index.d.ts +4 -3
- package/dist/features/process-configs/security-analysis/index.js +7 -8
- package/dist/features/process-configs/security-analysis/sa-process-config-edition.d.ts +1 -0
- package/dist/features/process-configs/security-analysis/{update-sa-process-config.js → sa-process-config-edition.js} +5 -13
- package/dist/features/process-configs/security-analysis/sa-process-config-edition.utils.d.ts +45 -0
- package/dist/features/process-configs/security-analysis/sa-process-config-edition.utils.js +119 -0
- package/dist/features/process-configs/security-analysis/sa-process-config.type.d.ts +7 -0
- package/dist/features/process-configs/security-analysis/sa-process-config.type.js +1 -0
- package/dist/hooks/use-unique-name-validation.js +3 -2
- package/dist/index.js +77 -9
- package/dist/translations/en/descriptionEn.d.ts +0 -6
- package/dist/translations/en/descriptionEn.js +6 -1
- package/dist/translations/en/filterEn.d.ts +0 -2
- package/dist/translations/en/filterEn.js +0 -2
- package/dist/translations/en/generic-validationEn.d.ts +23 -0
- package/dist/translations/en/generic-validationEn.js +25 -0
- package/dist/translations/en/index.d.ts +2 -0
- package/dist/translations/en/index.js +4 -0
- package/dist/translations/en/network-modification-validationEn.d.ts +23 -0
- package/dist/translations/en/network-modification-validationEn.js +31 -0
- package/dist/translations/en/networkModificationsEn.d.ts +6 -33
- package/dist/translations/en/networkModificationsEn.js +0 -38
- package/dist/translations/en/parameters.d.ts +0 -2
- package/dist/translations/en/parameters.js +0 -2
- package/dist/translations/en/processConfigEn.d.ts +3 -0
- package/dist/translations/en/processConfigEn.js +5 -2
- package/dist/translations/en/use-unique-name-validation-en.d.ts +0 -2
- package/dist/translations/en/use-unique-name-validation-en.js +1 -3
- package/dist/translations/fr/descriptionFr.d.ts +0 -6
- package/dist/translations/fr/descriptionFr.js +6 -1
- package/dist/translations/fr/filterFr.d.ts +0 -2
- package/dist/translations/fr/filterFr.js +0 -2
- package/dist/translations/fr/generic-validationFr.d.ts +17 -0
- package/dist/translations/fr/generic-validationFr.js +25 -0
- package/dist/translations/fr/index.d.ts +2 -0
- package/dist/translations/fr/index.js +4 -0
- package/dist/translations/fr/network-modification-validationFr.d.ts +23 -0
- package/dist/translations/fr/network-modification-validationFr.js +31 -0
- package/dist/translations/fr/networkModificationsFr.d.ts +6 -33
- package/dist/translations/fr/networkModificationsFr.js +0 -38
- package/dist/translations/fr/parameters.d.ts +0 -2
- package/dist/translations/fr/parameters.js +0 -2
- package/dist/translations/fr/processConfigFr.d.ts +3 -0
- package/dist/translations/fr/processConfigFr.js +5 -2
- package/dist/translations/fr/use-unique-name-validation-fr.d.ts +0 -2
- package/dist/translations/fr/use-unique-name-validation-fr.js +1 -3
- package/dist/utils/constants/index.js +19 -1
- package/dist/utils/constants/translationKeys.d.ts +18 -0
- package/dist/utils/constants/translationKeys.js +36 -0
- package/dist/utils/index.js +19 -1
- package/package.json +1 -1
- package/dist/features/parameters/common/name-element-editor/index.js +0 -7
- package/dist/features/process-configs/process-configs.type.d.ts +0 -33
- package/dist/features/process-configs/security-analysis/update-sa-process-config-dialog.d.ts +0 -14
- package/dist/features/process-configs/security-analysis/update-sa-process-config.d.ts +0 -7
- package/dist/features/process-configs/security-analysis/update-sa-process-configs-utils.d.ts +0 -68
- package/dist/features/process-configs/security-analysis/update-sa-process-configs-utils.js +0 -88
- package/dist/features/process-configs/update-process-config-modifications.d.ts +0 -3
- /package/dist/{features/parameters/common → components/ui/dialogs}/name-element-editor/name-element-editor-form.d.ts +0 -0
- /package/dist/features/process-configs/{process-configs.type.js → common/process-config.type.js} +0 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { Theme, SxProps } from '@mui/material';
|
|
2
|
+
import { GlobalFilter } from './types/global-filter.type';
|
|
3
|
+
export declare const GLOBAL_FILTERS_CELL_HEIGHT: number;
|
|
4
|
+
export declare const IMPORT_FILTER_HEIGHT: number;
|
|
5
|
+
export declare const resultsGlobalFilterStyles: {
|
|
6
|
+
readonly autocomplete: (theme: Theme) => {
|
|
7
|
+
width: string;
|
|
8
|
+
'.MuiAutocomplete-inputRoot': {
|
|
9
|
+
height: string;
|
|
10
|
+
maxHeight: string;
|
|
11
|
+
};
|
|
12
|
+
'.Mui-expanded, .Mui-focused, .Mui-focusVisible': {
|
|
13
|
+
position: "absolute";
|
|
14
|
+
width: string;
|
|
15
|
+
height: string;
|
|
16
|
+
zIndex: number;
|
|
17
|
+
background: string;
|
|
18
|
+
};
|
|
19
|
+
'.MuiInputLabel-root': {
|
|
20
|
+
zIndex: number;
|
|
21
|
+
width: string;
|
|
22
|
+
};
|
|
23
|
+
'.MuiInputBase-root': {
|
|
24
|
+
position: "relative";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
readonly dropdown: {
|
|
28
|
+
readonly position: "relative";
|
|
29
|
+
readonly left: "0px";
|
|
30
|
+
readonly width: `${number}px`;
|
|
31
|
+
};
|
|
32
|
+
readonly cellHeader: (theme: Theme) => {
|
|
33
|
+
color: string;
|
|
34
|
+
fontSize: string;
|
|
35
|
+
padding: number;
|
|
36
|
+
border: "1px solid";
|
|
37
|
+
borderColor: string;
|
|
38
|
+
};
|
|
39
|
+
readonly cellTooltip: (theme: Theme) => {
|
|
40
|
+
paddingLeft: string;
|
|
41
|
+
};
|
|
42
|
+
readonly cell: (theme: Theme) => {
|
|
43
|
+
borderLeft: string;
|
|
44
|
+
borderColor: string;
|
|
45
|
+
};
|
|
46
|
+
readonly list: (theme: Theme) => {
|
|
47
|
+
display: "flex";
|
|
48
|
+
flexDirection: "column";
|
|
49
|
+
color: string;
|
|
50
|
+
fontSize: string;
|
|
51
|
+
width: string;
|
|
52
|
+
maxHeight: string;
|
|
53
|
+
};
|
|
54
|
+
readonly selectedFiltersPanel: () => {
|
|
55
|
+
overflowY: "auto";
|
|
56
|
+
padding: number;
|
|
57
|
+
maxHeight: string;
|
|
58
|
+
};
|
|
59
|
+
readonly selectedFiltersSubGroup: (theme: Theme) => {
|
|
60
|
+
display: "block";
|
|
61
|
+
paddingTop: number;
|
|
62
|
+
paddingBottom: number;
|
|
63
|
+
color: string;
|
|
64
|
+
};
|
|
65
|
+
readonly selectedFiltersChips: (theme: Theme) => {
|
|
66
|
+
display: "flex";
|
|
67
|
+
flexDirection: "row";
|
|
68
|
+
flexWrap: "wrap";
|
|
69
|
+
color: string;
|
|
70
|
+
fontSize: string;
|
|
71
|
+
};
|
|
72
|
+
readonly importFilterButton: (theme: Theme) => {
|
|
73
|
+
color: string;
|
|
74
|
+
fontSize: string;
|
|
75
|
+
borderTop: string;
|
|
76
|
+
borderColor: string;
|
|
77
|
+
height: string;
|
|
78
|
+
justifyContent: "flex-start";
|
|
79
|
+
paddingLeft: string;
|
|
80
|
+
};
|
|
81
|
+
readonly miniButton: (theme: Theme) => {
|
|
82
|
+
color: string;
|
|
83
|
+
border: "1px solid";
|
|
84
|
+
borderColor: string;
|
|
85
|
+
padding: number;
|
|
86
|
+
paddingLeft: number;
|
|
87
|
+
paddingRight: number;
|
|
88
|
+
position: "absolute";
|
|
89
|
+
top: number;
|
|
90
|
+
right: number;
|
|
91
|
+
};
|
|
92
|
+
readonly chip: {
|
|
93
|
+
readonly '&.MuiChip-root': {
|
|
94
|
+
readonly margin: "1px 2px 1px 2px";
|
|
95
|
+
readonly padding: "0";
|
|
96
|
+
readonly color: "white";
|
|
97
|
+
};
|
|
98
|
+
readonly '.MuiChip-deleteIcon': {
|
|
99
|
+
readonly color: "white";
|
|
100
|
+
readonly opacity: 0.6;
|
|
101
|
+
};
|
|
102
|
+
readonly '.MuiChip-deleteIcon:hover': {
|
|
103
|
+
readonly color: "white";
|
|
104
|
+
readonly opacity: 1;
|
|
105
|
+
};
|
|
106
|
+
readonly '&.Mui-focusVisible': {
|
|
107
|
+
readonly width: "unset";
|
|
108
|
+
readonly height: "unset";
|
|
109
|
+
readonly position: "relative";
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
readonly chipCountry: (theme: Theme) => {
|
|
113
|
+
'&.MuiChip-root, &.MuiChip-root[aria-selected="true"]': {
|
|
114
|
+
backgroundColor: `${string}!important`;
|
|
115
|
+
};
|
|
116
|
+
'&.MuiChip-root:hover, &.MuiChip-root:focus': {
|
|
117
|
+
backgroundColor: `${string}!important`;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
readonly chipVoltageLevel: (theme: Theme) => {
|
|
121
|
+
'&.MuiChip-root, &.MuiChip-root[aria-selected="true"]': {
|
|
122
|
+
backgroundColor: `${string}!important`;
|
|
123
|
+
};
|
|
124
|
+
'&.MuiChip-root:hover, &.MuiChip-root:focus': {
|
|
125
|
+
backgroundColor: `${string}!important`;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
readonly chipGenericFilter: {
|
|
129
|
+
readonly '&.MuiChip-root, &.MuiChip-root[aria-selected="true"]': {
|
|
130
|
+
readonly backgroundColor: "#00bcd4!important";
|
|
131
|
+
};
|
|
132
|
+
readonly '&.MuiChip-root:hover, &.MuiChip-root:focus': {
|
|
133
|
+
readonly backgroundColor: "#0097a7!important";
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
readonly chipSubstationOrVoltageLevel: {
|
|
137
|
+
readonly '&.MuiChip-root, &.MuiChip-root[aria-selected="true"]': {
|
|
138
|
+
readonly backgroundColor: "#9e9d24!important";
|
|
139
|
+
};
|
|
140
|
+
readonly '&.MuiChip-root:hover, &.MuiChip-root:focus': {
|
|
141
|
+
readonly backgroundColor: "#827717!important";
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
readonly chipSubstationProperty: (theme: Theme) => {
|
|
145
|
+
'&.MuiChip-root, &.MuiChip-root[aria-selected="true"]': {
|
|
146
|
+
backgroundColor: `${string}!important`;
|
|
147
|
+
};
|
|
148
|
+
'&.MuiChip-root:hover, &.MuiChip-root:focus': {
|
|
149
|
+
backgroundColor: `${string}!important`;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
readonly chipNotFound: (theme: Theme) => {
|
|
153
|
+
'&.MuiChip-root, &.MuiChip-root[aria-selected="true"]': {
|
|
154
|
+
backgroundColor: `${string}!important`;
|
|
155
|
+
};
|
|
156
|
+
'&.MuiChip-root:hover, &.MuiChip-root:focus': {
|
|
157
|
+
backgroundColor: `${string}!important`;
|
|
158
|
+
};
|
|
159
|
+
color: string;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
export declare const getResultsGlobalFiltersChipStyle: (element: GlobalFilter) => SxProps<Theme>;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { lime, cyan } from "@mui/material/colors";
|
|
2
|
+
import { GlobalFilterType } from "./types/global-filter.type.js";
|
|
3
|
+
import "../../utils/conversionUtils.js";
|
|
4
|
+
import "../../utils/types/equipmentType.js";
|
|
5
|
+
import "react/jsx-runtime";
|
|
6
|
+
import "@mui/icons-material";
|
|
7
|
+
import { mergeSx } from "../../utils/styles.js";
|
|
8
|
+
const AUTOCOMPLETE_WIDTH = 520;
|
|
9
|
+
const POPPER_EXTRA_WIDTH = 300;
|
|
10
|
+
const GLOBAL_FILTERS_CELL_HEIGHT = 400;
|
|
11
|
+
const IMPORT_FILTER_HEIGHT = 40;
|
|
12
|
+
const resultsGlobalFilterStyles = {
|
|
13
|
+
autocomplete: (theme) => ({
|
|
14
|
+
width: `${AUTOCOMPLETE_WIDTH}px`,
|
|
15
|
+
".MuiAutocomplete-inputRoot": {
|
|
16
|
+
height: "40px",
|
|
17
|
+
maxHeight: "40px"
|
|
18
|
+
},
|
|
19
|
+
".Mui-expanded, .Mui-focused, .Mui-focusVisible": {
|
|
20
|
+
position: "absolute",
|
|
21
|
+
width: "inherit",
|
|
22
|
+
height: "inherit",
|
|
23
|
+
zIndex: 20,
|
|
24
|
+
background: theme.palette.tabBackground
|
|
25
|
+
},
|
|
26
|
+
".MuiInputLabel-root": {
|
|
27
|
+
zIndex: 30,
|
|
28
|
+
width: "auto"
|
|
29
|
+
},
|
|
30
|
+
".MuiInputBase-root": {
|
|
31
|
+
position: "relative"
|
|
32
|
+
}
|
|
33
|
+
}),
|
|
34
|
+
// from the expanded part :
|
|
35
|
+
dropdown: {
|
|
36
|
+
position: "relative",
|
|
37
|
+
left: `0px`,
|
|
38
|
+
width: `${AUTOCOMPLETE_WIDTH + POPPER_EXTRA_WIDTH}px`
|
|
39
|
+
},
|
|
40
|
+
cellHeader: (theme) => ({
|
|
41
|
+
color: theme.palette.text.secondary,
|
|
42
|
+
fontSize: "1em",
|
|
43
|
+
padding: 1,
|
|
44
|
+
border: "1px solid",
|
|
45
|
+
borderColor: theme.palette.divider
|
|
46
|
+
}),
|
|
47
|
+
cellTooltip: (theme) => ({
|
|
48
|
+
paddingLeft: theme.spacing(1)
|
|
49
|
+
}),
|
|
50
|
+
cell: (theme) => ({
|
|
51
|
+
borderLeft: "1px solid",
|
|
52
|
+
borderColor: theme.palette.divider
|
|
53
|
+
}),
|
|
54
|
+
list: (theme) => ({
|
|
55
|
+
display: "flex",
|
|
56
|
+
flexDirection: "column",
|
|
57
|
+
color: theme.palette.text.secondary,
|
|
58
|
+
fontSize: "1em",
|
|
59
|
+
width: "100%",
|
|
60
|
+
maxHeight: `${GLOBAL_FILTERS_CELL_HEIGHT}px`
|
|
61
|
+
}),
|
|
62
|
+
selectedFiltersPanel: () => ({
|
|
63
|
+
overflowY: "auto",
|
|
64
|
+
padding: 0,
|
|
65
|
+
maxHeight: `${GLOBAL_FILTERS_CELL_HEIGHT}px`
|
|
66
|
+
}),
|
|
67
|
+
selectedFiltersSubGroup: (theme) => ({
|
|
68
|
+
display: "block",
|
|
69
|
+
paddingTop: 1,
|
|
70
|
+
paddingBottom: 0,
|
|
71
|
+
color: theme.palette.text.secondary
|
|
72
|
+
}),
|
|
73
|
+
selectedFiltersChips: (theme) => ({
|
|
74
|
+
display: "flex",
|
|
75
|
+
flexDirection: "row",
|
|
76
|
+
flexWrap: "wrap",
|
|
77
|
+
color: theme.palette.text.secondary,
|
|
78
|
+
fontSize: "1em"
|
|
79
|
+
}),
|
|
80
|
+
importFilterButton: (theme) => ({
|
|
81
|
+
color: theme.palette.text.secondary,
|
|
82
|
+
fontSize: "0.8em",
|
|
83
|
+
borderTop: "1px solid",
|
|
84
|
+
borderColor: theme.palette.divider,
|
|
85
|
+
height: `${IMPORT_FILTER_HEIGHT}px`,
|
|
86
|
+
justifyContent: "flex-start",
|
|
87
|
+
paddingLeft: "24px"
|
|
88
|
+
}),
|
|
89
|
+
miniButton: (theme) => ({
|
|
90
|
+
color: theme.palette.text.primary,
|
|
91
|
+
border: "1px solid",
|
|
92
|
+
borderColor: theme.palette.text.primary,
|
|
93
|
+
padding: 0,
|
|
94
|
+
paddingLeft: 0.5,
|
|
95
|
+
paddingRight: 0.5,
|
|
96
|
+
position: "absolute",
|
|
97
|
+
top: 12,
|
|
98
|
+
right: 8
|
|
99
|
+
}),
|
|
100
|
+
chip: {
|
|
101
|
+
"&.MuiChip-root": {
|
|
102
|
+
margin: "1px 2px 1px 2px",
|
|
103
|
+
padding: "0",
|
|
104
|
+
color: "white"
|
|
105
|
+
},
|
|
106
|
+
".MuiChip-deleteIcon": {
|
|
107
|
+
color: "white",
|
|
108
|
+
opacity: 0.6
|
|
109
|
+
},
|
|
110
|
+
".MuiChip-deleteIcon:hover": {
|
|
111
|
+
color: "white",
|
|
112
|
+
opacity: 1
|
|
113
|
+
},
|
|
114
|
+
"&.Mui-focusVisible": {
|
|
115
|
+
width: "unset",
|
|
116
|
+
// prevents the chip from changing size when selected with the keyboard
|
|
117
|
+
height: "unset",
|
|
118
|
+
// prevents the chip from changing size when selected with the keyboard
|
|
119
|
+
position: "relative"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
chipCountry: (theme) => ({
|
|
123
|
+
'&.MuiChip-root, &.MuiChip-root[aria-selected="true"]': {
|
|
124
|
+
backgroundColor: `${theme.palette.info.main}!important`
|
|
125
|
+
},
|
|
126
|
+
"&.MuiChip-root:hover, &.MuiChip-root:focus": {
|
|
127
|
+
backgroundColor: `${theme.palette.info.dark}!important`
|
|
128
|
+
}
|
|
129
|
+
}),
|
|
130
|
+
chipVoltageLevel: (theme) => ({
|
|
131
|
+
'&.MuiChip-root, &.MuiChip-root[aria-selected="true"]': {
|
|
132
|
+
backgroundColor: `${theme.palette.secondary.main}!important`
|
|
133
|
+
},
|
|
134
|
+
"&.MuiChip-root:hover, &.MuiChip-root:focus": {
|
|
135
|
+
backgroundColor: `${theme.palette.secondary.dark}!important`
|
|
136
|
+
}
|
|
137
|
+
}),
|
|
138
|
+
chipGenericFilter: {
|
|
139
|
+
'&.MuiChip-root, &.MuiChip-root[aria-selected="true"]': {
|
|
140
|
+
backgroundColor: `${cyan["500"]}!important`
|
|
141
|
+
},
|
|
142
|
+
"&.MuiChip-root:hover, &.MuiChip-root:focus": {
|
|
143
|
+
backgroundColor: `${cyan["700"]}!important`
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
chipSubstationOrVoltageLevel: {
|
|
147
|
+
'&.MuiChip-root, &.MuiChip-root[aria-selected="true"]': {
|
|
148
|
+
backgroundColor: `${lime["800"]}!important`
|
|
149
|
+
},
|
|
150
|
+
"&.MuiChip-root:hover, &.MuiChip-root:focus": {
|
|
151
|
+
backgroundColor: `${lime["900"]}!important`
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
chipSubstationProperty: (theme) => ({
|
|
155
|
+
'&.MuiChip-root, &.MuiChip-root[aria-selected="true"]': {
|
|
156
|
+
backgroundColor: `${theme.palette.success.main}!important`
|
|
157
|
+
},
|
|
158
|
+
"&.MuiChip-root:hover, &.MuiChip-root:focus": {
|
|
159
|
+
backgroundColor: `${theme.palette.success.dark}!important`
|
|
160
|
+
}
|
|
161
|
+
}),
|
|
162
|
+
chipNotFound: (theme) => ({
|
|
163
|
+
'&.MuiChip-root, &.MuiChip-root[aria-selected="true"]': {
|
|
164
|
+
backgroundColor: `${theme.palette.error.main}!important`
|
|
165
|
+
},
|
|
166
|
+
"&.MuiChip-root:hover, &.MuiChip-root:focus": {
|
|
167
|
+
backgroundColor: `${theme.palette.error.dark}!important`
|
|
168
|
+
},
|
|
169
|
+
color: theme.palette.error.contrastText
|
|
170
|
+
})
|
|
171
|
+
};
|
|
172
|
+
const FILTER_TYPE_STYLE_MAP = {
|
|
173
|
+
[GlobalFilterType.COUNTRY]: resultsGlobalFilterStyles.chipCountry,
|
|
174
|
+
[GlobalFilterType.VOLTAGE_LEVEL]: resultsGlobalFilterStyles.chipVoltageLevel,
|
|
175
|
+
[GlobalFilterType.GENERIC_FILTER]: resultsGlobalFilterStyles.chipGenericFilter,
|
|
176
|
+
[GlobalFilterType.SUBSTATION_OR_VL]: resultsGlobalFilterStyles.chipSubstationOrVoltageLevel,
|
|
177
|
+
[GlobalFilterType.SUBSTATION_PROPERTY]: resultsGlobalFilterStyles.chipSubstationProperty
|
|
178
|
+
};
|
|
179
|
+
const getResultsGlobalFiltersChipStyle = (element) => {
|
|
180
|
+
return mergeSx(
|
|
181
|
+
resultsGlobalFilterStyles.chip,
|
|
182
|
+
element.deleted ? resultsGlobalFilterStyles.chipNotFound : FILTER_TYPE_STYLE_MAP[element.filterType]
|
|
183
|
+
);
|
|
184
|
+
};
|
|
185
|
+
export {
|
|
186
|
+
GLOBAL_FILTERS_CELL_HEIGHT,
|
|
187
|
+
IMPORT_FILTER_HEIGHT,
|
|
188
|
+
getResultsGlobalFiltersChipStyle,
|
|
189
|
+
resultsGlobalFilterStyles
|
|
190
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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 * from './ui/global-filter-panel';
|
|
8
|
+
export * from './types';
|
|
9
|
+
export * from './utils';
|
|
10
|
+
export * from './context';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { GlobalFilterPanel } from "./ui/global-filter-panel.js";
|
|
2
|
+
import { GlobalFilterType, isCriteriaFilter, isCriteriaFilterType } from "./types/global-filter.type.js";
|
|
3
|
+
import { LimitTypes } from "./types/limit-violation.type.js";
|
|
4
|
+
import { buildValidGlobalFilters } from "./utils/build-valid-global-filters.js";
|
|
5
|
+
import { isEditingGlobalFilter, markEditingGlobalFilter, unmarkEditingGlobalFilter } from "./utils/editing-global-filter-sync.js";
|
|
6
|
+
import { MAX_RECENT_GLOBAL_FILTERS, addSelectedGlobalFiltersToTableState, clearSelectedGlobalFiltersFromTableState, markNotFoundGlobalFiltersAsDeletedInState, removeSelectedGlobalFiltersFromTableState } from "./utils/global-filter-state.utils.js";
|
|
7
|
+
import { syncGlobalFilters } from "./utils/global-filter-sync.utils.js";
|
|
8
|
+
import { RECENT_FILTER, addGlobalFilterId, getGlobalFilterId, getOptionLabel } from "./utils/global-filter-utils.js";
|
|
9
|
+
import { GlobalFilterContextProvider } from "./context/global-filter-context-provider.js";
|
|
10
|
+
export {
|
|
11
|
+
GlobalFilterContextProvider,
|
|
12
|
+
GlobalFilterPanel,
|
|
13
|
+
GlobalFilterType,
|
|
14
|
+
LimitTypes,
|
|
15
|
+
MAX_RECENT_GLOBAL_FILTERS,
|
|
16
|
+
RECENT_FILTER,
|
|
17
|
+
addGlobalFilterId,
|
|
18
|
+
addSelectedGlobalFiltersToTableState,
|
|
19
|
+
buildValidGlobalFilters,
|
|
20
|
+
clearSelectedGlobalFiltersFromTableState,
|
|
21
|
+
getGlobalFilterId,
|
|
22
|
+
getOptionLabel,
|
|
23
|
+
isCriteriaFilter,
|
|
24
|
+
isCriteriaFilterType,
|
|
25
|
+
isEditingGlobalFilter,
|
|
26
|
+
markEditingGlobalFilter,
|
|
27
|
+
markNotFoundGlobalFiltersAsDeletedInState,
|
|
28
|
+
removeSelectedGlobalFiltersFromTableState,
|
|
29
|
+
syncGlobalFilters,
|
|
30
|
+
unmarkEditingGlobalFilter
|
|
31
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
|
+
import { LimitTypes } from './limit-violation.type';
|
|
3
|
+
import { FilterConfig, SortConfig } from '../../../components';
|
|
4
|
+
/**
|
|
5
|
+
* Global filters types
|
|
6
|
+
* the order of those enum values is the default order for global filter displays : do not move them around
|
|
7
|
+
*/
|
|
8
|
+
export declare enum GlobalFilterType {
|
|
9
|
+
VOLTAGE_LEVEL = "voltageLevel",
|
|
10
|
+
COUNTRY = "country",
|
|
11
|
+
SUBSTATION_PROPERTY = "substationProperty",
|
|
12
|
+
SUBSTATION_OR_VL = "substationOrVoltageLevelFilter",// voltage levels and substation generic filters which uses the filter library
|
|
13
|
+
GENERIC_FILTER = "genericFilter"
|
|
14
|
+
}
|
|
15
|
+
export declare function isCriteriaFilterType(filterType: string | undefined): boolean;
|
|
16
|
+
export declare function isCriteriaFilter(filter: GlobalFilter): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* globals filters are the filters applied to computation results
|
|
19
|
+
* they may contain generic filters
|
|
20
|
+
*/
|
|
21
|
+
export interface GlobalFilters {
|
|
22
|
+
voltageRanges?: number[][];
|
|
23
|
+
countryCode?: string[];
|
|
24
|
+
genericFilter?: string[];
|
|
25
|
+
substationOrVoltageLevelFilter?: string[];
|
|
26
|
+
substationProperty?: Object;
|
|
27
|
+
limitViolationsTypes?: LimitTypes[];
|
|
28
|
+
}
|
|
29
|
+
export interface GlobalFilter {
|
|
30
|
+
id: string;
|
|
31
|
+
label: string;
|
|
32
|
+
filterType: string;
|
|
33
|
+
filterSubtype?: string;
|
|
34
|
+
filterTypeFromMetadata?: string;
|
|
35
|
+
unselectedDate?: number;
|
|
36
|
+
uuid?: UUID;
|
|
37
|
+
equipmentType?: string;
|
|
38
|
+
path?: string;
|
|
39
|
+
minValue?: number;
|
|
40
|
+
maxValue?: number;
|
|
41
|
+
deleted?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface RecentGlobalFilter {
|
|
44
|
+
id: string;
|
|
45
|
+
unselectedDate: number;
|
|
46
|
+
}
|
|
47
|
+
export interface ResultsQueryParams {
|
|
48
|
+
sort?: SortConfig[];
|
|
49
|
+
filters: FilterConfig[] | null;
|
|
50
|
+
globalFilters?: GlobalFilters;
|
|
51
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var GlobalFilterType = /* @__PURE__ */ ((GlobalFilterType2) => {
|
|
2
|
+
GlobalFilterType2["VOLTAGE_LEVEL"] = "voltageLevel";
|
|
3
|
+
GlobalFilterType2["COUNTRY"] = "country";
|
|
4
|
+
GlobalFilterType2["SUBSTATION_PROPERTY"] = "substationProperty";
|
|
5
|
+
GlobalFilterType2["SUBSTATION_OR_VL"] = "substationOrVoltageLevelFilter";
|
|
6
|
+
GlobalFilterType2["GENERIC_FILTER"] = "genericFilter";
|
|
7
|
+
return GlobalFilterType2;
|
|
8
|
+
})(GlobalFilterType || {});
|
|
9
|
+
function isCriteriaFilterType(filterType) {
|
|
10
|
+
return filterType !== void 0 && (filterType === "genericFilter" || filterType === "substationOrVoltageLevelFilter");
|
|
11
|
+
}
|
|
12
|
+
function isCriteriaFilter(filter) {
|
|
13
|
+
return isCriteriaFilterType(filter.filterType);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
GlobalFilterType,
|
|
17
|
+
isCriteriaFilter,
|
|
18
|
+
isCriteriaFilterType
|
|
19
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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 * from './global-filter.type';
|
|
8
|
+
export * from './limit-violation.type';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum LimitTypes {
|
|
8
|
+
HIGH_VOLTAGE = "HIGH_VOLTAGE",
|
|
9
|
+
LOW_VOLTAGE = "LOW_VOLTAGE",
|
|
10
|
+
CURRENT = "CURRENT"
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PropsWithChildren, RefObject } from 'react';
|
|
2
|
+
import { GlobalFilterProps } from './global-filter-panel';
|
|
3
|
+
type GlobalFilterPaperProps = PropsWithChildren<GlobalFilterProps & {
|
|
4
|
+
autocompleteRef?: RefObject<HTMLElement | null>;
|
|
5
|
+
setOpenedDropdown: (open: boolean) => void;
|
|
6
|
+
filterGroupSelected: string;
|
|
7
|
+
setFilterGroupSelected: (selectedFilterGroup: string) => void;
|
|
8
|
+
}>;
|
|
9
|
+
declare function GlobalFilterDropdownPanel({ children, autocompleteRef, setOpenedDropdown, filterGroupSelected, setFilterGroupSelected, substationPropertiesGlobalFilters, filterCategories, genericFiltersStrictMode, filterableEquipmentTypes, translateCountryCode, }: Readonly<GlobalFilterPaperProps>): import("react").JSX.Element;
|
|
10
|
+
export default GlobalFilterDropdownPanel;
|