@devtron-labs/devtron-fe-common-lib 1.12.0-beta-2 → 1.12.0-beta-4
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-WfOCu__U.js → @code-editor-DYNK2vkd.js} +9342 -9236
- package/dist/{@common-rjsf-Cb7AEsSR.js → @common-rjsf-DG-XAIRd.js} +2 -2
- package/dist/{@framer-motion-BaOj5B1h.js → @framer-motion-B-tsB4kf.js} +1 -1
- package/dist/{@react-dates-CdRpENvm.js → @react-dates-DQl_saOu.js} +1 -1
- package/dist/{@react-select-BLSAqXV1.js → @react-select-Cq3Neli-.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-BLmFnJWD.js → @react-virtualized-sticky-tree-DzwGuB_x.js} +1 -1
- package/dist/{@vendor-SjXFleuT.js → @vendor-B47rbd8d.js} +17441 -17441
- package/dist/Common/CIPipeline.Types.d.ts +20 -19
- package/dist/Common/Common.service.d.ts +2 -1
- package/dist/Common/Constants.d.ts +4 -1
- package/dist/Common/Drawer/index.d.ts +1 -0
- package/dist/Common/EmptyState/index.d.ts +2 -0
- package/dist/Common/Helper.d.ts +2 -0
- 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 +15 -1
- package/dist/Common/index.d.ts +2 -3
- package/dist/Shared/Components/AnimatedDeployButton/AnimatedDeployButton.d.ts +1 -1
- package/dist/Shared/Components/AnimatedDeployButton/types.d.ts +0 -6
- 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/constants.d.ts +4 -0
- package/dist/Shared/Components/AppStatusModal/index.d.ts +2 -0
- package/dist/Shared/Components/AppStatusModal/service.d.ts +3 -0
- package/dist/Shared/Components/AppStatusModal/types.d.ts +35 -0
- package/dist/Shared/Components/AppStatusModal/utils.d.ts +5 -0
- 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/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/types.d.ts +5 -14
- package/dist/Shared/Components/CMCS/constants.d.ts +2 -2
- package/dist/Shared/Components/CMCS/utils.d.ts +4 -3
- package/dist/Shared/Components/DynamicDataTable/DynamicDataTableHeader.d.ts +1 -1
- package/dist/Shared/Components/DynamicDataTable/types.d.ts +5 -1
- 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/Icon/Icon.d.ts +3 -4
- 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/index.d.ts +1 -1
- package/dist/Shared/Services/app.types.d.ts +2 -6
- package/dist/Shared/types.d.ts +5 -2
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-expand-sm.a9a724f8.svg +3 -0
- package/dist/assets/ic-hand-pointing.aff70667.svg +4 -0
- package/dist/assets/{ic-selected.3a29e244.svg → ic-timeout-two-dash.9a580698.svg} +3 -2
- package/dist/index.js +843 -839
- package/package.json +1 -1
- package/dist/Shared/Components/CICDHistory/AppStatusDetailsChart.d.ts +0 -3
- package/dist/Shared/Components/UserIdentifier/UserIdentifier.d.ts +0 -2
- package/dist/Shared/Components/UserIdentifier/index.d.ts +0 -2
- package/dist/Shared/Components/UserIdentifier/types.d.ts +0 -11
- package/dist/assets/ic-checks.d276fd05.svg +0 -3
- package/dist/assets/ic-key.8c76fb61.svg +0 -3
- package/dist/assets/ic-nav-rocket.433c9706.svg +0 -19
- package/dist/assets/ic-timeout-dash.d8e2d62e.svg +0 -21
@@ -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
|
+
};
|
@@ -4,6 +4,7 @@ export * from './AnimatedDeployButton';
|
|
4
4
|
export * from './AnimatedTimer';
|
5
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';
|
@@ -79,6 +80,5 @@ export * from './ThemeSwitcher';
|
|
79
80
|
export * from './ToggleResolveScopedVariables';
|
80
81
|
export * from './UnsavedChanges';
|
81
82
|
export * from './UnsavedChangesDialog';
|
82
|
-
export * from './UserIdentifier';
|
83
83
|
export * from './VirtualizedList';
|
84
84
|
export * from './WorkflowOptionsModal';
|
@@ -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;
|
package/dist/Shared/types.d.ts
CHANGED
@@ -111,6 +111,7 @@ export interface Node {
|
|
111
111
|
canBeHibernated: boolean;
|
112
112
|
isHibernated: boolean;
|
113
113
|
hasDrift?: boolean;
|
114
|
+
status?: string;
|
114
115
|
}
|
115
116
|
export interface iNodes extends Array<iNode> {
|
116
117
|
}
|
@@ -198,6 +199,10 @@ export interface AppDetails {
|
|
198
199
|
fluxTemplateType?: string;
|
199
200
|
FluxAppStatusDetail?: FluxAppStatusDetail;
|
200
201
|
}
|
202
|
+
export interface ConfigDriftModalProps extends Required<Pick<AppDetails, 'appId'>> {
|
203
|
+
envId: number;
|
204
|
+
handleCloseModal?: () => void;
|
205
|
+
}
|
201
206
|
export declare enum RegistryType {
|
202
207
|
GIT = "git",
|
203
208
|
GITHUB = "github",
|
@@ -245,8 +250,6 @@ export interface WorkflowType {
|
|
245
250
|
showTippy?: boolean;
|
246
251
|
appId?: number;
|
247
252
|
isSelected?: boolean;
|
248
|
-
isExceptionUser?: boolean;
|
249
|
-
canApproverDeploy?: boolean;
|
250
253
|
approvalConfiguredIdsMap?: Record<number, ApprovalConfigDataType>;
|
251
254
|
imageReleaseTags: string[];
|
252
255
|
appReleaseTags?: string[];
|