@gridsuite/commons-ui 0.47.0 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/components/AuthenticationRouter/AuthenticationRouter.d.ts +10 -0
  2. package/dist/components/AuthenticationRouter/index.d.ts +1 -0
  3. package/dist/components/CardErrorBoundary/card-error-boundary.d.ts +18 -0
  4. package/dist/components/CardErrorBoundary/index.d.ts +1 -0
  5. package/dist/components/DirectoryItemSelector/directory-item-selector.d.ts +22 -0
  6. package/dist/components/DirectoryItemSelector/directory-item-selector.js +254 -0
  7. package/dist/components/ElementSearchDialog/element-search-dialog.d.ts +16 -0
  8. package/dist/components/ElementSearchDialog/equipment-item.d.ts +16 -0
  9. package/dist/components/ElementSearchDialog/index.d.ts +2 -0
  10. package/dist/components/ElementSearchDialog/tag-renderer.d.ts +11 -0
  11. package/dist/components/FlatParameters/FlatParameters.d.ts +10 -0
  12. package/dist/components/FlatParameters/index.d.ts +1 -0
  13. package/dist/components/Login/Login.d.ts +5 -0
  14. package/dist/components/Login/Logout.d.ts +5 -0
  15. package/dist/components/Login/index.d.ts +1 -0
  16. package/dist/components/MuiVirtualizedTable/ColumnHeader.d.ts +4 -0
  17. package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.d.ts +104 -0
  18. package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.d.ts +131 -0
  19. package/dist/components/MuiVirtualizedTable/index.d.ts +2 -0
  20. package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.d.ts +10 -0
  21. package/dist/components/MultipleSelectionDialog/index.d.ts +1 -0
  22. package/dist/components/OverflowableText/index.d.ts +1 -0
  23. package/dist/components/OverflowableText/overflowable-text.d.ts +2 -0
  24. package/dist/components/ReportViewer/filter-button.d.ts +1 -0
  25. package/dist/components/ReportViewer/index.d.ts +1 -0
  26. package/dist/components/ReportViewer/log-report-item.d.ts +68 -0
  27. package/dist/components/ReportViewer/log-report.d.ts +21 -0
  28. package/dist/components/ReportViewer/log-table.d.ts +8 -0
  29. package/dist/components/ReportViewer/multi-select-list.d.ts +1 -0
  30. package/dist/components/ReportViewer/report-item.d.ts +13 -0
  31. package/dist/components/ReportViewer/report-tree-view-context.d.ts +2 -0
  32. package/dist/components/ReportViewer/report-viewer.d.ts +4 -0
  33. package/dist/components/ReportViewerDialog/index.d.ts +1 -0
  34. package/dist/components/ReportViewerDialog/report-viewer-dialog.d.ts +1 -0
  35. package/dist/components/SignInCallbackHandler/SignInCallbackHandler.d.ts +5 -0
  36. package/dist/components/SignInCallbackHandler/index.d.ts +1 -0
  37. package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.d.ts +5 -0
  38. package/dist/components/SilentRenewCallbackHandler/index.d.ts +1 -0
  39. package/dist/components/SnackbarProvider/SnackbarProvider.d.ts +3 -0
  40. package/dist/components/SnackbarProvider/index.d.ts +1 -0
  41. package/dist/components/TopBar/AboutDialog.d.ts +24 -0
  42. package/dist/components/TopBar/GridLogo.d.ts +34 -0
  43. package/dist/components/TopBar/TopBar.d.ts +53 -0
  44. package/dist/components/TopBar/index.d.ts +3 -0
  45. package/dist/components/TreeViewFinder/TreeViewFinder.d.ts +57 -0
  46. package/dist/components/TreeViewFinder/index.d.ts +1 -0
  47. package/dist/components/react-hook-form/autocomplete-input.d.ts +30 -0
  48. package/dist/components/react-hook-form/booleans/boolean-input.d.ts +16 -0
  49. package/dist/components/react-hook-form/booleans/checkbox-input.d.ts +14 -0
  50. package/dist/components/react-hook-form/booleans/switch-input.d.ts +14 -0
  51. package/dist/components/react-hook-form/directory-items-input.d.ts +28 -0
  52. package/dist/components/react-hook-form/directory-items-input.js +185 -0
  53. package/dist/components/react-hook-form/error-management/error-input.d.ts +5 -0
  54. package/dist/components/react-hook-form/error-management/field-error-alert.d.ts +4 -0
  55. package/dist/components/react-hook-form/error-management/mid-form-error.d.ts +4 -0
  56. package/dist/components/react-hook-form/numbers/float-input.d.ts +18 -0
  57. package/dist/components/react-hook-form/numbers/integer-input.d.ts +18 -0
  58. package/dist/components/react-hook-form/numbers/utils.d.ts +2 -0
  59. package/dist/components/react-hook-form/radio-input.d.ts +18 -0
  60. package/dist/components/react-hook-form/raw-read-only-input.d.ts +9 -0
  61. package/dist/components/react-hook-form/raw-read-only-input.js +10 -0
  62. package/dist/components/react-hook-form/select-input.d.ts +17 -0
  63. package/dist/components/react-hook-form/slider-input.d.ts +21 -0
  64. package/dist/components/react-hook-form/text-input.d.ts +33 -0
  65. package/dist/components/react-hook-form/utils/cancel-button.d.ts +10 -0
  66. package/dist/components/react-hook-form/utils/field-label.d.ts +6 -0
  67. package/dist/components/react-hook-form/utils/functions.d.ts +11 -0
  68. package/dist/components/react-hook-form/utils/functions.js +5 -0
  69. package/dist/components/react-hook-form/utils/submit-button.d.ts +10 -0
  70. package/dist/components/react-hook-form/utils/text-field-with-adornment.d.ts +12 -0
  71. package/dist/components/translations/card-error-boundary-en.d.ts +12 -0
  72. package/dist/components/translations/card-error-boundary-fr.d.ts +12 -0
  73. package/dist/components/translations/common-button-en.d.ts +5 -0
  74. package/dist/components/translations/common-button-fr.d.ts +5 -0
  75. package/dist/components/translations/element-search-en.d.ts +11 -0
  76. package/dist/components/translations/element-search-fr.d.ts +11 -0
  77. package/dist/components/translations/equipment-search-en.d.ts +25 -0
  78. package/dist/components/translations/equipment-search-fr.d.ts +25 -0
  79. package/dist/components/translations/flat-parameters-en.d.ts +12 -0
  80. package/dist/components/translations/flat-parameters-fr.d.ts +12 -0
  81. package/dist/components/translations/login-en.d.ts +18 -0
  82. package/dist/components/translations/login-fr.d.ts +18 -0
  83. package/dist/components/translations/multiple-selection-dialog-en.d.ts +12 -0
  84. package/dist/components/translations/multiple-selection-dialog-fr.d.ts +12 -0
  85. package/dist/components/translations/report-viewer-en.d.ts +12 -0
  86. package/dist/components/translations/report-viewer-fr.d.ts +12 -0
  87. package/dist/components/translations/table-en.d.ts +10 -0
  88. package/dist/components/translations/table-fr.d.ts +10 -0
  89. package/dist/components/translations/top-bar-en.d.ts +31 -0
  90. package/dist/components/translations/top-bar-fr.d.ts +31 -0
  91. package/dist/components/translations/treeview-finder-en.d.ts +16 -0
  92. package/dist/components/translations/treeview-finder-fr.d.ts +16 -0
  93. package/dist/hooks/useDebounce.d.ts +1 -0
  94. package/dist/hooks/useSnackMessage.d.ts +5 -0
  95. package/dist/index.d.ts +10 -1
  96. package/dist/index.js +4 -0
  97. package/dist/utils/AuthService.d.ts +9 -0
  98. package/dist/utils/ElementType.d.ts +13 -0
  99. package/dist/utils/ElementType.js +6 -2
  100. package/dist/utils/EquipmentType.d.ts +136 -0
  101. package/dist/utils/UserManagerMock.d.ts +34 -0
  102. package/dist/utils/actions.d.ts +50 -0
  103. package/dist/utils/algos.d.ts +7 -0
  104. package/dist/utils/styles.d.ts +5 -0
  105. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -61,6 +61,8 @@ import { default as default48 } from "./components/react-hook-form/utils/field-l
61
61
  import { default as default49 } from "./components/react-hook-form/utils/submit-button.js";
62
62
  import { default as default50 } from "./components/react-hook-form/utils/cancel-button.js";
63
63
  import { genHelperError, genHelperPreviousValue, identity, isFieldRequired } from "./components/react-hook-form/utils/functions.js";
64
+ import { default as default51 } from "./components/react-hook-form/directory-items-input.js";
65
+ import { default as default52 } from "./components/DirectoryItemSelector/directory-item-selector.js";
64
66
  export {
65
67
  default4 as AboutDialog,
66
68
  default6 as AuthenticationRouter,
@@ -73,6 +75,8 @@ export {
73
75
  DEFAULT_CELL_PADDING,
74
76
  DEFAULT_HEADER_HEIGHT,
75
77
  DEFAULT_ROW_HEIGHT,
78
+ default52 as DirectoryItemSelector,
79
+ default51 as DirectoryItemsInput,
76
80
  EQUIPMENT_TYPE,
77
81
  default10 as ElementSearchDialog,
78
82
  EquipmentItem,
@@ -0,0 +1,9 @@
1
+ export function initializeAuthenticationDev(dispatch: any, isSilentRenew: any, validateUser: any, isSigninCallback: any): Promise<UserManagerMock>;
2
+ export function initializeAuthenticationProd(dispatch: any, isSilentRenew: any, idpSettings: any, validateUser: any, authorizationCodeFlowEnabled: any, isSigninCallback: any): any;
3
+ export function handleSilentRenewCallback(userManagerInstance: any): void;
4
+ export function login(location: any, userManagerInstance: any): any;
5
+ export function logout(dispatch: any, userManagerInstance: any): any;
6
+ export function dispatchUser(dispatch: any, userManagerInstance: any, validateUser: any): any;
7
+ export function handleSigninCallback(dispatch: any, navigate: any, userManagerInstance: any): void;
8
+ export function getPreLoginPath(): string | null;
9
+ import { UserManagerMock } from './UserManagerMock';
@@ -0,0 +1,13 @@
1
+ export function getFileIcon(type: any, style: any): import("react/jsx-runtime").JSX.Element | undefined;
2
+ export namespace elementType {
3
+ const DIRECTORY: string;
4
+ const STUDY: string;
5
+ const CASE: string;
6
+ const FILTER: string;
7
+ const MODIFICATION: string;
8
+ const CONTINGENCY_LIST: string;
9
+ const VOLTAGE_INIT_PARAMETERS: string;
10
+ const SECURITY_ANALYSIS_PARAMETERS: string;
11
+ const LOADFLOW_PARAMETERS: string;
12
+ const SENSITIVITY_PARAMETERS: string;
13
+ }
@@ -1,9 +1,10 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import "react";
3
- import { Settings, Article, NoteAlt, OfflineBolt, LibraryBooksOutlined } from "@mui/icons-material";
3
+ import { Settings, Article, NoteAlt, OfflineBolt, Photo, PhotoLibrary } from "@mui/icons-material";
4
4
  const elementType = {
5
5
  DIRECTORY: "DIRECTORY",
6
6
  STUDY: "STUDY",
7
+ CASE: "CASE",
7
8
  FILTER: "FILTER",
8
9
  MODIFICATION: "MODIFICATION",
9
10
  CONTINGENCY_LIST: "CONTINGENCY_LIST",
@@ -15,7 +16,9 @@ const elementType = {
15
16
  function getFileIcon(type, style) {
16
17
  switch (type) {
17
18
  case elementType.STUDY:
18
- return /* @__PURE__ */ jsx(LibraryBooksOutlined, { sx: style });
19
+ return /* @__PURE__ */ jsx(PhotoLibrary, { sx: style });
20
+ case elementType.CASE:
21
+ return /* @__PURE__ */ jsx(Photo, { sx: style });
19
22
  case elementType.CONTINGENCY_LIST:
20
23
  return /* @__PURE__ */ jsx(OfflineBolt, { sx: style });
21
24
  case elementType.MODIFICATION:
@@ -25,6 +28,7 @@ function getFileIcon(type, style) {
25
28
  case elementType.VOLTAGE_INIT_PARAMETERS:
26
29
  case elementType.SECURITY_ANALYSIS_PARAMETERS:
27
30
  case elementType.LOADFLOW_PARAMETERS:
31
+ case elementType.SENSITIVITY_PARAMETERS:
28
32
  return /* @__PURE__ */ jsx(Settings, { sx: style });
29
33
  case elementType.DIRECTORY:
30
34
  return;
@@ -0,0 +1,136 @@
1
+ export const TYPE_TAG_MAX_SIZE: "90px";
2
+ export const VL_TAG_MAX_SIZE: "100px";
3
+ export namespace equipmentStyles {
4
+ namespace equipmentOption {
5
+ const display: string;
6
+ const gap: string;
7
+ const width: string;
8
+ const margin: string;
9
+ const padding: string;
10
+ const alignItems: string;
11
+ const justifyContent: string;
12
+ }
13
+ function equipmentTag(theme: any): {
14
+ borderRadius: string;
15
+ padding: string;
16
+ fontSize: string;
17
+ textAlign: string;
18
+ color: string;
19
+ };
20
+ namespace equipmentTypeTag {
21
+ export { TYPE_TAG_MAX_SIZE as minWidth };
22
+ export { TYPE_TAG_MAX_SIZE as maxWidth };
23
+ export const background: string;
24
+ }
25
+ namespace equipmentVlTag {
26
+ export { VL_TAG_MAX_SIZE as width };
27
+ export { VL_TAG_MAX_SIZE as minWidth };
28
+ export { VL_TAG_MAX_SIZE as maxWidth };
29
+ const background_1: string;
30
+ export { background_1 as background };
31
+ export const fontStyle: string;
32
+ }
33
+ namespace result {
34
+ const width_1: string;
35
+ export { width_1 as width };
36
+ const padding_1: string;
37
+ export { padding_1 as padding };
38
+ }
39
+ }
40
+ export namespace EQUIPMENT_TYPE {
41
+ namespace SUBSTATION {
42
+ const name: string;
43
+ const tagLabel: string;
44
+ }
45
+ namespace VOLTAGE_LEVEL {
46
+ const name_1: string;
47
+ export { name_1 as name };
48
+ const tagLabel_1: string;
49
+ export { tagLabel_1 as tagLabel };
50
+ }
51
+ namespace LINE {
52
+ const name_2: string;
53
+ export { name_2 as name };
54
+ const tagLabel_2: string;
55
+ export { tagLabel_2 as tagLabel };
56
+ }
57
+ namespace TWO_WINDINGS_TRANSFORMER {
58
+ const name_3: string;
59
+ export { name_3 as name };
60
+ const tagLabel_3: string;
61
+ export { tagLabel_3 as tagLabel };
62
+ }
63
+ namespace THREE_WINDINGS_TRANSFORMER {
64
+ const name_4: string;
65
+ export { name_4 as name };
66
+ const tagLabel_4: string;
67
+ export { tagLabel_4 as tagLabel };
68
+ }
69
+ namespace HVDC_LINE {
70
+ const name_5: string;
71
+ export { name_5 as name };
72
+ const tagLabel_5: string;
73
+ export { tagLabel_5 as tagLabel };
74
+ }
75
+ namespace GENERATOR {
76
+ const name_6: string;
77
+ export { name_6 as name };
78
+ const tagLabel_6: string;
79
+ export { tagLabel_6 as tagLabel };
80
+ }
81
+ namespace BATTERY {
82
+ const name_7: string;
83
+ export { name_7 as name };
84
+ const tagLabel_7: string;
85
+ export { tagLabel_7 as tagLabel };
86
+ }
87
+ namespace LOAD {
88
+ const name_8: string;
89
+ export { name_8 as name };
90
+ const tagLabel_8: string;
91
+ export { tagLabel_8 as tagLabel };
92
+ }
93
+ namespace SHUNT_COMPENSATOR {
94
+ const name_9: string;
95
+ export { name_9 as name };
96
+ const tagLabel_9: string;
97
+ export { tagLabel_9 as tagLabel };
98
+ }
99
+ namespace DANGLING_LINE {
100
+ const name_10: string;
101
+ export { name_10 as name };
102
+ const tagLabel_10: string;
103
+ export { tagLabel_10 as tagLabel };
104
+ }
105
+ namespace STATIC_VAR_COMPENSATOR {
106
+ const name_11: string;
107
+ export { name_11 as name };
108
+ const tagLabel_11: string;
109
+ export { tagLabel_11 as tagLabel };
110
+ }
111
+ namespace HVDC_CONVERTER_STATION {
112
+ const name_12: string;
113
+ export { name_12 as name };
114
+ const tagLabel_12: string;
115
+ export { tagLabel_12 as tagLabel };
116
+ }
117
+ namespace BUSBAR_SECTION {
118
+ const name_13: string;
119
+ export { name_13 as name };
120
+ const tagLabel_13: string;
121
+ export { tagLabel_13 as tagLabel };
122
+ }
123
+ namespace BUS {
124
+ const name_14: string;
125
+ export { name_14 as name };
126
+ const tagLabel_14: string;
127
+ export { tagLabel_14 as tagLabel };
128
+ }
129
+ namespace SWITCH {
130
+ const name_15: string;
131
+ export { name_15 as name };
132
+ const tagLabel_15: string;
133
+ export { tagLabel_15 as tagLabel };
134
+ }
135
+ }
136
+ export function getEquipmentsInfosForSearchBar(equipmentsInfos: any, getNameOrId: any): any;
@@ -0,0 +1,34 @@
1
+ export class UserManagerMock {
2
+ constructor(settings: any);
3
+ settings: any;
4
+ events: Events;
5
+ user: {
6
+ profile: {
7
+ name: string;
8
+ email: string;
9
+ };
10
+ id_token: string;
11
+ session_state: string;
12
+ access_token: string;
13
+ token_type: string;
14
+ scope: string;
15
+ };
16
+ getUser(): Promise<any>;
17
+ signinSilent(): Promise<any>;
18
+ signinSilentCallback(): Promise<never>;
19
+ signinRedirect(): Promise<null>;
20
+ signoutRedirect(): Promise<null>;
21
+ signinRedirectCallback(): Promise<string>;
22
+ }
23
+ /**
24
+ * Copyright (c) 2020, RTE (http://www.rte-france.com)
25
+ * This Source Code Form is subject to the terms of the Mozilla Public
26
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
27
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
28
+ */
29
+ declare class Events {
30
+ userLoadedCallbacks: any[];
31
+ addUserLoaded(callback: any): void;
32
+ addSilentRenewError(callback: any): void;
33
+ }
34
+ export {};
@@ -0,0 +1,50 @@
1
+ export function setLoggedUser(user: any): {
2
+ type: string;
3
+ user: any;
4
+ };
5
+ export function setSignInCallbackError(signInCallbackError: any): {
6
+ type: string;
7
+ signInCallbackError: any;
8
+ };
9
+ export function setUnauthorizedUserInfo(userName: any, unauthorizedUserInfo: any): {
10
+ type: string;
11
+ authenticationRouterError: {
12
+ userName: any;
13
+ unauthorizedUserInfo: any;
14
+ };
15
+ };
16
+ export function setLogoutError(userName: any, logoutError: any): {
17
+ type: string;
18
+ authenticationRouterError: {
19
+ userName: any;
20
+ logoutError: any;
21
+ };
22
+ };
23
+ export function setUserValidationError(userName: any, userValidationError: any): {
24
+ type: string;
25
+ authenticationRouterError: {
26
+ userName: any;
27
+ userValidationError: any;
28
+ };
29
+ };
30
+ export function resetAuthenticationRouterError(): {
31
+ type: string;
32
+ authenticationRouterError: null;
33
+ };
34
+ export function setShowAuthenticationRouterLogin(showAuthenticationRouterLogin: any): {
35
+ type: string;
36
+ showAuthenticationRouterLogin: any;
37
+ };
38
+ /**
39
+ * Copyright (c) 2020, RTE (http://www.rte-france.com)
40
+ * This Source Code Form is subject to the terms of the Mozilla Public
41
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
42
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
43
+ */
44
+ export const USER: "USER";
45
+ export const SIGNIN_CALLBACK_ERROR: "SIGNIN_CALLBACK_ERROR";
46
+ export const UNAUTHORIZED_USER_INFO: "UNAUTHORIZED_USER_INFO";
47
+ export const LOGOUT_ERROR: "LOGOUT_ERROR";
48
+ export const USER_VALIDATION_ERROR: "USER_VALIDATION_ERROR";
49
+ export const RESET_AUTHENTICATION_ROUTER_ERROR: "RESET_AUTHENTICATION_ROUTER_ERROR";
50
+ export const SHOW_AUTH_INFO_LOGIN: "SHOW_AUTH_INFO_LOGIN";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright (c) 2022, 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 function equalsArray(a: any, b: any): boolean;
@@ -0,0 +1,5 @@
1
+ export function makeComposeClasses(generateGlobalClass: any): (classes: any, ruleName: any) => string;
2
+ export function toNestedGlobalSelectors(styles: any, generateGlobalClass: any): {
3
+ [k: string]: any;
4
+ };
5
+ export function mergeSx(...allSx: any[]): any[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.47.0",
3
+ "version": "0.48.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "engines": {
6
6
  "npm": ">=9",