@scality/core-ui 0.166.0 → 0.168.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 (119) hide show
  1. package/.storybook/preview.js +6 -4
  2. package/README.md +27 -80
  3. package/dist/components/barchart/BarChart.component.d.ts +5 -0
  4. package/dist/components/barchart/BarChart.component.d.ts.map +1 -1
  5. package/dist/components/barchart/BarChart.component.js +5 -0
  6. package/dist/components/barchartv2/Barchart.component.d.ts +5 -1
  7. package/dist/components/barchartv2/Barchart.component.d.ts.map +1 -1
  8. package/dist/components/barchartv2/Barchart.component.js +6 -2
  9. package/dist/components/barchartv2/utils.js +2 -2
  10. package/dist/components/button/Button.component.d.ts +2 -1
  11. package/dist/components/button/Button.component.d.ts.map +1 -1
  12. package/dist/components/button/Button.component.js +2 -1
  13. package/dist/components/chartlegend/ChartLegend.d.ts.map +1 -1
  14. package/dist/components/chartlegend/ChartLegend.js +7 -13
  15. package/dist/components/chartlegend/ChartLegendWrapper.d.ts +1 -2
  16. package/dist/components/chartlegend/ChartLegendWrapper.d.ts.map +1 -1
  17. package/dist/components/chartlegend/ChartLegendWrapper.js +4 -9
  18. package/dist/components/date/FormattedDateTime.d.ts +6 -1
  19. package/dist/components/date/FormattedDateTime.d.ts.map +1 -1
  20. package/dist/components/date/FormattedDateTime.js +11 -0
  21. package/dist/components/icon/Icon.component.d.ts +9 -11
  22. package/dist/components/icon/Icon.component.d.ts.map +1 -1
  23. package/dist/components/icon/Icon.component.js +2 -0
  24. package/dist/components/linetemporalchart/ChartUtil.d.ts +3 -2
  25. package/dist/components/linetemporalchart/ChartUtil.d.ts.map +1 -1
  26. package/dist/components/linetemporalchart/ChartUtil.js +30 -20
  27. package/dist/components/linetemporalchart/LineTemporalChart.component.d.ts +4 -0
  28. package/dist/components/linetemporalchart/LineTemporalChart.component.d.ts.map +1 -1
  29. package/dist/components/linetemporalchart/LineTemporalChart.component.js +4 -0
  30. package/dist/components/linetimeseriechart/linetimeseriechart.component.d.ts +8 -2
  31. package/dist/components/linetimeseriechart/linetimeseriechart.component.d.ts.map +1 -1
  32. package/dist/components/linetimeseriechart/linetimeseriechart.component.js +17 -11
  33. package/dist/index.d.ts +1 -11
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +0 -11
  36. package/dist/next.d.ts +1 -0
  37. package/dist/next.d.ts.map +1 -1
  38. package/jest.config.js +1 -0
  39. package/package.json +16 -37
  40. package/src/lib/components/barchart/BarChart.component.tsx +5 -0
  41. package/src/lib/components/barchartv2/Barchart.component.test.tsx +11 -7
  42. package/src/lib/components/barchartv2/Barchart.component.tsx +15 -3
  43. package/src/lib/components/barchartv2/utils.test.ts +2 -2
  44. package/src/lib/components/barchartv2/utils.ts +2 -2
  45. package/src/lib/components/button/Button.component.tsx +2 -1
  46. package/src/lib/components/chartlegend/ChartLegend.test.tsx +17 -0
  47. package/src/lib/components/chartlegend/ChartLegend.tsx +6 -12
  48. package/src/lib/components/chartlegend/ChartLegendWrapper.tsx +5 -13
  49. package/src/lib/components/date/FormattedDateTime.tsx +14 -1
  50. package/src/lib/components/icon/Icon.component.tsx +12 -1
  51. package/src/lib/components/linetemporalchart/ChartUtil.test.ts +23 -35
  52. package/src/lib/components/linetemporalchart/ChartUtil.ts +38 -26
  53. package/src/lib/components/linetemporalchart/LineTemporalChart.component.tsx +19 -15
  54. package/src/lib/components/linetimeseriechart/linetimeseriechart.component.tsx +36 -13
  55. package/src/lib/components/linetimeseriechart/linetimeseriechart.test.tsx +68 -0
  56. package/src/lib/components/selectv2/selectv2.test.tsx +1 -1
  57. package/src/lib/components/toast/useMutationsHandler.test.tsx +22 -32
  58. package/src/lib/index.ts +6 -11
  59. package/src/lib/next.ts +1 -0
  60. package/stories/BarChart/barchart.stories.tsx +108 -13
  61. package/stories/barchart.stories.tsx +1 -1
  62. package/stories/card.stories.tsx +7 -5
  63. package/stories/controls.ts +19 -20
  64. package/stories/linecharttemporal.stories.tsx +1 -1
  65. package/stories/linetimeseriechart.stories.tsx +146 -0
  66. package/stories/navbar.stories.tsx +103 -0
  67. package/stories/tabsv2.stories.tsx +51 -56
  68. package/dist/components/areachart/AreaChart.component.d.ts +0 -13
  69. package/dist/components/areachart/AreaChart.component.d.ts.map +0 -1
  70. package/dist/components/areachart/AreaChart.component.js +0 -27
  71. package/dist/components/chips/Chips.component.d.ts +0 -21
  72. package/dist/components/chips/Chips.component.d.ts.map +0 -1
  73. package/dist/components/chips/Chips.component.js +0 -105
  74. package/dist/components/cloudprogressbar/CloudProgressBar.component.d.ts +0 -10
  75. package/dist/components/cloudprogressbar/CloudProgressBar.component.d.ts.map +0 -1
  76. package/dist/components/cloudprogressbar/CloudProgressBar.component.js +0 -38
  77. package/dist/components/collapsiblepanel/CollapsiblePanel.component.d.ts +0 -9
  78. package/dist/components/collapsiblepanel/CollapsiblePanel.component.d.ts.map +0 -1
  79. package/dist/components/collapsiblepanel/CollapsiblePanel.component.js +0 -44
  80. package/dist/components/linechart/LineChart.component.d.ts +0 -21
  81. package/dist/components/linechart/LineChart.component.d.ts.map +0 -1
  82. package/dist/components/linechart/LineChart.component.js +0 -109
  83. package/dist/components/multiselect/MultiSelect.component.d.ts +0 -28
  84. package/dist/components/multiselect/MultiSelect.component.d.ts.map +0 -1
  85. package/dist/components/multiselect/MultiSelect.component.js +0 -73
  86. package/dist/components/select/Select.component.d.ts +0 -14
  87. package/dist/components/select/Select.component.d.ts.map +0 -1
  88. package/dist/components/select/Select.component.js +0 -71
  89. package/dist/components/spacedbox/SpacedBox.d.ts +0 -34
  90. package/dist/components/spacedbox/SpacedBox.d.ts.map +0 -1
  91. package/dist/components/spacedbox/SpacedBox.js +0 -64
  92. package/dist/components/sparkline/SparkLine.component.d.ts +0 -18
  93. package/dist/components/sparkline/SparkLine.component.d.ts.map +0 -1
  94. package/dist/components/sparkline/SparkLine.component.js +0 -148
  95. package/dist/components/vegachart/VegaChart.component.d.ts +0 -13
  96. package/dist/components/vegachart/VegaChart.component.d.ts.map +0 -1
  97. package/dist/components/vegachart/VegaChart.component.js +0 -120
  98. package/plopfile.js +0 -38
  99. package/src/lib/components/areachart/AreaChart.component.tsx +0 -49
  100. package/src/lib/components/chips/Chips.component.tsx +0 -169
  101. package/src/lib/components/cloudprogressbar/CloudProgressBar.component.tsx +0 -105
  102. package/src/lib/components/collapsiblepanel/CollapsiblePanel.component.tsx +0 -77
  103. package/src/lib/components/linechart/LineChart.component.tsx +0 -152
  104. package/src/lib/components/multiselect/MultiSelect.component.tsx +0 -158
  105. package/src/lib/components/select/Select.component.tsx +0 -98
  106. package/src/lib/components/spacedbox/SpacedBox.ts +0 -116
  107. package/src/lib/components/sparkline/SparkLine.component.tsx +0 -176
  108. package/src/lib/components/vegachart/VegaChart.component.tsx +0 -146
  109. package/stories/areachart.stories.tsx +0 -120
  110. package/stories/chips.stories.tsx +0 -107
  111. package/stories/cloudprogressbar.stories.tsx +0 -93
  112. package/stories/collapsiblepanel.stories.tsx +0 -57
  113. package/stories/data/areachart.ts +0 -122
  114. package/stories/data/sparklinechart.ts +0 -164
  115. package/stories/linechart.stories.tsx +0 -319
  116. package/stories/multiselect.stories.tsx +0 -126
  117. package/stories/select.stories.tsx +0 -52
  118. package/stories/sparkline.stories.tsx +0 -85
  119. package/stories/vegachart.stories.tsx +0 -98
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { QueryClient, QueryClientProvider } from 'react-query';
3
3
  import { CoreUiThemeProvider } from '../src/lib/next';
4
- import { brand, coreUIAvailableThemes } from '../src/lib/style/theme';
4
+ import { coreUIAvailableThemes } from '../src/lib/style/theme';
5
5
  import { Wrapper } from '../stories/common';
6
6
  import { ToastProvider } from '../src/lib';
7
7
 
@@ -72,9 +72,11 @@ export const parameters = {
72
72
  controls: {
73
73
  //All props with color in name will automatically have a control 'color'
74
74
  //with colors presets to theme colors, possible to have the color name from theme in control
75
- presetColors: Object.entries(brand).map((color) => {
76
- return { color: color[1], title: color[0] };
77
- }),
75
+ presetColors: Object.entries(coreUIAvailableThemes.darkRebrand).map(
76
+ (color) => {
77
+ return { color: color[1], title: color[0] };
78
+ },
79
+ ),
78
80
  matchers: {
79
81
  color: /color/i,
80
82
  },
package/README.md CHANGED
@@ -11,38 +11,21 @@ Core-UI is a component library containing all components, layouts, icons and the
11
11
  - Add `@scality/core-ui` in the `package.json`'s dependencies of your project.
12
12
 
13
13
  ```json
14
- "@scality/core-ui": "0.115.0",
14
+ "@scality/core-ui": "^0.165.0",
15
15
  ```
16
16
 
17
17
  - `@scality/core-ui` requires the peerDependencies below. Make sure that you have them in the `package.json`'s dependencies.
18
18
 
19
19
  ```json
20
- "@fortawesome/fontawesome-free": "^5.10.2",
21
- "@fortawesome/fontawesome-svg-core": "^1.2.35",
22
- "@fortawesome/free-regular-svg-icons": "^5.15.3",
23
- "@fortawesome/free-solid-svg-icons": "^5.15.3",
24
- "@fortawesome/react-fontawesome": "^0.1.14",
25
- "@js-temporal/polyfill": "^0.4.4",
26
- "polished": "3.4.1",
27
- "pretty-bytes": "^5.6.0",
28
- "react": "^17.0.2",
29
- "react-debounce-input": "3.2.2",
30
- "react-dom": "^17.0.2",
31
- "react-dropzone": "^14.2.3",
20
+ "react": "^18.0.0",
21
+ "react-dom": "^18.0.0",
22
+ // to provides a Provider to the components using react-query
32
23
  "react-query": "^3.34.0",
33
- "react-router": "^5.2.0",
34
- "react-router-dom": "^5.2.0",
35
- "react-select": "4.3.1",
36
- "react-table": "^7.7.0",
37
- "react-virtualized": "9.22.3",
38
- "react-virtualized-auto-sizer": "^1.0.5",
39
- "react-window": "^1.8.6",
40
- "styled-components": "^4.1.2",
41
- "styled-system": "^5.1.5",
42
- "vega": "^5.17.3",
43
- "vega-embed": "^6.0.0",
44
- "vega-lite": "^5.0.0",
45
- "vega-tooltip": "^0.27.0"
24
+ // for the components using react router
25
+ "react-router": "^7.0.1",
26
+ "react-router-dom": "^7.0.1",
27
+ // for legacy chart components
28
+ "canvas": "^2.10.1",
46
29
  ```
47
30
 
48
31
  - Install the dependencies :
@@ -90,51 +73,23 @@ import { coreUIAvailableThemes as themes } from '@scality/core-ui/dist/style/the
90
73
 
91
74
  There is 2 default theme available in Core-UI : you can find them [here](https://github.com/scality/core-ui/pull/684#:~:text=https%3A//github.com/scality/core%2Dui/blob/development/1.0/src/lib/style/theme.ts)
92
75
 
93
- <br/>
94
-
95
- You can also modify or create a new theme. In this case make sure to respect this type :
76
+ You can also modify or create a new theme but make sure to extend this type:
96
77
 
97
78
  ```tsx
98
- export type CoreUITheme = {
99
- statusHealthy: string;
100
- statusHealthyRGB: string;
101
- statusWarning: string;
102
- statusWarningRGB: string;
103
- statusCritical: string;
104
- statusCriticalRGB: string;
105
- selectedActive: string;
106
- highlight: string;
107
- border: string;
108
- buttonPrimary: string;
109
- buttonSecondary: string;
110
- buttonDelete: string;
111
- infoPrimary: string;
112
- infoSecondary: string;
113
- backgroundLevel1: string;
114
- backgroundLevel2: string;
115
- backgroundLevel3: string;
116
- backgroundLevel4: string;
117
- textPrimary: string;
118
- textSecondary: string;
119
- textTertiary: string;
120
- textReverse: string;
121
- textLink: string;
122
- };
79
+ import { CoreUITheme } from "@scality/core-ui/dist/next";
123
80
  ```
124
81
 
125
- <br />
126
-
127
82
  ## Development
128
83
 
129
84
  This project is built with [React](https://react.dev/) and [TypeScript](https://www.typescriptlang.org/), and styled with [styled-components](https://styled-components.com/).
130
85
 
131
- To start contributing to core-ui, clone the repository :
86
+ To start contributing to core-ui, clone the repository:
132
87
 
133
88
  ```sh
134
89
  git clone git@github.com:scality/core-ui.git
135
90
  ```
136
91
 
137
- then install the dependancies :
92
+ then install the dependancies:
138
93
 
139
94
  ```sh
140
95
  npm install
@@ -142,7 +97,7 @@ npm install
142
97
 
143
98
  ### Create a new branch
144
99
 
145
- Give your branch an explicit name with the reference to the Jira ticket or issue if it exists, and prefix it with :
100
+ Give your branch an explicit name with the reference to the Jira ticket or issue if it exists, and prefix it with:
146
101
 
147
102
  - feature/ for new component or major component update : `feature/TICKET-123-some-feature`
148
103
  - improvement/ for code improvement, component update : `improvement/TICKET-456-some-improvement`
@@ -183,7 +138,7 @@ When creating a new version of an existing component, expose it in `src/lib/next
183
138
 
184
139
  You can use storybook to help with the development.
185
140
  Storybook helps to test and vizualize component in isolation.
186
- If it doesn't exist, write a [story](https://storybook.js.org/docs/get-started/whats-a-story) for the component :
141
+ If it doesn't exist, write a [story](https://storybook.js.org/docs/get-started/whats-a-story) for the component:
187
142
 
188
143
  ```jsx
189
144
  // in stories/example/example.stories.tsx
@@ -200,10 +155,9 @@ type Story = StoryObj<typeof Example>;
200
155
  export const Default: Story = {
201
156
  render: () => <Example />,
202
157
  };
203
-
204
158
  ```
205
159
 
206
- then launch storybook :
160
+ Then launch storybook:
207
161
 
208
162
  ```sh
209
163
  npm run storybook
@@ -213,7 +167,7 @@ Storybook will be launched on `http://localhost:3000`.
213
167
 
214
168
  ### Lint
215
169
 
216
- To make sure your code is correctly lint, run :
170
+ To make sure your code is correctly lint, run:
217
171
 
218
172
  ```sh
219
173
  npm run lint
@@ -225,13 +179,13 @@ It will run ESLint by using `eslint-config-react-app` which is a shareable ESLin
225
179
 
226
180
  Build tests with [jest](https://jestjs.io/)
227
181
 
228
- Make sure to write tests that cover all cases, then you can run all tests with :
182
+ Make sure to write tests that cover all cases, then you can run all tests with:
229
183
 
230
184
  ```sh
231
185
  npm run test
232
186
  ```
233
187
 
234
- or run a specific test with :
188
+ Or run a specific test with:
235
189
 
236
190
  ```sh
237
191
  npm run test Example.test.tsx
@@ -241,7 +195,6 @@ npm run test Example.test.tsx
241
195
 
242
196
  Core-UI uses [storybook](https://storybook.js.org/) for its documentation. \
243
197
  Illustrate use cases and state variations with [stories](https://storybook.js.org/docs/writing-stories).
244
- All stories should be type.
245
198
 
246
199
  If possible create or update the component guideline.
247
200
  This guideline is an MDX file containing details about the component usage and is illustrated with the stories write in stories.tsx file.
@@ -259,29 +212,23 @@ import * as ExampleStories from './Example.stories';
259
212
  An Example component is used for example.
260
213
 
261
214
  <Canvas of={ExampleStories.Default} />
262
-
263
215
  ```
264
216
 
265
- ### Pull request
266
-
267
- Push your code on the repository
268
-
269
- ```sh
270
- git push origin <branch-name>
271
- ```
217
+ ### Contributing
272
218
 
273
- then create a `Pull Request`.
274
- Pull request needs to be approved by at least one reviewer.
275
- After your PR is approved you can comment `/approve`
219
+ - Push your code on a branch following the [branch naming convention](#create-a-new-branch)
220
+ - Create a pull request.
221
+ - Obtain the approval of at least one reviewer.
222
+ - Then comment with `/approve` to merge the PR.
276
223
 
277
224
  ### Release
278
225
 
279
226
  After merging one or more PR in Core-UI, it is possible to plublish a new release.
280
- In the Core-UI repo, follow these steps :
227
+ In the Core-UI repo, follow these steps:
281
228
 
282
229
  1. Go on `Releases` then `Draft a new release`
283
- 2. In the select menu `Choose a tag` : Create a new tag (the current tag increment by 1).
284
- 3. You can now `Generate release notes` : it will add all the PR infos since the last release. \
230
+ 2. In the select menu `Choose a tag`: Create a new tag (the current tag increment by 1).
231
+ 3. You can now `Generate release notes`: it will add all the PR infos since the last release. \
285
232
  You can add details if necessary.
286
233
  4. `Publish release`
287
234
  5. It will create a PR that need to be approved.
@@ -7,6 +7,11 @@ type Props = {
7
7
  height?: number;
8
8
  barConfig?: Record<string, any>;
9
9
  };
10
+ /**
11
+ * @deprecated Use Barchart v2 instead
12
+ * @example import { Barchart } from '@scality/core-ui/dist/next';
13
+
14
+ */
10
15
  declare function BarChart({ id, data, xAxis, yAxis, color, height, barConfig, }: Props): import("react/jsx-runtime").JSX.Element;
11
16
  export { BarChart };
12
17
  //# sourceMappingURL=BarChart.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BarChart.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/barchart/BarChart.component.tsx"],"names":[],"mappings":"AACA,KAAK,KAAK,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACjC,CAAC;AAEF,iBAAS,QAAQ,CAAC,EAChB,EAAE,EACF,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,MAAY,EACZ,SAAS,GACV,EAAE,KAAK,2CAwBP;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"BarChart.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/barchart/BarChart.component.tsx"],"names":[],"mappings":"AACA,KAAK,KAAK,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACjC,CAAC;AAEF;;;;GAIG;AACH,iBAAS,QAAQ,CAAC,EAChB,EAAE,EACF,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,MAAY,EACZ,SAAS,GACV,EAAE,KAAK,2CAwBP;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,5 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { VegaChart } from '../vegachartv2/VegaChartV2.component';
3
+ /**
4
+ * @deprecated Use Barchart v2 instead
5
+ * @example import { Barchart } from '@scality/core-ui/dist/next';
6
+
7
+ */
3
8
  function BarChart({ id, data, xAxis, yAxis, color, height = 200, barConfig, }) {
4
9
  const spec = {
5
10
  mark: {
@@ -7,6 +7,10 @@ export type TimeType = {
7
7
  interval: number;
8
8
  };
9
9
  };
10
+ export type CategoryType = {
11
+ type: 'category';
12
+ gap?: number;
13
+ };
10
14
  export type Point = {
11
15
  key: string | number;
12
16
  values: {
@@ -36,7 +40,7 @@ export type BarchartSortFn<T extends BarchartBars> = (pointA: Record<T[number]['
36
40
  category: string | number;
37
41
  }) => 1 | -1 | 0;
38
42
  export type BarchartProps<T extends BarchartBars> = {
39
- type: 'category' | TimeType;
43
+ type: CategoryType | TimeType;
40
44
  bars?: T;
41
45
  tooltip?: BarchartTooltipFn<T>;
42
46
  defaultSort?: BarchartSortFn<T>;
@@ -1 +1 @@
1
- {"version":3,"file":"Barchart.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/barchartv2/Barchart.component.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAwB,SAAS,EAAgB,MAAM,SAAS,CAAC;AAmBxE,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE;QACT,SAAS,EAAE,IAAI,CAAC;QAChB,OAAO,EAAE,IAAI,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AACF,MAAM,MAAM,KAAK,GAAG;IAClB,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,SAAS;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,C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AAc,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,UAAU,eAAe;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;CAChB;AAID;;;;;GAKG;AACH,eAAO,MAAM,UAAU,cACV,MAAM,YACP,MAAM,KACf,KAAK,CAAC,SAoBR,CAAC;AAEF,eAAO,MAAM,UAAU,uDAOpB,eAAe,4CAkCjB,CAAC;AA2EF,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,YAAY,SAAS,aAAa,CAAC,CAAC,CAAC,4CAwIvE,CAAC"}
1
+ {"version":3,"file":"Barchart.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/barchartv2/Barchart.component.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAwB,SAAS,EAAgB,MAAM,SAAS,CAAC;AAmBxE,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE;QACT,SAAS,EAAE,IAAI,CAAC;QAChB,OAAO,EAAE,IAAI,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AACF,MAAM,MAAM,KAAK,GAAG;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AC;IACT,OAAO,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC/B,WAAW,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,UAAU,eAAe;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;CAChB;AAID;;;;;GAKG;AACH,eAAO,MAAM,UAAU,cACV,MAAM,YACP,MAAM,KACf,KAAK,CAAC,SAoBR,CAAC;AAEF,eAAO,MAAM,UAAU,uDAOpB,eAAe,4CAkCjB,CAAC;AA2EF,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,YAAY,SAAS,aAAa,CAAC,CAAC,CAAC,4CA+IvE,CAAC"}
@@ -94,7 +94,7 @@ export const Barchart = (props) => {
94
94
  const theme = useTheme();
95
95
  const { getColor } = useChartLegend();
96
96
  const [hoveredValue, setHoveredValue] = useState();
97
- const { height = CHART_CONSTANTS.DEFAULT_HEIGHT, bars, type = 'category', unitRange, stacked, stackedBarSort = 'default', defaultSort, tooltip, title, secondaryTitle, helpTooltip, rightTitle, isLoading, isError, } = props;
97
+ const { height = CHART_CONSTANTS.DEFAULT_HEIGHT, bars, type = { type: 'category' }, unitRange, stacked, stackedBarSort = 'default', defaultSort, tooltip, title, secondaryTitle, helpTooltip, rightTitle, isLoading, isError, } = props;
98
98
  // Create colorSet from ChartLegendWrapper
99
99
  const colorSet = bars === null || bars === void 0 ? void 0 : bars.reduce((acc, bar) => {
100
100
  const color = getColor(bar.label);
@@ -104,7 +104,11 @@ export const Barchart = (props) => {
104
104
  return acc;
105
105
  }, {});
106
106
  const { rechartsBars, unitLabel, roundReferenceValue, rechartsData } = useChartData(bars || [], type, colorSet || {}, stacked, defaultSort, unitRange, stackedBarSort);
107
- return (_jsxs(Stack, { direction: "vertical", gap: "r8", children: [_jsx(ChartHeader, { title: title, secondaryTitle: secondaryTitle, helpTooltip: helpTooltip, rightTitle: rightTitle }), isError || (!bars && !isLoading) ? (_jsx(Error, { height: height })) : isLoading ? (_jsx(Loading, { height: height })) : (_jsx(StyledResponsiveContainer, { width: "100%", height: height, children: _jsxs(BarChart, { data: rechartsData, accessibilityLayer: true, barSize: CHART_CONSTANTS.BAR_SIZE, height: height, margin: CHART_CONSTANTS.CHART_MARGIN, children: [_jsx(CartesianGrid, { vertical: false, horizontal: false, fill: theme.backgroundLevel1 }), rechartsBars.map((bar) => {
107
+ return (_jsxs(Stack, { direction: "vertical", gap: "r8", children: [_jsx(ChartHeader, { title: title, secondaryTitle: secondaryTitle, helpTooltip: helpTooltip, rightTitle: rightTitle }), isError || (!bars && !isLoading) ? (_jsx(Error, { height: height })) : isLoading ? (_jsx(Loading, { height: height })) : (_jsx(StyledResponsiveContainer, { width: "100%", height: height, children: _jsxs(BarChart, { data: rechartsData, accessibilityLayer: true, barSize: type.type === 'category'
108
+ ? type.gap === 0
109
+ ? undefined
110
+ : CHART_CONSTANTS.BAR_SIZE
111
+ : CHART_CONSTANTS.BAR_SIZE, height: height, margin: CHART_CONSTANTS.CHART_MARGIN, barCategoryGap: type.type === 'category' ? type.gap : undefined, children: [_jsx(CartesianGrid, { vertical: false, horizontal: false, fill: theme.backgroundLevel1 }), rechartsBars.map((bar) => {
108
112
  const { fill, dataKey, stackId } = bar;
109
113
  return (_jsx(Bar, { dataKey: dataKey, fill: chartColors[fill] || fill, minPointSize: stacked ? 0 : CHART_CONSTANTS.MIN_POINT_SIZE, stackId: stackId, onMouseOver: () => setHoveredValue(dataKey), onMouseLeave: () => setHoveredValue(undefined) }, dataKey));
110
114
  }), _jsx(YAxis, { tickCount: 1, unit: ` ${unitLabel}`, domain: [0, roundReferenceValue], tickFormatter: (value) => new Intl.NumberFormat('fr-FR').format(value.toFixed(0)) // Add a space as thousand separator
@@ -174,10 +174,10 @@ const getRechartsBarsAndBarDataKeys = (bars, colorSet, stacked) => {
174
174
  */
175
175
  export const formatPrometheusDataToRechartsDataAndBars = (bars, type, colorSet, stacked, defaultSort, legendOrder) => {
176
176
  const { rechartsBars, barDataKeys } = getRechartsBarsAndBarDataKeys(bars, colorSet, stacked);
177
- let data = type !== 'category' && type.type === 'time'
177
+ let data = type.type !== 'category' && type.type === 'time'
178
178
  ? transformTimeData(bars, type, barDataKeys)
179
179
  : transformCategoryData(bars, barDataKeys);
180
- if (type === 'category' && defaultSort) {
180
+ if (type.type === 'category' && defaultSort) {
181
181
  data = applySortingToData(data, barDataKeys, defaultSort);
182
182
  }
183
183
  const sortedRechartsBars = sortStackedBars(rechartsBars, data, stacked, legendOrder);
@@ -19,8 +19,9 @@ export declare const ButtonText: import("styled-components").StyledComponent<"sp
19
19
  export declare const ButtonContent: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
20
20
  /**
21
21
  * @deprecated
22
+ * Used only in Dropdown.component.tsx, can be removed after refactoring
22
23
  * You should use ButtonV2 with
23
- * import { Button } from '@scality/core-ui/dist/next';
24
+ * @example import { Button } from '@scality/core-ui/dist/next';
24
25
  */
25
26
  declare function Button({ text, href, icon, size, variant, outlined, disabled, onClick, title, isLoading, type, inverted, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
26
27
  export { Button };
@@ -1 +1 @@
1
- {"version":3,"file":"Button.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/button/Button.component.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,CAAC;IAIZ,OAAO,CAAC,EACJ,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,kBAAkB,CAAC;IAEvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;CAC/B,CAAC;AACF,eAAO,MAAM,YAAY,4GA+LxB,CAAC;AACF,eAAO,MAAM,UAAU,0GAStB,CAAC;AACF,eAAO,MAAM,UAAU,0GAItB,CAAC;AACF,eAAO,MAAM,aAAa,0GAEzB,CAAC;AAGF;;;;GAIG;AACH,iBAAS,MAAM,CAAC,EACd,IAAS,EACT,IAAS,EACT,IAAW,EACX,IAAa,EACb,OAAyB,EACzB,QAAgB,EAChB,QAAgB,EAChB,OAAO,EACP,KAAU,EACV,SAAiB,EACjB,IAAe,EACf,QAAgB,EAChB,GAAG,IAAI,EACR,EAAE,KAAK,2CAgDP;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"Button.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/button/Button.component.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,CAAC;IAIZ,OAAO,CAAC,EACJ,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,kBAAkB,CAAC;IAEvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;CAC/B,CAAC;AACF,eAAO,MAAM,YAAY,4GA+LxB,CAAC;AACF,eAAO,MAAM,UAAU,0GAStB,CAAC;AACF,eAAO,MAAM,UAAU,0GAItB,CAAC;AACF,eAAO,MAAM,aAAa,0GAEzB,CAAC;AAGF;;;;;GAKG;AACH,iBAAS,MAAM,CAAC,EACd,IAAS,EACT,IAAS,EACT,IAAW,EACX,IAAa,EACb,OAAyB,EACzB,QAAgB,EAChB,QAAgB,EAChB,OAAO,EACP,KAAU,EACV,SAAiB,EACjB,IAAe,EACf,QAAgB,EAChB,GAAG,IAAI,EACR,EAAE,KAAK,2CAgDP;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -218,8 +218,9 @@ export const ButtonContent = styled.span `
218
218
  const Anchor = ButtonStyled.withComponent('a');
219
219
  /**
220
220
  * @deprecated
221
+ * Used only in Dropdown.component.tsx, can be removed after refactoring
221
222
  * You should use ButtonV2 with
222
- * import { Button } from '@scality/core-ui/dist/next';
223
+ * @example import { Button } from '@scality/core-ui/dist/next';
223
224
  */
224
225
  function Button({ text = '', href = '', icon = null, size = 'base', variant = 'buttonPrimary', outlined = false, disabled = false, onClick, title = '', isLoading = false, type = 'button', inverted = false, ...rest }) {
225
226
  return href && href.length ? (_jsxs(Anchor, { className: "sc-button", href: href, variant: variant, outlined: outlined, disabled: disabled, size: size, title: title, ...rest, children: [icon && (_jsx(ButtonIcon, { text: text, size: size, children: icon })), _jsx(ButtonText, { children: text })] })) : (_jsx(ButtonStyled, { className: "sc-button", variant: variant, outlined: outlined, disabled: disabled || isLoading, size: size, onClick: onClick, title: title, isLoading: isLoading, type: type, inverted: inverted, icon: icon, text: text, ...rest, children: _jsxs(ButtonContent, { children: [isLoading && _jsx(Loader, { size: size }), _jsxs("span", { className: "sc-button-text", children: [icon && (_jsx(ButtonIcon, { text: text, size: size, children: icon })), _jsx(ButtonText, { children: text })] })] }) }));
@@ -1 +1 @@
1
- {"version":3,"file":"ChartLegend.d.ts","sourceRoot":"","sources":["../../../src/lib/components/chartlegend/ChartLegend.tsx"],"names":[],"mappings":"AAMA,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACvC,CAAC;AAUF,eAAO,MAAM,UAAU;eACV,OAAO;eACP,OAAO;SAYnB,CAAC;AAEF,eAAO,MAAM,WAAW;YACd,MAAM;WACP,MAAM,GAAG,WAAW;iBACd,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;SAsBpC,CAAC;AAEF,eAAO,MAAM,WAAW,oCAIrB,gBAAgB,4CA+ElB,CAAC"}
1
+ {"version":3,"file":"ChartLegend.d.ts","sourceRoot":"","sources":["../../../src/lib/components/chartlegend/ChartLegend.tsx"],"names":[],"mappings":"AAMA,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACvC,CAAC;AAUF,eAAO,MAAM,UAAU;eACV,OAAO;eACP,OAAO;SAYnB,CAAC;AAEF,eAAO,MAAM,WAAW;YACd,MAAM;WACP,MAAM,GAAG,WAAW;iBACd,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;SAsBpC,CAAC;AAEF,eAAO,MAAM,WAAW,oCAIrB,gBAAgB,4CAyElB,CAAC"}
@@ -45,7 +45,7 @@ export const LegendShape = styled.div `
45
45
  }}
46
46
  `;
47
47
  export const ChartLegend = ({ shape, disabled = false, direction = 'horizontal', }) => {
48
- const { listResources, getColor, isSelected, addSelectedResource, removeSelectedResource, selectAllResources, getAllResourcesCount, getSelectedCount, selectOnlyResource, } = useChartLegend();
48
+ const { listResources, getColor, isSelected, addSelectedResource, removeSelectedResource, selectAllResources, selectOnlyResource, isOnlyOneSelected, } = useChartLegend();
49
49
  const resources = listResources();
50
50
  const handleLegendClick = useCallback((resource, event) => {
51
51
  if (disabled)
@@ -54,7 +54,7 @@ export const ChartLegend = ({ shape, disabled = false, direction = 'horizontal',
54
54
  const itemIsSelected = isSelected(resource);
55
55
  if (isModifierClick) {
56
56
  if (itemIsSelected) {
57
- if (getSelectedCount() === 1) {
57
+ if (isOnlyOneSelected()) {
58
58
  selectAllResources();
59
59
  }
60
60
  else {
@@ -65,16 +65,11 @@ export const ChartLegend = ({ shape, disabled = false, direction = 'horizontal',
65
65
  addSelectedResource(resource);
66
66
  }
67
67
  }
68
+ else if (itemIsSelected && isOnlyOneSelected()) {
69
+ selectAllResources();
70
+ }
68
71
  else {
69
- if (getSelectedCount() === getAllResourcesCount()) {
70
- selectOnlyResource(resource);
71
- }
72
- else if (itemIsSelected) {
73
- selectAllResources();
74
- }
75
- else {
76
- selectOnlyResource(resource);
77
- }
72
+ selectOnlyResource(resource);
78
73
  }
79
74
  }, [
80
75
  disabled,
@@ -83,8 +78,7 @@ export const ChartLegend = ({ shape, disabled = false, direction = 'horizontal',
83
78
  removeSelectedResource,
84
79
  selectAllResources,
85
80
  selectOnlyResource,
86
- getAllResourcesCount,
87
- getSelectedCount,
81
+ isOnlyOneSelected,
88
82
  ]);
89
83
  return (_jsx(Legend, { direction: direction, children: resources.map((resource) => {
90
84
  const color = getColor(resource);
@@ -9,8 +9,7 @@ export type ChartLegendState = {
9
9
  isSelected: (resource: string) => boolean;
10
10
  getColor: (resource: string) => string | undefined;
11
11
  listResources: () => string[];
12
- getAllResourcesCount: () => number;
13
- getSelectedCount: () => number;
12
+ isOnlyOneSelected: () => boolean;
14
13
  };
15
14
  export type ChartLegendWrapperProps = {
16
15
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"ChartLegendWrapper.d.ts","sourceRoot":"","sources":["../../../src/lib/components/chartlegend/ChartLegendWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,SAAS,EAGV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,sBAAsB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACnD,aAAa,EAAE,MAAM,MAAM,EAAE,CAAC;IAC9B,oBAAoB,EAAE,MAAM,MAAM,CAAC;IACnC,gBAAgB,EAAE,MAAM,MAAM,CAAC;CAChC,CAAC;AAIF,MAA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16,11 +16,8 @@ export const ChartLegendWrapper = ({ children, colorSet, }) => {
16
16
  const selectOnlyResource = useCallback((resource) => {
17
17
  setSelectedResources([resource]);
18
18
  }, []);
19
- const getAllResourcesCount = useCallback(() => {
20
- return allResources.length;
21
- }, [allResources]);
22
- const getSelectedCount = useCallback(() => {
23
- return selectedResources.length;
19
+ const isOnlyOneSelected = useCallback(() => {
20
+ return selectedResources.length === 1;
24
21
  }, [selectedResources]);
25
22
  const isSelected = useCallback((resource) => {
26
23
  return selectedResources.includes(resource);
@@ -45,8 +42,7 @@ export const ChartLegendWrapper = ({ children, colorSet, }) => {
45
42
  isSelected,
46
43
  getColor,
47
44
  listResources,
48
- getAllResourcesCount,
49
- getSelectedCount,
45
+ isOnlyOneSelected,
50
46
  }), [
51
47
  selectedResources,
52
48
  addSelectedResource,
@@ -56,8 +52,7 @@ export const ChartLegendWrapper = ({ children, colorSet, }) => {
56
52
  isSelected,
57
53
  getColor,
58
54
  listResources,
59
- getAllResourcesCount,
60
- getSelectedCount,
55
+ isOnlyOneSelected,
61
56
  ]);
62
57
  return (_jsx(ChartLegendContext.Provider, { value: chartLegendState, children: children }));
63
58
  };
@@ -5,8 +5,13 @@ export declare const TIME_SECOND_FORMATER: Intl.DateTimeFormat;
5
5
  export declare const TIME_FORMATER: Intl.DateTimeFormat;
6
6
  export declare const DAY_MONTH_ABBREVIATED_HOUR_MINUTE_SECOND: Intl.DateTimeFormat;
7
7
  export declare const DAY_MONTH_ABBREVIATED_HOUR_MINUTE: Intl.DateTimeFormat;
8
+ /**
9
+ * @description Year month day formatter, without time. Used for describing long term date.
10
+ * @example 2025-01-01
11
+ */
12
+ export declare const YEAR_MONTH_DAY_FORMATTER: Intl.DateTimeFormat;
8
13
  type FormattedDateTimeProps = {
9
- format: 'date' | 'date-time' | 'date-time-second' | 'time' | 'time-second' | 'relative' | 'day-month-abbreviated-hour-minute' | 'day-month-abbreviated-hour-minute-second' | 'long-date' | 'chart-date';
14
+ format: 'date' | 'date-time' | 'date-time-second' | 'time' | 'time-second' | 'relative' | 'day-month-abbreviated-hour-minute' | 'day-month-abbreviated-hour-minute-second' | 'long-date' | 'chart-date' | 'year-month-day';
10
15
  value: Date;
11
16
  };
12
17
  export declare const FormattedDateTime: ({ format, value, }: FormattedDateTimeProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"FormattedDateTime.d.ts","sourceRoot":"","sources":["../../../src/lib/components/date/FormattedDateTime.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,qBAK7B,CAAC;AAEH,eAAO,MAAM,aAAa,qBAKxB,CAAC;AAEH,eAAO,MAAM,kBAAkB,qBAI7B,CAAC;AAEH,eAAO,MAAM,oBAAoB,qBAK/B,CAAC;AAEH,eAAO,MAAM,aAAa,qBAIxB,CAAC;AAEH,eAAO,MAAM,wCAAwC,qBAUpD,CAAC;AAEF,eAAO,MAAM,iCAAiC,qBAM5C,CAAC;AAEH,KAAK,sBAAsB,GAAG;IAC5B,MAAM,EACF,MAAM,GACN,WAAW,GACX,kBAAkB,GAClB,MAAM,GACN,aAAa,GACb,UAAU,GACV,mCAAmC,GACnC,0CAA0C,GAC1C,WAAW,GACX,YAAY,CAAC;IAEjB,KAAK,EAAE,IAAI,CAAC;CACb,CAAC;AAaF,eAAO,MAAM,iBAAiB,uBAG3B,sBAAsB,4CAqHxB,CAAC"}
1
+ {"version":3,"file":"FormattedDateTime.d.ts","sourceRoot":"","sources":["../../../src/lib/components/date/FormattedDateTime.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,qBAK7B,CAAC;AAEH,eAAO,MAAM,aAAa,qBAKxB,CAAC;AAEH,eAAO,MAAM,kBAAkB,qBAI7B,CAAC;AAEH,eAAO,MAAM,oBAAoB,qBAK/B,CAAC;AAEH,eAAO,MAAM,aAAa,qBAIxB,CAAC;AAEH,eAAO,MAAM,wCAAwC,qBAUpD,CAAC;AAEF,eAAO,MAAM,iCAAiC,qBAM5C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,wBAAwB,qBAInC,CAAC;AAEH,KAAK,sBAAsB,GAAG;IAC5B,MAAM,EACF,MAAM,GACN,WAAW,GACX,kBAAkB,GAClB,MAAM,GACN,aAAa,GACb,UAAU,GACV,mCAAmC,GACnC,0CAA0C,GAC1C,WAAW,GACX,YAAY,GACZ,gBAAgB,CAAC;IAErB,KAAK,EAAE,IAAI,CAAC;CACb,CAAC;AAaF,eAAO,MAAM,iBAAiB,uBAG3B,sBAAsB,4CAuHxB,CAAC"}
@@ -44,6 +44,15 @@ export const DAY_MONTH_ABBREVIATED_HOUR_MINUTE = Intl.DateTimeFormat('en-GB', {
44
44
  minute: '2-digit',
45
45
  hour12: false,
46
46
  });
47
+ /**
48
+ * @description Year month day formatter, without time. Used for describing long term date.
49
+ * @example 2025-01-01
50
+ */
51
+ export const YEAR_MONTH_DAY_FORMATTER = Intl.DateTimeFormat('en-CA', {
52
+ year: 'numeric',
53
+ month: '2-digit',
54
+ day: '2-digit',
55
+ });
47
56
  const isItFutureOrIsItPast = (timeDiff, stringToBeFormatted) => {
48
57
  if (timeDiff > 0) {
49
58
  return `${stringToBeFormatted} ago`;
@@ -93,6 +102,8 @@ export const FormattedDateTime = ({ format, value, }) => {
93
102
  return _jsx(_Fragment, { children: LONG_DATE_FORMATER.format(value) });
94
103
  case 'chart-date':
95
104
  return _jsx(_Fragment, { children: DAY_MONTH_FORMATER.format(value).replace(/[ ,]/g, '') });
105
+ case 'year-month-day':
106
+ return _jsx(_Fragment, { children: YEAR_MONTH_DAY_FORMATTER.format(value) });
96
107
  default:
97
108
  return _jsx(_Fragment, {});
98
109
  }
@@ -127,18 +127,16 @@ export declare const iconTable: {
127
127
  Play: string;
128
128
  Mail: string;
129
129
  };
130
- export declare const customIcons: {
131
- 'Remote-user': ({ "aria-label": ariaLabel, color, size }: {
132
- "aria-label": any;
133
- color: any;
134
- size: any;
135
- }) => import("react/jsx-runtime").JSX.Element;
136
- 'Remote-group': ({ "aria-label": ariaLabel, color, size }: {
137
- "aria-label": any;
138
- color: any;
139
- size: any;
140
- }) => import("react/jsx-runtime").JSX.Element;
130
+ type IconProps = {
131
+ 'aria-label'?: string;
132
+ color?: string;
133
+ size?: string;
134
+ icon?: string;
135
+ title?: string;
141
136
  };
137
+ export declare const customIcons: Record<string, ((props: IconProps) => JSX.Element) & {
138
+ displayName?: string;
139
+ }>;
142
140
  export type IconName = keyof typeof iconTable | keyof typeof customIcons;
143
141
  export type IconColor = keyof CoreUITheme;
144
142
  type Props = {
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/icon/Icon.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EACL,aAAa,EAKd,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOhD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6HrB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;CAOvB,CAAC;AAaF,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,SAAS,GAAG,MAAM,OAAO,WAAW,CAAC;AACzE,MAAM,MAAM,SAAS,GAAG,MAAM,WAAW,CAAC;AAC1C,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,O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CAAC;AAC1C,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAiBF,eAAO,MAAM,WAAW;UAAsB,QAAQ;SAiCrD,CAAC;AA2DF,iBAAS,IAAI,CAAC,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,2CAU7C;AAED,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -136,6 +136,8 @@ export const customIcons = {
136
136
  'Remote-user': ({ 'aria-label': ariaLabel, color, size }) => (_jsx(RemoteUser, { ariaLabel: ariaLabel, color: color, size: size })),
137
137
  'Remote-group': ({ 'aria-label': ariaLabel, color, size }) => (_jsx(RemoteGroup, { ariaLabel: ariaLabel, color: color, size: size })),
138
138
  };
139
+ customIcons['Remote-user'].displayName = 'RemoteUser';
140
+ customIcons['Remote-group'].displayName = 'RemoteGroup';
139
141
  const IconStyled = styled(FontAwesomeIcon) `
140
142
  ${(props) => {
141
143
  const theme = props.theme;
@@ -25,14 +25,15 @@ export declare function getUnitLabel(unitRange: {
25
25
  };
26
26
  /**
27
27
  * This function manually adds the missing data points with `null` value caused by downtime of the VMs
28
+ * Missing data points are only added when the gap between consecutive data points is bigger than 2 intervals
28
29
  *
29
30
  * @param {array} orginalValues - The array of the data points are already sorted according to the time series
30
31
  * @param {number} startingTimeStamp - The starting timestamp in seconds
31
32
  * @param {number} sampleDuration - The time span value in seconds
32
- * @param {number} sampleFrequency - The time difference between two data points in seconds
33
+ * @param {number} sampleInterval - The time difference between two data points in seconds
33
34
  *
34
35
  */
35
- export declare function addMissingDataPoint(orginalValues: [number, string | null][], startingTimeStamp: number, sampleDuration: number, sampleFrequency: number): [number, string | null][];
36
+ export declare function addMissingDataPoint(orginalValues: [number, number | string | null][], startingTimeStamp?: number, sampleDuration?: number, sampleInterval?: number): [number, number | string | null][];
36
37
  export declare const getRelativeValue: (value: number, base: number) => number;
37
38
  export declare const relativeDatumToOriginalDatum: <T>(datum: T, base: number) => T;
38
39
  export declare const getAbsoluteValue: (relativeValue: number, base: number) => number;
@@ -1 +1 @@
1
- {"version":3,"file":"ChartUtil.d.ts","sourceRoot":"","sources":["../../../src/lib/components/linetemporalchart/ChartUtil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,+BAA+B,CAAC;AAEvC,MAAM,MAAM,QAAQ,GAAG;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IAEd,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC;IAEtB,eAAe,EAAE,OAAO,CAAC;IAEzB,QAAQ,EAAE,OAAO,CAAC;CACnB,EAAE,CAAC;AAKJ,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,UAEtD;AACD,wBAAgB,gBAAgB,CAC9B,2BAA2B,EAAE,KAAK,EAAE,GACnC,QAAQ,CAqBV;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAU3E;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE;IACT,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,EAAE,EACH,QAAQ,EAAE,MAAM,GACf;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAkCA;AAED;;;;;;;;GAQG;AACH,w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