@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
|
@@ -8,7 +8,79 @@ type CustomRuleGroupType = RuleGroupType & {
|
|
|
8
8
|
export declare const getOperators: (fieldName: string, intl: IntlShape) => {
|
|
9
9
|
name: string;
|
|
10
10
|
label: string;
|
|
11
|
-
}[]
|
|
11
|
+
}[] | ({
|
|
12
|
+
readonly name: "=";
|
|
13
|
+
readonly value: "=";
|
|
14
|
+
readonly label: "=";
|
|
15
|
+
} | {
|
|
16
|
+
readonly name: "!=";
|
|
17
|
+
readonly value: "!=";
|
|
18
|
+
readonly label: "!=";
|
|
19
|
+
} | {
|
|
20
|
+
readonly name: "<";
|
|
21
|
+
readonly value: "<";
|
|
22
|
+
readonly label: "<";
|
|
23
|
+
} | {
|
|
24
|
+
readonly name: ">";
|
|
25
|
+
readonly value: ">";
|
|
26
|
+
readonly label: ">";
|
|
27
|
+
} | {
|
|
28
|
+
readonly name: "<=";
|
|
29
|
+
readonly value: "<=";
|
|
30
|
+
readonly label: "<=";
|
|
31
|
+
} | {
|
|
32
|
+
readonly name: ">=";
|
|
33
|
+
readonly value: ">=";
|
|
34
|
+
readonly label: ">=";
|
|
35
|
+
} | {
|
|
36
|
+
readonly name: "contains";
|
|
37
|
+
readonly value: "contains";
|
|
38
|
+
readonly label: "contains";
|
|
39
|
+
} | {
|
|
40
|
+
readonly name: "beginsWith";
|
|
41
|
+
readonly value: "beginsWith";
|
|
42
|
+
readonly label: "begins with";
|
|
43
|
+
} | {
|
|
44
|
+
readonly name: "endsWith";
|
|
45
|
+
readonly value: "endsWith";
|
|
46
|
+
readonly label: "ends with";
|
|
47
|
+
} | {
|
|
48
|
+
readonly name: "doesNotContain";
|
|
49
|
+
readonly value: "doesNotContain";
|
|
50
|
+
readonly label: "does not contain";
|
|
51
|
+
} | {
|
|
52
|
+
readonly name: "doesNotBeginWith";
|
|
53
|
+
readonly value: "doesNotBeginWith";
|
|
54
|
+
readonly label: "does not begin with";
|
|
55
|
+
} | {
|
|
56
|
+
readonly name: "doesNotEndWith";
|
|
57
|
+
readonly value: "doesNotEndWith";
|
|
58
|
+
readonly label: "does not end with";
|
|
59
|
+
} | {
|
|
60
|
+
readonly name: "null";
|
|
61
|
+
readonly value: "null";
|
|
62
|
+
readonly label: "is null";
|
|
63
|
+
} | {
|
|
64
|
+
readonly name: "notNull";
|
|
65
|
+
readonly value: "notNull";
|
|
66
|
+
readonly label: "is not null";
|
|
67
|
+
} | {
|
|
68
|
+
readonly name: "in";
|
|
69
|
+
readonly value: "in";
|
|
70
|
+
readonly label: "in";
|
|
71
|
+
} | {
|
|
72
|
+
readonly name: "notIn";
|
|
73
|
+
readonly value: "notIn";
|
|
74
|
+
readonly label: "not in";
|
|
75
|
+
} | {
|
|
76
|
+
readonly name: "between";
|
|
77
|
+
readonly value: "between";
|
|
78
|
+
readonly label: "between";
|
|
79
|
+
} | {
|
|
80
|
+
readonly name: "notBetween";
|
|
81
|
+
readonly value: "notBetween";
|
|
82
|
+
readonly label: "not between";
|
|
83
|
+
})[];
|
|
12
84
|
export declare function exportExpertRules(query: CustomRuleGroupType): RuleGroupTypeExport;
|
|
13
85
|
export declare function importExpertRules(query: RuleGroupTypeExport): CustomRuleGroupType;
|
|
14
86
|
export declare function countRules(query: RuleGroupTypeAny): number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defaultOperators, getParentPath, remove, findPath } from "react-querybuilder";
|
|
2
2
|
import { FieldType, DataType, OperatorType } from "./expert-filter.type.js";
|
|
3
3
|
import { validate } from "uuid";
|
|
4
|
-
import { FIELDS_OPTIONS, OPERATOR_OPTIONS, RULES } from "
|
|
4
|
+
import { FIELDS_OPTIONS, OPERATOR_OPTIONS, RULES } from "./expert-filter-constants.js";
|
|
5
5
|
import { isBlankOrEmpty, microUnitToUnit, unitToMicroUnit } from "../../../utils/conversion-utils.js";
|
|
6
6
|
const microUnits = [
|
|
7
7
|
FieldType.SHUNT_CONDUCTANCE_1,
|
|
@@ -30,7 +30,8 @@ const getOperators = (fieldName, intl) => {
|
|
|
30
30
|
OPERATOR_OPTIONS.BEGINS_WITH,
|
|
31
31
|
OPERATOR_OPTIONS.ENDS_WITH,
|
|
32
32
|
OPERATOR_OPTIONS.IN,
|
|
33
|
-
OPERATOR_OPTIONS.EXISTS
|
|
33
|
+
OPERATOR_OPTIONS.EXISTS,
|
|
34
|
+
OPERATOR_OPTIONS.NOT_EXISTS
|
|
34
35
|
];
|
|
35
36
|
if (field.name === FieldType.ID || field.name === FieldType.VOLTAGE_LEVEL_ID || field.name === FieldType.VOLTAGE_LEVEL_ID_1 || field.name === FieldType.VOLTAGE_LEVEL_ID_2) {
|
|
36
37
|
operators.push(OPERATOR_OPTIONS.IS_PART_OF);
|
|
@@ -38,7 +39,7 @@ const getOperators = (fieldName, intl) => {
|
|
|
38
39
|
}
|
|
39
40
|
if (field.name === FieldType.ID) {
|
|
40
41
|
operators = operators.filter(
|
|
41
|
-
(field2) => field2.name !== OperatorType.EXISTS
|
|
42
|
+
(field2) => field2.name !== OperatorType.EXISTS && field2.name !== OperatorType.NOT_EXISTS
|
|
42
43
|
);
|
|
43
44
|
}
|
|
44
45
|
return operators.map((operator) => ({
|
|
@@ -53,7 +54,8 @@ const getOperators = (fieldName, intl) => {
|
|
|
53
54
|
OPERATOR_OPTIONS.LOWER,
|
|
54
55
|
OPERATOR_OPTIONS.LOWER_OR_EQUALS,
|
|
55
56
|
OPERATOR_OPTIONS.BETWEEN,
|
|
56
|
-
OPERATOR_OPTIONS.EXISTS
|
|
57
|
+
OPERATOR_OPTIONS.EXISTS,
|
|
58
|
+
OPERATOR_OPTIONS.NOT_EXISTS
|
|
57
59
|
].map((operator) => ({
|
|
58
60
|
name: operator.name,
|
|
59
61
|
label: intl.formatMessage({ id: operator.label })
|
|
@@ -107,7 +109,7 @@ function exportExpertRules(query) {
|
|
|
107
109
|
operator: dataType !== DataType.PROPERTY ? (_a = Object.values(OPERATOR_OPTIONS).find(
|
|
108
110
|
(operator) => operator.name === rule.operator
|
|
109
111
|
)) == null ? void 0 : _a.customName : rule.value.propertyOperator,
|
|
110
|
-
value: !isValueAnArray && rule.operator !== OperatorType.EXISTS && dataType !== DataType.PROPERTY ? changeValueUnit(rule.value, rule.field) : void 0,
|
|
112
|
+
value: !isValueAnArray && rule.operator !== OperatorType.EXISTS && rule.operator !== OperatorType.NOT_EXISTS && dataType !== DataType.PROPERTY ? changeValueUnit(rule.value, rule.field) : void 0,
|
|
111
113
|
values: isValueAnArray && dataType !== DataType.PROPERTY ? changeValueUnit(rule.value, rule.field) : void 0,
|
|
112
114
|
dataType,
|
|
113
115
|
propertyName: dataType === DataType.PROPERTY ? rule.value.propertyName : void 0,
|
|
@@ -204,7 +206,7 @@ const queryValidator = (query) => {
|
|
|
204
206
|
const isValueAnArray = Array.isArray(rule.value);
|
|
205
207
|
const isNumberInput = getDataType(rule.field, rule.operator) === DataType.NUMBER && !isValueAnArray;
|
|
206
208
|
const isStringInput = getDataType(rule.field, rule.operator) === DataType.STRING && !isValueAnArray;
|
|
207
|
-
if (rule.id && rule.operator === OPERATOR_OPTIONS.EXISTS.name) {
|
|
209
|
+
if (rule.id && (rule.operator === OPERATOR_OPTIONS.EXISTS.name || rule.operator === OPERATOR_OPTIONS.NOT_EXISTS.name)) {
|
|
208
210
|
result[rule.id] = {
|
|
209
211
|
valid: true,
|
|
210
212
|
reasons: void 0
|
|
@@ -12,6 +12,7 @@ var OperatorType = /* @__PURE__ */ ((OperatorType2) => {
|
|
|
12
12
|
OperatorType2["BEGINS_WITH"] = "BEGINS_WITH";
|
|
13
13
|
OperatorType2["ENDS_WITH"] = "ENDS_WITH";
|
|
14
14
|
OperatorType2["EXISTS"] = "EXISTS";
|
|
15
|
+
OperatorType2["NOT_EXISTS"] = "NOT_EXISTS";
|
|
15
16
|
OperatorType2["IS_PART_OF"] = "IS_PART_OF";
|
|
16
17
|
OperatorType2["IS_NOT_PART_OF"] = "IS_NOT_PART_OF";
|
|
17
18
|
return OperatorType2;
|
|
@@ -12,8 +12,6 @@ interface ExplicitNamingFilterEditionDialogProps {
|
|
|
12
12
|
selectionForCopy: any;
|
|
13
13
|
setSelectionForCopy: (selection: any) => void;
|
|
14
14
|
getFilterById: (id: string) => Promise<any>;
|
|
15
|
-
createFilter: (filter: any, name: string, description: string, activeDirectory: any) => Promise<void>;
|
|
16
|
-
saveFilter: (filter: any, name: string) => Promise<void>;
|
|
17
15
|
activeDirectory?: UUID;
|
|
18
16
|
elementExists?: elementExistsType;
|
|
19
17
|
language?: string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "prop-types";
|
|
4
|
-
import "../utils/
|
|
4
|
+
import "../utils/filter-api.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 { a } from "../../../chunks/criteria-based-filter-edition-dialog.
|
|
11
|
-
import "
|
|
10
|
+
import { a } from "../../../chunks/criteria-based-filter-edition-dialog.CbhgOSRk.js";
|
|
11
|
+
import "../../../utils/field-constants.js";
|
|
12
12
|
import "uuid";
|
|
13
|
-
import "
|
|
13
|
+
import "../../../utils/equipment-types.js";
|
|
14
14
|
import "../constants/filter-constants.js";
|
|
15
15
|
import "../../../utils/FetchStatus.js";
|
|
16
16
|
import "yup";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { UUID } from 'crypto';
|
|
1
2
|
import { DISTRIBUTION_KEY } from '../constants/filter-constants';
|
|
2
3
|
import { default as yup } from '../../../utils/yup-config';
|
|
3
|
-
import { FieldConstants } from '
|
|
4
|
+
import { FieldConstants } from '../../../utils/field-constants';
|
|
4
5
|
import { FunctionComponent } from 'react';
|
|
5
6
|
|
|
6
7
|
export declare const FILTER_EQUIPMENTS_ATTRIBUTES = "filterEquipmentsAttributes";
|
|
@@ -18,5 +19,12 @@ interface FilterTableRow {
|
|
|
18
19
|
export declare function getExplicitNamingFilterEmptyFormData(): {
|
|
19
20
|
filterEquipmentsAttributes: FilterTableRow[];
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
+
export interface FilterForExplicitConversionProps {
|
|
23
|
+
id: UUID;
|
|
24
|
+
equipmentType: String;
|
|
25
|
+
}
|
|
26
|
+
interface ExplicitNamingFilterFormProps {
|
|
27
|
+
sourceFilterForExplicitNamingConversion?: FilterForExplicitConversionProps;
|
|
28
|
+
}
|
|
29
|
+
declare const ExplicitNamingFilterForm: FunctionComponent<ExplicitNamingFilterFormProps>;
|
|
22
30
|
export default ExplicitNamingFilterForm;
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "
|
|
3
|
+
import "../../../utils/field-constants.js";
|
|
4
4
|
import "../../../utils/yup-config.js";
|
|
5
|
-
import { d, f, e, g } from "../../../chunks/criteria-based-filter-edition-dialog.
|
|
5
|
+
import { d, f, e, g } from "../../../chunks/criteria-based-filter-edition-dialog.CbhgOSRk.js";
|
|
6
6
|
import "react-intl";
|
|
7
7
|
import "react-hook-form";
|
|
8
8
|
import "@mui/material/Grid";
|
|
9
|
-
import "../../react-hook-form/select-inputs/select-input.js";
|
|
10
|
-
import "
|
|
11
|
-
import "../../react-hook-form/ag-grid-table
|
|
12
|
-
import "../../react-hook-form/select-inputs/input-with-popup-confirmation.js";
|
|
9
|
+
import "../../inputs/react-hook-form/select-inputs/select-input.js";
|
|
10
|
+
import "../../../utils/equipment-types.js";
|
|
11
|
+
import "../../inputs/react-hook-form/ag-grid-table/cell-editors/numericEditor.js";
|
|
12
|
+
import "../../inputs/react-hook-form/select-inputs/input-with-popup-confirmation.js";
|
|
13
13
|
import "uuid";
|
|
14
|
-
import "../../react-hook-form/utils/functions.js";
|
|
14
|
+
import "../../inputs/react-hook-form/utils/functions.js";
|
|
15
15
|
import "../constants/filter-constants.js";
|
|
16
|
-
import "../utils/
|
|
16
|
+
import "../utils/filter-form-utils.js";
|
|
17
|
+
import "../../../hooks/useSnackMessage.js";
|
|
18
|
+
import "../../../utils/ElementType.js";
|
|
19
|
+
import "../../dialogs/modify-element-selection.js";
|
|
20
|
+
import "../../../services/study.js";
|
|
17
21
|
import "yup";
|
|
18
22
|
export {
|
|
19
23
|
d as FILTER_EQUIPMENTS_ATTRIBUTES,
|
|
@@ -7,6 +7,7 @@ interface FilterContextProps {
|
|
|
7
7
|
fetchRootFolders?: (types: string[]) => Promise<ElementAttributes[]>;
|
|
8
8
|
fetchElementsInfos?: (ids: UUID[], elementTypes?: string[], equipmentTypes?: string[]) => Promise<ElementAttributes[]>;
|
|
9
9
|
fetchAppsAndUrls?: () => Promise<StudyMetadata[]>;
|
|
10
|
+
fetchPath?: (element: UUID) => Promise<ElementAttributes[]>;
|
|
10
11
|
}
|
|
11
12
|
export declare const FilterContext: import('react').Context<FilterContextProps>;
|
|
12
13
|
export {};
|
|
@@ -8,14 +8,17 @@ export interface FilterCreationDialogProps {
|
|
|
8
8
|
open: boolean;
|
|
9
9
|
onClose: () => void;
|
|
10
10
|
activeDirectory?: UUID;
|
|
11
|
-
createFilter: (filter: any, name: string, description: string, activeDirectory: any) => Promise<void>;
|
|
12
|
-
saveFilter: (filter: any, name: string) => Promise<void>;
|
|
13
11
|
fetchAppsAndUrls: () => Promise<StudyMetadata[]>;
|
|
14
12
|
elementExists?: elementExistsType;
|
|
15
13
|
language?: string;
|
|
16
14
|
fetchDirectoryContent?: (directoryUuid: UUID, elementTypes: string[]) => Promise<ElementAttributes[]>;
|
|
17
15
|
fetchRootFolders?: (types: string[]) => Promise<ElementAttributes[]>;
|
|
18
16
|
fetchElementsInfos?: (ids: UUID[], elementTypes?: string[], equipmentTypes?: string[]) => Promise<ElementAttributes[]>;
|
|
17
|
+
fetchPath?: (elementUuid: UUID) => Promise<ElementAttributes[]>;
|
|
18
|
+
sourceFilterForExplicitNamingConversion?: {
|
|
19
|
+
id: UUID;
|
|
20
|
+
equipmentType: string;
|
|
21
|
+
};
|
|
19
22
|
}
|
|
20
23
|
declare const FilterCreationDialog: FunctionComponent<FilterCreationDialogProps>;
|
|
21
24
|
export default FilterCreationDialog;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "./utils/
|
|
3
|
+
import "./utils/filter-api.js";
|
|
4
4
|
import "react-hook-form";
|
|
5
5
|
import "../../hooks/useSnackMessage.js";
|
|
6
6
|
import "../dialogs/custom-mui-dialog.js";
|
|
7
7
|
import "./criteria-based/criteria-based-filter-form.js";
|
|
8
|
-
import { F } from "../../chunks/criteria-based-filter-edition-dialog.
|
|
9
|
-
import "
|
|
8
|
+
import { F } from "../../chunks/criteria-based-filter-edition-dialog.CbhgOSRk.js";
|
|
9
|
+
import "../../utils/field-constants.js";
|
|
10
10
|
import "../../utils/yup-config.js";
|
|
11
11
|
import "@hookform/resolvers/yup";
|
|
12
12
|
import "./filter-context.js";
|
|
@@ -6,6 +6,10 @@ interface FilterFormProps {
|
|
|
6
6
|
creation?: boolean;
|
|
7
7
|
activeDirectory?: UUID;
|
|
8
8
|
elementExists?: elementExistsType;
|
|
9
|
+
sourceFilterForExplicitNamingConversion?: {
|
|
10
|
+
id: UUID;
|
|
11
|
+
equipmentType: string;
|
|
12
|
+
};
|
|
9
13
|
}
|
|
10
14
|
export declare const FilterForm: FunctionComponent<FilterFormProps>;
|
|
11
15
|
export {};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "../react-hook-form/unique-name-input.js";
|
|
3
|
-
import "
|
|
2
|
+
import "../inputs/react-hook-form/unique-name-input.js";
|
|
3
|
+
import "../../utils/field-constants.js";
|
|
4
4
|
import "./criteria-based/criteria-based-filter-form.js";
|
|
5
|
-
import { o } from "../../chunks/criteria-based-filter-edition-dialog.
|
|
5
|
+
import { o } from "../../chunks/criteria-based-filter-edition-dialog.CbhgOSRk.js";
|
|
6
|
+
import "react";
|
|
6
7
|
import "react-hook-form";
|
|
7
8
|
import "@mui/material";
|
|
8
|
-
import "../react-hook-form/radio-input.js";
|
|
9
|
+
import "../inputs/react-hook-form/radio-input.js";
|
|
9
10
|
import "../../utils/ElementType.js";
|
|
10
|
-
import "../react-hook-form/ExpandingTextField.js";
|
|
11
|
+
import "../inputs/react-hook-form/ExpandingTextField.js";
|
|
11
12
|
import "./constants/filter-constants.js";
|
|
12
13
|
export {
|
|
13
14
|
o as FilterForm
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UUID } from 'crypto';
|
|
2
|
+
|
|
3
|
+
export declare const saveExplicitNamingFilter: (tableValues: any[], isFilterCreation: boolean, equipmentType: string, name: string, description: string, id: string | null, setCreateFilterErr: (value: any) => void, handleClose: () => void, activeDirectory?: UUID, token?: string) => void;
|
|
4
|
+
export declare const saveCriteriaBasedFilter: (filter: any, activeDirectory: any, onClose: () => void, onError: (message: string) => void, token?: string) => void;
|
|
5
|
+
export declare const saveExpertFilter: (id: string | null, query: any, equipmentType: string, name: string, description: string, isFilterCreation: boolean, activeDirectory: any, onClose: () => void, onError: (message: string) => void, token?: string) => void;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { FieldConstants } from "
|
|
1
|
+
import { FieldConstants } from "../../../utils/field-constants.js";
|
|
2
2
|
import { frontToBackTweak } from "../criteria-based/criteria-based-filter-utils.js";
|
|
3
|
-
import { Generator, Load } from "
|
|
3
|
+
import { Generator, Load } from "../../../utils/equipment-types.js";
|
|
4
4
|
import { exportExpertRules } from "../expert/expert-filter-utils.js";
|
|
5
5
|
import { DISTRIBUTION_KEY, FilterType } from "../constants/filter-constants.js";
|
|
6
|
-
|
|
6
|
+
import { createFilter, saveFilter } from "../../../services/explore.js";
|
|
7
|
+
const saveExplicitNamingFilter = (tableValues, isFilterCreation, equipmentType, name, description, id, setCreateFilterErr, handleClose, activeDirectory, token) => {
|
|
7
8
|
let cleanedTableValues;
|
|
8
9
|
const isGeneratorOrLoad = equipmentType === Generator.type || equipmentType === Load.type;
|
|
9
10
|
if (isGeneratorOrLoad) {
|
|
@@ -25,7 +26,8 @@ const saveExplicitNamingFilter = (tableValues, isFilterCreation, equipmentType,
|
|
|
25
26
|
},
|
|
26
27
|
name,
|
|
27
28
|
description,
|
|
28
|
-
activeDirectory
|
|
29
|
+
activeDirectory,
|
|
30
|
+
token
|
|
29
31
|
).then(() => {
|
|
30
32
|
handleClose();
|
|
31
33
|
}).catch((error) => {
|
|
@@ -39,7 +41,8 @@ const saveExplicitNamingFilter = (tableValues, isFilterCreation, equipmentType,
|
|
|
39
41
|
equipmentType,
|
|
40
42
|
filterEquipmentsAttributes: cleanedTableValues
|
|
41
43
|
},
|
|
42
|
-
name
|
|
44
|
+
name,
|
|
45
|
+
token
|
|
43
46
|
).then(() => {
|
|
44
47
|
handleClose();
|
|
45
48
|
}).catch((error) => {
|
|
@@ -47,20 +50,21 @@ const saveExplicitNamingFilter = (tableValues, isFilterCreation, equipmentType,
|
|
|
47
50
|
});
|
|
48
51
|
}
|
|
49
52
|
};
|
|
50
|
-
const saveCriteriaBasedFilter = (filter, activeDirectory, onClose, onError,
|
|
53
|
+
const saveCriteriaBasedFilter = (filter, activeDirectory, onClose, onError, token) => {
|
|
51
54
|
const filterForBack = frontToBackTweak(void 0, filter);
|
|
52
55
|
createFilter(
|
|
53
56
|
filterForBack,
|
|
54
57
|
filter[FieldConstants.NAME],
|
|
55
58
|
filter[FieldConstants.DESCRIPTION],
|
|
56
|
-
activeDirectory
|
|
59
|
+
activeDirectory,
|
|
60
|
+
token
|
|
57
61
|
).then(() => {
|
|
58
62
|
onClose();
|
|
59
63
|
}).catch((error) => {
|
|
60
64
|
onError(error.message);
|
|
61
65
|
});
|
|
62
66
|
};
|
|
63
|
-
const saveExpertFilter = (id, query, equipmentType, name, description, isFilterCreation, activeDirectory, onClose, onError,
|
|
67
|
+
const saveExpertFilter = (id, query, equipmentType, name, description, isFilterCreation, activeDirectory, onClose, onError, token) => {
|
|
64
68
|
if (isFilterCreation) {
|
|
65
69
|
createFilter(
|
|
66
70
|
{
|
|
@@ -70,7 +74,8 @@ const saveExpertFilter = (id, query, equipmentType, name, description, isFilterC
|
|
|
70
74
|
},
|
|
71
75
|
name,
|
|
72
76
|
description,
|
|
73
|
-
activeDirectory
|
|
77
|
+
activeDirectory,
|
|
78
|
+
token
|
|
74
79
|
).then(() => {
|
|
75
80
|
onClose();
|
|
76
81
|
}).catch((error) => {
|
|
@@ -84,7 +89,8 @@ const saveExpertFilter = (id, query, equipmentType, name, description, isFilterC
|
|
|
84
89
|
equipmentType,
|
|
85
90
|
rules: exportExpertRules(query)
|
|
86
91
|
},
|
|
87
|
-
name
|
|
92
|
+
name,
|
|
93
|
+
token
|
|
88
94
|
).then(() => {
|
|
89
95
|
onClose();
|
|
90
96
|
}).catch((error) => {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
|
|
3
|
+
type FormField = {
|
|
4
|
+
renderer: FunctionComponent<any>;
|
|
5
|
+
props: {
|
|
6
|
+
label: string;
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export type FormEquipment = {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
fields: FormField[];
|
|
14
|
+
};
|
|
15
|
+
export declare const CONTINGENCY_LIST_EQUIPMENTS: Record<string, FormEquipment>;
|
|
16
|
+
export declare const FILTER_EQUIPMENTS: Record<string, FormEquipment>;
|
|
17
|
+
export {};
|
|
@@ -1,45 +1,7 @@
|
|
|
1
|
-
import { FieldConstants } from "
|
|
2
|
-
import "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import SelectInput from "../../react-hook-form/select-inputs/select-input.js";
|
|
6
|
-
import * as yup from "yup";
|
|
7
|
-
const getCriteriaBasedSchema = (extraFields) => ({
|
|
8
|
-
[FieldConstants.CRITERIA_BASED]: yup.object().shape({
|
|
9
|
-
[FieldConstants.COUNTRIES]: yup.array().of(yup.string()),
|
|
10
|
-
[FieldConstants.COUNTRIES_1]: yup.array().of(yup.string()),
|
|
11
|
-
[FieldConstants.COUNTRIES_2]: yup.array().of(yup.string()),
|
|
12
|
-
...getRangeInputSchema(FieldConstants.NOMINAL_VOLTAGE),
|
|
13
|
-
...getRangeInputSchema(FieldConstants.NOMINAL_VOLTAGE_1),
|
|
14
|
-
...getRangeInputSchema(FieldConstants.NOMINAL_VOLTAGE_2),
|
|
15
|
-
...getRangeInputSchema(FieldConstants.NOMINAL_VOLTAGE_3),
|
|
16
|
-
...extraFields
|
|
17
|
-
})
|
|
18
|
-
});
|
|
19
|
-
const getCriteriaBasedFormData = (criteriaValues, extraFields) => ({
|
|
20
|
-
[FieldConstants.CRITERIA_BASED]: {
|
|
21
|
-
[FieldConstants.COUNTRIES]: (criteriaValues == null ? void 0 : criteriaValues[FieldConstants.COUNTRIES]) ?? [],
|
|
22
|
-
[FieldConstants.COUNTRIES_1]: (criteriaValues == null ? void 0 : criteriaValues[FieldConstants.COUNTRIES_1]) ?? [],
|
|
23
|
-
[FieldConstants.COUNTRIES_2]: (criteriaValues == null ? void 0 : criteriaValues[FieldConstants.COUNTRIES_2]) ?? [],
|
|
24
|
-
...getRangeInputDataForm(
|
|
25
|
-
FieldConstants.NOMINAL_VOLTAGE,
|
|
26
|
-
(criteriaValues == null ? void 0 : criteriaValues[FieldConstants.NOMINAL_VOLTAGE]) ?? DEFAULT_RANGE_VALUE
|
|
27
|
-
),
|
|
28
|
-
...getRangeInputDataForm(
|
|
29
|
-
FieldConstants.NOMINAL_VOLTAGE_1,
|
|
30
|
-
(criteriaValues == null ? void 0 : criteriaValues[FieldConstants.NOMINAL_VOLTAGE_1]) ?? DEFAULT_RANGE_VALUE
|
|
31
|
-
),
|
|
32
|
-
...getRangeInputDataForm(
|
|
33
|
-
FieldConstants.NOMINAL_VOLTAGE_2,
|
|
34
|
-
(criteriaValues == null ? void 0 : criteriaValues[FieldConstants.NOMINAL_VOLTAGE_2]) ?? DEFAULT_RANGE_VALUE
|
|
35
|
-
),
|
|
36
|
-
...getRangeInputDataForm(
|
|
37
|
-
FieldConstants.NOMINAL_VOLTAGE_3,
|
|
38
|
-
(criteriaValues == null ? void 0 : criteriaValues[FieldConstants.NOMINAL_VOLTAGE_3]) ?? DEFAULT_RANGE_VALUE
|
|
39
|
-
),
|
|
40
|
-
...extraFields
|
|
41
|
-
}
|
|
42
|
-
});
|
|
1
|
+
import { FieldConstants } from "../../../utils/field-constants.js";
|
|
2
|
+
import RangeInput from "../../inputs/react-hook-form/range-input.js";
|
|
3
|
+
import CountriesInput from "../../inputs/react-hook-form/select-inputs/countries-input.js";
|
|
4
|
+
import SelectInput from "../../inputs/react-hook-form/select-inputs/select-input.js";
|
|
43
5
|
const countries = {
|
|
44
6
|
renderer: CountriesInput,
|
|
45
7
|
props: {
|
|
@@ -191,7 +153,5 @@ const FILTER_EQUIPMENTS = {
|
|
|
191
153
|
};
|
|
192
154
|
export {
|
|
193
155
|
CONTINGENCY_LIST_EQUIPMENTS,
|
|
194
|
-
FILTER_EQUIPMENTS
|
|
195
|
-
getCriteriaBasedFormData,
|
|
196
|
-
getCriteriaBasedSchema
|
|
156
|
+
FILTER_EQUIPMENTS
|
|
197
157
|
};
|
|
@@ -4,7 +4,7 @@ import "@mui/material/IconButton";
|
|
|
4
4
|
import "@mui/icons-material";
|
|
5
5
|
import "@mui/icons-material/ControlPoint";
|
|
6
6
|
import "@mui/icons-material/Delete";
|
|
7
|
-
import { B } from "
|
|
7
|
+
import { B } from "../../../../chunks/criteria-based-filter-edition-dialog.CbhgOSRk.js";
|
|
8
8
|
import "react";
|
|
9
9
|
import "react-intl";
|
|
10
10
|
import "@mui/material/styles";
|
|
@@ -12,51 +12,50 @@ import "react-csv-downloader";
|
|
|
12
12
|
import "@mui/material/Alert";
|
|
13
13
|
import "@mui/material";
|
|
14
14
|
import "react-hook-form";
|
|
15
|
-
import "
|
|
16
|
-
import "
|
|
17
|
-
import "
|
|
18
|
-
import "
|
|
19
|
-
import "
|
|
15
|
+
import "../../../../TreeViewFinder/TreeViewFinder.js";
|
|
16
|
+
import "../../../../TopBar/TopBar.js";
|
|
17
|
+
import "../../../../TopBar/GridLogo.js";
|
|
18
|
+
import "../../../../TopBar/AboutDialog.js";
|
|
19
|
+
import "../../../../SnackbarProvider/SnackbarProvider.js";
|
|
20
20
|
import "react-router-dom";
|
|
21
|
-
import "
|
|
21
|
+
import "../../../../../utils/AuthService.js";
|
|
22
22
|
import "@mui/icons-material";
|
|
23
|
-
import "
|
|
24
|
-
import "
|
|
23
|
+
import "../../../../MuiVirtualizedTable/MuiVirtualizedTable.js";
|
|
24
|
+
import "../../../../ReportViewer/report-item.js";
|
|
25
25
|
import "uuid";
|
|
26
|
-
import "
|
|
27
|
-
import "
|
|
26
|
+
import "../../../../ReportViewer/log-table.js";
|
|
27
|
+
import "../../../../ReportViewer/report-tree-view-context.js";
|
|
28
28
|
import "@mui/x-tree-view";
|
|
29
|
-
import "
|
|
30
|
-
import "
|
|
31
|
-
import "../../../ElementSearchDialog/tag-renderer.js";
|
|
29
|
+
import "../../../../OverflowableText/overflowable-text.js";
|
|
30
|
+
import "../../../../ElementSearchDialog/tag-renderer.js";
|
|
32
31
|
import "../../utils/submit-button.js";
|
|
33
32
|
import "../../utils/cancel-button.js";
|
|
34
33
|
import "../../provider/custom-form-provider.js";
|
|
35
|
-
import "
|
|
36
|
-
import "
|
|
34
|
+
import "../../../../dialogs/description-modification-dialog.js";
|
|
35
|
+
import "../../../../filter/filter-context.js";
|
|
36
|
+
import "../../../../../utils/field-constants.js";
|
|
37
|
+
import "notistack";
|
|
37
38
|
import "yup";
|
|
38
|
-
import "
|
|
39
|
-
import "
|
|
40
|
-
import { c } from "../../../../chunks/criteria-based-filter-edition-dialog.DxqH-mLe.js";
|
|
39
|
+
import "../../../../dialogs/popup-confirmation-dialog.js";
|
|
40
|
+
import { c } from "../../../../../chunks/criteria-based-filter-edition-dialog.CbhgOSRk.js";
|
|
41
41
|
import "ag-grid-react";
|
|
42
42
|
import "ag-grid-community/styles/ag-grid.css";
|
|
43
43
|
import "ag-grid-community/styles/ag-theme-alpine.css";
|
|
44
44
|
import "autosuggest-highlight/match";
|
|
45
45
|
import "autosuggest-highlight/parse";
|
|
46
46
|
import "clsx";
|
|
47
|
-
import "
|
|
48
|
-
import "notistack";
|
|
47
|
+
import "../../../../CardErrorBoundary/card-error-boundary.js";
|
|
49
48
|
import "../../slider-input.js";
|
|
50
49
|
import "../../numbers/integer-input.js";
|
|
51
50
|
import "../../booleans/checkbox-input.js";
|
|
52
51
|
import "../../booleans/switch-input.js";
|
|
53
52
|
import "@mui/icons-material/Folder";
|
|
54
|
-
import "
|
|
55
|
-
import "../../../../chunks/filter-properties.GRon8-ML.js";
|
|
53
|
+
import "../../../../../chunks/filter-properties.B7-q_yPf.js";
|
|
56
54
|
import "@mui/icons-material/Delete";
|
|
57
55
|
import "@mui/material/IconButton";
|
|
58
|
-
import "
|
|
56
|
+
import "../../../../../utils/yup-config.js";
|
|
59
57
|
import "../../range-input.js";
|
|
58
|
+
import "../../../../filter/expert/expert-filter-utils.js";
|
|
60
59
|
import "../../select-inputs/mui-select-input.js";
|
|
61
60
|
import "localized-countries";
|
|
62
61
|
import "localized-countries/data/fr";
|
|
@@ -64,6 +63,7 @@ import "localized-countries/data/en";
|
|
|
64
63
|
import "@mui/icons-material/Check";
|
|
65
64
|
import "@mui/material/CircularProgress";
|
|
66
65
|
import "@mui/material/TextField";
|
|
66
|
+
import "../../../../filter/utils/filter-form-utils.js";
|
|
67
67
|
export {
|
|
68
68
|
c as default
|
|
69
69
|
};
|
|
@@ -5,9 +5,9 @@ import "ag-grid-react";
|
|
|
5
5
|
import "ag-grid-community/styles/ag-grid.css";
|
|
6
6
|
import "ag-grid-community/styles/ag-theme-alpine.css";
|
|
7
7
|
import "@mui/material";
|
|
8
|
-
import { C, R, C as C2 } from "
|
|
8
|
+
import { C, R, C as C2 } from "../../../../chunks/criteria-based-filter-edition-dialog.CbhgOSRk.js";
|
|
9
9
|
import "react-intl";
|
|
10
|
-
import "
|
|
10
|
+
import "../../../../utils/field-constants.js";
|
|
11
11
|
export {
|
|
12
12
|
C as CustomAgGridTable,
|
|
13
13
|
R as ROW_DRAGGING_SELECTION_COLUMN_DEF,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Option } from '
|
|
1
|
+
import { Option } from '../../../../utils/types.ts';
|
|
2
2
|
import { FunctionComponent } from 'react';
|
|
3
3
|
import { AutocompleteProps, TextFieldProps } from '@mui/material';
|
|
4
4
|
|
|
@@ -6,8 +6,8 @@ export interface AutocompleteInputProps extends Omit<AutocompleteProps<Option, b
|
|
|
6
6
|
name: string;
|
|
7
7
|
options: Option[];
|
|
8
8
|
label?: string;
|
|
9
|
-
outputTransform?: (value: Option) => Option;
|
|
10
|
-
inputTransform?: (value: Option |
|
|
9
|
+
outputTransform?: (value: Option | null) => Option | null;
|
|
10
|
+
inputTransform?: (value: Option | null) => Option | null;
|
|
11
11
|
readOnly?: boolean;
|
|
12
12
|
previousValue?: string;
|
|
13
13
|
allowNewValue?: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Autocomplete, TextField } from "@mui/material";
|
|
3
3
|
import { useController } from "react-hook-form";
|
|
4
|
-
import { isFieldRequired, genHelperPreviousValue, genHelperError, identity } from "
|
|
5
|
-
import FieldLabel from "
|
|
6
|
-
import { useCustomFormContext } from "
|
|
4
|
+
import { isFieldRequired, genHelperPreviousValue, genHelperError, identity } from "../utils/functions.js";
|
|
5
|
+
import FieldLabel from "../utils/field-label.js";
|
|
6
|
+
import { useCustomFormContext } from "../provider/use-custom-form-context.js";
|
|
7
7
|
const AutocompleteInput = ({
|
|
8
8
|
name,
|
|
9
9
|
label,
|
|
@@ -43,7 +43,7 @@ const AutocompleteInput = ({
|
|
|
43
43
|
return /* @__PURE__ */ jsx(
|
|
44
44
|
Autocomplete,
|
|
45
45
|
{
|
|
46
|
-
value: inputTransform(value
|
|
46
|
+
value: inputTransform(value),
|
|
47
47
|
onChange: (_, data) => handleChange(data),
|
|
48
48
|
...allowNewValue && {
|
|
49
49
|
freeSolo: true,
|