@gridsuite/commons-ui 0.59.1 → 0.60.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.
Files changed (52) hide show
  1. package/dist/chunks/{criteria-based-filter-edition-dialog.DcXcQOoT.js → criteria-based-filter-edition-dialog.g-QT74FD.js} +57 -22
  2. package/dist/components/ElementSearchDialog/element-search-dialog.d.ts +4 -15
  3. package/dist/components/ElementSearchDialog/element-search-dialog.js +10 -80
  4. package/dist/components/ElementSearchDialog/element-search-input.d.ts +21 -0
  5. package/dist/components/ElementSearchDialog/element-search-input.js +85 -0
  6. package/dist/components/ElementSearchDialog/equipment-item.d.ts +8 -8
  7. package/dist/components/ElementSearchDialog/equipment-item.js +1 -1
  8. package/dist/components/ElementSearchDialog/index.d.ts +2 -0
  9. package/dist/components/ElementSearchDialog/index.js +6 -2
  10. package/dist/components/ElementSearchDialog/tag-renderer.d.ts +3 -3
  11. package/dist/components/ElementSearchDialog/use-element-search.d.ts +16 -0
  12. package/dist/components/ElementSearchDialog/use-element-search.js +57 -0
  13. package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.d.ts +1 -1
  14. package/dist/components/OverflowableText/overflowable-text.d.ts +3 -3
  15. package/dist/components/OverflowableText/overflowable-text.js +1 -2
  16. package/dist/components/dialogs/modify-element-selection.js +1 -1
  17. package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.js +1 -1
  18. package/dist/components/filter/expert/expert-filter-constants.d.ts +129 -2
  19. package/dist/components/filter/expert/expert-filter-constants.js +165 -4
  20. package/dist/components/filter/expert/expert-filter-edition-dialog.js +1 -1
  21. package/dist/components/filter/expert/expert-filter-form.js +1 -1
  22. package/dist/components/filter/expert/expert-filter-utils.d.ts +3 -7
  23. package/dist/components/filter/expert/expert-filter-utils.js +127 -26
  24. package/dist/components/filter/expert/expert-filter.type.d.ts +42 -7
  25. package/dist/components/filter/expert/expert-filter.type.js +16 -0
  26. package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +1 -1
  27. package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +1 -1
  28. package/dist/components/filter/filter-creation-dialog.js +1 -1
  29. package/dist/components/filter/filter-form.js +1 -1
  30. package/dist/components/filter/utils/filter-form-utils.js +1 -1
  31. package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.js +1 -1
  32. package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.js +2 -1
  33. package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.js +1 -1
  34. package/dist/components/inputs/react-hook-form/directory-items-input.js +1 -1
  35. package/dist/components/inputs/react-hook-form/error-management/error-input.js +10 -8
  36. package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.d.ts +5 -0
  37. package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.js +62 -0
  38. package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.d.ts +9 -0
  39. package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.js +65 -0
  40. package/dist/components/inputs/react-query-builder/custom-react-query-builder.js +1 -1
  41. package/dist/components/inputs/react-query-builder/element-value-editor.js +2 -1
  42. package/dist/components/inputs/react-query-builder/remove-button.js +1 -1
  43. package/dist/components/inputs/react-query-builder/value-editor.js +3 -1
  44. package/dist/components/translations/filter-expert-en.d.ts +23 -0
  45. package/dist/components/translations/filter-expert-en.js +24 -1
  46. package/dist/components/translations/filter-expert-fr.d.ts +23 -0
  47. package/dist/components/translations/filter-expert-fr.js +25 -2
  48. package/dist/index.d.ts +2 -2
  49. package/dist/index.js +131 -127
  50. package/dist/utils/styles.d.ts +2 -2
  51. package/dist/utils/types.d.ts +3 -0
  52. package/package.json +1 -1
@@ -0,0 +1,65 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Grid, Typography, Select, MenuItem } from "@mui/material";
3
+ import { useIntl } from "react-intl";
4
+ const styles = {
5
+ gridItem: {
6
+ flexDirection: "column",
7
+ justifyContent: "flex-end",
8
+ alignItems: "baseline"
9
+ }
10
+ };
11
+ const RuleValueEditor = (props) => {
12
+ var _a, _b;
13
+ const {
14
+ schema: {
15
+ controls: { valueEditor: ValueEditorControlElement }
16
+ },
17
+ fieldData,
18
+ rule,
19
+ handleOnChangeRule
20
+ } = props;
21
+ const intl = useIntl();
22
+ const operator = (rule == null ? void 0 : rule.operator) ?? ((_a = fieldData.operators) == null ? void 0 : _a.map((op) => op.name)[0]);
23
+ const handleOnChangeOperator = (operator2) => {
24
+ handleOnChangeRule({
25
+ ...rule,
26
+ operator: operator2
27
+ });
28
+ };
29
+ const handleOnChangeValue = (value) => {
30
+ handleOnChangeRule({
31
+ ...rule,
32
+ value,
33
+ operator
34
+ });
35
+ };
36
+ return /* @__PURE__ */ jsxs(Grid, { container: true, paddingTop: 1, children: [
37
+ /* @__PURE__ */ jsx(Grid, { container: true, item: true, xs: 4, sx: styles.gridItem, children: /* @__PURE__ */ jsx(Typography, { children: intl.formatMessage({ id: fieldData.label }) }) }),
38
+ /* @__PURE__ */ jsx(Grid, { container: true, item: true, xs: 2.5, sx: styles.gridItem, paddingLeft: 1, children: /* @__PURE__ */ jsx(
39
+ Select,
40
+ {
41
+ value: operator,
42
+ size: "small",
43
+ onChange: (event) => {
44
+ handleOnChangeOperator(event.target.value);
45
+ },
46
+ variant: "standard",
47
+ children: (_b = fieldData.operators) == null ? void 0 : _b.map(
48
+ (operator2) => /* @__PURE__ */ jsx(MenuItem, { value: operator2.name, children: intl.formatMessage({ id: operator2.label }) }, operator2.name)
49
+ )
50
+ }
51
+ ) }),
52
+ /* @__PURE__ */ jsx(Grid, { container: true, item: true, xs: 5.5, sx: styles.gridItem, paddingLeft: 1, children: /* @__PURE__ */ jsx(
53
+ ValueEditorControlElement,
54
+ {
55
+ ...props,
56
+ operator,
57
+ handleOnChange: handleOnChangeValue,
58
+ value: rule == null ? void 0 : rule.value
59
+ }
60
+ ) })
61
+ ] });
62
+ };
63
+ export {
64
+ RuleValueEditor as default
65
+ };
@@ -7,7 +7,7 @@ import "@react-querybuilder/material";
7
7
  import "react-querybuilder";
8
8
  import "react-intl";
9
9
  import "react-hook-form";
10
- import { j } from "../../../chunks/criteria-based-filter-edition-dialog.DcXcQOoT.js";
10
+ import { j } from "../../../chunks/criteria-based-filter-edition-dialog.g-QT74FD.js";
11
11
  import "./combinator-selector.js";
12
12
  import "./add-button.js";
13
13
  import "./value-selector.js";
@@ -26,7 +26,7 @@ import "../../../services/explore.js";
26
26
  import "yup";
27
27
  import "../react-hook-form/provider/use-custom-form-context.js";
28
28
  import "../../dialogs/popup-confirmation-dialog.js";
29
- import { i } from "../../../chunks/criteria-based-filter-edition-dialog.DcXcQOoT.js";
29
+ import { i } from "../../../chunks/criteria-based-filter-edition-dialog.g-QT74FD.js";
30
30
  import "ag-grid-react";
31
31
  import "ag-grid-community/styles/ag-grid.css";
32
32
  import "ag-grid-community/styles/ag-theme-alpine.css";
@@ -54,6 +54,7 @@ import "react-papaparse";
54
54
  import "@mui/material/Button";
55
55
  import "react-csv-downloader";
56
56
  import "@mui/material/Alert";
57
+ import "papaparse";
57
58
  import "@mui/icons-material/Check";
58
59
  import "@mui/material/CircularProgress";
59
60
  import "@mui/material/TextField";
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "@mui/material/IconButton";
3
3
  import "@mui/icons-material/Delete";
4
4
  import "react-hook-form";
5
- import { h } from "../../../chunks/criteria-based-filter-edition-dialog.DcXcQOoT.js";
5
+ import { h } from "../../../chunks/criteria-based-filter-edition-dialog.g-QT74FD.js";
6
6
  import "../../filter/expert/expert-filter-utils.js";
7
7
  export {
8
8
  h as default
@@ -9,10 +9,12 @@ import "react-hook-form";
9
9
  import "../../../utils/field-constants.js";
10
10
  import "../../filter/expert/expert-filter.type.js";
11
11
  import "../../../utils/equipment-types.js";
12
- import { V } from "../../../chunks/criteria-based-filter-edition-dialog.DcXcQOoT.js";
12
+ import { V } from "../../../chunks/criteria-based-filter-edition-dialog.g-QT74FD.js";
13
13
  import "../../../utils/ElementType.js";
14
14
  import "./property-value-editor.js";
15
15
  import "../../filter/constants/filter-constants.js";
16
+ import "./composite-rule-editor/group-value-editor.js";
17
+ import "../../filter/expert/expert-filter-constants.js";
16
18
  export {
17
19
  V as default
18
20
  };
@@ -69,5 +69,28 @@ declare const filter_expert_en: {
69
69
  voltageLevelProperty: string;
70
70
  voltageLevelProperty1: string;
71
71
  voltageLevelProperty2: string;
72
+ 'maxQAtNominalV.svar': string;
73
+ 'minQAtNominalV.svar': string;
74
+ 'fixQAtNominalV.svar': string;
75
+ 'maxSusceptance.svar': string;
76
+ 'minSusceptance.svar': string;
77
+ regulationMode: string;
78
+ 'regulationMode.off': string;
79
+ 'regulationMode.voltage': string;
80
+ 'regulationMode.reactivePower': string;
81
+ voltageSetPoint: string;
82
+ reactivePowerSetPoint: string;
83
+ remoteRegulatedTerminal: string;
84
+ regulatingTerminalVLId: string;
85
+ regulatingTerminalConnectableId: string;
86
+ regulationType: string;
87
+ 'regulationType.distant': string;
88
+ 'regulationType.local': string;
89
+ automate: string;
90
+ lowVoltageSetPoint: string;
91
+ highVoltageSetPoint: string;
92
+ lowVoltageThreshold: string;
93
+ highVoltageThreshold: string;
94
+ susceptanceFix: string;
72
95
  };
73
96
  export default filter_expert_en;
@@ -62,7 +62,30 @@ const filter_expert_en = {
62
62
  nominalVoltage2KV: "Nominal Voltage 2 (kV)",
63
63
  voltageLevelProperty: "Voltage level property",
64
64
  voltageLevelProperty1: "Voltage level property 1",
65
- voltageLevelProperty2: "Voltage level property 2"
65
+ voltageLevelProperty2: "Voltage level property 2",
66
+ "maxQAtNominalV.svar": "Q max at nominal voltage (MVar)",
67
+ "minQAtNominalV.svar": "Q min at nominal voltage (MVar)",
68
+ "fixQAtNominalV.svar": "Fixed part of Q at nominal voltage (MVar)",
69
+ "maxSusceptance.svar": "Susceptance max (S)",
70
+ "minSusceptance.svar": "Susceptance min (S)",
71
+ regulationMode: "Regulation mode",
72
+ "regulationMode.off": "Off",
73
+ "regulationMode.voltage": "Voltage regulation",
74
+ "regulationMode.reactivePower": "Reactive power regulation",
75
+ voltageSetPoint: "Voltage set point",
76
+ reactivePowerSetPoint: "Reactive power set point",
77
+ remoteRegulatedTerminal: "Remote regulated terminal",
78
+ regulatingTerminalVLId: "Voltage Level ID",
79
+ regulatingTerminalConnectableId: "Equipment ID",
80
+ regulationType: "Regulation type",
81
+ "regulationType.distant": "Remote regulation",
82
+ "regulationType.local": "Local regulation",
83
+ automate: "Automaton",
84
+ lowVoltageSetPoint: "Low voltage set point ",
85
+ highVoltageSetPoint: "High voltage set point",
86
+ lowVoltageThreshold: "Low voltage threshold",
87
+ highVoltageThreshold: "High voltage threshold",
88
+ susceptanceFix: "Fixed part of susceptance "
66
89
  };
67
90
  export {
68
91
  filter_expert_en as default
@@ -69,5 +69,28 @@ declare const filter_expert_fr: {
69
69
  voltageLevelProperty: string;
70
70
  voltageLevelProperty1: string;
71
71
  voltageLevelProperty2: string;
72
+ 'maxQAtNominalV.svar': string;
73
+ 'minQAtNominalV.svar': string;
74
+ 'fixQAtNominalV.svar': string;
75
+ 'maxSusceptance.svar': string;
76
+ 'minSusceptance.svar': string;
77
+ regulationMode: string;
78
+ 'regulationMode.off': string;
79
+ 'regulationMode.voltage': string;
80
+ 'regulationMode.reactivePower': string;
81
+ voltageSetPoint: string;
82
+ reactivePowerSetPoint: string;
83
+ remoteRegulatedTerminal: string;
84
+ regulatingTerminalVLId: string;
85
+ regulatingTerminalConnectableId: string;
86
+ regulationType: string;
87
+ 'regulationType.distant': string;
88
+ 'regulationType.local': string;
89
+ automate: string;
90
+ lowVoltageSetPoint: string;
91
+ highVoltageSetPoint: string;
92
+ lowVoltageThreshold: string;
93
+ highVoltageThreshold: string;
94
+ susceptanceFix: string;
72
95
  };
73
96
  export default filter_expert_fr;
@@ -24,7 +24,7 @@ const filter_expert_fr = {
24
24
  marginalCost: "Coût",
25
25
  plannedOutageRate: "Indisponibilité programmée",
26
26
  forcedOutageRate: "Indisponibilité fortuite",
27
- vlId: "ID poste",
27
+ vlId: "ID de poste",
28
28
  p0: "P constant (MW)",
29
29
  q0: "Q constant (MVar)",
30
30
  loadTapChangingCapabilities: "Régleur en charge",
@@ -62,7 +62,30 @@ const filter_expert_fr = {
62
62
  nominalVoltage2KV: "Tension nominale 2 (kV)",
63
63
  voltageLevelProperty: "Propriété poste",
64
64
  voltageLevelProperty1: "Propriété poste 1",
65
- voltageLevelProperty2: "Propriété poste 2"
65
+ voltageLevelProperty2: "Propriété poste 2",
66
+ "maxQAtNominalV.svar": "Q max à tension nominale (MVar)",
67
+ "minQAtNominalV.svar": "Q min à tension nominale (MVar)",
68
+ "fixQAtNominalV.svar": "Q fixe à tension nominale (MVar)",
69
+ "maxSusceptance.svar": "Susceptance max (S)",
70
+ "minSusceptance.svar": "Susceptance min (S)",
71
+ regulationMode: "Mode de réglage",
72
+ "regulationMode.off": "Arrêt",
73
+ "regulationMode.voltage": "Réglage de tension",
74
+ "regulationMode.reactivePower": "Réglage du réactif",
75
+ voltageSetPoint: "Tension",
76
+ reactivePowerSetPoint: "Puissance réactive",
77
+ remoteRegulatedTerminal: "Terminal distant réglé",
78
+ regulatingTerminalVLId: "ID de poste",
79
+ regulatingTerminalConnectableId: "ID d'ouvrage",
80
+ regulationType: "Type de réglage",
81
+ "regulationType.distant": "Réglage distant",
82
+ "regulationType.local": "Réglage local",
83
+ automate: "Automate",
84
+ lowVoltageSetPoint: "U consigne bas",
85
+ highVoltageSetPoint: "U consigne haut",
86
+ lowVoltageThreshold: "U activation bas",
87
+ highVoltageThreshold: "U activation haut",
88
+ susceptanceFix: "Susceptance fixe"
66
89
  };
67
90
  export {
68
91
  filter_expert_fr as default
package/dist/index.d.ts CHANGED
@@ -31,7 +31,7 @@ export { FieldConstants } from './utils/field-constants';
31
31
  export type { TreeViewFinderNodeProps } from './components/TreeViewFinder/TreeViewFinder';
32
32
  export { GRIDSUITE_DEFAULT_PRECISION, roundToPrecision, roundToDefaultPrecision, isBlankOrEmpty, unitToMicroUnit, microUnitToUnit, } from './utils/conversion-utils';
33
33
  export { ElementType } from './utils/ElementType';
34
- export type { ElementAttributes, Option } from './utils/types';
34
+ export type { ElementAttributes, Option, Equipment } from './utils/types';
35
35
  export { EQUIPMENT_TYPE, EquipmentType, getEquipmentsInfosForSearchBar, equipmentStyles, } from './utils/EquipmentType';
36
36
  export { initializeAuthenticationDev, initializeAuthenticationProd, logout, dispatchUser, getPreLoginPath, } from './utils/AuthService';
37
37
  export { getFileIcon } from './utils/ElementIcon';
@@ -66,7 +66,7 @@ export { default as common_button_en } from './components/translations/common-bu
66
66
  export { default as common_button_fr } from './components/translations/common-button-fr';
67
67
  export { default as directory_items_input_en } from './components/translations/directory-items-input-en';
68
68
  export { default as directory_items_input_fr } from './components/translations/directory-items-input-fr';
69
- export { TagRenderer } from './components/ElementSearchDialog';
69
+ export { TagRenderer, ElementSearchInput, useElementSearch, } from './components/ElementSearchDialog';
70
70
  export { EquipmentItem } from './components/ElementSearchDialog/equipment-item';
71
71
  export { default as CardErrorBoundary } from './components/CardErrorBoundary';
72
72
  export { useIntlRef } from './hooks/useIntlRef';