@devtron-labs/devtron-fe-common-lib 1.20.6-pre-39 → 1.20.6-pre-40

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 (64) hide show
  1. package/dist/{@code-editor-DBuop1Nw.js → @code-editor-BLFW7ibH.js} +6734 -6742
  2. package/dist/{@common-rjsf-Mldh3D5a.js → @common-rjsf-D13pdzrK.js} +2 -2
  3. package/dist/{@framer-motion-BbD0XILR.js → @framer-motion-DMkBQPN0.js} +1 -1
  4. package/dist/{@react-dates-DLCF81bK.js → @react-dates-BjZWpiVv.js} +1 -1
  5. package/dist/{@react-select-CK9Bxd-k.js → @react-select-DtwlfcIG.js} +1 -1
  6. package/dist/{@react-virtualized-sticky-tree-J61SX97M.js → @react-virtualized-sticky-tree-M81Af3Qs.js} +1 -1
  7. package/dist/{@vendor-DEAetXNs.js → @vendor-DceGoESd.js} +63 -63
  8. package/dist/Common/Constants.d.ts +3 -5
  9. package/dist/Common/Tooltip/Tooltip.d.ts +1 -1
  10. package/dist/Pages-Devtron-2.0/InfrastructureManagement/Overview/Overview.d.ts +1 -0
  11. package/dist/Pages-Devtron-2.0/InfrastructureManagement/Overview/index.d.ts +1 -0
  12. package/dist/Pages-Devtron-2.0/InfrastructureManagement/index.d.ts +1 -0
  13. package/dist/Pages-Devtron-2.0/SecurityCenter/Overview/Overview.d.ts +1 -0
  14. package/dist/Pages-Devtron-2.0/SecurityCenter/Overview/index.d.ts +1 -0
  15. package/dist/Pages-Devtron-2.0/SecurityCenter/index.d.ts +1 -1
  16. package/dist/Pages-Devtron-2.0/index.d.ts +0 -1
  17. package/dist/Shared/Components/Charts/Chart.component.d.ts +8 -25
  18. package/dist/Shared/Components/Charts/constants.d.ts +0 -1
  19. package/dist/Shared/Components/Charts/index.d.ts +1 -1
  20. package/dist/Shared/Components/Charts/plugins.d.ts +1 -4
  21. package/dist/Shared/Components/Charts/types.d.ts +18 -27
  22. package/dist/Shared/Components/Charts/utils.d.ts +44 -4
  23. package/dist/Shared/Components/DocLink/constants.d.ts +1 -0
  24. package/dist/Shared/Components/Icon/Icon.d.ts +22 -4
  25. package/dist/Shared/Components/Security/constants.d.ts +0 -2
  26. package/dist/Shared/Components/Security/index.d.ts +0 -1
  27. package/dist/Shared/Helpers.d.ts +1 -1
  28. package/dist/Shared/Hooks/useUserPreferences/types.d.ts +2 -2
  29. package/dist/Shared/Providers/MainContextProvider/types.d.ts +1 -0
  30. package/dist/Shared/Services/common.service.d.ts +1 -2
  31. package/dist/Shared/Services/types.d.ts +1 -4
  32. package/dist/assets/ic-arrow-white.be4aea3f.svg +3 -0
  33. package/dist/assets/ic-book-gear.bb9bca1f.svg +9 -0
  34. package/dist/assets/ic-bulb.3906a732.svg +7 -0
  35. package/dist/assets/ic-check-green.b03d325d.svg +3 -0
  36. package/dist/assets/ic-circle-progress.0875625d.svg +6 -0
  37. package/dist/assets/ic-close-circle-red.72e0a495.svg +3 -0
  38. package/dist/assets/ic-close-circle.b39dd87d.svg +3 -0
  39. package/dist/assets/ic-confirm.f6b1c31c.svg +3 -0
  40. package/dist/assets/ic-dot-circle.5ce1fccf.svg +3 -0
  41. package/dist/assets/ic-failure-color.e167df98.svg +4 -0
  42. package/dist/assets/ic-info-filled-new.28815384.svg +8 -0
  43. package/dist/assets/ic-line.4e8fa046.svg +3 -0
  44. package/dist/assets/ic-new-chat.f7c90f8e.svg +5 -0
  45. package/dist/assets/ic-pencil-white.369e78d9.svg +3 -0
  46. package/dist/assets/ic-piggybank.3a4839d7.svg +3 -0
  47. package/dist/assets/ic-priority-high-fill.53755d8f.svg +3 -0
  48. package/dist/assets/ic-priority-low-fill.79e781ae.svg +4 -0
  49. package/dist/assets/ic-priority-urgent-fill.78d42fa0.svg +10 -0
  50. package/dist/assets/ic-red-bulb.25e01bfc.svg +9 -0
  51. package/dist/assets/ic-spider.99b77bd8.svg +3 -0
  52. package/dist/assets/ic-timer-green.00bf295e.svg +3 -0
  53. package/dist/assets/ic-timer-red.656bee16.svg +3 -0
  54. package/dist/index.d.ts +2 -0
  55. package/dist/index.js +992 -1016
  56. package/package.json +1 -1
  57. package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/SecurityCenterIcon/SecurityCenterIcon.d.ts +0 -1
  58. package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/SecurityCenterIcon/index.d.ts +0 -1
  59. package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/SecurityCenterIcon/utils.d.ts +0 -6
  60. package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/index.d.ts +0 -1
  61. package/dist/assets/ic-coins-color-animated.fe11cdc3.svg +0 -112
  62. package/dist/assets/ic-security-fixable.168b5bf8.svg +0 -12
  63. package/dist/assets/ic-security-not-fixable.be099f65.svg +0 -12
  64. package/dist/assets/ic-security-vulnerability.c954b87a.svg +0 -4
@@ -1,7 +1,7 @@
1
- import { j as n, aK as v, aM as J, aL as K } from "./@vendor-DEAetXNs.js";
1
+ import { j as n, aK as v, aM as J, aL as K } from "./@vendor-DceGoESd.js";
2
2
  import V, { useState as q, useEffect as Y, forwardRef as G, useMemo as E } from "react";
3
3
  import z, { getDefaultRegistry as Q } from "@rjsf/core";
4
- import { T as O, j as F, c as S, b as N, S as X, i as Z, g as ee, a as te, d as R, e as ne } from "./@code-editor-DBuop1Nw.js";
4
+ import { T as O, j as F, c as S, b as N, S as X, i as Z, g as ee, a as te, d as R, e as ne } from "./@code-editor-BLFW7ibH.js";
5
5
  import { getUiOptions as B, getTemplate as $, getSubmitButtonOptions as re, ADDITIONAL_PROPERTY_FLAG as L, errorId as se, englishStringTranslator as ae, TranslatableString as oe, titleId as le, canExpand as ie, deepEquals as ce } from "@rjsf/utils";
6
6
  import { ReactComponent as de } from "./assets/ic-add.cfaa779b.svg";
7
7
  import { ReactComponent as ue } from "./assets/ic-warning.ecf7ff97.svg";
@@ -1,4 +1,4 @@
1
- import { aW as m, aX as lt, aY as R, aZ as Zr, a_ as Le, a$ as oe, b0 as T, b1 as $e, b2 as at, b3 as Gt, b4 as Q, b5 as $r, b6 as oi, b7 as si, b8 as ui, b9 as li, ba as fi, bb as ci, bc as vi, bd as di, be as qr, bf as pi, bg as hi, bh as mi, bi as gi, bj as yi, bk as Jr, bl as Pt, bm as he, bn as X, bo as bi, bp as Qr, bq as z, br as tn, bs as me, bt as Z, bu as Pi, bv as Ot, bw as Vi, bx as Ti, by as en, bz as Ft, bA as O, bB as ge, bC as Si, bD as se, bE as xi, bF as Ci } from "./@vendor-DEAetXNs.js";
1
+ import { aW as m, aX as lt, aY as R, aZ as Zr, a_ as Le, a$ as oe, b0 as T, b1 as $e, b2 as at, b3 as Gt, b4 as Q, b5 as $r, b6 as oi, b7 as si, b8 as ui, b9 as li, ba as fi, bb as ci, bc as vi, bd as di, be as qr, bf as pi, bg as hi, bh as mi, bi as gi, bj as yi, bk as Jr, bl as Pt, bm as he, bn as X, bo as bi, bp as Qr, bq as z, br as tn, bs as me, bt as Z, bu as Pi, bv as Ot, bw as Vi, bx as Ti, by as en, bz as Ft, bA as O, bB as ge, bC as Si, bD as se, bE as xi, bF as Ci } from "./@vendor-DceGoESd.js";
2
2
  import * as Y from "react";
3
3
  import Re, { createContext as St, useContext as F, useLayoutEffect as Ai, useEffect as N, useState as De, useRef as $, useCallback as ye, useMemo as Vt, forwardRef as wi, createElement as Ei, cloneElement as Li, Children as Ri, isValidElement as Di } from "react";
4
4
  var qe = "production", Me = typeof process > "u" || process.env === void 0 ? qe : process.env.NODE_ENV || qe, tt = function(t) {
@@ -1,5 +1,5 @@
1
1
  import Te from "react";
2
- import { bG as he, bH as Ke, bI as we, bJ as cn, bK as Le, bL as Je, bM as tt, bN as at, bO as et, bP as lt, bQ as nt, bR as so, bS as fn, bT as uo, bU as bt, bV as ei, bW as hn, bX as co, bY as fo, bZ as ho, b_ as vn, b$ as Fe, c0 as pn, c1 as ti, c2 as wn, c3 as ai, c4 as ni, c5 as ri, c6 as Rt, c7 as oi, c8 as ii, c9 as li } from "./@vendor-DEAetXNs.js";
2
+ import { bG as he, bH as Ke, bI as we, bJ as cn, bK as Le, bL as Je, bM as tt, bN as at, bO as et, bP as lt, bQ as nt, bR as so, bS as fn, bT as uo, bU as bt, bV as ei, bW as hn, bX as co, bY as fo, bZ as ho, b_ as vn, b$ as Fe, c0 as pn, c1 as ti, c2 as wn, c3 as ai, c4 as ni, c5 as ri, c6 as Rt, c7 as oi, c8 as ii, c9 as li } from "./@vendor-DceGoESd.js";
3
3
  import { r as Ne, h as si, g as di } from "./@moment-CGWt8tF2.js";
4
4
  import './assets/@react-dates.css';var Wt = {}, jt = {}, zt = {}, Nn;
5
5
  function Ve() {
@@ -1,4 +1,4 @@
1
- import { ca as xt, cb as v, b_ as re, cc as h, c5 as f, cd as Y, ce as U, cf as xe, cg as Bt, ch as Ue, ci as Ft, cj as Vt, ck as Et, cl as yt, cm as Wt, cn as Xt, co as ne, cp as Zt } from "./@vendor-DEAetXNs.js";
1
+ import { ca as xt, cb as v, b_ as re, cc as h, c5 as f, cd as Y, ce as U, cf as xe, cg as Bt, ch as Ue, ci as Ft, cj as Vt, ck as Et, cl as yt, cm as Wt, cn as Xt, co as ne, cp as Zt } from "./@vendor-DceGoESd.js";
2
2
  import * as y from "react";
3
3
  import { useRef as j, useState as ee, useMemo as q, useCallback as D, createContext as Nt, useContext as St, Component as Rt, Fragment as Be, useEffect as Qe, forwardRef as Ht } from "react";
4
4
  import { createPortal as Tt } from "react-dom";
@@ -2,7 +2,7 @@ var v = Object.defineProperty;
2
2
  var E = (a, h, e) => h in a ? v(a, h, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[h] = e;
3
3
  var f = (a, h, e) => E(a, typeof h != "symbol" ? h + "" : h, e);
4
4
  import u, { createRef as k } from "react";
5
- import { cq as x } from "./@vendor-DEAetXNs.js";
5
+ import { cq as x } from "./@vendor-DceGoESd.js";
6
6
  const b = () => typeof navigator < "u" && /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor) ? "-webkit-sticky" : "sticky";
7
7
  var g;
8
8
  (function(a) {
@@ -80412,46 +80412,46 @@ const C9e = Object.freeze(JSON.parse('{"colors":{"activityBar.activeBorder":"#1c
80412
80412
  default: D9e
80413
80413
  }, Symbol.toStringTag, { value: "Module" }));
80414
80414
  export {
80415
- V5 as $,
80416
- aFe as A,
80417
- cFe as B,
80418
- ts as C,
80415
+ ade as $,
80416
+ cFe as A,
80417
+ ts as B,
80418
+ GIe as C,
80419
80419
  AIe as D,
80420
80420
  De as E,
80421
80421
  OIe as F,
80422
- GIe as G,
80423
- YIe as H,
80424
- uFe as I,
80425
- fle as J,
80426
- jIe as K,
80427
- ch as L,
80428
- ZV as M,
80429
- oy as N,
80430
- iy as O,
80431
- eH as P,
80422
+ YIe as G,
80423
+ uFe as H,
80424
+ fle as I,
80425
+ jIe as J,
80426
+ ch as K,
80427
+ ZV as L,
80428
+ oy as M,
80429
+ iy as N,
80430
+ eH as O,
80431
+ MA as P,
80432
80432
  _n as Q,
80433
- MA as R,
80433
+ j5 as R,
80434
80434
  bn as S,
80435
80435
  Wn as T,
80436
- j5 as U,
80436
+ Wb as U,
80437
80437
  dn as V,
80438
- Wb as W,
80439
- MIe as X,
80440
- $e as Y,
80441
- spe as Z,
80442
- UIe as _,
80438
+ MIe as W,
80439
+ $e as X,
80440
+ spe as Y,
80441
+ UIe as Z,
80442
+ V5 as _,
80443
80443
  lpe as a,
80444
80444
  aj as a$,
80445
- ade as a0,
80446
- ap as a1,
80447
- zIe as a2,
80448
- Xc as a3,
80449
- LIe as a4,
80450
- BIe as a5,
80451
- WIe as a6,
80452
- ht as a7,
80453
- VIe as a8,
80454
- Gce as a9,
80445
+ ap as a0,
80446
+ zIe as a1,
80447
+ Xc as a2,
80448
+ LIe as a3,
80449
+ BIe as a4,
80450
+ WIe as a5,
80451
+ ht as a6,
80452
+ VIe as a7,
80453
+ Gce as a8,
80454
+ pFe as a9,
80455
80455
  gb as aA,
80456
80456
  wMe as aB,
80457
80457
  BFe as aC,
@@ -80479,28 +80479,28 @@ export {
80479
80479
  U9e as aY,
80480
80480
  H9e as aZ,
80481
80481
  Rb as a_,
80482
- pFe as aa,
80483
- mFe as ab,
80484
- gFe as ac,
80485
- yFe as ad,
80486
- cu as ae,
80487
- w8 as af,
80488
- C8 as ag,
80489
- Hx as ah,
80490
- Zx as ai,
80491
- Wx as aj,
80492
- Du as ak,
80493
- Qx as al,
80494
- ag as am,
80495
- dg as an,
80496
- ub as ao,
80497
- _Fe as ap,
80498
- CFe as aq,
80499
- wFe as ar,
80500
- xFe as as,
80501
- LY as at,
80502
- uf as au,
80503
- ko as av,
80482
+ mFe as aa,
80483
+ gFe as ab,
80484
+ yFe as ac,
80485
+ cu as ad,
80486
+ w8 as ae,
80487
+ C8 as af,
80488
+ Hx as ag,
80489
+ Zx as ah,
80490
+ Wx as ai,
80491
+ Du as aj,
80492
+ Qx as ak,
80493
+ ag as al,
80494
+ dg as am,
80495
+ ub as an,
80496
+ _Fe as ao,
80497
+ CFe as ap,
80498
+ wFe as aq,
80499
+ xFe as ar,
80500
+ LY as as,
80501
+ uf as at,
80502
+ ko as au,
80503
+ j9e as av,
80504
80504
  LFe as aw,
80505
80505
  jFe as ax,
80506
80506
  vb as ay,
@@ -80601,25 +80601,25 @@ export {
80601
80601
  gD as cr,
80602
80602
  KIe as d,
80603
80603
  ZIe as e,
80604
- j9e as f,
80604
+ QIe as f,
80605
80605
  dpe as g,
80606
- QIe as h,
80606
+ Cme as h,
80607
80607
  q9e as i,
80608
80608
  ce as j,
80609
80609
  xR as k,
80610
80610
  NIe as l,
80611
- Cme as m,
80611
+ Zle as m,
80612
80612
  dIe as n,
80613
80613
  $A as o,
80614
- Zle as p,
80615
- JIe as q,
80614
+ JIe as p,
80615
+ fFe as q,
80616
80616
  nH as r,
80617
80617
  qIe as s,
80618
80618
  K as t,
80619
- fFe as u,
80620
- hFe as v,
80621
- dFe as w,
80622
- Ype as x,
80619
+ hFe as u,
80620
+ dFe as v,
80621
+ Ype as w,
80622
+ lFe as x,
80623
80623
  XIe as y,
80624
- lFe as z
80624
+ aFe as z
80625
80625
  };
@@ -74,6 +74,7 @@ export declare const URLS: {
74
74
  readonly INFRASTRUCTURE_MANAGEMENT_CHART_STORE_DISCOVER: "/infrastructure-management/chart-store/discover";
75
75
  readonly INFRASTRUCTURE_MANAGEMENT_RESOURCE_BROWSER: "/infrastructure-management/resource-browser";
76
76
  readonly INFRASTRUCTURE_MANAGEMENT_RESOURCE_WATCHER: "/infrastructure-management/resource-watcher";
77
+ readonly INFRASTRUCTURE_MANAGEMENT_AUDIT_LOGS: "/infrastructure-management/audit-logs";
77
78
  readonly SOFTWARE_RELEASE_MANAGEMENT: "/software-release-management";
78
79
  readonly COST_VISIBILITY: "/cost-visibility";
79
80
  readonly COST_VISIBILITY_OVERVIEW: "/cost-visibility/overview";
@@ -85,9 +86,6 @@ export declare const URLS: {
85
86
  readonly COST_BREAKDOWN_DETAIL: ":itemName/:view/:detail?";
86
87
  readonly COST_CONFIGURATIONS: "/cost-visibility/configurations";
87
88
  readonly SECURITY_CENTER: "/security-center";
88
- readonly SECURITY_CENTER_OVERVIEW: "/security-center/overview";
89
- readonly SECURITY_CENTER_SCANS: "/security-center/scans";
90
- readonly SECURITY_CENTER_POLICIES: "/security-center/policies";
91
89
  readonly AUTOMATION_AND_ENABLEMENT: "/automation-and-enablement";
92
90
  readonly AUTOMATION_AND_ENABLEMENT_JOB: "/automation-and-enablement/job";
93
91
  readonly DATA_PROTECTION: "/data-protection-management";
@@ -103,8 +101,9 @@ export declare const URLS: {
103
101
  readonly GLOBAL_CONFIG_EDIT_CLUSTER: "/global-configuration/cluster-env/edit/:clusterId";
104
102
  readonly PERMISSION_GROUPS: "/global-configuration/auth/groups";
105
103
  readonly AI_RECOMMENDATIONS: "/ai-recommendations";
106
- readonly AI_RECOMMENDATIONS_OVERVIEW: "/ai-recommendations/overview";
104
+ readonly AI_RECOMMENDATIONS_NOTIFICATIONS: "/ai-recommendations/notifications";
107
105
  readonly EXTERNAL_APPS: "ea";
106
+ readonly AI_RECOMMENDATIONS_RUNBOOKS: "/ai-recommendations/runbooks";
108
107
  };
109
108
  export declare const ROUTES: {
110
109
  readonly APP: "app";
@@ -131,7 +130,6 @@ export declare const ROUTES: {
131
130
  readonly PATCH: "patch";
132
131
  readonly ENVIRONMENT_LIST_MIN: "env/autocomplete";
133
132
  readonly CLUSTER: "cluster";
134
- readonly CLUSTER_MIN: "cluster/min";
135
133
  readonly API_RESOURCE: "k8s/api-resources";
136
134
  readonly GVK: "gvk";
137
135
  readonly NAMESPACE: "env/namespace";
@@ -1,3 +1,3 @@
1
1
  import { TooltipProps } from './types';
2
- declare const Tooltip: ({ shortcutKeyCombo, alwaysShowTippyOnHover, showOnTruncate, wordBreak, children: child, plugins, ...rest }: TooltipProps) => JSX.Element;
2
+ declare const Tooltip: ({ shortcutKeyCombo, alwaysShowTippyOnHover, showOnTruncate, wordBreak, children: child, ...rest }: TooltipProps) => JSX.Element;
3
3
  export default Tooltip;
@@ -0,0 +1 @@
1
+ export declare const Overview: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Overview';
@@ -1 +1,2 @@
1
+ export * from './Overview';
1
2
  export * from './Shared';
@@ -0,0 +1 @@
1
+ export declare const Overview: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Overview';
@@ -1 +1 @@
1
- export * from './Shared';
1
+ export * from './Overview';
@@ -2,4 +2,3 @@ export * from './ApplicationManagement';
2
2
  export * from './CostVisibility';
3
3
  export * from './DataProtectionManagement';
4
4
  export * from './InfrastructureManagement';
5
- export * from './SecurityCenter';
@@ -1,7 +1,7 @@
1
1
  import { ChartProps } from './types';
2
2
  /**
3
3
  * A versatile Chart component that renders different types of charts using Chart.js.
4
- * Supports area charts, pie charts, semi-pie charts, stacked bar charts (vertical/horizontal), and line charts.
4
+ * Supports area charts, pie charts, stacked bar charts (vertical/horizontal), and line charts.
5
5
  *
6
6
  * The component automatically adapts to theme changes and provides consistent styling
7
7
  * across all chart types. Colors are provided by the user through the CHART_COLORS constant
@@ -29,24 +29,7 @@ import { ChartProps } from './types';
29
29
  * datasets={{
30
30
  * datasetName: 'Adoption Rate (%)',
31
31
  * yAxisValues: [45.2, 28.7, 35.4],
32
- * colors: ['SkyBlue300', 'AquaTeal400', 'LavenderPurple300']
33
- * }}
34
- * />
35
- *
36
- * [Semi-Pie Chart Example with Center Text]
37
- * <Chart
38
- * id="performance-metrics"
39
- * type="semiPie"
40
- * xAxisLabels={['Good', 'Average', 'Poor']}
41
- * datasets={{
42
- * datasetName: 'Performance Score (%)',
43
- * yAxisValues: [65, 25, 10],
44
- * colors: ['LimeGreen500', 'GoldenYellow400', 'CoralRed400']
45
- * }}
46
- * centerText={{
47
- * text: '85%',
48
- * fontSize: 24,
49
- * fontWeight: '600'
32
+ * backgroundColor: ['SkyBlue300', 'AquaTeal400', 'LavenderPurple300']
50
33
  * }}
51
34
  * />
52
35
  *
@@ -83,9 +66,11 @@ import { ChartProps } from './types';
83
66
  * ```
84
67
  *
85
68
  * @param id - Unique identifier for the chart canvas element
86
- * @param type - Chart type: 'area', 'pie', 'semiPie', 'stackedBar', 'stackedBarHorizontal', or 'line'
87
- * @param xAxisLabels - Array of labels for the x-axis (or categories for pie/semi-pie charts)
88
- * @param datasets - Chart data: array of datasets for most charts, single dataset object for pie/semi-pie charts
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
+ * @param xAxisConfig
73
+ * @param yAxisConfig
89
74
  *
90
75
  * @performance
91
76
  * **Memoization Recommendations:**
@@ -111,9 +96,7 @@ import { ChartProps } from './types';
111
96
  * @notes
112
97
  * - Chart automatically re-renders when theme changes (light/dark mode)
113
98
  * - Line charts are rendered as non-stacked and non-filled by default
114
- * - Pie and semi-pie charts expect a single dataset object instead of an array
115
- * - Semi-pie charts render as half-circles, ideal for gauges or progress indicators
116
- * - Center text can be added to pie and semi-pie charts using the centerText prop
99
+ * - Pie charts expect a single dataset object instead of an array
117
100
  * - Colors should reference CHART_COLORS tokens for consistency
118
101
  * - Component destroys and recreates Chart.js instance on prop changes for optimal performance
119
102
  */
@@ -7,4 +7,3 @@ export declare const CHART_AXIS_LABELS_COLOR: Record<AppThemeType, string>;
7
7
  export declare const CHART_CANVAS_BACKGROUND_COLORS: Record<AppThemeType, string>;
8
8
  export declare const LINE_DASH: number[];
9
9
  export declare const MAX_BAR_THICKNESS = 96;
10
- export declare const DIS_JOINT_CHART_POINT_RADIUS = 4;
@@ -1,4 +1,4 @@
1
1
  export { default as Chart } from './Chart.component';
2
2
  export { CHART_COLORS } from './constants';
3
- export type { CenterTextConfig, ChartColorKey, ChartProps, ChartType, ReferenceLineConfigType, SimpleDataset, SimpleDatasetForPie, } from './types';
3
+ export type { ChartColorKey, ChartProps, ChartType, ReferenceLineConfigType, SimpleDataset, SimpleDatasetForPie, } from './types';
4
4
  export { chartColorGenerator } from './utils';
@@ -1,7 +1,4 @@
1
- import { RefObject } from 'react';
2
1
  import { Plugin } from 'chart.js';
3
2
  import { AppThemeType } from '../../Providers';
4
- import { CenterTextConfig, ChartType, ReferenceLineConfigType } from './types';
3
+ import { ReferenceLineConfigType } from './types';
5
4
  export declare const drawReferenceLine: (config: ReferenceLineConfigType, id: string, appTheme: AppThemeType) => Plugin;
6
- export declare const htmlLegendPlugin: (id: string, ref: RefObject<HTMLDivElement>, type: ChartType) => Plugin;
7
- export declare const drawCenterText: (config: CenterTextConfig, appTheme: AppThemeType) => Plugin;
@@ -3,11 +3,11 @@ import { TooltipOptions, TooltipPositionerFunction } from 'chart.js';
3
3
  import { TooltipProps } from '../../../Common/Tooltip';
4
4
  import { AppThemeType } from '../../Providers';
5
5
  import { Never } from '../../types';
6
- export type ChartType = 'area' | 'pie' | 'semiPie' | 'stackedBar' | 'stackedBarHorizontal' | 'line';
7
- export type ColorTokensType = 'DeepPlum' | 'Magenta' | 'Slate' | 'Lavender' | 'SkyBlue' | 'AquaTeal' | 'LimeGreen' | 'CoralRed' | 'GoldenYellow' | 'CharcoalGray' | 'Gray' | 'SunsetOrange';
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
8
  export type VariantsType = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950;
9
9
  export type ChartColorKey = `${ColorTokensType}${VariantsType}`;
10
- export type ChartTypeWithoutPie = Exclude<ChartType, 'pie' | 'semiPie'>;
10
+ export type ChartTypeWithoutPie = Exclude<ChartType, 'pie'>;
11
11
  interface BaseSimpleDataset {
12
12
  datasetName: string;
13
13
  yAxisValues: number[];
@@ -28,12 +28,15 @@ export interface ReferenceLineConfigType {
28
28
  color?: ChartColorKey;
29
29
  value: number;
30
30
  }
31
- export interface CenterTextConfig {
32
- text: string;
33
- fontSize?: number;
34
- fontWeight?: string | number;
35
- color?: string;
36
- fontFamily?: string;
31
+ export interface AxisConfig {
32
+ title?: string;
33
+ unit?: string;
34
+ unitPosition?: 'prefix' | 'suffix';
35
+ labelFormatter?: (value: number | string, index: number) => string | string[] | number | number[];
36
+ hide?: boolean;
37
+ max?: number;
38
+ min?: number;
39
+ stepSize?: number;
37
40
  }
38
41
  type XYAxisMax = {
39
42
  xAxisMax?: number;
@@ -42,6 +45,8 @@ type XYAxisMax = {
42
45
  * Optional reference lines to draw across the chart
43
46
  */
44
47
  referenceLines?: ReferenceLineConfigType[];
48
+ xAxisConfig?: AxisConfig;
49
+ yAxisConfig?: AxisConfig;
45
50
  };
46
51
  type OnChartClickHandler = (datasetName: string, value: number) => void;
47
52
  type ScaleTickFormatCallbacks = Partial<{
@@ -49,29 +54,24 @@ type ScaleTickFormatCallbacks = Partial<{
49
54
  yScaleTickFormat: (value: number, index: number) => string | string[] | number | number[];
50
55
  }>;
51
56
  export type TypeAndDatasetsType = ({
52
- type: 'pie' | 'semiPie';
57
+ type: 'pie';
53
58
  /**
54
59
  * Needs to be memoized
55
60
  */
56
61
  datasets: SimpleDatasetForPie;
57
62
  onChartClick?: OnChartClickHandler;
58
- /** Configuration for center text (only for doughnut/pie charts) */
59
- centerText?: CenterTextConfig;
60
63
  } & Never<XYAxisMax> & Never<ScaleTickFormatCallbacks>) | ({
61
64
  type: 'line';
62
65
  datasets: SimpleDatasetForLineAndArea[];
63
66
  onChartClick?: never;
64
- centerText?: never;
65
67
  } & XYAxisMax & ScaleTickFormatCallbacks) | ({
66
68
  type: 'area';
67
69
  datasets: SimpleDatasetForLineAndArea;
68
70
  onChartClick?: never;
69
- centerText?: never;
70
71
  } & XYAxisMax & ScaleTickFormatCallbacks) | ({
71
- type: Exclude<ChartType, 'pie' | 'semiPie' | 'line' | 'area'>;
72
+ type: Exclude<ChartType, 'pie' | 'line' | 'area'>;
72
73
  datasets: SimpleDataset[];
73
74
  onChartClick?: OnChartClickHandler;
74
- centerText?: never;
75
75
  } & XYAxisMax & ScaleTickFormatCallbacks);
76
76
  export type ChartProps = {
77
77
  id: string;
@@ -93,21 +93,19 @@ export type ChartProps = {
93
93
  placement?: TooltipProps['placement'];
94
94
  datasetValueFormatter?: (value: number) => string | number;
95
95
  };
96
- /** A title for x axis */
97
96
  xScaleTitle?: string;
98
- /** A title for y axis */
99
97
  yScaleTitle?: string;
100
98
  } & TypeAndDatasetsType;
101
99
  export type TransformDatasetProps = {
102
100
  appTheme: AppThemeType;
103
101
  } & ({
104
- type: 'pie' | 'semiPie';
102
+ type: 'pie';
105
103
  dataset: SimpleDatasetForPie;
106
104
  } | {
107
105
  type: 'line' | 'area';
108
106
  dataset: SimpleDatasetForLineAndArea;
109
107
  } | {
110
- type: Exclude<ChartType, 'pie' | 'semiPie' | 'line' | 'area'>;
108
+ type: Exclude<ChartType, 'pie' | 'line' | 'area'>;
111
109
  dataset: SimpleDataset;
112
110
  });
113
111
  export type GetBackgroundAndBorderColorProps = TransformDatasetProps;
@@ -125,11 +123,4 @@ declare module 'chart.js' {
125
123
  barElementCenterPositioner: TooltipPositionerFunction<'bar'>;
126
124
  }
127
125
  }
128
- export interface HTMLLegendProps {
129
- backgroundColor: string;
130
- label: string;
131
- onClick: () => void;
132
- strikeThrough: boolean;
133
- variant: 'line' | 'square';
134
- }
135
126
  export {};
@@ -1,6 +1,48 @@
1
1
  import { ReactNode } from 'react';
2
- import { ChartDataset, ChartOptions, ChartType as ChartJSChartType, Point, TooltipOptions } from 'chart.js';
2
+ import { Chart, ChartDataset, ChartOptions, ChartType as ChartJSChartType, Point, TooltipOptions } from 'chart.js';
3
+ import { AppThemeType } from '../../Providers';
3
4
  import { ChartType, GetDefaultOptionsParams, TransformDataForChartProps } from './types';
5
+ export declare const getLegendsLabelConfig: (type: ChartType, appTheme: AppThemeType) => {
6
+ usePointStyle: false;
7
+ boxHeight: number;
8
+ generateLabels: (chart: Chart<"line">) => {
9
+ fillStyle: string;
10
+ strokeStyle: string;
11
+ lineDash: number[];
12
+ lineWidth: number;
13
+ text: string;
14
+ borderRadius?: number | import('chart.js').BorderRadius;
15
+ datasetIndex?: number;
16
+ index?: number;
17
+ fontColor?: import('chart.js').Color;
18
+ hidden?: boolean;
19
+ lineCap?: CanvasLineCap;
20
+ lineDashOffset?: number;
21
+ lineJoin?: CanvasLineJoin;
22
+ pointStyle?: import('chart.js').PointStyle;
23
+ rotation?: number;
24
+ textAlign?: import('chart.js').TextAlign;
25
+ }[];
26
+ color: string;
27
+ font: {
28
+ family: string;
29
+ size: number;
30
+ lineHeight: string;
31
+ weight: number;
32
+ };
33
+ } | {
34
+ usePointStyle: true;
35
+ boxHeight: number;
36
+ boxWidth: number;
37
+ pointStyle: "rectRounded";
38
+ color: string;
39
+ font: {
40
+ family: string;
41
+ size: number;
42
+ lineHeight: string;
43
+ weight: number;
44
+ };
45
+ };
4
46
  export declare const getChartJSType: (type: ChartType) => ChartJSChartType;
5
47
  export declare const getDefaultOptions: ({ chartProps, appTheme, externalTooltipHandler, setTooltipVisible, }: GetDefaultOptionsParams) => ChartOptions;
6
48
  export declare const transformDataForChart: (props: TransformDataForChartProps) => (ChartDataset<"line"> | {
@@ -14,17 +56,15 @@ export declare const transformDataForChart: (props: TransformDataForChartProps)
14
56
  backgroundColor: string[];
15
57
  hoverBackgroundColor: string[];
16
58
  borderColor: string;
17
- borderWidth: number;
18
59
  label: string;
19
60
  data: number[];
20
61
  } | {
21
62
  backgroundColor: string;
22
63
  hoverBackgroundColor: string;
23
64
  borderColor: string;
24
- borderWidth?: undefined;
25
65
  label: string;
26
66
  data: number[];
27
67
  })[];
28
- 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" | "SunsetOrange500" | "SunsetOrange300" | "SunsetOrange100" | "SunsetOrange50" | "SunsetOrange600" | "SunsetOrange400" | "SunsetOrange200" | "SunsetOrange700" | "SunsetOrange800" | "SunsetOrange900" | "SunsetOrange950", void, unknown>;
68
+ 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>;
29
69
  export declare const buildChartTooltipFromContext: ({ title, body, labelColors: labelColorsProp, }: Pick<Parameters<TooltipOptions["external"]>[0]["tooltip"], "title" | "body" | "labelColors">) => ReactNode;
30
70
  export declare const distanceBetweenPoints: (pt1: Point, pt2: Point) => number;
@@ -90,6 +90,7 @@ export declare const DOCUMENTATION: {
90
90
  readonly GLOBAL_CONFIG_SSO_LOGIN_MICROSOFT: "global-configurations/authorization/sso-login/microsoft";
91
91
  readonly GLOBAL_CONFIG_PULL_IMAGE_DIGEST: "global-configurations/pull-image-digest";
92
92
  readonly GLOBAL_CONFIG_TAGS: "getting-started/global-configurations/tags-policy";
93
+ readonly SAMPLE_RUNBOOK_LINK: "https://docs.devtron.ai/user-guide/ai-recommendations/runbook#add-runbook-spec";
93
94
  readonly SOFTWARE_DISTRIBUTION_HUB: "usage/software-distribution-hub";
94
95
  readonly RELEASE_TRACKS: "usage/software-distribution-hub/release-hub#creating-release-tracks-and-versions";
95
96
  readonly RELEASES: "usage/software-distribution-hub/release-hub#creating-release-tracks-and-versions";