@devtron-labs/devtron-fe-common-lib 1.2.4-beta-11 → 1.2.4-beta-12

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 (39) hide show
  1. package/dist/{@code-editor-Chu1vTHn.js → @code-editor-CQmGGn4U.js} +4699 -4660
  2. package/dist/{@common-rjsf-BfhqMfwN.js → @common-rjsf-D7fgYUGe.js} +1 -1
  3. package/dist/Common/CIPipeline.Types.d.ts +1 -26
  4. package/dist/Common/Constants.d.ts +1 -1
  5. package/dist/Common/CustomTagSelector/ResizableTagTextArea.d.ts +1 -1
  6. package/dist/Common/CustomTagSelector/Types.d.ts +14 -2
  7. package/dist/Common/Helper.d.ts +2 -1
  8. package/dist/Common/PopupMenu.d.ts +1 -1
  9. package/dist/Common/RJSF/Form.d.ts +1 -1
  10. package/dist/Common/Types.d.ts +20 -3
  11. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/index.d.ts +0 -1
  12. package/dist/Pages/Applications/DevtronApps/Details/index.d.ts +0 -1
  13. package/dist/Shared/Components/DynamicDataTable/DynamicDataTable.d.ts +1 -1
  14. package/dist/Shared/Components/DynamicDataTable/DynamicDataTableHeader.d.ts +1 -1
  15. package/dist/Shared/Components/DynamicDataTable/DynamicDataTableRow.d.ts +1 -1
  16. package/dist/Shared/Components/DynamicDataTable/types.d.ts +30 -26
  17. package/dist/Shared/Components/DynamicDataTable/utils.d.ts +3 -3
  18. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +1 -1
  19. package/dist/Shared/Components/SelectPicker/type.d.ts +5 -4
  20. package/dist/Shared/Components/SelectTextArea/SelectTextArea.d.ts +1 -1
  21. package/dist/Shared/Components/SelectTextArea/types.d.ts +1 -1
  22. package/dist/Shared/Components/TagsKeyValueTable/TagsContainer.d.ts +3 -0
  23. package/dist/Shared/Components/TagsKeyValueTable/constants.d.ts +4 -0
  24. package/dist/Shared/Components/TagsKeyValueTable/index.d.ts +3 -0
  25. package/dist/Shared/Components/TagsKeyValueTable/types.d.ts +9 -0
  26. package/dist/Shared/Components/TagsKeyValueTable/utils.d.ts +3 -0
  27. package/dist/Shared/Components/index.d.ts +1 -1
  28. package/dist/Shared/types.d.ts +19 -31
  29. package/dist/assets/@code-editor.css +1 -1
  30. package/dist/index.js +337 -336
  31. package/package.json +1 -1
  32. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/services.d.ts +0 -7
  33. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/index.d.ts +0 -1
  34. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/services.d.ts +0 -11
  35. package/dist/Shared/Components/DynamicDataTable/constants.d.ts +0 -2
  36. package/dist/Shared/Components/FileUpload/FileUpload.d.ts +0 -2
  37. package/dist/Shared/Components/FileUpload/index.d.ts +0 -2
  38. package/dist/Shared/Components/FileUpload/types.d.ts +0 -7
  39. package/dist/assets/ic-cloud-upload.18066e05.svg +0 -1
@@ -2,7 +2,7 @@ import { j as n, J as A } from "./@vendor-RU8AW1bK.js";
2
2
  import E, { forwardRef as $ } from "react";
3
3
  import L, { getDefaultRegistry as k } from "@rjsf/core";
4
4
  import D from "@rjsf/validator-ajv8";
5
- import { T as y, c as H, a as J, d as w } from "./@code-editor-Chu1vTHn.js";
5
+ import { T as y, c as H, a as J, d as w } from "./@code-editor-CQmGGn4U.js";
6
6
  import M, { components as O } from "react-select";
7
7
  import { getUiOptions as B, getTemplate as I, getSubmitButtonOptions as U, ADDITIONAL_PROPERTY_FLAG as P, errorId as W, englishStringTranslator as V, TranslatableString as q, titleId as K, canExpand as Y, deepEquals as z } from "@rjsf/utils";
8
8
  import { ReactComponent as G } from "./assets/ic-chevron-down.fc70d7a7.svg";
@@ -70,30 +70,11 @@ export declare enum RefVariableStageType {
70
70
  PRE_CI = "PRE_CI",
71
71
  POST_CI = "POST_CI"
72
72
  }
73
- export interface FilePropertyType {
74
- allowedExtensions: string[];
75
- maxUploadSize: number;
76
- }
77
- export interface ConstraintType {
78
- fileProperty: FilePropertyType;
79
- }
80
- export interface ValueConstraintType {
81
- choices?: string[];
82
- blockCustomValue?: boolean;
83
- constraint?: ConstraintType;
84
- }
85
- export declare enum VariableTypeFormat {
86
- STRING = "STRING",
87
- NUMBER = "NUMBER",
88
- BOOL = "BOOL",
89
- DATE = "DATE",
90
- FILE = "FILE"
91
- }
92
73
  export interface VariableType {
93
74
  id: number;
94
75
  name: string;
95
76
  value: string;
96
- format: VariableTypeFormat;
77
+ format: string;
97
78
  description: string;
98
79
  defaultValue: string;
99
80
  allowEmptyValue: boolean;
@@ -102,12 +83,6 @@ export interface VariableType {
102
83
  refVariableName: string;
103
84
  refVariableStage?: RefVariableStageType;
104
85
  variableStepIndexInPlugin?: number;
105
- fileMountDir: string;
106
- fileReferenceId?: number;
107
- valueConstraintId?: number;
108
- valueConstraint?: ValueConstraintType;
109
- isRuntimeArg: boolean;
110
- refVariableUsed: boolean;
111
86
  }
112
87
  interface CommandArgsMap {
113
88
  command: string;
@@ -12,6 +12,7 @@ export declare const DOCUMENTATION: {
12
12
  GLOBAL_CONFIG_BUILD_INFRA: string;
13
13
  };
14
14
  export declare const PATTERNS: {
15
+ STRING: RegExp;
15
16
  KUBERNETES_KEY_PREFIX: RegExp;
16
17
  KUBERNETES_KEY_NAME: RegExp;
17
18
  START_END_ALPHANUMERIC: RegExp;
@@ -94,7 +95,6 @@ export declare const ROUTES: {
94
95
  USER_LIST_MIN: string;
95
96
  CONFIG_DATA: string;
96
97
  K8S_RESOURCE_LIST: string;
97
- FILE_UPLOAD: string;
98
98
  };
99
99
  export declare enum KEY_VALUE {
100
100
  KEY = "key",
@@ -1,2 +1,2 @@
1
1
  import { ResizableTagTextAreaProps } from './Types';
2
- export declare const ResizableTagTextArea: ({ value, minHeight, maxHeight, onBlur, onFocus, refVar, dependentRef, dependentRefs, className, disableOnBlurResizeToMinHeight, id, ...restProps }: ResizableTagTextAreaProps) => JSX.Element;
2
+ export declare const ResizableTagTextArea: ({ value, minHeight, maxHeight, dataTestId, onBlur, onFocus, refVar, dependentRef, className, disableOnBlurResizeToMinHeight, ...resProps }: ResizableTagTextAreaProps) => JSX.Element;
@@ -5,6 +5,16 @@ export interface SuggestedTagOptionType extends OptionType {
5
5
  description: string;
6
6
  propagate: boolean;
7
7
  }
8
+ export declare enum DeploymentPolicy {
9
+ ALLOW = "allow",
10
+ BLOCK = "block",
11
+ BLOCK_PROD = "block-prod",
12
+ BLOCK_NON_PROD = "block-non-prod"
13
+ }
14
+ export interface VariableValueConstraintTypes {
15
+ choices?: string[];
16
+ blockCustomValue?: boolean;
17
+ }
8
18
  export interface TagType {
9
19
  id?: number;
10
20
  key: string;
@@ -16,6 +26,8 @@ export interface TagType {
16
26
  isInvalidValue?: boolean;
17
27
  isSuggested?: boolean;
18
28
  isPropagateDisabled?: boolean;
29
+ deploymentPolicy?: DeploymentPolicy;
30
+ valueConstraint?: VariableValueConstraintTypes;
19
31
  }
20
32
  export interface TagErrorType {
21
33
  isValid: boolean;
@@ -58,7 +70,7 @@ export interface ResizableTagTextAreaProps extends Omit<DetailedHTMLProps<Textar
58
70
  maxHeight?: number;
59
71
  value: string;
60
72
  refVar?: MutableRefObject<HTMLTextAreaElement>;
61
- dependentRef?: MutableRefObject<HTMLTextAreaElement>;
62
- dependentRefs?: Record<string | number, MutableRefObject<HTMLTextAreaElement>>;
73
+ dependentRef?: MutableRefObject<HTMLTextAreaElement> | Record<string | number, MutableRefObject<HTMLTextAreaElement>>;
74
+ dataTestId?: string;
63
75
  disableOnBlurResizeToMinHeight?: boolean;
64
76
  }
@@ -1,6 +1,6 @@
1
1
  import { default as React, SyntheticEvent } from 'react';
2
2
  import { JSONPathOptions } from 'jsonpath-plus';
3
- import { AsyncOptions, UseSearchString } from './Types';
3
+ import { AsyncOptions, DeploymentNodeType, UseSearchString } from './Types';
4
4
  import { scrollableInterface } from '../Shared';
5
5
  export declare function showError(serverError: any, showToastOnUnknownError?: boolean, hideAccessError?: boolean): void;
6
6
  interface ConditionalWrapper<T> {
@@ -133,4 +133,5 @@ export declare const getSanitizedIframe: (iframeString: string) => string;
133
133
  * This method adds default attributes to iframe - title, loading ="lazy", width="100%", height="100%"
134
134
  */
135
135
  export declare const getIframeWithDefaultAttributes: (iframeString: string, defaultName?: string) => string;
136
+ export declare const getStageTitle: (stageType: DeploymentNodeType) => string;
136
137
  export {};
@@ -1,6 +1,6 @@
1
1
  import { PopupMenuBodyType, PopupMenuButtonType, PopupMenuType } from './Types';
2
2
  declare const PopupMenu: {
3
- ({ children, onToggleCallback, autoClose, autoPosition, shouldPreventDefault, disableClose, }: PopupMenuType): any;
3
+ ({ children, onToggleCallback, autoClose, autoPosition, shouldPreventDefault, }: PopupMenuType): any;
4
4
  Button: ({ children, disabled, rootClassName, tabIndex, onHover, isKebab, dataTestId, }: PopupMenuButtonType) => JSX.Element;
5
5
  Body: ({ children, rootClassName, style, autoWidth, preventWheelDisable, noBackDrop, }: PopupMenuBodyType) => JSX.Element;
6
6
  };
@@ -1,3 +1,3 @@
1
1
  import { default as RJSF } from '@rjsf/core';
2
2
  import { FormProps } from './types';
3
- export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "id" | "children" | "className" | "disabled" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "target" | "action" | "tagName" | "autoComplete" | "method" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
3
+ export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "children" | "className" | "disabled" | "id" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "target" | "action" | "tagName" | "autoComplete" | "method" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
@@ -3,7 +3,7 @@ import { TippyProps } from '@tippyjs/react';
3
3
  import { Placement } from 'tippy.js';
4
4
  import { UserGroupDTO } from '../Pages/GlobalConfigurations';
5
5
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
6
- import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity } from '../Shared';
6
+ import { MandatoryPluginBaseStateType, PolicyBlockInfo, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
7
7
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
8
8
  /**
9
9
  * Generic response type object with support for overriding the result type
@@ -230,7 +230,6 @@ export interface PopupMenuType {
230
230
  autoClose?: boolean;
231
231
  autoPosition?: boolean;
232
232
  shouldPreventDefault?: boolean;
233
- disableClose?: boolean;
234
233
  }
235
234
  export interface PopupMenuButtonType {
236
235
  children?: ReactNode;
@@ -433,6 +432,10 @@ export interface CDMaterialType {
433
432
  * Would currently only be received in case of release
434
433
  */
435
434
  appWorkflowId: number;
435
+ /**
436
+ * Denotes trigger blocking due to mandatory tags, (might be used for plugins and other features in future)
437
+ */
438
+ deploymentBlockedState?: PolicyBlockInfo;
436
439
  }
437
440
  export declare enum CDMaterialServiceEnum {
438
441
  ROLLBACK = "rollback",
@@ -469,6 +472,14 @@ export interface DownstreamNodesEnvironmentsType {
469
472
  environmentId: number;
470
473
  environmentName: string;
471
474
  }
475
+ export declare enum TriggerBlockType {
476
+ MANDATORY_TAG = "mandatory-tags",
477
+ MANDATORY_PLUGIN = "mandatory-plugins"
478
+ }
479
+ export interface TriggerBlockedInfo {
480
+ blockedBy: TriggerBlockType;
481
+ blockedReason?: string;
482
+ }
472
483
  export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTriggerBlocked' | 'pluginBlockState'> {
473
484
  connectingCiPipelineId?: number;
474
485
  parents: string | number[] | string[];
@@ -531,6 +542,7 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
531
542
  downstreamEnvironments?: DownstreamNodesEnvironmentsType[];
532
543
  cipipelineId?: number;
533
544
  isDeploymentBlocked?: boolean;
545
+ triggerBlockedInfo?: TriggerBlockedInfo;
534
546
  }
535
547
  export declare enum DeploymentAppTypes {
536
548
  HELM = "helm",
@@ -593,7 +605,8 @@ export interface CDMaterialsMetaInfo {
593
605
  * This is the ID of user that has request the material
594
606
  */
595
607
  requestedUserId: number;
596
- runtimeParams: RuntimePluginVariables[];
608
+ runtimeParams: RuntimeParamsListItemType[];
609
+ deploymentBlockedState?: PolicyBlockInfo;
597
610
  }
598
611
  export interface ImagePromotionMaterialInfo {
599
612
  isApprovalPendingForPromotion: boolean;
@@ -676,6 +689,7 @@ export interface CDStage {
676
689
  name: string;
677
690
  triggerType: 'AUTOMATIC' | 'MANUAL';
678
691
  config: string;
692
+ triggerBlockedInfo?: TriggerBlockedInfo;
679
693
  }
680
694
  export interface CDStageConfigMapSecretNames {
681
695
  configMaps: any[];
@@ -687,6 +701,7 @@ export interface PrePostDeployStageType extends MandatoryPluginBaseStateType {
687
701
  triggerType: string;
688
702
  name: string;
689
703
  status: string;
704
+ triggerBlockedInfo?: TriggerBlockedInfo;
690
705
  }
691
706
  export interface CdPipeline {
692
707
  id: number;
@@ -720,6 +735,8 @@ export interface CdPipeline {
720
735
  isProdEnv?: boolean;
721
736
  isGitOpsRepoNotConfigured?: boolean;
722
737
  isDeploymentBlocked?: boolean;
738
+ isTriggerBlocked?: boolean;
739
+ triggerBlockedInfo?: TriggerBlockedInfo;
723
740
  }
724
741
  export interface ExternalCiConfig {
725
742
  id: number;
@@ -1,2 +1 @@
1
1
  export * from './types';
2
- export * from './services';
@@ -1,3 +1,2 @@
1
1
  export * from './AppConfigurations';
2
2
  export * from './CDPipeline';
3
- export * from './CIPipeline';
@@ -1,2 +1,2 @@
1
1
  import { DynamicDataTableProps } from './types';
2
- export declare const DynamicDataTable: <K extends string, CustomStateType = Record<string, unknown>>({ headers, ...props }: DynamicDataTableProps<K, CustomStateType>) => JSX.Element;
2
+ export declare const DynamicDataTable: <K extends string>({ headers, ...props }: DynamicDataTableProps<K>) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { DynamicDataTableHeaderProps } from './types';
2
- export declare const DynamicDataTableHeader: <K extends string, CustomStateType = Record<string, unknown>>({ headers, rows, sortingConfig, onRowAdd, readOnly, isAdditionNotAllowed, isDeletionNotAllowed, headerComponent, actionButtonConfig, }: DynamicDataTableHeaderProps<K, CustomStateType>) => JSX.Element;
2
+ export declare const DynamicDataTableHeader: <K extends string>({ headers, rows, sortingConfig, onRowAdd, readOnly, isAdditionNotAllowed, isDeletionNotAllowed, headerComponent, actionButtonConfig, }: DynamicDataTableHeaderProps<K>) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { DynamicDataTableRowProps } from './types';
2
- export declare const DynamicDataTableRow: <K extends string, CustomStateType = Record<string, unknown>>({ rows, headers, readOnly, isDeletionNotAllowed, validationSchema, showError, actionButtonConfig, onRowEdit, onRowDelete, leadingCellIcon, trailingCellIcon, buttonCellWrapComponent, }: DynamicDataTableRowProps<K, CustomStateType>) => JSX.Element;
2
+ export declare const DynamicDataTableRow: <K extends string>({ rows, headers, maskValue, readOnly, isAdditionNotAllowed, isDeletionNotAllowed, validationSchema, showError, actionButtonConfig, onRowEdit, onRowDelete, leadingCellIcon, trailingCellIcon, buttonCellWrapComponent, }: DynamicDataTableRowProps<K>) => JSX.Element;
@@ -1,9 +1,9 @@
1
1
  import { DetailedHTMLProps, ReactElement, ReactNode } from 'react';
2
+ import { SortingOrder } from '../../../Common/Constants';
2
3
  import { ResizableTagTextAreaProps } from '../../../Common/CustomTagSelector';
3
- import { UseStateFiltersReturnType } from '../../../Common/Hooks';
4
+ import { InfoIconTippyProps } from '../../../Common/Types';
4
5
  import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
5
6
  import { SelectTextAreaProps } from '../SelectTextArea';
6
- import { FileUploadProps } from '../FileUpload';
7
7
  /**
8
8
  * Interface representing header for a dynamic data table.
9
9
  * @template K - A string representing the key type.
@@ -19,16 +19,17 @@ export type DynamicDataTableHeaderType<K extends string> = {
19
19
  isSortable?: boolean;
20
20
  /** An optional boolean to control the visibility of the column. */
21
21
  isHidden?: boolean;
22
+ /** An optional boolean to show the column */
23
+ renderHelpTextForHeader?: () => ReactNode;
22
24
  };
23
25
  export declare enum DynamicDataTableRowDataType {
24
26
  TEXT = "text",
25
27
  DROPDOWN = "dropdown",
26
28
  SELECT_TEXT = "select-text",
27
- BUTTON = "button",
28
- FILE_UPLOAD = "file-upload"
29
+ BUTTON = "button"
29
30
  }
30
31
  export type DynamicDataTableCellPropsMap = {
31
- [DynamicDataTableRowDataType.TEXT]: Omit<ResizableTagTextAreaProps, 'id' | 'className' | 'minHeight' | 'maxHeight' | 'value' | 'onChange' | 'disabled' | 'disableOnBlurResizeToMinHeight' | 'refVar' | 'dependentRef'>;
32
+ [DynamicDataTableRowDataType.TEXT]: Omit<ResizableTagTextAreaProps, 'className' | 'minHeight' | 'maxHeight' | 'value' | 'onChange' | 'disabled' | 'disableOnBlurResizeToMinHeight' | 'refVar' | 'dependentRef'>;
32
33
  [DynamicDataTableRowDataType.DROPDOWN]: Omit<SelectPickerProps<string, false>, 'inputId' | 'value' | 'onChange' | 'fullWidth' | 'isDisabled'>;
33
34
  [DynamicDataTableRowDataType.SELECT_TEXT]: Omit<SelectTextAreaProps, 'value' | 'onChange' | 'inputId' | 'isDisabled' | 'dependentRef' | 'refVar' | 'textAreaProps'> & {
34
35
  textAreaProps?: Omit<SelectTextAreaProps['textAreaProps'], 'className' | 'disableOnBlurResizeToMinHeight' | 'minHeight' | 'maxHeight'>;
@@ -37,7 +38,6 @@ export type DynamicDataTableCellPropsMap = {
37
38
  icon?: ReactNode;
38
39
  text: string;
39
40
  };
40
- [DynamicDataTableRowDataType.FILE_UPLOAD]: Omit<FileUploadProps, 'className' | 'fileName' | 'onUpload' | 'multiple'>;
41
41
  };
42
42
  type DynamicDataTableCellData<T extends keyof DynamicDataTableCellPropsMap = keyof DynamicDataTableCellPropsMap> = T extends keyof DynamicDataTableCellPropsMap ? {
43
43
  type: T;
@@ -54,24 +54,23 @@ export type DynamicDataTableRowType<K extends string, CustomStateType = Record<s
54
54
  disabled?: boolean;
55
55
  /** An optional boolean indicating if an asterisk should be shown. */
56
56
  required?: boolean;
57
- /** An optional tooltip text to show when hovering over cell. */
58
- tooltipText?: string;
59
57
  } & DynamicDataTableCellData;
60
58
  };
61
59
  id: string | number;
62
60
  /** */
63
61
  customState?: CustomStateType;
64
- /** An optional boolean indicating if row deletion is disabled. */
65
- disableDelete?: boolean;
66
62
  };
67
- type DynamicDataTableCellIcon<K extends string, CustomStateType = Record<string, unknown>> = {
68
- [key in K]?: (row: DynamicDataTableRowType<K, CustomStateType>) => ReactNode;
63
+ type DynamicDataTableMask<K extends string> = {
64
+ [key in K]?: boolean;
65
+ };
66
+ type DynamicDataTableCellIcon<K extends string> = {
67
+ [key in K]?: (row: DynamicDataTableRowType<K>) => ReactNode;
69
68
  };
70
69
  /**
71
70
  * Interface representing the properties for the dynamic data table component.
72
71
  * @template K - A string representing the key type.
73
72
  */
74
- export type DynamicDataTableProps<K extends string, CustomStateType = Record<string, unknown>> = {
73
+ export type DynamicDataTableProps<K extends string> = {
75
74
  /**
76
75
  * An array containing the headers for the data table. \
77
76
  * Each header defines a column with its label, key, width, and optional settings.
@@ -80,15 +79,21 @@ export type DynamicDataTableProps<K extends string, CustomStateType = Record<str
80
79
  /**
81
80
  * An array of rows where each row contains data corresponding to the table headers.
82
81
  */
83
- rows: DynamicDataTableRowType<K, CustomStateType>[];
82
+ rows: DynamicDataTableRowType<K>[];
84
83
  /** Optional configuration for sorting the table. */
85
- sortingConfig?: Pick<UseStateFiltersReturnType<K>, 'sortBy' | 'sortOrder' | 'handleSorting'>;
84
+ sortingConfig?: {
85
+ sortBy: K;
86
+ sortOrder: SortingOrder;
87
+ handleSorting: () => void;
88
+ };
89
+ /** An optional mask to hide the values of the cell. */
90
+ maskValue?: DynamicDataTableMask<K>;
86
91
  /** Optional configuration for displaying an icon in the leading position of a cell. */
87
- leadingCellIcon?: DynamicDataTableCellIcon<K, CustomStateType>;
92
+ leadingCellIcon?: DynamicDataTableCellIcon<K>;
88
93
  /** Optional configuration for displaying an icon in the trailing position of a cell. */
89
- trailingCellIcon?: DynamicDataTableCellIcon<K, CustomStateType>;
94
+ trailingCellIcon?: DynamicDataTableCellIcon<K>;
90
95
  /** An optional function to render a custom wrapper component for the type `DynamicDataTableRowDataType.BUTTON`. */
91
- buttonCellWrapComponent?: (row: DynamicDataTableRowType<K, CustomStateType>) => ReactElement;
96
+ buttonCellWrapComponent?: (row: DynamicDataTableRowType<K>) => ReactElement;
92
97
  /** An optional React node for a custom header component. */
93
98
  headerComponent?: ReactNode;
94
99
  /** When true, data addition field will not be shown. */
@@ -106,15 +111,14 @@ export type DynamicDataTableProps<K extends string, CustomStateType = Record<str
106
111
  * @param value - The value of the cell.
107
112
  * @param extraData - Additional data, such as a selected value for dropdowns.
108
113
  */
109
- onRowEdit: (row: DynamicDataTableRowType<K, CustomStateType>, headerKey: K, value: string, extraData: {
110
- files?: File[];
114
+ onRowEdit: (row: DynamicDataTableRowType<K>, headerKey: K, value: string, extraData: {
111
115
  selectedValue?: SelectPickerOptionType<string>;
112
116
  }) => void;
113
117
  /**
114
118
  * Function to handle row deletions.
115
119
  * @param row - The row that was deleted.
116
120
  */
117
- onRowDelete: (row: DynamicDataTableRowType<K, CustomStateType>) => void;
121
+ onRowDelete: (row: DynamicDataTableRowType<K>) => void;
118
122
  /** Optional configuration for rendering a custom action button in a row. */
119
123
  actionButtonConfig?: {
120
124
  /**
@@ -122,14 +126,14 @@ export type DynamicDataTableProps<K extends string, CustomStateType = Record<str
122
126
  * @param row - The current row being rendered.
123
127
  * @returns A React node representing the action button.
124
128
  */
125
- renderer: (row: DynamicDataTableRowType<K, CustomStateType>) => ReactNode;
129
+ renderer: (row: DynamicDataTableRowType<K>) => ReactNode;
126
130
  /**
127
131
  * This represents under which header key the action button will be rendered.
128
132
  */
129
133
  key: K;
130
134
  /**
131
135
  * The width of the action button.
132
- * @default '33px'
136
+ * @default '32px'
133
137
  */
134
138
  width?: string;
135
139
  /**
@@ -149,13 +153,13 @@ export type DynamicDataTableProps<K extends string, CustomStateType = Record<str
149
153
  * @param row - The row containing the cell.
150
154
  * @returns An object with a boolean indicating validity and an array of error messages.
151
155
  */
152
- validationSchema?: (value: string, key: K, row: DynamicDataTableRowType<K, CustomStateType>) => {
156
+ validationSchema?: (value: string, key: K, row: DynamicDataTableRowType<K>) => {
153
157
  isValid: boolean;
154
158
  errorMessages: string[];
155
159
  };
156
160
  };
157
- export interface DynamicDataTableHeaderProps<K extends string, CustomStateType = Record<string, unknown>> extends Pick<DynamicDataTableProps<K, CustomStateType>, 'headers' | 'rows' | 'headerComponent' | 'sortingConfig' | 'onRowAdd' | 'readOnly' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'actionButtonConfig'> {
161
+ export interface DynamicDataTableHeaderProps<K extends string> extends Pick<DynamicDataTableProps<K>, 'headers' | 'rows' | 'headerComponent' | 'sortingConfig' | 'onRowAdd' | 'readOnly' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'actionButtonConfig'>, Pick<InfoIconTippyProps, 'heading' | 'additionalContent'> {
158
162
  }
159
- export interface DynamicDataTableRowProps<K extends string, CustomStateType = Record<string, unknown>> extends Pick<DynamicDataTableProps<K, CustomStateType>, 'rows' | 'headers' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'readOnly' | 'onRowEdit' | 'onRowDelete' | 'actionButtonConfig' | 'showError' | 'validationSchema' | 'leadingCellIcon' | 'trailingCellIcon' | 'buttonCellWrapComponent'> {
163
+ export interface DynamicDataTableRowProps<K extends string> extends Pick<DynamicDataTableProps<K>, 'rows' | 'headers' | 'maskValue' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'readOnly' | 'onRowEdit' | 'onRowDelete' | 'actionButtonConfig' | 'showError' | 'validationSchema' | 'leadingCellIcon' | 'trailingCellIcon' | 'buttonCellWrapComponent'> {
160
164
  }
161
165
  export {};
@@ -1,5 +1,5 @@
1
1
  import { DynamicDataTableHeaderType, DynamicDataTableProps, DynamicDataTableRowDataType } from './types';
2
- export declare const getActionButtonPosition: <K extends string, CustomStateType = Record<string, unknown>>({ headers, actionButtonConfig, }: Pick<DynamicDataTableProps<K, CustomStateType>, "headers" | "actionButtonConfig">) => number;
3
- export declare const getHeaderGridTemplateColumn: <K extends string, CustomStateType = Record<string, unknown>>(headers: DynamicDataTableHeaderType<K>[], actionButtonConfig: DynamicDataTableProps<K, CustomStateType>["actionButtonConfig"], noDeleteBtn: boolean) => string;
4
- export declare const getRowGridTemplateColumn: <K extends string, CustomStateType = Record<string, unknown>>(headers: DynamicDataTableHeaderType<K>[], actionButtonConfig: DynamicDataTableProps<K, CustomStateType>["actionButtonConfig"], noDeleteBtn: boolean) => string;
2
+ export declare const getActionButtonPosition: <K extends string>({ headers, actionButtonConfig, }: Pick<DynamicDataTableProps<K>, "headers" | "actionButtonConfig">) => number;
3
+ export declare const getHeaderGridTemplateColumn: <K extends string>(headers: DynamicDataTableHeaderType<K>[], actionButtonConfig: DynamicDataTableProps<K>["actionButtonConfig"], noDeleteBtn: boolean) => string;
4
+ export declare const getRowGridTemplateColumn: <K extends string>(headers: DynamicDataTableHeaderType<K>[], actionButtonConfig: DynamicDataTableProps<K>["actionButtonConfig"], noDeleteBtn: boolean) => string;
5
5
  export declare const rowTypeHasInputField: (type: DynamicDataTableRowDataType) => boolean;
@@ -18,7 +18,7 @@ export interface KeyValueHeader<K extends string> {
18
18
  */
19
19
  export type KeyValueRow<K extends string> = {
20
20
  data: {
21
- [key in K]: Pick<ResizableTagTextAreaProps, 'value' | 'disabled' | 'tabIndex'> & {
21
+ [key in K]: Pick<ResizableTagTextAreaProps, 'value' | 'dataTestId' | 'disabled' | 'tabIndex'> & {
22
22
  /** An optional boolean indicating if an asterisk should be shown. */
23
23
  required?: boolean;
24
24
  };
@@ -24,6 +24,10 @@ export interface SelectPickerOptionType<OptionValue = string | number> extends O
24
24
  tooltipProps?: Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'shortcutKeyCombo'> | (Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'content'> & Required<Pick<TooltipProps, 'shortcutKeyCombo'>>);
25
25
  }
26
26
  type SelectProps<OptionValue, IsMulti extends boolean> = ReactSelectProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>;
27
+ export declare enum SelectPickerVariantType {
28
+ DEFAULT = "default",
29
+ BORDER_LESS = "border-less"
30
+ }
27
31
  declare module 'react-select/base' {
28
32
  interface Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
29
33
  /**
@@ -55,12 +59,9 @@ declare module 'react-select/base' {
55
59
  * @default 'true'
56
60
  */
57
61
  showSelectedOptionIcon?: boolean;
62
+ variant?: SelectPickerVariantType;
58
63
  }
59
64
  }
60
- export declare enum SelectPickerVariantType {
61
- DEFAULT = "default",
62
- BORDER_LESS = "border-less"
63
- }
64
65
  export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'>> & {
65
66
  /**
66
67
  * Error message for the select
@@ -1,2 +1,2 @@
1
1
  import { SelectTextAreaProps } from './types';
2
- export declare const SelectTextArea: ({ value, Icon, onChange, options, inputId, placeholder, refVar, dependentRefs, disabled, selectPickerProps, textAreaProps, }: SelectTextAreaProps) => JSX.Element;
2
+ export declare const SelectTextArea: ({ value, Icon, onChange, options, inputId, placeholder, refVar, dependentRef, disabled, selectPickerProps, textAreaProps, }: SelectTextAreaProps) => JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ResizableTagTextAreaProps } from '../../../Common/CustomTagSelector';
3
3
  import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
4
- export type SelectTextAreaProps = Pick<SelectPickerProps<string, false>, 'inputId' | 'options'> & Pick<ResizableTagTextAreaProps, 'refVar' | 'dependentRefs'> & {
4
+ export type SelectTextAreaProps = Pick<SelectPickerProps<string, false>, 'inputId' | 'options'> & Pick<ResizableTagTextAreaProps, 'refVar' | 'dependentRef'> & {
5
5
  value: string;
6
6
  Icon?: ReactElement;
7
7
  onChange?: (selectedValue: SelectPickerOptionType<string>) => void;
@@ -0,0 +1,3 @@
1
+ import { TagsContainerProps } from './types';
2
+ declare const TagsContainer: ({ isCreateApp, hidePropagateTags, ...props }: TagsContainerProps) => JSX.Element;
3
+ export default TagsContainer;
@@ -0,0 +1,4 @@
1
+ import { DynamicDataTableHeaderType } from '../DynamicDataTable';
2
+ import { TagsTableColumnsType } from './types';
3
+ export declare const TAGS_TABLE_HEADERS: DynamicDataTableHeaderType<TagsTableColumnsType>[];
4
+ export declare const DEVTRON_AI_URL: string;
@@ -0,0 +1,3 @@
1
+ export { default as TagsContainer } from './TagsContainer';
2
+ export { getEmptyTagTableRow } from './utils';
3
+ export type { TagsTableColumnsType } from './types';
@@ -0,0 +1,9 @@
1
+ import { DynamicDataTableProps, DynamicDataTableRowType } from '../DynamicDataTable';
2
+ export type TagsTableColumnsType = 'tagKey' | 'tagValue';
3
+ export interface TagsContainerProps extends Partial<Pick<DynamicDataTableProps<TagsTableColumnsType>, 'onRowEdit'>> {
4
+ isCreateApp?: boolean;
5
+ rows: DynamicDataTableRowType<TagsTableColumnsType>[];
6
+ setRows: (updatedRows: DynamicDataTableRowType<TagsTableColumnsType>[]) => void;
7
+ hidePropagateTags?: boolean;
8
+ getEmptyRow?: (keyChoices?: string[]) => DynamicDataTableRowType<TagsTableColumnsType>;
9
+ }
@@ -0,0 +1,3 @@
1
+ import { DynamicDataTableRowType } from '../DynamicDataTable';
2
+ import { TagsTableColumnsType } from './types';
3
+ export declare const getEmptyTagTableRow: () => DynamicDataTableRowType<TagsTableColumnsType>;
@@ -44,4 +44,4 @@ export * from './InvalidYAMLTippy';
44
44
  export * from './ConfirmationModal';
45
45
  export * from './DiffViewer';
46
46
  export * from './DynamicDataTable';
47
- export * from './FileUpload';
47
+ export * from './TagsKeyValueTable';
@@ -1,5 +1,5 @@
1
1
  import { Dayjs } from 'dayjs';
2
- import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
2
+ import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType } from '../Common';
3
3
  import { KeyValueListType } from './Components';
4
4
  import { EnvironmentTypeEnum, PatchOperationType } from './constants';
5
5
  export declare enum EnvType {
@@ -282,29 +282,11 @@ export interface GitTriggers {
282
282
  CiConfigureSourceType: string;
283
283
  CiConfigureSourceValue: string;
284
284
  }
285
- export interface RuntimePluginVariables extends Pick<VariableType, 'name' | 'value' | 'format' | 'fileReferenceId' | 'fileMountDir'> {
286
- variableStepScope: string;
287
- valueConstraint: ValueConstraintType & {
288
- id: number;
289
- };
290
- stepVariableId: number;
291
- valueType: RefVariableType;
292
- stepName: string;
293
- stepType: PluginType;
294
- isRequired: boolean;
295
- pluginIcon?: string;
296
- }
297
285
  export interface RuntimeParamsAPIResponseType {
298
286
  envVariables: Record<string, string>;
299
- runtimePluginVariables: RuntimePluginVariables[];
300
287
  }
301
288
  export interface RuntimeParamsTriggerPayloadType {
302
- runtimeParams: Pick<RuntimeParamsAPIResponseType, 'envVariables'>;
303
- }
304
- export interface RuntimeParamsV2TriggerPayloadType {
305
- runtimeParams: {
306
- runtimePluginVariables: Pick<RuntimePluginVariables, 'name' | 'fileMountDir' | 'fileReferenceId' | 'value' | 'format' | 'variableStepScope'>[];
307
- };
289
+ runtimeParams: RuntimeParamsAPIResponseType;
308
290
  }
309
291
  export declare enum CIMaterialSidebarType {
310
292
  CODE_SOURCE = "Code Source",
@@ -757,16 +739,22 @@ export interface PreventOutsideFocusProps {
757
739
  identifier: string;
758
740
  preventFocus: boolean;
759
741
  }
760
- export interface UploadFileDTO {
761
- id: number;
762
- name: string;
763
- size: number;
764
- mimeType: string;
765
- extension: string;
766
- }
767
- export interface UploadFileProps {
768
- file: File[];
769
- allowedExtensions?: string[];
770
- maxUploadSize?: number;
742
+ export interface PolicyBlockInfo {
743
+ isBlocked: boolean;
744
+ blockedBy: TriggerBlockType;
745
+ reason: string;
746
+ }
747
+ export interface PipelineStageBlockInfo {
748
+ node: PolicyBlockInfo;
749
+ pre: PolicyBlockInfo;
750
+ post: PolicyBlockInfo;
751
+ }
752
+ export interface PolicyConsequencesDTO {
753
+ cd: PipelineStageBlockInfo;
754
+ ci: PipelineStageBlockInfo;
755
+ }
756
+ export interface GetPolicyConsequencesProps {
757
+ appId: number;
758
+ envId: number;
771
759
  }
772
760
  export {};