@devtron-labs/devtron-fe-common-lib 0.2.24-beta-7 → 0.2.25

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 (33) hide show
  1. package/dist/Common/Common.service.d.ts +2 -0
  2. package/dist/Common/Types.d.ts +3 -2
  3. package/dist/Shared/Components/ButtonWithLoader/ButtonWithLoader.d.ts +2 -5
  4. package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
  5. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +28 -7
  6. package/dist/Shared/Components/KeyValueTable/constants.d.ts +2 -0
  7. package/dist/Shared/Components/index.d.ts +0 -1
  8. package/dist/Shared/constants.d.ts +4 -3
  9. package/dist/Shared/types.d.ts +12 -0
  10. package/dist/assets/index.css +1 -1
  11. package/dist/{cssMode-BIBmbSAf.js → cssMode-DNbCyQWZ.js} +1 -1
  12. package/dist/{freemarker2-CIIP-rNU.js → freemarker2-B8sanpqP.js} +1 -1
  13. package/dist/{handlebars-iPrER-LT.js → handlebars-D1lGquqx.js} +1 -1
  14. package/dist/{html-1KDtGWDx.js → html-o2Q5p67r.js} +1 -1
  15. package/dist/{htmlMode-acMWFCGr.js → htmlMode-C8QyZwL0.js} +1 -1
  16. package/dist/{index-DjfkADnL.js → index-B52ByxKw.js} +25850 -25880
  17. package/dist/index.js +415 -414
  18. package/dist/{javascript-DplIQc2W.js → javascript-BiZyQ5F7.js} +1 -1
  19. package/dist/{jsonMode-Bc0MEFn6.js → jsonMode-CknHybGm.js} +1 -1
  20. package/dist/{liquid-hE9z6Dzg.js → liquid-Cy0Mpavp.js} +1 -1
  21. package/dist/{mdx-DYW-46FN.js → mdx-BHgZRX2R.js} +1 -1
  22. package/dist/{python-D9mJvFi1.js → python-0epO5D9-.js} +1 -1
  23. package/dist/{razor-CpsfL63A.js → razor-D05lWlLD.js} +1 -1
  24. package/dist/{tsMode-1C4PhGZh.js → tsMode-CCbQVu0G.js} +1 -1
  25. package/dist/{typescript--iT16U3V.js → typescript-DYDvsCgH.js} +1 -1
  26. package/dist/{xml-DKIsXASY.js → xml-DjdTF2VL.js} +1 -1
  27. package/dist/{yaml-BSfo2zrR.js → yaml-B9plDIBh.js} +1 -1
  28. package/package.json +1 -1
  29. package/dist/Shared/Components/Button/Button.component.d.ts +0 -53
  30. package/dist/Shared/Components/Button/constants.d.ts +0 -5
  31. package/dist/Shared/Components/Button/index.d.ts +0 -2
  32. package/dist/Shared/Components/Button/types.d.ts +0 -65
  33. package/dist/Shared/Components/Button/utils.d.ts +0 -2
@@ -1,3 +1,4 @@
1
+ import { RuntimeParamsAPIResponseType, RuntimeParamsListItemType } from '../Shared/types';
1
2
  import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse } from './Types';
2
3
  import { ApiResourceType } from '../Pages';
3
4
  export declare const getTeamListMin: () => Promise<TeamList>;
@@ -14,6 +15,7 @@ export declare const SourceTypeMap: {
14
15
  };
15
16
  export declare function getUserRole(appName?: string): Promise<UserRole>;
16
17
  export declare function setImageTags(request: any, pipelineId: number, artifactId: number): Promise<ResponseType<any>>;
18
+ export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => RuntimeParamsListItemType[];
17
19
  export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
18
20
  export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
19
21
  export declare function extractImage(image: string): string;
@@ -1,9 +1,9 @@
1
1
  import { default as React, ReactNode, CSSProperties } from 'react';
2
2
  import { Placement } from 'tippy.js';
3
+ import { UserGroupDTO } from '../Pages/GlobalConfigurations';
3
4
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
4
5
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
5
- import { UserGroupDTO } from '../Pages/GlobalConfigurations';
6
- import { RegistryType, Severity } from '../Shared';
6
+ import { RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
7
7
  /**
8
8
  * Generic response type object with support for overriding the result type
9
9
  *
@@ -596,6 +596,7 @@ export interface CDMaterialsMetaInfo {
596
596
  * This is the ID of user that has request the material
597
597
  */
598
598
  requestedUserId: number;
599
+ runtimeParams: RuntimeParamsListItemType[];
599
600
  }
600
601
  export interface ImagePromotionMaterialInfo {
601
602
  isApprovalPendingForPromotion: boolean;
@@ -1,5 +1,5 @@
1
1
  import { default as React, Component } from 'react';
2
- export interface ButtonWithLoaderProps {
2
+ export interface ButtonProps {
3
3
  disabled?: boolean;
4
4
  rootClassName: string;
5
5
  isLoading: boolean;
@@ -8,10 +8,7 @@ export interface ButtonWithLoaderProps {
8
8
  children?: React.ReactNode;
9
9
  type?: 'submit' | 'reset' | 'button';
10
10
  }
11
- /**
12
- * @deprecated use Button instead
13
- */
14
- export declare class ButtonWithLoader extends Component<ButtonWithLoaderProps> {
11
+ export declare class ButtonWithLoader extends Component<ButtonProps> {
15
12
  constructor(props: any);
16
13
  clickHandler(event: any): void;
17
14
  render(): JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { KeyValueTableProps } from './KeyValueTable.types';
2
- export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, readOnly, showError, validationSchema, errorMessages, onError, }: KeyValueTableProps<K>) => JSX.Element;
2
+ 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;
@@ -35,6 +35,29 @@ export interface KeyValueConfig<K extends string> {
35
35
  /** An array of key-value rows. */
36
36
  rows: KeyValueRow<K>[];
37
37
  }
38
+ type ErrorUIProps = {
39
+ /**
40
+ * Indicates whether to show errors.
41
+ */
42
+ showError: true;
43
+ /**
44
+ * @default - false
45
+ * If true, would validate for duplicate keys and if present would show error tooltip on the cell.
46
+ */
47
+ validateDuplicateKeys?: boolean;
48
+ /**
49
+ * @default - false
50
+ * If true, would validate for rows having values but no key and if error would show error tooltip on the cell.
51
+ */
52
+ validateEmptyKeys?: boolean;
53
+ } | {
54
+ /**
55
+ * Indicates whether to show errors.
56
+ */
57
+ showError?: false;
58
+ validateDuplicateKeys?: never;
59
+ validateEmptyKeys?: never;
60
+ };
38
61
  /**
39
62
  * Type representing a mask for key-value pairs.
40
63
  * @template K - A string representing the key type.
@@ -49,7 +72,7 @@ export type KeyValuePlaceholder<K extends string> = {
49
72
  * Interface representing the properties for a key-value table component.
50
73
  * @template K - A string representing the key type.
51
74
  */
52
- export interface KeyValueTableProps<K extends string> {
75
+ export type KeyValueTableProps<K extends string> = {
53
76
  /** The configuration for the key-value table. */
54
77
  config: KeyValueConfig<K>;
55
78
  /** An optional mask for the key-value pairs. */
@@ -75,18 +98,15 @@ export interface KeyValueTableProps<K extends string> {
75
98
  * @param deletedRowIndex - The index of the row that was deleted.
76
99
  */
77
100
  onDelete?: (deletedRowId: string | number) => void;
78
- /**
79
- * Indicates whether to show errors.
80
- */
81
- showError?: boolean;
82
101
  /**
83
102
  * The function to use to validate the value of the cell.
84
103
  * @param value - The value to validate.
85
104
  * @param key - The row key of the value.
105
+ * @param rowId - The id of the row.
86
106
  * @returns Return true if the value is valid, otherwise false
87
107
  * and set `showError` to `true` and provide errorMessages array to show error message.
88
108
  */
89
- validationSchema?: (value: string, key: K) => boolean;
109
+ validationSchema?: (value: string, key: K, rowId: string | number) => boolean;
90
110
  /**
91
111
  * An array of error messages to be displayed in the cell error tooltip.
92
112
  */
@@ -96,4 +116,5 @@ export interface KeyValueTableProps<K extends string> {
96
116
  * @param errorState - The error state, true when any cell has error, otherwise false.
97
117
  */
98
118
  onError?: (errorState: boolean) => void;
99
- }
119
+ } & ErrorUIProps;
120
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const DUPLICATE_KEYS_VALIDATION_MESSAGE = "Keys must be unique";
2
+ export declare const EMPTY_KEY_VALIDATION_MESSAGE = "Key cannot be empty";
@@ -39,4 +39,3 @@ export * from './DetectBottom';
39
39
  export * from './EditImageFormField';
40
40
  export * from './Collapse';
41
41
  export * from './FilterButton';
42
- export * from './Button';
@@ -1,3 +1,5 @@
1
+ import { OptionType } from '../Common/Types';
2
+ import { CDMaterialSidebarType } from './types';
1
3
  export declare const ARTIFACT_STATUS: {
2
4
  PROGRESSING: string;
3
5
  DEGRADED: string;
@@ -387,11 +389,9 @@ export declare const ANSI_UP_REGEX: RegExp;
387
389
  * Size variants for components
388
390
  */
389
391
  export declare enum ComponentSizeType {
390
- xs = "xs",
391
392
  small = "small",
392
393
  medium = "medium",
393
- large = "large",
394
- xl = "xl"
394
+ large = "large"
395
395
  }
396
396
  export declare const POP_UP_MENU_MODAL_ID = "popup";
397
397
  /**
@@ -403,4 +403,5 @@ export declare enum SelectAllGroupedResourceIdentifiers {
403
403
  allExistingAndFutureProdEnvironments = "-2",
404
404
  allExistingAndFutureEnvironments = "-3"
405
405
  }
406
+ export declare const CD_MATERIAL_SIDEBAR_TABS: OptionType<CDMaterialSidebarType, CDMaterialSidebarType>[];
406
407
  export declare const TRIGGER_STATUS_PROGRESSING: string[];
@@ -1,4 +1,5 @@
1
1
  import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
2
+ import { KeyValueListType } from './Components';
2
3
  import { EnvironmentTypeEnum, PatchOperationType } from './constants';
3
4
  export declare enum EnvType {
4
5
  CHART = "helm_charts",
@@ -286,6 +287,10 @@ export declare enum CIMaterialSidebarType {
286
287
  CODE_SOURCE = "Code Source",
287
288
  PARAMETERS = "Parameters"
288
289
  }
290
+ export declare enum CDMaterialSidebarType {
291
+ IMAGE = "Image",
292
+ PARAMETERS = "Parameters"
293
+ }
289
294
  /**
290
295
  * @example Usage with specific enum for path & `unknown` type for value
291
296
  * ```ts
@@ -565,4 +570,11 @@ export type BaseFilterQueryParams<T> = {
565
570
  */
566
571
  showAll?: boolean;
567
572
  } & SortingParams<T>;
573
+ export interface RuntimeParamsListItemType extends KeyValueListType {
574
+ id: number;
575
+ }
576
+ export declare enum RuntimeParamsHeadingType {
577
+ KEY = "key",
578
+ VALUE = "value"
579
+ }
568
580
  export {};