@gridsuite/commons-ui 0.146.0 → 0.148.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 (104) hide show
  1. package/README.md +1 -1
  2. package/dist/components/checkBoxList/CheckBoxListItem.js +1 -1
  3. package/dist/components/checkBoxList/CheckBoxListItemContent.js +1 -1
  4. package/dist/components/checkBoxList/DraggableCheckBoxListItem.js +1 -1
  5. package/dist/components/checkBoxList/DraggableCheckBoxListItemContent.js +1 -1
  6. package/dist/components/csvDownloader/use-csv-export.js +1 -1
  7. package/dist/components/customAGGrid/cell-renderers.js +1 -1
  8. package/dist/components/customAGGrid/separatorCellRenderer.js +1 -1
  9. package/dist/components/dialogs/elementSaveDialog/ElementSaveDialog.js +1 -1
  10. package/dist/components/directoryItemSelector/utils.js +2 -2
  11. package/dist/components/dnd-table/dnd-table-add-rows-dialog.js +1 -1
  12. package/dist/components/filter/HeaderFilterForm.js +1 -1
  13. package/dist/components/filter/expert/expertFilterConstants.js +1 -1
  14. package/dist/components/filter/utils/filterFormUtils.js +1 -1
  15. package/dist/components/index.js +4 -3
  16. package/dist/components/inputs/reactHookForm/DirectoryItemsInput.js +1 -1
  17. package/dist/components/inputs/reactHookForm/OverflowableChipWithHelperText.js +1 -1
  18. package/dist/components/inputs/reactHookForm/agGridTable/CustomAgGridTable.js +1 -1
  19. package/dist/components/inputs/reactHookForm/agGridTable/csvUploader/CsvUploader.js +1 -1
  20. package/dist/components/inputs/reactHookForm/chip-items-input.js +1 -1
  21. package/dist/components/inputs/reactQueryBuilder/CountryValueEditor.js +1 -1
  22. package/dist/components/inputs/reactQueryBuilder/ElementValueEditor.js +1 -1
  23. package/dist/components/inputs/reactQueryBuilder/OperatorSelector.js +1 -1
  24. package/dist/components/overflowableText/OverflowableText.js +1 -1
  25. package/dist/components/parameters/common/ProviderParam.js +1 -1
  26. package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.js +1 -1
  27. package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.js +1 -1
  28. package/dist/components/parameters/common/name-element-editor/name-element-editor-form.js +1 -1
  29. package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.js +1 -1
  30. package/dist/components/parameters/common/utils.js +2 -2
  31. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +1 -1
  32. package/dist/components/parameters/common/widget/parameter-float.js +1 -1
  33. package/dist/components/parameters/common/widget/parameter-line-directory-items-input.js +1 -1
  34. package/dist/components/parameters/common/widget/parameter-line-slider.js +1 -1
  35. package/dist/components/parameters/index.js +4 -3
  36. package/dist/components/parameters/loadflow/load-flow-general-parameters.js +1 -1
  37. package/dist/components/parameters/loadflow/load-flow-parameter-field.js +1 -1
  38. package/dist/components/parameters/loadflow/load-flow-parameters-content.js +1 -1
  39. package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +1 -1
  40. package/dist/components/parameters/loadflow/load-flow-parameters-form.js +1 -1
  41. package/dist/components/parameters/loadflow/load-flow-parameters-header.js +1 -1
  42. package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +1 -1
  43. package/dist/components/parameters/network-visualizations/constants.d.ts +0 -4
  44. package/dist/components/parameters/network-visualizations/constants.js +1 -20
  45. package/dist/components/parameters/network-visualizations/index.js +1 -2
  46. package/dist/components/parameters/network-visualizations/map-parameters.js +21 -4
  47. package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +1 -1
  48. package/dist/components/parameters/network-visualizations/network-visualizations-form.js +1 -1
  49. package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +1 -1
  50. package/dist/components/parameters/pcc-min/pcc-min-form-utils.js +1 -1
  51. package/dist/components/parameters/pcc-min/pcc-min-parameters-form.js +1 -1
  52. package/dist/components/parameters/pcc-min/pcc-min-parameters-inline.js +1 -1
  53. package/dist/components/parameters/pcc-min/use-pcc-min-parameters-form.js +1 -1
  54. package/dist/components/parameters/security-analysis/security-analysis-parameters-dialog.js +1 -1
  55. package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +1 -1
  56. package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js +1 -1
  57. package/dist/components/parameters/sensi/columns-definitions.js +2 -2
  58. package/dist/components/parameters/sensi/sensitivity-Flow-parameters.js +1 -1
  59. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +1 -1
  60. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +1 -1
  61. package/dist/components/parameters/sensi/table-cell.js +1 -1
  62. package/dist/components/parameters/sensi/utils.js +2 -2
  63. package/dist/components/parameters/short-circuit/constants.d.ts +2 -0
  64. package/dist/components/parameters/short-circuit/constants.js +4 -0
  65. package/dist/components/parameters/short-circuit/index.js +3 -1
  66. package/dist/components/parameters/short-circuit/short-circuit-fields.js +42 -8
  67. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-cell.d.ts +7 -0
  68. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-cell.js +48 -0
  69. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-columns-definition.d.ts +18 -0
  70. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-columns-definition.js +47 -0
  71. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-row.d.ts +8 -0
  72. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-row.js +27 -0
  73. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table.d.ts +8 -0
  74. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table.js +46 -0
  75. package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +1 -1
  76. package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.d.ts +14 -7
  77. package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +98 -10
  78. package/dist/components/parameters/short-circuit/short-circuit-parameters.type.d.ts +7 -0
  79. package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +15 -12
  80. package/dist/components/parameters/voltage-init/equipment-selection-parameters.js +1 -1
  81. package/dist/components/parameters/voltage-init/general-parameters.js +1 -1
  82. package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +1 -1
  83. package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +1 -1
  84. package/dist/hooks/use-unique-name-validation.js +1 -1
  85. package/dist/hooks/useConfidentialityWarning.js +1 -1
  86. package/dist/hooks/useModificationLabelComputer.js +1 -1
  87. package/dist/index.js +7 -4
  88. package/dist/services/config.js +1 -1
  89. package/dist/services/utils.d.ts +2 -7
  90. package/dist/services/utils.js +7 -1
  91. package/dist/translations/en/parameters.d.ts +17 -0
  92. package/dist/translations/en/parameters.js +17 -0
  93. package/dist/translations/fr/parameters.d.ts +17 -0
  94. package/dist/translations/fr/parameters.js +17 -0
  95. package/dist/utils/error.js +3 -1
  96. package/dist/utils/index.js +3 -1
  97. package/dist/utils/types/CustomError.d.ts +13 -0
  98. package/dist/utils/types/CustomError.js +20 -0
  99. package/dist/utils/types/ProblemDetailError.d.ts +3 -12
  100. package/dist/utils/types/ProblemDetailError.js +4 -15
  101. package/dist/utils/types/index.d.ts +1 -0
  102. package/dist/utils/types/index.js +3 -1
  103. package/dist/utils/types/metadata.d.ts +4 -0
  104. package/package.json +1 -1
@@ -1,16 +1,7 @@
1
- /**
2
- * Copyright (c) 2025, 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 class ProblemDetailError extends Error {
1
+ import { CustomError } from './CustomError';
2
+ export declare class ProblemDetailError extends CustomError {
8
3
  serverName: string;
9
4
  timestamp: Date;
10
5
  traceId: string;
11
- status?: number;
12
- businessErrorCode?: string;
13
- businessErrorValues?: Record<string, unknown>;
14
- constructor(message: string, serverName: string, timestamp: Date, traceId: string, status?: number, businessErrorCode?: string, businessErrorValues?: Record<string, unknown>);
6
+ constructor(message: string, serverName: string, timestamp: Date, traceId: string, status: number, businessErrorCode?: string, businessErrorValues?: Record<string, unknown>);
15
7
  }
16
- export declare function formatMessageValues(properties: Record<string, unknown>): Record<string, string>;
@@ -1,23 +1,12 @@
1
- class ProblemDetailError extends Error {
1
+ import { CustomError } from "./CustomError.js";
2
+ class ProblemDetailError extends CustomError {
2
3
  constructor(message, serverName, timestamp, traceId, status, businessErrorCode, businessErrorValues) {
3
- super(message);
4
+ super(message, status, businessErrorCode, businessErrorValues);
4
5
  this.serverName = serverName;
5
6
  this.timestamp = timestamp;
6
7
  this.traceId = traceId;
7
- this.status = status;
8
- this.businessErrorCode = businessErrorCode;
9
- this.businessErrorValues = businessErrorValues;
10
8
  }
11
9
  }
12
- function formatMessageValues(properties) {
13
- return Object.fromEntries(
14
- Object.entries(properties).map(([key, value]) => [
15
- key,
16
- typeof value === "object" && value !== null ? JSON.stringify(value) : String(value)
17
- ])
18
- );
19
- }
20
10
  export {
21
- ProblemDetailError,
22
- formatMessageValues
11
+ ProblemDetailError
23
12
  };
@@ -4,6 +4,7 @@
4
4
  * License, v. 2.0. If a copy of the MPL was not distributed with this
5
5
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
  */
7
+ export * from './CustomError';
7
8
  export * from './ProblemDetailError';
8
9
  export * from './NetworkTimeoutError';
9
10
  export * from './elementType';
@@ -1,4 +1,5 @@
1
- import { ProblemDetailError, formatMessageValues } from "./ProblemDetailError.js";
1
+ import { CustomError, formatMessageValues } from "./CustomError.js";
2
+ import { ProblemDetailError } from "./ProblemDetailError.js";
2
3
  import { NetworkTimeoutError } from "./NetworkTimeoutError.js";
3
4
  import { ElementType } from "./elementType.js";
4
5
  import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, EquipmentType, ExtendedEquipmentType, HvdcType, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./equipmentType.js";
@@ -16,6 +17,7 @@ export {
16
17
  BASE_EQUIPMENTS,
17
18
  Battery,
18
19
  BusBar,
20
+ CustomError,
19
21
  DanglingLine,
20
22
  DistributionType,
21
23
  ElementType,
@@ -22,6 +22,10 @@ export type StudyMetadata = Metadata & {
22
22
  defaultCountry?: string;
23
23
  favoriteCountries?: string[];
24
24
  substationPropertiesGlobalFilters?: Map<string, string[]>;
25
+ baseMapOptions?: {
26
+ id: string;
27
+ label: string;
28
+ }[];
25
29
  };
26
30
  type ThemeColors = Record<string, string>;
27
31
  type SldAndNadColors = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.146.0",
3
+ "version": "0.148.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",