@gridsuite/commons-ui 0.58.0 → 0.59.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/chunks/{criteria-based-filter-edition-dialog.CbhgOSRk.js → criteria-based-filter-edition-dialog.p2pUWzxc.js} +20 -65
- package/dist/components/AuthenticationRouter/AuthenticationRouter.d.ts +28 -9
- package/dist/components/AuthenticationRouter/AuthenticationRouter.js +1 -1
- package/dist/components/AuthenticationRouter/index.d.ts +6 -0
- package/dist/components/CardErrorBoundary/card-error-boundary.d.ts +27 -13
- package/dist/components/CardErrorBoundary/card-error-boundary.js +7 -6
- package/dist/components/CardErrorBoundary/index.d.ts +6 -0
- package/dist/components/DirectoryItemSelector/directory-item-selector.d.ts +0 -4
- package/dist/components/DirectoryItemSelector/directory-item-selector.js +13 -26
- package/dist/components/ElementSearchDialog/equipment-item.d.ts +25 -16
- package/dist/components/ElementSearchDialog/equipment-item.js +5 -5
- package/dist/components/ElementSearchDialog/index.d.ts +6 -0
- package/dist/components/ElementSearchDialog/tag-renderer.d.ts +20 -10
- package/dist/components/ElementSearchDialog/tag-renderer.js +6 -11
- package/dist/components/FlatParameters/FlatParameters.d.ts +29 -9
- package/dist/components/FlatParameters/FlatParameters.js +3 -3
- package/dist/components/FlatParameters/index.d.ts +6 -0
- package/dist/components/Login/Login.d.ts +11 -4
- package/dist/components/Login/Logout.d.ts +11 -4
- package/dist/components/Login/index.d.ts +6 -0
- package/dist/components/MuiVirtualizedTable/ColumnHeader.d.ts +25 -2
- package/dist/components/MuiVirtualizedTable/ColumnHeader.js +68 -59
- package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.d.ts +72 -61
- package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js +69 -83
- package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.d.ts +93 -113
- package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.js +84 -106
- package/dist/components/MuiVirtualizedTable/index.d.ts +7 -1
- package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.d.ts +16 -9
- package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.js +1 -1
- package/dist/components/MultipleSelectionDialog/index.d.ts +6 -0
- package/dist/components/OverflowableText/index.d.ts +6 -0
- package/dist/components/OverflowableText/overflowable-text.d.ts +11 -1
- package/dist/components/OverflowableText/overflowable-text.js +1 -18
- package/dist/components/ReportViewer/filter-button.d.ts +11 -1
- package/dist/components/ReportViewer/filter-button.js +5 -2
- package/dist/components/ReportViewer/index.d.ts +6 -0
- package/dist/components/ReportViewer/log-report-item.d.ts +14 -64
- package/dist/components/ReportViewer/log-report-item.js +13 -47
- package/dist/components/ReportViewer/log-report.d.ts +16 -17
- package/dist/components/ReportViewer/log-report.js +2 -1
- package/dist/components/ReportViewer/log-severity.d.ts +13 -0
- package/dist/components/ReportViewer/log-severity.js +35 -0
- package/dist/components/ReportViewer/log-table.d.ts +9 -6
- package/dist/components/ReportViewer/log-table.js +6 -4
- package/dist/components/ReportViewer/multi-select-list.d.ts +17 -1
- package/dist/components/ReportViewer/report-item.d.ts +12 -12
- package/dist/components/ReportViewer/report-item.js +0 -7
- package/dist/components/ReportViewer/report-tree-view-context.d.ts +11 -1
- package/dist/components/ReportViewer/report-viewer.d.ts +7 -4
- package/dist/components/ReportViewer/report-viewer.js +8 -6
- package/dist/components/ReportViewer/report.type.d.ts +22 -0
- package/dist/components/ReportViewer/report.type.js +1 -0
- package/dist/components/ReportViewerDialog/index.d.ts +6 -0
- package/dist/components/ReportViewerDialog/report-viewer-dialog.d.ts +9 -1
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.d.ts +7 -4
- package/dist/components/SignInCallbackHandler/SignInCallbackHandler.js +4 -1
- package/dist/components/SignInCallbackHandler/index.d.ts +6 -0
- package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.d.ts +7 -4
- package/dist/components/SilentRenewCallbackHandler/index.d.ts +6 -0
- package/dist/components/SnackbarProvider/SnackbarProvider.d.ts +3 -1
- package/dist/components/SnackbarProvider/SnackbarProvider.js +9 -7
- package/dist/components/SnackbarProvider/index.d.ts +6 -0
- package/dist/components/TopBar/AboutDialog.d.ts +30 -23
- package/dist/components/TopBar/AboutDialog.js +4 -22
- package/dist/components/TopBar/GridLogo.d.ts +13 -32
- package/dist/components/TopBar/GridLogo.js +12 -15
- package/dist/components/TopBar/TopBar.d.ts +52 -51
- package/dist/components/TopBar/TopBar.js +389 -380
- package/dist/components/TopBar/TopBar.test.d.ts +6 -0
- package/dist/components/TopBar/index.d.ts +6 -0
- package/dist/components/dialogs/modify-element-selection.d.ts +1 -1
- package/dist/components/dialogs/modify-element-selection.js +5 -14
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.d.ts +1 -1
- package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.js +1 -1
- package/dist/components/filter/criteria-based/filter-free-properties.d.ts +1 -1
- package/dist/components/filter/criteria-based/filter-property.d.ts +1 -1
- package/dist/components/filter/expert/expert-filter-constants.d.ts +22 -1
- package/dist/components/filter/expert/expert-filter-constants.js +39 -10
- package/dist/components/filter/expert/expert-filter-edition-dialog.d.ts +0 -6
- package/dist/components/filter/expert/expert-filter-edition-dialog.js +1 -2
- package/dist/components/filter/expert/expert-filter-form.js +1 -1
- package/dist/components/filter/expert/expert-filter.type.d.ts +4 -1
- package/dist/components/filter/expert/expert-filter.type.js +3 -0
- package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +1 -1
- package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +1 -1
- package/dist/components/filter/filter-creation-dialog.d.ts +0 -7
- package/dist/components/filter/filter-creation-dialog.js +1 -2
- package/dist/components/filter/filter-form.js +1 -1
- package/dist/components/filter/utils/filter-form-utils.js +11 -18
- package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.js +1 -1
- package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.js +5 -13
- package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.js +1 -1
- package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/booleans/boolean-input.d.ts +9 -15
- package/dist/components/inputs/react-hook-form/booleans/boolean-input.js +0 -7
- package/dist/components/inputs/react-hook-form/booleans/checkbox-input.d.ts +8 -13
- package/dist/components/inputs/react-hook-form/booleans/checkbox-input.js +0 -6
- package/dist/components/inputs/react-hook-form/booleans/switch-input.d.ts +8 -13
- package/dist/components/inputs/react-hook-form/booleans/switch-input.js +0 -6
- package/dist/components/inputs/react-hook-form/directory-items-input.d.ts +0 -2
- package/dist/components/inputs/react-hook-form/directory-items-input.js +10 -14
- package/dist/components/inputs/react-hook-form/error-management/mid-form-error.d.ts +5 -3
- package/dist/components/inputs/react-hook-form/numbers/integer-input.d.ts +3 -20
- package/dist/components/inputs/react-hook-form/numbers/integer-input.js +1 -4
- package/dist/components/inputs/react-hook-form/range-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/select-inputs/countries-input.js +12 -1
- package/dist/components/inputs/react-hook-form/select-inputs/select-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/slider-input.d.ts +7 -20
- package/dist/components/inputs/react-hook-form/slider-input.js +4 -12
- package/dist/components/inputs/react-hook-form/text-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/unique-name-input.d.ts +1 -1
- package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.d.ts +1 -1
- package/dist/components/inputs/react-query-builder/custom-react-query-builder.js +1 -1
- package/dist/components/inputs/react-query-builder/element-value-editor.js +7 -14
- package/dist/components/inputs/react-query-builder/remove-button.js +1 -1
- package/dist/components/inputs/react-query-builder/value-editor.js +1 -1
- package/dist/components/translations/card-error-boundary-en.d.ts +1 -1
- package/dist/components/translations/card-error-boundary-fr.d.ts +1 -1
- package/dist/components/translations/common-button-en.d.ts +10 -4
- package/dist/components/translations/common-button-fr.d.ts +10 -4
- package/dist/components/translations/directory-items-input-en.d.ts +1 -1
- package/dist/components/translations/directory-items-input-fr.d.ts +1 -1
- package/dist/components/translations/element-search-en.d.ts +1 -1
- package/dist/components/translations/element-search-fr.d.ts +1 -1
- package/dist/components/translations/equipment-search-en.d.ts +1 -1
- package/dist/components/translations/equipment-search-fr.d.ts +1 -1
- package/dist/components/translations/filter-en.d.ts +27 -21
- package/dist/components/translations/filter-en.js +2 -1
- package/dist/components/translations/filter-expert-en.d.ts +73 -0
- package/dist/components/translations/filter-expert-en.js +69 -0
- package/dist/components/translations/filter-expert-fr.d.ts +73 -0
- package/dist/components/translations/filter-expert-fr.js +69 -0
- package/dist/components/translations/filter-fr.d.ts +27 -21
- package/dist/components/translations/filter-fr.js +2 -1
- package/dist/components/translations/flat-parameters-en.d.ts +1 -1
- package/dist/components/translations/flat-parameters-fr.d.ts +1 -1
- package/dist/components/translations/inputs-en.d.ts +1 -1
- package/dist/components/translations/inputs-fr.d.ts +1 -1
- package/dist/components/translations/login-en.d.ts +1 -1
- package/dist/components/translations/login-fr.d.ts +1 -1
- package/dist/components/translations/multiple-selection-dialog-en.d.ts +1 -1
- package/dist/components/translations/multiple-selection-dialog-fr.d.ts +1 -1
- package/dist/components/translations/report-viewer-en.d.ts +1 -1
- package/dist/components/translations/report-viewer-fr.d.ts +1 -1
- package/dist/components/translations/table-en.d.ts +1 -1
- package/dist/components/translations/table-fr.d.ts +1 -1
- package/dist/components/translations/top-bar-en.d.ts +1 -1
- package/dist/components/translations/top-bar-fr.d.ts +1 -1
- package/dist/components/translations/treeview-finder-en.d.ts +1 -1
- package/dist/components/translations/treeview-finder-fr.d.ts +1 -1
- package/dist/hooks/localized-countries-hook.d.ts +10 -4
- package/dist/hooks/localized-countries-hook.js +1 -1
- package/dist/hooks/predefined-properties-hook.d.ts +1 -15
- package/dist/hooks/predefined-properties-hook.js +8 -16
- package/dist/index.d.ts +63 -217
- package/dist/index.js +102 -77
- package/dist/redux/actions.d.ts +33 -29
- package/dist/services/apps-metadata.d.ts +32 -0
- package/dist/services/apps-metadata.js +26 -0
- package/dist/services/directory.d.ts +6 -0
- package/dist/services/directory.js +42 -0
- package/dist/services/explore.d.ts +2 -0
- package/dist/services/explore.js +29 -1
- package/dist/services/index.d.ts +16 -0
- package/dist/services/index.js +20 -0
- package/dist/services/utils.d.ts +1 -0
- package/dist/services/utils.js +5 -1
- package/dist/utils/AuthService.d.ts +20 -9
- package/dist/utils/AuthService.js +29 -13
- package/dist/utils/ElementIcon.d.ts +4 -1
- package/dist/utils/UserManagerMock.d.ts +14 -14
- package/dist/utils/UserManagerMock.js +9 -15
- package/dist/utils/algos.d.ts +1 -1
- package/dist/utils/equipment-types-for-predefined-properties-mapper.d.ts +1 -1
- package/dist/utils/functions.d.ts +0 -1
- package/dist/utils/functions.js +1 -3
- package/dist/utils/styles.d.ts +5 -3
- package/dist/utils/styles.js +4 -1
- package/dist/utils/types.d.ts +13 -3
- package/package.json +2 -1
- package/dist/components/filter/filter-context.d.ts +0 -13
- package/dist/components/filter/filter-context.js +0 -11
|
@@ -130,7 +130,9 @@ const TopBar = ({
|
|
|
130
130
|
language
|
|
131
131
|
}) => {
|
|
132
132
|
const [anchorElSettingsMenu, setAnchorElSettingsMenu] = useState(null);
|
|
133
|
-
const [anchorElAppsMenu, setAnchorElAppsMenu] = useState(
|
|
133
|
+
const [anchorElAppsMenu, setAnchorElAppsMenu] = useState(
|
|
134
|
+
null
|
|
135
|
+
);
|
|
134
136
|
const handleToggleSettingsMenu = (event) => {
|
|
135
137
|
setAnchorElSettingsMenu(event.currentTarget);
|
|
136
138
|
};
|
|
@@ -157,17 +159,17 @@ const TopBar = ({
|
|
|
157
159
|
return tab[0] + tab[tab.length - 1];
|
|
158
160
|
}
|
|
159
161
|
};
|
|
160
|
-
const changeTheme = (
|
|
162
|
+
const changeTheme = (_, value) => {
|
|
161
163
|
if (onThemeClick && value !== null) {
|
|
162
164
|
onThemeClick(value);
|
|
163
165
|
}
|
|
164
166
|
};
|
|
165
|
-
const changeEquipmentLabelling = (
|
|
167
|
+
const changeEquipmentLabelling = (_, value) => {
|
|
166
168
|
if (onEquipmentLabellingClick && value !== null) {
|
|
167
169
|
onEquipmentLabellingClick(value);
|
|
168
170
|
}
|
|
169
171
|
};
|
|
170
|
-
const changeLanguage = (
|
|
172
|
+
const changeLanguage = (_, value) => {
|
|
171
173
|
if (onLanguageClick && value !== null) {
|
|
172
174
|
onLanguageClick(value);
|
|
173
175
|
}
|
|
@@ -193,401 +195,408 @@ const TopBar = ({
|
|
|
193
195
|
),
|
|
194
196
|
[onLogoClick, appLogo, appName, appColor]
|
|
195
197
|
);
|
|
196
|
-
return
|
|
197
|
-
|
|
198
|
-
/* @__PURE__ */ jsx(
|
|
199
|
-
|
|
200
|
-
/* @__PURE__ */ jsx(
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
{
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
target: "_blank",
|
|
226
|
-
rel: "noopener noreferrer",
|
|
227
|
-
children: /* @__PURE__ */ jsx(
|
|
228
|
-
StyledMenuItem,
|
|
198
|
+
return (
|
|
199
|
+
//@ts-ignore appBar style is not defined
|
|
200
|
+
/* @__PURE__ */ jsx(AppBar, { position: "static", color: "default", sx: styles.appBar, children: /* @__PURE__ */ jsxs(Toolbar, { children: [
|
|
201
|
+
logo_clickable,
|
|
202
|
+
/* @__PURE__ */ jsx(Box, { sx: styles.grow, children }),
|
|
203
|
+
user && /* @__PURE__ */ jsxs(Box, { children: [
|
|
204
|
+
/* @__PURE__ */ jsx(
|
|
205
|
+
IconButton,
|
|
206
|
+
{
|
|
207
|
+
"aria-label": "apps",
|
|
208
|
+
"aria-controls": "apps-menu",
|
|
209
|
+
"aria-haspopup": "true",
|
|
210
|
+
onClick: handleClickAppsMenu,
|
|
211
|
+
color: "inherit",
|
|
212
|
+
children: /* @__PURE__ */ jsx(Apps, {})
|
|
213
|
+
}
|
|
214
|
+
),
|
|
215
|
+
/* @__PURE__ */ jsx(
|
|
216
|
+
StyledMenu,
|
|
217
|
+
{
|
|
218
|
+
id: "apps-menu",
|
|
219
|
+
anchorEl: anchorElAppsMenu,
|
|
220
|
+
keepMounted: true,
|
|
221
|
+
open: Boolean(anchorElAppsMenu),
|
|
222
|
+
onClose: handleCloseAppsMenu,
|
|
223
|
+
children: appsAndUrls && appsAndUrls.filter((item) => !item.hiddenInAppsMenu).map((item) => {
|
|
224
|
+
var _a;
|
|
225
|
+
return /* @__PURE__ */ jsx(
|
|
226
|
+
Box,
|
|
229
227
|
{
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
228
|
+
component: "a",
|
|
229
|
+
href: (_a = item.url) == null ? void 0 : _a.toString(),
|
|
230
|
+
sx: styles.link,
|
|
231
|
+
target: "_blank",
|
|
232
|
+
rel: "noopener noreferrer",
|
|
233
|
+
children: /* @__PURE__ */ jsx(
|
|
234
|
+
StyledMenuItem,
|
|
235
|
+
{
|
|
236
|
+
onClick: handleCloseAppsMenu,
|
|
237
|
+
children: /* @__PURE__ */ jsxs(ListItemText, { children: [
|
|
238
|
+
/* @__PURE__ */ jsx(
|
|
239
|
+
"span",
|
|
240
|
+
{
|
|
241
|
+
style: {
|
|
242
|
+
fontWeight: "bold"
|
|
243
|
+
},
|
|
244
|
+
children: "Grid"
|
|
245
|
+
}
|
|
246
|
+
),
|
|
247
|
+
/* @__PURE__ */ jsx(
|
|
248
|
+
"span",
|
|
249
|
+
{
|
|
250
|
+
style: {
|
|
251
|
+
color: item.appColor === void 0 ? "grey" : item.appColor,
|
|
252
|
+
fontWeight: "bold"
|
|
253
|
+
},
|
|
254
|
+
children: item.name
|
|
255
|
+
}
|
|
256
|
+
)
|
|
257
|
+
] })
|
|
258
|
+
}
|
|
259
|
+
)
|
|
260
|
+
},
|
|
261
|
+
item.name
|
|
262
|
+
);
|
|
263
|
+
})
|
|
264
|
+
}
|
|
265
|
+
)
|
|
266
|
+
] }),
|
|
267
|
+
user && /* @__PURE__ */ jsxs(Box, { sx: styles.menuContainer, children: [
|
|
268
|
+
/* @__PURE__ */ jsxs(
|
|
269
|
+
Button,
|
|
270
|
+
{
|
|
271
|
+
"aria-controls": "settings-menu",
|
|
272
|
+
"aria-haspopup": "true",
|
|
273
|
+
sx: styles.showHideMenu,
|
|
274
|
+
onClick: handleToggleSettingsMenu,
|
|
275
|
+
color: "inherit",
|
|
276
|
+
style: Boolean(anchorElSettingsMenu) ? { cursor: "initial" } : { cursor: "pointer" },
|
|
277
|
+
children: [
|
|
278
|
+
/* @__PURE__ */ jsx(Box, { component: "span", sx: styles.name, children: user !== null ? abbreviationFromUserName(
|
|
279
|
+
//@ts-ignore name could be undefined, how to handle this case ?
|
|
280
|
+
user.profile.name
|
|
281
|
+
) : "" }),
|
|
282
|
+
anchorElSettingsMenu ? /* @__PURE__ */ jsx(ArrowDropUp, { sx: styles.arrowIcon }) : /* @__PURE__ */ jsx(ArrowDropDown, { sx: styles.arrowIcon })
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
),
|
|
286
|
+
/* @__PURE__ */ jsx(
|
|
287
|
+
Popper,
|
|
288
|
+
{
|
|
289
|
+
sx: styles.settingsMenu,
|
|
290
|
+
open: Boolean(anchorElSettingsMenu),
|
|
291
|
+
anchorEl: anchorElSettingsMenu,
|
|
292
|
+
children: /* @__PURE__ */ jsx(Paper, { children: /* @__PURE__ */ jsx(
|
|
293
|
+
ClickAwayListener,
|
|
294
|
+
{
|
|
295
|
+
onClickAway: handleCloseSettingsMenu,
|
|
296
|
+
children: /* @__PURE__ */ jsxs(MenuList, { id: "settings-menu", children: [
|
|
297
|
+
/* @__PURE__ */ jsxs(
|
|
298
|
+
StyledMenuItem,
|
|
299
|
+
{
|
|
300
|
+
sx: styles.borderBottom,
|
|
301
|
+
disabled: true,
|
|
302
|
+
style: { opacity: "1" },
|
|
303
|
+
children: [
|
|
304
|
+
/* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(Person, { fontSize: "small" }) }),
|
|
305
|
+
/* @__PURE__ */ jsx(ListItemText, { children: user !== null && /* @__PURE__ */ jsxs(
|
|
306
|
+
Box,
|
|
307
|
+
{
|
|
308
|
+
component: "span",
|
|
309
|
+
sx: styles.sizeLabel,
|
|
310
|
+
children: [
|
|
311
|
+
user.profile.name,
|
|
312
|
+
" ",
|
|
313
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
314
|
+
/* @__PURE__ */ jsx(
|
|
315
|
+
Box,
|
|
316
|
+
{
|
|
317
|
+
component: "span",
|
|
318
|
+
sx: styles.userMail,
|
|
319
|
+
children: user.profile.email
|
|
320
|
+
}
|
|
321
|
+
)
|
|
322
|
+
]
|
|
323
|
+
}
|
|
324
|
+
) })
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
),
|
|
328
|
+
/* @__PURE__ */ jsxs(
|
|
329
|
+
StyledMenuItem,
|
|
330
|
+
{
|
|
331
|
+
disabled: true,
|
|
332
|
+
style: {
|
|
333
|
+
opacity: "1",
|
|
334
|
+
paddingTop: "10px",
|
|
335
|
+
paddingBottom: "10px",
|
|
336
|
+
backgroundColor: "transparent"
|
|
337
|
+
},
|
|
338
|
+
children: [
|
|
339
|
+
/* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
|
|
340
|
+
Typography,
|
|
341
|
+
{
|
|
342
|
+
sx: styles.sizeLabel,
|
|
343
|
+
children: /* @__PURE__ */ jsx(
|
|
344
|
+
FormattedMessage,
|
|
308
345
|
{
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
children: user.profile.email
|
|
346
|
+
id: "top-bar/displayMode",
|
|
347
|
+
defaultMessage: "Display mode"
|
|
312
348
|
}
|
|
313
349
|
)
|
|
314
|
-
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
350
|
+
}
|
|
351
|
+
) }),
|
|
352
|
+
/* @__PURE__ */ jsxs(
|
|
353
|
+
ToggleButtonGroup,
|
|
354
|
+
{
|
|
355
|
+
exclusive: true,
|
|
356
|
+
value: theme,
|
|
357
|
+
size: "large",
|
|
358
|
+
sx: styles.toggleButtonGroup,
|
|
359
|
+
onChange: changeTheme,
|
|
360
|
+
children: [
|
|
361
|
+
/* @__PURE__ */ jsx(
|
|
362
|
+
ToggleButton,
|
|
363
|
+
{
|
|
364
|
+
value: LIGHT_THEME,
|
|
365
|
+
"aria-label": LIGHT_THEME,
|
|
366
|
+
sx: styles.toggleButton,
|
|
367
|
+
children: /* @__PURE__ */ jsx(WbSunny, { fontSize: "small" })
|
|
368
|
+
}
|
|
369
|
+
),
|
|
370
|
+
/* @__PURE__ */ jsx(
|
|
371
|
+
ToggleButton,
|
|
372
|
+
{
|
|
373
|
+
value: DARK_THEME,
|
|
374
|
+
"aria-label": DARK_THEME,
|
|
375
|
+
sx: styles.toggleButton,
|
|
376
|
+
children: /* @__PURE__ */ jsx(Brightness3, { fontSize: "small" })
|
|
377
|
+
}
|
|
378
|
+
)
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
)
|
|
382
|
+
]
|
|
383
|
+
}
|
|
384
|
+
),
|
|
385
|
+
onEquipmentLabellingClick && /* @__PURE__ */ jsxs(
|
|
386
|
+
StyledMenuItem,
|
|
387
|
+
{
|
|
388
|
+
disabled: true,
|
|
389
|
+
style: {
|
|
390
|
+
opacity: "1",
|
|
391
|
+
// padding: '0',
|
|
392
|
+
paddingTop: "10px",
|
|
393
|
+
paddingBottom: "10px",
|
|
394
|
+
backgroundColor: "transparent"
|
|
395
|
+
},
|
|
396
|
+
children: [
|
|
397
|
+
/* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
|
|
398
|
+
Typography,
|
|
399
|
+
{
|
|
400
|
+
sx: styles.sizeLabel,
|
|
401
|
+
children: /* @__PURE__ */ jsx(
|
|
402
|
+
FormattedMessage,
|
|
364
403
|
{
|
|
365
|
-
|
|
366
|
-
"
|
|
367
|
-
sx: styles.toggleButton,
|
|
368
|
-
children: /* @__PURE__ */ jsx(Brightness3, { fontSize: "small" })
|
|
404
|
+
id: "top-bar/equipmentLabel",
|
|
405
|
+
defaultMessage: "Equipment label"
|
|
369
406
|
}
|
|
370
407
|
)
|
|
371
|
-
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
408
|
+
}
|
|
409
|
+
) }),
|
|
410
|
+
/* @__PURE__ */ jsxs(
|
|
411
|
+
ToggleButtonGroup,
|
|
412
|
+
{
|
|
413
|
+
exclusive: true,
|
|
414
|
+
value: equipmentLabelling,
|
|
415
|
+
sx: styles.toggleButtonGroup,
|
|
416
|
+
onChange: changeEquipmentLabelling,
|
|
417
|
+
children: [
|
|
418
|
+
/* @__PURE__ */ jsx(
|
|
419
|
+
ToggleButton,
|
|
420
|
+
{
|
|
421
|
+
value: false,
|
|
422
|
+
sx: styles.toggleButton,
|
|
423
|
+
children: /* @__PURE__ */ jsx(
|
|
424
|
+
FormattedMessage,
|
|
425
|
+
{
|
|
426
|
+
id: "top-bar/id",
|
|
427
|
+
defaultMessage: "Id"
|
|
428
|
+
}
|
|
429
|
+
)
|
|
430
|
+
}
|
|
431
|
+
),
|
|
432
|
+
/* @__PURE__ */ jsx(
|
|
433
|
+
ToggleButton,
|
|
434
|
+
{
|
|
435
|
+
value: true,
|
|
436
|
+
sx: styles.toggleButton,
|
|
437
|
+
children: /* @__PURE__ */ jsx(
|
|
438
|
+
FormattedMessage,
|
|
439
|
+
{
|
|
440
|
+
id: "top-bar/name",
|
|
441
|
+
defaultMessage: "Name"
|
|
442
|
+
}
|
|
443
|
+
)
|
|
444
|
+
}
|
|
445
|
+
)
|
|
446
|
+
]
|
|
447
|
+
}
|
|
448
|
+
)
|
|
449
|
+
]
|
|
450
|
+
}
|
|
451
|
+
),
|
|
452
|
+
/* @__PURE__ */ jsxs(
|
|
453
|
+
StyledMenuItem,
|
|
454
|
+
{
|
|
455
|
+
disabled: true,
|
|
456
|
+
style: {
|
|
457
|
+
opacity: "1",
|
|
458
|
+
paddingTop: "10px",
|
|
459
|
+
paddingBottom: "10px",
|
|
460
|
+
backgroundColor: "transparent"
|
|
461
|
+
},
|
|
462
|
+
children: [
|
|
463
|
+
/* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
|
|
464
|
+
Typography,
|
|
465
|
+
{
|
|
466
|
+
sx: styles.sizeLabel,
|
|
467
|
+
children: /* @__PURE__ */ jsx(
|
|
468
|
+
FormattedMessage,
|
|
426
469
|
{
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
children: /* @__PURE__ */ jsx(
|
|
430
|
-
FormattedMessage,
|
|
431
|
-
{
|
|
432
|
-
id: "top-bar/name",
|
|
433
|
-
defaultMessage: "Name"
|
|
434
|
-
}
|
|
435
|
-
)
|
|
470
|
+
id: "top-bar/language",
|
|
471
|
+
defaultMessage: "Language"
|
|
436
472
|
}
|
|
437
473
|
)
|
|
438
|
-
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
474
|
+
}
|
|
475
|
+
) }),
|
|
476
|
+
/* @__PURE__ */ jsxs(
|
|
477
|
+
ToggleButtonGroup,
|
|
478
|
+
{
|
|
479
|
+
exclusive: true,
|
|
480
|
+
value: language,
|
|
481
|
+
sx: styles.toggleButtonGroup,
|
|
482
|
+
onChange: changeLanguage,
|
|
483
|
+
children: [
|
|
484
|
+
/* @__PURE__ */ jsx(
|
|
485
|
+
ToggleButton,
|
|
486
|
+
{
|
|
487
|
+
value: LANG_SYSTEM,
|
|
488
|
+
"aria-label": LANG_SYSTEM,
|
|
489
|
+
sx: styles.languageToggleButton,
|
|
490
|
+
children: /* @__PURE__ */ jsx(Computer, {})
|
|
491
|
+
}
|
|
492
|
+
),
|
|
493
|
+
/* @__PURE__ */ jsx(
|
|
494
|
+
ToggleButton,
|
|
495
|
+
{
|
|
496
|
+
value: LANG_ENGLISH,
|
|
497
|
+
"aria-label": LANG_ENGLISH,
|
|
498
|
+
sx: styles.languageToggleButton,
|
|
499
|
+
children: EN
|
|
500
|
+
}
|
|
501
|
+
),
|
|
502
|
+
/* @__PURE__ */ jsx(
|
|
503
|
+
ToggleButton,
|
|
504
|
+
{
|
|
505
|
+
value: LANG_FRENCH,
|
|
506
|
+
"aria-label": LANG_FRENCH,
|
|
507
|
+
sx: styles.toggleButton,
|
|
508
|
+
children: FR
|
|
509
|
+
}
|
|
510
|
+
)
|
|
511
|
+
]
|
|
512
|
+
}
|
|
513
|
+
)
|
|
514
|
+
]
|
|
515
|
+
}
|
|
516
|
+
),
|
|
517
|
+
onParametersClick && /* @__PURE__ */ jsxs(
|
|
518
|
+
StyledMenuItem,
|
|
519
|
+
{
|
|
520
|
+
onClick: onParametersClicked,
|
|
521
|
+
sx: styles.borderTop,
|
|
522
|
+
children: [
|
|
523
|
+
/* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(Settings, { fontSize: "small" }) }),
|
|
524
|
+
/* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
|
|
525
|
+
Typography,
|
|
526
|
+
{
|
|
527
|
+
sx: styles.sizeLabel,
|
|
528
|
+
children: /* @__PURE__ */ jsx(
|
|
529
|
+
FormattedMessage,
|
|
487
530
|
{
|
|
488
|
-
|
|
489
|
-
"
|
|
490
|
-
sx: styles.languageToggleButton,
|
|
491
|
-
children: EN
|
|
531
|
+
id: "top-bar/settings",
|
|
532
|
+
defaultMessage: "Settings"
|
|
492
533
|
}
|
|
493
|
-
)
|
|
494
|
-
|
|
495
|
-
|
|
534
|
+
)
|
|
535
|
+
}
|
|
536
|
+
) })
|
|
537
|
+
]
|
|
538
|
+
}
|
|
539
|
+
),
|
|
540
|
+
/* @__PURE__ */ jsxs(
|
|
541
|
+
StyledMenuItem,
|
|
542
|
+
{
|
|
543
|
+
sx: styles.borderBottom,
|
|
544
|
+
style: { opacity: "1" },
|
|
545
|
+
onClick: onAboutClicked,
|
|
546
|
+
children: [
|
|
547
|
+
/* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(HelpOutline, { fontSize: "small" }) }),
|
|
548
|
+
/* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
|
|
549
|
+
Typography,
|
|
550
|
+
{
|
|
551
|
+
sx: styles.sizeLabel,
|
|
552
|
+
children: /* @__PURE__ */ jsx(
|
|
553
|
+
FormattedMessage,
|
|
496
554
|
{
|
|
497
|
-
|
|
498
|
-
"
|
|
499
|
-
sx: styles.toggleButton,
|
|
500
|
-
children: FR
|
|
555
|
+
id: "top-bar/about",
|
|
556
|
+
defaultMessage: "About"
|
|
501
557
|
}
|
|
502
558
|
)
|
|
503
|
-
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
]
|
|
507
|
-
}
|
|
508
|
-
),
|
|
509
|
-
onParametersClick && /* @__PURE__ */ jsxs(
|
|
510
|
-
StyledMenuItem,
|
|
511
|
-
{
|
|
512
|
-
onClick: onParametersClicked,
|
|
513
|
-
sx: styles.borderTop,
|
|
514
|
-
children: [
|
|
515
|
-
/* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(Settings, { fontSize: "small" }) }),
|
|
516
|
-
/* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
|
|
517
|
-
Typography,
|
|
518
|
-
{
|
|
519
|
-
sx: styles.sizeLabel,
|
|
520
|
-
children: /* @__PURE__ */ jsx(
|
|
521
|
-
FormattedMessage,
|
|
522
|
-
{
|
|
523
|
-
id: "top-bar/settings",
|
|
524
|
-
defaultMessage: "Settings"
|
|
525
|
-
}
|
|
526
|
-
)
|
|
527
|
-
}
|
|
528
|
-
) })
|
|
529
|
-
]
|
|
530
|
-
}
|
|
531
|
-
),
|
|
532
|
-
/* @__PURE__ */ jsxs(
|
|
533
|
-
StyledMenuItem,
|
|
534
|
-
{
|
|
535
|
-
sx: styles.borderBottom,
|
|
536
|
-
style: { opacity: "1" },
|
|
537
|
-
onClick: onAboutClicked,
|
|
538
|
-
children: [
|
|
539
|
-
/* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(HelpOutline, { fontSize: "small" }) }),
|
|
540
|
-
/* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
|
|
541
|
-
Typography,
|
|
542
|
-
{
|
|
543
|
-
sx: styles.sizeLabel,
|
|
544
|
-
children: /* @__PURE__ */ jsx(
|
|
545
|
-
FormattedMessage,
|
|
546
|
-
{
|
|
547
|
-
id: "top-bar/about",
|
|
548
|
-
defaultMessage: "About"
|
|
549
|
-
}
|
|
550
|
-
)
|
|
551
|
-
}
|
|
552
|
-
) })
|
|
553
|
-
]
|
|
554
|
-
}
|
|
555
|
-
),
|
|
556
|
-
/* @__PURE__ */ jsxs(StyledMenuItem, { onClick: onLogoutClick, children: [
|
|
557
|
-
/* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(ExitToApp, { fontSize: "small" }) }),
|
|
558
|
-
/* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
|
|
559
|
-
Typography,
|
|
560
|
-
{
|
|
561
|
-
sx: styles.sizeLabel,
|
|
562
|
-
children: /* @__PURE__ */ jsx(
|
|
563
|
-
FormattedMessage,
|
|
564
|
-
{
|
|
565
|
-
id: "top-bar/logout",
|
|
566
|
-
defaultMessage: "Logout"
|
|
567
|
-
}
|
|
568
|
-
)
|
|
559
|
+
}
|
|
560
|
+
) })
|
|
561
|
+
]
|
|
569
562
|
}
|
|
570
|
-
)
|
|
563
|
+
),
|
|
564
|
+
/* @__PURE__ */ jsxs(StyledMenuItem, { onClick: onLogoutClick, children: [
|
|
565
|
+
/* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(ExitToApp, { fontSize: "small" }) }),
|
|
566
|
+
/* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
|
|
567
|
+
Typography,
|
|
568
|
+
{
|
|
569
|
+
sx: styles.sizeLabel,
|
|
570
|
+
children: /* @__PURE__ */ jsx(
|
|
571
|
+
FormattedMessage,
|
|
572
|
+
{
|
|
573
|
+
id: "top-bar/logout",
|
|
574
|
+
defaultMessage: "Logout"
|
|
575
|
+
}
|
|
576
|
+
)
|
|
577
|
+
}
|
|
578
|
+
) })
|
|
579
|
+
] })
|
|
571
580
|
] })
|
|
572
|
-
|
|
573
|
-
}
|
|
574
|
-
|
|
581
|
+
}
|
|
582
|
+
) })
|
|
583
|
+
}
|
|
584
|
+
)
|
|
585
|
+
] }),
|
|
586
|
+
/* @__PURE__ */ jsx(
|
|
587
|
+
AboutDialog,
|
|
588
|
+
{
|
|
589
|
+
open: isAboutDialogOpen,
|
|
590
|
+
onClose: () => setAboutDialogOpen(false),
|
|
591
|
+
appName,
|
|
592
|
+
appVersion,
|
|
593
|
+
appLicense,
|
|
594
|
+
globalVersionPromise,
|
|
595
|
+
additionalModulesPromise
|
|
575
596
|
}
|
|
576
597
|
)
|
|
577
|
-
] })
|
|
578
|
-
|
|
579
|
-
AboutDialog,
|
|
580
|
-
{
|
|
581
|
-
open: isAboutDialogOpen,
|
|
582
|
-
onClose: () => setAboutDialogOpen(false),
|
|
583
|
-
appName,
|
|
584
|
-
appVersion,
|
|
585
|
-
appLicense,
|
|
586
|
-
globalVersionPromise,
|
|
587
|
-
additionalModulesPromise
|
|
588
|
-
}
|
|
589
|
-
)
|
|
590
|
-
] }) });
|
|
598
|
+
] }) })
|
|
599
|
+
);
|
|
591
600
|
};
|
|
592
601
|
TopBar.propTypes = {
|
|
593
602
|
onParametersClick: PropTypes.func,
|