@devtron-labs/devtron-fe-common-lib 1.20.3-pre-7 → 1.20.3-pre-8
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.
- package/dist/{@code-editor-C-tgb5Wa.js → @code-editor-BfsnceCP.js} +9402 -10771
- package/dist/{@common-rjsf-B-hpOm7U.js → @common-rjsf-T8_6SwkY.js} +34 -34
- package/dist/{@framer-motion-CyE9ZrhW.js → @framer-motion-DZveCoIL.js} +90 -92
- package/dist/{@react-dates-DZKuosYz.js → @react-dates-CZ1bNWJM.js} +1 -1
- package/dist/{@react-select-D2LpysD2.js → @react-select-DS68hCUM.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-ok_G4gcR.js → @react-virtualized-sticky-tree-V-8klKy9.js} +1 -1
- package/dist/{@vendor-DwGKptu5.js → @vendor-3ORIJA0h.js} +18073 -26321
- package/dist/Common/API/reactQueryHooks.d.ts +1 -1
- package/dist/Common/Common.service.d.ts +1 -4
- package/dist/Common/Constants.d.ts +14 -41
- package/dist/Common/Hooks/UseRegisterShortcut/types.d.ts +0 -1
- package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
- package/dist/Common/SearchBar/SearchBar.component.d.ts +1 -1
- package/dist/Common/SearchBar/types.d.ts +0 -8
- package/dist/Common/SegmentedBarChart/types.d.ts +0 -2
- package/dist/Common/Types.d.ts +5 -38
- package/dist/Pages/GlobalConfigurations/ClustersAndEnvironments/index.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/ClustersAndEnvironments/types.d.ts +8 -0
- package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +3 -3
- package/dist/Pages/ResourceBrowser/constants.d.ts +8 -8
- package/dist/Shared/Components/ActionMenu/types.d.ts +0 -2
- package/dist/Shared/Components/ActionMenu/useActionMenu.hook.d.ts +1 -1
- package/dist/Shared/Components/Backdrop/Backdrop.d.ts +1 -1
- package/dist/Shared/Components/Backdrop/types.d.ts +1 -1
- package/dist/Shared/Components/Badge/utils.d.ts +1 -2
- package/dist/Shared/Components/DTFocusTrap/DTFocusTrap.d.ts +1 -1
- package/dist/Shared/Components/DTFocusTrap/types.d.ts +1 -2
- package/dist/Shared/Components/FeatureDescription/types.d.ts +1 -1
- package/dist/Shared/Components/FramerComponents/index.d.ts +2 -2
- package/dist/Shared/Components/GenericSectionErrorState/GenericSectionErrorState.component.d.ts +1 -2
- package/dist/Shared/Components/GenericSectionErrorState/types.d.ts +5 -21
- package/dist/Shared/Components/Header/HeaderWithCreateButton/HeaderWithCreateButon.d.ts +1 -1
- package/dist/Shared/Components/Header/HeaderWithCreateButton/types.d.ts +3 -1
- package/dist/Shared/Components/Header/PageHeader.d.ts +1 -1
- package/dist/Shared/Components/Header/types.d.ts +0 -2
- package/dist/Shared/Components/Icon/Icon.d.ts +0 -31
- package/dist/Shared/Components/Icon/IconBase.d.ts +1 -1
- package/dist/Shared/Components/Icon/types.d.ts +0 -6
- package/dist/Shared/Components/Illustration/Illustration.d.ts +0 -1
- package/dist/Shared/Components/Table/InternalTable.d.ts +1 -1
- package/dist/Shared/Components/Table/types.d.ts +4 -6
- package/dist/Shared/Components/TrailingItem/types.d.ts +0 -4
- package/dist/Shared/Components/TreeView/TreeView.component.d.ts +1 -1
- package/dist/Shared/Components/TreeView/TreeViewNodeContent.d.ts +1 -1
- package/dist/Shared/Components/TreeView/constants.d.ts +0 -3
- package/dist/Shared/Components/TreeView/types.d.ts +3 -17
- package/dist/Shared/Components/index.d.ts +0 -6
- package/dist/Shared/Helpers.d.ts +0 -2
- package/dist/Shared/Hooks/useGetResourceKindsOptions/service.d.ts +5 -0
- package/dist/Shared/Hooks/useGetResourceKindsOptions/types.d.ts +20 -5
- package/dist/Shared/Hooks/useUserPreferences/service.d.ts +1 -1
- package/dist/Shared/Hooks/useUserPreferences/types.d.ts +2 -32
- package/dist/Shared/Providers/MainContextProvider/types.d.ts +0 -9
- package/dist/Shared/Services/common.service.d.ts +0 -2
- package/dist/Shared/Services/types.d.ts +0 -6
- package/dist/Shared/constants.d.ts +1 -2
- package/dist/Shared/types.d.ts +0 -20
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-gift-animated.9ca6ccb4.svg +38 -0
- package/dist/index.d.ts +0 -5
- package/dist/index.js +957 -1005
- package/package.json +1 -4
- package/dist/Common/SegmentedBarChart/utils.d.ts +0 -2
- package/dist/Pages/GlobalConfigurations/ClustersAndEnvironments/VirtualClusterSidebar.d.ts +0 -2
- package/dist/Pages-Devtron-2.0/ApplicationManagement/Shared/ApplicationManagementIcon/ApplicationManagementIcon.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/ApplicationManagement/Shared/ApplicationManagementIcon/index.d.ts +0 -2
- package/dist/Pages-Devtron-2.0/ApplicationManagement/Shared/ApplicationManagementIcon/utils.d.ts +0 -11
- package/dist/Pages-Devtron-2.0/ApplicationManagement/Shared/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/ApplicationManagement/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/Automation&Enablement/Overview/Overview.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/Automation&Enablement/Overview/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/Automation&Enablement/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/CostVisibility/Overview/Overview.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/CostVisibility/Overview/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/CostVisibility/Shared/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/CostVisibility/Shared/types.d.ts +0 -11
- package/dist/Pages-Devtron-2.0/CostVisibility/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/GlobalConfiguration/Overview/Overview.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/GlobalConfiguration/Overview/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/GlobalConfiguration/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/GlobalOverview/GlobalOverview.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/GlobalOverview/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/Overview/Overview.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/Overview/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/Shared/InfrastructureManagementIcon/InfrastructureManagementIcon.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/Shared/InfrastructureManagementIcon/index.d.ts +0 -2
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/Shared/InfrastructureManagementIcon/utils.d.ts +0 -6
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/Shared/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/index.d.ts +0 -2
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/utils.d.ts +0 -11
- package/dist/Pages-Devtron-2.0/SecurityCenter/Overview/Overview.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/SecurityCenter/Overview/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/SecurityCenter/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/SoftwareReleaseManagement/Overview/Overview.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/SoftwareReleaseManagement/Overview/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/SoftwareReleaseManagement/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/index.d.ts +0 -3
- package/dist/Shared/Components/Charts/Chart.component.d.ts +0 -102
- package/dist/Shared/Components/Charts/constants.d.ts +0 -16
- package/dist/Shared/Components/Charts/index.d.ts +0 -4
- package/dist/Shared/Components/Charts/plugins.d.ts +0 -5
- package/dist/Shared/Components/Charts/types.d.ts +0 -95
- package/dist/Shared/Components/Charts/utils.d.ts +0 -15
- package/dist/Shared/Components/ClusterStatusIcon/ClusterStatusIcon.d.ts +0 -3
- package/dist/Shared/Components/ClusterStatusIcon/index.d.ts +0 -1
- package/dist/Shared/Components/ClusterStatusIcon/types.d.ts +0 -5
- package/dist/Shared/Components/ClusterStatusIcon/utils.d.ts +0 -2
- package/dist/Shared/Components/ExportToCsv/ExportToCsv.d.ts +0 -3
- package/dist/Shared/Components/ExportToCsv/ExportToCsvDialog.d.ts +0 -3
- package/dist/Shared/Components/ExportToCsv/index.d.ts +0 -2
- package/dist/Shared/Components/ExportToCsv/types.d.ts +0 -64
- package/dist/Shared/Components/KeyboardShortcut/KeyboardShortcut.component.d.ts +0 -3
- package/dist/Shared/Components/KeyboardShortcut/constants.d.ts +0 -3
- package/dist/Shared/Components/KeyboardShortcut/index.d.ts +0 -1
- package/dist/Shared/Components/KeyboardShortcut/types.d.ts +0 -4
- package/dist/Shared/Components/PrometheusConfigurations/PrometheusConfigCard.d.ts +0 -3
- package/dist/Shared/Components/PrometheusConfigurations/index.d.ts +0 -2
- package/dist/Shared/Components/PrometheusConfigurations/types.d.ts +0 -21
- package/dist/Shared/Components/SideNavigation/SideNavigation.d.ts +0 -2
- package/dist/Shared/Components/SideNavigation/index.d.ts +0 -2
- package/dist/Shared/Components/SideNavigation/types.d.ts +0 -19
- package/dist/assets/ic-alibaba.518d61a4.svg +0 -3
- package/dist/assets/ic-argocd-app.9c5eba79.svg +0 -61
- package/dist/assets/ic-arrow-line-down.b6a98848.svg +0 -3
- package/dist/assets/ic-aws.b094356f.svg +0 -11
- package/dist/assets/ic-bg-build.8609d0ea.svg +0 -13
- package/dist/assets/ic-bg-deploy.266711fe.svg +0 -22
- package/dist/assets/ic-bg-production-pipelines.2951cdc0.svg +0 -22
- package/dist/assets/ic-bg-project.84658405.svg +0 -12
- package/dist/assets/ic-bg-scan.2249360c.svg +0 -28
- package/dist/assets/ic-bg-webhook.b455152d.svg +0 -13
- package/dist/assets/ic-bot.65f403dd.svg +0 -3
- package/dist/assets/ic-building.2405d07b.svg +0 -3
- package/dist/assets/ic-clipboard.2869fa7d.svg +0 -3
- package/dist/assets/ic-clock-counterclockwise.3d7c2ef1.svg +0 -3
- package/dist/assets/ic-cloud.aa7acc8a.svg +0 -3
- package/dist/assets/ic-coins.2c15f406.svg +0 -3
- package/dist/assets/ic-database-backup.b9e7c558.svg +0 -3
- package/dist/assets/ic-devtron-text.67a413b6.svg +0 -3
- package/dist/assets/ic-edit-lines.57927b07.svg +0 -3
- package/dist/assets/ic-files-changed.04e6de3f.svg +0 -3
- package/dist/assets/ic-floppy-disk.6d392bcd.svg +0 -3
- package/dist/assets/ic-fluxcd-app.7bf7dce5.svg +0 -22
- package/dist/assets/ic-gift-animated.d848dfa3.svg +0 -1
- package/dist/assets/ic-google-cloud.a0198038.svg +0 -6
- package/dist/assets/ic-kubernetes.7e04c3d2.svg +0 -4
- package/dist/assets/ic-magic-wand.2c29cd4e.svg +0 -10
- package/dist/assets/ic-oracle-cloud.5a8ee45d.svg +0 -3
- package/dist/assets/ic-otc-cloud.43b31bd8.svg +0 -5
- package/dist/assets/ic-priority-medium-fill.7bab0ff8.svg +0 -4
- package/dist/assets/ic-right-panel-collapse.0ecf8ceb.svg +0 -3
- package/dist/assets/ic-symbol-greater-than.8f71342d.svg +0 -3
- package/dist/assets/ic-trend-up.5752ef30.svg +0 -3
- package/dist/assets/no-cluster-cost-enabled.038c73db.webp +0 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@devtron-labs/devtron-fe-common-lib",
|
3
|
-
"version": "1.20.3-pre-
|
3
|
+
"version": "1.20.3-pre-8",
|
4
4
|
"description": "Supporting common component library",
|
5
5
|
"type": "module",
|
6
6
|
"main": "dist/index.js",
|
@@ -49,7 +49,6 @@
|
|
49
49
|
"@types/dompurify": "^3.0.5",
|
50
50
|
"@types/json-schema": "^7.0.15",
|
51
51
|
"@types/react": "17.0.39",
|
52
|
-
"@types/react-csv": "^1.1.10",
|
53
52
|
"@types/react-dates": "^21.8.6",
|
54
53
|
"@types/react-dom": "17.0.13",
|
55
54
|
"@types/react-router-dom": "^5.3.3",
|
@@ -117,7 +116,6 @@
|
|
117
116
|
"@uiw/react-codemirror": "4.23.7",
|
118
117
|
"@xyflow/react": "12.4.2",
|
119
118
|
"ansi_up": "^5.2.1",
|
120
|
-
"chart.js": "^4.5.0",
|
121
119
|
"codemirror-json-schema": "0.8.0",
|
122
120
|
"dayjs": "^1.11.13",
|
123
121
|
"fast-json-patch": "^3.1.1",
|
@@ -128,7 +126,6 @@
|
|
128
126
|
"nanoid": "^3.3.8",
|
129
127
|
"qrcode.react": "^4.2.0",
|
130
128
|
"react-canvas-confetti": "^2.0.7",
|
131
|
-
"react-csv": "^2.2.2",
|
132
129
|
"react-dates": "^21.8.0",
|
133
130
|
"react-draggable": "^4.4.5",
|
134
131
|
"react-international-phone": "^4.5.0",
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const ApplicationManagementIcon: () => JSX.Element;
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './ApplicationManagementIcon';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Shared';
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const Overview: () => JSX.Element;
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Overview';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Overview';
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const Overview: () => JSX.Element;
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Overview';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './types';
|
@@ -1,11 +0,0 @@
|
|
1
|
-
export declare enum CostBreakdownViewType {
|
2
|
-
CLUSTERS = "clusters",
|
3
|
-
ENVIRONMENTS = "environments",
|
4
|
-
PROJECTS = "projects",
|
5
|
-
APPLICATIONS = "applications"
|
6
|
-
}
|
7
|
-
export declare enum CostBreakdownItemViewParamsType {
|
8
|
-
ITEM_NAME = "itemName",
|
9
|
-
VIEW = "view",
|
10
|
-
DETAIL = "detail"
|
11
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Shared';
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const Overview: () => JSX.Element;
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Overview';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Overview';
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const GlobalOverview: () => JSX.Element;
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './GlobalOverview';
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const Overview: () => JSX.Element;
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Overview';
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const InfrastructureManagementIcon: () => JSX.Element;
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './InfrastructureManagementIcon';
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const Overview: () => JSX.Element;
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Overview';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Overview';
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const Overview: () => JSX.Element;
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Overview';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Overview';
|
@@ -1,102 +0,0 @@
|
|
1
|
-
import { ChartProps } from './types';
|
2
|
-
/**
|
3
|
-
* A versatile Chart component that renders different types of charts using Chart.js.
|
4
|
-
* Supports area charts, pie charts, stacked bar charts (vertical/horizontal), and line charts.
|
5
|
-
*
|
6
|
-
* The component automatically adapts to theme changes and provides consistent styling
|
7
|
-
* across all chart types. Colors are provided by the user through the CHART_COLORS constant
|
8
|
-
* or custom color tokens.
|
9
|
-
*
|
10
|
-
* @example
|
11
|
-
* ```tsx
|
12
|
-
* [Area Chart Example]
|
13
|
-
* <Chart
|
14
|
-
* id="quarterly-growth"
|
15
|
-
* type="area"
|
16
|
-
* xAxisLabels={['Q1 2023', 'Q2 2023', 'Q3 2023', 'Q4 2023']}
|
17
|
-
* datasets={[{
|
18
|
-
* datasetName: 'Revenue Growth (%)',
|
19
|
-
* yAxisValues: [15.2, 18.7, 22.3, 19.8],
|
20
|
-
* backgroundColor: 'LavenderPurple300'
|
21
|
-
* }]}
|
22
|
-
* />
|
23
|
-
*
|
24
|
-
* [Pie Chart Example]
|
25
|
-
* <Chart
|
26
|
-
* id="technology-adoption"
|
27
|
-
* type="pie"
|
28
|
-
* xAxisLabels={['React', 'Vue.js', 'Angular']}
|
29
|
-
* datasets={{
|
30
|
-
* datasetName: 'Adoption Rate (%)',
|
31
|
-
* yAxisValues: [45.2, 28.7, 35.4],
|
32
|
-
* backgroundColor: ['SkyBlue300', 'AquaTeal400', 'LavenderPurple300']
|
33
|
-
* }}
|
34
|
-
* />
|
35
|
-
*
|
36
|
-
* [Line Chart Example (non-stacked, non-filled)]
|
37
|
-
* <Chart
|
38
|
-
* id="traffic-trends"
|
39
|
-
* type="line"
|
40
|
-
* xAxisLabels={['Jan', 'Feb', 'Mar', 'Apr']}
|
41
|
-
* datasets={[{
|
42
|
-
* datasetName: 'Website Traffic',
|
43
|
-
* yAxisValues: [120, 190, 300, 500],
|
44
|
-
* borderColor: 'SkyBlue500'
|
45
|
-
* }]}
|
46
|
-
* />
|
47
|
-
*
|
48
|
-
* [Stacked Bar Chart Example]
|
49
|
-
* <Chart
|
50
|
-
* id="team-allocation"
|
51
|
-
* type="stackedBar"
|
52
|
-
* xAxisLabels={['Q1', 'Q2', 'Q3', 'Q4']}
|
53
|
-
* datasets={[
|
54
|
-
* {
|
55
|
-
* datasetName: 'Frontend',
|
56
|
-
* yAxisValues: [120, 150, 180, 200],
|
57
|
-
* backgroundColor: 'SkyBlue600'
|
58
|
-
* },
|
59
|
-
* {
|
60
|
-
* datasetName: 'Backend',
|
61
|
-
* yAxisValues: [80, 100, 120, 140],
|
62
|
-
* backgroundColor: 'AquaTeal600'
|
63
|
-
* }
|
64
|
-
* ]}
|
65
|
-
* />
|
66
|
-
* ```
|
67
|
-
*
|
68
|
-
* @param id - Unique identifier for the chart canvas element
|
69
|
-
* @param type - Chart type: 'area', 'pie', 'stackedBar', 'stackedBarHorizontal', or 'line'
|
70
|
-
* @param xAxisLabels - Array of labels for the x-axis (or categories for pie charts)
|
71
|
-
* @param datasets - Chart data: array of datasets for most charts, single dataset object for pie charts
|
72
|
-
*
|
73
|
-
* @performance
|
74
|
-
* **Memoization Recommendations:**
|
75
|
-
* - `xAxisLabels`: Should be memoized with useMemo() if derived from complex calculations
|
76
|
-
* - `datasets`: Should be memoized with useMemo() as it contains arrays and objects that cause re-renders
|
77
|
-
* - Avoid passing inline objects or arrays directly to these props
|
78
|
-
*
|
79
|
-
* @example
|
80
|
-
* ```tsx
|
81
|
-
* [Good: Memoized props prevent unnecessary re-renders]
|
82
|
-
* const labels = useMemo(() => quarters.map(q => `Q${q}`), [quarters])
|
83
|
-
* const chartDatasets = useMemo(() => [
|
84
|
-
* {
|
85
|
-
* datasetName: 'Revenue',
|
86
|
-
* yAxisValues: revenueData,
|
87
|
-
* backgroundColor: 'LavenderPurple300'
|
88
|
-
* }
|
89
|
-
* ], [revenueData])
|
90
|
-
*
|
91
|
-
* return <Chart id="revenue-chart" type="area" xAxisLabels={labels} datasets={chartDatasets} />
|
92
|
-
* ```
|
93
|
-
*
|
94
|
-
* @notes
|
95
|
-
* - Chart automatically re-renders when theme changes (light/dark mode)
|
96
|
-
* - Line charts are rendered as non-stacked and non-filled by default
|
97
|
-
* - Pie charts expect a single dataset object instead of an array
|
98
|
-
* - Colors should reference CHART_COLORS tokens for consistency
|
99
|
-
* - Component destroys and recreates Chart.js instance on prop changes for optimal performance
|
100
|
-
*/
|
101
|
-
declare const Chart: (props: ChartProps) => JSX.Element;
|
102
|
-
export default Chart;
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { AppThemeType } from '../../Providers';
|
2
|
-
import { ChartColorKey } from './types';
|
3
|
-
export declare const LEGENDS_LABEL_CONFIG: {
|
4
|
-
readonly usePointStyle: true;
|
5
|
-
readonly pointStyle: "rectRounded";
|
6
|
-
readonly pointStyleWidth: 0;
|
7
|
-
readonly font: {
|
8
|
-
readonly family: "'IBM Plex Sans', 'Open Sans', 'Roboto'";
|
9
|
-
readonly size: 13;
|
10
|
-
readonly lineHeight: "150%";
|
11
|
-
readonly weight: 400;
|
12
|
-
};
|
13
|
-
};
|
14
|
-
export declare const CHART_COLORS: Record<AppThemeType, Record<ChartColorKey, string>>;
|
15
|
-
export declare const CHART_GRID_LINES_COLORS: Record<AppThemeType, string>;
|
16
|
-
export declare const CHART_CANVAS_BACKGROUND_COLORS: Record<AppThemeType, string>;
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { Plugin } from 'chart.js';
|
2
|
-
import { AppThemeType } from '../../Providers';
|
3
|
-
import { ChartType } from './types';
|
4
|
-
export declare const getAverageLinePlugin: (averageValue: number, appTheme: AppThemeType) => Plugin;
|
5
|
-
export declare const getSeparatorLinePlugin: (separatorIndex: number, chartType: ChartType, appTheme: AppThemeType) => Plugin;
|
@@ -1,95 +0,0 @@
|
|
1
|
-
import { ReactNode } from 'react';
|
2
|
-
import { ChartOptions, TooltipOptions } from 'chart.js';
|
3
|
-
import { TooltipProps } from '../../../Common/Tooltip';
|
4
|
-
import { AppThemeType } from '../../Providers';
|
5
|
-
import { Never } from '../../types';
|
6
|
-
export type ChartType = 'area' | 'pie' | 'stackedBar' | 'stackedBarHorizontal' | 'line';
|
7
|
-
export type ColorTokensType = 'DeepPlum' | 'Magenta' | 'Slate' | 'Lavender' | 'SkyBlue' | 'AquaTeal' | 'LimeGreen' | 'CoralRed' | 'GoldenYellow' | 'CharcoalGray' | 'Gray';
|
8
|
-
export type VariantsType = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950;
|
9
|
-
export type ChartColorKey = `${ColorTokensType}${VariantsType}`;
|
10
|
-
export type ChartTypeWithoutPie = Exclude<ChartType, 'pie'>;
|
11
|
-
interface BaseSimpleDataset {
|
12
|
-
datasetName: string;
|
13
|
-
yAxisValues: number[];
|
14
|
-
}
|
15
|
-
export interface SimpleDataset extends BaseSimpleDataset {
|
16
|
-
backgroundColor: ChartColorKey;
|
17
|
-
}
|
18
|
-
export interface SimpleDatasetForPie extends BaseSimpleDataset {
|
19
|
-
backgroundColor: Array<ChartColorKey>;
|
20
|
-
}
|
21
|
-
export interface SimpleDatasetForLine extends BaseSimpleDataset {
|
22
|
-
borderColor: ChartColorKey;
|
23
|
-
}
|
24
|
-
type XYAxisMax = {
|
25
|
-
xAxisMax?: number;
|
26
|
-
yAxisMax?: number;
|
27
|
-
};
|
28
|
-
type TypeAndDatasetsType = ({
|
29
|
-
type: 'pie';
|
30
|
-
/**
|
31
|
-
* Needs to be memoized
|
32
|
-
*/
|
33
|
-
datasets: SimpleDatasetForPie;
|
34
|
-
separatorIndex?: never;
|
35
|
-
averageLineValue?: never;
|
36
|
-
} & Never<XYAxisMax>) | ({
|
37
|
-
type: 'line';
|
38
|
-
datasets: SimpleDatasetForLine[];
|
39
|
-
separatorIndex?: never;
|
40
|
-
averageLineValue?: number;
|
41
|
-
} & XYAxisMax) | ({
|
42
|
-
type: 'area';
|
43
|
-
datasets: SimpleDataset[];
|
44
|
-
separatorIndex?: never;
|
45
|
-
averageLineValue?: number;
|
46
|
-
} & XYAxisMax) | ({
|
47
|
-
type: Exclude<ChartType, 'pie' | 'line' | 'area'>;
|
48
|
-
datasets: SimpleDataset[];
|
49
|
-
separatorIndex?: number;
|
50
|
-
averageLineValue?: never;
|
51
|
-
} & XYAxisMax);
|
52
|
-
export type ChartProps = {
|
53
|
-
id: string;
|
54
|
-
/**
|
55
|
-
* The x-axis labels. Needs to be memoized
|
56
|
-
*/
|
57
|
-
xAxisLabels: string[];
|
58
|
-
/**
|
59
|
-
* Hide the x and y axis and grid lines
|
60
|
-
* @default false
|
61
|
-
*/
|
62
|
-
hideAxis?: boolean;
|
63
|
-
/**
|
64
|
-
* Callback function for chart click events
|
65
|
-
*/
|
66
|
-
onChartClick?: ChartOptions['onClick'];
|
67
|
-
tooltipConfig?: {
|
68
|
-
getTooltipContent?: (args: Parameters<TooltipOptions['external']>[0]) => ReactNode;
|
69
|
-
/**
|
70
|
-
* @default 'top'
|
71
|
-
*/
|
72
|
-
placement?: TooltipProps['placement'];
|
73
|
-
};
|
74
|
-
} & TypeAndDatasetsType;
|
75
|
-
export type TransformDatasetProps = {
|
76
|
-
appTheme: AppThemeType;
|
77
|
-
} & ({
|
78
|
-
type: 'pie';
|
79
|
-
dataset: SimpleDatasetForPie;
|
80
|
-
} | {
|
81
|
-
type: 'line';
|
82
|
-
dataset: SimpleDatasetForLine;
|
83
|
-
} | {
|
84
|
-
type: Exclude<ChartType, 'pie' | 'line'>;
|
85
|
-
dataset: SimpleDataset;
|
86
|
-
});
|
87
|
-
export type GetBackgroundAndBorderColorProps = TransformDatasetProps;
|
88
|
-
export type TransformDataForChartProps = {
|
89
|
-
appTheme: AppThemeType;
|
90
|
-
} & TypeAndDatasetsType;
|
91
|
-
export interface GetDefaultOptionsParams extends Pick<ChartProps, 'hideAxis' | 'onChartClick' | 'type' | 'xAxisMax' | 'yAxisMax'> {
|
92
|
-
appTheme: AppThemeType;
|
93
|
-
externalTooltipHandler: TooltipOptions['external'];
|
94
|
-
}
|
95
|
-
export {};
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { ReactNode } from 'react';
|
2
|
-
import { ChartDataset, ChartOptions, ChartType as ChartJSChartType, TooltipOptions } from 'chart.js';
|
3
|
-
import { ChartType, GetDefaultOptionsParams, TransformDataForChartProps } from './types';
|
4
|
-
export declare const getChartJSType: (type: ChartType) => ChartJSChartType;
|
5
|
-
export declare const getDefaultOptions: ({ type, appTheme, hideAxis, xAxisMax, yAxisMax, onChartClick, externalTooltipHandler, }: GetDefaultOptionsParams) => ChartOptions;
|
6
|
-
export declare const transformDataForChart: (props: TransformDataForChartProps) => (ChartDataset<"line"> | {
|
7
|
-
label: string;
|
8
|
-
data: number[];
|
9
|
-
backgroundColor: string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern> | readonly (string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern>)[] | ((ctx: import('chart.js').ScriptableContext<"line">, options: import('chart.js/dist/types/basic').AnyObject) => import('chart.js').Color);
|
10
|
-
borderColor: string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern> | readonly (string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern>)[] | ((ctx: import('chart.js').ScriptableContext<"line">, options: import('chart.js/dist/types/basic').AnyObject) => import('chart.js').Color);
|
11
|
-
pointBackgroundColor: string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern> | readonly (string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern>)[] | ((ctx: import('chart.js').ScriptableContext<"line">, options: import('chart.js/dist/types/basic').AnyObject) => import('chart.js').Color);
|
12
|
-
pointBorderColor: string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern> | readonly (string | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasGradient> | import('chart.js/dist/types/utils')._DeepPartialObject<CanvasPattern>)[] | ((ctx: import('chart.js').ScriptableContext<"line">, options: import('chart.js/dist/types/basic').AnyObject) => import('chart.js').Color);
|
13
|
-
})[];
|
14
|
-
export declare function chartColorGenerator(): Generator<"DeepPlum500" | "DeepPlum300" | "DeepPlum100" | "DeepPlum50" | "DeepPlum600" | "DeepPlum400" | "DeepPlum200" | "DeepPlum700" | "DeepPlum800" | "DeepPlum900" | "DeepPlum950" | "Magenta500" | "Magenta300" | "Magenta100" | "Magenta50" | "Magenta600" | "Magenta400" | "Magenta200" | "Magenta700" | "Magenta800" | "Magenta900" | "Magenta950" | "Slate500" | "Slate300" | "Slate100" | "Slate50" | "Slate600" | "Slate400" | "Slate200" | "Slate700" | "Slate800" | "Slate900" | "Slate950" | "Lavender500" | "Lavender300" | "Lavender100" | "Lavender50" | "Lavender600" | "Lavender400" | "Lavender200" | "Lavender700" | "Lavender800" | "Lavender900" | "Lavender950" | "SkyBlue500" | "SkyBlue300" | "SkyBlue100" | "SkyBlue50" | "SkyBlue600" | "SkyBlue400" | "SkyBlue200" | "SkyBlue700" | "SkyBlue800" | "SkyBlue900" | "SkyBlue950" | "AquaTeal500" | "AquaTeal300" | "AquaTeal100" | "AquaTeal50" | "AquaTeal600" | "AquaTeal400" | "AquaTeal200" | "AquaTeal700" | "AquaTeal800" | "AquaTeal900" | "AquaTeal950" | "LimeGreen500" | "LimeGreen300" | "LimeGreen100" | "LimeGreen50" | "LimeGreen600" | "LimeGreen400" | "LimeGreen200" | "LimeGreen700" | "LimeGreen800" | "LimeGreen900" | "LimeGreen950" | "CoralRed500" | "CoralRed300" | "CoralRed100" | "CoralRed50" | "CoralRed600" | "CoralRed400" | "CoralRed200" | "CoralRed700" | "CoralRed800" | "CoralRed900" | "CoralRed950" | "GoldenYellow500" | "GoldenYellow300" | "GoldenYellow100" | "GoldenYellow50" | "GoldenYellow600" | "GoldenYellow400" | "GoldenYellow200" | "GoldenYellow700" | "GoldenYellow800" | "GoldenYellow900" | "GoldenYellow950" | "CharcoalGray500" | "CharcoalGray300" | "CharcoalGray100" | "CharcoalGray50" | "CharcoalGray600" | "CharcoalGray400" | "CharcoalGray200" | "CharcoalGray700" | "CharcoalGray800" | "CharcoalGray900" | "CharcoalGray950" | "Gray500" | "Gray300" | "Gray100" | "Gray50" | "Gray600" | "Gray400" | "Gray200" | "Gray700" | "Gray800" | "Gray900" | "Gray950", void, unknown>;
|
15
|
-
export declare const buildChartTooltipFromContext: ({ title, body, labelColors: labelColorsProp, }: Pick<Parameters<TooltipOptions["external"]>[0]["tooltip"], "title" | "body" | "labelColors">) => ReactNode;
|
@@ -1 +0,0 @@
|
|
1
|
-
export { default as ClusterStatusIcon } from './ClusterStatusIcon';
|
@@ -1,3 +0,0 @@
|
|
1
|
-
import { ExportToCsvProps } from './types';
|
2
|
-
declare const ExportToCsv: <HeaderItemType extends string>({ apiPromise, fileName, triggerElementConfig, disabled, modalConfig, headers, downloadRequestId, }: ExportToCsvProps<HeaderItemType>) => JSX.Element;
|
3
|
-
export default ExportToCsv;
|
@@ -1,64 +0,0 @@
|
|
1
|
-
import { ServerErrors } from '../../../Common/ServerError';
|
2
|
-
import { APIOptions } from '../../../Common/Types';
|
3
|
-
import { ButtonProps } from '../Button';
|
4
|
-
type TriggerElementConfigType = {
|
5
|
-
buttonProps: ButtonProps;
|
6
|
-
showOnlyIcon?: boolean;
|
7
|
-
customButton?: never;
|
8
|
-
isExternalTrigger?: false;
|
9
|
-
} | {
|
10
|
-
customButton: {
|
11
|
-
content: JSX.Element;
|
12
|
-
className: string;
|
13
|
-
};
|
14
|
-
buttonProps?: never;
|
15
|
-
showOnlyIcon?: false;
|
16
|
-
isExternalTrigger?: false;
|
17
|
-
} | {
|
18
|
-
isExternalTrigger: true;
|
19
|
-
showOnlyIcon?: false;
|
20
|
-
buttonProps?: never;
|
21
|
-
customButton?: never;
|
22
|
-
} | {
|
23
|
-
showOnlyIcon: true;
|
24
|
-
buttonProps?: never;
|
25
|
-
customButton?: never;
|
26
|
-
isExternalTrigger?: false;
|
27
|
-
};
|
28
|
-
export interface ExportToCsvProps<HeaderItemKeyType extends string> {
|
29
|
-
headers: {
|
30
|
-
label: string;
|
31
|
-
key: HeaderItemKeyType;
|
32
|
-
}[];
|
33
|
-
apiPromise: ({ signal, }: Pick<APIOptions, 'signal'>) => Promise<Record<HeaderItemKeyType, string | number | boolean>[]>;
|
34
|
-
fileName: string;
|
35
|
-
/**
|
36
|
-
* If nothing given will render a Button with "Export CSV" text
|
37
|
-
*/
|
38
|
-
triggerElementConfig?: TriggerElementConfigType;
|
39
|
-
/**
|
40
|
-
* @default false
|
41
|
-
*/
|
42
|
-
disabled?: boolean;
|
43
|
-
/**
|
44
|
-
* If not given would show default dialog
|
45
|
-
*/
|
46
|
-
modalConfig?: {
|
47
|
-
hideDialog: false;
|
48
|
-
renderCustomModal?: (proceedWithDownload: (shouldProceed: boolean) => void) => JSX.Element;
|
49
|
-
} | {
|
50
|
-
hideDialog: true;
|
51
|
-
renderCustomModal?: never;
|
52
|
-
};
|
53
|
-
/**
|
54
|
-
* If given, would trigger export on when this changes and has some value
|
55
|
-
*/
|
56
|
-
downloadRequestId?: string | number;
|
57
|
-
}
|
58
|
-
export interface ExportToCsvDialogProps {
|
59
|
-
isLoading: boolean;
|
60
|
-
exportDataError: ServerErrors;
|
61
|
-
initiateDownload: () => void;
|
62
|
-
handleCancelRequest: () => void;
|
63
|
-
}
|
64
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export { default as KeyboardShortcut } from './KeyboardShortcut.component';
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { SyntheticEvent } from 'react';
|
2
|
-
import { AuthenticationType } from '../../types';
|
3
|
-
interface ValueErrorType<T = string> {
|
4
|
-
value: T;
|
5
|
-
error: string;
|
6
|
-
}
|
7
|
-
export interface PromoetheusConfig {
|
8
|
-
endpoint: ValueErrorType;
|
9
|
-
authType: ValueErrorType<AuthenticationType>;
|
10
|
-
userName: ValueErrorType;
|
11
|
-
password: ValueErrorType;
|
12
|
-
prometheusTlsClientKey: ValueErrorType;
|
13
|
-
prometheusTlsClientCert: ValueErrorType;
|
14
|
-
}
|
15
|
-
export interface PromoetheusConfigProps {
|
16
|
-
prometheusConfig: PromoetheusConfig;
|
17
|
-
handleOnChange: (event: SyntheticEvent) => void;
|
18
|
-
onPrometheusAuthTypeChange: (event: SyntheticEvent) => void;
|
19
|
-
isCostPrometheus?: boolean;
|
20
|
-
}
|
21
|
-
export {};
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { TooltipProps } from '../../../Common/Tooltip';
|
2
|
-
export type SideNavigationItemBase = {
|
3
|
-
id: string;
|
4
|
-
title: string;
|
5
|
-
dataTestId: string;
|
6
|
-
};
|
7
|
-
export type SideNavigationItemLink = SideNavigationItemBase & {
|
8
|
-
href: string;
|
9
|
-
items?: never;
|
10
|
-
tooltipProps?: TooltipProps;
|
11
|
-
};
|
12
|
-
export type SideNavigationItemGroup = SideNavigationItemBase & {
|
13
|
-
items: Omit<SideNavigationItemLink, 'items'>[];
|
14
|
-
href?: never;
|
15
|
-
tooltipProps?: never;
|
16
|
-
};
|
17
|
-
export interface SideNavigationProps {
|
18
|
-
list: (SideNavigationItemLink | SideNavigationItemGroup)[];
|
19
|
-
}
|
@@ -1,3 +0,0 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
2
|
-
<path d="M13.3731 6.99902C15.5376 6.98146 17.6318 7.66777 17.4913 9.74414C17.4209 11.3456 15.1334 13.6162 13.919 15.2354C13.4086 15.9393 13.3027 16.4151 14.2003 16.3623C17.4033 16.1511 20.3074 15.0414 23.0001 13.8799C21.1698 15.1294 11.7367 19.8464 11.7012 16.626C11.7188 16.2212 11.9118 15.7808 12.211 15.3232C12.5102 14.8657 12.9332 14.3911 13.3555 13.8984C14.0067 13.1593 15.6078 11.3812 16.1358 10.3252C16.2238 10.114 16.2764 9.92011 16.3116 9.76172C16.3817 8.77647 15.168 8.40678 13.3204 7.89648L12.9678 8.10742L13.672 8.61816C10.6098 9.16373 8.74392 9.76178 6.50887 10.5361L6.80867 11.3457L5.6993 12.4551C6.12165 12.5959 6.57961 12.666 7.05476 12.666C8.16352 12.666 9.18467 12.2791 9.97664 11.6104C9.76545 11.3112 9.48347 11.1875 9.48347 11.1875C9.48347 11.1875 10.029 11.1703 10.3282 11.6631C10.3326 11.6695 10.5212 11.9492 10.4864 12.3145H10.1524C10.17 12.1737 10.1525 12.0324 10.1173 11.9092C9.25492 12.6307 8.14604 13.0703 6.93172 13.0703C6.29822 13.0703 5.69991 12.9475 5.1368 12.7363V14.1445C4.38008 14.4085 3.02466 15.253 3.04207 16.0625C3.09487 16.4497 3.28893 16.5907 3.46492 16.6963C5.16781 17.679 9.82909 16.3517 9.83601 16.3447C8.14648 17.2071 6.5265 17.8934 4.045 17.999C0.807049 17.9285 0.29712 15.7634 1.8282 13.4932C3.28895 11.1877 5.5768 9.12849 9.25496 7.82617C10.3109 7.4566 11.8597 7.01662 13.3731 6.99902ZM20.3253 16.4854C20.7477 16.4854 21.0821 16.8374 21.0645 17.2422C21.0643 17.6644 20.7299 17.999 20.3253 17.999C19.9207 17.999 19.5862 17.6643 19.586 17.2422C19.586 16.8198 19.9205 16.4854 20.3253 16.4854ZM20.3253 16.6084C19.9733 16.6085 19.6915 16.8902 19.6915 17.2422C19.6917 17.594 19.9735 17.8749 20.3253 17.875C20.6771 17.875 20.9589 17.594 20.9591 17.2422C20.9591 16.8902 20.6773 16.6084 20.3253 16.6084ZM20.3604 16.8545C20.4307 16.8545 20.4834 16.8545 20.5186 16.8721C20.5538 16.8897 20.5889 16.9072 20.6065 16.9424C20.6241 16.9776 20.6427 17.0126 20.6427 17.0654C20.6426 17.1182 20.6241 17.1709 20.5889 17.2061C20.5537 17.2411 20.501 17.2588 20.4307 17.2764C20.4658 17.2939 20.4835 17.2942 20.5011 17.3115C20.5362 17.3291 20.5712 17.3643 20.5538 17.417L20.6954 17.6289H20.5714L20.4659 17.4697C20.4482 17.4172 20.4131 17.3818 20.3956 17.3643L20.3428 17.3115C20.3253 17.3114 20.3077 17.2939 20.2901 17.2939H20.1143V17.6465H20.0089V16.8545H20.3604ZM20.1319 17.1885H20.3604C20.413 17.1885 20.4482 17.1711 20.4659 17.1709L20.5186 17.1182C20.5362 17.1006 20.5362 17.0655 20.5362 17.0479C20.5362 17.0127 20.5187 16.9776 20.5011 16.96C20.4834 16.9424 20.4307 16.9248 20.378 16.9248H20.1319V17.1885Z" fill="#FF6A00"/>
|
3
|
-
</svg>
|