@devtron-labs/devtron-fe-common-lib 0.5.8 → 0.6.0-beta-1
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/Common/Constants.d.ts +1 -1
- package/dist/Common/Helper.d.ts +5 -0
- package/dist/Shared/Components/CICDHistory/AppStatusDetailsChart.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +0 -5
- package/dist/Shared/Components/CollapsibleList/CollapsibleList.component.d.ts +2 -2
- package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +14 -35
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.types.d.ts +2 -2
- package/dist/Shared/Components/Header/IframePromoButton.d.ts +1 -0
- package/dist/Shared/types.d.ts +29 -2
- package/dist/Shared/validations.d.ts +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-DEBMAuGj.js → cssMode-DRujWwH1.js} +1 -1
- package/dist/{freemarker2-TbZHl9l6.js → freemarker2-B24zdnhx.js} +1 -1
- package/dist/{handlebars-YrqZDBLz.js → handlebars-uOKktZdU.js} +1 -1
- package/dist/{html-B2fzM_Mv.js → html-CBvQkh3k.js} +1 -1
- package/dist/{htmlMode-BfSqXq1K.js → htmlMode-BX_z0JrP.js} +1 -1
- package/dist/{index-C0xaazGL.js → index-CSLgJVob.js} +28920 -29544
- package/dist/index.d.ts +3 -1
- package/dist/index.js +339 -337
- package/dist/{javascript-HhoBGID0.js → javascript-C4HFt7dx.js} +1 -1
- package/dist/{jsonMode-DERA0prf.js → jsonMode-BUjhhOyB.js} +1 -1
- package/dist/{liquid-Ds-rr6_R.js → liquid-u8DgCLO8.js} +1 -1
- package/dist/{mdx-CWOg3tMi.js → mdx-5QP7Gku4.js} +1 -1
- package/dist/{python-CKMaba9T.js → python-DGxbSuAn.js} +1 -1
- package/dist/{razor-Qo-nu70j.js → razor-B56Y5Tw6.js} +1 -1
- package/dist/{tsMode-B54XvvOK.js → tsMode-Bfp-uJIg.js} +1 -1
- package/dist/{typescript-_Gk2ZLx_.js → typescript-898AqFXg.js} +1 -1
- package/dist/{xml-DkSkWE2b.js → xml-DnWDtusz.js} +1 -1
- package/dist/{yaml-DFZNsxsy.js → yaml-DezPNWWY.js} +1 -1
- package/package.json +5 -3
|
@@ -45,7 +45,7 @@ export declare const URLS: {
|
|
|
45
45
|
GLOBAL_CONFIG_SCOPED_VARIABLES: string;
|
|
46
46
|
GLOBAL_CONFIG_DEPLOYMENT_CHARTS_LIST: string;
|
|
47
47
|
NETWORK_STATUS_INTERFACE: string;
|
|
48
|
-
|
|
48
|
+
RESOURCE_BROWSER: string;
|
|
49
49
|
};
|
|
50
50
|
export declare const ROUTES: {
|
|
51
51
|
APP: string;
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -121,4 +121,9 @@ export declare function mapByKey<T = Map<any, any>>(arr: any[], id: string): T;
|
|
|
121
121
|
export declare function asyncWrap(promise: any): any[];
|
|
122
122
|
export declare const prefixZeroIfSingleDigit: (value?: number) => string | number;
|
|
123
123
|
export declare const throttle: <T extends (...args: unknown[]) => unknown>(func: T, delay?: number) => ((...args: Parameters<T>) => void);
|
|
124
|
+
export declare const getSanitizedIframe: (iframeString: string) => string;
|
|
125
|
+
/**
|
|
126
|
+
* This method adds default attributes to iframe - title, loading ="lazy", width="100%", height="100%"
|
|
127
|
+
*/
|
|
128
|
+
export declare const getIframeWithDefaultAttributes: (iframeString: string, defaultName?: string) => string;
|
|
124
129
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AppStatusDetailsChartType } from './types';
|
|
2
|
-
declare const AppStatusDetailsChart: ({ filterRemoveHealth, showFooter
|
|
2
|
+
declare const AppStatusDetailsChart: ({ filterRemoveHealth, showFooter }: AppStatusDetailsChartType) => JSX.Element;
|
|
3
3
|
export default AppStatusDetailsChart;
|
|
@@ -420,8 +420,6 @@ export interface DeploymentHistorySidebarType {
|
|
|
420
420
|
export interface AppStatusDetailsChartType {
|
|
421
421
|
filterRemoveHealth?: boolean;
|
|
422
422
|
showFooter: boolean;
|
|
423
|
-
showConfigDriftInfo?: boolean;
|
|
424
|
-
onClose?: () => void;
|
|
425
423
|
}
|
|
426
424
|
export interface StatusFilterButtonType {
|
|
427
425
|
nodes: Array<Node>;
|
|
@@ -435,9 +433,6 @@ export declare enum NodeStatus {
|
|
|
435
433
|
Suspended = "suspended",
|
|
436
434
|
Unknown = "unknown"
|
|
437
435
|
}
|
|
438
|
-
export declare enum NodeFilters {
|
|
439
|
-
drifted = "drifted"
|
|
440
|
-
}
|
|
441
436
|
type NodesMap = {
|
|
442
437
|
[key in NodeType]?: Map<string, any>;
|
|
443
438
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CollapsibleListProps
|
|
2
|
-
export declare const CollapsibleList:
|
|
1
|
+
import { CollapsibleListProps } from './CollapsibleList.types';
|
|
2
|
+
export declare const CollapsibleList: ({ config, onCollapseBtnClick }: CollapsibleListProps) => JSX.Element;
|
|
@@ -1,30 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { TippyProps } from '@tippyjs/react';
|
|
3
|
-
interface
|
|
4
|
-
/**
|
|
5
|
-
* Is tab active ( for button tab )
|
|
6
|
-
*/
|
|
7
|
-
isActive: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* The callback function to handle click events on the button.
|
|
10
|
-
*/
|
|
11
|
-
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
12
|
-
href?: never;
|
|
13
|
-
}
|
|
14
|
-
interface NavLinkTab {
|
|
15
|
-
/**
|
|
16
|
-
* The URL of the nav link.
|
|
17
|
-
*/
|
|
18
|
-
href: string;
|
|
19
|
-
/**
|
|
20
|
-
* The callback function to handle click events on the nav link.
|
|
21
|
-
*/
|
|
22
|
-
onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
23
|
-
isActive?: never;
|
|
24
|
-
}
|
|
25
|
-
export type TabOptions = 'button' | 'navLink';
|
|
26
|
-
type ConditionalTabType<TabType extends TabOptions> = TabType extends 'button' ? ButtonTab : NavLinkTab;
|
|
27
|
-
export type CollapsibleListItem<TabType extends TabOptions> = ConditionalTabType<TabType> & {
|
|
3
|
+
export interface CollapsibleListItem {
|
|
28
4
|
/**
|
|
29
5
|
* The title of the list item.
|
|
30
6
|
*/
|
|
@@ -54,8 +30,16 @@ export type CollapsibleListItem<TabType extends TabOptions> = ConditionalTabType
|
|
|
54
30
|
*/
|
|
55
31
|
tooltipProps?: TippyProps;
|
|
56
32
|
};
|
|
57
|
-
|
|
58
|
-
|
|
33
|
+
/**
|
|
34
|
+
* The URL of the nav link.
|
|
35
|
+
*/
|
|
36
|
+
href?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The callback function to handle click events on the nav link.
|
|
39
|
+
*/
|
|
40
|
+
onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
41
|
+
}
|
|
42
|
+
export interface CollapsibleListConfig {
|
|
59
43
|
/**
|
|
60
44
|
* The unique identifier for the collapsible list.
|
|
61
45
|
*/
|
|
@@ -93,21 +77,17 @@ export interface CollapsibleListConfig<TabType extends 'button' | 'navLink'> {
|
|
|
93
77
|
/**
|
|
94
78
|
* An array of items to be displayed in the collapsible list.
|
|
95
79
|
*/
|
|
96
|
-
items: CollapsibleListItem
|
|
80
|
+
items: CollapsibleListItem[];
|
|
97
81
|
/**
|
|
98
82
|
* Boolean indicating whether the list is expanded or not.
|
|
99
83
|
*/
|
|
100
84
|
isExpanded?: boolean;
|
|
101
85
|
}
|
|
102
|
-
export interface CollapsibleListProps
|
|
86
|
+
export interface CollapsibleListProps {
|
|
103
87
|
/**
|
|
104
88
|
* An array of collapsible list configurations.
|
|
105
89
|
*/
|
|
106
|
-
config: CollapsibleListConfig
|
|
107
|
-
/**
|
|
108
|
-
* Type of tab list: button or navLink
|
|
109
|
-
*/
|
|
110
|
-
tabType: TabType;
|
|
90
|
+
config: CollapsibleListConfig[];
|
|
111
91
|
/**
|
|
112
92
|
* Function to handle the collapse button click event.
|
|
113
93
|
*
|
|
@@ -117,4 +97,3 @@ export interface CollapsibleListProps<TabType extends TabOptions> {
|
|
|
117
97
|
*/
|
|
118
98
|
onCollapseBtnClick?: (id: string, e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
119
99
|
}
|
|
120
|
-
export {};
|
|
@@ -37,11 +37,11 @@ export type DeploymentConfigDiffSelectPickerProps = {
|
|
|
37
37
|
text?: never;
|
|
38
38
|
selectPickerProps: SelectPickerProps;
|
|
39
39
|
};
|
|
40
|
-
export interface DeploymentConfigDiffNavigationItem extends Pick<CollapsibleListItem
|
|
40
|
+
export interface DeploymentConfigDiffNavigationItem extends Pick<CollapsibleListItem, 'href' | 'title' | 'onClick'> {
|
|
41
41
|
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
42
42
|
diffState: DeploymentConfigListItem['diffState'];
|
|
43
43
|
}
|
|
44
|
-
export interface DeploymentConfigDiffNavigationCollapsibleItem extends Pick<CollapsibleListConfig
|
|
44
|
+
export interface DeploymentConfigDiffNavigationCollapsibleItem extends Pick<CollapsibleListConfig, 'id' | 'header' | 'noItemsText'> {
|
|
45
45
|
items: DeploymentConfigDiffNavigationItem[];
|
|
46
46
|
}
|
|
47
47
|
export interface DeploymentConfigDiffProps {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const IframePromoButton: () => JSX.Element;
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
1
2
|
import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
|
|
2
3
|
import { KeyValueListType } from './Components';
|
|
3
4
|
import { EnvironmentTypeEnum, PatchOperationType } from './constants';
|
|
@@ -84,7 +85,8 @@ export declare enum Nodes {
|
|
|
84
85
|
PodDisruptionBudget = "PodDisruptionBudget",
|
|
85
86
|
Event = "Event",
|
|
86
87
|
Namespace = "Namespace",
|
|
87
|
-
Overview = "Overview"
|
|
88
|
+
Overview = "Overview",
|
|
89
|
+
MonitoringDashboard = "MonitoringDashboard"
|
|
88
90
|
}
|
|
89
91
|
export type NodeType = keyof typeof Nodes;
|
|
90
92
|
export interface Node {
|
|
@@ -104,7 +106,6 @@ export interface Node {
|
|
|
104
106
|
port: number;
|
|
105
107
|
canBeHibernated: boolean;
|
|
106
108
|
isHibernated: boolean;
|
|
107
|
-
hasDrift?: boolean;
|
|
108
109
|
}
|
|
109
110
|
export interface iNodes extends Array<iNode> {
|
|
110
111
|
}
|
|
@@ -580,6 +581,7 @@ export declare enum ConfigurationType {
|
|
|
580
581
|
export interface BaseURLParams {
|
|
581
582
|
appId: string;
|
|
582
583
|
envId: string;
|
|
584
|
+
clusterId: string;
|
|
583
585
|
}
|
|
584
586
|
export interface ConfigKeysWithLockType {
|
|
585
587
|
config: string[];
|
|
@@ -626,4 +628,29 @@ export interface CustomRoleAndMeta {
|
|
|
626
628
|
possibleRolesMetaForCluster: MetaPossibleRoles;
|
|
627
629
|
possibleRolesMetaForJob: MetaPossibleRoles;
|
|
628
630
|
}
|
|
631
|
+
interface CommonTabArgsType {
|
|
632
|
+
name: string;
|
|
633
|
+
kind?: string;
|
|
634
|
+
url: string;
|
|
635
|
+
isSelected: boolean;
|
|
636
|
+
title?: string;
|
|
637
|
+
isDeleted?: boolean;
|
|
638
|
+
position: number;
|
|
639
|
+
iconPath?: string;
|
|
640
|
+
dynamicTitle?: string;
|
|
641
|
+
showNameOnSelect?: boolean;
|
|
642
|
+
/**
|
|
643
|
+
* @default false
|
|
644
|
+
*/
|
|
645
|
+
hideName?: boolean;
|
|
646
|
+
isAlive?: boolean;
|
|
647
|
+
lastSyncMoment?: Dayjs;
|
|
648
|
+
componentKey?: string;
|
|
649
|
+
}
|
|
650
|
+
export interface InitTabType extends CommonTabArgsType {
|
|
651
|
+
idPrefix: string;
|
|
652
|
+
}
|
|
653
|
+
export interface DynamicTabType extends CommonTabArgsType {
|
|
654
|
+
id: string;
|
|
655
|
+
}
|
|
629
656
|
export {};
|
|
@@ -42,3 +42,4 @@ export declare const validateSemanticVersioning: (version: string) => Validation
|
|
|
42
42
|
*/
|
|
43
43
|
export declare const validateDisplayName: (name: string) => ValidationResponseType;
|
|
44
44
|
export declare const validateJSON: (json: string) => ValidationResponseType;
|
|
45
|
+
export declare const validateIframe: (input: string) => ValidationResponseType;
|