@gridsuite/commons-ui 0.206.0 → 0.207.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.
@@ -4,8 +4,4 @@
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 './dnd-table';
8
- export * from './dnd-table.type';
9
- export * from './dnd-table-add-rows-dialog';
10
- export * from './dnd-table-bottom-left-buttons';
11
- export * from './dnd-table-bottom-right-buttons';
7
+ export * from '../dnd-table-v2';
@@ -1,8 +1,9 @@
1
- import { DndTable } from "./dnd-table.js";
2
- import { DndColumnType, MAX_ROWS_NUMBER, SELECTED } from "./dnd-table.type.js";
3
- import { DndTableAddRowsDialog } from "./dnd-table-add-rows-dialog.js";
4
- import { DndTableBottomLeftButtons } from "./dnd-table-bottom-left-buttons.js";
5
- import { DndTableBottomRightButtons } from "./dnd-table-bottom-right-buttons.js";
1
+ import { DndTable } from "../dnd-table-v2/dnd-table.js";
2
+ import { DndColumnType, MAX_ROWS_NUMBER, SELECTED } from "../dnd-table-v2/dnd-table.type.js";
3
+ import { getDefaultRowData } from "../dnd-table-v2/dnd-table-utils.js";
4
+ import { DndTableAddRowsDialog } from "../dnd-table-v2/dnd-table-add-rows-dialog.js";
5
+ import { DndTableBottomLeftButtons } from "../dnd-table-v2/dnd-table-bottom-left-buttons.js";
6
+ import { DndTableBottomRightButtons } from "../dnd-table-v2/dnd-table-bottom-right-buttons.js";
6
7
  export {
7
8
  DndColumnType,
8
9
  DndTable,
@@ -10,5 +11,6 @@ export {
10
11
  DndTableBottomLeftButtons,
11
12
  DndTableBottomRightButtons,
12
13
  MAX_ROWS_NUMBER,
13
- SELECTED
14
+ SELECTED,
15
+ getDefaultRowData
14
16
  };
@@ -50,7 +50,7 @@ const styles = {
50
50
  display: "inline-flex",
51
51
  justifyContent: "space-between",
52
52
  alignItems: "center",
53
- margin: 1,
53
+ marginLeft: 1,
54
54
  textTransform: "none"
55
55
  }
56
56
  };
@@ -29,11 +29,12 @@ import { initializeDirectory } from "./dialogs/elementSaveDialog/utils.js";
29
29
  import { ModifyElementSelection } from "./dialogs/modifyElementSelection/ModifyElementSelection.js";
30
30
  import { PopupConfirmationDialog } from "./dialogs/popupConfirmationDialog/PopupConfirmationDialog.js";
31
31
  import { DirectoryItemSelector } from "./directoryItemSelector/DirectoryItemSelector.js";
32
- import { DndTable } from "./dnd-table/dnd-table.js";
33
- import { DndColumnType, MAX_ROWS_NUMBER, SELECTED } from "./dnd-table/dnd-table.type.js";
34
- import { DndTableAddRowsDialog } from "./dnd-table/dnd-table-add-rows-dialog.js";
35
- import { DndTableBottomLeftButtons } from "./dnd-table/dnd-table-bottom-left-buttons.js";
36
- import { DndTableBottomRightButtons } from "./dnd-table/dnd-table-bottom-right-buttons.js";
32
+ import { DndTable } from "./dnd-table-v2/dnd-table.js";
33
+ import { DndColumnType, MAX_ROWS_NUMBER, SELECTED } from "./dnd-table-v2/dnd-table.type.js";
34
+ import { getDefaultRowData } from "./dnd-table-v2/dnd-table-utils.js";
35
+ import { DndTableAddRowsDialog } from "./dnd-table-v2/dnd-table-add-rows-dialog.js";
36
+ import { DndTableBottomLeftButtons } from "./dnd-table-v2/dnd-table-bottom-left-buttons.js";
37
+ import { DndTableBottomRightButtons } from "./dnd-table-v2/dnd-table-bottom-right-buttons.js";
37
38
  import { EquipmentItem } from "./elementSearch/elementItem/EquipmentItem.js";
38
39
  import { ElementSearchDialog } from "./elementSearch/elementSearchDialog/ElementSearchDialog.js";
39
40
  import { ElementSearchInput } from "./elementSearch/elementSearchInput/ElementSearchInput.js";
@@ -747,6 +748,7 @@ export {
747
748
  getContingencyListsInfosFormSchema,
748
749
  getCreateSwitchesEmptyFormData,
749
750
  getCreateSwitchesValidationSchema,
751
+ getDefaultRowData,
750
752
  getExpertFilterEmptyFormData,
751
753
  getExplicitNamingFilterEmptyFormData,
752
754
  getFilledPropertiesFromModification,
@@ -1,7 +1,7 @@
1
1
  import { FieldValues } from 'react-hook-form';
2
2
  import { default as yup } from '../../../../utils/yupConfig';
3
3
  import { ContingencyListsInfos } from './types';
4
- import { DndColumn } from '../../../dnd-table-v2';
4
+ import { DndColumn } from '../../../dnd-table';
5
5
  export declare const COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS: DndColumn[];
6
6
  export declare const getContingencyListsInfosFormSchema: () => yup.ObjectSchema<{
7
7
  contingencyListsInfos: {
@@ -1,5 +1,5 @@
1
1
  import { UUID } from 'node:crypto';
2
- import { ACTIVATED, DESCRIPTION, ID, NAME } from '../parameter-table/constants';
2
+ import { ACTIVATED, DESCRIPTION, ID, NAME } from '../parameter-table-field/constants';
3
3
  import { CONTINGENCY_LISTS } from '../constants';
4
4
  export interface IdName {
5
5
  [ID]: UUID;
@@ -1,6 +1,6 @@
1
1
  import { SxProps, TooltipProps } from '@mui/material';
2
2
  import { FieldValues } from 'react-hook-form';
3
- import { DndTableProps } from '../../../dnd-table-v2';
3
+ import { DndTableProps } from '../../../dnd-table';
4
4
  export type ParameterDndTableFieldProps = {
5
5
  label?: string;
6
6
  tooltipProps?: Omit<TooltipProps, 'children'>;
@@ -1,5 +1,5 @@
1
1
  import { EquipmentType } from '../../../utils';
2
- import { DndColumn } from '../../dnd-table-v2';
2
+ import { DndColumn } from '../../dnd-table';
3
3
  export declare const MONITORED_BRANCHES_EQUIPMENT_TYPES: EquipmentType[];
4
4
  export declare const INJECTION_DISTRIBUTION_TYPES: {
5
5
  id: string;
@@ -48,7 +48,7 @@ import { getNameElementEditorSchema, getNameElementEditorEmptyFormData } from ".
48
48
  import { fromVoltageInitParametersFormToParamValues, fromVoltageInitParamsDataToFormValues, fromStudyVoltageInitParamsDataToFormValues } from "./voltage-init-form-utils.js";
49
49
  import "react-dom";
50
50
  import "@hello-pangea/dnd";
51
- import { SELECTED } from "../../dnd-table/dnd-table.type.js";
51
+ import { SELECTED } from "../../dnd-table-v2/dnd-table.type.js";
52
52
  const useVoltageInitParametersForm = ({
53
53
  parametersUuid,
54
54
  name,
@@ -40,7 +40,7 @@ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
40
40
  import "react-querybuilder";
41
41
  import "react-dom";
42
42
  import "@hello-pangea/dnd";
43
- import { SELECTED } from "../../dnd-table/dnd-table.type.js";
43
+ import { SELECTED } from "../../dnd-table-v2/dnd-table.type.js";
44
44
  const fromVoltageInitParametersFormToParamValues = (newParams) => {
45
45
  return {
46
46
  applyModifications: newParams?.[VoltageInitTabValues.GENERAL]?.[GENERAL_APPLY_MODIFICATIONS] ?? DEFAULT_GENERAL_APPLY_MODIFICATIONS,
package/dist/index.js CHANGED
@@ -30,11 +30,12 @@ import { initializeDirectory } from "./components/dialogs/elementSaveDialog/util
30
30
  import { ModifyElementSelection } from "./components/dialogs/modifyElementSelection/ModifyElementSelection.js";
31
31
  import { PopupConfirmationDialog } from "./components/dialogs/popupConfirmationDialog/PopupConfirmationDialog.js";
32
32
  import { DirectoryItemSelector } from "./components/directoryItemSelector/DirectoryItemSelector.js";
33
- import { DndTable } from "./components/dnd-table/dnd-table.js";
34
- import { DndColumnType, MAX_ROWS_NUMBER, SELECTED } from "./components/dnd-table/dnd-table.type.js";
35
- import { DndTableAddRowsDialog } from "./components/dnd-table/dnd-table-add-rows-dialog.js";
36
- import { DndTableBottomLeftButtons } from "./components/dnd-table/dnd-table-bottom-left-buttons.js";
37
- import { DndTableBottomRightButtons } from "./components/dnd-table/dnd-table-bottom-right-buttons.js";
33
+ import { DndTable } from "./components/dnd-table-v2/dnd-table.js";
34
+ import { DndColumnType, MAX_ROWS_NUMBER, SELECTED } from "./components/dnd-table-v2/dnd-table.type.js";
35
+ import { getDefaultRowData } from "./components/dnd-table-v2/dnd-table-utils.js";
36
+ import { DndTableAddRowsDialog } from "./components/dnd-table-v2/dnd-table-add-rows-dialog.js";
37
+ import { DndTableBottomLeftButtons } from "./components/dnd-table-v2/dnd-table-bottom-left-buttons.js";
38
+ import { DndTableBottomRightButtons } from "./components/dnd-table-v2/dnd-table-bottom-right-buttons.js";
38
39
  import { EquipmentItem } from "./components/elementSearch/elementItem/EquipmentItem.js";
39
40
  import { ElementSearchDialog } from "./components/elementSearch/elementSearchDialog/ElementSearchDialog.js";
40
41
  import { ElementSearchInput } from "./components/elementSearch/elementSearchInput/ElementSearchInput.js";
@@ -1081,6 +1082,7 @@ export {
1081
1082
  getContingencyListsInfosFormSchema,
1082
1083
  getCreateSwitchesEmptyFormData,
1083
1084
  getCreateSwitchesValidationSchema,
1085
+ getDefaultRowData,
1084
1086
  getDynamicMappings,
1085
1087
  getEquipmentTypeShortLabel,
1086
1088
  getEquipmentsInfosForSearchBar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.206.0",
3
+ "version": "0.207.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",