@devtron-labs/devtron-fe-common-lib 0.2.13-beta-1 → 0.2.14

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 (27) hide show
  1. package/dist/Common/CodeEditor/types.d.ts +9 -3
  2. package/dist/Common/Common.service.d.ts +0 -2
  3. package/dist/Common/Types.d.ts +1 -2
  4. package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
  5. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +7 -28
  6. package/dist/Shared/constants.d.ts +0 -4
  7. package/dist/Shared/types.d.ts +0 -12
  8. package/dist/assets/index.css +1 -1
  9. package/dist/{cssMode-20f84167.js → cssMode-886799c9.js} +1 -1
  10. package/dist/{freemarker2-2d114906.js → freemarker2-fd006554.js} +1 -1
  11. package/dist/{handlebars-07b0b489.js → handlebars-b7a28994.js} +1 -1
  12. package/dist/{html-03ea3283.js → html-341a0bc3.js} +1 -1
  13. package/dist/{htmlMode-f4192bc0.js → htmlMode-0048b22a.js} +1 -1
  14. package/dist/{index-aa5201a2.js → index-74e7406e.js} +15896 -15966
  15. package/dist/index.js +478 -482
  16. package/dist/{javascript-323e6897.js → javascript-efd49074.js} +1 -1
  17. package/dist/{jsonMode-9754d94b.js → jsonMode-abbd4b1e.js} +1 -1
  18. package/dist/{liquid-733ceed9.js → liquid-86a7d850.js} +1 -1
  19. package/dist/{mdx-3cc6ca12.js → mdx-4160565c.js} +1 -1
  20. package/dist/{python-dbb9ceb8.js → python-bee7f7cd.js} +1 -1
  21. package/dist/{razor-3b7fe009.js → razor-b4db6800.js} +1 -1
  22. package/dist/{tsMode-27a7d5b0.js → tsMode-5e50488f.js} +1 -1
  23. package/dist/{typescript-376b90a7.js → typescript-1ab20b70.js} +1 -1
  24. package/dist/{xml-57a34b15.js → xml-d41c92aa.js} +1 -1
  25. package/dist/{yaml-ed883a3f.js → yaml-32231b21.js} +1 -1
  26. package/package.json +1 -1
  27. package/dist/Shared/Components/KeyValueTable/constants.d.ts +0 -2
@@ -5,7 +5,7 @@ export interface InformationBarProps {
5
5
  className?: string;
6
6
  children?: React.ReactNode;
7
7
  }
8
- export interface CodeEditorInterface {
8
+ interface CodeEditorBaseInterface {
9
9
  value?: string;
10
10
  lineDecorationsWidth?: number;
11
11
  responseType?: string;
@@ -19,7 +19,6 @@ export interface CodeEditorInterface {
19
19
  readOnly?: boolean;
20
20
  noParsing?: boolean;
21
21
  inline?: boolean;
22
- height?: number | string;
23
22
  shebang?: string | JSX.Element;
24
23
  diffView?: boolean;
25
24
  loading?: boolean;
@@ -31,8 +30,14 @@ export interface CodeEditorInterface {
31
30
  isKubernetes?: boolean;
32
31
  cleanData?: boolean;
33
32
  chartVersion?: any;
34
- adjustEditorHeightToContent?: boolean;
35
33
  }
34
+ export type CodeEditorInterface = CodeEditorBaseInterface & ({
35
+ adjustEditorHeightToContent?: boolean;
36
+ height?: never;
37
+ } | {
38
+ adjustEditorHeightToContent?: never;
39
+ height?: number | string;
40
+ });
36
41
  export interface CodeEditorHeaderInterface {
37
42
  children?: any;
38
43
  className?: string;
@@ -86,3 +91,4 @@ export declare enum CodeEditorActionTypes {
86
91
  overrideLoading = "overrideLoading",
87
92
  success = "success"
88
93
  }
94
+ export {};
@@ -1,4 +1,3 @@
1
- import { RuntimeParamsAPIResponseType, RuntimeParamsListItemType } from '../Shared/types';
2
1
  import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse } from './Types';
3
2
  import { ApiResourceType } from '../Pages';
4
3
 
@@ -16,7 +15,6 @@ export declare const SourceTypeMap: {
16
15
  };
17
16
  export declare function getUserRole(appName?: string): Promise<UserRole>;
18
17
  export declare function setImageTags(request: any, pipelineId: number, artifactId: number): Promise<ResponseType<any>>;
19
- export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => RuntimeParamsListItemType[];
20
18
  export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
21
19
  export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
22
20
  export declare function extractImage(image: string): string;
@@ -2,7 +2,7 @@ import { default as React, ReactNode, CSSProperties } from 'react';
2
2
  import { Placement } from 'tippy.js';
3
3
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
4
4
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
5
- import { RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
5
+ import { RegistryType, Severity } from '../Shared';
6
6
 
7
7
  /**
8
8
  * Generic response type object with support for overriding the result type
@@ -546,7 +546,6 @@ export interface CDMaterialsMetaInfo {
546
546
  * This is the ID of user that has request the material
547
547
  */
548
548
  requestedUserId: number;
549
- runtimeParams: RuntimeParamsListItemType[];
550
549
  }
551
550
  export interface ImagePromotionMaterialInfo {
552
551
  isApprovalPendingForPromotion: boolean;
@@ -1,3 +1,3 @@
1
1
  import { KeyValueTableProps } from './KeyValueTable.types';
2
2
 
3
- export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, readOnly, showError, validationSchema: parentValidationSchema, errorMessages: parentErrorMessages, onError, validateDuplicateKeys, validateEmptyKeys, }: KeyValueTableProps<K>) => JSX.Element;
3
+ export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, readOnly, showError, validationSchema, errorMessages, onError, }: KeyValueTableProps<K>) => JSX.Element;
@@ -36,29 +36,6 @@ export interface KeyValueConfig<K extends string> {
36
36
  /** An array of key-value rows. */
37
37
  rows: KeyValueRow<K>[];
38
38
  }
39
- type ErrorUIProps = {
40
- /**
41
- * Indicates whether to show errors.
42
- */
43
- showError: true;
44
- /**
45
- * @default - false
46
- * If true, would validate for duplicate keys and if present would show error tooltip on the cell.
47
- */
48
- validateDuplicateKeys?: boolean;
49
- /**
50
- * @default - false
51
- * If true, would validate for rows having values but no key and if error would show error tooltip on the cell.
52
- */
53
- validateEmptyKeys?: boolean;
54
- } | {
55
- /**
56
- * Indicates whether to show errors.
57
- */
58
- showError?: false;
59
- validateDuplicateKeys?: never;
60
- validateEmptyKeys?: never;
61
- };
62
39
  /**
63
40
  * Type representing a mask for key-value pairs.
64
41
  * @template K - A string representing the key type.
@@ -73,7 +50,7 @@ export type KeyValuePlaceholder<K extends string> = {
73
50
  * Interface representing the properties for a key-value table component.
74
51
  * @template K - A string representing the key type.
75
52
  */
76
- export type KeyValueTableProps<K extends string> = {
53
+ export interface KeyValueTableProps<K extends string> {
77
54
  /** The configuration for the key-value table. */
78
55
  config: KeyValueConfig<K>;
79
56
  /** An optional mask for the key-value pairs. */
@@ -99,15 +76,18 @@ export type KeyValueTableProps<K extends string> = {
99
76
  * @param deletedRowIndex - The index of the row that was deleted.
100
77
  */
101
78
  onDelete?: (deletedRowId: string | number) => void;
79
+ /**
80
+ * Indicates whether to show errors.
81
+ */
82
+ showError?: boolean;
102
83
  /**
103
84
  * The function to use to validate the value of the cell.
104
85
  * @param value - The value to validate.
105
86
  * @param key - The row key of the value.
106
- * @param rowId - The id of the row.
107
87
  * @returns Return true if the value is valid, otherwise false
108
88
  * and set `showError` to `true` and provide errorMessages array to show error message.
109
89
  */
110
- validationSchema?: (value: string, key: K, rowId: string | number) => boolean;
90
+ validationSchema?: (value: string, key: K) => boolean;
111
91
  /**
112
92
  * An array of error messages to be displayed in the cell error tooltip.
113
93
  */
@@ -117,5 +97,4 @@ export type KeyValueTableProps<K extends string> = {
117
97
  * @param errorState - The error state, true when any cell has error, otherwise false.
118
98
  */
119
99
  onError?: (errorState: boolean) => void;
120
- } & ErrorUIProps;
121
- export {};
100
+ }
@@ -1,6 +1,3 @@
1
- import { OptionType } from '../Common/Types';
2
- import { CDMaterialSidebarType } from './types';
3
-
4
1
  export declare const ARTIFACT_STATUS: {
5
2
  PROGRESSING: string;
6
3
  DEGRADED: string;
@@ -403,4 +400,3 @@ export declare enum SelectAllGroupedResourceIdentifiers {
403
400
  allExistingAndFutureProdEnvironments = "-2",
404
401
  allExistingAndFutureEnvironments = "-3"
405
402
  }
406
- export declare const CD_MATERIAL_SIDEBAR_TABS: OptionType<CDMaterialSidebarType, CDMaterialSidebarType>[];
@@ -1,5 +1,4 @@
1
1
  import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
2
- import { KeyValueListType } from './Components';
3
2
  import { EnvironmentTypeEnum, PatchOperationType } from './constants';
4
3
 
5
4
  export declare enum EnvType {
@@ -288,10 +287,6 @@ export declare enum CIMaterialSidebarType {
288
287
  CODE_SOURCE = "Code Source",
289
288
  PARAMETERS = "Parameters"
290
289
  }
291
- export declare enum CDMaterialSidebarType {
292
- IMAGE = "Image",
293
- PARAMETERS = "Parameters"
294
- }
295
290
  /**
296
291
  * @example Usage with specific enum for path & `unknown` type for value
297
292
  * ```ts
@@ -571,11 +566,4 @@ export type BaseFilterQueryParams<T> = {
571
566
  */
572
567
  showAll?: boolean;
573
568
  } & SortingParams<T>;
574
- export interface RuntimeParamsListItemType extends KeyValueListType {
575
- id: number;
576
- }
577
- export declare enum RuntimeParamsHeadingType {
578
- KEY = "key",
579
- VALUE = "value"
580
- }
581
569
  export {};