@gridsuite/commons-ui 0.63.4 → 0.64.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.js +1 -3
- package/dist/assets/expert-filter-form.css +18 -8
- package/dist/components/AuthenticationRouter/AuthenticationRouter.js +88 -97
- package/dist/components/CardErrorBoundary/card-error-boundary.js +6 -20
- package/dist/components/CustomAGGrid/custom-aggrid.js +47 -49
- package/dist/components/DirectoryItemSelector/directory-item-selector.js +10 -40
- package/dist/components/ElementSearchDialog/element-search-dialog.js +1 -17
- package/dist/components/ElementSearchDialog/equipment-item.js +29 -47
- package/dist/components/ElementSearchDialog/tag-renderer.js +2 -8
- package/dist/components/ElementSearchDialog/use-element-search.js +1 -4
- package/dist/components/FlatParameters/FlatParameters.js +13 -77
- package/dist/components/Login/Login.js +9 -34
- package/dist/components/Login/Logout.js +3 -26
- package/dist/components/MuiVirtualizedTable/ColumnHeader.js +35 -64
- package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js +4 -17
- package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.d.ts +1 -1
- package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.js +19 -95
- package/dist/components/MuiVirtualizedTable/index.d.ts +1 -1
- package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.js +2 -6
- package/dist/components/OverflowableText/overflowable-text.js +3 -10
- package/dist/components/ReportViewer/filter-button.d.ts +1 -1
- package/dist/components/ReportViewer/filter-button.js +2 -7
- package/dist/components/ReportViewer/log-report-item.js +7 -17
- package/dist/components/ReportViewer/log-report.js +4 -13
- package/dist/components/ReportViewer/log-table.d.ts +1 -1
- package/dist/components/ReportViewer/log-table.js +3 -16
- package/dist/components/ReportViewer/multi-select-list.d.ts +1 -1
- package/dist/components/ReportViewer/multi-select-list.js +2 -14
- package/dist/components/ReportViewer/report-item.js +4 -10
- package/dist/components/ReportViewer/report-viewer.d.ts +1 -1
- package/dist/components/ReportViewer/report-viewer.js +2 -7
- package/dist/components/ReportViewerDialog/report-viewer-dialog.js +1 -13
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.d.ts +1 -1
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.js +1 -4
- package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.d.ts +1 -1
- package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.js +1 -4
- package/dist/components/SnackbarProvider/SnackbarProvider.js +4 -11
- package/dist/components/TopBar/AboutDialog.js +51 -152
- package/dist/components/TopBar/GridLogo.d.ts +2 -2
- package/dist/components/TopBar/GridLogo.js +8 -41
- package/dist/components/TopBar/TopBar.js +197 -328
- package/dist/components/TreeViewFinder/TreeViewFinder.js +23 -66
- package/dist/components/TreeViewFinder/index.d.ts +2 -2
- package/dist/components/dialogs/custom-mui-dialog.d.ts +2 -1
- package/dist/components/dialogs/custom-mui-dialog.js +64 -39
- package/dist/components/dialogs/modify-element-selection.js +1 -3
- package/dist/components/dialogs/popup-confirmation-dialog.d.ts +1 -1
- package/dist/components/dialogs/popup-confirmation-dialog.js +8 -15
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.js +3 -18
- package/dist/components/filter/criteria-based/criteria-based-filter-utils.js +3 -9
- package/dist/components/filter/criteria-based/criteria-based-form.d.ts +1 -1
- package/dist/components/filter/criteria-based/criteria-based-form.js +7 -15
- package/dist/components/filter/criteria-based/filter-free-properties.d.ts +1 -1
- package/dist/components/filter/criteria-based/filter-free-properties.js +1 -4
- package/dist/components/filter/criteria-based/filter-properties.js +16 -24
- package/dist/components/filter/criteria-based/filter-property.js +1 -4
- package/dist/components/filter/expert/expert-filter-constants.d.ts +10 -3
- package/dist/components/filter/expert/expert-filter-constants.js +16 -12
- package/dist/components/filter/expert/expert-filter-edition-dialog.js +3 -18
- package/dist/components/filter/expert/expert-filter-form.js +1 -7
- package/dist/components/filter/expert/expert-filter-utils.js +10 -30
- package/dist/components/filter/expert/expert-filter.type.d.ts +3 -1
- package/dist/components/filter/expert/expert-filter.type.js +2 -0
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +2 -15
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.d.ts +1 -1
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +10 -35
- package/dist/components/filter/filter-creation-dialog.js +5 -10
- package/dist/components/filter/filter-form.js +3 -17
- package/dist/components/filter/utils/filter-api.js +1 -7
- package/dist/components/inputs/react-hook-form/ExpandingTextField.js +1 -9
- package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.js +14 -52
- package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.js +14 -62
- package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.js +29 -40
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.js +2 -8
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.js +1 -3
- package/dist/components/inputs/react-hook-form/booleans/boolean-input.js +1 -7
- package/dist/components/inputs/react-hook-form/booleans/checkbox-input.js +1 -9
- package/dist/components/inputs/react-hook-form/booleans/switch-input.js +1 -9
- package/dist/components/inputs/react-hook-form/description-field.d.ts +8 -0
- package/dist/components/inputs/react-hook-form/description-field.js +48 -0
- package/dist/components/inputs/react-hook-form/directory-items-input.js +5 -29
- package/dist/components/inputs/react-hook-form/error-management/error-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/provider/custom-form-provider.js +1 -7
- package/dist/components/inputs/react-hook-form/radio-input.js +8 -18
- package/dist/components/inputs/react-hook-form/range-input.js +1 -4
- package/dist/components/inputs/react-hook-form/select-inputs/countries-input.js +1 -9
- package/dist/components/inputs/react-hook-form/select-inputs/mui-select-input.js +2 -13
- package/dist/components/inputs/react-hook-form/select-inputs/select-input.js +2 -6
- package/dist/components/inputs/react-hook-form/slider-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/slider-input.js +2 -19
- package/dist/components/inputs/react-hook-form/unique-name-input.js +1 -9
- package/dist/components/inputs/react-hook-form/utils/field-label.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/utils/field-label.js +1 -5
- package/dist/components/inputs/react-hook-form/utils/submit-button.js +1 -8
- package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.js +18 -47
- package/dist/components/inputs/react-query-builder/add-button.js +1 -10
- package/dist/components/inputs/react-query-builder/autocomplete-with-favorites.d.ts +12 -0
- package/dist/components/inputs/react-query-builder/autocomplete-with-favorites.js +43 -0
- package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.js +14 -27
- package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.js +1 -3
- package/dist/components/inputs/react-query-builder/country-value-editor.js +27 -28
- package/dist/components/inputs/react-query-builder/custom-react-query-builder.js +25 -31
- package/dist/components/inputs/react-query-builder/element-value-editor.js +1 -10
- package/dist/components/inputs/react-query-builder/property-value-editor.js +6 -11
- package/dist/components/inputs/react-query-builder/remove-button.js +1 -9
- package/dist/components/inputs/react-query-builder/text-value-editor.js +2 -1
- package/dist/components/inputs/react-query-builder/translated-value-editor.js +3 -4
- package/dist/components/inputs/react-query-builder/use-convert-value.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/use-convert-value.js +1 -6
- package/dist/components/inputs/react-query-builder/value-editor.js +4 -20
- package/dist/components/translations/filter-expert-en.d.ts +2 -0
- package/dist/components/translations/filter-expert-en.js +3 -1
- package/dist/components/translations/filter-expert-fr.d.ts +2 -0
- package/dist/components/translations/filter-expert-fr.js +3 -1
- package/dist/hooks/localized-countries-hook.js +1 -3
- package/dist/hooks/useConfidentialityWarning.d.ts +8 -0
- package/dist/hooks/useConfidentialityWarning.js +14 -0
- package/dist/hooks/useDebounce.js +1 -4
- package/dist/hooks/useSnackMessage.js +3 -12
- package/dist/index.d.ts +11 -9
- package/dist/index.js +157 -151
- package/dist/services/apps-metadata.d.ts +7 -0
- package/dist/services/apps-metadata.js +13 -0
- package/dist/services/directory.js +3 -11
- package/dist/services/explore.js +2 -8
- package/dist/services/index.js +3 -1
- package/dist/services/utils.js +4 -12
- package/dist/utils/AuthService.js +8 -29
- package/dist/utils/UserManagerMock.js +6 -23
- package/dist/utils/styles.js +1 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21,15 +21,16 @@ import { default as default12 } from "./components/ExpandableGroup/expandable-gr
|
|
|
21
21
|
import { default as default13 } from "./components/MultipleSelectionDialog/MultipleSelectionDialog.js";
|
|
22
22
|
import { default as default14 } from "./components/dialogs/custom-mui-dialog.js";
|
|
23
23
|
import { default as default15 } from "./components/dialogs/description-modification-dialog.js";
|
|
24
|
-
import { default as default16 } from "./components/
|
|
25
|
-
import { default as default17 } from "./components/
|
|
26
|
-
import { default as default18 } from "./components/
|
|
27
|
-
import { default as default19 } from "./components/
|
|
28
|
-
import { default as default20
|
|
24
|
+
import { default as default16 } from "./components/inputs/react-hook-form/description-field.js";
|
|
25
|
+
import { default as default17 } from "./components/dialogs/modify-element-selection.js";
|
|
26
|
+
import { default as default18 } from "./components/filter/criteria-based/criteria-based-form.js";
|
|
27
|
+
import { default as default19 } from "./components/dialogs/popup-confirmation-dialog.js";
|
|
28
|
+
import { default as default20 } from "./components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.js";
|
|
29
|
+
import { default as default21, ROW_DRAGGING_SELECTION_COLUMN_DEF } from "./components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.js";
|
|
29
30
|
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel, noSelectionForCopy } from "./utils/equipment-types.js";
|
|
30
|
-
import { default as
|
|
31
|
+
import { default as default22 } from "./utils/field-constants.js";
|
|
31
32
|
import { fields } from "./components/filter/expert/expert-filter-constants.js";
|
|
32
|
-
import { default as
|
|
33
|
+
import { default as default23 } from "./components/inputs/react-query-builder/custom-react-query-builder.js";
|
|
33
34
|
import { EXPERT_FILTER_QUERY, getExpertFilterEmptyFormData, rqbQuerySchemaValidator } from "./components/filter/expert/expert-filter-form.js";
|
|
34
35
|
import { exportExpertRules, importExpertRules } from "./components/filter/expert/expert-filter-utils.js";
|
|
35
36
|
import { formatQuery } from "react-querybuilder";
|
|
@@ -38,121 +39,123 @@ import { GRIDSUITE_DEFAULT_PRECISION, isBlankOrEmpty, microUnitToUnit, roundToDe
|
|
|
38
39
|
import { ElementType } from "./utils/ElementType.js";
|
|
39
40
|
import { EQUIPMENT_TYPE, EquipmentType, equipmentStyles, getEquipmentsInfosForSearchBar } from "./utils/EquipmentType.js";
|
|
40
41
|
import { dispatchUser, getPreLoginPath, initializeAuthenticationDev, initializeAuthenticationProd, logout } from "./utils/AuthService.js";
|
|
41
|
-
import { default as
|
|
42
|
+
import { default as default24 } from "./utils/ElementIcon.js";
|
|
42
43
|
import { LOGOUT_ERROR, RESET_AUTHENTICATION_ROUTER_ERROR, SHOW_AUTH_INFO_LOGIN, SIGNIN_CALLBACK_ERROR, UNAUTHORIZED_USER_INFO, USER, USER_VALIDATION_ERROR, setLoggedUser, setSignInCallbackError } from "./redux/authActions.js";
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as
|
|
64
|
-
import { default as
|
|
65
|
-
import { default as
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
69
|
-
import { default as
|
|
70
|
-
import { default as
|
|
44
|
+
import { default as default25 } from "./components/translations/report-viewer-en.js";
|
|
45
|
+
import { default as default26 } from "./components/translations/report-viewer-fr.js";
|
|
46
|
+
import { default as default27 } from "./components/translations/login-en.js";
|
|
47
|
+
import { default as default28 } from "./components/translations/login-fr.js";
|
|
48
|
+
import { default as default29 } from "./components/translations/top-bar-en.js";
|
|
49
|
+
import { default as default30 } from "./components/translations/top-bar-fr.js";
|
|
50
|
+
import { default as default31 } from "./components/translations/table-en.js";
|
|
51
|
+
import { default as default32 } from "./components/translations/table-fr.js";
|
|
52
|
+
import { default as default33 } from "./components/translations/treeview-finder-en.js";
|
|
53
|
+
import { default as default34 } from "./components/translations/treeview-finder-fr.js";
|
|
54
|
+
import { default as default35 } from "./components/translations/element-search-en.js";
|
|
55
|
+
import { default as default36 } from "./components/translations/element-search-fr.js";
|
|
56
|
+
import { default as default37 } from "./components/translations/equipment-search-en.js";
|
|
57
|
+
import { default as default38 } from "./components/translations/equipment-search-fr.js";
|
|
58
|
+
import { default as default39 } from "./components/translations/filter-en.js";
|
|
59
|
+
import { default as default40 } from "./components/translations/filter-fr.js";
|
|
60
|
+
import { default as default41 } from "./components/translations/filter-expert-en.js";
|
|
61
|
+
import { default as default42 } from "./components/translations/filter-expert-fr.js";
|
|
62
|
+
import { default as default43 } from "./components/translations/card-error-boundary-en.js";
|
|
63
|
+
import { default as default44 } from "./components/translations/card-error-boundary-fr.js";
|
|
64
|
+
import { default as default45 } from "./components/translations/flat-parameters-en.js";
|
|
65
|
+
import { default as default46 } from "./components/translations/flat-parameters-fr.js";
|
|
66
|
+
import { default as default47 } from "./components/translations/multiple-selection-dialog-en.js";
|
|
67
|
+
import { default as default48 } from "./components/translations/multiple-selection-dialog-fr.js";
|
|
68
|
+
import { default as default49 } from "./components/translations/common-button-en.js";
|
|
69
|
+
import { default as default50 } from "./components/translations/common-button-fr.js";
|
|
70
|
+
import { default as default51 } from "./components/translations/directory-items-input-en.js";
|
|
71
|
+
import { default as default52 } from "./components/translations/directory-items-input-fr.js";
|
|
71
72
|
import { EquipmentItem } from "./components/ElementSearchDialog/equipment-item.js";
|
|
72
|
-
import { default as
|
|
73
|
-
import { default as
|
|
73
|
+
import { default as default53 } from "./components/CardErrorBoundary/card-error-boundary.js";
|
|
74
|
+
import { default as default54 } from "./hooks/useIntlRef.js";
|
|
74
75
|
import { useSnackMessage } from "./hooks/useSnackMessage.js";
|
|
75
|
-
import { default as
|
|
76
|
+
import { default as default55 } from "./hooks/useDebounce.js";
|
|
76
77
|
import { usePrevious } from "./hooks/usePrevious.js";
|
|
77
|
-
import { default as
|
|
78
|
-
import { default as
|
|
79
|
-
import { default as
|
|
80
|
-
import { default as
|
|
81
|
-
import { default as
|
|
82
|
-
import { default as
|
|
83
|
-
import { default as
|
|
84
|
-
import { default as
|
|
85
|
-
import { default as
|
|
86
|
-
import { default as
|
|
87
|
-
import { default as
|
|
88
|
-
import { default as
|
|
89
|
-
import { default as
|
|
90
|
-
import { default as
|
|
91
|
-
import { default as
|
|
92
|
-
import { default as
|
|
93
|
-
import { default as
|
|
94
|
-
import { default as
|
|
95
|
-
import { default as
|
|
96
|
-
import { default as
|
|
78
|
+
import { default as default56 } from "./hooks/useConfidentialityWarning.js";
|
|
79
|
+
import { default as default57 } from "./components/inputs/select-clearable.js";
|
|
80
|
+
import { default as default58 } from "./components/inputs/react-hook-form/provider/use-custom-form-context.js";
|
|
81
|
+
import { default as default59 } from "./components/inputs/react-hook-form/provider/custom-form-provider.js";
|
|
82
|
+
import { default as default60 } from "./components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.js";
|
|
83
|
+
import { default as default61 } from "./components/inputs/react-hook-form/text-input.js";
|
|
84
|
+
import { default as default62 } from "./components/inputs/react-hook-form/ExpandingTextField.js";
|
|
85
|
+
import { default as default63 } from "./components/inputs/react-hook-form/radio-input.js";
|
|
86
|
+
import { default as default64 } from "./components/inputs/react-hook-form/slider-input.js";
|
|
87
|
+
import { default as default65 } from "./components/inputs/react-hook-form/numbers/float-input.js";
|
|
88
|
+
import { default as default66 } from "./components/inputs/react-hook-form/numbers/integer-input.js";
|
|
89
|
+
import { default as default67 } from "./components/inputs/react-hook-form/select-inputs/select-input.js";
|
|
90
|
+
import { default as default68 } from "./components/inputs/react-hook-form/booleans/checkbox-input.js";
|
|
91
|
+
import { default as default69 } from "./components/inputs/react-hook-form/booleans/switch-input.js";
|
|
92
|
+
import { default as default70 } from "./components/inputs/react-hook-form/error-management/error-input.js";
|
|
93
|
+
import { default as default71 } from "./components/inputs/react-hook-form/error-management/field-error-alert.js";
|
|
94
|
+
import { default as default72 } from "./components/inputs/react-hook-form/error-management/mid-form-error.js";
|
|
95
|
+
import { default as default73 } from "./components/inputs/react-hook-form/utils/text-field-with-adornment.js";
|
|
96
|
+
import { default as default74 } from "./components/inputs/react-hook-form/utils/field-label.js";
|
|
97
|
+
import { default as default75 } from "./components/inputs/react-hook-form/utils/submit-button.js";
|
|
98
|
+
import { default as default76 } from "./components/inputs/react-hook-form/utils/cancel-button.js";
|
|
97
99
|
import { genHelperError, genHelperPreviousValue, gridItem, identity, isFieldRequired, isFloatNumber, toFloatOrNullValue } from "./components/inputs/react-hook-form/utils/functions.js";
|
|
98
100
|
import { areArrayElementsUnique, isObjectEmpty, keyGenerator } from "./utils/functions.js";
|
|
99
|
-
import { default as
|
|
100
|
-
import { default as
|
|
101
|
-
import { default as
|
|
102
|
-
import { default as
|
|
103
|
-
import { default as
|
|
104
|
-
import { default as
|
|
105
|
-
import { default as
|
|
106
|
-
import { default as
|
|
101
|
+
import { default as default77 } from "./components/inputs/react-hook-form/directory-items-input.js";
|
|
102
|
+
import { default as default78 } from "./components/DirectoryItemSelector/directory-item-selector.js";
|
|
103
|
+
import { default as default79 } from "./components/CustomAGGrid/custom-aggrid.js";
|
|
104
|
+
import { default as default80 } from "./components/inputs/react-hook-form/raw-read-only-input.js";
|
|
105
|
+
import { default as default81 } from "./components/filter/filter-creation-dialog.js";
|
|
106
|
+
import { default as default82 } from "./components/filter/expert/expert-filter-edition-dialog.js";
|
|
107
|
+
import { default as default83 } from "./components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js";
|
|
108
|
+
import { default as default84 } from "./components/filter/criteria-based/criteria-based-filter-edition-dialog.js";
|
|
107
109
|
import { saveCriteriaBasedFilter, saveExpertFilter, saveExplicitNamingFilter } from "./components/filter/utils/filter-api.js";
|
|
108
|
-
import { DEFAULT_RANGE_VALUE, default as
|
|
109
|
-
import { default as
|
|
110
|
-
import { default as
|
|
111
|
-
import { default as
|
|
110
|
+
import { DEFAULT_RANGE_VALUE, default as default85, getRangeInputDataForm, getRangeInputSchema } from "./components/inputs/react-hook-form/range-input.js";
|
|
111
|
+
import { default as default86 } from "./components/inputs/react-hook-form/select-inputs/input-with-popup-confirmation.js";
|
|
112
|
+
import { default as default87 } from "./components/inputs/react-hook-form/select-inputs/mui-select-input.js";
|
|
113
|
+
import { default as default88 } from "./components/inputs/react-hook-form/select-inputs/countries-input.js";
|
|
112
114
|
import { getComputedLanguage, getSystemLanguage, useLocalizedCountries } from "./hooks/localized-countries-hook.js";
|
|
113
|
-
import { default as
|
|
114
|
-
import { default as
|
|
115
|
-
import { default as
|
|
116
|
-
import { default as
|
|
115
|
+
import { default as default89 } from "./components/inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.js";
|
|
116
|
+
import { default as default90 } from "./components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.js";
|
|
117
|
+
import { default as default91 } from "./components/inputs/react-hook-form/unique-name-input.js";
|
|
118
|
+
import { default as default92 } from "./utils/UserManagerMock.js";
|
|
117
119
|
import { CONTINGENCY_LIST_EQUIPMENTS, FILTER_EQUIPMENTS } from "./components/filter/utils/filter-form-utils.js";
|
|
118
120
|
import { getCriteriaBasedFormData, getCriteriaBasedSchema } from "./components/filter/criteria-based/criteria-based-filter-utils.js";
|
|
119
121
|
import { setCommonStore } from "./redux/commonStore.js";
|
|
120
122
|
import { backendFetch, backendFetchJson, getRequestParamFromList } from "./services/utils.js";
|
|
121
123
|
import { createFilter, fetchElementsInfos, saveFilter } from "./services/explore.js";
|
|
122
|
-
import { fetchAppsMetadata, fetchEnv, fetchStudyMetadata } from "./services/apps-metadata.js";
|
|
124
|
+
import { fetchAppsMetadata, fetchDefaultCountry, fetchEnv, fetchFavoriteAndDefaultCountries, fetchStudyMetadata } from "./services/apps-metadata.js";
|
|
123
125
|
import { fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders } from "./services/directory.js";
|
|
124
126
|
import { exportFilter } from "./services/study.js";
|
|
125
127
|
import * as yup from "yup";
|
|
126
128
|
export {
|
|
127
129
|
default4 as AboutDialog,
|
|
128
130
|
default6 as AuthenticationRouter,
|
|
129
|
-
|
|
131
|
+
default60 as AutocompleteInput,
|
|
130
132
|
Battery,
|
|
131
|
-
|
|
133
|
+
default20 as BottomRightButtons,
|
|
132
134
|
BusBar,
|
|
133
135
|
CONTINGENCY_LIST_EQUIPMENTS,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
default76 as CancelButton,
|
|
137
|
+
default53 as CardErrorBoundary,
|
|
136
138
|
ChangeWays,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
default68 as CheckboxInput,
|
|
140
|
+
default88 as CountriesInput,
|
|
141
|
+
default84 as CriteriaBasedFilterEditionDialog,
|
|
142
|
+
default18 as CriteriaBasedForm,
|
|
143
|
+
default90 as CsvUploader,
|
|
144
|
+
default79 as CustomAGGrid,
|
|
145
|
+
default21 as CustomAgGridTable,
|
|
146
|
+
default59 as CustomFormProvider,
|
|
145
147
|
default14 as CustomMuiDialog,
|
|
146
|
-
|
|
148
|
+
default23 as CustomReactQueryBuilder,
|
|
147
149
|
DARK_THEME,
|
|
148
150
|
DEFAULT_CELL_PADDING,
|
|
149
151
|
DEFAULT_HEADER_HEIGHT,
|
|
150
152
|
DEFAULT_RANGE_VALUE,
|
|
151
153
|
DEFAULT_ROW_HEIGHT,
|
|
152
154
|
DanglingLine,
|
|
155
|
+
default16 as DescriptionField,
|
|
153
156
|
default15 as DescriptionModificationDialog,
|
|
154
|
-
|
|
155
|
-
|
|
157
|
+
default78 as DirectoryItemSelector,
|
|
158
|
+
default77 as DirectoryItemsInput,
|
|
156
159
|
EQUIPMENT_TYPE,
|
|
157
160
|
fields as EXPERT_FILTER_FIELDS,
|
|
158
161
|
EXPERT_FILTER_QUERY,
|
|
@@ -161,23 +164,23 @@ export {
|
|
|
161
164
|
ElementType,
|
|
162
165
|
EquipmentItem,
|
|
163
166
|
EquipmentType,
|
|
164
|
-
|
|
167
|
+
default70 as ErrorInput,
|
|
165
168
|
default12 as ExpandableGroup,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
+
default62 as ExpandingTextField,
|
|
170
|
+
default82 as ExpertFilterEditionDialog,
|
|
171
|
+
default83 as ExplicitNamingFilterEditionDialog,
|
|
169
172
|
FILTER_EQUIPMENTS,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
173
|
+
default22 as FieldConstants,
|
|
174
|
+
default71 as FieldErrorAlert,
|
|
175
|
+
default74 as FieldLabel,
|
|
176
|
+
default81 as FilterCreationDialog,
|
|
174
177
|
FlatParameters,
|
|
175
|
-
|
|
178
|
+
default65 as FloatInput,
|
|
176
179
|
GRIDSUITE_DEFAULT_PRECISION,
|
|
177
180
|
Generator,
|
|
178
181
|
Hvdc,
|
|
179
|
-
|
|
180
|
-
|
|
182
|
+
default86 as InputWithPopupConfirmation,
|
|
183
|
+
default66 as IntegerInput,
|
|
181
184
|
KeyedColumnsRowIndexer,
|
|
182
185
|
LANG_ENGLISH,
|
|
183
186
|
LANG_FRENCH,
|
|
@@ -187,35 +190,35 @@ export {
|
|
|
187
190
|
LOGOUT_ERROR,
|
|
188
191
|
Line,
|
|
189
192
|
Load,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
+
default72 as MidFormError,
|
|
194
|
+
default17 as ModifyElementSelection,
|
|
195
|
+
default87 as MuiSelectInput,
|
|
193
196
|
default7 as MuiVirtualizedTable,
|
|
194
|
-
|
|
197
|
+
default89 as MultipleAutocompleteInput,
|
|
195
198
|
default13 as MultipleSelectionDialog,
|
|
196
199
|
OverflowableText,
|
|
197
|
-
|
|
200
|
+
default19 as PopupConfirmationDialog,
|
|
198
201
|
RESET_AUTHENTICATION_ROUTER_ERROR,
|
|
199
202
|
ROW_DRAGGING_SELECTION_COLUMN_DEF,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
+
default63 as RadioInput,
|
|
204
|
+
default85 as RangeInput,
|
|
205
|
+
default80 as RawReadOnlyInput,
|
|
203
206
|
default8 as ReportViewer,
|
|
204
207
|
default9 as ReportViewerDialog,
|
|
205
208
|
SHOW_AUTH_INFO_LOGIN,
|
|
206
209
|
SIGNIN_CALLBACK_ERROR,
|
|
207
210
|
SVC,
|
|
208
|
-
|
|
209
|
-
|
|
211
|
+
default57 as SelectClearable,
|
|
212
|
+
default67 as SelectInput,
|
|
210
213
|
ShuntCompensator,
|
|
211
|
-
|
|
214
|
+
default64 as SliderInput,
|
|
212
215
|
default5 as SnackbarProvider,
|
|
213
|
-
|
|
216
|
+
default75 as SubmitButton,
|
|
214
217
|
Substation,
|
|
215
|
-
|
|
218
|
+
default69 as SwitchInput,
|
|
216
219
|
default10 as TagRenderer,
|
|
217
|
-
|
|
218
|
-
|
|
220
|
+
default73 as TextFieldWithAdornment,
|
|
221
|
+
default61 as TextInput,
|
|
219
222
|
ThreeWindingTransfo,
|
|
220
223
|
default3 as TopBar,
|
|
221
224
|
default2 as TreeViewFinder,
|
|
@@ -223,41 +226,43 @@ export {
|
|
|
223
226
|
UNAUTHORIZED_USER_INFO,
|
|
224
227
|
USER,
|
|
225
228
|
USER_VALIDATION_ERROR,
|
|
226
|
-
|
|
227
|
-
|
|
229
|
+
default91 as UniqueNameInput,
|
|
230
|
+
default92 as UserManagerMock,
|
|
228
231
|
VSC,
|
|
229
232
|
VoltageLevel,
|
|
230
233
|
areArrayElementsUnique,
|
|
231
234
|
backendFetch,
|
|
232
235
|
backendFetchJson,
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
236
|
+
default43 as card_error_boundary_en,
|
|
237
|
+
default44 as card_error_boundary_fr,
|
|
238
|
+
default49 as common_button_en,
|
|
239
|
+
default50 as common_button_fr,
|
|
237
240
|
createFilter,
|
|
238
|
-
|
|
239
|
-
|
|
241
|
+
default51 as directory_items_input_en,
|
|
242
|
+
default52 as directory_items_input_fr,
|
|
240
243
|
dispatchUser,
|
|
241
|
-
|
|
242
|
-
|
|
244
|
+
default35 as element_search_en,
|
|
245
|
+
default36 as element_search_fr,
|
|
243
246
|
equipmentStyles,
|
|
244
|
-
|
|
245
|
-
|
|
247
|
+
default37 as equipment_search_en,
|
|
248
|
+
default38 as equipment_search_fr,
|
|
246
249
|
exportExpertRules,
|
|
247
250
|
exportFilter,
|
|
248
251
|
fetchAppsMetadata,
|
|
252
|
+
fetchDefaultCountry,
|
|
249
253
|
fetchDirectoryContent,
|
|
250
254
|
fetchDirectoryElementPath,
|
|
251
255
|
fetchElementsInfos,
|
|
252
256
|
fetchEnv,
|
|
257
|
+
fetchFavoriteAndDefaultCountries,
|
|
253
258
|
fetchRootFolders,
|
|
254
259
|
fetchStudyMetadata,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
260
|
+
default39 as filter_en,
|
|
261
|
+
default41 as filter_expert_en,
|
|
262
|
+
default42 as filter_expert_fr,
|
|
263
|
+
default40 as filter_fr,
|
|
264
|
+
default45 as flat_parameters_en,
|
|
265
|
+
default46 as flat_parameters_fr,
|
|
261
266
|
formatQuery,
|
|
262
267
|
genHelperError,
|
|
263
268
|
genHelperPreviousValue,
|
|
@@ -266,7 +271,7 @@ export {
|
|
|
266
271
|
getCriteriaBasedSchema,
|
|
267
272
|
getEquipmentsInfosForSearchBar,
|
|
268
273
|
getExpertFilterEmptyFormData,
|
|
269
|
-
|
|
274
|
+
default24 as getFileIcon,
|
|
270
275
|
getPreLoginPath,
|
|
271
276
|
getRangeInputDataForm,
|
|
272
277
|
getRangeInputSchema,
|
|
@@ -282,16 +287,16 @@ export {
|
|
|
282
287
|
isFloatNumber,
|
|
283
288
|
isObjectEmpty,
|
|
284
289
|
keyGenerator,
|
|
285
|
-
|
|
286
|
-
|
|
290
|
+
default27 as login_en,
|
|
291
|
+
default28 as login_fr,
|
|
287
292
|
logout,
|
|
288
293
|
mergeSx,
|
|
289
294
|
microUnitToUnit,
|
|
290
|
-
|
|
291
|
-
|
|
295
|
+
default47 as multiple_selection_dialog_en,
|
|
296
|
+
default48 as multiple_selection_dialog_fr,
|
|
292
297
|
noSelectionForCopy,
|
|
293
|
-
|
|
294
|
-
|
|
298
|
+
default25 as report_viewer_en,
|
|
299
|
+
default26 as report_viewer_fr,
|
|
295
300
|
roundToDefaultPrecision,
|
|
296
301
|
roundToPrecision,
|
|
297
302
|
rqbQuerySchemaValidator,
|
|
@@ -302,18 +307,19 @@ export {
|
|
|
302
307
|
setCommonStore,
|
|
303
308
|
setLoggedUser,
|
|
304
309
|
setSignInCallbackError,
|
|
305
|
-
|
|
306
|
-
|
|
310
|
+
default31 as table_en,
|
|
311
|
+
default32 as table_fr,
|
|
307
312
|
toFloatOrNullValue,
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
313
|
+
default29 as top_bar_en,
|
|
314
|
+
default30 as top_bar_fr,
|
|
315
|
+
default33 as treeview_finder_en,
|
|
316
|
+
default34 as treeview_finder_fr,
|
|
312
317
|
unitToMicroUnit,
|
|
313
|
-
default56 as
|
|
314
|
-
|
|
318
|
+
default56 as useConfidentialityWarning,
|
|
319
|
+
default58 as useCustomFormContext,
|
|
320
|
+
default55 as useDebounce,
|
|
315
321
|
default11 as useElementSearch,
|
|
316
|
-
|
|
322
|
+
default54 as useIntlRef,
|
|
317
323
|
useLocalizedCountries,
|
|
318
324
|
usePrevious,
|
|
319
325
|
useSnackMessage,
|
|
@@ -4,6 +4,7 @@ export type Url = string | URL;
|
|
|
4
4
|
export type Env = {
|
|
5
5
|
appsMetadataServerUrl?: Url;
|
|
6
6
|
mapBoxToken?: string;
|
|
7
|
+
confidentialityMessageKey?: string;
|
|
7
8
|
};
|
|
8
9
|
export declare function fetchEnv(): Promise<Env>;
|
|
9
10
|
export type CommonMetadata = {
|
|
@@ -27,6 +28,12 @@ export type StudyMetadata = CommonMetadata & {
|
|
|
27
28
|
mapManualRefresh?: string;
|
|
28
29
|
};
|
|
29
30
|
defaultCountry?: string;
|
|
31
|
+
favoriteCountries?: string[];
|
|
30
32
|
};
|
|
31
33
|
export declare function fetchAppsMetadata(): Promise<CommonMetadata[]>;
|
|
32
34
|
export declare function fetchStudyMetadata(): Promise<StudyMetadata>;
|
|
35
|
+
export declare function fetchFavoriteAndDefaultCountries(): Promise<{
|
|
36
|
+
favoriteCountries: string[];
|
|
37
|
+
defaultCountry?: string;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const fetchDefaultCountry: () => Promise<string | undefined>;
|
|
@@ -19,8 +19,21 @@ async function fetchStudyMetadata() {
|
|
|
19
19
|
return studyMetadata[0];
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
async function fetchFavoriteAndDefaultCountries() {
|
|
23
|
+
const { favoriteCountries = [], defaultCountry } = await fetchStudyMetadata();
|
|
24
|
+
return {
|
|
25
|
+
favoriteCountries,
|
|
26
|
+
defaultCountry
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const fetchDefaultCountry = async () => {
|
|
30
|
+
const studyMetadata = await fetchStudyMetadata();
|
|
31
|
+
return studyMetadata.defaultCountry;
|
|
32
|
+
};
|
|
22
33
|
export {
|
|
23
34
|
fetchAppsMetadata,
|
|
35
|
+
fetchDefaultCountry,
|
|
24
36
|
fetchEnv,
|
|
37
|
+
fetchFavoriteAndDefaultCountries,
|
|
25
38
|
fetchStudyMetadata
|
|
26
39
|
};
|
|
@@ -2,10 +2,7 @@ import { getRequestParamFromList, backendFetchJson } from "./utils.js";
|
|
|
2
2
|
const PREFIX_DIRECTORY_SERVER_QUERIES = `${"api/gateway"}/directory`;
|
|
3
3
|
function fetchRootFolders(types) {
|
|
4
4
|
console.info("Fetching Root Directories");
|
|
5
|
-
const urlSearchParams = getRequestParamFromList(
|
|
6
|
-
"elementTypes",
|
|
7
|
-
types
|
|
8
|
-
).toString();
|
|
5
|
+
const urlSearchParams = getRequestParamFromList("elementTypes", types).toString();
|
|
9
6
|
const fetchRootFoldersUrl = `${PREFIX_DIRECTORY_SERVER_QUERIES}/v1/root-directories?${urlSearchParams}`;
|
|
10
7
|
return backendFetchJson(fetchRootFoldersUrl, {
|
|
11
8
|
method: "get",
|
|
@@ -14,10 +11,7 @@ function fetchRootFolders(types) {
|
|
|
14
11
|
}
|
|
15
12
|
function fetchDirectoryContent(directoryUuid, types) {
|
|
16
13
|
console.info("Fetching Folder content '%s'", directoryUuid);
|
|
17
|
-
const urlSearchParams = getRequestParamFromList(
|
|
18
|
-
"elementTypes",
|
|
19
|
-
types
|
|
20
|
-
).toString();
|
|
14
|
+
const urlSearchParams = getRequestParamFromList("elementTypes", types).toString();
|
|
21
15
|
const fetchDirectoryContentUrl = `${PREFIX_DIRECTORY_SERVER_QUERIES}/v1/directories/${directoryUuid}/elements${urlSearchParams ? `?${urlSearchParams}` : ""}`;
|
|
22
16
|
return backendFetchJson(fetchDirectoryContentUrl, {
|
|
23
17
|
method: "get",
|
|
@@ -26,9 +20,7 @@ function fetchDirectoryContent(directoryUuid, types) {
|
|
|
26
20
|
}
|
|
27
21
|
function fetchDirectoryElementPath(elementUuid) {
|
|
28
22
|
console.info(`Fetching element '${elementUuid}' and its parents info ...`);
|
|
29
|
-
const fetchPathUrl = `${PREFIX_DIRECTORY_SERVER_QUERIES}/v1/elements/${encodeURIComponent(
|
|
30
|
-
elementUuid
|
|
31
|
-
)}/path`;
|
|
23
|
+
const fetchPathUrl = `${PREFIX_DIRECTORY_SERVER_QUERIES}/v1/elements/${encodeURIComponent(elementUuid)}/path`;
|
|
32
24
|
console.debug(fetchPathUrl);
|
|
33
25
|
return backendFetchJson(fetchPathUrl, {
|
|
34
26
|
method: "get",
|
package/dist/services/explore.js
CHANGED
|
@@ -37,14 +37,8 @@ function fetchElementsInfos(ids, elementTypes, equipmentTypes) {
|
|
|
37
37
|
ids.filter((id) => id)
|
|
38
38
|
// filter falsy elements
|
|
39
39
|
);
|
|
40
|
-
const equipmentTypesParams = getRequestParamFromList(
|
|
41
|
-
|
|
42
|
-
equipmentTypes
|
|
43
|
-
);
|
|
44
|
-
const elementTypesParams = getRequestParamFromList(
|
|
45
|
-
"elementTypes",
|
|
46
|
-
elementTypes
|
|
47
|
-
);
|
|
40
|
+
const equipmentTypesParams = getRequestParamFromList("equipmentTypes", equipmentTypes);
|
|
41
|
+
const elementTypesParams = getRequestParamFromList("elementTypes", elementTypes);
|
|
48
42
|
const urlSearchParams = new URLSearchParams([
|
|
49
43
|
...idsParams,
|
|
50
44
|
...equipmentTypesParams,
|
package/dist/services/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { backendFetch, backendFetchJson, getRequestParamFromList } from "./utils.js";
|
|
2
2
|
import { createFilter, fetchElementsInfos, saveFilter } from "./explore.js";
|
|
3
|
-
import { fetchAppsMetadata, fetchEnv, fetchStudyMetadata } from "./apps-metadata.js";
|
|
3
|
+
import { fetchAppsMetadata, fetchDefaultCountry, fetchEnv, fetchFavoriteAndDefaultCountries, fetchStudyMetadata } from "./apps-metadata.js";
|
|
4
4
|
import { fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders } from "./directory.js";
|
|
5
5
|
import { exportFilter } from "./study.js";
|
|
6
6
|
export {
|
|
@@ -9,10 +9,12 @@ export {
|
|
|
9
9
|
createFilter,
|
|
10
10
|
exportFilter,
|
|
11
11
|
fetchAppsMetadata,
|
|
12
|
+
fetchDefaultCountry,
|
|
12
13
|
fetchDirectoryContent,
|
|
13
14
|
fetchDirectoryElementPath,
|
|
14
15
|
fetchElementsInfos,
|
|
15
16
|
fetchEnv,
|
|
17
|
+
fetchFavoriteAndDefaultCountries,
|
|
16
18
|
fetchRootFolders,
|
|
17
19
|
fetchStudyMetadata,
|
|
18
20
|
getRequestParamFromList,
|
package/dist/services/utils.js
CHANGED
|
@@ -8,9 +8,7 @@ const parseError = (text) => {
|
|
|
8
8
|
};
|
|
9
9
|
const prepareRequest = (init, token) => {
|
|
10
10
|
if (!(typeof init === "undefined" || typeof init === "object")) {
|
|
11
|
-
throw new TypeError(
|
|
12
|
-
`First argument of prepareRequest is not an object : ${typeof init}`
|
|
13
|
-
);
|
|
11
|
+
throw new TypeError(`First argument of prepareRequest is not an object : ${typeof init}`);
|
|
14
12
|
}
|
|
15
13
|
const initCopy = { ...init };
|
|
16
14
|
initCopy.headers = new Headers(initCopy.headers || {});
|
|
@@ -29,18 +27,14 @@ const handleError = (response) => {
|
|
|
29
27
|
);
|
|
30
28
|
customError.status = errorJson.status;
|
|
31
29
|
} else {
|
|
32
|
-
customError = new Error(
|
|
33
|
-
`${errorName + response.status} ${response.statusText}, message : ${text}`
|
|
34
|
-
);
|
|
30
|
+
customError = new Error(`${errorName + response.status} ${response.statusText}, message : ${text}`);
|
|
35
31
|
customError.status = response.status;
|
|
36
32
|
}
|
|
37
33
|
throw customError;
|
|
38
34
|
});
|
|
39
35
|
};
|
|
40
36
|
const safeFetch = (url, initCopy) => {
|
|
41
|
-
return fetch(url, initCopy).then(
|
|
42
|
-
(response) => response.ok ? response : handleError(response)
|
|
43
|
-
);
|
|
37
|
+
return fetch(url, initCopy).then((response) => response.ok ? response : handleError(response));
|
|
44
38
|
};
|
|
45
39
|
const backendFetch = (url, init, token) => {
|
|
46
40
|
const initCopy = prepareRequest(init, token);
|
|
@@ -48,9 +42,7 @@ const backendFetch = (url, init, token) => {
|
|
|
48
42
|
};
|
|
49
43
|
const backendFetchJson = (url, init, token) => {
|
|
50
44
|
const initCopy = prepareRequest(init, token);
|
|
51
|
-
return safeFetch(url, initCopy).then(
|
|
52
|
-
(safeResponse) => safeResponse.status === 204 ? null : safeResponse.json()
|
|
53
|
-
);
|
|
45
|
+
return safeFetch(url, initCopy).then((safeResponse) => safeResponse.status === 204 ? null : safeResponse.json());
|
|
54
46
|
};
|
|
55
47
|
const getRequestParamFromList = (paramName, params = []) => {
|
|
56
48
|
return new URLSearchParams(params.map((param) => [paramName, param]));
|