@gridsuite/commons-ui 0.176.0 → 0.177.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.
@@ -1,7 +1,6 @@
1
1
  import { UseShortCircuitParametersFormReturn } from './use-short-circuit-parameters-form';
2
2
  type ShortCircuitParametersContentProps = {
3
3
  shortCircuitMethods: UseShortCircuitParametersFormReturn;
4
- isDeveloperMode: boolean;
5
4
  };
6
- declare function ShortCircuitParametersContent({ shortCircuitMethods, isDeveloperMode, }: Readonly<ShortCircuitParametersContentProps>): import("react/jsx-runtime").JSX.Element;
5
+ declare function ShortCircuitParametersContent({ shortCircuitMethods }: Readonly<ShortCircuitParametersContentProps>): import("react/jsx-runtime").JSX.Element;
7
6
  export default ShortCircuitParametersContent;
@@ -56,10 +56,7 @@ const styles = {
56
56
  paddingLeft: 1
57
57
  }
58
58
  };
59
- function ShortCircuitParametersContent({
60
- shortCircuitMethods,
61
- isDeveloperMode
62
- }) {
59
+ function ShortCircuitParametersContent({ shortCircuitMethods }) {
63
60
  const { resetAll, selectedTab, handleTabChange, tabIndexesWithError } = shortCircuitMethods;
64
61
  const watchSpecificParameters = useWatch({
65
62
  name: `${SPECIFIC_PARAMETERS}`
@@ -78,7 +75,7 @@ function ShortCircuitParametersContent({
78
75
  sx: getTabStyle(tabIndexesWithError, ShortCircuitParametersTabValues.GENERAL)
79
76
  }
80
77
  ),
81
- isThereSpecificParameters && isDeveloperMode && /* @__PURE__ */ jsx(
78
+ isThereSpecificParameters && /* @__PURE__ */ jsx(
82
79
  Tab,
83
80
  {
84
81
  label: /* @__PURE__ */ jsx(FormattedMessage, { id: ShortCircuitParametersTabValues.STUDY_AREA }),
@@ -86,7 +83,7 @@ function ShortCircuitParametersContent({
86
83
  sx: getTabStyle(tabIndexesWithError, ShortCircuitParametersTabValues.STUDY_AREA)
87
84
  }
88
85
  ),
89
- isThereSpecificParameters && isDeveloperMode && /* @__PURE__ */ jsx(
86
+ isThereSpecificParameters && /* @__PURE__ */ jsx(
90
87
  Tab,
91
88
  {
92
89
  label: /* @__PURE__ */ jsx(FormattedMessage, { id: ShortCircuitParametersTabValues.POWER_ELECTRONICS }),
@@ -97,7 +94,7 @@ function ShortCircuitParametersContent({
97
94
  ] }) }),
98
95
  /* @__PURE__ */ jsx(Box, { sx: styles.wrapper, children: /* @__PURE__ */ jsx(Grid, { container: true, sx: styles.container, children: /* @__PURE__ */ jsxs(Grid, { item: true, sx: styles.maxWidth, children: [
99
96
  /* @__PURE__ */ jsx(ShortCircuitGeneralTabPanel, { resetAll, value: selectedTab }),
100
- isThereSpecificParameters && isDeveloperMode && /* @__PURE__ */ jsxs(Fragment, { children: [
97
+ isThereSpecificParameters && /* @__PURE__ */ jsxs(Fragment, { children: [
101
98
  /* @__PURE__ */ jsx(ShortCircuitStudyAreaTabPanel, { value: selectedTab }),
102
99
  /* @__PURE__ */ jsx(ShortCircuitPowerElectronicsTabPanel, { value: selectedTab })
103
100
  ] })
@@ -1,4 +1,2 @@
1
1
  import { ParametersEditionDialogProps } from '../common';
2
- export declare function ShortCircuitParametersEditionDialog({ id, open, onClose, titleId, name, description, activeDirectory, user, language, isDeveloperMode, }: Readonly<ParametersEditionDialogProps & {
3
- isDeveloperMode: boolean;
4
- }>): import("react/jsx-runtime").JSX.Element;
2
+ export declare function ShortCircuitParametersEditionDialog({ id, open, onClose, titleId, name, description, activeDirectory, user, language, }: Readonly<ParametersEditionDialogProps>): import("react/jsx-runtime").JSX.Element;
@@ -53,8 +53,7 @@ function ShortCircuitParametersEditionDialog({
53
53
  description,
54
54
  activeDirectory,
55
55
  user,
56
- language,
57
- isDeveloperMode
56
+ language
58
57
  }) {
59
58
  const parametersBackend = useParametersBackend(user, id, ComputingType.SHORT_CIRCUIT, OptionalServicesStatus.Up, {
60
59
  backendFetchParameters: fetchShortCircuitParameters,
@@ -91,7 +90,6 @@ function ShortCircuitParametersEditionDialog({
91
90
  ShortCircuitParametersForm,
92
91
  {
93
92
  shortCircuitMethods,
94
- isDeveloperMode,
95
93
  renderTitleFields: () => {
96
94
  return /* @__PURE__ */ jsx(
97
95
  NameElementEditorForm,
@@ -4,7 +4,6 @@ interface ShortCircuitParametersFormProps {
4
4
  shortCircuitMethods: UseShortCircuitParametersFormReturn;
5
5
  renderTitleFields?: () => ReactNode;
6
6
  renderActions?: () => ReactNode;
7
- isDeveloperMode: boolean;
8
7
  }
9
- export declare function ShortCircuitParametersForm({ shortCircuitMethods, renderTitleFields, renderActions, isDeveloperMode, }: Readonly<ShortCircuitParametersFormProps>): import("react/jsx-runtime").JSX.Element;
8
+ export declare function ShortCircuitParametersForm({ shortCircuitMethods, renderTitleFields, renderActions, }: Readonly<ShortCircuitParametersFormProps>): import("react/jsx-runtime").JSX.Element;
10
9
  export {};
@@ -45,19 +45,12 @@ const styles = {
45
45
  function ShortCircuitParametersForm({
46
46
  shortCircuitMethods,
47
47
  renderTitleFields,
48
- renderActions,
49
- isDeveloperMode
48
+ renderActions
50
49
  }) {
51
50
  const { formMethods, formSchema, paramsLoaded } = shortCircuitMethods;
52
51
  return /* @__PURE__ */ jsx(CustomFormProvider, { validationSchema: formSchema, ...formMethods, removeOptional: true, children: /* @__PURE__ */ jsxs(Box, { sx: styles.shortCircuitParameters, children: [
53
52
  /* @__PURE__ */ jsx(Grid, { item: true, container: true, direction: "column", children: renderTitleFields?.() }),
54
- paramsLoaded ? /* @__PURE__ */ jsx(Grid, { sx: parametersStyles.scrollableGrid, children: /* @__PURE__ */ jsx(
55
- ShortCircuitParametersContent,
56
- {
57
- isDeveloperMode,
58
- shortCircuitMethods
59
- }
60
- ) }) : /* @__PURE__ */ jsx(LinearProgress, {}),
53
+ paramsLoaded ? /* @__PURE__ */ jsx(Grid, { sx: parametersStyles.scrollableGrid, children: /* @__PURE__ */ jsx(ShortCircuitParametersContent, { shortCircuitMethods }) }) : /* @__PURE__ */ jsx(LinearProgress, {}),
61
54
  /* @__PURE__ */ jsx(
62
55
  Grid,
63
56
  {
@@ -1,9 +1,8 @@
1
1
  import { UUID } from 'node:crypto';
2
2
  import { UseParametersBackendReturnProps } from '../../../utils';
3
3
  import { ComputingType } from '../common';
4
- export declare function ShortCircuitParametersInLine({ studyUuid, setHaveDirtyFields, parametersBackend, isDeveloperMode, }: Readonly<{
4
+ export declare function ShortCircuitParametersInLine({ studyUuid, setHaveDirtyFields, parametersBackend, }: Readonly<{
5
5
  studyUuid: UUID | null;
6
6
  setHaveDirtyFields: (isDirty: boolean) => void;
7
7
  parametersBackend: UseParametersBackendReturnProps<ComputingType.SHORT_CIRCUIT>;
8
- isDeveloperMode: boolean;
9
8
  }>): import("react/jsx-runtime").JSX.Element;
@@ -48,8 +48,7 @@ import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
48
48
  function ShortCircuitParametersInLine({
49
49
  studyUuid,
50
50
  setHaveDirtyFields,
51
- parametersBackend,
52
- isDeveloperMode
51
+ parametersBackend
53
52
  }) {
54
53
  const shortCircuitMethods = useShortCircuitParametersForm({
55
54
  parametersBackend,
@@ -105,7 +104,6 @@ function ShortCircuitParametersInLine({
105
104
  ShortCircuitParametersForm,
106
105
  {
107
106
  shortCircuitMethods,
108
- isDeveloperMode,
109
107
  renderActions: () => {
110
108
  return /* @__PURE__ */ jsxs(Box, { children: [
111
109
  /* @__PURE__ */ jsxs(Grid, { container: true, item: true, children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.176.0",
3
+ "version": "0.177.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",