@devtron-labs/devtron-fe-common-lib 0.2.5 → 0.2.6

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 (71) hide show
  1. package/dist/Common/CodeEditor/types.d.ts +2 -2
  2. package/dist/Common/Constants.d.ts +2 -12
  3. package/dist/Common/RJSF/constants.d.ts +5 -0
  4. package/dist/Common/RJSF/index.d.ts +1 -0
  5. package/dist/Common/Security/ScanVulnerabilitiesTable.d.ts +1 -1
  6. package/dist/Common/Types.d.ts +2 -2
  7. package/dist/Pages/GlobalConfigurations/DeploymentCharts/basicViewSchema.json.d.ts +273 -0
  8. package/dist/Pages/GlobalConfigurations/DeploymentCharts/fallbackJobsNCronJobGuiSchema.json.d.ts +157 -0
  9. package/dist/Pages/GlobalConfigurations/DeploymentCharts/index.d.ts +2 -0
  10. package/dist/Pages/GlobalConfigurations/DeploymentCharts/types.d.ts +24 -0
  11. package/dist/Pages/GlobalConfigurations/DeploymentCharts/utils.d.ts +4 -0
  12. package/dist/Pages/GlobalConfigurations/index.d.ts +1 -0
  13. package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryDiffView.d.ts +1 -1
  14. package/dist/Shared/Components/CICDHistory/types.d.ts +1 -3
  15. package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
  16. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +1 -24
  17. package/dist/Shared/Components/ScannedObjectBar/ScannedObjectBar.d.ts +4 -0
  18. package/dist/Shared/Components/ScannedObjectBar/index.d.ts +1 -0
  19. package/dist/Shared/Components/ScannedObjectBar/types.d.ts +7 -0
  20. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  21. package/dist/Shared/Components/SelectPicker/common.d.ts +1 -1
  22. package/dist/Shared/Components/SelectPicker/index.d.ts +0 -1
  23. package/dist/Shared/Components/SelectPicker/type.d.ts +0 -16
  24. package/dist/Shared/Components/SelectPicker/utils.d.ts +2 -11
  25. package/dist/Shared/Components/Vulnerabilities/utils.d.ts +0 -1
  26. package/dist/Shared/Components/index.d.ts +1 -4
  27. package/dist/Shared/Helpers.d.ts +1 -2
  28. package/dist/Shared/Services/app.service.d.ts +1 -3
  29. package/dist/Shared/Services/app.types.d.ts +0 -116
  30. package/dist/Shared/types.d.ts +7 -19
  31. package/dist/Shared/validations.d.ts +1 -3
  32. package/dist/assets/editor.worker-60ba9509.js +12 -0
  33. package/dist/assets/index.css +1 -1
  34. package/dist/assets/yaml.worker-3bbe780a.js +472 -0
  35. package/dist/{cssMode-8fed7bef.js → cssMode-3a640c3a.js} +1 -1
  36. package/dist/{freemarker2-fc075df3.js → freemarker2-7fcef7e9.js} +1 -1
  37. package/dist/{handlebars-93ff95f9.js → handlebars-bb8d8c8f.js} +1 -1
  38. package/dist/{html-3066ce46.js → html-d9d12fbc.js} +1 -1
  39. package/dist/{htmlMode-56510e8d.js → htmlMode-6f5e366b.js} +1 -1
  40. package/dist/{index-7540b433.js → index-50b1e60a.js} +29823 -30236
  41. package/dist/index.d.ts +0 -2
  42. package/dist/index.js +480 -494
  43. package/dist/{javascript-e1b26116.js → javascript-ee21afc6.js} +1 -1
  44. package/dist/{jsonMode-8ec4966b.js → jsonMode-f243ae3a.js} +1 -1
  45. package/dist/{liquid-48a55e03.js → liquid-210197a2.js} +1 -1
  46. package/dist/{mdx-239191d8.js → mdx-47b9f654.js} +1 -1
  47. package/dist/{python-9d05a2ee.js → python-d072ae6f.js} +1 -1
  48. package/dist/{razor-026b9b6f.js → razor-bbc7aba8.js} +1 -1
  49. package/dist/{tsMode-da8ca338.js → tsMode-e3a0b064.js} +1 -1
  50. package/dist/{typescript-38649d81.js → typescript-e0f3eca9.js} +1 -1
  51. package/dist/{xml-41381217.js → xml-1408e523.js} +1 -1
  52. package/dist/{yaml-5e3f3a59.js → yaml-81fab749.js} +1 -1
  53. package/package.json +1 -1
  54. package/dist/Common/Security/types.d.ts +0 -4
  55. package/dist/Shared/Components/Collapse/Collapse.d.ts +0 -3
  56. package/dist/Shared/Components/Collapse/index.d.ts +0 -2
  57. package/dist/Shared/Components/Collapse/types.d.ts +0 -7
  58. package/dist/Shared/Components/CollapsibleList/CollapsibleList.component.d.ts +0 -3
  59. package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +0 -96
  60. package/dist/Shared/Components/CollapsibleList/index.d.ts +0 -2
  61. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.component.d.ts +0 -3
  62. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.utils.d.ts +0 -38
  63. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffAccordion.d.ts +0 -3
  64. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffMain.d.ts +0 -3
  65. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffNavigation.d.ts +0 -3
  66. package/dist/Shared/Components/DeploymentConfigDiff/index.d.ts +0 -3
  67. package/dist/Shared/Components/DeploymentConfigDiff/types.d.ts +0 -69
  68. package/dist/Shared/Components/FilterButton/FilterButton.d.ts +0 -5
  69. package/dist/Shared/Components/FilterButton/index.d.ts +0 -1
  70. package/dist/Shared/Components/FilterButton/types.d.ts +0 -12
  71. package/dist/Shared/Components/FilterButton/utils.d.ts +0 -15
@@ -1,3 +1,2 @@
1
1
  export { default as SelectPicker } from './SelectPicker.component';
2
2
  export * from './type';
3
- export { getSelectPickerOptionByValue } from './utils';
@@ -17,10 +17,6 @@ export interface SelectPickerOptionType extends OptionType<number | string, Reac
17
17
  */
18
18
  endIcon?: ReactElement;
19
19
  }
20
- export declare enum SelectPickerVariantType {
21
- DEFAULT = "default",
22
- BORDERLESS = "borderless"
23
- }
24
20
  type SelectProps = ReactSelectProps<SelectPickerOptionType>;
25
21
  export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'isLoading' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder'>, Required<Pick<SelectProps, 'classNamePrefix' | 'inputId' | 'name'>> {
26
22
  /**
@@ -74,17 +70,5 @@ export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value'
74
70
  * @default 'ComponentSizeType.small'
75
71
  */
76
72
  menuSize?: ComponentSizeType;
77
- /**
78
- * Variant of the select.
79
- *
80
- * @default SelectPickerVariantType.DEFAULT
81
- */
82
- variant?: SelectPickerVariantType;
83
- /**
84
- * Disables the ellipsis on description, it will be shown in full width, wrapped if required.
85
- *
86
- * @default false
87
- */
88
- disableDescriptionEllipsis?: boolean;
89
73
  }
90
74
  export {};
@@ -1,13 +1,4 @@
1
- import { GroupBase, OptionsOrGroups, StylesConfig } from 'react-select';
1
+ import { StylesConfig } from 'react-select';
2
2
  import { SelectPickerOptionType, SelectPickerProps } from './type';
3
3
 
4
- export declare const getCommonSelectStyle: ({ error, size, menuSize, variant, }: Pick<SelectPickerProps, 'error' | 'size' | 'menuSize' | 'variant'>) => StylesConfig<SelectPickerOptionType>;
5
- /**
6
- * Retrieves an option from the options list based on the provided value.
7
- *
8
- * @param optionsList - The list of options or groups of options.
9
- * @param value - The value to compare against the options' values.
10
- * @param defaultOption - The default option to return if no match is found.
11
- * @returns The matched option or the default option if no match is found.
12
- */
13
- export declare const getSelectPickerOptionByValue: (optionsList: OptionsOrGroups<SelectPickerOptionType, GroupBase<SelectPickerOptionType>>, value: string | number, defaultOption?: SelectPickerOptionType) => SelectPickerOptionType;
4
+ export declare const getCommonSelectStyle: ({ error, size, menuSize, }: Pick<SelectPickerProps, 'error' | 'size' | 'menuSize'>) => StylesConfig<SelectPickerOptionType>;
@@ -1,5 +1,4 @@
1
1
  import { LastExecutionResponseType, LastExecutionResultType } from '../../types';
2
2
 
3
- export declare const getSortedVulnerabilities: (vulnerabilities: any) => any;
4
3
  export declare const getParsedScanResult: (scanResult: any) => LastExecutionResultType;
5
4
  export declare const parseLastExecutionResponse: (response: any) => LastExecutionResponseType;
@@ -10,6 +10,7 @@ export * from './FilterChips';
10
10
  export * from './ActivityIndicator';
11
11
  export * from './GenericSectionErrorState';
12
12
  export * from './KeyValueList';
13
+ export * from './ScannedObjectBar';
13
14
  export * from './InfoIconTippy';
14
15
  export * from './EditableTextArea';
15
16
  export * from './Header';
@@ -32,8 +33,4 @@ export * from './IframeContainer';
32
33
  export * from './Plugin';
33
34
  export * from './KeyValueTable';
34
35
  export * from './SelectPicker';
35
- export * from './CollapsibleList';
36
- export * from './DeploymentConfigDiff';
37
36
  export * from './DetectBottom';
38
- export * from './Collapse';
39
- export * from './FilterButton';
@@ -1,5 +1,4 @@
1
1
  import { ReactElement } from 'react';
2
- import { Pair } from 'yaml';
3
2
  import { MaterialInfo, SortingOrder } from '../Common';
4
3
  import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, WebhookEventNameType } from './types';
5
4
  import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
@@ -25,8 +24,8 @@ export declare const getIsMaterialInfoAvailable: (materialInfo: MaterialInfo[])
25
24
  export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTriggers;
26
25
  export declare const stringComparatorBySortOrder: (a: string, b: string, sortOrder?: SortingOrder, isCaseSensitive?: boolean) => number;
27
26
  export declare const numberComparatorBySortOrder: (a: number, b: number, sortOrder?: SortingOrder) => number;
27
+ export declare function versionComparatorBySortOrder(a: Record<string, any>, b: Record<string, any>, compareKey: string, orderBy: SortingOrder): any;
28
28
  export declare const getWebhookEventIcon: (eventName: WebhookEventNameType) => JSX.Element;
29
- export declare const yamlComparatorBySortOrder: (a: Pair, b: Pair, sortOrder?: SortingOrder) => number;
30
29
  export declare const useIntersection: (target: React.RefObject<Element> | Element | null, options?: IntersectionOptions, callback?: IntersectionChangeHandler) => boolean;
31
30
  export declare const isNullOrUndefined: (value: unknown) => boolean;
32
31
  export declare const handleDisableSubmitOnEnter: (event: React.KeyboardEvent<HTMLFormElement>) => void;
@@ -1,9 +1,7 @@
1
- import { ResponseType } from '../../Common';
2
- import { CIMaterialInfoType, GetCITriggerInfoParamsType, AppEnvDeploymentConfigDTO, AppEnvDeploymentConfigPayloadType } from './app.types';
1
+ import { CIMaterialInfoType, GetCITriggerInfoParamsType } from './app.types';
3
2
 
4
3
  export declare const getCITriggerInfo: (params: GetCITriggerInfoParamsType) => Promise<CIMaterialInfoType>;
5
4
  /**
6
5
  * The only difference between this and getCITriggerInfo is it doesn't have env and trigger related meta info
7
6
  */
8
7
  export declare const getArtifactInfo: (params: Pick<GetCITriggerInfoParamsType, 'ciArtifactId'>) => Promise<CIMaterialInfoType>;
9
- export declare const getAppEnvDeploymentConfig: (params: AppEnvDeploymentConfigPayloadType, signal?: AbortSignal) => Promise<ResponseType<AppEnvDeploymentConfigDTO>>;
@@ -93,120 +93,4 @@ export interface GetCITriggerInfoParamsType {
93
93
  envId: number | string;
94
94
  ciArtifactId: number | string;
95
95
  }
96
- export declare enum AppEnvDeploymentConfigType {
97
- PUBLISHED_ONLY = "PublishedOnly",
98
- DRAFT_ONLY = "DraftOnly",
99
- PUBLISHED_WITH_DRAFT = "PublishedWithDraft",
100
- PREVIOUS_DEPLOYMENTS = "PreviousDeployments",
101
- DEFAULT_VERSION = "DefaultVersion"
102
- }
103
- export interface DraftMetadataDTO {
104
- appId: number;
105
- envId: number;
106
- resource: number;
107
- resourceName: string;
108
- action: number;
109
- data: string;
110
- userComment: string;
111
- changeProposed: boolean;
112
- protectNotificationConfig: {
113
- [key: string]: null;
114
- };
115
- draftId: number;
116
- draftVersionId: number;
117
- draftState: number;
118
- approvers: string[];
119
- canApprove: boolean;
120
- commentsCount: number;
121
- dataEncrypted: boolean;
122
- isAppAdmin: boolean;
123
- }
124
- export interface ConfigDatum {
125
- name: string;
126
- type: string;
127
- external: boolean;
128
- data: Record<string, string>;
129
- defaultData: Record<string, string>;
130
- global: boolean;
131
- externalType: string;
132
- esoSecretData: {};
133
- defaultESOSecretData: {};
134
- secretData: Record<string, string>;
135
- defaultSecretData: Record<string, string>;
136
- roleARN: string;
137
- subPath: boolean;
138
- filePermission: string;
139
- overridden: boolean;
140
- mountPath?: string;
141
- defaultMountPath?: string;
142
- }
143
- export interface ConfigMapSecretDataConfigDatumDTO extends ConfigDatum {
144
- draftMetadata: DraftMetadataDTO;
145
- }
146
- export interface ConfigMapSecretDataType {
147
- id: number;
148
- appId: number;
149
- configData: ConfigMapSecretDataConfigDatumDTO[];
150
- }
151
- export declare enum ConfigResourceType {
152
- ConfigMap = "ConfigMap",
153
- Secret = "Secret",
154
- DeploymentTemplate = "Deployment Template"
155
- }
156
- export interface DeploymentTemplateDTO {
157
- resourceType: ConfigResourceType.DeploymentTemplate;
158
- data: {
159
- [key: string]: any;
160
- };
161
- deploymentDraftData: ConfigMapSecretDataType | null;
162
- }
163
- export interface ConfigMapSecretDataDTO {
164
- resourceType: Extract<ConfigResourceType, ConfigResourceType.ConfigMap | ConfigResourceType.Secret>;
165
- data: ConfigMapSecretDataType;
166
- }
167
- export interface AppEnvDeploymentConfigDTO {
168
- deploymentTemplate: DeploymentTemplateDTO | null;
169
- configMapData: ConfigMapSecretDataDTO | null;
170
- secretsData: ConfigMapSecretDataDTO | null;
171
- isAppAdmin: boolean;
172
- }
173
- export interface AppEnvDeploymentConfigPayloadType {
174
- appName: string;
175
- envName: string;
176
- configType: AppEnvDeploymentConfigType;
177
- identifierId?: number;
178
- pipelineId?: number;
179
- resourceType?: ConfigResourceType;
180
- resourceId?: number;
181
- resourceName?: string;
182
- }
183
- export declare enum TemplateListType {
184
- DefaultVersions = 1,
185
- PublishedOnEnvironments = 2,
186
- DeployedOnSelfEnvironment = 3,
187
- DeployedOnOtherEnvironment = 4
188
- }
189
- export interface TemplateListDTO {
190
- chartRefId: number;
191
- chartVersion?: string;
192
- chartType?: string;
193
- type: TemplateListType;
194
- environmentId?: number;
195
- environmentName?: string;
196
- deploymentTemplateHistoryId?: number;
197
- finishedOn?: string;
198
- status?: string;
199
- pipelineId?: number;
200
- }
201
- export declare enum DraftState {
202
- Init = 1,
203
- Discarded = 2,
204
- Published = 3,
205
- AwaitApproval = 4
206
- }
207
- export declare enum EnvResourceType {
208
- ConfigMap = "configmap",
209
- Secret = "secrets",
210
- DeploymentTemplate = "deployment-template"
211
- }
212
96
  export {};
@@ -210,10 +210,8 @@ export declare enum DefaultUserKey {
210
210
  }
211
211
  export declare enum Severity {
212
212
  CRITICAL = "critical",
213
- HIGH = "high",
214
- MEDIUM = "medium",
215
- LOW = "low",
216
- UNKNOWN = "unknown"
213
+ MODERATE = "moderate",
214
+ LOW = "low"
217
215
  }
218
216
  export declare enum ImagePromotionTabs {
219
217
  REQUEST = "request",
@@ -382,19 +380,16 @@ export declare enum ResourceVersionType {
382
380
  v1 = "v1",
383
381
  alpha1 = "alpha1"
384
382
  }
385
- export interface SeverityCount {
386
- critical: number;
387
- high: number;
388
- medium: number;
389
- low: number;
390
- unknown: number;
391
- }
392
383
  export declare enum PolicyKindType {
393
384
  lockConfiguration = "lock-configuration"
394
385
  }
395
386
  export interface LastExecutionResultType {
396
387
  lastExecution: string;
397
- severityCount: SeverityCount;
388
+ severityCount: {
389
+ critical: number;
390
+ moderate: number;
391
+ low: number;
392
+ };
398
393
  vulnerabilities: VulnerabilityType[];
399
394
  scanExecutionId?: number;
400
395
  appId?: number;
@@ -541,13 +536,6 @@ export interface BatchConfigType {
541
536
  export interface scrollableInterface {
542
537
  autoBottomScroll: boolean;
543
538
  }
544
- export declare enum URLProtocolType {
545
- HTTP = "http:",
546
- HTTPS = "https:",
547
- SSH = "ssh:",
548
- SMTP = "smtp:",
549
- S3 = "s3:"
550
- }
551
539
  export type BaseFilterQueryParams<T> = {
552
540
  /**
553
541
  * Offset for the list result
@@ -1,5 +1,3 @@
1
- import { URLProtocolType } from './types';
2
-
3
1
  export interface ValidationResponseType {
4
2
  isValid: boolean;
5
3
  message?: string;
@@ -22,7 +20,6 @@ export declare const validateStringLength: (value: string, maxLimit: number, min
22
20
  export declare const validateRequiredPositiveNumber: (value: string | number) => ValidationResponseType;
23
21
  export declare const validateRequiredPositiveInteger: (value: string | number) => ValidationResponseType;
24
22
  export declare const validateURL: (url: string, allowBase64Url?: boolean) => ValidationResponseType;
25
- export declare const validateProtocols: (url: string, protocols: URLProtocolType[], isRequired?: boolean) => ValidationResponseType;
26
23
  export declare const validateIfImageExist: (url: string) => Promise<ValidationResponseType>;
27
24
  export declare const validateUniqueKeys: (keys: string[]) => {
28
25
  isValid: boolean;
@@ -31,3 +28,4 @@ export declare const validateUniqueKeys: (keys: string[]) => {
31
28
  isValid: boolean;
32
29
  message: string;
33
30
  };
31
+ export declare const validateJSON: (json: string) => ValidationResponseType;