@gridsuite/commons-ui 0.296.0 → 0.297.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/components/composite/agGridTable/BottomTableButtons.js +56 -44
- package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-aggrid-comparator-filter.js +32 -23
- package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-aggrid-text-filter.js +31 -23
- package/dist/components/composite/customAGGrid/custom-aggrid-header.js +67 -43
- package/dist/components/composite/elementSearch/elementSearchInput/ElementSearchInput.d.ts +3 -2
- package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js +43 -28
- package/dist/components/composite/reactQueryBuilder/CustomReactQueryBuilder.js +4 -7
- package/dist/components/composite/reactQueryBuilder/FieldSelector.js +5 -3
- package/dist/components/composite/reactQueryBuilder/PropertyValueEditor.js +63 -52
- package/dist/components/composite/reactQueryBuilder/compositeRuleEditor/GroupValueEditor.js +22 -9
- package/dist/components/composite/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js +59 -24
- package/dist/components/ui/csvPicker/csv-picker.js +24 -12
- package/dist/components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js +15 -7
- package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +82 -39
- package/dist/components/ui/dialogs/modifyElementSelection/ModifyElementSelection.js +29 -9
- package/dist/components/ui/dialogs/name-element-editor/name-element-editor-form.js +24 -15
- package/dist/components/ui/inputs/ActivableChip.js +2 -2
- package/dist/components/ui/inputs/SelectClearable.js +4 -3
- package/dist/components/ui/reactHookForm/DirectoryItemsInput.js +1 -1
- package/dist/components/ui/reactHookForm/OverflowableChip.js +24 -13
- package/dist/components/ui/reactHookForm/OverflowableChipWithHelperText.js +9 -4
- package/dist/components/ui/reactHookForm/autocompleteInputs/AutocompleteInput.js +11 -5
- package/dist/components/ui/reactHookForm/directory-item-input/directory-item-input.js +13 -3
- package/dist/components/ui/reactHookForm/expandableInput/DeletableRow.js +3 -1
- package/dist/components/ui/reactHookForm/utils/HelperPreviousValue.js +11 -1
- package/dist/features/authentication/AuthenticationRouter.js +62 -53
- package/dist/features/authentication/Login.js +15 -7
- package/dist/features/authentication/Logout.js +9 -1
- package/dist/features/cardErrorBoundary/CardErrorBoundary.js +28 -10
- package/dist/features/global-filter/ui/global-filter-panel.js +4 -10
- package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +22 -12
- package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +21 -11
- package/dist/features/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +35 -25
- package/dist/features/network-modifications/common/currentLimits/LimitsPane.js +28 -16
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsEditor.js +16 -4
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsPropertiesSideStack.js +81 -68
- package/dist/features/network-modifications/common/measurements/BusbarSectionVoltageMeasurementsForm.js +31 -21
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveTableForm.js +32 -21
- package/dist/features/network-modifications/common/regulatingTerminal/RegulatingTerminalForm.d.ts +1 -1
- package/dist/features/network-modifications/common/regulatingTerminal/RegulatingTerminalForm.js +1 -1
- package/dist/features/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +20 -9
- package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +22 -12
- package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +28 -18
- package/dist/features/network-modifications/hvdcLine/vsc/common/converterStation/VscConverterStationPane.js +15 -4
- package/dist/features/network-modifications/static-var-compensator/common/set-points-limits-form.js +70 -40
- package/dist/features/network-modifications/static-var-compensator/common/standby-automaton-form.js +35 -6
- package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-tabs-content.js +16 -7
- package/dist/features/network-modifications/tabular/TabularForm.js +102 -72
- package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js +20 -10
- package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +35 -17
- package/dist/features/network-modifications/voltageLevel/moveFeederBays/MoveVoltageLevelFeederBaysForm.js +9 -1
- package/dist/features/network-modifications/voltageLevel/moveFeederBays/feederBay/FeederBayPositionCellRender.js +6 -4
- package/dist/features/network-modifications/voltageLevel/section/VoltageLevelSectionCreationForm.js +17 -7
- package/dist/features/network-modifications/voltageLevel/topology/creation/CreateVoltageLevelTopologyForm.js +23 -13
- package/dist/features/network-modifications/voltageLevel/topology/modification/VoltageLevelTopologyModificationForm.js +25 -15
- package/dist/features/parameters/common/parameter-field.js +17 -4
- package/dist/features/parameters/common/parameter-table-field/parameter-table-field.js +23 -12
- package/dist/features/parameters/common/provider-param.js +1 -1
- package/dist/features/parameters/common/widget/parameter-float.js +16 -4
- package/dist/features/parameters/common/widget/parameter-line-directory-items-input.js +1 -1
- package/dist/features/parameters/common/widget/parameter-switch.js +13 -1
- package/dist/features/parameters/dynamic-simulation/curve/common/checkbox-select.js +6 -4
- package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-selector-dialog.js +43 -32
- package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-selector.js +47 -25
- package/dist/features/parameters/network-visualizations/map-parameters.js +7 -3
- package/dist/features/parameters/network-visualizations/network-area-diagram-parameters.js +7 -3
- package/dist/features/parameters/network-visualizations/single-line-diagram-parameters.js +7 -3
- package/dist/features/parameters/security-analysis/security-analysis-violations-hiding.js +23 -13
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-factor-count.js +2 -2
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.js +12 -1
- package/dist/features/parameters/sensi/sensitivity-parameters-fields.js +36 -26
- package/dist/features/parameters/short-circuit/short-circuit-general-tab-panel.js +67 -26
- package/dist/features/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +15 -4
- package/dist/features/parameters/voltage-init/equipment-selection-parameters.js +51 -15
- package/dist/features/parameters/voltage-init/general-parameters.js +9 -1
- package/dist/features/process-configs/common/FormSubSection.js +2 -2
- package/dist/features/process-configs/common/GeneralInformationSection.js +1 -1
- package/dist/features/process-configs/common/SpecificInformationSection.js +12 -4
- package/dist/features/process-configs/common/process-config-modifications-edition.js +3 -3
- package/dist/features/process-configs/form/components/ProcessTypeChangeDialog.js +5 -2
- package/dist/features/side-bar/AppSideBarHeader.js +36 -16
- package/dist/features/side-bar/footer/AppSideBarFooter.js +46 -38
- package/dist/features/side-bar/footer/applications/OtherAppRedirection.js +10 -8
- package/dist/features/side-bar/footer/common/SideBarMenuItem.js +9 -1
- package/dist/features/side-bar/footer/profile/ProfileInfos.js +15 -6
- package/dist/features/side-bar/footer/settings/DarkModeToggle.js +16 -4
- package/dist/features/side-bar/footer/settings/SettingsMenu.js +16 -6
- package/dist/features/topBar/AboutDialog.js +46 -17
- package/dist/features/topBar/TopBar.js +2 -2
- package/dist/features/topBar/UserInformationDialog.js +198 -45
- package/package.json +16 -11
|
@@ -29,17 +29,30 @@ function GroupValueEditor(props) {
|
|
|
29
29
|
},
|
|
30
30
|
[handleOnChange, combinator, value]
|
|
31
31
|
);
|
|
32
|
-
return /* @__PURE__ */ jsx(
|
|
33
|
-
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
Stack,
|
|
34
34
|
{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
sx: [
|
|
36
|
+
{
|
|
37
|
+
paddingLeft: 1,
|
|
38
|
+
paddingRight: 1,
|
|
39
|
+
paddingBottom: 1
|
|
40
|
+
},
|
|
41
|
+
styles.group
|
|
42
|
+
],
|
|
43
|
+
children: children && Object.values(children).map((fieldData) => /* @__PURE__ */ createElement(
|
|
44
|
+
RuleValueEditor,
|
|
45
|
+
{
|
|
46
|
+
...props,
|
|
47
|
+
key: fieldData.name,
|
|
48
|
+
field: fieldData.name,
|
|
49
|
+
fieldData,
|
|
50
|
+
rule: value?.rules?.[fieldData.name],
|
|
51
|
+
handleOnChangeRule: generateOnChangeRuleHandler(fieldData.name)
|
|
52
|
+
}
|
|
53
|
+
))
|
|
41
54
|
}
|
|
42
|
-
)
|
|
55
|
+
);
|
|
43
56
|
}
|
|
44
57
|
export {
|
|
45
58
|
GroupValueEditor
|
|
@@ -32,30 +32,65 @@ function RuleValueEditor(props) {
|
|
|
32
32
|
operator
|
|
33
33
|
});
|
|
34
34
|
};
|
|
35
|
-
return /* @__PURE__ */ jsxs(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
35
|
+
return /* @__PURE__ */ jsxs(
|
|
36
|
+
Grid,
|
|
37
|
+
{
|
|
38
|
+
container: true,
|
|
39
|
+
sx: {
|
|
40
|
+
paddingTop: 1
|
|
41
|
+
},
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ jsx(Grid, { container: true, size: 4, sx: styles.gridItem, children: /* @__PURE__ */ jsx(Typography, { children: intl.formatMessage({ id: fieldData.label }) }) }),
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
Grid,
|
|
46
|
+
{
|
|
47
|
+
container: true,
|
|
48
|
+
size: 2.5,
|
|
49
|
+
sx: [
|
|
50
|
+
{
|
|
51
|
+
paddingLeft: 1
|
|
52
|
+
},
|
|
53
|
+
styles.gridItem
|
|
54
|
+
],
|
|
55
|
+
children: /* @__PURE__ */ jsx(
|
|
56
|
+
Select,
|
|
57
|
+
{
|
|
58
|
+
value: operator,
|
|
59
|
+
size: "small",
|
|
60
|
+
onChange: (event) => {
|
|
61
|
+
handleOnChangeOperator(event.target.value);
|
|
62
|
+
},
|
|
63
|
+
variant: "standard",
|
|
64
|
+
children: fieldData.operators?.map((option) => /* @__PURE__ */ jsx(MenuItem, { value: option.name, children: intl.formatMessage({ id: option.label }) }, option.name))
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
Grid,
|
|
71
|
+
{
|
|
72
|
+
container: true,
|
|
73
|
+
size: 5.5,
|
|
74
|
+
sx: [
|
|
75
|
+
{
|
|
76
|
+
paddingLeft: 1
|
|
77
|
+
},
|
|
78
|
+
styles.gridItem
|
|
79
|
+
],
|
|
80
|
+
children: /* @__PURE__ */ jsx(
|
|
81
|
+
ValueEditorControlElement,
|
|
82
|
+
{
|
|
83
|
+
...props,
|
|
84
|
+
operator,
|
|
85
|
+
handleOnChange: handleOnChangeValue,
|
|
86
|
+
value: rule?.value
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
59
94
|
}
|
|
60
95
|
export {
|
|
61
96
|
RuleValueEditor
|
|
@@ -74,18 +74,30 @@ function CsvPicker({
|
|
|
74
74
|
...parseConfig
|
|
75
75
|
},
|
|
76
76
|
onUploadAccepted: handleUploadAccepted,
|
|
77
|
-
children: ({ getRootProps }) => /* @__PURE__ */ jsxs(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
77
|
+
children: ({ getRootProps }) => /* @__PURE__ */ jsxs(
|
|
78
|
+
Grid,
|
|
79
|
+
{
|
|
80
|
+
container: true,
|
|
81
|
+
spacing: 1,
|
|
82
|
+
wrap: "nowrap",
|
|
83
|
+
sx: {
|
|
84
|
+
alignItems: "center",
|
|
85
|
+
justifyContent: "right"
|
|
86
|
+
},
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Tooltip, { title: selectedFile?.name, children: /* @__PURE__ */ jsx(Typography, { sx: { fontWeight: "bold", overflow: "hidden", textOverflow: "ellipsis" }, children: selectedFile ? selectedFile.name : /* @__PURE__ */ jsx(FormattedMessage, { id: "uploadMessage" }) }) }) }),
|
|
89
|
+
/* @__PURE__ */ jsx(Grid, { size: "auto", children: /* @__PURE__ */ jsx(
|
|
90
|
+
Button,
|
|
91
|
+
{
|
|
92
|
+
...getRootProps(),
|
|
93
|
+
variant: selectedFile ? "contained" : "text",
|
|
94
|
+
disabled,
|
|
95
|
+
children: /* @__PURE__ */ jsx(FormattedMessage, { id: label })
|
|
96
|
+
}
|
|
97
|
+
) })
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
)
|
|
89
101
|
}
|
|
90
102
|
),
|
|
91
103
|
onAppend && onReplace && /* @__PURE__ */ jsx(
|
package/dist/components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js
CHANGED
|
@@ -57,15 +57,23 @@ function DescriptionModificationDialog({
|
|
|
57
57
|
onSave: onSubmit,
|
|
58
58
|
formContext: { ...methods, validationSchema: schema, removeOptional: true },
|
|
59
59
|
titleId: "description",
|
|
60
|
-
children: /* @__PURE__ */ jsx(
|
|
61
|
-
|
|
60
|
+
children: /* @__PURE__ */ jsx(
|
|
61
|
+
Box,
|
|
62
62
|
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
sx: {
|
|
64
|
+
paddingTop: 1
|
|
65
|
+
},
|
|
66
|
+
children: /* @__PURE__ */ jsx(
|
|
67
|
+
ExpandingTextField,
|
|
68
|
+
{
|
|
69
|
+
name: FieldConstants.DESCRIPTION,
|
|
70
|
+
label: "descriptionProperty",
|
|
71
|
+
minRows: 3,
|
|
72
|
+
rows: 3
|
|
73
|
+
}
|
|
74
|
+
)
|
|
67
75
|
}
|
|
68
|
-
)
|
|
76
|
+
)
|
|
69
77
|
}
|
|
70
78
|
);
|
|
71
79
|
}
|
|
@@ -201,12 +201,46 @@ function ElementSaveDialog({
|
|
|
201
201
|
if (isCreateMode) {
|
|
202
202
|
return /* @__PURE__ */ jsxs(Grid, { container: true, children: [
|
|
203
203
|
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Button, { onClick: handleChangeFolder, variant: "contained", size: "small", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "showSelectDirectoryDialog" }) }) }),
|
|
204
|
-
/* @__PURE__ */ jsx(
|
|
204
|
+
/* @__PURE__ */ jsx(
|
|
205
|
+
Typography,
|
|
206
|
+
{
|
|
207
|
+
component: "span",
|
|
208
|
+
sx: {
|
|
209
|
+
m: 1
|
|
210
|
+
},
|
|
211
|
+
children: /* @__PURE__ */ jsx(
|
|
212
|
+
Box,
|
|
213
|
+
{
|
|
214
|
+
sx: {
|
|
215
|
+
fontWeight: "fontWeightBold"
|
|
216
|
+
},
|
|
217
|
+
children: destinationFolder ? destinationFolder.name : /* @__PURE__ */ jsx(CircularProgress, {})
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
}
|
|
221
|
+
)
|
|
205
222
|
] });
|
|
206
223
|
}
|
|
207
224
|
return /* @__PURE__ */ jsxs(Grid, { container: true, children: [
|
|
208
225
|
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Button, { onClick: handleChangeFolder, variant: "contained", size: "small", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "showSelectDirectoryItemDialog" }) }) }),
|
|
209
|
-
/* @__PURE__ */ jsx(
|
|
226
|
+
/* @__PURE__ */ jsx(
|
|
227
|
+
Typography,
|
|
228
|
+
{
|
|
229
|
+
component: "span",
|
|
230
|
+
sx: {
|
|
231
|
+
m: 1
|
|
232
|
+
},
|
|
233
|
+
children: /* @__PURE__ */ jsx(
|
|
234
|
+
Box,
|
|
235
|
+
{
|
|
236
|
+
sx: {
|
|
237
|
+
fontWeight: "fontWeightBold"
|
|
238
|
+
},
|
|
239
|
+
children: selectedItem ? selectedItem.fullPath : null
|
|
240
|
+
}
|
|
241
|
+
)
|
|
242
|
+
}
|
|
243
|
+
)
|
|
210
244
|
] });
|
|
211
245
|
};
|
|
212
246
|
return /* @__PURE__ */ jsxs(
|
|
@@ -219,45 +253,54 @@ function ElementSaveDialog({
|
|
|
219
253
|
disabledSave: disableSave,
|
|
220
254
|
formContext: { ...formMethods, validationSchema: schema },
|
|
221
255
|
children: [
|
|
222
|
-
/* @__PURE__ */ jsxs(
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
256
|
+
/* @__PURE__ */ jsxs(
|
|
257
|
+
Stack,
|
|
258
|
+
{
|
|
259
|
+
spacing: 2,
|
|
260
|
+
sx: {
|
|
261
|
+
marginTop: "auto"
|
|
262
|
+
},
|
|
263
|
+
children: [
|
|
264
|
+
!createOnlyMode && /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
|
|
265
|
+
RadioInput,
|
|
266
|
+
{
|
|
267
|
+
name: FieldConstants.OPERATION_TYPE,
|
|
268
|
+
options: [
|
|
269
|
+
{ id: "CREATE", label: createLabelId ?? "createLabelId" },
|
|
270
|
+
...onSaveShared ? [
|
|
271
|
+
{
|
|
272
|
+
id: "CREATE_SHARED",
|
|
273
|
+
label: createSharedLabelId ?? "createSharedLabelId",
|
|
274
|
+
disabled: createSharedDisabled
|
|
275
|
+
}
|
|
276
|
+
] : [],
|
|
277
|
+
{ id: "UPDATE", label: updateLabelId ?? "updateLabelId" }
|
|
278
|
+
],
|
|
279
|
+
formProps: {
|
|
280
|
+
sx: {
|
|
281
|
+
"& .MuiFormControlLabel-root": {
|
|
282
|
+
marginRight: onSaveShared ? 4 : 15
|
|
283
|
+
}
|
|
284
|
+
}
|
|
242
285
|
}
|
|
243
286
|
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
287
|
+
) }),
|
|
288
|
+
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
|
|
289
|
+
UniqueNameInput,
|
|
290
|
+
{
|
|
291
|
+
name: FieldConstants.NAME,
|
|
292
|
+
label: "name",
|
|
293
|
+
elementType: type,
|
|
294
|
+
currentName: !isCreateMode ? selectedItem?.name : void 0,
|
|
295
|
+
activeDirectory: isCreateMode ? destinationFolder?.id : selectedItem?.parentFolderId,
|
|
296
|
+
autoFocus: true
|
|
297
|
+
}
|
|
298
|
+
) }),
|
|
299
|
+
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(DescriptionField, {}) }),
|
|
300
|
+
renderChooser()
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
),
|
|
261
304
|
/* @__PURE__ */ jsx(
|
|
262
305
|
DirectoryItemSelector,
|
|
263
306
|
{
|
|
@@ -55,15 +55,35 @@ function ModifyElementSelection(props) {
|
|
|
55
55
|
},
|
|
56
56
|
children: [
|
|
57
57
|
/* @__PURE__ */ jsxs(Grid, { container: true, children: [
|
|
58
|
-
/* @__PURE__ */ jsx(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
/* @__PURE__ */ jsx(
|
|
59
|
+
Typography,
|
|
60
|
+
{
|
|
61
|
+
component: "span",
|
|
62
|
+
sx: {
|
|
63
|
+
m: 1
|
|
64
|
+
},
|
|
65
|
+
children: /* @__PURE__ */ jsxs(
|
|
66
|
+
Box,
|
|
67
|
+
{
|
|
68
|
+
sx: {
|
|
69
|
+
fontWeight: "fontWeightBold",
|
|
70
|
+
display: "flex",
|
|
71
|
+
justifyContent: "center",
|
|
72
|
+
alignItems: "center"
|
|
73
|
+
},
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ jsx(FolderOutlined, {}),
|
|
76
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
77
|
+
" ",
|
|
78
|
+
activeDirectoryName || (props?.noElementMessageLabel ? intl.formatMessage({
|
|
79
|
+
id: noElementMessageLabel
|
|
80
|
+
}) : "")
|
|
81
|
+
] })
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
),
|
|
67
87
|
/* @__PURE__ */ jsx(Button, { onClick: handleSelectFolder, variant: "contained", size: "small", children: /* @__PURE__ */ jsx(FormattedMessage, { id: dialogOpeningButtonLabel }) })
|
|
68
88
|
] }),
|
|
69
89
|
/* @__PURE__ */ jsx(
|
|
@@ -12,21 +12,30 @@ function NameElementEditorForm({
|
|
|
12
12
|
activeDirectory,
|
|
13
13
|
elementType
|
|
14
14
|
}) {
|
|
15
|
-
return /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsxs(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
15
|
+
return /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsxs(
|
|
16
|
+
Stack,
|
|
17
|
+
{
|
|
18
|
+
spacing: 2,
|
|
19
|
+
sx: {
|
|
20
|
+
marginBottom: "8px"
|
|
21
|
+
},
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
|
|
24
|
+
UniqueNameInput,
|
|
25
|
+
{
|
|
26
|
+
name: FieldConstants.NAME,
|
|
27
|
+
currentName: initialElementName,
|
|
28
|
+
label: "nameProperty",
|
|
29
|
+
elementType,
|
|
30
|
+
activeDirectory,
|
|
31
|
+
sx: elementEditionStyles.textField,
|
|
32
|
+
fullWidth: false
|
|
33
|
+
}
|
|
34
|
+
) }),
|
|
35
|
+
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(DescriptionField, { expandingTextSx: elementEditionStyles.description }) })
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
) });
|
|
30
39
|
}
|
|
31
40
|
export {
|
|
32
41
|
NameElementEditorForm
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Chip } from "@mui/material";
|
|
3
|
-
import {
|
|
3
|
+
import { CheckCircleOutlined, Cancel } from "@mui/icons-material";
|
|
4
4
|
import { CustomTooltip } from "../tooltip/CustomTooltip.js";
|
|
5
5
|
function ActivableChip(props) {
|
|
6
6
|
const { isActivated, label, tooltipMessage, onClick, isDisabled } = props;
|
|
@@ -8,7 +8,7 @@ function ActivableChip(props) {
|
|
|
8
8
|
Chip,
|
|
9
9
|
{
|
|
10
10
|
label,
|
|
11
|
-
deleteIcon: isActivated ? /* @__PURE__ */ jsx(
|
|
11
|
+
deleteIcon: isActivated ? /* @__PURE__ */ jsx(CheckCircleOutlined, {}) : /* @__PURE__ */ jsx(Cancel, {}),
|
|
12
12
|
color: "primary",
|
|
13
13
|
size: "small",
|
|
14
14
|
variant: isActivated ? "filled" : "outlined",
|
|
@@ -19,17 +19,18 @@ function SelectClearable(props) {
|
|
|
19
19
|
getOptionLabel: (option) => {
|
|
20
20
|
return option.label ? intl.formatMessage({ id: option.label }) : option.id;
|
|
21
21
|
},
|
|
22
|
-
renderInput: (
|
|
22
|
+
renderInput: (params) => /* @__PURE__ */ jsx(
|
|
23
23
|
TextField,
|
|
24
24
|
{
|
|
25
|
-
...
|
|
25
|
+
...params,
|
|
26
26
|
...label && {
|
|
27
27
|
label: FieldLabel({
|
|
28
28
|
label
|
|
29
29
|
})
|
|
30
30
|
},
|
|
31
31
|
slotProps: {
|
|
32
|
-
|
|
32
|
+
...params.slotProps,
|
|
33
|
+
htmlInput: { ...params.slotProps.htmlInput, readOnly: true }
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
),
|
|
@@ -2,23 +2,34 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box, Chip } from "@mui/material";
|
|
3
3
|
import { OverflowableText } from "../overflowableText/OverflowableText.js";
|
|
4
4
|
function OverflowableChip({ label, boxSx, ...otherProps }) {
|
|
5
|
-
return /* @__PURE__ */ jsx(
|
|
6
|
-
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
Box,
|
|
7
7
|
{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
onClick: (e) => e.stopPropagation(),
|
|
9
|
+
sx: {
|
|
10
|
+
padding: "3px",
|
|
11
|
+
cursor: "default",
|
|
12
|
+
...boxSx
|
|
13
|
+
},
|
|
14
|
+
children: /* @__PURE__ */ jsx(
|
|
15
|
+
Chip,
|
|
11
16
|
{
|
|
12
|
-
|
|
13
|
-
sx: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
size: "small",
|
|
18
|
+
label: /* @__PURE__ */ jsx(Box, { sx: { display: "flex" }, children: /* @__PURE__ */ jsx(
|
|
19
|
+
OverflowableText,
|
|
20
|
+
{
|
|
21
|
+
text: label,
|
|
22
|
+
sx: {
|
|
23
|
+
maxWidth: "20ch",
|
|
24
|
+
marginX: "auto"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
) }),
|
|
28
|
+
...otherProps
|
|
17
29
|
}
|
|
18
|
-
)
|
|
19
|
-
...otherProps
|
|
30
|
+
)
|
|
20
31
|
}
|
|
21
|
-
)
|
|
32
|
+
);
|
|
22
33
|
}
|
|
23
34
|
export {
|
|
24
35
|
OverflowableChip
|
|
@@ -13,11 +13,16 @@ function OverflowableChipWithHelperText({
|
|
|
13
13
|
return /* @__PURE__ */ jsxs(
|
|
14
14
|
Box,
|
|
15
15
|
{
|
|
16
|
-
display: "flex",
|
|
17
|
-
alignItems: "left",
|
|
18
|
-
flexDirection: "column",
|
|
19
|
-
sx: mergeSx({ cursor: "default" }, boxSx),
|
|
20
16
|
onClick: (e) => e.stopPropagation(),
|
|
17
|
+
sx: mergeSx(
|
|
18
|
+
{
|
|
19
|
+
display: "flex",
|
|
20
|
+
alignItems: "left",
|
|
21
|
+
flexDirection: "column"
|
|
22
|
+
},
|
|
23
|
+
{ cursor: "default" },
|
|
24
|
+
boxSx
|
|
25
|
+
),
|
|
21
26
|
children: [
|
|
22
27
|
/* @__PURE__ */ jsx(OverflowableChip, { boxSx: { paddingBottom: "2px" }, ...otherProps }),
|
|
23
28
|
helperText && /* @__PURE__ */ jsx(FormHelperText, { sx: { fontSize: "x-small", margin: 0, marginLeft: 2 }, children: helperText })
|
|
@@ -70,7 +70,7 @@ function AutocompleteInput({
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
options,
|
|
73
|
-
renderInput: (
|
|
73
|
+
renderInput: (params) => /* @__PURE__ */ jsx(
|
|
74
74
|
TextField,
|
|
75
75
|
{
|
|
76
76
|
...label && {
|
|
@@ -80,9 +80,6 @@ function AutocompleteInput({
|
|
|
80
80
|
})
|
|
81
81
|
},
|
|
82
82
|
inputRef: ref,
|
|
83
|
-
slotProps: {
|
|
84
|
-
htmlInput: { ...inputProps, readOnly }
|
|
85
|
-
},
|
|
86
83
|
helperText: previousValue && /* @__PURE__ */ jsx(
|
|
87
84
|
HelperPreviousValue,
|
|
88
85
|
{
|
|
@@ -93,7 +90,16 @@ function AutocompleteInput({
|
|
|
93
90
|
),
|
|
94
91
|
...genHelperError(error?.message),
|
|
95
92
|
...formProps,
|
|
96
|
-
...
|
|
93
|
+
...params,
|
|
94
|
+
slotProps: {
|
|
95
|
+
...formProps?.slotProps,
|
|
96
|
+
...params.slotProps,
|
|
97
|
+
htmlInput: {
|
|
98
|
+
...formProps?.slotProps?.htmlInput,
|
|
99
|
+
...params.slotProps.htmlInput,
|
|
100
|
+
readOnly
|
|
101
|
+
}
|
|
102
|
+
}
|
|
97
103
|
}
|
|
98
104
|
),
|
|
99
105
|
...props
|
|
@@ -44,8 +44,8 @@ function DirectoryItemInput({ name, types, ...props }) {
|
|
|
44
44
|
return lastSeparatorIndex === -1 ? [path, ""] : [path.slice(0, lastSeparatorIndex), path.slice(lastSeparatorIndex)];
|
|
45
45
|
}, [path]);
|
|
46
46
|
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
47
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [
|
|
48
|
-
/* @__PURE__ */ jsxs(Grid, { container: true, alignItems: "center",
|
|
47
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", sx: { alignItems: "center", justifyContent: "space-between" }, children: [
|
|
48
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, sx: { alignItems: "center", flex: 1, minWidth: 0 }, children: [
|
|
49
49
|
/* @__PURE__ */ jsx(
|
|
50
50
|
Grid,
|
|
51
51
|
{
|
|
@@ -83,7 +83,16 @@ function DirectoryItemInput({ name, types, ...props }) {
|
|
|
83
83
|
] }) : /* @__PURE__ */ jsx(Typography, { variant: "body2", noWrap: true, children: /* @__PURE__ */ jsx(FormattedMessage, { id: getAbsenceLabelKeyFromType(types?.[0]) }) })
|
|
84
84
|
}
|
|
85
85
|
) }),
|
|
86
|
-
/* @__PURE__ */ jsx(
|
|
86
|
+
/* @__PURE__ */ jsx(
|
|
87
|
+
Grid,
|
|
88
|
+
{
|
|
89
|
+
sx: {
|
|
90
|
+
paddingTop: 1,
|
|
91
|
+
paddingLeft: 1
|
|
92
|
+
},
|
|
93
|
+
children: error?.message && /* @__PURE__ */ jsx(FormHelperText, { error: true, children: intl.formatMessage({ id: error.message }) })
|
|
94
|
+
}
|
|
95
|
+
)
|
|
87
96
|
] }),
|
|
88
97
|
/* @__PURE__ */ jsx(
|
|
89
98
|
Button,
|
|
@@ -95,6 +104,7 @@ function DirectoryItemInput({ name, types, ...props }) {
|
|
|
95
104
|
textTransform: "none",
|
|
96
105
|
whiteSpace: "nowrap"
|
|
97
106
|
},
|
|
107
|
+
size: "small",
|
|
98
108
|
children: /* @__PURE__ */ jsx(FormattedMessage, { id: path ? "edit" : "Select" })
|
|
99
109
|
}
|
|
100
110
|
)
|
|
@@ -20,10 +20,12 @@ function DeletableRow({
|
|
|
20
20
|
container: true,
|
|
21
21
|
spacing: 2,
|
|
22
22
|
size: 12,
|
|
23
|
-
alignItems,
|
|
24
23
|
onMouseEnter: () => setIsMouseHover(true),
|
|
25
24
|
onMouseLeave: () => setIsMouseHover(false),
|
|
26
25
|
"data-testid": dataTestId,
|
|
26
|
+
sx: {
|
|
27
|
+
alignItems
|
|
28
|
+
},
|
|
27
29
|
children: [
|
|
28
30
|
children,
|
|
29
31
|
/* @__PURE__ */ jsx(Grid, { size: 1, children: isMouseHover && !disabledDeletion && /* @__PURE__ */ jsx(
|