@gridsuite/commons-ui 0.54.0 → 0.56.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/assets/criteria-based-filter-edition-dialog.css +168 -0
- package/dist/chunks/criteria-based-filter-edition-dialog.DxqH-mLe.js +1673 -0
- package/dist/chunks/filter-properties.GRon8-ML.js +195 -0
- package/dist/components/DirectoryItemSelector/directory-item-selector.d.ts +7 -6
- package/dist/components/DirectoryItemSelector/directory-item-selector.js +34 -43
- package/dist/components/FlatParameters/FlatParameters.js +3 -0
- package/dist/components/ReportViewer/log-report.d.ts +2 -2
- package/dist/components/TreeViewFinder/TreeViewFinder.d.ts +32 -58
- package/dist/components/TreeViewFinder/TreeViewFinder.js +126 -82
- package/dist/components/dialogs/custom-mui-dialog.d.ts +21 -0
- package/dist/components/dialogs/custom-mui-dialog.js +87 -0
- package/dist/components/dialogs/description-modification-dialog.d.ts +11 -0
- package/dist/components/dialogs/description-modification-dialog.js +71 -0
- package/dist/components/dialogs/popup-confirmation-dialog.d.ts +11 -0
- package/dist/components/dialogs/popup-confirmation-dialog.js +38 -0
- package/dist/components/filter/constants/equipment-types.d.ts +72 -0
- package/dist/components/filter/constants/equipment-types.js +63 -0
- package/dist/components/filter/constants/expert-filter-constants.d.ts +546 -0
- package/dist/components/filter/constants/expert-filter-constants.js +663 -0
- package/dist/components/filter/constants/field-constants.d.ts +45 -0
- package/dist/components/filter/constants/field-constants.js +43 -0
- package/dist/components/filter/constants/filter-constants.d.ts +21 -0
- package/dist/components/filter/constants/filter-constants.js +10 -0
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.d.ts +29 -0
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.js +19 -0
- package/dist/components/filter/criteria-based/criteria-based-filter-form.d.ts +15 -0
- package/dist/components/filter/criteria-based/criteria-based-filter-form.js +33 -0
- package/dist/components/filter/criteria-based/criteria-based-filter-utils.d.ts +37 -0
- package/dist/components/filter/criteria-based/criteria-based-filter-utils.js +127 -0
- package/dist/components/filter/criteria-based/criteria-based-form.d.ts +7 -0
- package/dist/components/filter/criteria-based/criteria-based-form.js +50 -0
- package/dist/components/filter/criteria-based/filter-free-properties.d.ts +10 -0
- package/dist/components/filter/criteria-based/filter-free-properties.js +15 -0
- package/dist/components/filter/criteria-based/filter-properties.d.ts +21 -0
- package/dist/components/filter/criteria-based/filter-properties.js +19 -0
- package/dist/components/filter/criteria-based/filter-property.d.ts +19 -0
- package/dist/components/filter/criteria-based/filter-property.js +67 -0
- package/dist/components/filter/expert/expert-filter-edition-dialog.d.ts +28 -0
- package/dist/components/filter/expert/expert-filter-edition-dialog.js +20 -0
- package/dist/components/filter/expert/expert-filter-form.d.ts +21 -0
- package/dist/components/filter/expert/expert-filter-form.js +22 -0
- package/dist/components/filter/expert/expert-filter-utils.d.ts +19 -0
- package/dist/components/filter/expert/expert-filter-utils.js +302 -0
- package/dist/components/filter/expert/expert-filter.type.d.ts +113 -0
- package/dist/components/filter/expert/expert-filter.type.js +103 -0
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.d.ts +22 -0
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +19 -0
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.d.ts +22 -0
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +23 -0
- package/dist/components/filter/filter-context.d.ts +12 -0
- package/dist/components/filter/filter-context.js +10 -0
- package/dist/components/filter/filter-creation-dialog.d.ts +21 -0
- package/dist/components/filter/filter-creation-dialog.js +17 -0
- package/dist/components/filter/filter-form.d.ts +11 -0
- package/dist/components/filter/filter-form.js +14 -0
- package/dist/components/filter/utils/criteria-based-utils.d.ts +28 -0
- package/dist/components/filter/utils/criteria-based-utils.js +197 -0
- package/dist/components/filter/utils/filters-utils.d.ts +5 -0
- package/dist/components/filter/utils/filters-utils.js +99 -0
- package/dist/components/inputs/select-clearable.d.ts +14 -0
- package/dist/components/inputs/select-clearable.js +40 -0
- package/dist/components/react-hook-form/ExpandingTextField.d.ts +1 -1
- package/dist/components/react-hook-form/ExpandingTextField.js +0 -37
- package/dist/components/react-hook-form/ag-grid-table-rhf/bottom-right-buttons.d.ts +17 -0
- package/dist/components/react-hook-form/ag-grid-table-rhf/bottom-right-buttons.js +15 -0
- package/dist/components/react-hook-form/ag-grid-table-rhf/cell-editors/numericEditor.d.ts +23 -0
- package/dist/components/react-hook-form/ag-grid-table-rhf/cell-editors/numericEditor.js +70 -0
- package/dist/components/react-hook-form/ag-grid-table-rhf/csv-uploader/csv-uploader.d.ts +16 -0
- package/dist/components/react-hook-form/ag-grid-table-rhf/csv-uploader/csv-uploader.js +69 -0
- package/dist/components/react-hook-form/ag-grid-table-rhf/custom-ag-grid-table.d.ts +23 -0
- package/dist/components/react-hook-form/ag-grid-table-rhf/custom-ag-grid-table.js +15 -0
- package/dist/components/react-hook-form/autocomplete-input.d.ts +17 -29
- package/dist/components/react-hook-form/autocomplete-input.js +4 -15
- package/dist/components/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.d.ts +2 -0
- package/dist/components/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.js +46 -0
- package/dist/components/react-hook-form/directory-items-input.d.ts +2 -4
- package/dist/components/react-hook-form/directory-items-input.js +61 -12
- package/dist/components/react-hook-form/error-management/error-input.d.ts +13 -4
- package/dist/components/react-hook-form/error-management/error-input.js +7 -7
- package/dist/components/react-hook-form/error-management/field-error-alert.d.ts +6 -3
- package/dist/components/react-hook-form/error-management/field-error-alert.js +3 -1
- package/dist/components/react-hook-form/numbers/float-input.d.ts +5 -17
- package/dist/components/react-hook-form/numbers/float-input.js +3 -5
- package/dist/components/react-hook-form/numbers/integer-input.d.ts +15 -12
- package/dist/components/react-hook-form/numbers/utils.d.ts +8 -2
- package/dist/components/react-hook-form/provider/custom-form-provider.d.ts +1 -0
- package/dist/components/react-hook-form/provider/custom-form-provider.js +12 -3
- package/dist/components/react-hook-form/radio-input.d.ts +14 -17
- package/dist/components/react-hook-form/radio-input.js +7 -9
- package/dist/components/react-hook-form/range-input.d.ts +54 -0
- package/dist/components/react-hook-form/range-input.js +118 -0
- package/dist/components/react-hook-form/select-inputs/countries-input.d.ts +8 -0
- package/dist/components/react-hook-form/select-inputs/countries-input.js +36 -0
- package/dist/components/react-hook-form/select-inputs/input-with-popup-confirmation.d.ts +2 -0
- package/dist/components/react-hook-form/select-inputs/input-with-popup-confirmation.js +61 -0
- package/dist/components/react-hook-form/select-inputs/mui-select-input.d.ts +12 -0
- package/dist/components/react-hook-form/select-inputs/mui-select-input.js +25 -0
- package/dist/components/react-hook-form/select-inputs/select-input.d.ts +9 -0
- package/dist/components/react-hook-form/select-inputs/select-input.js +37 -0
- package/dist/components/react-hook-form/text-input.d.ts +23 -32
- package/dist/components/react-hook-form/text-input.js +6 -20
- package/dist/components/react-hook-form/unique-name-input.d.ts +21 -0
- package/dist/components/react-hook-form/unique-name-input.js +129 -0
- package/dist/components/react-hook-form/utils/cancel-button.d.ts +9 -8
- package/dist/components/react-hook-form/utils/field-label.d.ts +12 -5
- package/dist/components/react-hook-form/utils/field-label.js +5 -1
- package/dist/components/react-hook-form/utils/functions.d.ts +12 -4
- package/dist/components/react-hook-form/utils/functions.js +21 -1
- package/dist/components/react-hook-form/utils/submit-button.d.ts +9 -8
- package/dist/components/react-hook-form/utils/text-field-with-adornment.d.ts +11 -11
- package/dist/components/react-hook-form/utils/text-field-with-adornment.js +18 -23
- package/dist/components/react-query-builder-inputs/add-button.d.ts +8 -0
- package/dist/components/react-query-builder-inputs/add-button.js +17 -0
- package/dist/components/react-query-builder-inputs/combinator-selector.d.ts +5 -0
- package/dist/components/react-query-builder-inputs/combinator-selector.js +38 -0
- package/dist/components/react-query-builder-inputs/country-value-editor.d.ts +5 -0
- package/dist/components/react-query-builder-inputs/country-value-editor.js +46 -0
- package/dist/components/react-query-builder-inputs/custom-react-query-builder.d.ts +8 -0
- package/dist/components/react-query-builder-inputs/custom-react-query-builder.js +21 -0
- package/dist/components/react-query-builder-inputs/element-value-editor.d.ts +14 -0
- package/dist/components/react-query-builder-inputs/element-value-editor.js +69 -0
- package/dist/components/react-query-builder-inputs/property-value-editor.d.ts +9 -0
- package/dist/components/react-query-builder-inputs/property-value-editor.js +100 -0
- package/dist/components/react-query-builder-inputs/remove-button.d.ts +5 -0
- package/dist/components/react-query-builder-inputs/remove-button.js +9 -0
- package/dist/components/react-query-builder-inputs/text-value-editor.d.ts +5 -0
- package/dist/components/react-query-builder-inputs/text-value-editor.js +34 -0
- package/dist/components/react-query-builder-inputs/translated-value-editor.d.ts +5 -0
- package/dist/components/react-query-builder-inputs/translated-value-editor.js +58 -0
- package/dist/components/react-query-builder-inputs/use-convert-value.d.ts +9 -0
- package/dist/components/react-query-builder-inputs/use-convert-value.js +24 -0
- package/dist/components/react-query-builder-inputs/use-valid.d.ts +7 -0
- package/dist/components/react-query-builder-inputs/use-valid.js +13 -0
- package/dist/components/react-query-builder-inputs/value-editor.d.ts +5 -0
- package/dist/components/react-query-builder-inputs/value-editor.js +18 -0
- package/dist/components/react-query-builder-inputs/value-selector.d.ts +4 -0
- package/dist/components/react-query-builder-inputs/value-selector.js +14 -0
- package/dist/components/translations/treeview-finder-en.d.ts +1 -0
- package/dist/components/translations/treeview-finder-en.js +4 -3
- package/dist/components/translations/treeview-finder-fr.d.ts +1 -0
- package/dist/components/translations/treeview-finder-fr.js +4 -3
- package/dist/hooks/localized-countries-hook.d.ts +6 -0
- package/dist/hooks/localized-countries-hook.js +45 -0
- package/dist/hooks/predefined-properties-hook.d.ts +18 -0
- package/dist/hooks/predefined-properties-hook.js +43 -0
- package/dist/hooks/useDebounce.d.ts +7 -1
- package/dist/hooks/useSnackMessage.d.ts +23 -5
- package/dist/hooks/useSnackMessage.js +14 -12
- package/dist/index.d.ts +92 -143
- package/dist/index.js +168 -91
- package/dist/utils/FetchStatus.d.ts +12 -0
- package/dist/utils/FetchStatus.js +9 -0
- package/dist/utils/conversion-utils.d.ts +12 -0
- package/dist/utils/conversion-utils.js +22 -0
- package/dist/utils/equipment-types-for-predefined-properties-mapper.d.ts +3 -0
- package/dist/utils/equipment-types-for-predefined-properties-mapper.js +31 -0
- package/dist/utils/functions.d.ts +14 -0
- package/dist/utils/functions.js +16 -0
- package/dist/utils/types.d.ts +21 -0
- package/dist/utils/types.js +1 -0
- package/dist/utils/yup-config.d.ts +8 -0
- package/dist/utils/yup-config.js +16 -0
- package/package.json +27 -4
- package/dist/components/react-hook-form/select-input.d.ts +0 -17
- package/dist/components/react-hook-form/select-input.js +0 -30
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare const GRIDSUITE_DEFAULT_PRECISION: number;
|
|
8
|
+
export declare const roundToPrecision: (num: number, precision: number) => number;
|
|
9
|
+
export declare const roundToDefaultPrecision: (num: number) => number;
|
|
10
|
+
export declare function isBlankOrEmpty(value: unknown): boolean;
|
|
11
|
+
export declare const unitToMicroUnit: (num: number) => number | undefined;
|
|
12
|
+
export declare const microUnitToUnit: (num: number) => number | undefined;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const GRIDSUITE_DEFAULT_PRECISION = 13;
|
|
2
|
+
const roundToPrecision = (num, precision) => Number(num.toPrecision(precision));
|
|
3
|
+
const roundToDefaultPrecision = (num) => roundToPrecision(num, GRIDSUITE_DEFAULT_PRECISION);
|
|
4
|
+
function isBlankOrEmpty(value) {
|
|
5
|
+
if (value === void 0 || value === null) {
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
if (typeof value === "string") {
|
|
9
|
+
return /^\s*$/.test(value);
|
|
10
|
+
}
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
const unitToMicroUnit = (num) => isBlankOrEmpty(num) ? void 0 : roundToDefaultPrecision(num * 1e6);
|
|
14
|
+
const microUnitToUnit = (num) => isBlankOrEmpty(num) ? void 0 : roundToDefaultPrecision(num / 1e6);
|
|
15
|
+
export {
|
|
16
|
+
GRIDSUITE_DEFAULT_PRECISION,
|
|
17
|
+
isBlankOrEmpty,
|
|
18
|
+
microUnitToUnit,
|
|
19
|
+
roundToDefaultPrecision,
|
|
20
|
+
roundToPrecision,
|
|
21
|
+
unitToMicroUnit
|
|
22
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const mapEquipmentTypeForPredefinedProperties = (type) => {
|
|
2
|
+
switch (type) {
|
|
3
|
+
case "SUBSTATION":
|
|
4
|
+
return "substation";
|
|
5
|
+
case "LOAD":
|
|
6
|
+
return "load";
|
|
7
|
+
case "GENERATOR":
|
|
8
|
+
return "generator";
|
|
9
|
+
case "LINE":
|
|
10
|
+
return "line";
|
|
11
|
+
case "TWO_WINDINGS_TRANSFORMER":
|
|
12
|
+
return "twt";
|
|
13
|
+
case "BATTERY":
|
|
14
|
+
return "battery";
|
|
15
|
+
case "SHUNT_COMPENSATOR":
|
|
16
|
+
return "shuntCompensator";
|
|
17
|
+
case "VOLTAGE_LEVEL":
|
|
18
|
+
return "voltageLevel";
|
|
19
|
+
case "BUSBAR_SECTION":
|
|
20
|
+
case "DANGLING_LINE":
|
|
21
|
+
case "HVDC_LINE":
|
|
22
|
+
case "LCC_CONVERTER_STATION":
|
|
23
|
+
case "THREE_WINDINGS_TRANSFORMER":
|
|
24
|
+
case "STATIC_VAR_COMPENSATOR":
|
|
25
|
+
case "VSC_CONVERTER_STATION":
|
|
26
|
+
return void 0;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
mapEquipmentTypeForPredefinedProperties
|
|
31
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* function to generate a key
|
|
9
|
+
* @returns {number} key
|
|
10
|
+
*/
|
|
11
|
+
export declare function keyGenerator(): () => number;
|
|
12
|
+
export declare const areArrayElementsUnique: (array: unknown[]) => boolean;
|
|
13
|
+
export declare const mergeSx: (...allSx: unknown[]) => unknown[];
|
|
14
|
+
export declare const isObjectEmpty: (object: object) => boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function keyGenerator() {
|
|
2
|
+
let key = 1;
|
|
3
|
+
return () => key++;
|
|
4
|
+
}
|
|
5
|
+
const areArrayElementsUnique = (array) => {
|
|
6
|
+
let uniqueValues = [...new Set(array)];
|
|
7
|
+
return uniqueValues.length === array.length;
|
|
8
|
+
};
|
|
9
|
+
const mergeSx = (...allSx) => allSx.flat();
|
|
10
|
+
const isObjectEmpty = (object) => object && Object.keys(object).length === 0;
|
|
11
|
+
export {
|
|
12
|
+
areArrayElementsUnique,
|
|
13
|
+
isObjectEmpty,
|
|
14
|
+
keyGenerator,
|
|
15
|
+
mergeSx
|
|
16
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, ShuntCompensator, Substation, SVC, ThreeWindingTransfo, TwoWindingTransfo, VoltageLevel, VSC } from '../components/filter/constants/equipment-types.ts';
|
|
2
|
+
import { ElementType } from './ElementType.ts';
|
|
3
|
+
import { UUID } from 'crypto';
|
|
4
|
+
|
|
5
|
+
export type Input = string | number;
|
|
6
|
+
export type ElementAttributes = {
|
|
7
|
+
elementUuid: UUID;
|
|
8
|
+
elementName: string;
|
|
9
|
+
type: keyof typeof ElementType;
|
|
10
|
+
};
|
|
11
|
+
export type Equipment = typeof Substation | typeof Line | typeof Generator | typeof Load | typeof Battery | typeof SVC | typeof DanglingLine | typeof LCC | typeof VSC | typeof Hvdc | typeof BusBar | typeof TwoWindingTransfo | typeof ThreeWindingTransfo | typeof ShuntCompensator | typeof VoltageLevel | typeof Substation;
|
|
12
|
+
export type EquipmentType = {
|
|
13
|
+
[Type in Equipment['type']]: Type;
|
|
14
|
+
}[Equipment['type']];
|
|
15
|
+
export type Option = {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
} | string;
|
|
19
|
+
export type PredefinedProperties = {
|
|
20
|
+
[propertyName: string]: string[];
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2023, 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
|
+
import * as yup from 'yup';
|
|
8
|
+
export default yup;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as yup from "yup";
|
|
2
|
+
yup.setLocale({
|
|
3
|
+
mixed: {
|
|
4
|
+
required: "YupRequired",
|
|
5
|
+
notType: ({ type }) => {
|
|
6
|
+
if (type === "number") {
|
|
7
|
+
return "YupNotTypeNumber";
|
|
8
|
+
} else {
|
|
9
|
+
return "YupNotTypeDefault";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
yup as default
|
|
16
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridsuite/commons-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.0",
|
|
4
4
|
"description": "common react components for gridsuite applications",
|
|
5
5
|
"engines": {
|
|
6
6
|
"npm": ">=9",
|
|
@@ -28,16 +28,22 @@
|
|
|
28
28
|
"licenses-check": "license-checker --summary --excludePrivatePackages --production --onlyAllow \"$( jq -r .onlyAllow[] license-checker-config.json | tr '\n' ';')\" --excludePackages \"$( jq -r .excludePackages[] license-checker-config.json | tr '\n' ';')\""
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
+
"@react-querybuilder/material": "^6.5.5",
|
|
32
|
+
"@react-querybuilder/dnd": "^6.5.5",
|
|
31
33
|
"autosuggest-highlight": "^3.3.4",
|
|
32
34
|
"clsx": "^2.1.0",
|
|
33
35
|
"jwt-decode": "^4.0.0",
|
|
36
|
+
"localized-countries": "^2.0.0",
|
|
34
37
|
"memoize-one": "^6.0.0",
|
|
35
38
|
"oidc-client": "^1.11.5",
|
|
36
39
|
"prop-types": "^15.8.1",
|
|
37
40
|
"react-csv-downloader": "^3.1.0",
|
|
38
41
|
"react-request-fullscreen": "^1.1.2",
|
|
39
42
|
"react-virtualized": "^9.22.5",
|
|
40
|
-
"uuid": "^9.0.1"
|
|
43
|
+
"uuid": "^9.0.1",
|
|
44
|
+
"react-dnd": "^16.0.1",
|
|
45
|
+
"react-dnd-html5-backend": "^16.0.1",
|
|
46
|
+
"react-querybuilder": "^6.5.1"
|
|
41
47
|
},
|
|
42
48
|
"peerDependencies": {
|
|
43
49
|
"@emotion/react": "^11.11.4",
|
|
@@ -46,11 +52,14 @@
|
|
|
46
52
|
"@mui/icons-material": "^5.15.14",
|
|
47
53
|
"@mui/lab": "5.0.0-alpha.169",
|
|
48
54
|
"@mui/material": "^5.15.14",
|
|
55
|
+
"ag-grid-community": "^31.0.0",
|
|
56
|
+
"ag-grid-react": "^31.2.0",
|
|
49
57
|
"notistack": "^3.0.1",
|
|
50
58
|
"react": "^18.2.0",
|
|
51
59
|
"react-dom": "^18.2.0",
|
|
52
60
|
"react-hook-form": "^7.51.2",
|
|
53
61
|
"react-intl": "^6.6.4",
|
|
62
|
+
"react-papaparse": "^4.1.0",
|
|
54
63
|
"react-router-dom": "^6.22.3",
|
|
55
64
|
"yup": "^1.4.0"
|
|
56
65
|
},
|
|
@@ -68,11 +77,23 @@
|
|
|
68
77
|
"@mui/material": "^5.15.14",
|
|
69
78
|
"@mui/x-tree-view": "^6.17.0",
|
|
70
79
|
"@react-hook/window-size": "^3.1.1",
|
|
71
|
-
"@types/
|
|
72
|
-
"@types/
|
|
80
|
+
"@types/autosuggest-highlight": "^3.2.3",
|
|
81
|
+
"@types/eslint": "^8.56.7",
|
|
82
|
+
"@types/eslint-config-prettier": "^6.11.3",
|
|
83
|
+
"@types/license-checker": "^25.0.6",
|
|
84
|
+
"@types/node": "^18.19.31",
|
|
85
|
+
"@types/prop-types": "^15.7.12",
|
|
86
|
+
"@types/react": "^18.2.75",
|
|
87
|
+
"@types/react-dom": "^18.2.24",
|
|
88
|
+
"@types/react-resizable": "^3.0.7",
|
|
89
|
+
"@types/react-virtualized": "^9.21.29",
|
|
90
|
+
"@types/utf-8-validate": "^5.0.2",
|
|
91
|
+
"@types/uuid": "^9.0.8",
|
|
73
92
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
74
93
|
"@typescript-eslint/parser": "^6.21.0",
|
|
75
94
|
"@vitejs/plugin-react": "^4.2.1",
|
|
95
|
+
"ag-grid-community": "^31.0.0",
|
|
96
|
+
"ag-grid-react": "^31.2.0",
|
|
76
97
|
"babel-eslint": "^10.1.0",
|
|
77
98
|
"bufferutil": "^4.0.8",
|
|
78
99
|
"eslint": "^8.57.0",
|
|
@@ -85,6 +106,7 @@
|
|
|
85
106
|
"eslint-plugin-react": "^7.34.1",
|
|
86
107
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
87
108
|
"glob": "^10.3.12",
|
|
109
|
+
"identity-obj-proxy": "^3.0.0",
|
|
88
110
|
"jest": "^29.7.0",
|
|
89
111
|
"jest-environment-jsdom": "^29.7.0",
|
|
90
112
|
"jest-svg-transformer": "^1.0.0",
|
|
@@ -95,6 +117,7 @@
|
|
|
95
117
|
"react-dom": "^18.2.0",
|
|
96
118
|
"react-hook-form": "^7.51.2",
|
|
97
119
|
"react-intl": "^6.6.4",
|
|
120
|
+
"react-papaparse": "^4.1.0",
|
|
98
121
|
"react-resizable": "^3.0.5",
|
|
99
122
|
"react-router-dom": "^6.22.3",
|
|
100
123
|
"ts-node": "^10.9.2",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { default as PropTypes } from 'prop-types';
|
|
2
|
-
export default SelectInput;
|
|
3
|
-
declare function SelectInput(props: any): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare namespace SelectInput {
|
|
5
|
-
let propTypes: {
|
|
6
|
-
name: PropTypes.Validator<string>;
|
|
7
|
-
label: PropTypes.Requireable<string>;
|
|
8
|
-
options: PropTypes.Validator<any[]>;
|
|
9
|
-
outputTransform: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
|
-
inputTransform: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
-
readOnly: PropTypes.Requireable<boolean>;
|
|
12
|
-
previousValue: PropTypes.Requireable<any>;
|
|
13
|
-
allowNewValue: PropTypes.Requireable<boolean>;
|
|
14
|
-
onChangeCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
-
formProps: PropTypes.Requireable<object>;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
|
-
import AutocompleteInput from "./autocomplete-input.js";
|
|
4
|
-
import { useIntl } from "react-intl";
|
|
5
|
-
const SelectInput = (props) => {
|
|
6
|
-
const intl = useIntl();
|
|
7
|
-
const inputTransform = (value) => props.options.find((option) => (option == null ? void 0 : option.id) === value) || null;
|
|
8
|
-
const outputTransform = (value) => {
|
|
9
|
-
return (value == null ? void 0 : value.id) ?? null;
|
|
10
|
-
};
|
|
11
|
-
return /* @__PURE__ */ jsx(
|
|
12
|
-
AutocompleteInput,
|
|
13
|
-
{
|
|
14
|
-
getOptionLabel: (option) => {
|
|
15
|
-
return (option == null ? void 0 : option.label) ? intl.formatMessage({ id: option == null ? void 0 : option.label }) : option == null ? void 0 : option.id;
|
|
16
|
-
},
|
|
17
|
-
inputTransform,
|
|
18
|
-
outputTransform,
|
|
19
|
-
readOnly: true,
|
|
20
|
-
...props
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
SelectInput.propTypes = {
|
|
25
|
-
options: PropTypes.array.isRequired,
|
|
26
|
-
...AutocompleteInput.propTypes
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
SelectInput as default
|
|
30
|
-
};
|