@devtron-labs/devtron-fe-common-lib 1.12.0 → 1.13.0-beta-2
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-BX93G51P.js → @common-rjsf-CG-ZNO8_.js} +14811 -13821
- package/dist/{@framer-motion-BaOj5B1h.js → @framer-motion-vKlTvuNq.js} +1 -1
- package/dist/{@react-dates-CdRpENvm.js → @react-dates-DsYJWeMo.js} +1 -1
- package/dist/{@react-select-BLSAqXV1.js → @react-select-D3FsD2uq.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-BLmFnJWD.js → @react-virtualized-sticky-tree-DWN3dQyp.js} +1 -1
- package/dist/{@vendor-SjXFleuT.js → @vendor-BZ1WgRCl.js} +20730 -21550
- package/dist/Common/CIPipeline.Types.d.ts +20 -19
- package/dist/Common/Checkbox/Checkbox.d.ts +2 -0
- package/dist/Common/Checkbox/index.d.ts +1 -0
- package/dist/Common/Common.service.d.ts +2 -1
- package/dist/Common/Constants.d.ts +4 -2
- package/dist/Common/Drawer/index.d.ts +1 -0
- package/dist/Common/EmptyState/index.d.ts +2 -0
- package/dist/Common/Helper.d.ts +5 -1
- package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
- package/dist/Common/RJSF/Form.d.ts +1 -1
- package/dist/Common/Toggle/Toggle.d.ts +4 -1
- package/dist/Common/Types.d.ts +16 -10
- package/dist/Common/index.d.ts +2 -4
- package/dist/Shared/Components/AboutDevtron/AboutDevtronBody.d.ts +4 -0
- package/dist/Shared/Components/AboutDevtron/AboutDevtronDialog.d.ts +5 -0
- package/dist/Shared/Components/AboutDevtron/index.d.ts +2 -0
- package/dist/Shared/Components/AnimatedDeployButton/AnimatedDeployButton.d.ts +1 -1
- package/dist/Shared/Components/AnimatedDeployButton/types.d.ts +6 -0
- package/dist/Shared/Components/AppStatusModal/AppStatusBody.d.ts +2 -0
- package/dist/Shared/Components/AppStatusModal/AppStatusContent.d.ts +3 -0
- package/dist/Shared/Components/AppStatusModal/AppStatusModal.component.d.ts +3 -0
- package/dist/Shared/Components/AppStatusModal/AppStatusModalTabList.d.ts +3 -0
- package/dist/Shared/Components/AppStatusModal/constants.d.ts +4 -0
- package/dist/Shared/Components/AppStatusModal/index.d.ts +3 -0
- package/dist/Shared/Components/AppStatusModal/service.d.ts +4 -0
- package/dist/Shared/Components/AppStatusModal/types.d.ts +78 -0
- package/dist/Shared/Components/AppStatusModal/utils.d.ts +8 -0
- package/dist/Shared/Components/Button/types.d.ts +3 -1
- package/dist/Shared/Components/CICDHistory/Artifacts.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/DeploymentDetailSteps.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/DeploymentStatusBreakdown.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/DeploymentStatusDetailRow.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/History.components.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/constants.d.ts +1 -0
- package/dist/Shared/Components/CICDHistory/index.d.ts +0 -1
- package/dist/Shared/Components/CICDHistory/service.d.ts +3 -0
- package/dist/Shared/Components/CICDHistory/types.d.ts +15 -79
- package/dist/Shared/Components/CICDHistory/utils.d.ts +7 -3
- package/dist/Shared/Components/CMCS/constants.d.ts +2 -2
- package/dist/Shared/Components/CMCS/utils.d.ts +4 -3
- package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/types.d.ts +3 -3
- package/dist/Shared/Components/DeploymentStatusBreakdown/constants.d.ts +10 -0
- package/dist/Shared/Components/DeploymentStatusBreakdown/index.d.ts +3 -0
- package/dist/Shared/Components/DeploymentStatusBreakdown/types.d.ts +22 -0
- package/dist/Shared/Components/DeploymentStatusBreakdown/utils.d.ts +20 -0
- package/dist/Shared/Components/DynamicDataTable/DynamicDataTable.d.ts +1 -1
- package/dist/Shared/Components/DynamicDataTable/DynamicDataTableHeader.d.ts +1 -1
- package/dist/Shared/Components/DynamicDataTable/DynamicDataTableRow.d.ts +1 -1
- package/dist/Shared/Components/DynamicDataTable/types.d.ts +8 -2
- package/dist/Shared/Components/Error/ErrorBar.d.ts +1 -1
- package/dist/Shared/Components/Error/types.d.ts +4 -0
- package/dist/Shared/Components/Error/utils.d.ts +1 -0
- package/dist/Shared/Components/FramerComponents/index.d.ts +2 -2
- package/dist/Shared/Components/Header/PageHeader.d.ts +1 -1
- package/dist/Shared/Components/Header/types.d.ts +0 -1
- package/dist/Shared/Components/Icon/Icon.d.ts +34 -1
- package/dist/Shared/Components/Icon/IconBase.d.ts +1 -1
- package/dist/Shared/Components/Icon/types.d.ts +2 -1
- package/dist/Shared/Components/InfoBlock/constants.d.ts +2 -2
- package/dist/Shared/Components/InfoBlock/types.d.ts +2 -2
- package/dist/Shared/Components/InfoIconTippy/InfoIconTippy.d.ts +1 -1
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
- package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +75 -78
- package/dist/Shared/Components/KeyValueTable/index.d.ts +1 -1
- package/dist/Shared/Components/KeyValueTable/utils.d.ts +13 -0
- package/dist/Shared/Components/License/index.d.ts +1 -1
- package/dist/Shared/Components/License/utils.d.ts +2 -1
- package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +1 -1
- package/dist/Shared/Components/TabGroup/TabGroup.component.d.ts +1 -1
- package/dist/Shared/Components/TabGroup/TabGroup.helpers.d.ts +1 -1
- package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +36 -12
- package/dist/Shared/Components/TabGroup/TabGroup.utils.d.ts +1 -1
- package/dist/Shared/Components/UserIdentifier/UserIdentifier.d.ts +2 -0
- package/dist/Shared/Components/UserIdentifier/index.d.ts +2 -0
- package/dist/Shared/Components/UserIdentifier/types.d.ts +11 -0
- package/dist/Shared/Components/index.d.ts +5 -2
- package/dist/Shared/Helpers.d.ts +2 -2
- package/dist/Shared/Providers/index.d.ts +1 -1
- package/dist/Shared/Providers/types.d.ts +13 -1
- package/dist/Shared/Services/app.types.d.ts +2 -6
- package/dist/Shared/constants.d.ts +20 -24
- package/dist/Shared/types.d.ts +113 -2
- package/dist/assets/@common-rjsf.css +1 -1
- package/dist/assets/ic-amazon-eks.13404569.svg +5 -0
- package/dist/assets/ic-arrow-square-out.59bb549a.svg +3 -0
- package/dist/assets/ic-azure-aks.a9e437d5.svg +46 -0
- package/dist/assets/{ic-timeout-red.5eda1010.svg → ic-bulk-check.0f698efa.svg} +4 -4
- package/dist/assets/{ic-memory.c4159f96.svg → ic-bulk-check.99e92f7a.svg} +5 -3
- package/dist/assets/ic-caret-down-small.7c4f88bf.svg +3 -0
- package/dist/assets/ic-caret-right.0ff813c2.svg +3 -0
- package/dist/assets/ic-celebration.77350694.svg +238 -0
- package/dist/assets/ic-checkbox-hover.0151d832.svg +20 -0
- package/dist/assets/ic-checkbox-hover.93e8d66a.svg +20 -0
- package/dist/assets/ic-checkbox-intermediate.24c6d21d.svg +22 -0
- package/dist/assets/ic-checkbox-intermediate.2a2d6c49.svg +22 -0
- package/dist/assets/ic-checkbox-selected.47444fab.svg +20 -0
- package/dist/assets/ic-checkbox-selected.c5539d6f.svg +20 -0
- package/dist/assets/{ic-check-grey.f556e371.svg → ic-checkbox-unselected.8054e3d7.svg} +2 -4
- package/dist/assets/ic-checkbox-unselected.ab91cdba.svg +19 -0
- package/dist/assets/ic-checks.d276fd05.svg +3 -0
- package/dist/assets/ic-cloud-vms.27ea954e.svg +5 -0
- package/dist/assets/ic-cpu.07ca0915.svg +3 -0
- package/dist/assets/ic-disconnect.26bad827.svg +3 -0
- package/dist/assets/ic-expand-right-sm.9b347d49.svg +3 -0
- package/dist/assets/ic-expand-sm.a9a724f8.svg +3 -0
- package/dist/assets/ic-gift-gradient.7690a246.svg +9 -0
- package/dist/assets/ic-gift.9b048fc7.svg +3 -0
- package/dist/assets/ic-gitlab.ac331d67.svg +31 -0
- package/dist/assets/ic-google-gke.07314724.svg +9 -0
- package/dist/assets/ic-hand-pointing.aff70667.svg +4 -0
- package/dist/assets/ic-help-filled.4468cdf1.svg +4 -0
- package/dist/assets/{ic-info-filled.9277eb13.svg → ic-info-filled.763be331.svg} +1 -1
- package/dist/assets/ic-install.28c3beec.svg +3 -0
- package/dist/assets/ic-k3s.7f4bf72d.svg +3 -0
- package/dist/assets/ic-key.8c76fb61.svg +3 -0
- package/dist/assets/ic-kind.bd8ee992.svg +9 -0
- package/dist/assets/ic-laptop.485e21b4.svg +3 -0
- package/dist/assets/ic-man-on-rocket.7f67e914.svg +94 -0
- package/dist/assets/ic-megaphone-left.6b2a00b7.svg +3 -0
- package/dist/assets/ic-memory.82ba7e9b.svg +3 -0
- package/dist/assets/ic-minikube.d9ff1575.svg +9 -0
- package/dist/assets/ic-mobile.7c649251.svg +4 -0
- package/dist/assets/ic-rocket-launch.1d407c66.svg +3 -0
- package/dist/assets/{ic-timeout-two-dash.9a580698.svg → ic-selected.3a29e244.svg} +2 -3
- package/dist/assets/ic-sparkle-color.01c0be88.svg +1 -0
- package/dist/assets/ic-thumb-down.92d2c4d7.svg +3 -0
- package/dist/assets/ic-thumb-up.7c6f6896.svg +3 -0
- package/dist/assets/ic-timeout-dash.d8e2d62e.svg +21 -0
- package/dist/assets/ic-ubuntu.fa47508f.svg +4 -0
- package/dist/assets/ic-user-circle.7d7152fa.svg +3 -0
- package/dist/assets/ic-wifi-slash.d0390749.svg +3 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +887 -858
- package/package.json +1 -7
- package/dist/@common-rjsf-CzK1frl5.js +0 -617
- package/dist/@monaco-editor-CVagbUeH.js +0 -138960
- package/dist/Common/Checkbox.d.ts +0 -5
- package/dist/Common/CodeEditor/CodeEditor.d.ts +0 -4
- package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +0 -48
- package/dist/Common/CodeEditor/index.d.ts +0 -2
- package/dist/Common/CodeEditor/types.d.ts +0 -110
- package/dist/Common/CodeEditor/utils.d.ts +0 -3
- package/dist/Shared/Components/AnnouncementBanner/AnnouncementBanner.d.ts +0 -6
- package/dist/Shared/Components/AnnouncementBanner/index.d.ts +0 -1
- package/dist/Shared/Components/CICDHistory/AppStatusDetailsChart.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/ErrorInfoStatusBar.d.ts +0 -2
- package/dist/Shared/Components/CodeEditorWrapper/CodeEditorWrapper.d.ts +0 -19
- package/dist/Shared/Components/CodeEditorWrapper/index.d.ts +0 -1
- package/dist/Shared/Components/CodeEditorWrapper/types.d.ts +0 -7
- package/dist/assets/@code-editor.css +0 -1
- package/dist/assets/@monaco-editor.css +0 -1
- package/dist/assets/codicon.ecfbfe4b.ttf +0 -0
- package/dist/assets/ic-cpu.8be677ee.svg +0 -20
- package/dist/assets/ic-disconnected.551d6161.svg +0 -29
- package/dist/assets/ic-megaphone.b9f9a901.svg +0 -19
- package/dist/assets/ic-nav-rocket.433c9706.svg +0 -19
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/CodeEditor.components.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/CodeEditor.constants.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/CodeEditor.context.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/CodeEditor.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/CodeEditor.theme.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/CodeEditorRenderer.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/Commands/findAndReplace.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/Commands/index.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/Commands/keyMaps.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/Extensions/DiffMinimap.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/Extensions/findAndReplace.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/Extensions/index.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/Extensions/readOnlyTooltip.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/Extensions/yamlHighlight.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/Extensions/yamlParseLinter.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/index.d.ts +0 -0
- /package/dist/{Common/CodeMirror → Shared/Components/CodeEditor}/utils.d.ts +0 -0
@@ -1,40 +1,7 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
5
|
-
* @template K - A string representing the key type.
|
6
|
-
*/
|
7
|
-
export interface KeyValueHeader<K extends string> {
|
8
|
-
/** The label of the header. */
|
9
|
-
label: string;
|
10
|
-
/** The key associated with the header. */
|
11
|
-
key: K;
|
12
|
-
/** An optional class name for the header. */
|
13
|
-
className?: string;
|
14
|
-
}
|
15
|
-
/**
|
16
|
-
* Type representing a key-value row.
|
17
|
-
* @template K - A string representing the key type.
|
18
|
-
*/
|
19
|
-
export type KeyValueRow<K extends string> = {
|
20
|
-
data: {
|
21
|
-
[key in K]: Pick<ResizableTagTextAreaProps, 'value' | 'disabled' | 'tabIndex'> & {
|
22
|
-
/** An optional boolean indicating if an asterisk should be shown. */
|
23
|
-
required?: boolean;
|
24
|
-
};
|
25
|
-
};
|
26
|
-
id: string | number;
|
27
|
-
};
|
28
|
-
/**
|
29
|
-
* Interface representing the configuration for a key-value table.
|
30
|
-
* @template K - A string representing the key type.
|
31
|
-
*/
|
32
|
-
export interface KeyValueConfig<K extends string> {
|
33
|
-
/** An array containing two key-value headers. */
|
34
|
-
headers: [KeyValueHeader<K>, KeyValueHeader<K>];
|
35
|
-
/** An array of key-value rows. */
|
36
|
-
rows: KeyValueRow<K>[];
|
37
|
-
}
|
1
|
+
import { TooltipProps } from '../../../Common/Tooltip';
|
2
|
+
import { DynamicDataTableProps } from '../DynamicDataTable';
|
3
|
+
export type KeyValueTableDataType = 'key' | 'value';
|
4
|
+
export type KeyValueTableInternalProps = DynamicDataTableProps<KeyValueTableDataType, never>;
|
38
5
|
type ErrorUIProps = {
|
39
6
|
/**
|
40
7
|
* Indicates whether to show errors.
|
@@ -58,63 +25,93 @@ type ErrorUIProps = {
|
|
58
25
|
validateDuplicateKeys?: never;
|
59
26
|
validateEmptyKeys?: never;
|
60
27
|
};
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
export type KeyValueMask<K extends string> = {
|
28
|
+
export type KeyValueHeaderLabel<K extends KeyValueTableDataType = KeyValueTableDataType> = {
|
29
|
+
[key in K]: string;
|
30
|
+
};
|
31
|
+
export type KeyValueMask<K extends KeyValueTableDataType = KeyValueTableDataType> = {
|
66
32
|
[key in K]?: boolean;
|
67
33
|
};
|
68
|
-
export type KeyValuePlaceholder<K extends
|
34
|
+
export type KeyValuePlaceholder<K extends KeyValueTableDataType = KeyValueTableDataType> = {
|
69
35
|
[key in K]?: string;
|
70
36
|
};
|
37
|
+
export interface KeyValueTableRowType<K extends KeyValueTableDataType = KeyValueTableDataType> {
|
38
|
+
id: string | number;
|
39
|
+
data: {
|
40
|
+
[key in K]: {
|
41
|
+
value: string;
|
42
|
+
/** An optional boolean indicating if the cell should be marked as disabled. */
|
43
|
+
disabled?: boolean;
|
44
|
+
/** An optional boolean indicating if an asterisk should be shown. */
|
45
|
+
required?: boolean;
|
46
|
+
/** An optional tooltip to show when hovering over cell. */
|
47
|
+
tooltip?: Partial<Pick<TooltipProps, 'content' | 'className'>>;
|
48
|
+
};
|
49
|
+
};
|
50
|
+
}
|
51
|
+
export interface KeyValueTableData extends Pick<KeyValueTableRowType, 'id'> {
|
52
|
+
key: string;
|
53
|
+
value: string;
|
54
|
+
}
|
71
55
|
/**
|
72
|
-
*
|
73
|
-
* @template K - A string representing the key type.
|
56
|
+
* Props for the KeyValueTable component.
|
74
57
|
*/
|
75
|
-
export type KeyValueTableProps<
|
76
|
-
/** The configuration for the key-value table. */
|
77
|
-
config: KeyValueConfig<K>;
|
78
|
-
/** An optional mask for the key-value pairs. */
|
79
|
-
maskValue?: KeyValueMask<K>;
|
80
|
-
placeholder?: KeyValuePlaceholder<K>;
|
81
|
-
/** An optional boolean indicating if the table is sortable. */
|
82
|
-
isSortable?: boolean;
|
83
|
-
/** An optional React node for a custom header component. */
|
84
|
-
headerComponent?: ReactNode;
|
85
|
-
/** When true, data addition field will not be shown. */
|
86
|
-
isAdditionNotAllowed?: boolean;
|
87
|
-
/** When true, data add or update is disabled. */
|
88
|
-
readOnly?: boolean;
|
58
|
+
export type KeyValueTableProps = Pick<DynamicDataTableProps<KeyValueTableDataType>, 'isAdditionNotAllowed' | 'readOnly' | 'headerComponent'> & {
|
89
59
|
/**
|
90
|
-
*
|
91
|
-
* @param rowId - The id of the row that changed.
|
92
|
-
* @param headerKey - The key of the header that changed.
|
93
|
-
* @param value - The value of the cell.
|
60
|
+
* The label for the table header.
|
94
61
|
*/
|
95
|
-
|
62
|
+
headerLabel: KeyValueHeaderLabel;
|
96
63
|
/**
|
97
|
-
*
|
98
|
-
* @param deletedRowIndex - The index of the row that was deleted.
|
64
|
+
* The rows of the key-value table.
|
99
65
|
*/
|
100
|
-
|
66
|
+
rows: KeyValueTableRowType[];
|
101
67
|
/**
|
102
|
-
*
|
103
|
-
* @param value - The value to validate.
|
104
|
-
* @param key - The row key of the value.
|
105
|
-
* @param rowId - The id of the row.
|
106
|
-
* @returns Return true if the value is valid, otherwise false
|
107
|
-
* and set `showError` to `true` and provide errorMessages array to show error message.
|
68
|
+
* An optional configuration to mask values in the table.
|
108
69
|
*/
|
109
|
-
|
70
|
+
maskValue?: KeyValueMask;
|
110
71
|
/**
|
111
|
-
* An
|
72
|
+
* An optional placeholder configuration for the table columns.
|
112
73
|
*/
|
113
|
-
|
74
|
+
placeholder?: KeyValuePlaceholder;
|
75
|
+
/**
|
76
|
+
* An optional boolean indicating if the `key` column is sortable.
|
77
|
+
*/
|
78
|
+
isSortable?: boolean;
|
79
|
+
/**
|
80
|
+
* A callback function triggered when the table rows change.
|
81
|
+
*
|
82
|
+
* @param data - The updated table data.
|
83
|
+
*/
|
84
|
+
onChange: (data: KeyValueTableData[]) => void;
|
85
|
+
/**
|
86
|
+
* A function to validate the value of a cell.
|
87
|
+
*
|
88
|
+
* @param value - The value to validate.
|
89
|
+
* @param key - The key of the header associated with the value.
|
90
|
+
* @param row - The row containing the value.
|
91
|
+
* @returns A boolean indicating whether the value is valid. If false,
|
92
|
+
* `showError` should be set to `true` and `errorMessages` should
|
93
|
+
* provide an array of error messages to display.
|
94
|
+
*/
|
95
|
+
validationSchema?: (value: string, key: KeyValueTableDataType, row: KeyValueTableRowType) => {
|
96
|
+
/** Boolean indicating if the cell data is valid or not. */
|
97
|
+
isValid: boolean;
|
98
|
+
/**
|
99
|
+
* An array of error messages to display in the cell error tooltip.
|
100
|
+
*/
|
101
|
+
errorMessages?: string[];
|
102
|
+
};
|
114
103
|
/**
|
115
|
-
* A callback function
|
116
|
-
*
|
104
|
+
* A callback function triggered when an error occurs in the table.
|
105
|
+
*
|
106
|
+
* @param errorState - A boolean indicating the error state. True if any
|
107
|
+
* cell has an error, otherwise false.
|
117
108
|
*/
|
118
109
|
onError?: (errorState: boolean) => void;
|
119
110
|
} & ErrorUIProps;
|
111
|
+
export type KeyValueValidationSchemaProps = {
|
112
|
+
value: Parameters<KeyValueTableProps['validationSchema']>[0];
|
113
|
+
key: Parameters<KeyValueTableProps['validationSchema']>[1];
|
114
|
+
row: Parameters<KeyValueTableProps['validationSchema']>[2];
|
115
|
+
keysFrequency?: Record<string, number>;
|
116
|
+
} & Pick<KeyValueTableProps, 'validateDuplicateKeys' | 'validateEmptyKeys' | 'validationSchema'> & Partial<Pick<KeyValueTableInternalProps, 'rows'>>;
|
120
117
|
export {};
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export * from './KeyValueTable.component';
|
2
|
-
export
|
2
|
+
export type { KeyValueTableData, KeyValueTableProps } from './KeyValueTable.types';
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { UseStateFiltersReturnType } from '../../../Common/Hooks';
|
2
|
+
import { KeyValueTableData, KeyValueTableDataType, KeyValueTableInternalProps, KeyValueTableProps, KeyValueValidationSchemaProps } from './KeyValueTable.types';
|
3
|
+
export declare const getModifiedDataForOnChange: (rows: KeyValueTableInternalProps["rows"]) => KeyValueTableData[];
|
4
|
+
export declare const getEmptyRow: (placeholder: KeyValueTableProps["placeholder"]) => KeyValueTableInternalProps["rows"][number];
|
5
|
+
export declare const getKeyValueTableRows: ({ rows: initialRows, placeholder, maskValue, }: Required<Pick<KeyValueTableProps, "rows" | "placeholder" | "maskValue">>) => KeyValueTableInternalProps["rows"];
|
6
|
+
export declare const getKeyValueTableSortedRows: ({ rows, sortBy, sortOrder, }: Required<Pick<UseStateFiltersReturnType<KeyValueTableDataType>, "sortBy" | "sortOrder">> & Pick<KeyValueTableInternalProps, "rows">) => import('../DynamicDataTable').DynamicDataTableRowType<KeyValueTableDataType, never>[];
|
7
|
+
export declare const getKeyValueHeaders: ({ headerLabel, isSortable, }: Pick<KeyValueTableProps, "headerLabel" | "isSortable">) => KeyValueTableInternalProps["headers"];
|
8
|
+
export declare const getKeyValueTableCellError: ({ validateDuplicateKeys, validateEmptyKeys, validationSchema: parentValidationSchema, rows, }: Pick<KeyValueValidationSchemaProps, "validateDuplicateKeys" | "validateEmptyKeys" | "validationSchema" | "rows"> & {
|
9
|
+
skipValidationIfValueIsEmpty?: boolean;
|
10
|
+
}) => {
|
11
|
+
isValid: boolean;
|
12
|
+
updatedCellError: {};
|
13
|
+
};
|
@@ -2,4 +2,4 @@ export { default as ActivateLicenseDialog } from './ActivateLicenseDialog';
|
|
2
2
|
export { default as DevtronLicenseCard } from './DevtronLicenseCard';
|
3
3
|
export { ICDevtronWithBorder, default as InstallationFingerprintInfo } from './License.components';
|
4
4
|
export * from './types';
|
5
|
-
export { parseDevtronLicenseData } from './utils';
|
5
|
+
export { parseDevtronLicenseData, parseDevtronLicenseDTOIntoLicenseCardData } from './utils';
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { DevtronLicenseDTO } from '../../types';
|
2
|
-
import { DevtronLicenseInfo, LicenseStatus } from './types';
|
2
|
+
import { DevtronLicenseCardProps, DevtronLicenseInfo, LicenseStatus } from './types';
|
3
3
|
export declare const getLicenseColorsAccordingToStatus: (licenseStatus: LicenseStatus) => {
|
4
4
|
bgColor: string;
|
5
5
|
textColor: string;
|
6
6
|
};
|
7
|
+
export declare const parseDevtronLicenseDTOIntoLicenseCardData: <isCentralDashboard extends boolean = false>(licenseDTO: DevtronLicenseDTO<isCentralDashboard>, currentUserEmail?: isCentralDashboard extends true ? string : never) => Omit<DevtronLicenseCardProps, "appTheme">;
|
7
8
|
export declare const parseDevtronLicenseData: (result: DevtronLicenseDTO) => DevtronLicenseInfo;
|
8
9
|
export declare const getGateKeeperUrl: (fingerprint: string) => string;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { SEVERITIES } from './constants';
|
2
2
|
import { GetResourceScanDetailsResponseType, ImageScanVulnerabilityType, ImageVulnerabilityType, ScanResultDTO, SeveritiesDTO, VulnerabilityCountType } from './types';
|
3
3
|
export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => {
|
4
|
-
color: "var(--R500)" | "var(--N300)" | "var(--O500)" | "var(--
|
4
|
+
color: "var(--R500)" | "var(--N300)" | "var(--O500)" | "var(--Y500)" | "var(--G500)" | "var(--R700)";
|
5
5
|
label: "Unknown" | "Critical" | "High" | "Medium" | "Low" | "Failures" | "Successes" | "Exceptions";
|
6
6
|
value: number;
|
7
7
|
}[];
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { TabGroupProps } from './TabGroup.types';
|
2
|
-
export declare const TabGroup: ({ tabs, size, rightComponent,
|
2
|
+
export declare const TabGroup: ({ tabs, size, rightComponent, hideTopPadding, }: TabGroupProps) => JSX.Element;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TabGroupProps, TabProps } from './TabGroup.types';
|
2
|
-
export declare const getTabIcon: ({ icon, showError, showWarning, className, size, active, }: Pick<TabProps, "showError" | "showWarning" | "icon" | "active"> & Pick<TabGroupProps, "size"> & {
|
2
|
+
export declare const getTabIcon: ({ icon, showError, showWarning, className, size, active, iconElement, }: Pick<TabProps, "showError" | "showWarning" | "icon" | "active" | "iconElement"> & Pick<TabGroupProps, "size"> & {
|
3
3
|
className: string;
|
4
4
|
}) => JSX.Element;
|
5
5
|
export declare const getTabBadge: (badge: TabProps["badge"], className: string) => JSX.Element;
|
@@ -65,6 +65,38 @@ type TabTooltipProps = {
|
|
65
65
|
shouldWrapTooltip?: never;
|
66
66
|
tooltipProps?: never;
|
67
67
|
};
|
68
|
+
/**
|
69
|
+
* Represents the properties for defining an icon in a tab group.
|
70
|
+
* This type allows for three configurations:
|
71
|
+
*
|
72
|
+
* 1. **Icon as a functional component or string**:
|
73
|
+
* - Use the `icon` property to specify either a functional component that renders an SVG or a string representing the name of the icon.
|
74
|
+
* - The `iconElement` property must not be provided in this case.
|
75
|
+
*
|
76
|
+
* 2. **Icon as a JSX element**:
|
77
|
+
* - Use the `iconElement` property to specify a JSX element representing the icon.
|
78
|
+
* - The `icon` property must not be provided in this case.
|
79
|
+
*
|
80
|
+
* 3. **No icon**:
|
81
|
+
* - Neither `icon` nor `iconElement` is provided, resulting in no icon being displayed.
|
82
|
+
*
|
83
|
+
*/
|
84
|
+
type TabGroupIconProp = {
|
85
|
+
/**
|
86
|
+
* A functional component rendering an SVG or a string representing the icon name. Mutually exclusive with `iconElement`.
|
87
|
+
*/
|
88
|
+
icon: React.FunctionComponent<React.SVGProps<SVGSVGElement>> | IconName;
|
89
|
+
iconElement?: never;
|
90
|
+
} | {
|
91
|
+
icon?: never;
|
92
|
+
/**
|
93
|
+
* A JSX element representing the icon. Mutually exclusive with `icon`.
|
94
|
+
*/
|
95
|
+
iconElement: JSX.Element;
|
96
|
+
} | {
|
97
|
+
icon?: never;
|
98
|
+
iconElement?: never;
|
99
|
+
};
|
68
100
|
export type TabProps = {
|
69
101
|
/**
|
70
102
|
* Unique identifier for the tab.
|
@@ -79,12 +111,6 @@ export type TabProps = {
|
|
79
111
|
* @note - If passed as a `string[]`, it will be rendered with a bullet in-between strings.
|
80
112
|
*/
|
81
113
|
description?: string | string[];
|
82
|
-
/**
|
83
|
-
* Icon to be displayed in the tab.
|
84
|
-
* This can either be a functional component that renders a SVG
|
85
|
-
* or a string representing the name of the icon to be rendered by the Icon component.
|
86
|
-
*/
|
87
|
-
icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>> | IconName;
|
88
114
|
/**
|
89
115
|
* Badge number to be displayed on the tab, typically for notifications.
|
90
116
|
*/
|
@@ -107,7 +133,7 @@ export type TabProps = {
|
|
107
133
|
* Disables the tab, preventing interaction and indicating an inactive state.
|
108
134
|
*/
|
109
135
|
disabled?: boolean;
|
110
|
-
} & ConditionalTabType & TabTooltipProps;
|
136
|
+
} & ConditionalTabType & TabTooltipProps & TabGroupIconProp;
|
111
137
|
export interface TabGroupProps {
|
112
138
|
/**
|
113
139
|
* Array of tabs to be rendered.
|
@@ -122,15 +148,13 @@ export interface TabGroupProps {
|
|
122
148
|
* Optional component to be rendered on the right side of the tab list.
|
123
149
|
*/
|
124
150
|
rightComponent?: React.ReactElement;
|
125
|
-
/**
|
126
|
-
* Set to `true` to align the active tab's border with the bottom border of the parent container.
|
127
|
-
* @default false
|
128
|
-
*/
|
129
|
-
alignActiveBorderWithContainer?: boolean;
|
130
151
|
/**
|
131
152
|
* Determines if the top padding of the tab group should be hidden.
|
132
153
|
* @default false
|
133
154
|
*/
|
134
155
|
hideTopPadding?: boolean;
|
135
156
|
}
|
157
|
+
export type AdditionalTabProps = {
|
158
|
+
uniqueGroupId: string;
|
159
|
+
};
|
136
160
|
export {};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { IconsProps } from '../Icon';
|
2
2
|
import { TabGroupProps } from './TabGroup.types';
|
3
|
-
export declare const getClassNameBySizeMap: ({ hideTopPadding,
|
3
|
+
export declare const getClassNameBySizeMap: ({ hideTopPadding, }: Pick<TabGroupProps, "hideTopPadding">) => Record<TabGroupProps["size"], {
|
4
4
|
tabClassName: string;
|
5
5
|
iconClassName: string;
|
6
6
|
badgeClassName: string;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
export interface UserIdentifierProps {
|
3
|
+
identifier: string;
|
4
|
+
children?: ReactNode;
|
5
|
+
isUserGroup?: boolean;
|
6
|
+
rootClassName?: string;
|
7
|
+
/**
|
8
|
+
* @description - If given, would show tooltip on div containing avatar, email and children
|
9
|
+
*/
|
10
|
+
tooltipContent?: string;
|
11
|
+
}
|
@@ -1,9 +1,10 @@
|
|
1
|
+
export * from './AboutDevtron';
|
1
2
|
export * from './ActionMenu';
|
2
3
|
export * from './ActivityIndicator';
|
3
4
|
export * from './AnimatedDeployButton';
|
4
5
|
export * from './AnimatedTimer';
|
5
|
-
export * from './AnnouncementBanner';
|
6
6
|
export * from './APIResponseHandler';
|
7
|
+
export * from './AppStatusModal';
|
7
8
|
export * from './ArtifactInfoModal';
|
8
9
|
export * from './Backdrop';
|
9
10
|
export * from './BulkOperations';
|
@@ -13,7 +14,7 @@ export * from './ButtonWithLoader';
|
|
13
14
|
export * from './ButtonWithSelector';
|
14
15
|
export * from './CICDHistory';
|
15
16
|
export * from './CMCS';
|
16
|
-
export * from './
|
17
|
+
export * from './CodeEditor';
|
17
18
|
export * from './Collapse';
|
18
19
|
export * from './CollapsibleList';
|
19
20
|
export * from './CommitChipCell';
|
@@ -23,6 +24,7 @@ export * from './CountrySelect';
|
|
23
24
|
export * from './CustomInput';
|
24
25
|
export * from './DatePicker';
|
25
26
|
export * from './DeploymentConfigDiff';
|
27
|
+
export * from './DeploymentStatusBreakdown';
|
26
28
|
export * from './DetectBottom';
|
27
29
|
export * from './DiffViewer';
|
28
30
|
export * from './DynamicDataTable';
|
@@ -79,5 +81,6 @@ export * from './ThemeSwitcher';
|
|
79
81
|
export * from './ToggleResolveScopedVariables';
|
80
82
|
export * from './UnsavedChanges';
|
81
83
|
export * from './UnsavedChangesDialog';
|
84
|
+
export * from './UserIdentifier';
|
82
85
|
export * from './VirtualizedList';
|
83
86
|
export * from './WorkflowOptionsModal';
|
package/dist/Shared/Helpers.d.ts
CHANGED
@@ -4,7 +4,7 @@ import { StrictRJSFSchema } from '@rjsf/utils';
|
|
4
4
|
import { Pair } from 'yaml';
|
5
5
|
import { MaterialHistoryType } from '@Shared/Services/app.types';
|
6
6
|
import { ApprovalConfigDataType, MaterialInfo, SortingOrder, UserApprovalConfigType, UserApprovalInfo } from '../Common';
|
7
|
-
import { AggregatedNodes,
|
7
|
+
import { AggregatedNodes, PodMetadatum } from './Components';
|
8
8
|
import { BorderConfigType, GetTimeDifferenceParamsType, GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, TargetPlatformItemDTO, TargetPlatformsDTO, WebhookEventNameType } from './types';
|
9
9
|
interface HighlightSearchTextProps {
|
10
10
|
/**
|
@@ -36,7 +36,6 @@ export declare const isNullOrUndefined: (value: unknown) => boolean;
|
|
36
36
|
export declare const handleDisableSubmitOnEnter: (event: React.KeyboardEvent<HTMLFormElement>) => void;
|
37
37
|
export declare const getKeyToBooleanMapFromArray: <T extends string | number>(arr?: T[]) => Record<T, boolean>;
|
38
38
|
export declare const renderValidInputButtonTippy: (children: ReactElement) => JSX.Element;
|
39
|
-
export declare const processDeploymentStatusDetailsData: (data?: DeploymentStatusDetailsType) => DeploymentStatusDetailsBreakdownDataType;
|
40
39
|
export declare function aggregateNodes(nodes: any[], podMetadata: PodMetadatum[]): AggregatedNodes;
|
41
40
|
export declare const decode: (data: any, isEncoded?: boolean) => {};
|
42
41
|
export declare const isTimeStringAvailable: (time: string) => boolean;
|
@@ -101,4 +100,5 @@ export declare const deriveBorderRadiusAndBorderClassFromConfig: ({ borderConfig
|
|
101
100
|
}) => string;
|
102
101
|
export declare const getClassNameForStickyHeaderWithShadow: (isStuck: boolean, topClassName?: string) => string;
|
103
102
|
export declare const clearCookieOnLogout: () => void;
|
103
|
+
export declare const getAppDetailsURL: (appId: number | string, envId?: number | string) => string;
|
104
104
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export * from './ImageSelectionUtility';
|
2
2
|
export * from './MainContextProvider';
|
3
3
|
export * from './ThemeProvider';
|
4
|
-
export type { MainContext } from './types';
|
4
|
+
export type { MainContext, ReloadVersionConfigTypes } from './types';
|
5
5
|
export * from './UserEmailProvider';
|
@@ -1,7 +1,16 @@
|
|
1
1
|
import { Dispatch, MutableRefObject, ReactNode, SetStateAction } from 'react';
|
2
2
|
import { SERVER_MODE } from '../../Common';
|
3
3
|
import { ServerInfo } from '../Components/Header/types';
|
4
|
-
import { DevtronLicenseInfo, LicenseInfoDialogType } from '..';
|
4
|
+
import { DevtronLicenseInfo, IntelligenceConfig, LicenseInfoDialogType, ToastManager } from '..';
|
5
|
+
export interface ReloadVersionConfigTypes {
|
6
|
+
bgUpdated: boolean;
|
7
|
+
handleAppUpdate: () => void;
|
8
|
+
doesNeedRefresh: boolean;
|
9
|
+
updateServiceWorker: () => Promise<void>;
|
10
|
+
handleControllerChange: () => void;
|
11
|
+
updateToastRef: MutableRefObject<ReturnType<typeof ToastManager.showToast>> | null;
|
12
|
+
isRefreshing: boolean;
|
13
|
+
}
|
5
14
|
export interface MainContext {
|
6
15
|
serverMode: SERVER_MODE;
|
7
16
|
setServerMode: (serverMode: SERVER_MODE) => void;
|
@@ -46,6 +55,9 @@ export interface MainContext {
|
|
46
55
|
licenseData: DevtronLicenseInfo;
|
47
56
|
setLicenseData: Dispatch<SetStateAction<DevtronLicenseInfo>>;
|
48
57
|
canFetchHelmAppStatus: boolean;
|
58
|
+
reloadVersionConfig: ReloadVersionConfigTypes;
|
59
|
+
intelligenceConfig: IntelligenceConfig;
|
60
|
+
setIntelligenceConfig: Dispatch<SetStateAction<IntelligenceConfig>>;
|
49
61
|
}
|
50
62
|
export interface MainContextProviderProps {
|
51
63
|
children: ReactNode;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { KeyValueTableData } from '../Components';
|
1
2
|
import { TargetPlatformsDTO } from '../types';
|
2
3
|
import { OverrideMergeStrategyType } from '../../Pages/Applications';
|
3
4
|
import { ReleaseTag, ResponseType, UserApprovalMetadataType } from '../../Common';
|
@@ -185,11 +186,6 @@ export interface ConfigMapSecretDataType {
|
|
185
186
|
configData: ConfigMapSecretDataConfigDatumDTO[];
|
186
187
|
isDeletable: boolean;
|
187
188
|
}
|
188
|
-
export interface CMSecretYamlData {
|
189
|
-
k: string;
|
190
|
-
v: string;
|
191
|
-
id: string | number;
|
192
|
-
}
|
193
189
|
export interface ConfigMapSecretUseFormProps {
|
194
190
|
name: string;
|
195
191
|
isSecret: boolean;
|
@@ -204,7 +200,7 @@ export interface ConfigMapSecretUseFormProps {
|
|
204
200
|
roleARN: string;
|
205
201
|
yamlMode: boolean;
|
206
202
|
yaml: string;
|
207
|
-
currentData:
|
203
|
+
currentData: KeyValueTableData[];
|
208
204
|
secretDataYaml: string;
|
209
205
|
esoSecretYaml: string;
|
210
206
|
hasCurrentDataErr: boolean;
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import { OptionType } from '../Common/Types';
|
2
|
-
import {
|
1
|
+
import { DeploymentNodeType, OptionType } from '../Common/Types';
|
2
|
+
import { InfoBlockProps } from './Components';
|
3
|
+
import { CDMaterialSidebarType, ConfigKeysWithLockType, ConfigurationType, IconBaseColorType } from './types';
|
3
4
|
export declare const ARTIFACT_STATUS: {
|
4
5
|
PROGRESSING: string;
|
5
6
|
DEGRADED: string;
|
@@ -50,28 +51,6 @@ export declare enum EnvironmentTypeEnum {
|
|
50
51
|
production = "Production",
|
51
52
|
nonProduction = "Non-Production"
|
52
53
|
}
|
53
|
-
export declare enum TIMELINE_STATUS {
|
54
|
-
DEPLOYMENT_INITIATED = "DEPLOYMENT_INITIATED",
|
55
|
-
GIT_COMMIT = "GIT_COMMIT",
|
56
|
-
GIT_COMMIT_FAILED = "GIT_COMMIT_FAILED",
|
57
|
-
ARGOCD_SYNC = "ARGOCD_SYNC",
|
58
|
-
ARGOCD_SYNC_FAILED = "ARGOCD_SYNC_FAILED",
|
59
|
-
KUBECTL_APPLY = "KUBECTL_APPLY",
|
60
|
-
KUBECTL_APPLY_STARTED = "KUBECTL_APPLY_STARTED",
|
61
|
-
KUBECTL_APPLY_SYNCED = "KUBECTL_APPLY_SYNCED",
|
62
|
-
HEALTHY = "HEALTHY",
|
63
|
-
APP_HEALTH = "APP_HEALTH",
|
64
|
-
DEPLOYMENT_FAILED = "FAILED",
|
65
|
-
FETCH_TIMED_OUT = "TIMED_OUT",
|
66
|
-
UNABLE_TO_FETCH_STATUS = "UNABLE_TO_FETCH_STATUS",
|
67
|
-
DEGRADED = "DEGRADED",
|
68
|
-
DEPLOYMENT_SUPERSEDED = "DEPLOYMENT_SUPERSEDED",
|
69
|
-
ABORTED = "ABORTED",
|
70
|
-
INPROGRESS = "INPROGRESS",
|
71
|
-
HELM_PACKAGE_GENERATED = "HELM_PACKAGE_GENERATED",
|
72
|
-
HELM_MANIFEST_PUSHED_TO_HELM_REPO = "HELM_MANIFEST_PUSHED_TO_HELM_REPO",
|
73
|
-
HELM_MANIFEST_PUSHED_TO_HELM_REPO_FAILED = "HELM_MANIFEST_PUSHED_TO_HELM_REPO_FAILED"
|
74
|
-
}
|
75
54
|
/**
|
76
55
|
* Constants for NO MATCHING result
|
77
56
|
*/
|
@@ -422,6 +401,8 @@ export declare const DC_DELETE_SUBTITLES: {
|
|
422
401
|
};
|
423
402
|
export declare const EULA_LINK = "https://devtron.ai/end-user-license-agreement-eula";
|
424
403
|
export declare const CONTACT_SUPPORT_LINK = "https://devtron.ai/enterprise-support";
|
404
|
+
export declare const PRIVACY_POLICY_LINK = "https://devtron.ai/privacy-policy";
|
405
|
+
export declare const TERMS_OF_USE_LINK = "https://devtron.ai/terms-of-use";
|
425
406
|
export declare const enum DeleteComponentsName {
|
426
407
|
Cluster = "cluster",
|
427
408
|
Job = "job pipeline",
|
@@ -433,3 +414,18 @@ export declare const Routes: {
|
|
433
414
|
};
|
434
415
|
export declare const ENTERPRISE_SUPPORT_LINK = "enterprise@devtron.ai";
|
435
416
|
export declare const INVALID_LICENSE_KEY = "inValid";
|
417
|
+
export declare enum InfoBlockVariant {
|
418
|
+
ERROR = "error",
|
419
|
+
HELP = "help",
|
420
|
+
INFORMATION = "information",
|
421
|
+
SUCCESS = "success",
|
422
|
+
WARNING = "warning",
|
423
|
+
NEUTRAL = "neutral"
|
424
|
+
}
|
425
|
+
export type InfoBlockVariantType = 'error' | 'help' | 'information' | 'success' | 'warning' | 'neutral';
|
426
|
+
export declare const VARIANT_TO_BG_MAP: Record<InfoBlockProps['variant'], string>;
|
427
|
+
export declare const VARIANT_TO_ICON_COLOR_MAP: Record<InfoBlockProps['variant'], IconBaseColorType>;
|
428
|
+
export declare const VARIANT_TO_BORDER_MAP: Record<InfoBlockProps['variant'], string>;
|
429
|
+
export declare const DEPLOYMENT_STAGE_TO_NODE_MAP: Readonly<Record<DeploymentStageType, DeploymentNodeType>>;
|
430
|
+
export declare const APP_DETAILS_FALLBACK_POLLING_INTERVAL = 30000;
|
431
|
+
export declare const PROGRESSING_DEPLOYMENT_STATUS_POLLING_INTERVAL = 10000;
|