@centreon/ui 24.8.6 → 24.8.7

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 (356) hide show
  1. package/package.json +4 -3
  2. package/src/@types/globals.d.ts +4 -4
  3. package/src/ActionsList/ActionsList.styles.ts +1 -1
  4. package/src/ActionsList/index.stories.tsx +1 -1
  5. package/src/ActionsList/index.tsx +6 -6
  6. package/src/Button/Icon/index.stories.tsx +1 -1
  7. package/src/Button/Icon/index.tsx +1 -1
  8. package/src/Button/Save/StartIcon.tsx +1 -1
  9. package/src/Checkbox/Checkbox.tsx +2 -2
  10. package/src/Colors/index.stories.tsx +0 -2
  11. package/src/Colors/index.tsx +7 -3
  12. package/src/ContentWithCircularProgress/index.stories.tsx +1 -1
  13. package/src/Dashboard/Dashboard.styles.ts +111 -111
  14. package/src/Dashboard/Grid.tsx +2 -2
  15. package/src/Dashboard/Item.tsx +3 -3
  16. package/src/Dashboard/Layout.tsx +3 -3
  17. package/src/Dashboard/index.tsx +9 -9
  18. package/src/Dialog/Duplicate/index.test.tsx +1 -1
  19. package/src/Dialog/Duplicate/index.tsx +5 -2
  20. package/src/Dialog/UnsavedChanges/index.tsx +2 -2
  21. package/src/Dialog/index.stories.tsx +1 -1
  22. package/src/Dialog/index.tsx +5 -5
  23. package/src/FallbackPage/FallbackPage.tsx +4 -4
  24. package/src/FileDropZone/index.stories.tsx +1 -1
  25. package/src/FileDropZone/index.tsx +5 -5
  26. package/src/FileDropZone/useDropzone.test.ts +1 -1
  27. package/src/FileDropZone/useDropzone.ts +1 -1
  28. package/src/Form/CollapsibleGroup.tsx +6 -6
  29. package/src/Form/Form.cypress.spec.tsx +1 -1
  30. package/src/Form/Form.stories.tsx +3 -3
  31. package/src/Form/Form.tsx +5 -4
  32. package/src/Form/FormButtons.tsx +2 -2
  33. package/src/Form/Inputs/Autocomplete.tsx +3 -3
  34. package/src/Form/Inputs/Checkbox.tsx +1 -1
  35. package/src/Form/Inputs/CheckboxGroup.tsx +2 -2
  36. package/src/Form/Inputs/ConnectedAutocomplete.tsx +1 -1
  37. package/src/Form/Inputs/FieldsTable/FieldsTable.tsx +15 -15
  38. package/src/Form/Inputs/FieldsTable/Row.tsx +2 -2
  39. package/src/Form/Inputs/List/Content.tsx +1 -1
  40. package/src/Form/Inputs/List/List.tsx +3 -3
  41. package/src/Form/Inputs/PasswordEndAdornment.tsx +1 -1
  42. package/src/Form/Inputs/Radio.tsx +3 -3
  43. package/src/Form/Inputs/Switch.tsx +1 -1
  44. package/src/Form/Inputs/Text.tsx +4 -4
  45. package/src/Form/Inputs/index.tsx +81 -72
  46. package/src/Form/Inputs/models.ts +14 -14
  47. package/src/Form/storiesData.tsx +26 -30
  48. package/src/Form/storiesData.tsx-E +481 -0
  49. package/src/Graph/BarChart/BarChart.stories.tsx +1 -1
  50. package/src/Graph/BarChart/BarChart.tsx +3 -3
  51. package/src/Graph/BarChart/BarGroup.tsx +6 -4
  52. package/src/Graph/BarChart/BarStack.tsx +4 -4
  53. package/src/Graph/BarChart/ResponsiveBarChart.tsx +10 -10
  54. package/src/Graph/BarChart/Tooltip/BarChartTooltip.tsx +5 -5
  55. package/src/Graph/BarChart/useBarStack.ts +2 -2
  56. package/src/Graph/BarStack/BarStack.cypress.spec.tsx +1 -1
  57. package/src/Graph/BarStack/BarStack.stories.tsx +1 -1
  58. package/src/Graph/BarStack/ResponsiveBarStack.tsx +10 -6
  59. package/src/Graph/BarStack/useResponsiveBarStack.ts +4 -4
  60. package/src/Graph/Chart/BasicComponents/Lines/RegularLines/index.tsx +1 -1
  61. package/src/Graph/Chart/BasicComponents/Lines/RegularLines/useRegularLines.ts +1 -1
  62. package/src/Graph/Chart/BasicComponents/Lines/StackedLines/index.tsx +4 -4
  63. package/src/Graph/Chart/BasicComponents/Lines/Threshold/ThresholdWithPatternLines.tsx +1 -1
  64. package/src/Graph/Chart/BasicComponents/Lines/Threshold/index.tsx +1 -1
  65. package/src/Graph/Chart/BasicComponents/Lines/Threshold/models.ts +1 -1
  66. package/src/Graph/Chart/BasicComponents/Lines/Threshold/useScaleThreshold.ts +2 -2
  67. package/src/Graph/Chart/BasicComponents/Lines/index.tsx +7 -7
  68. package/src/Graph/Chart/BasicComponents/Lines/models.ts +1 -1
  69. package/src/Graph/Chart/Chart.cypress.spec.tsx +4 -4
  70. package/src/Graph/Chart/Chart.stories.tsx +6 -6
  71. package/src/Graph/Chart/Chart.tsx +11 -11
  72. package/src/Graph/Chart/InteractiveComponents/AnchorPoint/RegularAnchorPoint.tsx +1 -1
  73. package/src/Graph/Chart/InteractiveComponents/AnchorPoint/useTickGraph.ts +1 -1
  74. package/src/Graph/Chart/InteractiveComponents/Annotations/Annotation/Area.tsx +1 -1
  75. package/src/Graph/Chart/InteractiveComponents/Annotations/Annotation/Line.tsx +1 -1
  76. package/src/Graph/Chart/InteractiveComponents/Annotations/Annotation/index.tsx +3 -3
  77. package/src/Graph/Chart/InteractiveComponents/Annotations/Area/Downtime.tsx +1 -1
  78. package/src/Graph/Chart/InteractiveComponents/Annotations/EventAnnotations.tsx +3 -3
  79. package/src/Graph/Chart/InteractiveComponents/Annotations/Line/Comments.tsx +1 -1
  80. package/src/Graph/Chart/InteractiveComponents/Annotations/annotationsAtoms.ts +4 -4
  81. package/src/Graph/Chart/InteractiveComponents/Bar.tsx +1 -1
  82. package/src/Graph/Chart/InteractiveComponents/GraphValueTooltip/GraphValueTooltip.tsx +1 -1
  83. package/src/Graph/Chart/InteractiveComponents/GraphValueTooltip/GraphValueTooltipContent.tsx +1 -1
  84. package/src/Graph/Chart/InteractiveComponents/GraphValueTooltip/useGraphValueTooltip.ts +3 -3
  85. package/src/Graph/Chart/InteractiveComponents/TimeShiftZones/index.tsx +1 -1
  86. package/src/Graph/Chart/InteractiveComponents/TimeShiftZones/models.ts +2 -2
  87. package/src/Graph/Chart/InteractiveComponents/Tooltip/useGraphTooltip.ts +1 -1
  88. package/src/Graph/Chart/InteractiveComponents/index.tsx +7 -7
  89. package/src/Graph/Chart/Legend/LegendHeader.tsx +2 -2
  90. package/src/Graph/Chart/Legend/index.tsx +3 -3
  91. package/src/Graph/Chart/common/index.ts +5 -5
  92. package/src/Graph/Chart/helpers/index.ts +5 -5
  93. package/src/Graph/Chart/index.tsx +2 -2
  94. package/src/Graph/Chart/models.ts +4 -4
  95. package/src/Graph/Gauge/AnimatedPie.tsx +1 -1
  96. package/src/Graph/Gauge/Gauge.cypress.spec.tsx +2 -2
  97. package/src/Graph/Gauge/PieData.tsx +1 -1
  98. package/src/Graph/Gauge/ResponsiveGauge.tsx +5 -5
  99. package/src/Graph/Gauge/models.ts +3 -3
  100. package/src/Graph/HeatMap/HeatMap.cypress.spec.tsx +3 -3
  101. package/src/Graph/HeatMap/HeatMapData.json +1 -1
  102. package/src/Graph/HeatMap/ResponsiveHeatMap.tsx +1 -1
  103. package/src/Graph/PieChart/PieChart.stories.tsx +1 -1
  104. package/src/Graph/PieChart/ResponsivePie.tsx +7 -3
  105. package/src/Graph/SingleBar/ResponsiveSingleBar.tsx +8 -8
  106. package/src/Graph/SingleBar/SingleBar.cypress.spec.tsx +1 -1
  107. package/src/Graph/SingleBar/SingleBar.tsx +1 -1
  108. package/src/Graph/Text/Text.cypress.spec.tsx +2 -2
  109. package/src/Graph/Tree/DescendantNodes.tsx +1 -1
  110. package/src/Graph/Tree/Links.tsx +5 -5
  111. package/src/Graph/Tree/StandaloneTree.tsx +1 -1
  112. package/src/Graph/Tree/Tree.cypress.spec.tsx +2 -2
  113. package/src/Graph/Tree/Tree.stories.tsx +2 -2
  114. package/src/Graph/Tree/Tree.tsx +3 -3
  115. package/src/Graph/Tree/stories/contents.tsx +2 -2
  116. package/src/Graph/common/Axes/index.tsx +1 -1
  117. package/src/Graph/common/Axes/models.ts +1 -1
  118. package/src/Graph/common/Axes/useAxisY.ts +1 -1
  119. package/src/Graph/common/BaseChart/BaseChart.tsx +1 -1
  120. package/src/Graph/common/BaseChart/Header/index.tsx +1 -1
  121. package/src/Graph/common/Thresholds/Thresholds.tsx +2 -2
  122. package/src/Graph/common/timeSeries/index.test.ts +57 -45
  123. package/src/Graph/common/timeSeries/index.test.ts-E +622 -0
  124. package/src/Graph/common/timeSeries/index.ts +30 -30
  125. package/src/Graph/common/utils.ts +2 -2
  126. package/src/Graph/mockedData/annotationData.json +318 -320
  127. package/src/Graph/mockedData/curvesWithSameColor.json +1 -1
  128. package/src/Graph/mockedData/exclusionPeriodFirstPeriod.json +366 -586
  129. package/src/Graph/mockedData/exclusionPeriodSecondPeriod.json +370 -586
  130. package/src/Graph/mockedData/exclusionPeriodThirdPeriod.json +365 -579
  131. package/src/Graph/mockedData/lastDay.json +1290 -1324
  132. package/src/Graph/mockedData/lastDayAreaStack.json +3048 -3104
  133. package/src/Graph/mockedData/lastDayForward.json +1303 -1336
  134. package/src/Graph/mockedData/lastDayThreshold.json +2318 -2350
  135. package/src/Graph/mockedData/lastDayWithIncompleteValues.json +7 -41
  136. package/src/Graph/mockedData/lastDayWithLotOfUnits.json +1618 -1665
  137. package/src/Graph/mockedData/lastDayWithNullValues.json +7 -41
  138. package/src/Graph/mockedData/lastMonth.json +1639 -1672
  139. package/src/Graph/mockedData/lastWeek.json +2167 -2200
  140. package/src/Graph/mockedData/pingService.json +4 -12
  141. package/src/Graph/mockedData/pingServiceLinesBars.json +242 -250
  142. package/src/Graph/mockedData/pingServiceLinesBarsMixed.json +242 -250
  143. package/src/Graph/mockedData/pingServiceLinesBarsStacked.json +242 -250
  144. package/src/Graph/mockedData/pingServiceMixedStacked.json +4 -12
  145. package/src/Graph/mockedData/pingServiceStacked.json +4 -12
  146. package/src/Graph/mockedData/zoomPreview.json +370 -740
  147. package/src/Icon/IconAttach/index.tsx +1 -6
  148. package/src/Image/Image.tsx +75 -75
  149. package/src/Image/atoms.ts +3 -3
  150. package/src/Image/index.stories.tsx +1 -1
  151. package/src/Image/index.test.tsx +53 -53
  152. package/src/Image/models.ts +3 -3
  153. package/src/Image/useLoadImage.ts +49 -49
  154. package/src/InputField/Number/Number.tsx +2 -2
  155. package/src/InputField/Search/PersistentTooltip.tsx +2 -2
  156. package/src/InputField/Search/RegexpHelpTooltip.tsx +1 -1
  157. package/src/InputField/Search/index.stories.tsx +1 -1
  158. package/src/InputField/Select/Autocomplete/Connected/Multi/index.test.tsx +1 -1
  159. package/src/InputField/Select/Autocomplete/Connected/Multi/index.tsx +1 -1
  160. package/src/InputField/Select/Autocomplete/Connected/index.stories.tsx +4 -4
  161. package/src/InputField/Select/Autocomplete/Connected/index.test.tsx +6 -6
  162. package/src/InputField/Select/Autocomplete/Connected/index.tsx +12 -12
  163. package/src/InputField/Select/Autocomplete/Draggable/MultiConnected.tsx +1 -1
  164. package/src/InputField/Select/Autocomplete/Draggable/SortableList.tsx +1 -1
  165. package/src/InputField/Select/Autocomplete/Draggable/SortableListContent.tsx +5 -6
  166. package/src/InputField/Select/Autocomplete/Draggable/index.stories.tsx +6 -6
  167. package/src/InputField/Select/Autocomplete/Draggable/index.tsx +15 -16
  168. package/src/InputField/Select/Autocomplete/Multi/index.tsx +1 -1
  169. package/src/InputField/Select/Autocomplete/Popover/index.tsx +1 -1
  170. package/src/InputField/Select/Autocomplete/index.stories.tsx +2 -3
  171. package/src/InputField/Select/Autocomplete/index.tsx +10 -11
  172. package/src/InputField/Select/IconPopover/index.tsx +3 -3
  173. package/src/InputField/Select/Option.tsx +1 -1
  174. package/src/InputField/Select/index.tsx +6 -6
  175. package/src/InputField/Text/index.stories.tsx +3 -4
  176. package/src/InputField/Text/index.tsx +3 -3
  177. package/src/InputField/Text/useAutoSize.ts +62 -62
  178. package/src/LicenseMessage/index.tsx +1 -1
  179. package/src/Listing/ActionBar/ColumnMultiSelect.tsx +4 -4
  180. package/src/Listing/ActionBar/PaginationActions.tsx +1 -1
  181. package/src/Listing/ActionBar/index.tsx +6 -6
  182. package/src/Listing/Cell/DataCell.tsx +2 -2
  183. package/src/Listing/Cell/EllipsisTypography.tsx +0 -2
  184. package/src/Listing/Cell/index.tsx +7 -8
  185. package/src/Listing/Checkbox.tsx +1 -1
  186. package/src/Listing/EmptyResult/EmptyResult.tsx +0 -2
  187. package/src/Listing/Header/Cell/ListingHeaderCell.styles.ts +1 -1
  188. package/src/Listing/Header/Cell/ListingHeaderCell.tsx +1 -3
  189. package/src/Listing/Header/Cell/SelectActionListingHeaderCell.tsx +3 -5
  190. package/src/Listing/Header/ListingHeader.tsx +6 -7
  191. package/src/Listing/Header/_internals/DraggableIconButton.tsx +1 -3
  192. package/src/Listing/Header/_internals/Label.tsx +2 -3
  193. package/src/Listing/Listing.cypress.spec.tsx +307 -307
  194. package/src/Listing/Row/Row.tsx +4 -5
  195. package/src/Listing/Row/SkeletonLoaderRows.tsx +7 -9
  196. package/src/Listing/index.stories.tsx +1 -1
  197. package/src/Listing/index.tsx +32 -27
  198. package/src/Listing/useResizeObserver.ts +1 -1
  199. package/src/ListingPage/Filter.tsx +15 -18
  200. package/src/ListingPage/index.tsx +2 -2
  201. package/src/Logo/CentreonLogo.tsx +2 -2
  202. package/src/MenuSkeleton/index.tsx +1 -1
  203. package/src/Module/LicensedModule/LicenseCheck/index.tsx +1 -1
  204. package/src/Module/index.tsx +3 -3
  205. package/src/MultiSelectEntries/index.tsx +1 -1
  206. package/src/MultiSelectEntries/useHover.ts +1 -1
  207. package/src/Panel/Section/ExpandableSection.tsx +6 -6
  208. package/src/Panel/Section/index.test.tsx +1 -1
  209. package/src/Panel/Section/index.tsx +1 -1
  210. package/src/Panel/index.tsx +15 -13
  211. package/src/RichTextEditor/ContentEditable.tsx +195 -195
  212. package/src/RichTextEditor/RichTextEditor.tsx +244 -244
  213. package/src/RichTextEditor/index.ts +2 -2
  214. package/src/RichTextEditor/initialEditorState.json +113 -113
  215. package/src/RichTextEditor/plugins/AutoLinkPlugin/index.tsx +4 -4
  216. package/src/RichTextEditor/plugins/FloatingLinkEditorPlugin.tsx +10 -10
  217. package/src/RichTextEditor/plugins/ToolbarPlugin/AlignPicker.tsx +4 -4
  218. package/src/RichTextEditor/plugins/ToolbarPlugin/BlockButtons.tsx +7 -7
  219. package/src/RichTextEditor/plugins/ToolbarPlugin/FormatButtons.tsx +124 -124
  220. package/src/RichTextEditor/plugins/ToolbarPlugin/LinkButton.tsx +5 -5
  221. package/src/RichTextEditor/plugins/ToolbarPlugin/ListButton.tsx +2 -2
  222. package/src/RichTextEditor/plugins/ToolbarPlugin/MacrosButton.tsx +4 -4
  223. package/src/RichTextEditor/plugins/ToolbarPlugin/UndoRedoButtons.tsx +97 -97
  224. package/src/RichTextEditor/plugins/ToolbarPlugin/index.tsx +62 -62
  225. package/src/RichTextEditor/translatedLabels.ts +8 -8
  226. package/src/Snackbar/SnackbarProvider.tsx +3 -4
  227. package/src/Snackbar/Transition.tsx +5 -6
  228. package/src/Snackbar/index.tsx +7 -8
  229. package/src/SortableItems/Item.tsx +3 -3
  230. package/src/SortableItems/SortableItem.tsx +1 -1
  231. package/src/SortableItems/index.stories.tsx +5 -6
  232. package/src/SortableItems/index.tsx +18 -19
  233. package/src/StatusChip/index.tsx +1 -1
  234. package/src/StoryBookThemeProvider/index.tsx +35 -36
  235. package/src/ThemeProvider/index.tsx +8 -10
  236. package/src/ThemeProvider/palettes.ts +42 -27
  237. package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/PickersStartEndDate.tsx +1 -1
  238. package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/index.tsx +1 -1
  239. package/src/TimePeriods/SelectedTimePeriod.tsx +1 -1
  240. package/src/TimePeriods/TimePeriods.cypress.spec.tsx +3 -3
  241. package/src/TimePeriods/TimePeriods.tsx +1 -1
  242. package/src/TimePeriods/helpers/index.ts +1 -1
  243. package/src/TimePeriods/index.stories.tsx +1 -1
  244. package/src/TimePeriods/index.tsx +1 -1
  245. package/src/TimePeriods/models.ts +2 -2
  246. package/src/TimePeriods/timePeriodsAtoms.ts +1 -1
  247. package/src/TimePeriods/useTimePeriod.ts +4 -4
  248. package/src/TopCounterElements/ResourceSubMenu.tsx +1 -4
  249. package/src/TopCounterElements/StatusCounter.tsx +2 -2
  250. package/src/Typography/FluidTypography/index.tsx +46 -46
  251. package/src/Typography/Subtitle.tsx +2 -2
  252. package/src/Typography/story.utils.tsx +6 -6
  253. package/src/WallpaperPage/index.tsx +1 -1
  254. package/src/Wizard/ActionsBar.test.tsx +1 -1
  255. package/src/Wizard/ActionsBar.tsx +1 -1
  256. package/src/Wizard/StepIcon.tsx +1 -1
  257. package/src/Wizard/Stepper.tsx +2 -2
  258. package/src/Wizard/WizardContent.tsx +1 -1
  259. package/src/Wizard/index.stories.tsx +2 -2
  260. package/src/Wizard/index.test.tsx +3 -3
  261. package/src/Wizard/index.tsx +2 -2
  262. package/src/Wizard/models.ts +1 -1
  263. package/src/api/TestQueryProvider.tsx +24 -24
  264. package/src/api/buildListingDecoder.ts +1 -1
  265. package/src/api/buildListingEndpoint/getSearchQueryParameterValue.ts +11 -11
  266. package/src/api/buildListingEndpoint/index.ts +1 -1
  267. package/src/api/useFetchQuery/index.test.ts +1 -1
  268. package/src/api/useFetchQuery/index.ts +8 -8
  269. package/src/api/useGraphQuery/index.ts +1 -1
  270. package/src/api/useMutationQuery/index.test.ts +1 -1
  271. package/src/api/useMutationQuery/index.ts +4 -4
  272. package/src/api/useRequest/index.test.ts +1 -1
  273. package/src/api/useRequest/index.ts +3 -3
  274. package/src/base/tokens/source/$metadata.json +2 -4
  275. package/src/base/tokens/source/base.json +1 -1
  276. package/src/base/tokens/themes/base.tokens.json +34 -166
  277. package/src/base/tokens/themes/ui-dark.tokens.json +34 -166
  278. package/src/base/tokens/themes/ui-light.tokens.json +34 -166
  279. package/src/components/Button/Icon/IconButton.tsx +1 -1
  280. package/src/components/CollapsibleItem/CollapsibleItem.tsx +2 -2
  281. package/src/components/DataTable/DataListing.tsx +1 -1
  282. package/src/components/DataTable/DataTable.cypress.spec.tsx +1 -1
  283. package/src/components/DataTable/DataTable.stories.tsx +4 -1
  284. package/src/components/DataTable/EmptyState/DataTableEmptyState.tsx +1 -1
  285. package/src/components/DataTable/index.ts +2 -2
  286. package/src/components/Form/AccessRights/AccessRights.cypress.spec.tsx +11 -11
  287. package/src/components/Form/AccessRights/Actions/Actions.tsx +1 -1
  288. package/src/components/Form/AccessRights/List/Item.tsx +5 -5
  289. package/src/components/Form/AccessRights/List/List.tsx +4 -4
  290. package/src/components/Form/AccessRights/ShareInput/ContactSwitch.tsx +2 -2
  291. package/src/components/Form/AccessRights/ShareInput/ShareInput.styles.ts +1 -1
  292. package/src/components/Form/AccessRights/ShareInput/ShareInput.tsx +3 -3
  293. package/src/components/Form/AccessRights/ShareInput/useShareInput.tsx +2 -2
  294. package/src/components/Form/AccessRights/Stats/Stats.tsx +2 -2
  295. package/src/components/Form/AccessRights/atoms.ts +1 -1
  296. package/src/components/Form/AccessRights/storiesData.ts +1 -1
  297. package/src/components/Form/AccessRights/useAccessRightsChange.ts +1 -1
  298. package/src/components/Form/Dashboard/DashboardDuplicationForm.tsx +3 -3
  299. package/src/components/Form/Dashboard/DashboardForm.tsx +5 -5
  300. package/src/components/Form/Dashboard/GlobalRefreshFieldOption.tsx +4 -4
  301. package/src/components/Header/PageHeader/PageHeader.tsx +1 -1
  302. package/src/components/Header/PageHeader/PageHeaderActions.tsx +1 -1
  303. package/src/components/Header/PageHeader/PageHeaderMain.tsx +1 -1
  304. package/src/components/Header/PageHeader/PageHeaderMenu.tsx +1 -1
  305. package/src/components/Header/PageHeader/PageHeaderTitle.tsx +1 -1
  306. package/src/components/Header/PageHeader/index.ts +2 -2
  307. package/src/components/Inputs/Switch/Switch.tsx +1 -1
  308. package/src/components/ItemComposition/ItemComposition.stories.tsx +6 -4
  309. package/src/components/ItemComposition/index.ts +1 -1
  310. package/src/components/Layout/PageLayout/PageLayout.stories.tsx +1 -1
  311. package/src/components/Layout/PageLayout/PageQuickAccess.tsx +12 -13
  312. package/src/components/Layout/PageLayout/index.ts +2 -2
  313. package/src/components/List/Item/ListItem.tsx +3 -3
  314. package/src/components/List/Item/index.ts +2 -2
  315. package/src/components/List/List.stories.tsx +16 -14
  316. package/src/components/List/List.tsx +2 -2
  317. package/src/components/List/index.ts +1 -1
  318. package/src/components/Menu/Button/MenuButton.tsx +1 -1
  319. package/src/components/Menu/index.ts +2 -2
  320. package/src/components/Menu/useMenu.tsx +3 -3
  321. package/src/components/Modal/ConfirmationModal/ConfirmationModal.cypress.spec.tsx +1 -1
  322. package/src/components/Modal/ConfirmationModal/ConfirmationModal.stories.tsx +1 -1
  323. package/src/components/Modal/ConfirmationModal/ConfirmationModal.tsx +1 -1
  324. package/src/components/Modal/Modal.tsx +1 -1
  325. package/src/components/Modal/ModalBody.tsx +1 -1
  326. package/src/components/Modal/ModalHeader.tsx +1 -1
  327. package/src/components/Modal/index.ts +2 -2
  328. package/src/components/Tooltip/ConfirmationTooltip/ConfirmationTooltip.tsx +2 -2
  329. package/src/components/Tooltip/ConfirmationTooltip/TooltipContent.tsx +1 -1
  330. package/src/components/Tooltip/TextOverflowTooltip/TextOverflowTooltip.tsx +1 -1
  331. package/src/components/Zoom/Minimap.tsx +1 -1
  332. package/src/components/Zoom/Zoom.stories.tsx +1 -1
  333. package/src/components/Zoom/ZoomContent.tsx +3 -3
  334. package/src/components/Zoom/localPoint.ts +4 -4
  335. package/src/components/Zoom/useMinimap.ts +1 -1
  336. package/src/queryParameters/index.ts +1 -1
  337. package/src/styles/tokens/themes/_ui-dark.tokens.json +34 -166
  338. package/src/styles/tokens/themes/_ui-light.tokens.json +34 -166
  339. package/src/utils/index.ts +29 -29
  340. package/src/utils/resourcesStatusURL.ts +2 -2
  341. package/src/utils/sanitizedHTML.ts +1 -1
  342. package/src/utils/useCopyToClipboard.ts +1 -1
  343. package/src/utils/useDebounce.ts +1 -1
  344. package/src/utils/useFullscreen/useFullscreen.ts +2 -2
  345. package/src/utils/useInfiniteScrollListing.ts +129 -129
  346. package/src/utils/useIntersectionObserver.ts +1 -1
  347. package/src/utils/useKeyObserver.tsx +1 -1
  348. package/src/utils/useLicenseExpirationWarning.test.tsx +1 -1
  349. package/src/utils/useLicenseExpirationWarning.ts +1 -1
  350. package/src/utils/useLocaleDateTimeFormat/index.test.tsx +3 -3
  351. package/src/utils/useLocaleDateTimeFormat/index.ts +1 -1
  352. package/src/utils/useLocaleDateTimeFormat/localeFallback.test.tsx +4 -4
  353. package/src/utils/useLocaleTimezoneDate/LocaleTimezoneDate.cypress.spec.tsx +2 -2
  354. package/src/utils/useMemoComponent.ts +1 -1
  355. package/src/utils/usePluralizedTranslation.ts +2 -2
  356. package/src/utils/useViewportIntersection.ts +1 -1
@@ -1,11 +1,11 @@
1
- import { useTranslation } from 'react-i18next';
2
1
  import { useAtomValue } from 'jotai';
3
2
  import { identity } from 'ramda';
3
+ import { useTranslation } from 'react-i18next';
4
4
 
5
5
  import { Typography } from '@mui/material';
6
6
 
7
- import { Labels } from '../models';
8
7
  import { statsDerivedAtom } from '../atoms';
8
+ import { Labels } from '../models';
9
9
 
10
10
  interface Props {
11
11
  labels: Labels['list'];
@@ -1,7 +1,7 @@
1
1
  import { atom } from 'jotai';
2
2
  import { equals, pluck, prop, remove, update } from 'ramda';
3
3
 
4
- import { AccessRightInitialValues, AccessRight, ContactType } from './models';
4
+ import { AccessRight, AccessRightInitialValues, ContactType } from './models';
5
5
 
6
6
  export const valuesAtom = atom<Array<AccessRight>>([]);
7
7
  export const initialValuesAtom = atom<Array<AccessRightInitialValues>>([]);
@@ -1,7 +1,7 @@
1
1
  import { faker } from '@faker-js/faker';
2
2
 
3
- import { Listing } from '../../../api/models';
4
3
  import { SelectEntry } from '../../..';
4
+ import { Listing } from '../../../api/models';
5
5
 
6
6
  import { AccessRightInitialValues, Labels } from './models';
7
7
 
@@ -5,8 +5,8 @@ import { useAtomValue } from 'jotai';
5
5
  import { useDeepCompare } from '../../../utils';
6
6
 
7
7
  import { valuesAtom } from './atoms';
8
- import { formatValueForSubmition } from './utils';
9
8
  import { AccessRightInitialValues } from './models';
9
+ import { formatValueForSubmition } from './utils';
10
10
 
11
11
  export const useAccessRightsChange = (
12
12
  onChange?: (values: Array<AccessRightInitialValues>) => void
@@ -1,20 +1,20 @@
1
1
  import { ReactElement, useCallback, useMemo } from 'react';
2
2
 
3
- import { string, object } from 'yup';
4
3
  import { useTranslation } from 'react-i18next';
4
+ import { object, string } from 'yup';
5
5
 
6
- import { InputType } from '../../../Form/Inputs/models';
7
6
  import { Form, FormProps } from '../../../Form';
7
+ import { InputType } from '../../../Form/Inputs/models';
8
8
  import { FormVariant } from '../Form.models';
9
9
  import { FormActions, FormActionsProps } from '../FormActions';
10
10
 
11
+ import { DashboardResource } from './Dashboard.resource';
11
12
  import { useStyles } from './DashboardForm.styles';
12
13
  import {
13
14
  labelMustBeAtLeast,
14
15
  labelMustBeMost,
15
16
  labelRequired
16
17
  } from './translatedLabels';
17
- import { DashboardResource } from './Dashboard.resource';
18
18
 
19
19
  type DashboardFormProps = {
20
20
  labels: DashboardFormLabels;
@@ -1,23 +1,23 @@
1
1
  import { ReactElement, useCallback, useMemo } from 'react';
2
2
 
3
- import { string, number, object } from 'yup';
4
- import { useTranslation } from 'react-i18next';
5
3
  import { equals } from 'ramda';
4
+ import { useTranslation } from 'react-i18next';
5
+ import { number, object, string } from 'yup';
6
6
 
7
- import { InputType } from '../../../Form/Inputs/models';
8
7
  import { Form, FormProps } from '../../../Form';
8
+ import { InputType } from '../../../Form/Inputs/models';
9
9
  import { FormVariant } from '../Form.models';
10
10
  import { FormActions, FormActionsProps } from '../FormActions';
11
11
 
12
+ import { DashboardResource } from './Dashboard.resource';
12
13
  import { useStyles } from './DashboardForm.styles';
14
+ import GlobalRefreshFieldOption from './GlobalRefreshFieldOption';
13
15
  import {
14
16
  labelCharacters,
15
17
  labelMustBeAtLeast,
16
18
  labelMustBeMost,
17
19
  labelRequired
18
20
  } from './translatedLabels';
19
- import { DashboardResource } from './Dashboard.resource';
20
- import GlobalRefreshFieldOption from './GlobalRefreshFieldOption';
21
21
 
22
22
  export type DashboardFormProps = {
23
23
  labels: DashboardFormLabels;
@@ -1,10 +1,10 @@
1
1
  import { ChangeEvent } from 'react';
2
2
 
3
3
  import { FormikValues, useFormikContext } from 'formik';
4
- import { useTranslation } from 'react-i18next';
5
- import { isEmpty } from 'ramda';
6
- import pluralize from 'pluralize';
7
4
  import { useAtomValue } from 'jotai';
5
+ import pluralize from 'pluralize';
6
+ import { isEmpty } from 'ramda';
7
+ import { useTranslation } from 'react-i18next';
8
8
 
9
9
  import { Typography } from '@mui/material';
10
10
 
@@ -12,12 +12,12 @@ import { refreshIntervalAtom } from '@centreon/ui-context';
12
12
 
13
13
  import { TextField } from '../../..';
14
14
 
15
+ import { useGlobalRefreshIntervalStyles } from './DashboardForm.styles';
15
16
  import {
16
17
  labelGlobalRefreshInterval,
17
18
  labelInterval,
18
19
  labelSeconds
19
20
  } from './translatedLabels';
20
- import { useGlobalRefreshIntervalStyles } from './DashboardForm.styles';
21
21
 
22
22
  const GlobalRefreshFieldOption = (): JSX.Element => {
23
23
  const { classes } = useGlobalRefreshIntervalStyles();
@@ -1,4 +1,4 @@
1
- import React, { ReactElement, ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
 
3
3
  import { useStyles } from './PageHeader.styles';
4
4
 
@@ -1,4 +1,4 @@
1
- import React, { ReactElement, ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
 
3
3
  import { useStyles } from './PageHeader.styles';
4
4
 
@@ -1,4 +1,4 @@
1
- import React, { ReactElement, ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
 
3
3
  import { useStyles } from './PageHeader.styles';
4
4
 
@@ -1,4 +1,4 @@
1
- import React, { ReactElement, ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
 
3
3
  import { useStyles } from './PageHeader.styles';
4
4
 
@@ -1,4 +1,4 @@
1
- import React, { ReactElement, ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
 
3
3
  import { Typography as MuiTypography } from '@mui/material';
4
4
 
@@ -1,9 +1,9 @@
1
1
  import { PageHeader as PageHeaderRoot } from './PageHeader';
2
+ import { PageHeaderActions } from './PageHeaderActions';
2
3
  import { PageHeaderMain } from './PageHeaderMain';
3
4
  import { PageHeaderMenu } from './PageHeaderMenu';
4
- import { PageHeaderTitle } from './PageHeaderTitle';
5
- import { PageHeaderActions } from './PageHeaderActions';
6
5
  import { PageHeaderMessage } from './PageHeaderMessage';
6
+ import { PageHeaderTitle } from './PageHeaderTitle';
7
7
 
8
8
  export const PageHeader = Object.assign(PageHeaderRoot, {
9
9
  Actions: PageHeaderActions,
@@ -1,4 +1,4 @@
1
- import { SwitchProps, Switch as MuiSwitch } from '@mui/material';
1
+ import { Switch as MuiSwitch, SwitchProps } from '@mui/material';
2
2
 
3
3
  import { useSwitchStyles } from './Switch.styles';
4
4
 
@@ -16,10 +16,12 @@ type Story = StoryObj<typeof ItemComposition>;
16
16
 
17
17
  const stub = (): void => undefined;
18
18
 
19
+ const items = [0, 1, 2, 3, 4];
20
+
19
21
  export const Default: Story = {
20
22
  args: {
21
- children: [...Array(5)].map((_, i) => (
22
- <ItemComposition.Item key={i} labelDelete="Delete" onDeleteItem={stub}>
23
+ children: items.map((item) => (
24
+ <ItemComposition.Item key={item} labelDelete="Delete" onDeleteItem={stub}>
23
25
  <Typography>Item 1</Typography>
24
26
  <Typography>Item 2</Typography>
25
27
  </ItemComposition.Item>
@@ -54,7 +56,7 @@ const options = [
54
56
 
55
57
  export const WithSelectInputs: Story = {
56
58
  args: {
57
- children: [...Array(5)].map((_, i) => (
59
+ children: items.map((i) => (
58
60
  <ItemComposition.Item key={i} labelDelete="Delete" onDeleteItem={stub}>
59
61
  <SelectField
60
62
  dataTestId="select 1"
@@ -79,7 +81,7 @@ export const WithSelectInputs: Story = {
79
81
 
80
82
  export const WithLinkedItems: Story = {
81
83
  args: {
82
- children: [...Array(5)].map((_, i) => (
84
+ children: items.map((i) => (
83
85
  <ItemComposition.Item key={i} labelDelete="Delete" onDeleteItem={stub}>
84
86
  <Typography>Item 1</Typography>
85
87
  <Typography>Item 2</Typography>
@@ -1,5 +1,5 @@
1
- import { ItemComposition as ItemCompositionRoot } from './ItemComposition';
2
1
  import { Item } from './Item';
2
+ import { ItemComposition as ItemCompositionRoot } from './ItemComposition';
3
3
 
4
4
  export const ItemComposition = Object.assign(ItemCompositionRoot, {
5
5
  Item
@@ -1,7 +1,7 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
2
 
3
- import { AreaIndicator } from '../AreaIndicator';
4
3
  import { Default as DefaultPageHeaderStory } from '../../Header/PageHeader/PageHeader.stories';
4
+ import { AreaIndicator } from '../AreaIndicator';
5
5
 
6
6
  import { PageLayout } from './index';
7
7
 
@@ -36,19 +36,18 @@ export const PageQuickAccess = ({
36
36
  <Menu>
37
37
  <Menu.Button data-testid="quickaccess" />
38
38
  <Menu.Items>
39
- {elements &&
40
- elements.map((element) => (
41
- <Menu.Item
42
- key={`${element.id}`}
43
- onClick={navigateToElement(element.id)}
44
- {...(isActive(element.id) && {
45
- isActive: true,
46
- isDisabled: true
47
- })}
48
- >
49
- {element.name}
50
- </Menu.Item>
51
- ))}
39
+ {elements?.map((element) => (
40
+ <Menu.Item
41
+ key={`${element.id}`}
42
+ onClick={navigateToElement(element.id)}
43
+ {...(isActive(element.id) && {
44
+ isActive: true,
45
+ isDisabled: true
46
+ })}
47
+ >
48
+ {element.name}
49
+ </Menu.Item>
50
+ ))}
52
51
  <Menu.Divider key="divider" />
53
52
  <Menu.Item key="create">
54
53
  <>
@@ -1,7 +1,7 @@
1
1
  import { PageLayout as PageLayoutRoot } from './PageLayout';
2
- import { PageLayoutHeader } from './PageLayoutHeader';
3
- import { PageLayoutBody } from './PageLayoutBody';
4
2
  import { PageLayoutActions } from './PageLayoutActions';
3
+ import { PageLayoutBody } from './PageLayoutBody';
4
+ import { PageLayoutHeader } from './PageLayoutHeader';
5
5
  import { PageQuickAccess } from './PageQuickAccess';
6
6
 
7
7
  export const PageLayout = Object.assign(PageLayoutRoot, {
@@ -1,14 +1,14 @@
1
- import { ForwardedRef, forwardRef, ReactElement, ReactNode } from 'react';
1
+ import { ForwardedRef, ReactElement, ReactNode, forwardRef } from 'react';
2
2
 
3
3
  import { ListItemProps, ListItem as MuiListItem } from '@mui/material';
4
4
 
5
5
  import { useStyles } from './ListItem.styles';
6
6
 
7
- type Props = {
7
+ interface Props {
8
8
  action?: ReactElement;
9
9
  children: ReactNode | Array<ReactNode>;
10
10
  className?: string;
11
- };
11
+ }
12
12
 
13
13
  export const ListItem = forwardRef(
14
14
  (
@@ -1,8 +1,8 @@
1
+ import { Avatar as AvatarRoot } from './Avatar';
2
+ import { AvatarSkeleton } from './AvatarSkeleton';
1
3
  import { ListItem as ListItemRoot } from './ListItem';
2
4
  import { Text as TextRoot } from './Text';
3
5
  import { TextSkeleton } from './TextSkeleton';
4
- import { Avatar as AvatarRoot } from './Avatar';
5
- import { AvatarSkeleton } from './AvatarSkeleton';
6
6
 
7
7
  export const ListItem = Object.assign(ListItemRoot, {
8
8
  Avatar: Object.assign(AvatarRoot, {
@@ -1,4 +1,3 @@
1
- /* eslint-disable react/no-array-index-key */
2
1
  import { Meta, StoryObj } from '@storybook/react';
3
2
 
4
3
  import DeleteIcon from '@mui/icons-material/Delete';
@@ -13,17 +12,20 @@ const meta: Meta<typeof List> = {
13
12
  export default meta;
14
13
  type Story = StoryObj<typeof List>;
15
14
 
16
- const sampleData = Array(50).fill({
17
- icon: <DeleteIcon />,
18
- primary: 'Primary text',
19
- secondary: 'Secondary text'
20
- });
15
+ const sampleData = Array(50)
16
+ .fill(0)
17
+ .map((_, index) => ({
18
+ index,
19
+ icon: <DeleteIcon />,
20
+ primary: 'Primary text',
21
+ secondary: 'Secondary text'
22
+ }));
21
23
 
22
24
  export const Default: Story = {
23
25
  render: () => (
24
26
  <List>
25
- {sampleData.map(({ primary }, index) => (
26
- <List.Item key={`${primary}_${index}`}>
27
+ {sampleData.map(({ primary }) => (
28
+ <List.Item key={`${primary}`}>
27
29
  <List.Item.Text primaryText={primary} />
28
30
  </List.Item>
29
31
  ))}
@@ -34,8 +36,8 @@ export const Default: Story = {
34
36
  export const withAction: Story = {
35
37
  render: () => (
36
38
  <List>
37
- {sampleData.map(({ icon, primary }, index) => (
38
- <List.Item action={icon} key={`${primary}_${index}`}>
39
+ {sampleData.map(({ icon, primary }) => (
40
+ <List.Item action={icon} key={`${primary}`}>
39
41
  <List.Item.Text primaryText={primary} />
40
42
  </List.Item>
41
43
  ))}
@@ -46,8 +48,8 @@ export const withAction: Story = {
46
48
  export const withSecondaryText: Story = {
47
49
  render: () => (
48
50
  <List>
49
- {sampleData.map(({ primary, secondary }, index) => (
50
- <List.Item key={`${primary}_${index}`}>
51
+ {sampleData.map(({ primary, secondary }) => (
52
+ <List.Item key={`${primary}`}>
51
53
  <List.Item.Text primaryText={primary} secondaryText={secondary} />
52
54
  </List.Item>
53
55
  ))}
@@ -59,8 +61,8 @@ export const withSmallContainer: Story = {
59
61
  render: () => (
60
62
  <Box sx={{ height: 400, width: 200 }}>
61
63
  <List>
62
- {sampleData.map(({ icon, primary, secondary }, index) => (
63
- <List.Item action={icon} key={`${primary}_${index}`}>
64
+ {sampleData.map(({ icon, primary, secondary }) => (
65
+ <List.Item action={icon} key={`${primary}`}>
64
66
  <List.Item.Text primaryText={primary} secondaryText={secondary} />
65
67
  </List.Item>
66
68
  ))}
@@ -4,9 +4,9 @@ import { List as MuiList } from '@mui/material';
4
4
 
5
5
  import { useStyles } from './List.styles';
6
6
 
7
- type Props = {
7
+ interface Props {
8
8
  children: ReactNode;
9
- };
9
+ }
10
10
 
11
11
  export const List = ({ children }: Props): ReactElement => {
12
12
  const { classes } = useStyles();
@@ -1,5 +1,5 @@
1
- import { List as ListRoot } from './List';
2
1
  import { ListItem } from './Item';
2
+ import { List as ListRoot } from './List';
3
3
 
4
4
  export const List = Object.assign(ListRoot, {
5
5
  Item: ListItem
@@ -5,9 +5,9 @@ import {
5
5
  Menu as MenuIcon
6
6
  } from '@mui/icons-material';
7
7
 
8
- import { Button, ButtonProps } from '../../Button';
9
8
  import { AriaLabelingAttributes } from '../../../@types/aria-attributes';
10
9
  import { DataTestAttributes } from '../../../@types/data-attributes';
10
+ import { Button, ButtonProps } from '../../Button';
11
11
  import { useMenu } from '../useMenu';
12
12
 
13
13
  import { useStyles } from './MenuButton.styles';
@@ -1,7 +1,7 @@
1
- import { Menu as MenuRoot } from './Menu';
2
1
  import { MenuButton } from './Button';
3
- import { MenuItem } from './MenuItem';
2
+ import { Menu as MenuRoot } from './Menu';
4
3
  import { MenuDivider } from './MenuDivider';
4
+ import { MenuItem } from './MenuItem';
5
5
  import { MenuItems } from './MenuItems';
6
6
 
7
7
  export const Menu = Object.assign(MenuRoot, {
@@ -1,12 +1,12 @@
1
1
  import { ReactElement, ReactNode, useRef } from 'react';
2
2
 
3
3
  import {
4
+ Provider,
4
5
  atom,
5
6
  createStore,
6
7
  useAtom,
7
- Provider,
8
- useStore,
9
- useAtomValue
8
+ useAtomValue,
9
+ useStore
10
10
  } from 'jotai';
11
11
  import { useHydrateAtoms } from 'jotai/utils';
12
12
 
@@ -1,4 +1,4 @@
1
- import { atom, createStore, useSetAtom, Provider } from 'jotai';
1
+ import { Provider, atom, createStore, useSetAtom } from 'jotai';
2
2
 
3
3
  import { Button } from '@mui/material';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
- import { atom, useSetAtom, createStore, Provider } from 'jotai';
2
+ import { Provider, atom, createStore, useSetAtom } from 'jotai';
3
3
 
4
4
  import { Button } from '../../Button';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { useMemo } from 'react';
2
2
 
3
- import { useAtom, PrimitiveAtom } from 'jotai';
3
+ import { PrimitiveAtom, useAtom } from 'jotai';
4
4
  import { equals, pick, type } from 'ramda';
5
5
 
6
6
  import { Modal } from '..';
@@ -2,8 +2,8 @@ import React, { ReactElement } from 'react';
2
2
 
3
3
  import { equals } from 'ramda';
4
4
 
5
- import { Dialog as MuiDialog, Slide } from '@mui/material';
6
5
  import { Close as CloseIcon } from '@mui/icons-material';
6
+ import { Dialog as MuiDialog, Slide } from '@mui/material';
7
7
 
8
8
  import { AriaLabelingAttributes } from '../../@types/aria-attributes';
9
9
  import { IconButton } from '../Button';
@@ -1,4 +1,4 @@
1
- import React, { ReactElement, ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
 
3
3
  import { useStyles } from './Modal.styles';
4
4
 
@@ -1,4 +1,4 @@
1
- import React, { ReactElement, ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
 
3
3
  import { DialogTitleProps, DialogTitle as MuiDialogTitle } from '@mui/material';
4
4
 
@@ -1,7 +1,7 @@
1
1
  import { Modal as ModalRoot } from './Modal';
2
- import { ModalHeader } from './ModalHeader';
3
- import { ModalBody } from './ModalBody';
4
2
  import { ModalActions } from './ModalActions';
3
+ import { ModalBody } from './ModalBody';
4
+ import { ModalHeader } from './ModalHeader';
5
5
 
6
6
  export { ConfirmationModal } from './ConfirmationModal/ConfirmationModal';
7
7
 
@@ -1,10 +1,10 @@
1
1
  import { MouseEvent, useState } from 'react';
2
2
 
3
- import { ClickAwayListener, Box, Popper } from '@mui/material';
3
+ import { Box, ClickAwayListener, Popper } from '@mui/material';
4
4
 
5
+ import { useStyles } from './ConfirmationTooltip.styles';
5
6
  import TooltipContent from './TooltipContent';
6
7
  import { Props } from './models';
7
- import { useStyles } from './ConfirmationTooltip.styles';
8
8
 
9
9
  export const ConfirmationTooltip = ({
10
10
  children,
@@ -1,5 +1,5 @@
1
- import { ActionVariants } from '../../../ActionsList/models';
2
1
  import { ActionsList } from '../../..';
2
+ import { ActionVariants } from '../../../ActionsList/models';
3
3
 
4
4
  import { useStyles } from './ConfirmationTooltip.styles';
5
5
 
@@ -2,8 +2,8 @@ import { ReactElement, useCallback, useEffect, useRef } from 'react';
2
2
 
3
3
  import { atom, useAtom } from 'jotai';
4
4
 
5
- import { Tooltip, TooltipProps } from '../Tooltip';
6
5
  import { useResizeObserver } from '../../../utils/useResizeObserver';
6
+ import { Tooltip, TooltipProps } from '../Tooltip';
7
7
 
8
8
  import { useStyles } from './TextOverflowTooltip.styles';
9
9
 
@@ -2,9 +2,9 @@ import { useMemo } from 'react';
2
2
 
3
3
  import { scaleLinear } from '@visx/scale';
4
4
 
5
+ import { useZoomStyles } from './Zoom.styles';
5
6
  import { minimapScale, radius } from './constants';
6
7
  import { UseMinimapProps, useMinimap } from './useMinimap';
7
- import { useZoomStyles } from './Zoom.styles';
8
8
 
9
9
  interface Props extends Omit<UseMinimapProps, 'minimapScale' | 'scale'> {
10
10
  children: JSX.Element;
@@ -33,7 +33,7 @@ const Content = (): JSX.Element => {
33
33
  <g style={{ transform: 'translate(600px, 400px)' }}>
34
34
  <circle fill="green" r={70} />
35
35
  </g>
36
- <g style={{ transform: `translate(2400px, 1400px)` }}>
36
+ <g style={{ transform: 'translate(2400px, 1400px)' }}>
37
37
  <circle fill="red" r={70} />
38
38
  </g>
39
39
  </g>
@@ -9,11 +9,11 @@ import ReplayIcon from '@mui/icons-material/Replay';
9
9
 
10
10
  import { IconButton } from '../Button';
11
11
 
12
- import { minimapScale, radius } from './constants';
13
- import { useZoom } from './useZoom';
14
- import { useZoomStyles } from './Zoom.styles';
15
12
  import Minimap from './Minimap';
13
+ import { useZoomStyles } from './Zoom.styles';
14
+ import { minimapScale, radius } from './constants';
16
15
  import { ChildrenProps, MinimapPosition, ZoomState } from './models';
16
+ import { useZoom } from './useZoom';
17
17
 
18
18
  export interface Props {
19
19
  children: ({ width, height, transformMatrix }: ChildrenProps) => JSX.Element;
@@ -16,7 +16,7 @@ type EventType =
16
16
 
17
17
  type PointCoords = Pick<Point, 'x' | 'y'>;
18
18
 
19
- const DEFAULT_POINT = { x: 0, y: 0 };
19
+ const defaultPoint = { x: 0, y: 0 };
20
20
 
21
21
  const isTouchEvent = (event?: EventType): event is TouchEvent =>
22
22
  !!event && 'changedTouches' in event;
@@ -25,7 +25,7 @@ export const isMouseEvent = (event?: EventType): event is MouseEvent =>
25
25
  !!event && 'clientX' in event;
26
26
 
27
27
  const getXAndYFromEvent = (event?: EventType): PointCoords => {
28
- if (!event) return { ...DEFAULT_POINT };
28
+ if (!event) return { ...defaultPoint };
29
29
 
30
30
  if (isTouchEvent(event)) {
31
31
  return event.changedTouches.length > 0
@@ -33,7 +33,7 @@ const getXAndYFromEvent = (event?: EventType): PointCoords => {
33
33
  x: event.changedTouches[0].clientX,
34
34
  y: event.changedTouches[0].clientY
35
35
  }
36
- : { ...DEFAULT_POINT };
36
+ : { ...defaultPoint };
37
37
  }
38
38
 
39
39
  if (isMouseEvent(event)) {
@@ -43,7 +43,7 @@ const getXAndYFromEvent = (event?: EventType): PointCoords => {
43
43
  };
44
44
  }
45
45
 
46
- return { ...DEFAULT_POINT };
46
+ return { ...defaultPoint };
47
47
  };
48
48
 
49
49
  export const localPoint = (event: EventType): PointCoords | null => {
@@ -1,8 +1,8 @@
1
1
  import { useCallback, useState } from 'react';
2
2
 
3
+ import { Point } from '@visx/point';
3
4
  import { ProvidedZoom, Translate } from '@visx/zoom/lib/types';
4
5
  import { equals, gt, isNil, pick } from 'ramda';
5
- import { Point } from '@visx/point';
6
6
 
7
7
  import { ZoomState } from './models';
8
8
 
@@ -1,4 +1,4 @@
1
- import { isNil, isEmpty } from 'ramda';
1
+ import { isEmpty, isNil } from 'ramda';
2
2
 
3
3
  import { QueryParameter } from './models';
4
4