@centreon/ui 23.10.1-sync-dev-23-10-x-develop-oss.0 → 23.10.1-sync-release-34346.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.
Files changed (94) hide show
  1. package/package.json +6 -1
  2. package/public/mockServiceWorker.js +2 -2
  3. package/src/Form/Inputs/ConnectedAutocomplete.tsx +3 -1
  4. package/src/Form/Inputs/models.ts +1 -0
  5. package/src/Graph/Gauge/Gauge.stories.tsx +15 -2
  6. package/src/Graph/HeatMap/HeatMap.stories.tsx +105 -0
  7. package/src/Graph/HeatMap/HeatMap.styles.tsx +29 -0
  8. package/src/Graph/HeatMap/HeatMap.tsx +12 -0
  9. package/src/Graph/HeatMap/HeatMapData.json +137 -0
  10. package/src/Graph/HeatMap/ResponsiveHeatMap.tsx +98 -0
  11. package/src/Graph/HeatMap/index.ts +1 -0
  12. package/src/Graph/HeatMap/model.ts +33 -0
  13. package/src/Graph/LineChart/BasicComponents/Lines/RegularLines/index.tsx +1 -1
  14. package/src/Graph/LineChart/BasicComponents/useFilterLines.ts +2 -4
  15. package/src/Graph/LineChart/Legend/InteractiveValue.tsx +3 -3
  16. package/src/Graph/LineChart/Legend/Legend.styles.ts +78 -32
  17. package/src/Graph/LineChart/Legend/LegendContent.tsx +12 -6
  18. package/src/Graph/LineChart/Legend/LegendHeader.tsx +69 -21
  19. package/src/Graph/LineChart/Legend/index.tsx +51 -23
  20. package/src/Graph/LineChart/Legend/models.ts +5 -0
  21. package/src/Graph/LineChart/Legend/useLegend.ts +9 -10
  22. package/src/Graph/LineChart/LineChart.tsx +17 -3
  23. package/src/Graph/index.ts +1 -0
  24. package/src/InputField/Select/Autocomplete/Connected/Multi/index.test.tsx +1 -0
  25. package/src/InputField/Select/Autocomplete/Connected/index.test.tsx +1 -0
  26. package/src/InputField/Select/Autocomplete/Connected/index.tsx +15 -3
  27. package/src/InputField/Text/index.tsx +6 -1
  28. package/src/Module/LicensedModule/LicenseCheck/index.tsx +24 -9
  29. package/src/Module/LicensedModule/index.tsx +7 -1
  30. package/src/RichTextEditor/RichTextEditor.cypress.spec.tsx +100 -52
  31. package/src/RichTextEditor/RichTextEditor.tsx +9 -3
  32. package/src/RichTextEditor/plugins/ToolbarPlugin/AlignPicker.tsx +21 -20
  33. package/src/RichTextEditor/plugins/ToolbarPlugin/BlockButtons.tsx +35 -77
  34. package/src/RichTextEditor/plugins/ToolbarPlugin/FormatButtons.tsx +29 -83
  35. package/src/RichTextEditor/plugins/ToolbarPlugin/LinkButton.tsx +106 -0
  36. package/src/RichTextEditor/plugins/ToolbarPlugin/ListButton.tsx +155 -0
  37. package/src/RichTextEditor/plugins/ToolbarPlugin/MacrosButton.tsx +23 -39
  38. package/src/RichTextEditor/plugins/ToolbarPlugin/ToolbarPlugin.styles.ts +24 -14
  39. package/src/RichTextEditor/plugins/ToolbarPlugin/UndoRedoButtons.tsx +6 -0
  40. package/src/RichTextEditor/plugins/ToolbarPlugin/index.tsx +5 -10
  41. package/src/RichTextEditor/translatedLabels.ts +3 -0
  42. package/src/ThemeProvider/palettes.ts +4 -4
  43. package/src/Typography/EllipsisTypography.tsx +18 -0
  44. package/src/Typography/Subtitle.tsx +55 -0
  45. package/src/api/buildListingEndpoint/models.ts +2 -1
  46. package/src/api/customFetch.ts +12 -3
  47. package/src/api/useFetchQuery/index.ts +22 -5
  48. package/src/api/useGraphQuery/index.ts +4 -1
  49. package/src/api/useMutationQuery/index.ts +12 -2
  50. package/src/components/Form/AccessRightsV2/AccessRights.cypress.spec.tsx +350 -0
  51. package/src/components/Form/AccessRightsV2/AccessRights.stories.tsx +119 -0
  52. package/src/components/Form/AccessRightsV2/AccessRights.styles.ts +10 -0
  53. package/src/components/Form/AccessRightsV2/AccessRights.tsx +60 -0
  54. package/src/components/Form/AccessRightsV2/Actions/Actions.styles.ts +14 -0
  55. package/src/components/Form/AccessRightsV2/Actions/Actions.tsx +81 -0
  56. package/src/components/Form/AccessRightsV2/Actions/useActions.ts +79 -0
  57. package/src/components/Form/AccessRightsV2/List/Item.tsx +90 -0
  58. package/src/components/Form/AccessRightsV2/List/List.styles.tsx +45 -0
  59. package/src/components/Form/AccessRightsV2/List/List.tsx +52 -0
  60. package/src/components/Form/AccessRightsV2/List/ListItemSkeleton.tsx +18 -0
  61. package/src/components/Form/AccessRightsV2/List/ListSkeleton.tsx +22 -0
  62. package/src/components/Form/AccessRightsV2/List/RemoveAccessRight.tsx +38 -0
  63. package/src/components/Form/AccessRightsV2/List/StateChip.tsx +28 -0
  64. package/src/components/Form/AccessRightsV2/List/useItem.ts +64 -0
  65. package/src/components/Form/AccessRightsV2/Provider.tsx +15 -0
  66. package/src/components/Form/AccessRightsV2/ShareInput/ContactSwitch.tsx +42 -0
  67. package/src/components/Form/AccessRightsV2/ShareInput/ShareInput.styles.ts +9 -0
  68. package/src/components/Form/AccessRightsV2/ShareInput/ShareInput.tsx +77 -0
  69. package/src/components/Form/AccessRightsV2/ShareInput/useShareInput.tsx +109 -0
  70. package/src/components/Form/AccessRightsV2/Stats/Stats.tsx +36 -0
  71. package/src/components/Form/AccessRightsV2/atoms.ts +97 -0
  72. package/src/components/Form/AccessRightsV2/common/RoleSelectField.styles.tsx +7 -0
  73. package/src/components/Form/AccessRightsV2/common/RoleSelectField.tsx +45 -0
  74. package/src/components/Form/AccessRightsV2/models.ts +54 -0
  75. package/src/components/Form/AccessRightsV2/storiesData.ts +221 -0
  76. package/src/components/Form/AccessRightsV2/useAccessRightsInitValues.ts +51 -0
  77. package/src/components/Form/index.ts +1 -0
  78. package/src/components/Header/PageHeader/PageHeader.styles.ts +28 -1
  79. package/src/components/Header/PageHeader/PageHeaderMessage.tsx +32 -0
  80. package/src/components/Header/PageHeader/index.ts +2 -0
  81. package/src/components/ItemComposition/Item.tsx +2 -2
  82. package/src/components/ItemComposition/ItemComposition.styles.ts +3 -0
  83. package/src/components/ItemComposition/ItemComposition.tsx +4 -2
  84. package/src/components/List/Item/ListItem.styles.ts +6 -0
  85. package/src/components/List/Item/ListItem.tsx +3 -1
  86. package/src/components/List/Item/Text.tsx +5 -3
  87. package/src/components/Menu/Button/MenuButton.tsx +4 -2
  88. package/src/components/Menu/MenuItem.tsx +5 -3
  89. package/src/components/Menu/MenuItems.tsx +4 -3
  90. package/src/components/Modal/Modal.styles.ts +4 -2
  91. package/src/index.ts +5 -0
  92. package/src/utils/useInfiniteScrollListing.ts +22 -7
  93. package/src/utils/useLocaleDateTimeFormat/index.ts +3 -0
  94. package/src/Graph/LineChart/Legend/Marker.tsx +0 -43
@@ -1,6 +1,7 @@
1
1
  import dayjs from 'dayjs';
2
2
  import humanizeDuration from 'humanize-duration';
3
3
  import { useAtomValue } from 'jotai';
4
+ import localizedFormat from 'dayjs/plugin/localizedFormat';
4
5
 
5
6
  import { userAtom } from '@centreon/ui-context';
6
7
 
@@ -20,6 +21,8 @@ export interface LocaleDateTimeFormat {
20
21
  toTime: (date: Date | string) => string;
21
22
  }
22
23
 
24
+ dayjs.extend(localizedFormat);
25
+
23
26
  const dateFormat = 'L';
24
27
  const timeFormat = 'LT';
25
28
  const dateTimeFormat = `${dateFormat} ${timeFormat}`;
@@ -1,43 +0,0 @@
1
- import { equals } from 'ramda';
2
- import { makeStyles } from 'tss-react/mui';
3
-
4
- export enum LegendMarkerVariant {
5
- 'dot',
6
- 'bar'
7
- }
8
-
9
- interface StylesProps {
10
- color?: string;
11
- variant: LegendMarkerVariant;
12
- }
13
-
14
- const useStyles = makeStyles<StylesProps>()((theme, { color, variant }) => ({
15
- disabled: {
16
- color: theme.palette.text.disabled
17
- },
18
- icon: {
19
- backgroundColor: color,
20
- borderRadius: equals(LegendMarkerVariant.dot, variant) ? '50%' : 0,
21
- height: equals(LegendMarkerVariant.dot, variant) ? 9 : '100%',
22
- marginRight: theme.spacing(0.5),
23
- width: 9
24
- }
25
- }));
26
-
27
- interface Props {
28
- color: string;
29
- disabled?: boolean;
30
- variant?: LegendMarkerVariant;
31
- }
32
-
33
- const LegendMarker = ({
34
- disabled,
35
- color,
36
- variant = LegendMarkerVariant.bar
37
- }: Props): JSX.Element => {
38
- const { classes, cx } = useStyles({ color, variant });
39
-
40
- return <div className={cx(classes.icon, { [classes.disabled]: disabled })} />;
41
- };
42
-
43
- export default LegendMarker;