@gridsuite/commons-ui 0.63.3 → 0.63.5

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 (129) hide show
  1. package/dist/_mocks_/svg.js +1 -3
  2. package/dist/assets/expert-filter-form.css +18 -8
  3. package/dist/components/AuthenticationRouter/AuthenticationRouter.js +88 -97
  4. package/dist/components/CardErrorBoundary/card-error-boundary.js +6 -20
  5. package/dist/components/CustomAGGrid/custom-aggrid.js +47 -49
  6. package/dist/components/DirectoryItemSelector/directory-item-selector.js +10 -40
  7. package/dist/components/ElementSearchDialog/element-search-dialog.js +1 -17
  8. package/dist/components/ElementSearchDialog/equipment-item.js +29 -47
  9. package/dist/components/ElementSearchDialog/tag-renderer.js +2 -8
  10. package/dist/components/ElementSearchDialog/use-element-search.js +1 -4
  11. package/dist/components/FlatParameters/FlatParameters.js +13 -77
  12. package/dist/components/Login/Login.js +9 -34
  13. package/dist/components/Login/Logout.js +3 -26
  14. package/dist/components/MuiVirtualizedTable/ColumnHeader.js +35 -64
  15. package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js +4 -17
  16. package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.d.ts +1 -1
  17. package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.js +19 -95
  18. package/dist/components/MuiVirtualizedTable/index.d.ts +1 -1
  19. package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.js +2 -6
  20. package/dist/components/OverflowableText/overflowable-text.js +3 -10
  21. package/dist/components/ReportViewer/filter-button.d.ts +1 -1
  22. package/dist/components/ReportViewer/filter-button.js +2 -7
  23. package/dist/components/ReportViewer/log-report-item.js +7 -17
  24. package/dist/components/ReportViewer/log-report.js +4 -13
  25. package/dist/components/ReportViewer/log-table.d.ts +1 -1
  26. package/dist/components/ReportViewer/log-table.js +3 -16
  27. package/dist/components/ReportViewer/multi-select-list.d.ts +1 -1
  28. package/dist/components/ReportViewer/multi-select-list.js +2 -14
  29. package/dist/components/ReportViewer/report-item.js +4 -10
  30. package/dist/components/ReportViewer/report-viewer.d.ts +1 -1
  31. package/dist/components/ReportViewer/report-viewer.js +2 -7
  32. package/dist/components/ReportViewerDialog/report-viewer-dialog.js +1 -13
  33. package/dist/components/SignInCallbackHandler/SignInCallbackHandler.d.ts +1 -1
  34. package/dist/components/SignInCallbackHandler/SignInCallbackHandler.js +1 -4
  35. package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.d.ts +1 -1
  36. package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.js +1 -4
  37. package/dist/components/SnackbarProvider/SnackbarProvider.js +4 -11
  38. package/dist/components/TopBar/AboutDialog.js +51 -152
  39. package/dist/components/TopBar/GridLogo.d.ts +2 -2
  40. package/dist/components/TopBar/GridLogo.js +8 -41
  41. package/dist/components/TopBar/TopBar.js +197 -328
  42. package/dist/components/TreeViewFinder/TreeViewFinder.js +23 -66
  43. package/dist/components/TreeViewFinder/index.d.ts +2 -2
  44. package/dist/components/dialogs/custom-mui-dialog.d.ts +2 -1
  45. package/dist/components/dialogs/custom-mui-dialog.js +64 -39
  46. package/dist/components/dialogs/modify-element-selection.js +1 -3
  47. package/dist/components/dialogs/popup-confirmation-dialog.d.ts +1 -1
  48. package/dist/components/dialogs/popup-confirmation-dialog.js +8 -15
  49. package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.js +3 -18
  50. package/dist/components/filter/criteria-based/criteria-based-filter-utils.js +3 -9
  51. package/dist/components/filter/criteria-based/criteria-based-form.d.ts +1 -1
  52. package/dist/components/filter/criteria-based/criteria-based-form.js +7 -15
  53. package/dist/components/filter/criteria-based/filter-free-properties.d.ts +1 -1
  54. package/dist/components/filter/criteria-based/filter-free-properties.js +1 -4
  55. package/dist/components/filter/criteria-based/filter-properties.js +16 -24
  56. package/dist/components/filter/criteria-based/filter-property.js +1 -4
  57. package/dist/components/filter/expert/expert-filter-constants.d.ts +13 -6
  58. package/dist/components/filter/expert/expert-filter-constants.js +76 -36
  59. package/dist/components/filter/expert/expert-filter-edition-dialog.js +3 -18
  60. package/dist/components/filter/expert/expert-filter-form.js +1 -7
  61. package/dist/components/filter/expert/expert-filter-utils.js +10 -30
  62. package/dist/components/filter/expert/expert-filter.type.d.ts +3 -1
  63. package/dist/components/filter/expert/expert-filter.type.js +2 -0
  64. package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +2 -15
  65. package/dist/components/filter/explicit-naming/explicit-naming-filter-form.d.ts +1 -1
  66. package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +10 -35
  67. package/dist/components/filter/filter-creation-dialog.js +5 -10
  68. package/dist/components/filter/filter-form.js +1 -6
  69. package/dist/components/filter/utils/filter-api.js +1 -7
  70. package/dist/components/inputs/react-hook-form/ExpandingTextField.js +1 -9
  71. package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.js +14 -52
  72. package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.js +14 -62
  73. package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.js +29 -40
  74. package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.js +2 -8
  75. package/dist/components/inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.js +1 -3
  76. package/dist/components/inputs/react-hook-form/booleans/boolean-input.js +1 -7
  77. package/dist/components/inputs/react-hook-form/booleans/checkbox-input.js +1 -9
  78. package/dist/components/inputs/react-hook-form/booleans/switch-input.js +1 -9
  79. package/dist/components/inputs/react-hook-form/directory-items-input.js +5 -29
  80. package/dist/components/inputs/react-hook-form/error-management/error-input.d.ts +1 -1
  81. package/dist/components/inputs/react-hook-form/provider/custom-form-provider.js +1 -7
  82. package/dist/components/inputs/react-hook-form/radio-input.js +8 -18
  83. package/dist/components/inputs/react-hook-form/range-input.js +1 -4
  84. package/dist/components/inputs/react-hook-form/select-inputs/countries-input.js +1 -9
  85. package/dist/components/inputs/react-hook-form/select-inputs/mui-select-input.js +2 -13
  86. package/dist/components/inputs/react-hook-form/select-inputs/select-input.js +2 -6
  87. package/dist/components/inputs/react-hook-form/slider-input.d.ts +1 -1
  88. package/dist/components/inputs/react-hook-form/slider-input.js +2 -19
  89. package/dist/components/inputs/react-hook-form/unique-name-input.js +1 -9
  90. package/dist/components/inputs/react-hook-form/utils/field-label.d.ts +1 -1
  91. package/dist/components/inputs/react-hook-form/utils/field-label.js +1 -5
  92. package/dist/components/inputs/react-hook-form/utils/submit-button.js +1 -8
  93. package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.js +18 -47
  94. package/dist/components/inputs/react-query-builder/add-button.js +1 -10
  95. package/dist/components/inputs/react-query-builder/autocomplete-with-favorites.d.ts +12 -0
  96. package/dist/components/inputs/react-query-builder/autocomplete-with-favorites.js +43 -0
  97. package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.js +14 -27
  98. package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.js +1 -3
  99. package/dist/components/inputs/react-query-builder/country-value-editor.js +27 -28
  100. package/dist/components/inputs/react-query-builder/custom-react-query-builder.js +25 -31
  101. package/dist/components/inputs/react-query-builder/element-value-editor.js +1 -10
  102. package/dist/components/inputs/react-query-builder/property-value-editor.js +6 -11
  103. package/dist/components/inputs/react-query-builder/remove-button.js +1 -9
  104. package/dist/components/inputs/react-query-builder/text-value-editor.js +2 -1
  105. package/dist/components/inputs/react-query-builder/translated-value-editor.js +3 -4
  106. package/dist/components/inputs/react-query-builder/use-convert-value.d.ts +1 -1
  107. package/dist/components/inputs/react-query-builder/use-convert-value.js +1 -6
  108. package/dist/components/inputs/react-query-builder/value-editor.js +4 -20
  109. package/dist/components/translations/filter-expert-en.d.ts +21 -7
  110. package/dist/components/translations/filter-expert-en.js +24 -10
  111. package/dist/components/translations/filter-expert-fr.d.ts +21 -7
  112. package/dist/components/translations/filter-expert-fr.js +24 -10
  113. package/dist/hooks/localized-countries-hook.js +1 -3
  114. package/dist/hooks/useConfidentialityWarning.d.ts +8 -0
  115. package/dist/hooks/useConfidentialityWarning.js +14 -0
  116. package/dist/hooks/useDebounce.js +1 -4
  117. package/dist/hooks/useSnackMessage.js +3 -12
  118. package/dist/index.d.ts +10 -9
  119. package/dist/index.js +77 -73
  120. package/dist/services/apps-metadata.d.ts +7 -0
  121. package/dist/services/apps-metadata.js +13 -0
  122. package/dist/services/directory.js +3 -11
  123. package/dist/services/explore.js +2 -8
  124. package/dist/services/index.js +3 -1
  125. package/dist/services/utils.js +4 -12
  126. package/dist/utils/AuthService.js +8 -29
  127. package/dist/utils/UserManagerMock.js +6 -23
  128. package/dist/utils/styles.js +1 -6
  129. package/package.json +2 -1
@@ -17,49 +17,16 @@ const styles = {
17
17
  cursor: "pointer"
18
18
  }
19
19
  };
20
- function LogoText({
21
- appName,
22
- appColor,
23
- style,
24
- onClick
25
- }) {
26
- return /* @__PURE__ */ jsxs(
27
- Typography,
28
- {
29
- variant: "h4",
30
- sx: mergeSx(style, onClick && styles.clickable),
31
- onClick,
32
- children: [
33
- /* @__PURE__ */ jsx("span", { style: { fontWeight: "bold" }, children: "Grid" }),
34
- /* @__PURE__ */ jsx("span", { style: { color: appColor }, children: appName })
35
- ]
36
- }
37
- );
20
+ function LogoText({ appName, appColor, style, onClick }) {
21
+ return /* @__PURE__ */ jsxs(Typography, { variant: "h4", sx: mergeSx(style, onClick && styles.clickable), onClick, children: [
22
+ /* @__PURE__ */ jsx("span", { style: { fontWeight: "bold" }, children: "Grid" }),
23
+ /* @__PURE__ */ jsx("span", { style: { color: appColor }, children: appName })
24
+ ] });
38
25
  }
39
- function GridLogo({
40
- appLogo,
41
- appName,
42
- appColor,
43
- onClick
44
- }) {
26
+ function GridLogo({ appLogo, appName, appColor, onClick }) {
45
27
  return /* @__PURE__ */ jsxs(Fragment, { children: [
46
- /* @__PURE__ */ jsx(
47
- Box,
48
- {
49
- sx: mergeSx(styles.logo, onClick && styles.clickable),
50
- onClick,
51
- children: appLogo || /* @__PURE__ */ jsx(BrokenImage, {})
52
- }
53
- ),
54
- /* @__PURE__ */ jsx(
55
- LogoText,
56
- {
57
- appName,
58
- appColor,
59
- onClick,
60
- style: styles.title
61
- }
62
- )
28
+ /* @__PURE__ */ jsx(Box, { sx: mergeSx(styles.logo, onClick && styles.clickable), onClick, children: appLogo || /* @__PURE__ */ jsx(BrokenImage, {}) }),
29
+ /* @__PURE__ */ jsx(LogoText, { appName, appColor, onClick, style: styles.title })
63
30
  ] });
64
31
  }
65
32
  export {
@@ -130,9 +130,7 @@ function TopBar({
130
130
  language
131
131
  }) {
132
132
  const [anchorElSettingsMenu, setAnchorElSettingsMenu] = useState(null);
133
- const [anchorElAppsMenu, setAnchorElAppsMenu] = useState(
134
- null
135
- );
133
+ const [anchorElAppsMenu, setAnchorElAppsMenu] = useState(null);
136
134
  const handleToggleSettingsMenu = (event) => {
137
135
  setAnchorElSettingsMenu(event.currentTarget);
138
136
  };
@@ -183,15 +181,7 @@ function TopBar({
183
181
  }
184
182
  };
185
183
  const logoClickable = useMemo(
186
- () => /* @__PURE__ */ jsx(
187
- GridLogo,
188
- {
189
- onClick: onLogoClick,
190
- appLogo,
191
- appName,
192
- appColor
193
- }
194
- ),
184
+ () => /* @__PURE__ */ jsx(GridLogo, { onClick: onLogoClick, appLogo, appName, appColor }),
195
185
  [onLogoClick, appLogo, appName, appColor]
196
186
  );
197
187
  return (
@@ -229,33 +219,27 @@ function TopBar({
229
219
  sx: styles.link,
230
220
  target: "_blank",
231
221
  rel: "noopener noreferrer",
232
- children: /* @__PURE__ */ jsx(
233
- StyledMenuItem,
234
- {
235
- onClick: handleCloseAppsMenu,
236
- children: /* @__PURE__ */ jsxs(ListItemText, { children: [
237
- /* @__PURE__ */ jsx(
238
- "span",
239
- {
240
- style: {
241
- fontWeight: "bold"
242
- },
243
- children: "Grid"
244
- }
245
- ),
246
- /* @__PURE__ */ jsx(
247
- "span",
248
- {
249
- style: {
250
- color: item.appColor === void 0 ? "grey" : item.appColor,
251
- fontWeight: "bold"
252
- },
253
- children: item.name
254
- }
255
- )
256
- ] })
257
- }
258
- )
222
+ children: /* @__PURE__ */ jsx(StyledMenuItem, { onClick: handleCloseAppsMenu, children: /* @__PURE__ */ jsxs(ListItemText, { children: [
223
+ /* @__PURE__ */ jsx(
224
+ "span",
225
+ {
226
+ style: {
227
+ fontWeight: "bold"
228
+ },
229
+ children: "Grid"
230
+ }
231
+ ),
232
+ /* @__PURE__ */ jsx(
233
+ "span",
234
+ {
235
+ style: {
236
+ color: item.appColor === void 0 ? "grey" : item.appColor,
237
+ fontWeight: "bold"
238
+ },
239
+ children: item.name
240
+ }
241
+ )
242
+ ] }) })
259
243
  },
260
244
  item.name
261
245
  );
@@ -288,297 +272,182 @@ function TopBar({
288
272
  sx: styles.settingsMenu,
289
273
  open: Boolean(anchorElSettingsMenu),
290
274
  anchorEl: anchorElSettingsMenu,
291
- children: /* @__PURE__ */ jsx(Paper, { children: /* @__PURE__ */ jsx(
292
- ClickAwayListener,
293
- {
294
- onClickAway: handleCloseSettingsMenu,
295
- children: /* @__PURE__ */ jsxs(MenuList, { id: "settings-menu", children: [
296
- /* @__PURE__ */ jsxs(
297
- StyledMenuItem,
298
- {
299
- sx: styles.borderBottom,
300
- disabled: true,
301
- style: { opacity: "1" },
302
- children: [
303
- /* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(Person, { fontSize: "small" }) }),
304
- /* @__PURE__ */ jsx(ListItemText, { children: user !== null && /* @__PURE__ */ jsxs(
305
- Box,
306
- {
307
- component: "span",
308
- sx: styles.sizeLabel,
309
- children: [
310
- user.profile.name,
311
- " ",
312
- /* @__PURE__ */ jsx("br", {}),
313
- /* @__PURE__ */ jsx(
314
- Box,
315
- {
316
- component: "span",
317
- sx: styles.userMail,
318
- children: user.profile.email
319
- }
320
- )
321
- ]
322
- }
323
- ) })
324
- ]
325
- }
326
- ),
327
- /* @__PURE__ */ jsxs(
328
- StyledMenuItem,
329
- {
330
- disabled: true,
331
- style: {
332
- opacity: "1",
333
- paddingTop: "10px",
334
- paddingBottom: "10px",
335
- backgroundColor: "transparent"
336
- },
337
- children: [
338
- /* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
339
- Typography,
340
- {
341
- sx: styles.sizeLabel,
342
- children: /* @__PURE__ */ jsx(
343
- FormattedMessage,
344
- {
345
- id: "top-bar/displayMode",
346
- defaultMessage: "Display mode"
347
- }
348
- )
349
- }
350
- ) }),
351
- /* @__PURE__ */ jsxs(
352
- ToggleButtonGroup,
353
- {
354
- exclusive: true,
355
- value: theme,
356
- size: "large",
357
- sx: styles.toggleButtonGroup,
358
- onChange: changeTheme,
359
- children: [
360
- /* @__PURE__ */ jsx(
361
- ToggleButton,
362
- {
363
- value: LIGHT_THEME,
364
- "aria-label": LIGHT_THEME,
365
- sx: styles.toggleButton,
366
- children: /* @__PURE__ */ jsx(WbSunny, { fontSize: "small" })
367
- }
368
- ),
369
- /* @__PURE__ */ jsx(
370
- ToggleButton,
371
- {
372
- value: DARK_THEME,
373
- "aria-label": DARK_THEME,
374
- sx: styles.toggleButton,
375
- children: /* @__PURE__ */ jsx(Brightness3, { fontSize: "small" })
376
- }
377
- )
378
- ]
379
- }
380
- )
381
- ]
382
- }
383
- ),
384
- onEquipmentLabellingClick && /* @__PURE__ */ jsxs(
385
- StyledMenuItem,
386
- {
387
- disabled: true,
388
- style: {
389
- opacity: "1",
390
- // padding: '0',
391
- paddingTop: "10px",
392
- paddingBottom: "10px",
393
- backgroundColor: "transparent"
394
- },
395
- children: [
396
- /* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
397
- Typography,
398
- {
399
- sx: styles.sizeLabel,
400
- children: /* @__PURE__ */ jsx(
401
- FormattedMessage,
402
- {
403
- id: "top-bar/equipmentLabel",
404
- defaultMessage: "Equipment label"
405
- }
406
- )
407
- }
408
- ) }),
409
- /* @__PURE__ */ jsxs(
410
- ToggleButtonGroup,
411
- {
412
- exclusive: true,
413
- value: equipmentLabelling,
414
- sx: styles.toggleButtonGroup,
415
- onChange: changeEquipmentLabelling,
416
- children: [
417
- /* @__PURE__ */ jsx(
418
- ToggleButton,
419
- {
420
- value: false,
421
- sx: styles.toggleButton,
422
- children: /* @__PURE__ */ jsx(
423
- FormattedMessage,
424
- {
425
- id: "top-bar/id",
426
- defaultMessage: "Id"
427
- }
428
- )
429
- }
430
- ),
431
- /* @__PURE__ */ jsx(
432
- ToggleButton,
433
- {
434
- value: true,
435
- sx: styles.toggleButton,
436
- children: /* @__PURE__ */ jsx(
437
- FormattedMessage,
438
- {
439
- id: "top-bar/name",
440
- defaultMessage: "Name"
441
- }
442
- )
443
- }
444
- )
445
- ]
446
- }
447
- )
448
- ]
449
- }
450
- ),
451
- /* @__PURE__ */ jsxs(
452
- StyledMenuItem,
453
- {
454
- disabled: true,
455
- style: {
456
- opacity: "1",
457
- paddingTop: "10px",
458
- paddingBottom: "10px",
459
- backgroundColor: "transparent"
460
- },
461
- children: [
462
- /* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
463
- Typography,
464
- {
465
- sx: styles.sizeLabel,
466
- children: /* @__PURE__ */ jsx(
467
- FormattedMessage,
468
- {
469
- id: "top-bar/language",
470
- defaultMessage: "Language"
471
- }
472
- )
473
- }
474
- ) }),
475
- /* @__PURE__ */ jsxs(
476
- ToggleButtonGroup,
477
- {
478
- exclusive: true,
479
- value: language,
480
- sx: styles.toggleButtonGroup,
481
- onChange: changeLanguage,
482
- children: [
483
- /* @__PURE__ */ jsx(
484
- ToggleButton,
485
- {
486
- value: LANG_SYSTEM,
487
- "aria-label": LANG_SYSTEM,
488
- sx: styles.languageToggleButton,
489
- children: /* @__PURE__ */ jsx(Computer, {})
490
- }
491
- ),
492
- /* @__PURE__ */ jsx(
493
- ToggleButton,
494
- {
495
- value: LANG_ENGLISH,
496
- "aria-label": LANG_ENGLISH,
497
- sx: styles.languageToggleButton,
498
- children: EN
499
- }
500
- ),
501
- /* @__PURE__ */ jsx(
502
- ToggleButton,
503
- {
504
- value: LANG_FRENCH,
505
- "aria-label": LANG_FRENCH,
506
- sx: styles.toggleButton,
507
- children: FR
508
- }
509
- )
510
- ]
511
- }
512
- )
513
- ]
514
- }
515
- ),
516
- onParametersClick && /* @__PURE__ */ jsxs(
517
- StyledMenuItem,
518
- {
519
- onClick: onParametersClicked,
520
- sx: styles.borderTop,
521
- children: [
522
- /* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(Settings, { fontSize: "small" }) }),
523
- /* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
524
- Typography,
525
- {
526
- sx: styles.sizeLabel,
527
- children: /* @__PURE__ */ jsx(
528
- FormattedMessage,
529
- {
530
- id: "top-bar/settings",
531
- defaultMessage: "Settings"
532
- }
533
- )
534
- }
535
- ) })
536
- ]
537
- }
538
- ),
539
- /* @__PURE__ */ jsxs(
540
- StyledMenuItem,
541
- {
542
- sx: styles.borderBottom,
543
- style: { opacity: "1" },
544
- onClick: onAboutClicked,
545
- children: [
546
- /* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(HelpOutline, { fontSize: "small" }) }),
547
- /* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
548
- Typography,
549
- {
550
- sx: styles.sizeLabel,
551
- children: /* @__PURE__ */ jsx(
552
- FormattedMessage,
553
- {
554
- id: "top-bar/about",
555
- defaultMessage: "About"
556
- }
557
- )
558
- }
559
- ) })
560
- ]
561
- }
562
- ),
563
- /* @__PURE__ */ jsxs(StyledMenuItem, { onClick: onLogoutClick, children: [
564
- /* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(ExitToApp, { fontSize: "small" }) }),
565
- /* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(
566
- Typography,
275
+ children: /* @__PURE__ */ jsx(Paper, { children: /* @__PURE__ */ jsx(ClickAwayListener, { onClickAway: handleCloseSettingsMenu, children: /* @__PURE__ */ jsxs(MenuList, { id: "settings-menu", children: [
276
+ /* @__PURE__ */ jsxs(StyledMenuItem, { sx: styles.borderBottom, disabled: true, style: { opacity: "1" }, children: [
277
+ /* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(Person, { fontSize: "small" }) }),
278
+ /* @__PURE__ */ jsx(ListItemText, { children: user !== null && /* @__PURE__ */ jsxs(Box, { component: "span", sx: styles.sizeLabel, children: [
279
+ user.profile.name,
280
+ " ",
281
+ /* @__PURE__ */ jsx("br", {}),
282
+ /* @__PURE__ */ jsx(Box, { component: "span", sx: styles.userMail, children: user.profile.email })
283
+ ] }) })
284
+ ] }),
285
+ /* @__PURE__ */ jsxs(
286
+ StyledMenuItem,
287
+ {
288
+ disabled: true,
289
+ style: {
290
+ opacity: "1",
291
+ paddingTop: "10px",
292
+ paddingBottom: "10px",
293
+ backgroundColor: "transparent"
294
+ },
295
+ children: [
296
+ /* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(Typography, { sx: styles.sizeLabel, children: /* @__PURE__ */ jsx(
297
+ FormattedMessage,
298
+ {
299
+ id: "top-bar/displayMode",
300
+ defaultMessage: "Display mode"
301
+ }
302
+ ) }) }),
303
+ /* @__PURE__ */ jsxs(
304
+ ToggleButtonGroup,
567
305
  {
568
- sx: styles.sizeLabel,
569
- children: /* @__PURE__ */ jsx(
570
- FormattedMessage,
571
- {
572
- id: "top-bar/logout",
573
- defaultMessage: "Logout"
574
- }
575
- )
306
+ exclusive: true,
307
+ value: theme,
308
+ size: "large",
309
+ sx: styles.toggleButtonGroup,
310
+ onChange: changeTheme,
311
+ children: [
312
+ /* @__PURE__ */ jsx(
313
+ ToggleButton,
314
+ {
315
+ value: LIGHT_THEME,
316
+ "aria-label": LIGHT_THEME,
317
+ sx: styles.toggleButton,
318
+ children: /* @__PURE__ */ jsx(WbSunny, { fontSize: "small" })
319
+ }
320
+ ),
321
+ /* @__PURE__ */ jsx(
322
+ ToggleButton,
323
+ {
324
+ value: DARK_THEME,
325
+ "aria-label": DARK_THEME,
326
+ sx: styles.toggleButton,
327
+ children: /* @__PURE__ */ jsx(Brightness3, { fontSize: "small" })
328
+ }
329
+ )
330
+ ]
576
331
  }
577
- ) })
578
- ] })
579
- ] })
580
- }
581
- ) })
332
+ )
333
+ ]
334
+ }
335
+ ),
336
+ onEquipmentLabellingClick && /* @__PURE__ */ jsxs(
337
+ StyledMenuItem,
338
+ {
339
+ disabled: true,
340
+ style: {
341
+ opacity: "1",
342
+ // padding: '0',
343
+ paddingTop: "10px",
344
+ paddingBottom: "10px",
345
+ backgroundColor: "transparent"
346
+ },
347
+ children: [
348
+ /* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(Typography, { sx: styles.sizeLabel, children: /* @__PURE__ */ jsx(
349
+ FormattedMessage,
350
+ {
351
+ id: "top-bar/equipmentLabel",
352
+ defaultMessage: "Equipment label"
353
+ }
354
+ ) }) }),
355
+ /* @__PURE__ */ jsxs(
356
+ ToggleButtonGroup,
357
+ {
358
+ exclusive: true,
359
+ value: equipmentLabelling,
360
+ sx: styles.toggleButtonGroup,
361
+ onChange: changeEquipmentLabelling,
362
+ children: [
363
+ /* @__PURE__ */ jsx(ToggleButton, { value: false, sx: styles.toggleButton, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "top-bar/id", defaultMessage: "Id" }) }),
364
+ /* @__PURE__ */ jsx(ToggleButton, { value: true, sx: styles.toggleButton, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "top-bar/name", defaultMessage: "Name" }) })
365
+ ]
366
+ }
367
+ )
368
+ ]
369
+ }
370
+ ),
371
+ /* @__PURE__ */ jsxs(
372
+ StyledMenuItem,
373
+ {
374
+ disabled: true,
375
+ style: {
376
+ opacity: "1",
377
+ paddingTop: "10px",
378
+ paddingBottom: "10px",
379
+ backgroundColor: "transparent"
380
+ },
381
+ children: [
382
+ /* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(Typography, { sx: styles.sizeLabel, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "top-bar/language", defaultMessage: "Language" }) }) }),
383
+ /* @__PURE__ */ jsxs(
384
+ ToggleButtonGroup,
385
+ {
386
+ exclusive: true,
387
+ value: language,
388
+ sx: styles.toggleButtonGroup,
389
+ onChange: changeLanguage,
390
+ children: [
391
+ /* @__PURE__ */ jsx(
392
+ ToggleButton,
393
+ {
394
+ value: LANG_SYSTEM,
395
+ "aria-label": LANG_SYSTEM,
396
+ sx: styles.languageToggleButton,
397
+ children: /* @__PURE__ */ jsx(Computer, {})
398
+ }
399
+ ),
400
+ /* @__PURE__ */ jsx(
401
+ ToggleButton,
402
+ {
403
+ value: LANG_ENGLISH,
404
+ "aria-label": LANG_ENGLISH,
405
+ sx: styles.languageToggleButton,
406
+ children: EN
407
+ }
408
+ ),
409
+ /* @__PURE__ */ jsx(
410
+ ToggleButton,
411
+ {
412
+ value: LANG_FRENCH,
413
+ "aria-label": LANG_FRENCH,
414
+ sx: styles.toggleButton,
415
+ children: FR
416
+ }
417
+ )
418
+ ]
419
+ }
420
+ )
421
+ ]
422
+ }
423
+ ),
424
+ onParametersClick && /* @__PURE__ */ jsxs(StyledMenuItem, { onClick: onParametersClicked, sx: styles.borderTop, children: [
425
+ /* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(Settings, { fontSize: "small" }) }),
426
+ /* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(Typography, { sx: styles.sizeLabel, children: /* @__PURE__ */ jsx(
427
+ FormattedMessage,
428
+ {
429
+ id: "top-bar/settings",
430
+ defaultMessage: "Settings"
431
+ }
432
+ ) }) })
433
+ ] }),
434
+ /* @__PURE__ */ jsxs(
435
+ StyledMenuItem,
436
+ {
437
+ sx: styles.borderBottom,
438
+ style: { opacity: "1" },
439
+ onClick: onAboutClicked,
440
+ children: [
441
+ /* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(HelpOutline, { fontSize: "small" }) }),
442
+ /* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(Typography, { sx: styles.sizeLabel, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "top-bar/about", defaultMessage: "About" }) }) })
443
+ ]
444
+ }
445
+ ),
446
+ /* @__PURE__ */ jsxs(StyledMenuItem, { onClick: onLogoutClick, children: [
447
+ /* @__PURE__ */ jsx(CustomListItemIcon, { children: /* @__PURE__ */ jsx(ExitToApp, { fontSize: "small" }) }),
448
+ /* @__PURE__ */ jsx(ListItemText, { children: /* @__PURE__ */ jsx(Typography, { sx: styles.sizeLabel, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "top-bar/logout", defaultMessage: "Logout" }) }) })
449
+ ] })
450
+ ] }) }) })
582
451
  }
583
452
  )
584
453
  ] }),