@devtron-labs/devtron-fe-common-lib 1.2.5-beta-7 → 1.2.5-beta-9

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 (43) hide show
  1. package/dist/{@code-editor-BlrBCZSA.js → @code-editor-Bxuub3Gm.js} +6259 -6054
  2. package/dist/{@common-rjsf-DnT8mRYJ.js → @common-rjsf-MgIsP6qj.js} +2 -2
  3. package/dist/{@framer-motion-DpqjsVGY.js → @framer-motion-DHY98qq3.js} +1 -1
  4. package/dist/@monaco-editor-34kqzg3G.js +70451 -0
  5. package/dist/{@react-dates-DB0ptR9r.js → @react-dates-WNnwjI5S.js} +1 -1
  6. package/dist/{@react-select-CWpbugQg.js → @react-select-BbR996pa.js} +50 -50
  7. package/dist/@vendor-RU8AW1bK.js +20473 -0
  8. package/dist/Common/Constants.d.ts +1 -0
  9. package/dist/Common/CustomTagSelector/ResizableTagTextArea.d.ts +1 -1
  10. package/dist/Common/CustomTagSelector/Types.d.ts +20 -15
  11. package/dist/Common/Helper.d.ts +2 -1
  12. package/dist/Common/Types.d.ts +21 -5
  13. package/dist/Common/index.d.ts +0 -1
  14. package/dist/Shared/Components/DynamicDataTable/DynamicDataTable.d.ts +2 -0
  15. package/dist/Shared/Components/DynamicDataTable/DynamicDataTableHeader.d.ts +2 -0
  16. package/dist/Shared/Components/DynamicDataTable/DynamicDataTableRow.d.ts +2 -0
  17. package/dist/Shared/Components/DynamicDataTable/constants.d.ts +2 -0
  18. package/dist/Shared/Components/DynamicDataTable/index.d.ts +2 -0
  19. package/dist/Shared/Components/DynamicDataTable/types.d.ts +157 -0
  20. package/dist/Shared/Components/DynamicDataTable/utils.d.ts +5 -0
  21. package/dist/Shared/Components/InvalidYAMLTippy/utils.d.ts +1 -3
  22. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +1 -1
  23. package/dist/Shared/Components/SelectTextArea/SelectTextArea.d.ts +2 -0
  24. package/dist/Shared/Components/SelectTextArea/index.d.ts +2 -0
  25. package/dist/Shared/Components/SelectTextArea/types.d.ts +12 -0
  26. package/dist/Shared/Components/TagsKeyValueTable/TagsContainer.d.ts +3 -0
  27. package/dist/Shared/Components/TagsKeyValueTable/constants.d.ts +4 -0
  28. package/dist/Shared/Components/TagsKeyValueTable/index.d.ts +3 -0
  29. package/dist/Shared/Components/TagsKeyValueTable/types.d.ts +9 -0
  30. package/dist/Shared/Components/TagsKeyValueTable/utils.d.ts +3 -0
  31. package/dist/Shared/Components/index.d.ts +2 -0
  32. package/dist/Shared/types.d.ts +19 -2
  33. package/dist/assets/@code-editor.css +1 -1
  34. package/dist/assets/@monaco-editor.css +1 -0
  35. package/dist/assets/ic-clear-square.e60de021.svg +1 -0
  36. package/dist/index.js +520 -516
  37. package/dist/yaml.worker.d.ts +0 -0
  38. package/package.json +1 -2
  39. package/dist/@vendor-BlZS9Ity.js +0 -24918
  40. package/dist/Common/CodeEditor/jsonSchema.json.d.ts +0 -237
  41. package/dist/Common/SegmentedControl/SegmentedControl.component.d.ts +0 -3
  42. package/dist/Common/SegmentedControl/index.d.ts +0 -2
  43. package/dist/Common/SegmentedControl/types.d.ts +0 -14
@@ -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;
@@ -1,2 +1,2 @@
1
1
  import { ResizableTagTextAreaProps } from './Types';
2
- export declare const ResizableTagTextArea: ({ className, minHeight, maxHeight, value, onChange, onBlur, onFocus, placeholder, tabIndex, refVar, dependentRef, dataTestId, handleKeyDown, disabled, disableOnBlurResizeToMinHeight, }: ResizableTagTextAreaProps) => JSX.Element;
2
+ export declare const ResizableTagTextArea: ({ value, minHeight, maxHeight, onBlur, onFocus, refVar, dependentRef, dependentRefs, className, disableOnBlurResizeToMinHeight, id, ...restProps }: ResizableTagTextAreaProps) => JSX.Element;
@@ -1,9 +1,20 @@
1
+ import { DetailedHTMLProps, MutableRefObject, TextareaHTMLAttributes } from 'react';
1
2
  import { KEY_VALUE } from '../Constants';
2
3
  import { OptionType } from '../Types';
3
4
  export interface SuggestedTagOptionType extends OptionType {
4
5
  description: string;
5
6
  propagate: boolean;
6
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
+ }
7
18
  export interface TagType {
8
19
  id?: number;
9
20
  key: string;
@@ -15,6 +26,8 @@ export interface TagType {
15
26
  isInvalidValue?: boolean;
16
27
  isSuggested?: boolean;
17
28
  isPropagateDisabled?: boolean;
29
+ deploymentPolicy?: DeploymentPolicy;
30
+ valueConstraint?: VariableValueConstraintTypes;
18
31
  }
19
32
  export interface TagErrorType {
20
33
  isValid: boolean;
@@ -48,24 +61,16 @@ export interface TagLabelValueSelectorType {
48
61
  tagInputType?: KEY_VALUE;
49
62
  placeholder?: string;
50
63
  tabIndex?: number;
51
- refVar?: React.MutableRefObject<HTMLTextAreaElement>;
52
- dependentRef?: React.MutableRefObject<HTMLTextAreaElement>;
64
+ refVar?: MutableRefObject<HTMLTextAreaElement>;
65
+ dependentRef?: MutableRefObject<HTMLTextAreaElement>;
53
66
  noBackDrop?: boolean;
54
67
  }
55
- export interface ResizableTagTextAreaProps {
56
- className?: string;
68
+ export interface ResizableTagTextAreaProps extends Omit<DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, 'value'> {
57
69
  minHeight?: number;
58
70
  maxHeight?: number;
59
- value?: string;
60
- onChange?: (e: any) => void;
61
- onBlur?: (e: any) => void;
62
- onFocus?: (e: any) => void;
63
- placeholder?: string;
64
- tabIndex?: number;
65
- refVar?: React.MutableRefObject<HTMLTextAreaElement>;
66
- dependentRef?: React.MutableRefObject<HTMLTextAreaElement>;
67
- dataTestId?: string;
68
- handleKeyDown?: any;
69
- disabled?: boolean;
71
+ value: string;
72
+ refVar?: MutableRefObject<HTMLTextAreaElement>;
73
+ dependentRef?: MutableRefObject<HTMLTextAreaElement>;
74
+ dependentRefs?: Record<string | number, MutableRefObject<HTMLTextAreaElement>>;
70
75
  disableOnBlurResizeToMinHeight?: boolean;
71
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,8 +1,9 @@
1
1
  import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObject } from 'react';
2
+ import { TippyProps } from '@tippyjs/react';
2
3
  import { Placement } from 'tippy.js';
3
4
  import { UserGroupDTO } from '../Pages/GlobalConfigurations';
4
5
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
5
- import { MandatoryPluginBaseStateType, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
6
+ import { MandatoryPluginBaseStateType, PolicyBlockInfo, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
6
7
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
7
8
  /**
8
9
  * Generic response type object with support for overriding the result type
@@ -65,7 +66,7 @@ export interface CheckboxProps {
65
66
  id?: string;
66
67
  dataTestId?: string;
67
68
  }
68
- export interface TippyCustomizedProps {
69
+ export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
69
70
  theme: TippyTheme;
70
71
  visible?: boolean;
71
72
  heading?: ReactNode | string;
@@ -431,6 +432,10 @@ export interface CDMaterialType {
431
432
  * Would currently only be received in case of release
432
433
  */
433
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;
434
439
  }
435
440
  export declare enum CDMaterialServiceEnum {
436
441
  ROLLBACK = "rollback",
@@ -467,6 +472,14 @@ export interface DownstreamNodesEnvironmentsType {
467
472
  environmentId: number;
468
473
  environmentName: string;
469
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
+ }
470
483
  export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTriggerBlocked' | 'pluginBlockState'> {
471
484
  connectingCiPipelineId?: number;
472
485
  parents: string | number[] | string[];
@@ -529,6 +542,7 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
529
542
  downstreamEnvironments?: DownstreamNodesEnvironmentsType[];
530
543
  cipipelineId?: number;
531
544
  isDeploymentBlocked?: boolean;
545
+ triggerBlockedInfo?: TriggerBlockedInfo;
532
546
  }
533
547
  export declare enum DeploymentAppTypes {
534
548
  HELM = "helm",
@@ -592,6 +606,7 @@ export interface CDMaterialsMetaInfo {
592
606
  */
593
607
  requestedUserId: number;
594
608
  runtimeParams: RuntimeParamsListItemType[];
609
+ deploymentBlockedState?: PolicyBlockInfo;
595
610
  }
596
611
  export interface ImagePromotionMaterialInfo {
597
612
  isApprovalPendingForPromotion: boolean;
@@ -669,7 +684,7 @@ export interface Strategy {
669
684
  config: any;
670
685
  default?: boolean;
671
686
  }
672
- export interface CDStage {
687
+ export interface CDStage extends Partial<Pick<CommonNodeAttr, 'triggerBlockedInfo'>> {
673
688
  status: string;
674
689
  name: string;
675
690
  triggerType: 'AUTOMATIC' | 'MANUAL';
@@ -679,14 +694,14 @@ export interface CDStageConfigMapSecretNames {
679
694
  configMaps: any[];
680
695
  secrets: any[];
681
696
  }
682
- export interface PrePostDeployStageType extends MandatoryPluginBaseStateType {
697
+ export interface PrePostDeployStageType extends MandatoryPluginBaseStateType, Partial<Pick<CommonNodeAttr, 'triggerBlockedInfo'>> {
683
698
  isValid: boolean;
684
699
  steps: TaskErrorObj[];
685
700
  triggerType: string;
686
701
  name: string;
687
702
  status: string;
688
703
  }
689
- export interface CdPipeline {
704
+ export interface CdPipeline extends Partial<Pick<CommonNodeAttr, 'triggerBlockedInfo'>> {
690
705
  id: number;
691
706
  environmentId: number;
692
707
  environmentName?: string;
@@ -718,6 +733,7 @@ export interface CdPipeline {
718
733
  isProdEnv?: boolean;
719
734
  isGitOpsRepoNotConfigured?: boolean;
720
735
  isDeploymentBlocked?: boolean;
736
+ isTriggerBlocked?: boolean;
721
737
  }
722
738
  export interface ExternalCiConfig {
723
739
  id: number;
@@ -53,4 +53,3 @@ export * from './SegmentedBarChart';
53
53
  export * from './CodeEditor';
54
54
  export * from './AppStatus';
55
55
  export * from './Tooltip';
56
- export * from './SegmentedControl';
@@ -0,0 +1,2 @@
1
+ import { DynamicDataTableProps } from './types';
2
+ export declare const DynamicDataTable: <K extends string>({ headers, ...props }: DynamicDataTableProps<K>) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DynamicDataTableHeaderProps } from './types';
2
+ export declare const DynamicDataTableHeader: <K extends string>({ headers, rows, sortingConfig, onRowAdd, readOnly, isAdditionNotAllowed, isDeletionNotAllowed, headerComponent, actionButtonConfig, }: DynamicDataTableHeaderProps<K>) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { DynamicDataTableRowProps } from './types';
2
+ export declare const DynamicDataTableRow: <K extends string>({ rows, headers, readOnly, isAdditionNotAllowed, isDeletionNotAllowed, validationSchema, showError, actionButtonConfig, onRowEdit, onRowDelete, leadingCellIcon, trailingCellIcon, buttonCellWrapComponent, }: DynamicDataTableRowProps<K>) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const ACTION_BUTTON_DEFAULT_WIDTH = "33px";
2
+ export declare const DELETE_BUTTON_WIDTH = "33px";
@@ -0,0 +1,2 @@
1
+ export * from './DynamicDataTable';
2
+ export * from './types';
@@ -0,0 +1,157 @@
1
+ import { DetailedHTMLProps, ReactElement, ReactNode } from 'react';
2
+ import { ResizableTagTextAreaProps } from '../../../Common/CustomTagSelector';
3
+ import { UseStateFiltersReturnType } from '../../../Common/Hooks';
4
+ import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
5
+ import { SelectTextAreaProps } from '../SelectTextArea';
6
+ /**
7
+ * Interface representing header for a dynamic data table.
8
+ * @template K - A string representing the key type.
9
+ */
10
+ export type DynamicDataTableHeaderType<K extends string> = {
11
+ /** The display label of the header, shown in the table's column header. */
12
+ label: string;
13
+ /** The unique key associated with the header, used to map the column to data fields. */
14
+ key: K;
15
+ /** The width of the column, defined as a CSS string (e.g., "100px", "10%", "1fr", or "auto"). */
16
+ width: string;
17
+ /** An optional boolean indicating whether the column is sortable. */
18
+ isSortable?: boolean;
19
+ /** An optional boolean to control the visibility of the column. */
20
+ isHidden?: boolean;
21
+ /** An optional boolean to show the column */
22
+ renderAdditionalContent?: () => ReactNode;
23
+ };
24
+ export declare enum DynamicDataTableRowDataType {
25
+ TEXT = "text",
26
+ DROPDOWN = "dropdown",
27
+ SELECT_TEXT = "select-text",
28
+ BUTTON = "button"
29
+ }
30
+ export type DynamicDataTableCellPropsMap = {
31
+ [DynamicDataTableRowDataType.TEXT]: Omit<ResizableTagTextAreaProps, 'id' | 'className' | 'minHeight' | 'maxHeight' | 'value' | 'onChange' | 'disabled' | 'disableOnBlurResizeToMinHeight' | 'refVar' | 'dependentRef'>;
32
+ [DynamicDataTableRowDataType.DROPDOWN]: Omit<SelectPickerProps<string, false>, 'inputId' | 'value' | 'onChange' | 'fullWidth' | 'isDisabled'>;
33
+ [DynamicDataTableRowDataType.SELECT_TEXT]: Omit<SelectTextAreaProps, 'value' | 'onChange' | 'inputId' | 'isDisabled' | 'dependentRef' | 'refVar' | 'textAreaProps'> & {
34
+ textAreaProps?: Omit<SelectTextAreaProps['textAreaProps'], 'className' | 'disableOnBlurResizeToMinHeight' | 'minHeight' | 'maxHeight'>;
35
+ };
36
+ [DynamicDataTableRowDataType.BUTTON]: Pick<DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, 'onClick'> & {
37
+ icon?: ReactNode;
38
+ text: string;
39
+ };
40
+ };
41
+ type DynamicDataTableCellData<T extends keyof DynamicDataTableCellPropsMap = keyof DynamicDataTableCellPropsMap> = T extends keyof DynamicDataTableCellPropsMap ? {
42
+ type: T;
43
+ props: DynamicDataTableCellPropsMap[T];
44
+ } : never;
45
+ /**
46
+ * Type representing a key-value row.
47
+ * @template K - A string representing the key type.
48
+ */
49
+ export type DynamicDataTableRowType<K extends string, CustomStateType = Record<string, unknown>> = {
50
+ data: {
51
+ [key in K]: {
52
+ value: string;
53
+ disabled?: boolean;
54
+ /** An optional boolean indicating if an asterisk should be shown. */
55
+ required?: boolean;
56
+ } & DynamicDataTableCellData;
57
+ };
58
+ id: string | number;
59
+ /** */
60
+ customState?: CustomStateType;
61
+ /** An optional boolean indicating if row deletion is disabled. */
62
+ disableDelete?: boolean;
63
+ };
64
+ type DynamicDataTableCellIcon<K extends string> = {
65
+ [key in K]?: (row: DynamicDataTableRowType<K>) => ReactNode;
66
+ };
67
+ /**
68
+ * Interface representing the properties for the dynamic data table component.
69
+ * @template K - A string representing the key type.
70
+ */
71
+ export type DynamicDataTableProps<K extends string> = {
72
+ /**
73
+ * An array containing the headers for the data table. \
74
+ * Each header defines a column with its label, key, width, and optional settings.
75
+ */
76
+ headers: DynamicDataTableHeaderType<K>[];
77
+ /**
78
+ * An array of rows where each row contains data corresponding to the table headers.
79
+ */
80
+ rows: DynamicDataTableRowType<K>[];
81
+ /** Optional configuration for sorting the table. */
82
+ sortingConfig?: Pick<UseStateFiltersReturnType<K>, 'sortBy' | 'sortOrder' | 'handleSorting'>;
83
+ /** Optional configuration for displaying an icon in the leading position of a cell. */
84
+ leadingCellIcon?: DynamicDataTableCellIcon<K>;
85
+ /** Optional configuration for displaying an icon in the trailing position of a cell. */
86
+ trailingCellIcon?: DynamicDataTableCellIcon<K>;
87
+ /** An optional function to render a custom wrapper component for the type `DynamicDataTableRowDataType.BUTTON`. */
88
+ buttonCellWrapComponent?: (row: DynamicDataTableRowType<K>) => ReactElement;
89
+ /** An optional React node for a custom header component. */
90
+ headerComponent?: ReactNode;
91
+ /** When true, data addition field will not be shown. */
92
+ isAdditionNotAllowed?: boolean;
93
+ /** When true, data addition field will not be shown. */
94
+ isDeletionNotAllowed?: boolean;
95
+ /** When true, data add or update is disabled. */
96
+ readOnly?: boolean;
97
+ /** Function to handle the addition of a new row to the table. */
98
+ onRowAdd: () => void;
99
+ /**
100
+ * Function to handle changes in the table rows.
101
+ * @param row - The row that changed.
102
+ * @param headerKey - The key of the header that changed.
103
+ * @param value - The value of the cell.
104
+ * @param extraData - Additional data, such as a selected value for dropdowns.
105
+ */
106
+ onRowEdit: (row: DynamicDataTableRowType<K>, headerKey: K, value: string, extraData: {
107
+ selectedValue?: SelectPickerOptionType<string>;
108
+ }) => void;
109
+ /**
110
+ * Function to handle row deletions.
111
+ * @param row - The row that was deleted.
112
+ */
113
+ onRowDelete: (row: DynamicDataTableRowType<K>) => void;
114
+ /** Optional configuration for rendering a custom action button in a row. */
115
+ actionButtonConfig?: {
116
+ /**
117
+ * Function to render the action button.
118
+ * @param row - The current row being rendered.
119
+ * @returns A React node representing the action button.
120
+ */
121
+ renderer: (row: DynamicDataTableRowType<K>) => ReactNode;
122
+ /**
123
+ * This represents under which header key the action button will be rendered.
124
+ */
125
+ key: K;
126
+ /**
127
+ * The width of the action button.
128
+ * @default '33px'
129
+ */
130
+ width?: string;
131
+ /**
132
+ * The position of the action button under the header key.
133
+ * @default 'start'
134
+ */
135
+ position?: 'start' | 'end';
136
+ };
137
+ /**
138
+ * Indicates whether to show errors.
139
+ */
140
+ showError?: boolean;
141
+ /**
142
+ * Function to validate the value of a table cell.
143
+ * @param value - The value to validate.
144
+ * @param key - The column key of the cell.
145
+ * @param row - The row containing the cell.
146
+ * @returns An object with a boolean indicating validity and an array of error messages.
147
+ */
148
+ validationSchema?: (value: string, key: K, row: DynamicDataTableRowType<K>) => {
149
+ isValid: boolean;
150
+ errorMessages: string[];
151
+ };
152
+ };
153
+ export interface DynamicDataTableHeaderProps<K extends string> extends Pick<DynamicDataTableProps<K>, 'headers' | 'rows' | 'headerComponent' | 'sortingConfig' | 'onRowAdd' | 'readOnly' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'actionButtonConfig'> {
154
+ }
155
+ export interface DynamicDataTableRowProps<K extends string> extends Pick<DynamicDataTableProps<K>, 'rows' | 'headers' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'readOnly' | 'onRowEdit' | 'onRowDelete' | 'actionButtonConfig' | 'showError' | 'validationSchema' | 'leadingCellIcon' | 'trailingCellIcon' | 'buttonCellWrapComponent'> {
156
+ }
157
+ export {};
@@ -0,0 +1,5 @@
1
+ import { DynamicDataTableHeaderType, DynamicDataTableProps, DynamicDataTableRowDataType } from './types';
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
+ export declare const rowTypeHasInputField: (type: DynamicDataTableRowDataType) => boolean;
@@ -1,4 +1,2 @@
1
1
  import { InvalidYAMLTippyWrapperProps } from './types';
2
- export declare const getInvalidTippyContent: ({ type, parsingError, restoreLastSavedYAML, }: Pick<InvalidYAMLTippyWrapperProps, "parsingError" | "restoreLastSavedYAML"> & {
3
- type?: "yaml" | "json";
4
- }) => JSX.Element;
2
+ export declare const getInvalidTippyContent: ({ parsingError, restoreLastSavedYAML, }: Pick<InvalidYAMLTippyWrapperProps, "parsingError" | "restoreLastSavedYAML">) => JSX.Element;
@@ -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' | 'dataTestId' | 'disabled' | 'tabIndex'> & {
21
+ [key in K]: Pick<ResizableTagTextAreaProps, 'value' | 'disabled' | 'tabIndex'> & {
22
22
  /** An optional boolean indicating if an asterisk should be shown. */
23
23
  required?: boolean;
24
24
  };
@@ -0,0 +1,2 @@
1
+ import { SelectTextAreaProps } from './types';
2
+ export declare const SelectTextArea: ({ value, Icon, onChange, options, inputId, placeholder, refVar, dependentRefs, disabled, selectPickerProps, textAreaProps, }: SelectTextAreaProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './SelectTextArea';
2
+ export * from './types';
@@ -0,0 +1,12 @@
1
+ import { ReactElement } from 'react';
2
+ import { ResizableTagTextAreaProps } from '../../../Common/CustomTagSelector';
3
+ import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
4
+ export type SelectTextAreaProps = Pick<SelectPickerProps<string, false>, 'inputId' | 'options'> & Pick<ResizableTagTextAreaProps, 'refVar' | 'dependentRefs'> & {
5
+ value: string;
6
+ Icon?: ReactElement;
7
+ onChange?: (selectedValue: SelectPickerOptionType<string>) => void;
8
+ disabled?: boolean;
9
+ placeholder?: string;
10
+ textAreaProps?: Omit<ResizableTagTextAreaProps, 'refVar' | 'dependentRef' | 'id' | 'value' | 'onChange' | 'placeholder' | 'disabled'>;
11
+ selectPickerProps?: Omit<SelectPickerProps<string, false>, 'inputId' | 'options' | 'isDisabled' | 'onChange' | 'variant' | 'value' | 'placeholder' | 'fullWidth' | 'selectRef' | 'onCreateOption' | 'isMulti'>;
12
+ };
@@ -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>;
@@ -43,3 +43,5 @@ export * from './Button';
43
43
  export * from './InvalidYAMLTippy';
44
44
  export * from './ConfirmationModal';
45
45
  export * from './DiffViewer';
46
+ export * from './DynamicDataTable';
47
+ export * from './TagsKeyValueTable';
@@ -1,5 +1,5 @@
1
1
  import { Dayjs } from 'dayjs';
2
- import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } 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 {
@@ -585,7 +585,6 @@ export declare enum ConfigurationType {
585
585
  GUI = "GUI",
586
586
  YAML = "YAML"
587
587
  }
588
- export declare const CONFIGURATION_TYPE_OPTIONS: OptionType<ConfigurationType, ConfigurationType>[];
589
588
  export interface BaseURLParams {
590
589
  appId: string;
591
590
  envId: string;
@@ -740,4 +739,22 @@ export interface PreventOutsideFocusProps {
740
739
  identifier: string;
741
740
  preventFocus: boolean;
742
741
  }
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;
759
+ }
743
760
  export {};