@devtron-labs/devtron-fe-common-lib 1.20.6-alpha-32 → 1.20.6-alpha-95

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 (85) hide show
  1. package/dist/{@code-editor-D9F_p-C2.js → @code-editor-Bi8V0EkO.js} +7910 -7934
  2. package/dist/{@common-rjsf-CW_GOcCr.js → @common-rjsf-pPsGytQU.js} +22 -22
  3. package/dist/{@framer-motion-DMkBQPN0.js → @framer-motion-LZK2bgCK.js} +61 -61
  4. package/dist/{@react-dates-BjZWpiVv.js → @react-dates-CbpfVsC0.js} +1 -1
  5. package/dist/{@react-select-DtwlfcIG.js → @react-select-BuPEYnTv.js} +1 -1
  6. package/dist/{@react-virtualized-sticky-tree-M81Af3Qs.js → @react-virtualized-sticky-tree-DX7VkyTZ.js} +1 -1
  7. package/dist/{@vendor-DceGoESd.js → @vendor-BsABdDGm.js} +14676 -13806
  8. package/dist/Common/Constants.d.ts +10 -8
  9. package/dist/Common/SegmentedControl/Segment.d.ts +1 -1
  10. package/dist/Common/SegmentedControl/SegmentedControl.component.d.ts +1 -1
  11. package/dist/Common/SegmentedControl/index.d.ts +1 -1
  12. package/dist/Common/SegmentedControl/types.d.ts +12 -8
  13. package/dist/Common/Tooltip/Tooltip.d.ts +1 -1
  14. package/dist/Common/index.d.ts +0 -1
  15. package/dist/Pages/ResourceBrowser/service.d.ts +3 -2
  16. package/dist/Pages/ResourceBrowser/types.d.ts +5 -0
  17. package/dist/Pages-Devtron-2.0/InfrastructureManagement/index.d.ts +0 -1
  18. package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/SecurityCenterIcon/SecurityCenterIcon.d.ts +1 -0
  19. package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/SecurityCenterIcon/index.d.ts +1 -0
  20. package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/SecurityCenterIcon/utils.d.ts +6 -0
  21. package/dist/Pages-Devtron-2.0/SecurityCenter/Shared/index.d.ts +1 -0
  22. package/dist/Pages-Devtron-2.0/SecurityCenter/index.d.ts +1 -1
  23. package/dist/Pages-Devtron-2.0/index.d.ts +1 -0
  24. package/dist/Shared/Components/ActionMenu/useActionMenu.hook.d.ts +1 -1
  25. package/dist/Shared/Components/Button/Button.component.d.ts +12 -12
  26. package/dist/Shared/Components/Charts/Chart.component.d.ts +25 -8
  27. package/dist/Shared/Components/Charts/constants.d.ts +1 -0
  28. package/dist/Shared/Components/Charts/index.d.ts +1 -1
  29. package/dist/Shared/Components/Charts/plugins.d.ts +4 -1
  30. package/dist/Shared/Components/Charts/types.d.ts +27 -18
  31. package/dist/Shared/Components/Charts/utils.d.ts +4 -44
  32. package/dist/Shared/Components/DocLink/constants.d.ts +2 -1
  33. package/dist/Shared/Components/Icon/Icon.d.ts +10 -22
  34. package/dist/Shared/Components/Security/constants.d.ts +2 -0
  35. package/dist/Shared/Components/Security/index.d.ts +1 -0
  36. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  37. package/dist/Shared/Components/SelectPicker/common.d.ts +1 -1
  38. package/dist/Shared/Components/SelectPicker/type.d.ts +3 -1
  39. package/dist/Shared/Components/WorkflowOptionsModal/utils.d.ts +3 -3
  40. package/dist/Shared/Helpers.d.ts +10 -1
  41. package/dist/Shared/Hooks/useUserPreferences/types.d.ts +2 -2
  42. package/dist/Shared/Providers/MainContextProvider/types.d.ts +0 -1
  43. package/dist/Shared/Services/common.service.d.ts +3 -2
  44. package/dist/Shared/Services/types.d.ts +4 -1
  45. package/dist/Shared/validations.d.ts +1 -1
  46. package/dist/assets/@code-editor.css +1 -1
  47. package/dist/assets/ic-bg-backup-schedule.9ef9bc39.svg +19 -0
  48. package/dist/assets/ic-bg-backups.396e99bd.svg +19 -0
  49. package/dist/assets/ic-bg-pause-schedule.6edcc1d4.svg +14 -0
  50. package/dist/assets/ic-bg-ransomware-vulnerable-cluster.1b25a5d0.svg +7 -0
  51. package/dist/assets/ic-bg-restore.4fa13869.svg +33 -0
  52. package/dist/assets/ic-bg-storage-locations.894070b0.svg +22 -0
  53. package/dist/assets/ic-coins-color-animated.fe11cdc3.svg +112 -0
  54. package/dist/assets/ic-security-fixable.168b5bf8.svg +12 -0
  55. package/dist/assets/ic-security-not-fixable.be099f65.svg +12 -0
  56. package/dist/assets/ic-security-vulnerability.c954b87a.svg +4 -0
  57. package/dist/index.d.ts +0 -2
  58. package/dist/index.js +1017 -992
  59. package/package.json +3 -1
  60. package/dist/Pages-Devtron-2.0/InfrastructureManagement/Overview/Overview.d.ts +0 -1
  61. package/dist/Pages-Devtron-2.0/InfrastructureManagement/Overview/index.d.ts +0 -1
  62. package/dist/Pages-Devtron-2.0/SecurityCenter/Overview/Overview.d.ts +0 -1
  63. package/dist/Pages-Devtron-2.0/SecurityCenter/Overview/index.d.ts +0 -1
  64. package/dist/assets/ic-arrow-white.be4aea3f.svg +0 -3
  65. package/dist/assets/ic-book-gear.bb9bca1f.svg +0 -9
  66. package/dist/assets/ic-bulb.3906a732.svg +0 -7
  67. package/dist/assets/ic-check-green.b03d325d.svg +0 -3
  68. package/dist/assets/ic-circle-progress.0875625d.svg +0 -6
  69. package/dist/assets/ic-close-circle-red.72e0a495.svg +0 -3
  70. package/dist/assets/ic-close-circle.b39dd87d.svg +0 -3
  71. package/dist/assets/ic-confirm.f6b1c31c.svg +0 -3
  72. package/dist/assets/ic-dot-circle.5ce1fccf.svg +0 -3
  73. package/dist/assets/ic-failure-color.e167df98.svg +0 -4
  74. package/dist/assets/ic-info-filled-new.28815384.svg +0 -8
  75. package/dist/assets/ic-line.4e8fa046.svg +0 -3
  76. package/dist/assets/ic-new-chat.f7c90f8e.svg +0 -5
  77. package/dist/assets/ic-pencil-white.369e78d9.svg +0 -3
  78. package/dist/assets/ic-piggybank.3a4839d7.svg +0 -3
  79. package/dist/assets/ic-priority-high-fill.53755d8f.svg +0 -3
  80. package/dist/assets/ic-priority-low-fill.79e781ae.svg +0 -4
  81. package/dist/assets/ic-priority-urgent-fill.78d42fa0.svg +0 -10
  82. package/dist/assets/ic-red-bulb.25e01bfc.svg +0 -9
  83. package/dist/assets/ic-spider.99b77bd8.svg +0 -3
  84. package/dist/assets/ic-timer-green.00bf295e.svg +0 -3
  85. package/dist/assets/ic-timer-red.656bee16.svg +0 -3
@@ -3,7 +3,7 @@ export declare const FALLBACK_REQUEST_TIMEOUT = 60000;
3
3
  export declare const Host: string;
4
4
  export declare const DOCUMENTATION_HOME_PAGE = "https://docs.devtron.ai";
5
5
  export declare const DEVTRON_HOME_PAGE = "https://devtron.ai/";
6
- export declare const DOCUMENTATION_VERSION = "/devtron/v1.7";
6
+ export declare const DOCUMENTATION_VERSION = "/devtron/v2.0";
7
7
  export declare const DISCORD_LINK = "https://discord.devtron.ai/";
8
8
  export declare const DEFAULT_JSON_SCHEMA_URI = "https://json-schema.org/draft/2020-12/schema";
9
9
  export declare const LICENSE_DASHBOARD_HOME_PAGE = "https://license.devtron.ai/dashboard";
@@ -52,9 +52,9 @@ export declare const URLS: {
52
52
  readonly LICENSE_AUTH: "/license-auth";
53
53
  readonly APPLICATION_MANAGEMENT: "/application-management";
54
54
  readonly APPLICATION_MANAGEMENT_OVERVIEW: "/application-management/overview";
55
- readonly APPLICATION_MANAGEMENT_APP: "/application-management/app";
56
- readonly APPLICATION_MANAGEMENT_APP_LIST: "/application-management/devtron-apps";
57
- readonly APPLICATION_MANAGEMENT_CREATE_DEVTRON_APP: "/application-management/devtron-apps/create-app";
55
+ readonly APPLICATION_MANAGEMENT_APP: "/application-management/devtron-app";
56
+ readonly APPLICATION_MANAGEMENT_APP_LIST: "/application-management/devtron-app/list";
57
+ readonly APPLICATION_MANAGEMENT_CREATE_DEVTRON_APP: "/application-management/devtron-app/list/create-app";
58
58
  readonly APPLICATION_MANAGEMENT_APPLICATION_GROUP: "/application-management/application-group";
59
59
  readonly APPLICATION_MANAGEMENT_TEMPLATES_DEVTRON_APP: "/application-management/templates/devtron-app";
60
60
  readonly APPLICATION_MANAGEMENT_TEMPLATES_DEVTRON_APP_CREATE: "/application-management/templates/devtron-app/create";
@@ -69,12 +69,11 @@ export declare const URLS: {
69
69
  readonly INFRASTRUCTURE_MANAGEMENT: "/infrastructure-management";
70
70
  readonly INFRASTRUCTURE_MANAGEMENT_OVERVIEW: "/infrastructure-management/overview";
71
71
  readonly INFRASTRUCTURE_MANAGEMENT_APP_LIST: `/infrastructure-management/apps/:appType(${string})`;
72
- readonly INFRASTRUCTURE_MANAGEMENT_APP: "/infrastructure-management/app";
72
+ readonly INFRASTRUCTURE_MANAGEMENT_APP: "/infrastructure-management/apps";
73
73
  readonly INFRASTRUCTURE_MANAGEMENT_CHART_STORE: "/infrastructure-management/chart-store";
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 AI_RECOMMENDATIONS_NOTIFICATIONS: "/ai-recommendations/notifications";
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 { SegmentProps } from './types';
2
- declare const Segment: ({ segment, isSelected, name, onChange, fullWidth, size, disabled }: SegmentProps) => JSX.Element;
2
+ declare const Segment: <T extends string | number>({ segment, isSelected, name, onChange, fullWidth, size, disabled, }: SegmentProps<T>) => JSX.Element;
3
3
  export default Segment;
@@ -1,3 +1,3 @@
1
1
  import { SegmentedControlProps } from './types';
2
- declare const SegmentedControl: ({ segments, onChange, name, size, value: controlledValue, fullWidth, disabled, }: SegmentedControlProps) => JSX.Element;
2
+ declare const SegmentedControl: <T extends string | number>({ segments, onChange, name, size, value: controlledValue, fullWidth, disabled, }: SegmentedControlProps<T>) => JSX.Element;
3
3
  export default SegmentedControl;
@@ -1,2 +1,2 @@
1
1
  export { default as SegmentedControl } from './SegmentedControl.component';
2
- export { type SegmentedControlProps } from './types';
2
+ export { type SegmentedControlProps, type SegmentType } from './types';
@@ -2,7 +2,7 @@ import { TooltipProps } from '../Tooltip';
2
2
  import { IconsProps, SelectPickerOptionType } from '../../Shared/Components';
3
3
  import { ComponentSizeType } from '../../Shared/constants';
4
4
  type SegmentTooltipProps = Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'shortcutKeyCombo' | 'placement'>;
5
- export type SegmentType = Pick<SelectPickerOptionType, 'value'> & {
5
+ export type SegmentType<T = string | number> = {
6
6
  /**
7
7
  * If true, the segment will be in error state with error icon
8
8
  */
@@ -11,6 +11,10 @@ export type SegmentType = Pick<SelectPickerOptionType, 'value'> & {
11
11
  * If true, the segment will be in disabled state
12
12
  */
13
13
  isDisabled?: boolean;
14
+ /**
15
+ * Value for the segment
16
+ */
17
+ value: T;
14
18
  } & (({
15
19
  /**
16
20
  * Label for the segment
@@ -40,11 +44,11 @@ export type SegmentType = Pick<SelectPickerOptionType, 'value'> & {
40
44
  */
41
45
  ariaLabel: string;
42
46
  });
43
- export type SegmentedControlProps = {
47
+ export type SegmentedControlProps<T = string | number> = {
44
48
  /**
45
49
  * List of segments to be displayed
46
50
  */
47
- segments: SegmentType[];
51
+ segments: SegmentType<T>[];
48
52
  /**
49
53
  * Please make sure this is unique
50
54
  */
@@ -57,16 +61,16 @@ export type SegmentedControlProps = {
57
61
  /**
58
62
  * On change handler for the component
59
63
  */
60
- onChange?: (selectedSegment: SegmentType) => void;
64
+ onChange?: (selectedSegment: SegmentType<T>) => void;
61
65
  } | {
62
66
  /**
63
67
  * If defined, the component is controlled and onChange needs to be handled by the parent
64
68
  */
65
- value: SegmentType['value'];
66
- onChange: (selectedSegment: SegmentType) => void;
69
+ value: SegmentType<T>['value'];
70
+ onChange: (selectedSegment: SegmentType<T>) => void;
67
71
  });
68
- export interface SegmentProps extends Required<Pick<SegmentedControlProps, 'name' | 'onChange' | 'fullWidth' | 'size' | 'disabled'>> {
72
+ export interface SegmentProps<T> extends Required<Pick<SegmentedControlProps<T>, 'name' | 'onChange' | 'fullWidth' | 'size' | 'disabled'>> {
69
73
  isSelected: boolean;
70
- segment: SegmentType;
74
+ segment: SegmentType<T>;
71
75
  }
72
76
  export {};
@@ -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;
@@ -37,7 +37,6 @@ export * from './Policy.Types';
37
37
  export { default as PopupMenu } from './PopupMenu';
38
38
  export * from './Progressing';
39
39
  export { default as RadioGroup } from './RadioGroup';
40
- export { default as StyledRadioGroup } from './RadioGroup/RadioGroup';
41
40
  export { default as RadioGroupItem } from './RadioGroupItem';
42
41
  export { default as Reload } from './Reload';
43
42
  export * from './RJSF';
@@ -1,6 +1,6 @@
1
1
  import { APIOptions, ResponseType } from '../../Common/Types';
2
- import { CreateResourceDTO, CreateResourcePayload, K8sResourceDetailType, K8sResourceListPayloadType, NodeActionRequest, ResourceListPayloadType, ResourceType } from './ResourceBrowser.Types';
3
- import { ClusterDetail, NodeCordonRequest } from './types';
2
+ import { CreateResourceDTO, CreateResourcePayload, K8sResourceDetailType, K8sResourceListPayloadType, NodeActionRequest, ResourceListPayloadType, ResourceManifestDTO, ResourceType } from './ResourceBrowser.Types';
3
+ import { ClusterDetail, GetResourceManifestProps, NodeCordonRequest } from './types';
4
4
  export declare const getK8sResourceList: (resourceListPayload: K8sResourceListPayloadType, signal?: AbortSignal) => Promise<ResponseType<K8sResourceDetailType>>;
5
5
  export declare const createNewResource: (resourceListPayload: CreateResourcePayload, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType<CreateResourceDTO[]>>;
6
6
  export declare const deleteResource: (resourceListPayload: ResourceListPayloadType, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType<ResourceType[]>>;
@@ -8,3 +8,4 @@ export declare const deleteNodeCapacity: (requestPayload: NodeActionRequest, abo
8
8
  export declare const cordonNodeCapacity: (requestPayload: NodeCordonRequest, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType>;
9
9
  export declare const drainNodeCapacity: (requestPayload: NodeActionRequest, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType>;
10
10
  export declare const getClusterListRaw: (abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType<ClusterDetail[]>>;
11
+ export declare const getK8sResourceManifest: ({ selectedResource, signal }: GetResourceManifestProps) => Promise<ResponseType<ResourceManifestDTO>>;
@@ -1,6 +1,7 @@
1
1
  import { Dispatch, ReactElement, SetStateAction } from 'react';
2
2
  import { TabProps } from '../../Shared/Components';
3
3
  import { InstallationClusterType } from '../../Shared/types';
4
+ import { SelectedResourceType } from '../Applications/DevtronApps/Details/CDPipeline/types';
4
5
  import { NodeActionRequest } from './ResourceBrowser.Types';
5
6
  export declare enum ClusterFiltersType {
6
7
  ALL_CLUSTERS = "all",
@@ -131,4 +132,8 @@ export declare enum ResourceBrowserActionMenuEnum {
131
132
  delete = "delete",
132
133
  vulnerability = "vulnerability"
133
134
  }
135
+ export interface GetResourceManifestProps {
136
+ selectedResource: SelectedResourceType;
137
+ signal: AbortSignal;
138
+ }
134
139
  export {};
@@ -1,2 +1 @@
1
- export * from './Overview';
2
1
  export * from './Shared';
@@ -0,0 +1 @@
1
+ export declare const SecurityCenterIcon: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export { getSecurityCenterBreadcrumb } from './utils';
@@ -0,0 +1,6 @@
1
+ export declare const getSecurityCenterBreadcrumb: () => {
2
+ 'security-center': {
3
+ component: JSX.Element;
4
+ linked: boolean;
5
+ };
6
+ };
@@ -0,0 +1 @@
1
+ export * from './SecurityCenterIcon';
@@ -1 +1 @@
1
- export * from './Overview';
1
+ export * from './Shared';
@@ -2,3 +2,4 @@ export * from './ApplicationManagement';
2
2
  export * from './CostVisibility';
3
3
  export * from './DataProtectionManagement';
4
4
  export * from './InfrastructureManagement';
5
+ export * from './SecurityCenter';
@@ -21,8 +21,8 @@ export declare const useActionMenu: <T extends string | number>({ id, position,
21
21
  className?: string;
22
22
  defaultValue?: string | number | readonly string[];
23
23
  id?: string;
24
- color?: string;
25
24
  role?: import('react').AriaRole;
25
+ color?: string;
26
26
  about?: string;
27
27
  is?: string;
28
28
  security?: string;
@@ -100,7 +100,7 @@ declare const Button: import('react').ForwardRefExoticComponent<(Pick<{
100
100
  startIcon?: import('react').ReactElement;
101
101
  endIcon?: import('react').ReactElement;
102
102
  fontWeight?: "bold" | "normal";
103
- }, "style" | "text" | "id" | "size" | "tooltipProps" | "dataTestId" | "disabled" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
103
+ }, "style" | "text" | "id" | "disabled" | "size" | "tooltipProps" | "dataTestId" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
104
104
  ref?: import('react').Ref<HTMLButtonElement>;
105
105
  component?: ButtonComponentType.button;
106
106
  buttonProps?: Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "children" | "styles" | "className" | "disabled" | "onClick">;
@@ -135,7 +135,7 @@ declare const Button: import('react').ForwardRefExoticComponent<(Pick<{
135
135
  startIcon?: never;
136
136
  endIcon?: never;
137
137
  fontWeight?: never;
138
- }, "style" | "text" | "id" | "size" | "tooltipProps" | "dataTestId" | "disabled" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
138
+ }, "style" | "text" | "id" | "disabled" | "size" | "tooltipProps" | "dataTestId" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
139
139
  ref?: import('react').Ref<HTMLButtonElement>;
140
140
  component?: ButtonComponentType.button;
141
141
  buttonProps?: Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "children" | "styles" | "className" | "disabled" | "onClick">;
@@ -164,7 +164,7 @@ declare const Button: import('react').ForwardRefExoticComponent<(Pick<{
164
164
  startIcon?: import('react').ReactElement;
165
165
  endIcon?: import('react').ReactElement;
166
166
  fontWeight?: "bold" | "normal";
167
- }, "style" | "text" | "id" | "size" | "tooltipProps" | "dataTestId" | "disabled" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
167
+ }, "style" | "text" | "id" | "disabled" | "size" | "tooltipProps" | "dataTestId" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
168
168
  ref?: import('react').Ref<HTMLButtonElement>;
169
169
  component?: ButtonComponentType.button;
170
170
  buttonProps?: Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "children" | "styles" | "className" | "disabled" | "onClick">;
@@ -193,7 +193,7 @@ declare const Button: import('react').ForwardRefExoticComponent<(Pick<{
193
193
  startIcon?: never;
194
194
  endIcon?: never;
195
195
  fontWeight?: never;
196
- }, "style" | "text" | "id" | "size" | "tooltipProps" | "dataTestId" | "disabled" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
196
+ }, "style" | "text" | "id" | "disabled" | "size" | "tooltipProps" | "dataTestId" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
197
197
  ref?: import('react').Ref<HTMLAnchorElement>;
198
198
  component: ButtonComponentType.link;
199
199
  linkProps: Omit<import('react-router-dom').LinkProps, "children" | "styles" | "className" | "onClick">;
@@ -228,7 +228,7 @@ declare const Button: import('react').ForwardRefExoticComponent<(Pick<{
228
228
  startIcon?: import('react').ReactElement;
229
229
  endIcon?: import('react').ReactElement;
230
230
  fontWeight?: "bold" | "normal";
231
- }, "style" | "text" | "id" | "size" | "tooltipProps" | "dataTestId" | "disabled" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
231
+ }, "style" | "text" | "id" | "disabled" | "size" | "tooltipProps" | "dataTestId" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
232
232
  ref?: import('react').Ref<HTMLAnchorElement>;
233
233
  component: ButtonComponentType.link;
234
234
  linkProps: Omit<import('react-router-dom').LinkProps, "children" | "styles" | "className" | "onClick">;
@@ -263,7 +263,7 @@ declare const Button: import('react').ForwardRefExoticComponent<(Pick<{
263
263
  startIcon?: never;
264
264
  endIcon?: never;
265
265
  fontWeight?: never;
266
- }, "style" | "text" | "id" | "size" | "tooltipProps" | "dataTestId" | "disabled" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
266
+ }, "style" | "text" | "id" | "disabled" | "size" | "tooltipProps" | "dataTestId" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
267
267
  ref?: import('react').Ref<HTMLAnchorElement>;
268
268
  component: ButtonComponentType.link;
269
269
  linkProps: Omit<import('react-router-dom').LinkProps, "children" | "styles" | "className" | "onClick">;
@@ -292,7 +292,7 @@ declare const Button: import('react').ForwardRefExoticComponent<(Pick<{
292
292
  startIcon?: import('react').ReactElement;
293
293
  endIcon?: import('react').ReactElement;
294
294
  fontWeight?: "bold" | "normal";
295
- }, "style" | "text" | "id" | "size" | "tooltipProps" | "dataTestId" | "disabled" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
295
+ }, "style" | "text" | "id" | "disabled" | "size" | "tooltipProps" | "dataTestId" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
296
296
  ref?: import('react').Ref<HTMLAnchorElement>;
297
297
  component: ButtonComponentType.link;
298
298
  linkProps: Omit<import('react-router-dom').LinkProps, "children" | "styles" | "className" | "onClick">;
@@ -321,7 +321,7 @@ declare const Button: import('react').ForwardRefExoticComponent<(Pick<{
321
321
  startIcon?: never;
322
322
  endIcon?: never;
323
323
  fontWeight?: never;
324
- }, "style" | "text" | "id" | "size" | "tooltipProps" | "dataTestId" | "disabled" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
324
+ }, "style" | "text" | "id" | "disabled" | "size" | "tooltipProps" | "dataTestId" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
325
325
  ref?: import('react').Ref<HTMLAnchorElement>;
326
326
  component: ButtonComponentType.anchor;
327
327
  linkProps?: never;
@@ -356,7 +356,7 @@ declare const Button: import('react').ForwardRefExoticComponent<(Pick<{
356
356
  startIcon?: import('react').ReactElement;
357
357
  endIcon?: import('react').ReactElement;
358
358
  fontWeight?: "bold" | "normal";
359
- }, "style" | "text" | "id" | "size" | "tooltipProps" | "dataTestId" | "disabled" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
359
+ }, "style" | "text" | "id" | "disabled" | "size" | "tooltipProps" | "dataTestId" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
360
360
  ref?: import('react').Ref<HTMLAnchorElement>;
361
361
  component: ButtonComponentType.anchor;
362
362
  linkProps?: never;
@@ -391,7 +391,7 @@ declare const Button: import('react').ForwardRefExoticComponent<(Pick<{
391
391
  startIcon?: never;
392
392
  endIcon?: never;
393
393
  fontWeight?: never;
394
- }, "style" | "text" | "id" | "size" | "tooltipProps" | "dataTestId" | "disabled" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
394
+ }, "style" | "text" | "id" | "disabled" | "size" | "tooltipProps" | "dataTestId" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
395
395
  ref?: import('react').Ref<HTMLAnchorElement>;
396
396
  component: ButtonComponentType.anchor;
397
397
  linkProps?: never;
@@ -420,7 +420,7 @@ declare const Button: import('react').ForwardRefExoticComponent<(Pick<{
420
420
  startIcon?: import('react').ReactElement;
421
421
  endIcon?: import('react').ReactElement;
422
422
  fontWeight?: "bold" | "normal";
423
- }, "style" | "text" | "id" | "size" | "tooltipProps" | "dataTestId" | "disabled" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
423
+ }, "style" | "text" | "id" | "disabled" | "size" | "tooltipProps" | "dataTestId" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy"> | Pick<{
424
424
  ref?: import('react').Ref<HTMLAnchorElement>;
425
425
  component: ButtonComponentType.anchor;
426
426
  linkProps?: never;
@@ -449,5 +449,5 @@ declare const Button: import('react').ForwardRefExoticComponent<(Pick<{
449
449
  startIcon?: never;
450
450
  endIcon?: never;
451
451
  fontWeight?: never;
452
- }, "style" | "text" | "id" | "size" | "tooltipProps" | "dataTestId" | "disabled" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy">) & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
452
+ }, "style" | "text" | "id" | "disabled" | "size" | "tooltipProps" | "dataTestId" | "startIcon" | "endIcon" | "variant" | "ariaLabel" | "icon" | "buttonProps" | "isLoading" | "onClick" | "fullWidth" | "fontWeight" | "component" | "linkProps" | "anchorProps" | "isOpacityHoverChild" | "triggerAutoClickTimestamp" | "showTooltip" | "showAriaLabelInTippy">) & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
453
453
  export default Button;
@@ -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
- * backgroundColor: ['SkyBlue300', 'AquaTeal400', 'LavenderPurple300']
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 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;
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 {};