@centreon/ui 24.4.1-sync-release-34022.1 → 24.4.1-sync-dev-2404.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 (221) hide show
  1. package/package.json +48 -40
  2. package/src/ActionsList/ActionsList.styles.ts +40 -71
  3. package/src/Button/Icon/index.stories.tsx +1 -1
  4. package/src/Button/Icon/index.tsx +1 -1
  5. package/src/Dashboard/Dashboard.styles.ts +6 -5
  6. package/src/Dialog/Confirm/index.tsx +10 -2
  7. package/src/Dialog/UnsavedChanges/index.tsx +21 -20
  8. package/src/Dialog/UnsavedChanges/translatedLabels.ts +4 -6
  9. package/src/Dialog/index.tsx +8 -1
  10. package/src/Form/Inputs/CheckboxGroup.tsx +4 -1
  11. package/src/Form/Inputs/Text.tsx +3 -1
  12. package/src/Form/Inputs/models.ts +1 -0
  13. package/src/Graph/BarStack/BarStack.cypress.spec.tsx +139 -0
  14. package/src/Graph/BarStack/BarStack.stories.tsx +123 -0
  15. package/src/Graph/BarStack/BarStack.styles.ts +37 -0
  16. package/src/Graph/BarStack/BarStack.tsx +14 -0
  17. package/src/Graph/BarStack/ResponsiveBarStack.tsx +209 -0
  18. package/src/Graph/BarStack/index.ts +1 -0
  19. package/src/Graph/BarStack/models.ts +19 -0
  20. package/src/Graph/BarStack/useResponsiveBarStack.ts +131 -0
  21. package/src/Graph/Gauge/Gauge.cypress.spec.tsx +102 -0
  22. package/src/Graph/Gauge/Gauge.tsx +1 -1
  23. package/src/Graph/HeatMap/HeatMap.cypress.spec.tsx +145 -0
  24. package/src/Graph/HeatMap/HeatMap.stories.tsx +0 -25
  25. package/src/Graph/HeatMap/ResponsiveHeatMap.tsx +8 -2
  26. package/src/Graph/Legend/Legend.tsx +21 -0
  27. package/src/Graph/Legend/index.ts +1 -0
  28. package/src/Graph/Legend/models.ts +11 -0
  29. package/src/Graph/LineChart/BasicComponents/Lines/Threshold/index.tsx +4 -5
  30. package/src/Graph/LineChart/BasicComponents/ThresholdLine.tsx +3 -1
  31. package/src/Graph/LineChart/Header/index.tsx +3 -31
  32. package/src/Graph/LineChart/InteractiveComponents/AnchorPoint/useTickGraph.ts +9 -11
  33. package/src/Graph/LineChart/InteractiveComponents/Annotations/Annotation/index.tsx +3 -2
  34. package/src/Graph/LineChart/InteractiveComponents/GraphValueTooltip/GraphValueTooltip.tsx +68 -0
  35. package/src/Graph/LineChart/InteractiveComponents/GraphValueTooltip/useGraphValueTooltip.ts +27 -0
  36. package/src/Graph/LineChart/InteractiveComponents/GraphValueTooltip/useGraphValueTooltipStyles.ts +31 -0
  37. package/src/Graph/LineChart/InteractiveComponents/index.tsx +132 -17
  38. package/src/Graph/LineChart/InteractiveComponents/interactionWithGraphAtoms.ts +7 -27
  39. package/src/Graph/LineChart/Legend/Legend.styles.ts +5 -9
  40. package/src/Graph/LineChart/Legend/LegendHeader.tsx +10 -22
  41. package/src/Graph/LineChart/Legend/index.tsx +17 -55
  42. package/src/Graph/LineChart/LineChart.cypress.spec.tsx +91 -0
  43. package/src/Graph/LineChart/LineChart.styles.ts +8 -0
  44. package/src/Graph/LineChart/LineChart.tsx +106 -116
  45. package/src/Graph/LineChart/LoadingSkeleton.tsx +2 -2
  46. package/src/Graph/LineChart/index.tsx +6 -7
  47. package/src/Graph/LineChart/mockedData/lastDayWithIncompleteValues.json +1320 -0
  48. package/src/Graph/LineChart/mockedData/lastDayWithNullValues.json +1314 -0
  49. package/src/Graph/LineChart/models.ts +12 -1
  50. package/src/Graph/PieChart/PieChart.cypress.spec.tsx +154 -0
  51. package/src/Graph/PieChart/PieChart.stories.tsx +194 -0
  52. package/src/Graph/PieChart/PieChart.styles.ts +39 -0
  53. package/src/Graph/PieChart/PieChart.tsx +14 -0
  54. package/src/Graph/PieChart/ResponsivePie.tsx +243 -0
  55. package/src/Graph/PieChart/index.ts +1 -0
  56. package/src/Graph/PieChart/models.ts +19 -0
  57. package/src/Graph/PieChart/useResponsivePie.ts +81 -0
  58. package/src/Graph/SingleBar/SingleBar.cypress.spec.tsx +121 -0
  59. package/src/Graph/Text/Text.cypress.spec.tsx +101 -0
  60. package/src/Graph/Text/Text.styles.ts +12 -1
  61. package/src/Graph/Text/Text.tsx +17 -12
  62. package/src/Graph/Tree/DescendantNodes.tsx +88 -0
  63. package/src/Graph/Tree/Links.tsx +64 -0
  64. package/src/Graph/Tree/StandaloneTree.tsx +32 -0
  65. package/src/Graph/Tree/Tree.cypress.spec.tsx +171 -0
  66. package/src/Graph/Tree/Tree.stories.tsx +144 -0
  67. package/src/Graph/Tree/Tree.tsx +116 -0
  68. package/src/Graph/Tree/constants.ts +2 -0
  69. package/src/Graph/Tree/index.ts +4 -0
  70. package/src/Graph/Tree/models.ts +52 -0
  71. package/src/Graph/Tree/stories/contents.tsx +164 -0
  72. package/src/Graph/Tree/stories/datas.ts +305 -0
  73. package/src/Graph/Tree/utils.ts +49 -0
  74. package/src/Graph/common/testUtils.ts +71 -0
  75. package/src/Graph/common/timeSeries/index.ts +50 -12
  76. package/src/Graph/common/utils.ts +19 -0
  77. package/src/Graph/index.ts +4 -0
  78. package/src/InputField/Number/Number.cypress.spec.tsx +85 -0
  79. package/src/InputField/Number/Number.stories.tsx +66 -0
  80. package/src/InputField/Number/Number.tsx +74 -0
  81. package/src/InputField/Search/index.tsx +2 -2
  82. package/src/InputField/Select/Autocomplete/Multi/index.tsx +4 -2
  83. package/src/InputField/Select/Autocomplete/index.tsx +10 -3
  84. package/src/InputField/Select/IconPopover/index.tsx +1 -1
  85. package/src/InputField/Select/index.tsx +14 -1
  86. package/src/InputField/Text/index.tsx +38 -38
  87. package/src/Listing/ActionBar/index.tsx +10 -10
  88. package/src/Listing/Cell/DataCell.styles.ts +3 -0
  89. package/src/Listing/Cell/DataCell.tsx +8 -4
  90. package/src/Listing/Listing.cypress.spec.tsx +218 -33
  91. package/src/Listing/Listing.styles.ts +3 -5
  92. package/src/Listing/Row/Row.tsx +7 -3
  93. package/src/Listing/index.stories.tsx +25 -2
  94. package/src/Listing/index.test.tsx +1 -1
  95. package/src/Listing/index.tsx +202 -143
  96. package/src/Listing/models.ts +1 -0
  97. package/src/Listing/useStyleTable.ts +1 -0
  98. package/src/Panel/index.tsx +1 -1
  99. package/src/PopoverMenu/index.tsx +6 -5
  100. package/src/ThemeProvider/index.tsx +3 -0
  101. package/src/TimePeriods/CustomTimePeriod/CompactCustomTimePeriod.styles.ts +6 -7
  102. package/src/TimePeriods/ResolutionTimePeriod.cypress.spec.tsx +12 -9
  103. package/src/TopCounterElements/TopCounterLayout.tsx +3 -0
  104. package/src/TopCounterElements/useCloseOnLegacyPage.tsx +42 -0
  105. package/src/Typography/FluidTypography/FluidTypography.cypress.spec.tsx +27 -0
  106. package/src/Typography/FluidTypography/index.stories.tsx +2 -2
  107. package/src/Typography/FluidTypography/index.tsx +21 -28
  108. package/src/api/index.ts +3 -3
  109. package/src/api/useGraphQuery/index.ts +26 -5
  110. package/src/api/useGraphQuery/models.ts +5 -0
  111. package/src/api/useMutationQuery/index.test.ts +4 -4
  112. package/src/api/useMutationQuery/index.ts +24 -13
  113. package/src/components/CollapsibleItem/CollapsibleItem.cypress.spec.tsx +76 -0
  114. package/src/components/CollapsibleItem/CollapsibleItem.stories.tsx +26 -0
  115. package/src/components/CollapsibleItem/CollapsibleItem.tsx +43 -14
  116. package/src/components/CollapsibleItem/useCollapsibleItemStyles.ts +24 -1
  117. package/src/components/DataTable/DataTable.cypress.spec.tsx +14 -33
  118. package/src/components/DataTable/Item/DataTableItem.tsx +4 -60
  119. package/src/components/Form/{AccessRightsV2 → AccessRights}/AccessRights.cypress.spec.tsx +36 -13
  120. package/src/components/Form/{AccessRightsV2 → AccessRights}/ShareInput/ContactSwitch.tsx +11 -3
  121. package/src/components/Form/{AccessRightsV2 → AccessRights}/ShareInput/ShareInput.styles.ts +8 -0
  122. package/src/components/Form/{AccessRightsV2 → AccessRights}/ShareInput/ShareInput.tsx +1 -0
  123. package/src/components/Form/{AccessRightsV2 → AccessRights}/ShareInput/useShareInput.tsx +4 -0
  124. package/src/components/Form/{AccessRightsV2 → AccessRights}/models.ts +1 -0
  125. package/src/components/Form/{AccessRightsV2 → AccessRights}/storiesData.ts +23 -22
  126. package/src/components/Form/Dashboard/DashboardDuplicationForm.tsx +85 -0
  127. package/src/components/Form/Dashboard/index.ts +1 -0
  128. package/src/components/Form/FormActions.tsx +7 -2
  129. package/src/components/Form/index.ts +2 -2
  130. package/src/components/ItemComposition/Item.tsx +1 -1
  131. package/src/components/ItemComposition/ItemComposition.cypress.spec.tsx +113 -0
  132. package/src/components/ItemComposition/ItemComposition.stories.tsx +14 -0
  133. package/src/components/ItemComposition/ItemComposition.styles.ts +36 -3
  134. package/src/components/ItemComposition/ItemComposition.tsx +41 -17
  135. package/src/components/List/Item/ListItem.tsx +3 -3
  136. package/src/components/Modal/ConfirmationModal/ConfirmationModal.cypress.spec.tsx +168 -0
  137. package/src/components/Modal/ConfirmationModal/ConfirmationModal.stories.tsx +62 -0
  138. package/src/components/Modal/ConfirmationModal/ConfirmationModal.tsx +87 -0
  139. package/src/components/Modal/Modal.styles.ts +8 -3
  140. package/src/components/Modal/index.ts +2 -0
  141. package/src/components/Tooltip/ConfirmationTooltip/ConfirmationTooltip.stories.tsx +3 -3
  142. package/src/components/Tooltip/ConfirmationTooltip/ConfirmationTooltip.tsx +1 -1
  143. package/src/components/Tooltip/ConfirmationTooltip/models.ts +1 -1
  144. package/src/components/Zoom/Minimap.tsx +127 -0
  145. package/src/components/Zoom/Zoom.cypress.spec.tsx +246 -0
  146. package/src/components/Zoom/Zoom.stories.tsx +115 -0
  147. package/src/components/Zoom/Zoom.styles.tsx +68 -0
  148. package/src/components/Zoom/Zoom.tsx +61 -0
  149. package/src/components/Zoom/ZoomContent.tsx +167 -0
  150. package/src/components/Zoom/constants.ts +2 -0
  151. package/src/components/Zoom/localPoint.ts +51 -0
  152. package/src/components/Zoom/models.ts +25 -0
  153. package/src/components/Zoom/useMinimap.ts +156 -0
  154. package/src/components/Zoom/useZoom.ts +70 -0
  155. package/src/components/Zoom/utils.ts +55 -0
  156. package/src/components/index.ts +1 -0
  157. package/src/index.ts +1 -0
  158. package/src/utils/index.ts +2 -0
  159. package/src/utils/useFullscreen/Fullscreen.cypress.spec.tsx +130 -0
  160. package/src/utils/useFullscreen/atoms.ts +3 -0
  161. package/src/utils/useFullscreen/index.ts +2 -0
  162. package/src/utils/useFullscreen/translatedLabels.ts +1 -0
  163. package/src/utils/useFullscreen/useFullscreen.ts +73 -0
  164. package/src/utils/useFullscreen/useFullscreenListener.ts +62 -0
  165. package/src/utils/useInfiniteScrollListing.ts +4 -1
  166. package/src/Graph/LineChart/BasicComponents/LoadingProgress.tsx +0 -46
  167. package/src/Graph/LineChart/InteractiveComponents/AnchorPoint/TooltipAnchorPoint.tsx +0 -96
  168. package/src/Graph/LineChart/InteractiveComponents/AnchorPoint/useTooltipAnchorPoint.ts +0 -107
  169. package/src/Graph/LineChart/Legend/InteractiveValue.tsx +0 -22
  170. package/src/Graph/LineChart/Legend/useInteractiveValues.ts +0 -99
  171. package/src/Typography/FluidTypography/useFluidResizeObserver.ts +0 -56
  172. package/src/components/Form/AccessRights/AccessRights.resource.ts +0 -45
  173. package/src/components/Form/AccessRights/AccessRightsForm.stories.tsx +0 -59
  174. package/src/components/Form/AccessRights/AccessRightsForm.styles.ts +0 -21
  175. package/src/components/Form/AccessRights/AccessRightsForm.tsx +0 -67
  176. package/src/components/Form/AccessRights/AccessRightsFormActions.tsx +0 -80
  177. package/src/components/Form/AccessRights/Input/AddAction.tsx +0 -31
  178. package/src/components/Form/AccessRights/Input/ContactAccessRightInput.stories.tsx +0 -54
  179. package/src/components/Form/AccessRights/Input/ContactAccessRightInput.tsx +0 -72
  180. package/src/components/Form/AccessRights/Input/ContactAccessRightsInput.styles.ts +0 -22
  181. package/src/components/Form/AccessRights/Input/ContactInputField.tsx +0 -105
  182. package/src/components/Form/AccessRights/Input/RoleInputField.tsx +0 -29
  183. package/src/components/Form/AccessRights/List/ContactAccessRightsList.stories.tsx +0 -97
  184. package/src/components/Form/AccessRights/List/ContactAccessRightsList.styles.ts +0 -71
  185. package/src/components/Form/AccessRights/List/ContactAccessRightsList.tsx +0 -51
  186. package/src/components/Form/AccessRights/List/ContactAccessRightsListItem.stories.tsx +0 -116
  187. package/src/components/Form/AccessRights/List/ContactAccessRightsListItem.tsx +0 -118
  188. package/src/components/Form/AccessRights/List/ContactAccessRightsListItemSkeleton.tsx +0 -26
  189. package/src/components/Form/AccessRights/List/ContactAccessRightsListSkeleton.tsx +0 -28
  190. package/src/components/Form/AccessRights/Stats/AccessRightsStats.styles.ts +0 -18
  191. package/src/components/Form/AccessRights/Stats/AccessRightsStats.tsx +0 -41
  192. package/src/components/Form/AccessRights/__fixtures__/contactAccessRight.mock.ts +0 -54
  193. package/src/components/Form/AccessRights/common/GroupLabel.styles.ts +0 -18
  194. package/src/components/Form/AccessRights/common/GroupLabel.tsx +0 -15
  195. package/src/components/Form/AccessRights/common/Input.styles.ts +0 -48
  196. package/src/components/Form/AccessRights/common/RoleInputSelect.styles.ts +0 -11
  197. package/src/components/Form/AccessRights/common/RoleInputSelect.tsx +0 -57
  198. package/src/components/Form/AccessRights/index.ts +0 -3
  199. package/src/components/Form/AccessRights/useAccessRightsForm.test.tsx +0 -531
  200. package/src/components/Form/AccessRights/useAccessRightsForm.tsx +0 -282
  201. package/src/components/Form/AccessRights/useAccessRightsForm.utils.ts +0 -41
  202. /package/src/components/Form/{AccessRightsV2 → AccessRights}/AccessRights.stories.tsx +0 -0
  203. /package/src/components/Form/{AccessRightsV2 → AccessRights}/AccessRights.styles.ts +0 -0
  204. /package/src/components/Form/{AccessRightsV2 → AccessRights}/AccessRights.tsx +0 -0
  205. /package/src/components/Form/{AccessRightsV2 → AccessRights}/Actions/Actions.styles.ts +0 -0
  206. /package/src/components/Form/{AccessRightsV2 → AccessRights}/Actions/Actions.tsx +0 -0
  207. /package/src/components/Form/{AccessRightsV2 → AccessRights}/Actions/useActions.ts +0 -0
  208. /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/Item.tsx +0 -0
  209. /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/List.styles.tsx +0 -0
  210. /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/List.tsx +0 -0
  211. /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/ListItemSkeleton.tsx +0 -0
  212. /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/ListSkeleton.tsx +0 -0
  213. /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/RemoveAccessRight.tsx +0 -0
  214. /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/StateChip.tsx +0 -0
  215. /package/src/components/Form/{AccessRightsV2 → AccessRights}/List/useItem.ts +0 -0
  216. /package/src/components/Form/{AccessRightsV2 → AccessRights}/Provider.tsx +0 -0
  217. /package/src/components/Form/{AccessRightsV2 → AccessRights}/Stats/Stats.tsx +0 -0
  218. /package/src/components/Form/{AccessRightsV2 → AccessRights}/atoms.ts +0 -0
  219. /package/src/components/Form/{AccessRightsV2 → AccessRights}/common/RoleSelectField.styles.tsx +0 -0
  220. /package/src/components/Form/{AccessRightsV2 → AccessRights}/common/RoleSelectField.tsx +0 -0
  221. /package/src/components/Form/{AccessRightsV2 → AccessRights}/useAccessRightsInitValues.ts +0 -0
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@centreon/ui",
3
- "version": "24.4.1-sync-release-34022.1",
3
+ "version": "24.4.1-sync-dev-2404.0",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
+ "update:deps": "pnpx npm-check-updates -i --format group",
6
7
  "eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx --max-warnings 0",
7
8
  "eslint:fix": "pnpm eslint --fix",
8
9
  "storybook": "storybook dev -p 9001 -c .storybook",
@@ -28,6 +29,7 @@
28
29
  "author": {
29
30
  "name": "centreon@centreon.com"
30
31
  },
32
+ "baseCodeCoveragePercentage": 60,
31
33
  "license": "GPL-2.0",
32
34
  "bugs": {
33
35
  "url": "https://github.com/centreon/centreon/issues"
@@ -47,11 +49,11 @@
47
49
  "test/*"
48
50
  ],
49
51
  "devDependencies": {
50
- "@cypress/react": "^7.0.2",
51
- "@cypress/webpack-dev-server": "^3.2.3",
52
- "@faker-js/faker": "^8.0.2",
53
- "@mdx-js/react": "^2.1.4",
54
- "@simonsmith/cypress-image-snapshot": "^6.1.0",
52
+ "@cypress/react": "^8.0.0",
53
+ "@cypress/webpack-dev-server": "^3.7.4",
54
+ "@faker-js/faker": "^8.4.1",
55
+ "@mdx-js/react": "^3.0.1",
56
+ "@simonsmith/cypress-image-snapshot": "^9.0.1",
55
57
  "@storybook/addon-a11y": "^7.0.9",
56
58
  "@storybook/addon-docs": "^7.0.9",
57
59
  "@storybook/addon-essentials": "^7.0.9",
@@ -61,27 +63,26 @@
61
63
  "@storybook/builder-vite": "^7.0.9",
62
64
  "@storybook/jest": "^0.1.0",
63
65
  "@storybook/manager-api": "^7.0.9",
64
- "@storybook/mdx2-csf": "^1.0.0",
66
+ "@storybook/mdx2-csf": "^1.1.0",
65
67
  "@storybook/preview-api": "^7.0.9",
66
68
  "@storybook/react": "^7.0.9",
67
69
  "@storybook/react-vite": "^7.0.9",
68
- "@storybook/test-runner": "^0.10.0",
70
+ "@storybook/test-runner": "^0.16.0",
69
71
  "@storybook/testing-library": "^0.1.0",
70
72
  "@storybook/theming": "^7.0.9",
71
73
  "@testing-library/cypress": "^8.0.7",
72
74
  "@testing-library/jest-dom": "^5.16.5",
73
75
  "@testing-library/react": "^13.4.0",
74
76
  "@testing-library/react-hooks": "^8.0.1",
75
- "@types/cypress": "^1.1.3",
76
- "@types/jest": "^27.5.0",
77
+ "@types/jest": "^29.5.12",
77
78
  "@types/mocha": "^10.0.6",
78
- "@types/ramda": "^0.29.6",
79
- "@types/react": "^18.0.26",
80
- "@types/testing-library__jest-dom": "^5.14.6",
81
- "@vitejs/plugin-react": "^4.0.0",
82
- "@vitejs/plugin-react-swc": "^3.3.0",
83
- "axios-mock-adapter": "^1.21.4",
84
- "cypress": "^13.3.1",
79
+ "@types/ramda": "^0.29.9",
80
+ "@types/react": "^18.2.65",
81
+ "@types/testing-library__jest-dom": "^6.0.0",
82
+ "@vitejs/plugin-react": "^4.2.1",
83
+ "@vitejs/plugin-react-swc": "^3.6.0",
84
+ "axios-mock-adapter": "^1.22.0",
85
+ "cypress": "^13.7.1",
85
86
  "identity-obj-proxy": "^3.0.0",
86
87
  "jest-transform-stub": "^2.0.0",
87
88
  "mochawesome": "^7.1.3",
@@ -92,46 +93,53 @@
92
93
  "react-dom": "^18.2.0",
93
94
  "react-test-renderer": "^18.2.0",
94
95
  "remark-gfm": "^3.0.1",
95
- "sass": "^1.62.1",
96
96
  "speed-measure-vite-plugin": "^0.1.2",
97
- "storybook": "^7.0.9",
98
- "storybook-addon-mock": "^4.0.0",
99
- "storybook-dark-mode": "^3.0.0",
100
- "style-dictionary": "^3.8.0",
101
- "ts-node": "^10.9.1",
97
+ "storybook": "^7.6.8",
98
+ "storybook-addon-mock": "^4.3.0",
99
+ "storybook-dark-mode": "^3.0.3",
100
+ "style-dictionary": "^3.9.2",
101
+ "ts-node": "^10.9.2",
102
102
  "use-resize-observer": "^9.1.0",
103
103
  "vite": "^4.3.5",
104
104
  "vite-plugin-istanbul": "^5.0.0",
105
105
  "vite-plugin-svgr": "^3.2.0",
106
- "vite-plugin-turbosnap": "^1.0.2"
106
+ "vite-plugin-turbosnap": "^1.0.3"
107
107
  },
108
108
  "dependencies": {
109
- "@lexical/html": "^0.12.2",
110
- "@lexical/link": "^0.12.2",
111
- "@lexical/list": "^0.12.2",
112
- "@lexical/react": "^0.12.2",
113
- "@lexical/rich-text": "^0.12.2",
114
- "@lexical/selection": "^0.12.2",
115
- "@lexical/utils": "^0.12.2",
109
+ "@lexical/html": "^0.12.6",
110
+ "@lexical/link": "^0.12.6",
111
+ "@lexical/list": "^0.12.6",
112
+ "@lexical/react": "^0.12.6",
113
+ "@lexical/rich-text": "^0.12.6",
114
+ "@lexical/selection": "^0.12.6",
115
+ "@lexical/utils": "^0.12.6",
116
116
  "@react-spring/web": "^9.7.3",
117
+ "@visx/clip-path": "^3.3.0",
117
118
  "@visx/curve": "^2.1.0",
119
+ "@visx/event": "^3.3.0",
118
120
  "@visx/group": "^3.3.0",
119
- "@visx/pattern": "^3.0.0",
120
- "@visx/scale": "^3.0.0",
121
- "@visx/shape": "^2.12.2",
121
+ "@visx/hierarchy": "^3.3.0",
122
+ "@visx/legend": "^3.5.0",
123
+ "@visx/pattern": "^3.3.0",
124
+ "@visx/point": "^3.3.0",
125
+ "@visx/scale": "^3.5.0",
126
+ "@visx/shape": "^2.18.0",
127
+ "@visx/text": "^3.3.0",
122
128
  "@visx/threshold": "^2.12.2",
123
129
  "@visx/visx": "2.16.0",
130
+ "@visx/zoom": "^3.3.0",
124
131
  "anylogger": "^1.0.11",
125
- "d3-array": "3.2.0",
126
- "humanize-duration": "^3.27.3",
127
- "lexical": "^0.12.2",
132
+ "d3-array": "3.2.4",
133
+ "humanize-duration": "^3.31.0",
134
+ "lexical": "^0.12.6",
128
135
  "notistack": "^3.0.1",
136
+ "numeral": "^2.0.6",
129
137
  "ramda": "0.29.1",
130
- "react-grid-layout": "^1.3.4",
138
+ "react-grid-layout": "^1.4.4",
131
139
  "react-html-parser": "^2.0.2",
132
140
  "react-resizable": "^3.0.5",
133
141
  "react-transition-group": "^4.4.5",
134
- "sanitize-html": "^2.10.0",
142
+ "sanitize-html": "^2.12.1",
135
143
  "ulog": "^2.0.0-beta.19"
136
144
  },
137
145
  "peerDependencies": {
@@ -143,7 +151,7 @@
143
151
  "@mui/material": "5.x",
144
152
  "@mui/styles": "5.x",
145
153
  "@tanstack/react-query": "5.x",
146
- "axios": "0.x",
154
+ "axios": ">= 1.6.4",
147
155
  "dayjs": "1.x",
148
156
  "formik": "2.x",
149
157
  "jotai": "2.x",
@@ -1,7 +1,7 @@
1
1
  import { makeStyles } from 'tss-react/mui';
2
2
  import { equals } from 'ramda';
3
3
 
4
- import { Theme, alpha } from '@mui/material';
4
+ import { Theme } from '@mui/material';
5
5
 
6
6
  interface GetBackgroundAndColorProps {
7
7
  status: string;
@@ -18,96 +18,65 @@ export const useStyles = makeStyles()((theme) => ({
18
18
  '& .MuiListItemText-secondary': {
19
19
  textWrap: 'pretty'
20
20
  },
21
- '&[data-variant="error"]': {
21
+
22
+ '&:hover': {
22
23
  '& .MuiListItemIcon-root': {
23
- color: getColor({ status: 'error', theme })
24
- },
24
+ color: getColor({ status: 'info', theme })
25
+ }
26
+ },
27
+ '&[data-variant="error"]': {
25
28
  '&:hover': {
26
- background: alpha(
27
- theme.palette.error.main,
28
- theme.palette.action.focusOpacity
29
- ),
30
- color: getColor({ status: 'error', theme })
31
- },
32
- color: theme.palette.error.main
29
+ '& .MuiListItemIcon-root': {
30
+ color: getColor({ status: 'error', theme })
31
+ }
32
+ }
33
33
  },
34
34
  '&[data-variant="info"]': {
35
- '& .MuiListItemIcon-root': {
36
- color: getColor({ status: 'info', theme })
37
- },
38
35
  '&:hover': {
39
- background: alpha(
40
- theme.palette.info.main,
41
- theme.palette.action.focusOpacity
42
- ),
43
- color: getColor({ status: 'info', theme })
44
- },
45
- color: theme.palette.info.main
36
+ '& .MuiListItemIcon-root': {
37
+ color: getColor({ status: 'info', theme })
38
+ }
39
+ }
46
40
  },
41
+
47
42
  '&[data-variant="pending"]': {
48
- '& .MuiListItemIcon-root': {
49
- color: getColor({ status: 'pending', theme })
50
- },
51
43
  '&:hover': {
52
- background: alpha(
53
- theme.palette.pending.main,
54
- theme.palette.action.focusOpacity
55
- ),
56
- color: getColor({ status: 'pending', theme })
57
- },
58
- color: theme.palette.pending.main
44
+ '& .MuiListItemIcon-root': {
45
+ color: getColor({ status: 'pending', theme })
46
+ }
47
+ }
59
48
  },
49
+
60
50
  '&[data-variant="primary"]': {
61
- '& .MuiListItemIcon-root': {
62
- color: getColor({ status: 'primary', theme })
63
- },
64
51
  '&:hover': {
65
- background: alpha(
66
- theme.palette.primary.main,
67
- theme.palette.action.focusOpacity
68
- ),
69
- color: getColor({ status: 'primary', theme })
70
- },
71
- color: theme.palette.primary.main
52
+ '& .MuiListItemIcon-root': {
53
+ color: getColor({ status: 'primary', theme })
54
+ }
55
+ }
72
56
  },
57
+
73
58
  '&[data-variant="secondary"]': {
74
- '& .MuiListItemIcon-root': {
75
- color: getColor({ status: 'secondary', theme })
76
- },
77
59
  '&:hover': {
78
- background: alpha(
79
- theme.palette.secondary.main,
80
- theme.palette.action.focusOpacity
81
- ),
82
- color: getColor({ status: 'secondary', theme })
83
- },
84
- color: theme.palette.secondary.main
60
+ '& .MuiListItemIcon-root': {
61
+ color: getColor({ status: 'secondary', theme })
62
+ }
63
+ }
85
64
  },
65
+
86
66
  '&[data-variant="success"]': {
87
- '& .MuiListItemIcon-root': {
88
- color: getColor({ status: 'success', theme })
89
- },
90
67
  '&:hover': {
91
- background: alpha(
92
- theme.palette.success.main,
93
- theme.palette.action.focusOpacity
94
- ),
95
- color: getColor({ status: 'success', theme })
96
- },
97
- color: theme.palette.success.main
68
+ '& .MuiListItemIcon-root': {
69
+ color: getColor({ status: 'success', theme })
70
+ }
71
+ }
98
72
  },
73
+
99
74
  '&[data-variant="warning"]': {
100
- '& .MuiListItemIcon-root': {
101
- color: getColor({ status: 'warning', theme })
102
- },
103
75
  '&:hover': {
104
- background: alpha(
105
- theme.palette.warning.main,
106
- theme.palette.action.focusOpacity
107
- ),
108
- color: getColor({ status: 'warning', theme })
109
- },
110
- color: theme.palette.warning.main
76
+ '& .MuiListItemIcon-root': {
77
+ color: getColor({ status: 'warning', theme })
78
+ }
79
+ }
111
80
  }
112
81
  },
113
82
  list: {
@@ -4,7 +4,7 @@ import { makeStyles } from 'tss-react/mui';
4
4
  import AccessibilityIcon from '@mui/icons-material/Accessibility';
5
5
  import { Theme } from '@mui/material';
6
6
 
7
- import IconButton from '.';
7
+ import { IconButton } from '.';
8
8
 
9
9
  const useStyles = makeStyles()((theme: Theme) => ({
10
10
  root: {
@@ -38,7 +38,7 @@ type Props = {
38
38
  | 'top-start';
39
39
  } & IconButtonProps;
40
40
 
41
- const IconButton = ({
41
+ export const IconButton = ({
42
42
  title = '',
43
43
  ariaLabel,
44
44
  className,
@@ -76,11 +76,12 @@ export const useDashboardItemStyles = makeStyles<{ hasHeader: boolean }>()(
76
76
  border: 'none',
77
77
  borderRadius: theme.spacing(1),
78
78
  height: '100%',
79
- paddingBottom: theme.spacing(2),
80
79
  width: '100%'
81
80
  },
82
81
  widgetContent: {
83
- height: '100%'
82
+ height: hasHeader
83
+ ? `calc(100% - ${theme.spacing(3.5)} - ${theme.spacing(0.5)})`
84
+ : `calc(100% - ${theme.spacing(3.5)})`
84
85
  },
85
86
  widgetHeader: {
86
87
  '&:hover': {
@@ -92,17 +93,17 @@ export const useDashboardItemStyles = makeStyles<{ hasHeader: boolean }>()(
92
93
  '&[data-canMove="true"]': {
93
94
  cursor: 'move'
94
95
  },
95
- padding: theme.spacing(0.5, 2),
96
+ padding: theme.spacing(0, 1.5),
96
97
  position: 'relative'
97
98
  },
98
99
  widgetHeaderDraggable: {
99
100
  height: '100%',
100
101
  position: 'absolute',
101
- width: '100%'
102
+ width: '95%'
102
103
  },
103
104
  widgetPadding: {
104
105
  overflowX: 'auto',
105
- padding: hasHeader ? theme.spacing(1, 2, 0) : theme.spacing(1, 2)
106
+ padding: theme.spacing(0.5, 1.5, 1.5)
106
107
  }
107
108
  })
108
109
  );
@@ -1,4 +1,4 @@
1
- import { DialogContentText, Typography } from '@mui/material';
1
+ import { ButtonProps, DialogContentText, Typography } from '@mui/material';
2
2
 
3
3
  import Dialog, { Props as DialogProps } from '..';
4
4
 
@@ -6,15 +6,23 @@ type Props = DialogProps & {
6
6
  children?: JSX.Element;
7
7
  labelMessage?: string | null;
8
8
  labelSecondMessage?: string | null;
9
+ restCancelButtonProps?: ButtonProps;
10
+ restConfirmButtonProps?: ButtonProps;
9
11
  };
10
12
 
11
13
  const Confirm = ({
12
14
  labelMessage,
13
15
  labelSecondMessage,
14
16
  children,
17
+ restCancelButtonProps,
18
+ restConfirmButtonProps,
15
19
  ...rest
16
20
  }: Props): JSX.Element => (
17
- <Dialog {...rest}>
21
+ <Dialog
22
+ restCancelButtonProps={restCancelButtonProps}
23
+ restConfirmButtonProps={restConfirmButtonProps}
24
+ {...rest}
25
+ >
18
26
  <DialogContentText>
19
27
  {labelMessage && <Typography>{labelMessage}</Typography>}
20
28
  {labelSecondMessage && <Typography>{labelSecondMessage}</Typography>}
@@ -1,18 +1,17 @@
1
1
  import { not } from 'ramda';
2
2
  import { useTranslation } from 'react-i18next';
3
3
 
4
- import { ConfirmDialog } from '../..';
4
+ import { Modal } from '../../components/Modal';
5
5
 
6
6
  import {
7
7
  labelDiscard,
8
8
  labelDoYouWantToQuitWithoutResolving,
9
- labelDoYouWantToQuitWithoutSaving,
10
9
  labelDoYouWantToResolveErrors,
11
10
  labelDoYouWantToSaveChanges,
12
11
  labelResolve,
13
12
  labelSave,
14
13
  labelThereAreErrorsInTheForm,
15
- labelYourFormHasUnsavedChanges
14
+ labelIfYouClickOnDiscard
16
15
  } from './translatedLabels';
17
16
 
18
17
  interface Props {
@@ -40,30 +39,32 @@ const UnsavedChangesDialog = ({
40
39
  const labelConfirm = isValidForm ? labelSave : labelResolve;
41
40
 
42
41
  const labelMessage = `${
43
- isValidForm ? labelYourFormHasUnsavedChanges : labelThereAreErrorsInTheForm
44
- }. ${
45
- isValidForm
46
- ? labelDoYouWantToQuitWithoutSaving
47
- : labelDoYouWantToQuitWithoutResolving
48
- }`;
42
+ isValidForm ? labelIfYouClickOnDiscard : labelThereAreErrorsInTheForm
43
+ }. ${isValidForm ? '' : labelDoYouWantToQuitWithoutResolving}`;
49
44
 
50
45
  if (not(dialogOpened)) {
51
46
  return null;
52
47
  }
53
48
 
54
49
  return (
55
- <ConfirmDialog
56
- confirmDisabled={isSubmitting}
57
- labelCancel={t(labelDiscard)}
58
- labelConfirm={t(labelConfirm)}
59
- labelMessage={t(labelMessage)}
60
- labelTitle={t(labelTitle)}
50
+ <Modal
51
+ hasCloseButton
61
52
  open={dialogOpened}
62
- submitting={isSubmitting}
63
- onBackdropClick={closeDialog}
64
- onCancel={discardChanges}
65
- onConfirm={isValidForm ? saveChanges : closeDialog}
66
- />
53
+ size="medium"
54
+ onClose={closeDialog}
55
+ >
56
+ <Modal.Header>{t(labelTitle)}</Modal.Header>
57
+ <Modal.Body>{t(labelMessage)}</Modal.Body>
58
+ <Modal.Actions
59
+ disabled={isSubmitting}
60
+ labels={{
61
+ cancel: t(labelDiscard),
62
+ confirm: t(labelConfirm)
63
+ }}
64
+ onCancel={discardChanges}
65
+ onConfirm={isValidForm ? saveChanges : closeDialog}
66
+ />
67
+ </Modal>
67
68
  );
68
69
  };
69
70
 
@@ -1,9 +1,8 @@
1
1
  export const labelDiscard = 'Discard';
2
2
  export const labelResolve = 'Resolve';
3
- export const labelYourFormHasUnsavedChanges = 'Your form has unsaved changes';
3
+ export const labelIfYouClickOnDiscard =
4
+ 'If you click on Discard, your changes will not be saved.';
4
5
  export const labelThereAreErrorsInTheForm = 'There are errors in the form';
5
- export const labelDoYouWantToQuitWithoutSaving =
6
- 'Do you want to quit the form without saving the changes?';
7
6
  export const labelDoYouWantToQuitWithoutResolving =
8
7
  'Do you want to quit the form without resolving the errors?';
9
8
  export const labelDoYouWantToSaveChanges = 'Do you want to save the changes?';
@@ -14,11 +13,10 @@ export const labelSave = 'Save';
14
13
  export default {
15
14
  labelDiscard,
16
15
  labelDoYouWantToQuitWithoutResolving,
17
- labelDoYouWantToQuitWithoutSaving,
18
16
  labelDoYouWantToResolveErrors,
19
17
  labelDoYouWantToSaveChanges,
18
+ labelIfYouClickOnDiscard,
20
19
  labelResolve,
21
20
  labelSave,
22
- labelThereAreErrorsInTheForm,
23
- labelYourFormHasUnsavedChanges
21
+ labelThereAreErrorsInTheForm
24
22
  };
@@ -9,7 +9,8 @@ import {
9
9
  DialogContent,
10
10
  DialogActions,
11
11
  DialogProps,
12
- CircularProgress
12
+ CircularProgress,
13
+ ButtonProps
13
14
  } from '@mui/material';
14
15
 
15
16
  import { DataTestAttributes } from '../@types/data-attributes';
@@ -48,6 +49,8 @@ export type Props = {
48
49
  onClose?: () => void;
49
50
  onConfirm: (event, value?) => void;
50
51
  open: boolean;
52
+ restCancelButtonProps?: ButtonProps;
53
+ restConfirmButtonProps?: ButtonProps;
51
54
  submitting?: boolean;
52
55
  } & DialogProps &
53
56
  DataTestAttributes;
@@ -70,6 +73,8 @@ const Dialog = ({
70
73
  dialogContentClassName,
71
74
  dialogActionsClassName,
72
75
  dialogConfirmButtonClassName,
76
+ restCancelButtonProps,
77
+ restConfirmButtonProps,
73
78
  ...rest
74
79
  }: Props): JSX.Element => {
75
80
  const { classes, cx } = useStyles({ contentWidth });
@@ -101,6 +106,7 @@ const Dialog = ({
101
106
  data-testid="Cancel"
102
107
  disabled={cancelDisabled}
103
108
  onClick={onCancel}
109
+ {...restCancelButtonProps}
104
110
  >
105
111
  {labelCancel}
106
112
  </Button>
@@ -113,6 +119,7 @@ const Dialog = ({
113
119
  disabled={confirmDisabled}
114
120
  endIcon={submitting && <CircularProgress size={15} />}
115
121
  onClick={onConfirm}
122
+ {...restConfirmButtonProps}
116
123
  >
117
124
  {labelConfirm}
118
125
  </Button>
@@ -46,7 +46,10 @@ const CheckboxGroup = ({
46
46
  return;
47
47
  }
48
48
 
49
- setFieldValue(fieldName, value?.filter((elm) => !equals(elm, label)));
49
+ setFieldValue(
50
+ fieldName,
51
+ value?.filter((elm) => !equals(elm, label))
52
+ );
50
53
  };
51
54
 
52
55
  return useMemoComponent({
@@ -29,7 +29,8 @@ const Text = ({
29
29
  getRequired,
30
30
  change,
31
31
  additionalMemoProps,
32
- text
32
+ text,
33
+ autoFocus
33
34
  }: InputPropsWithoutGroup): JSX.Element => {
34
35
  const { t } = useTranslation();
35
36
 
@@ -109,6 +110,7 @@ const Text = ({
109
110
  fullWidth
110
111
  EndAdornment={EndAdornment}
111
112
  ariaLabel={t(label) || ''}
113
+ autoFocus={autoFocus}
112
114
  dataTestId={dataTestId || ''}
113
115
  disabled={disabled}
114
116
  error={error as string | undefined}
@@ -33,6 +33,7 @@ export interface InputProps {
33
33
  additionalLabel?: string | JSX.Element;
34
34
  additionalLabelClassName?: string;
35
35
  additionalMemoProps?: Array<unknown>;
36
+ autoFocus?: boolean;
36
37
  autocomplete?: {
37
38
  creatable?: boolean;
38
39
  options: Array<SelectEntry>;