@devtron-labs/devtron-fe-common-lib 1.20.6-pre-37 → 1.20.6-pre-39
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-wyOLlaHm.js → @code-editor-DBuop1Nw.js} +6742 -6735
- package/dist/{@common-rjsf-BZMLxMF1.js → @common-rjsf-Mldh3D5a.js} +2 -2
- package/dist/{@framer-motion-DMkBQPN0.js → @framer-motion-BbD0XILR.js} +1 -1
- package/dist/{@react-dates-BjZWpiVv.js → @react-dates-DLCF81bK.js} +1 -1
- package/dist/{@react-select-DtwlfcIG.js → @react-select-CK9Bxd-k.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-M81Af3Qs.js → @react-virtualized-sticky-tree-J61SX97M.js} +1 -1
- package/dist/{@vendor-DceGoESd.js → @vendor-DEAetXNs.js} +63 -63
- package/dist/Common/Constants.d.ts +5 -3
- package/dist/Common/Tooltip/Tooltip.d.ts +1 -1
- package/dist/Pages-Devtron-2.0/InfrastructureManagement/index.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/SecurityCenterIcon/SecurityCenterIcon.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/SecurityCenterIcon/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/SecurityCenterIcon/utils.d.ts +6 -0
- package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/index.d.ts +1 -0
- package/dist/Pages-Devtron-2.0/SecurityCenter/index.d.ts +1 -1
- package/dist/Pages-Devtron-2.0/index.d.ts +1 -0
- package/dist/Shared/Components/Charts/Chart.component.d.ts +25 -8
- package/dist/Shared/Components/Charts/constants.d.ts +1 -0
- package/dist/Shared/Components/Charts/index.d.ts +1 -1
- package/dist/Shared/Components/Charts/plugins.d.ts +4 -1
- package/dist/Shared/Components/Charts/types.d.ts +27 -18
- package/dist/Shared/Components/Charts/utils.d.ts +4 -44
- package/dist/Shared/Components/DocLink/constants.d.ts +0 -1
- package/dist/Shared/Components/Icon/Icon.d.ts +4 -22
- package/dist/Shared/Components/Security/constants.d.ts +2 -0
- package/dist/Shared/Components/Security/index.d.ts +1 -0
- package/dist/Shared/Helpers.d.ts +1 -1
- package/dist/Shared/Hooks/useUserPreferences/types.d.ts +2 -2
- package/dist/Shared/Providers/MainContextProvider/types.d.ts +0 -1
- package/dist/Shared/Services/common.service.d.ts +2 -1
- package/dist/Shared/Services/types.d.ts +4 -1
- package/dist/assets/ic-coins-color-animated.fe11cdc3.svg +112 -0
- package/dist/assets/ic-security-fixable.168b5bf8.svg +12 -0
- package/dist/assets/ic-security-not-fixable.be099f65.svg +12 -0
- package/dist/assets/ic-security-vulnerability.c954b87a.svg +4 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.js +1016 -992
- package/package.json +1 -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/SecurityCenter/Overview/Overview.d.ts +0 -1
- package/dist/Pages-Devtron-2.0/SecurityCenter/Overview/index.d.ts +0 -1
- package/dist/assets/ic-arrow-white.be4aea3f.svg +0 -3
- package/dist/assets/ic-book-gear.bb9bca1f.svg +0 -9
- package/dist/assets/ic-bulb.3906a732.svg +0 -7
- package/dist/assets/ic-check-green.b03d325d.svg +0 -3
- package/dist/assets/ic-circle-progress.0875625d.svg +0 -6
- package/dist/assets/ic-close-circle-red.72e0a495.svg +0 -3
- package/dist/assets/ic-close-circle.b39dd87d.svg +0 -3
- package/dist/assets/ic-confirm.f6b1c31c.svg +0 -3
- package/dist/assets/ic-dot-circle.5ce1fccf.svg +0 -3
- package/dist/assets/ic-failure-color.e167df98.svg +0 -4
- package/dist/assets/ic-info-filled-new.28815384.svg +0 -8
- package/dist/assets/ic-line.4e8fa046.svg +0 -3
- package/dist/assets/ic-new-chat.f7c90f8e.svg +0 -5
- package/dist/assets/ic-pencil-white.369e78d9.svg +0 -3
- package/dist/assets/ic-piggybank.3a4839d7.svg +0 -3
- package/dist/assets/ic-priority-high-fill.53755d8f.svg +0 -3
- package/dist/assets/ic-priority-low-fill.79e781ae.svg +0 -4
- package/dist/assets/ic-priority-urgent-fill.78d42fa0.svg +0 -10
- package/dist/assets/ic-red-bulb.25e01bfc.svg +0 -9
- package/dist/assets/ic-spider.99b77bd8.svg +0 -3
- package/dist/assets/ic-timer-green.00bf295e.svg +0 -3
- package/dist/assets/ic-timer-red.656bee16.svg +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as n, aK as v, aM as J, aL as K } from "./@vendor-
|
|
1
|
+
import { j as n, aK as v, aM as J, aL as K } from "./@vendor-DEAetXNs.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-
|
|
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";
|
|
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-
|
|
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";
|
|
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-
|
|
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";
|
|
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-
|
|
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";
|
|
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-
|
|
5
|
+
import { cq as x } from "./@vendor-DEAetXNs.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
|
-
|
|
80416
|
-
|
|
80417
|
-
|
|
80418
|
-
|
|
80415
|
+
V5 as $,
|
|
80416
|
+
aFe as A,
|
|
80417
|
+
cFe as B,
|
|
80418
|
+
ts as C,
|
|
80419
80419
|
AIe as D,
|
|
80420
80420
|
De as E,
|
|
80421
80421
|
OIe as F,
|
|
80422
|
-
|
|
80423
|
-
|
|
80424
|
-
|
|
80425
|
-
|
|
80426
|
-
|
|
80427
|
-
|
|
80428
|
-
|
|
80429
|
-
|
|
80430
|
-
|
|
80431
|
-
|
|
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,
|
|
80432
80432
|
_n as Q,
|
|
80433
|
-
|
|
80433
|
+
MA as R,
|
|
80434
80434
|
bn as S,
|
|
80435
80435
|
Wn as T,
|
|
80436
|
-
|
|
80436
|
+
j5 as U,
|
|
80437
80437
|
dn as V,
|
|
80438
|
-
|
|
80439
|
-
|
|
80440
|
-
|
|
80441
|
-
|
|
80442
|
-
|
|
80438
|
+
Wb as W,
|
|
80439
|
+
MIe as X,
|
|
80440
|
+
$e as Y,
|
|
80441
|
+
spe as Z,
|
|
80442
|
+
UIe as _,
|
|
80443
80443
|
lpe as a,
|
|
80444
80444
|
aj as a$,
|
|
80445
|
-
|
|
80446
|
-
|
|
80447
|
-
|
|
80448
|
-
|
|
80449
|
-
|
|
80450
|
-
|
|
80451
|
-
|
|
80452
|
-
|
|
80453
|
-
|
|
80454
|
-
|
|
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,
|
|
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
|
-
|
|
80483
|
-
|
|
80484
|
-
|
|
80485
|
-
|
|
80486
|
-
|
|
80487
|
-
|
|
80488
|
-
|
|
80489
|
-
|
|
80490
|
-
|
|
80491
|
-
|
|
80492
|
-
|
|
80493
|
-
|
|
80494
|
-
|
|
80495
|
-
|
|
80496
|
-
|
|
80497
|
-
|
|
80498
|
-
|
|
80499
|
-
|
|
80500
|
-
|
|
80501
|
-
|
|
80502
|
-
|
|
80503
|
-
|
|
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,
|
|
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
|
-
|
|
80604
|
+
j9e as f,
|
|
80605
80605
|
dpe as g,
|
|
80606
|
-
|
|
80606
|
+
QIe as h,
|
|
80607
80607
|
q9e as i,
|
|
80608
80608
|
ce as j,
|
|
80609
80609
|
xR as k,
|
|
80610
80610
|
NIe as l,
|
|
80611
|
-
|
|
80611
|
+
Cme as m,
|
|
80612
80612
|
dIe as n,
|
|
80613
80613
|
$A as o,
|
|
80614
|
-
|
|
80615
|
-
|
|
80614
|
+
Zle as p,
|
|
80615
|
+
JIe as q,
|
|
80616
80616
|
nH as r,
|
|
80617
80617
|
qIe as s,
|
|
80618
80618
|
K as t,
|
|
80619
|
-
|
|
80620
|
-
|
|
80621
|
-
|
|
80622
|
-
|
|
80619
|
+
fFe as u,
|
|
80620
|
+
hFe as v,
|
|
80621
|
+
dFe as w,
|
|
80622
|
+
Ype as x,
|
|
80623
80623
|
XIe as y,
|
|
80624
|
-
|
|
80624
|
+
lFe as z
|
|
80625
80625
|
};
|
|
@@ -74,7 +74,6 @@ 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";
|
|
78
77
|
readonly SOFTWARE_RELEASE_MANAGEMENT: "/software-release-management";
|
|
79
78
|
readonly COST_VISIBILITY: "/cost-visibility";
|
|
80
79
|
readonly COST_VISIBILITY_OVERVIEW: "/cost-visibility/overview";
|
|
@@ -86,6 +85,9 @@ export declare const URLS: {
|
|
|
86
85
|
readonly COST_BREAKDOWN_DETAIL: ":itemName/:view/:detail?";
|
|
87
86
|
readonly COST_CONFIGURATIONS: "/cost-visibility/configurations";
|
|
88
87
|
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";
|
|
89
91
|
readonly AUTOMATION_AND_ENABLEMENT: "/automation-and-enablement";
|
|
90
92
|
readonly AUTOMATION_AND_ENABLEMENT_JOB: "/automation-and-enablement/job";
|
|
91
93
|
readonly DATA_PROTECTION: "/data-protection-management";
|
|
@@ -101,9 +103,8 @@ export declare const URLS: {
|
|
|
101
103
|
readonly GLOBAL_CONFIG_EDIT_CLUSTER: "/global-configuration/cluster-env/edit/:clusterId";
|
|
102
104
|
readonly PERMISSION_GROUPS: "/global-configuration/auth/groups";
|
|
103
105
|
readonly AI_RECOMMENDATIONS: "/ai-recommendations";
|
|
104
|
-
readonly
|
|
106
|
+
readonly AI_RECOMMENDATIONS_OVERVIEW: "/ai-recommendations/overview";
|
|
105
107
|
readonly EXTERNAL_APPS: "ea";
|
|
106
|
-
readonly AI_RECOMMENDATIONS_RUNBOOKS: "/ai-recommendations/runbooks";
|
|
107
108
|
};
|
|
108
109
|
export declare const ROUTES: {
|
|
109
110
|
readonly APP: "app";
|
|
@@ -130,6 +131,7 @@ export declare const ROUTES: {
|
|
|
130
131
|
readonly PATCH: "patch";
|
|
131
132
|
readonly ENVIRONMENT_LIST_MIN: "env/autocomplete";
|
|
132
133
|
readonly CLUSTER: "cluster";
|
|
134
|
+
readonly CLUSTER_MIN: "cluster/min";
|
|
133
135
|
readonly API_RESOURCE: "k8s/api-resources";
|
|
134
136
|
readonly GVK: "gvk";
|
|
135
137
|
readonly NAMESPACE: "env/namespace";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TooltipProps } from './types';
|
|
2
|
-
declare const Tooltip: ({ shortcutKeyCombo, alwaysShowTippyOnHover, showOnTruncate, wordBreak, children: child, ...rest }: TooltipProps) => JSX.Element;
|
|
2
|
+
declare const Tooltip: ({ shortcutKeyCombo, alwaysShowTippyOnHover, showOnTruncate, wordBreak, children: child, plugins, ...rest }: TooltipProps) => JSX.Element;
|
|
3
3
|
export default Tooltip;
|
package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/SecurityCenterIcon/SecurityCenterIcon.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SecurityCenterIcon: () => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getSecurityCenterBreadcrumb } from './utils';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SecurityCenterIcon';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './Shared';
|
|
@@ -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, stacked bar charts (vertical/horizontal), and line charts.
|
|
4
|
+
* Supports area charts, pie charts, semi-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,7 +29,24 @@ import { ChartProps } from './types';
|
|
|
29
29
|
* datasets={{
|
|
30
30
|
* datasetName: 'Adoption Rate (%)',
|
|
31
31
|
* yAxisValues: [45.2, 28.7, 35.4],
|
|
32
|
-
*
|
|
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'
|
|
33
50
|
* }}
|
|
34
51
|
* />
|
|
35
52
|
*
|
|
@@ -66,11 +83,9 @@ import { ChartProps } from './types';
|
|
|
66
83
|
* ```
|
|
67
84
|
*
|
|
68
85
|
* @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
|
-
* @param xAxisConfig
|
|
73
|
-
* @param yAxisConfig
|
|
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
|
|
74
89
|
*
|
|
75
90
|
* @performance
|
|
76
91
|
* **Memoization Recommendations:**
|
|
@@ -96,7 +111,9 @@ import { ChartProps } from './types';
|
|
|
96
111
|
* @notes
|
|
97
112
|
* - Chart automatically re-renders when theme changes (light/dark mode)
|
|
98
113
|
* - Line charts are rendered as non-stacked and non-filled by default
|
|
99
|
-
* - Pie charts expect a single dataset object instead of an array
|
|
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
|
|
100
117
|
* - Colors should reference CHART_COLORS tokens for consistency
|
|
101
118
|
* - Component destroys and recreates Chart.js instance on prop changes for optimal performance
|
|
102
119
|
*/
|
|
@@ -7,3 +7,4 @@ 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 { ChartColorKey, ChartProps, ChartType, ReferenceLineConfigType, SimpleDataset, SimpleDatasetForPie, } from './types';
|
|
3
|
+
export type { CenterTextConfig, ChartColorKey, ChartProps, ChartType, ReferenceLineConfigType, SimpleDataset, SimpleDatasetForPie, } from './types';
|
|
4
4
|
export { chartColorGenerator } from './utils';
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
1
2
|
import { Plugin } from 'chart.js';
|
|
2
3
|
import { AppThemeType } from '../../Providers';
|
|
3
|
-
import { ReferenceLineConfigType } from './types';
|
|
4
|
+
import { CenterTextConfig, ChartType, ReferenceLineConfigType } from './types';
|
|
4
5
|
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' | 'stackedBar' | 'stackedBarHorizontal' | 'line';
|
|
7
|
-
export type ColorTokensType = 'DeepPlum' | 'Magenta' | 'Slate' | 'Lavender' | 'SkyBlue' | 'AquaTeal' | 'LimeGreen' | 'CoralRed' | 'GoldenYellow' | 'CharcoalGray' | 'Gray';
|
|
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';
|
|
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'>;
|
|
10
|
+
export type ChartTypeWithoutPie = Exclude<ChartType, 'pie' | 'semiPie'>;
|
|
11
11
|
interface BaseSimpleDataset {
|
|
12
12
|
datasetName: string;
|
|
13
13
|
yAxisValues: number[];
|
|
@@ -28,15 +28,12 @@ export interface ReferenceLineConfigType {
|
|
|
28
28
|
color?: ChartColorKey;
|
|
29
29
|
value: number;
|
|
30
30
|
}
|
|
31
|
-
export interface
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
max?: number;
|
|
38
|
-
min?: number;
|
|
39
|
-
stepSize?: number;
|
|
31
|
+
export interface CenterTextConfig {
|
|
32
|
+
text: string;
|
|
33
|
+
fontSize?: number;
|
|
34
|
+
fontWeight?: string | number;
|
|
35
|
+
color?: string;
|
|
36
|
+
fontFamily?: string;
|
|
40
37
|
}
|
|
41
38
|
type XYAxisMax = {
|
|
42
39
|
xAxisMax?: number;
|
|
@@ -45,8 +42,6 @@ type XYAxisMax = {
|
|
|
45
42
|
* Optional reference lines to draw across the chart
|
|
46
43
|
*/
|
|
47
44
|
referenceLines?: ReferenceLineConfigType[];
|
|
48
|
-
xAxisConfig?: AxisConfig;
|
|
49
|
-
yAxisConfig?: AxisConfig;
|
|
50
45
|
};
|
|
51
46
|
type OnChartClickHandler = (datasetName: string, value: number) => void;
|
|
52
47
|
type ScaleTickFormatCallbacks = Partial<{
|
|
@@ -54,24 +49,29 @@ type ScaleTickFormatCallbacks = Partial<{
|
|
|
54
49
|
yScaleTickFormat: (value: number, index: number) => string | string[] | number | number[];
|
|
55
50
|
}>;
|
|
56
51
|
export type TypeAndDatasetsType = ({
|
|
57
|
-
type: 'pie';
|
|
52
|
+
type: 'pie' | 'semiPie';
|
|
58
53
|
/**
|
|
59
54
|
* Needs to be memoized
|
|
60
55
|
*/
|
|
61
56
|
datasets: SimpleDatasetForPie;
|
|
62
57
|
onChartClick?: OnChartClickHandler;
|
|
58
|
+
/** Configuration for center text (only for doughnut/pie charts) */
|
|
59
|
+
centerText?: CenterTextConfig;
|
|
63
60
|
} & Never<XYAxisMax> & Never<ScaleTickFormatCallbacks>) | ({
|
|
64
61
|
type: 'line';
|
|
65
62
|
datasets: SimpleDatasetForLineAndArea[];
|
|
66
63
|
onChartClick?: never;
|
|
64
|
+
centerText?: never;
|
|
67
65
|
} & XYAxisMax & ScaleTickFormatCallbacks) | ({
|
|
68
66
|
type: 'area';
|
|
69
67
|
datasets: SimpleDatasetForLineAndArea;
|
|
70
68
|
onChartClick?: never;
|
|
69
|
+
centerText?: never;
|
|
71
70
|
} & XYAxisMax & ScaleTickFormatCallbacks) | ({
|
|
72
|
-
type: Exclude<ChartType, 'pie' | 'line' | 'area'>;
|
|
71
|
+
type: Exclude<ChartType, 'pie' | 'semiPie' | 'line' | 'area'>;
|
|
73
72
|
datasets: SimpleDataset[];
|
|
74
73
|
onChartClick?: OnChartClickHandler;
|
|
74
|
+
centerText?: never;
|
|
75
75
|
} & XYAxisMax & ScaleTickFormatCallbacks);
|
|
76
76
|
export type ChartProps = {
|
|
77
77
|
id: string;
|
|
@@ -93,19 +93,21 @@ export type ChartProps = {
|
|
|
93
93
|
placement?: TooltipProps['placement'];
|
|
94
94
|
datasetValueFormatter?: (value: number) => string | number;
|
|
95
95
|
};
|
|
96
|
+
/** A title for x axis */
|
|
96
97
|
xScaleTitle?: string;
|
|
98
|
+
/** A title for y axis */
|
|
97
99
|
yScaleTitle?: string;
|
|
98
100
|
} & TypeAndDatasetsType;
|
|
99
101
|
export type TransformDatasetProps = {
|
|
100
102
|
appTheme: AppThemeType;
|
|
101
103
|
} & ({
|
|
102
|
-
type: 'pie';
|
|
104
|
+
type: 'pie' | 'semiPie';
|
|
103
105
|
dataset: SimpleDatasetForPie;
|
|
104
106
|
} | {
|
|
105
107
|
type: 'line' | 'area';
|
|
106
108
|
dataset: SimpleDatasetForLineAndArea;
|
|
107
109
|
} | {
|
|
108
|
-
type: Exclude<ChartType, 'pie' | 'line' | 'area'>;
|
|
110
|
+
type: Exclude<ChartType, 'pie' | 'semiPie' | 'line' | 'area'>;
|
|
109
111
|
dataset: SimpleDataset;
|
|
110
112
|
});
|
|
111
113
|
export type GetBackgroundAndBorderColorProps = TransformDatasetProps;
|
|
@@ -123,4 +125,11 @@ declare module 'chart.js' {
|
|
|
123
125
|
barElementCenterPositioner: TooltipPositionerFunction<'bar'>;
|
|
124
126
|
}
|
|
125
127
|
}
|
|
128
|
+
export interface HTMLLegendProps {
|
|
129
|
+
backgroundColor: string;
|
|
130
|
+
label: string;
|
|
131
|
+
onClick: () => void;
|
|
132
|
+
strikeThrough: boolean;
|
|
133
|
+
variant: 'line' | 'square';
|
|
134
|
+
}
|
|
126
135
|
export {};
|
|
@@ -1,48 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { AppThemeType } from '../../Providers';
|
|
2
|
+
import { ChartDataset, ChartOptions, ChartType as ChartJSChartType, Point, TooltipOptions } from 'chart.js';
|
|
4
3
|
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
|
-
};
|
|
46
4
|
export declare const getChartJSType: (type: ChartType) => ChartJSChartType;
|
|
47
5
|
export declare const getDefaultOptions: ({ chartProps, appTheme, externalTooltipHandler, setTooltipVisible, }: GetDefaultOptionsParams) => ChartOptions;
|
|
48
6
|
export declare const transformDataForChart: (props: TransformDataForChartProps) => (ChartDataset<"line"> | {
|
|
@@ -56,15 +14,17 @@ export declare const transformDataForChart: (props: TransformDataForChartProps)
|
|
|
56
14
|
backgroundColor: string[];
|
|
57
15
|
hoverBackgroundColor: string[];
|
|
58
16
|
borderColor: string;
|
|
17
|
+
borderWidth: number;
|
|
59
18
|
label: string;
|
|
60
19
|
data: number[];
|
|
61
20
|
} | {
|
|
62
21
|
backgroundColor: string;
|
|
63
22
|
hoverBackgroundColor: string;
|
|
64
23
|
borderColor: string;
|
|
24
|
+
borderWidth?: undefined;
|
|
65
25
|
label: string;
|
|
66
26
|
data: number[];
|
|
67
27
|
})[];
|
|
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>;
|
|
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>;
|
|
69
29
|
export declare const buildChartTooltipFromContext: ({ title, body, labelColors: labelColorsProp, }: Pick<Parameters<TooltipOptions["external"]>[0]["tooltip"], "title" | "body" | "labelColors">) => ReactNode;
|
|
70
30
|
export declare const distanceBetweenPoints: (pt1: Point, pt2: Point) => number;
|
|
@@ -90,7 +90,6 @@ 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://github.com/devtron-labs/athena-be/wiki/Runbook-Actions";
|
|
94
93
|
readonly SOFTWARE_DISTRIBUTION_HUB: "usage/software-distribution-hub";
|
|
95
94
|
readonly RELEASE_TRACKS: "usage/software-distribution-hub/release-hub#creating-release-tracks-and-versions";
|
|
96
95
|
readonly RELEASES: "usage/software-distribution-hub/release-hub#creating-release-tracks-and-versions";
|