@devtron-labs/devtron-fe-common-lib 1.2.7-beta-4 → 1.2.7-beta-5

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 (60) hide show
  1. package/dist/{@code-editor-DTxBqjFg.js → @code-editor-HL5a1btU.js} +5506 -5364
  2. package/dist/{@common-rjsf-zu1qoo-Y.js → @common-rjsf-DFgZpQQ7.js} +2 -2
  3. package/dist/{@framer-motion-DFECMTRh.js → @framer-motion-DHY98qq3.js} +1 -1
  4. package/dist/{@react-dates-MalCS5BJ.js → @react-dates-WNnwjI5S.js} +1 -1
  5. package/dist/{@react-select-B8JuvbeY.js → @react-select-BbR996pa.js} +50 -50
  6. package/dist/{@vendor-CPMO6uwj.js → @vendor-RU8AW1bK.js} +93 -94
  7. package/dist/Common/CIPipeline.Types.d.ts +41 -5
  8. package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +1 -2
  9. package/dist/Common/CodeEditor/types.d.ts +1 -2
  10. package/dist/Common/Common.service.d.ts +9 -3
  11. package/dist/Common/Constants.d.ts +4 -2
  12. package/dist/Common/Helper.d.ts +2 -1
  13. package/dist/Common/Markdown/MarkDown.d.ts +1 -1
  14. package/dist/Common/RJSF/Form.d.ts +1 -1
  15. package/dist/Common/RJSF/index.d.ts +1 -1
  16. package/dist/Common/Types.d.ts +15 -3
  17. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/types.d.ts +3 -21
  18. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/OverrideStrategyTippyContent.d.ts +1 -2
  19. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/index.d.ts +0 -1
  20. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/types.d.ts +0 -7
  21. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/utils.d.ts +1 -1
  22. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/index.d.ts +1 -0
  23. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/services.d.ts +7 -0
  24. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/components/SystemVariableIcon.d.ts +1 -0
  25. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/components/index.d.ts +1 -0
  26. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/constants.d.ts +3 -0
  27. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/index.d.ts +3 -0
  28. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/services.d.ts +11 -0
  29. package/dist/Pages/Applications/DevtronApps/Details/index.d.ts +1 -0
  30. package/dist/Pages/index.d.ts +0 -1
  31. package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +0 -6
  32. package/dist/Shared/Components/DynamicDataTable/types.d.ts +5 -1
  33. package/dist/Shared/Components/FileUpload/FileUpload.d.ts +2 -0
  34. package/dist/Shared/Components/FileUpload/index.d.ts +2 -0
  35. package/dist/Shared/Components/FileUpload/types.d.ts +8 -0
  36. package/dist/Shared/Components/index.d.ts +1 -1
  37. package/dist/Shared/Helpers.d.ts +3 -5
  38. package/dist/Shared/Hooks/useForm/useForm.d.ts +0 -4
  39. package/dist/Shared/Services/app.types.d.ts +0 -4
  40. package/dist/Shared/types.d.ts +30 -6
  41. package/dist/assets/ic-cloud-upload.18066e05.svg +3 -0
  42. package/dist/assets/ic-file-code.21a1f748.svg +7 -0
  43. package/dist/assets/ic-stamp.8689f42d.svg +9 -0
  44. package/dist/assets/ic-var-initial.afdaa854.svg +25 -0
  45. package/dist/index.d.ts +0 -2
  46. package/dist/index.js +516 -512
  47. package/package.json +1 -1
  48. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/index.d.ts +0 -2
  49. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/types.d.ts +0 -2
  50. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/utils.d.ts +0 -6
  51. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/index.d.ts +0 -1
  52. package/dist/Pages/App/AppConfiguration/index.d.ts +0 -1
  53. package/dist/Pages/App/index.d.ts +0 -1
  54. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/ConfigMapSecret/index.d.ts +0 -1
  55. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/ConfigMapSecret/utils.d.ts +0 -3
  56. package/dist/Shared/Components/EnterpriseTag/EnterpriseTag.component.d.ts +0 -2
  57. package/dist/Shared/Components/EnterpriseTag/index.d.ts +0 -1
  58. package/dist/assets/ic-file-code.80000c9b.svg +0 -7
  59. package/dist/assets/ic-medal.4a7e5cbc.svg +0 -3
  60. package/dist/assets/ic-stamp.526499d2.svg +0 -7
@@ -28,7 +28,7 @@ interface CodeEditorBaseInterface {
28
28
  validatorSchema?: any;
29
29
  isKubernetes?: boolean;
30
30
  cleanData?: boolean;
31
- schemaURI?: string;
31
+ chartVersion?: any;
32
32
  /**
33
33
  * If true, disable the in-built search of monaco editor
34
34
  * @default false
@@ -81,7 +81,6 @@ export interface CodeEditorInitialValueType {
81
81
  theme?: string;
82
82
  value: string;
83
83
  noParsing?: boolean;
84
- tabSize: number;
85
84
  }
86
85
  export interface CodeEditorState {
87
86
  mode: MODES;
@@ -1,5 +1,6 @@
1
- import { RuntimeParamsAPIResponseType, RuntimeParamsListItemType } from '../Shared/types';
2
- import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse } from './Types';
1
+ import { MutableRefObject } from 'react';
2
+ import { RuntimeParamsAPIResponseType, RuntimePluginVariables } from '../Shared/types';
3
+ import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse, GlobalVariableOptionType } from './Types';
3
4
  import { ApiResourceType } from '../Pages';
4
5
  export declare const getTeamListMin: () => Promise<TeamList>;
5
6
  interface UserRole extends ResponseType {
@@ -15,7 +16,7 @@ export declare const SourceTypeMap: {
15
16
  };
16
17
  export declare function getUserRole(appName?: string): Promise<UserRole>;
17
18
  export declare function setImageTags(request: any, pipelineId: number, artifactId: number): Promise<ResponseType<any>>;
18
- export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => RuntimeParamsListItemType[];
19
+ export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => RuntimePluginVariables[];
19
20
  export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
20
21
  export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
21
22
  export declare function extractImage(image: string): string;
@@ -34,4 +35,9 @@ export declare function getWebhookEventsForEventId(eventId: string | number): Pr
34
35
  * @returns URL to the branch in the Git repository
35
36
  */
36
37
  export declare const getGitBranchUrl: (gitUrl: string, branchName: string) => string | null;
38
+ export declare const getGlobalVariables: ({ appId, isCD, abortControllerRef, }: {
39
+ appId: number;
40
+ isCD?: boolean;
41
+ abortControllerRef?: MutableRefObject<AbortController>;
42
+ }) => Promise<GlobalVariableOptionType[]>;
37
43
  export {};
@@ -4,7 +4,6 @@ export declare const Host: string;
4
4
  export declare const DOCUMENTATION_HOME_PAGE = "https://docs.devtron.ai";
5
5
  export declare const DOCUMENTATION_VERSION = "/v/v0.7";
6
6
  export declare const DISCORD_LINK = "https://discord.devtron.ai/";
7
- export declare const DEFAULT_JSON_SCHEMA_URI = "https://json-schema.org/draft/2020-12/schema";
8
7
  export declare const DOCUMENTATION: {
9
8
  APP_METRICS: string;
10
9
  APP_TAGS: string;
@@ -13,11 +12,13 @@ export declare const DOCUMENTATION: {
13
12
  GLOBAL_CONFIG_BUILD_INFRA: string;
14
13
  };
15
14
  export declare const PATTERNS: {
15
+ NATURAL_NUMBERS: RegExp;
16
16
  KUBERNETES_KEY_PREFIX: RegExp;
17
17
  KUBERNETES_KEY_NAME: RegExp;
18
18
  START_END_ALPHANUMERIC: RegExp;
19
19
  ALPHANUMERIC_WITH_SPECIAL_CHAR: RegExp;
20
20
  ESCAPED_CHARACTERS: RegExp;
21
+ NUMBERS_WITH_SCOPE_VARIABLES: RegExp;
21
22
  };
22
23
  export declare const URLS: {
23
24
  LOGIN_SSO: string;
@@ -95,6 +96,8 @@ export declare const ROUTES: {
95
96
  USER_LIST_MIN: string;
96
97
  CONFIG_DATA: string;
97
98
  K8S_RESOURCE_LIST: string;
99
+ FILE_UPLOAD: string;
100
+ PLUGIN_GLOBAL_VARIABLES: string;
98
101
  CONFIG_COMPARE_SECRET: string;
99
102
  };
100
103
  export declare enum KEY_VALUE {
@@ -260,7 +263,6 @@ export declare const API_STATUS_CODES: {
260
263
  EXPECTATION_FAILED: number;
261
264
  UNPROCESSABLE_ENTITY: number;
262
265
  LOCKED: number;
263
- UNPROCESSABLE_CONTENT: number;
264
266
  };
265
267
  export declare enum SERVER_MODE {
266
268
  EA_ONLY = "EA_ONLY",
@@ -90,7 +90,7 @@ export declare const getRegexMatchPositions: (string: string, regex: RegExp) =>
90
90
  export declare const powerSetOfSubstringsFromStart: (strings: string[], regex: RegExp) => string[];
91
91
  export declare const convertJSONPointerToJSONPath: (pointer: string) => string;
92
92
  export declare const flatMapOfJSONPaths: (paths: string[], json: object, resultType?: JSONPathOptions["resultType"]) => string[];
93
- export declare const applyCompareDiffOnUneditedDocument: (uneditedDocument: object, editedDocument: object) => any;
93
+ export declare const applyCompareDiffOnUneditedDocument: (uneditedDocument: object, editedDocument: object) => object;
94
94
  /**
95
95
  * Returns a debounced variant of the function
96
96
  */
@@ -134,4 +134,5 @@ export declare const getSanitizedIframe: (iframeString: string) => string;
134
134
  * This method adds default attributes to iframe - title, loading ="lazy", width="100%", height="100%"
135
135
  */
136
136
  export declare const getIframeWithDefaultAttributes: (iframeString: string, defaultName?: string) => string;
137
+ export declare const getGoLangFormattedDateWithTimezone: (dateFormat: string) => string;
137
138
  export {};
@@ -1,3 +1,3 @@
1
1
  import { MarkDownProps } from './Types';
2
- declare const MarkDown: ({ setExpandableIcon, markdown: markdownProp, className, breaks, disableEscapedText, ...props }: MarkDownProps) => JSX.Element;
2
+ declare const MarkDown: ({ setExpandableIcon, markdown, className, breaks, disableEscapedText, ...props }: MarkDownProps) => JSX.Element;
3
3
  export default MarkDown;
@@ -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" | "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
+ 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>>>;
@@ -1,4 +1,4 @@
1
1
  export { RJSFForm } from './Form';
2
- export type * from './types';
2
+ export * from './types';
3
3
  export { getInferredTypeFromValueType, getRedirectionProps } from './utils';
4
4
  export { HIDE_SUBMIT_BUTTON_UI_SCHEMA } from './constants';
@@ -3,8 +3,8 @@ 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, RuntimeParamsListItemType, Severity } from '../Shared';
7
- import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
6
+ import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity } from '../Shared';
7
+ import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, RefVariableType, SortingOrder, TaskErrorObj, VariableTypeFormat } from '.';
8
8
  /**
9
9
  * Generic response type object with support for overriding the result type
10
10
  *
@@ -94,6 +94,7 @@ export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
94
94
  documentationLink?: string;
95
95
  documentationLinkText?: string;
96
96
  children: React.ReactElement<any>;
97
+ disableClose?: boolean;
97
98
  }
98
99
  export interface InfoIconTippyProps extends Pick<TippyCustomizedProps, 'heading' | 'infoText' | 'iconClass' | 'documentationLink' | 'documentationLinkText' | 'additionalContent' | 'placement' | 'Icon' | 'headingInfo'> {
99
100
  dataTestid?: string;
@@ -592,7 +593,7 @@ export interface CDMaterialsMetaInfo {
592
593
  * This is the ID of user that has request the material
593
594
  */
594
595
  requestedUserId: number;
595
- runtimeParams: RuntimeParamsListItemType[];
596
+ runtimeParams: RuntimePluginVariables[];
596
597
  }
597
598
  export interface ImagePromotionMaterialInfo {
598
599
  isApprovalPendingForPromotion: boolean;
@@ -871,4 +872,15 @@ export interface WidgetEventDetails {
871
872
  age: string;
872
873
  lastSeen: string;
873
874
  }
875
+ export interface GlobalVariableDTO {
876
+ name: string;
877
+ format: VariableTypeFormat;
878
+ description: string;
879
+ stageType: 'cd' | 'post-cd' | 'ci';
880
+ }
881
+ export type GlobalVariableOptionType = Omit<GlobalVariableDTO, 'name'> & {
882
+ label: string;
883
+ value: string;
884
+ variableType: Extract<RefVariableType, RefVariableType.GLOBAL>;
885
+ };
874
886
  export {};
@@ -1,5 +1,4 @@
1
1
  import { DraftMetadataDTO, TemplateListType } from '../../../../../../Shared/Services';
2
- import { ServerErrors } from '../../../../../../Common/ServerError';
3
2
  import { OverrideMergeStrategyType } from '../types';
4
3
  export type DeploymentChartOptionkind = 'base' | 'env' | 'chartVersion' | 'deployment';
5
4
  export interface DeploymentChartVersionType {
@@ -109,15 +108,15 @@ interface BaseDeploymentTemplateConfigState {
109
108
  environmentConfig?: never;
110
109
  mergeStrategy?: never;
111
110
  }
112
- type EnvironmentOverrideDeploymentTemplateConfigState = {
111
+ interface EnvironmentOverrideDeploymentTemplateConfigState {
113
112
  chartConfig?: never;
114
113
  isOverridden: boolean;
115
114
  environmentConfig: EnvironmentConfigType;
116
115
  mergeStrategy: OverrideMergeStrategyType;
117
- };
116
+ }
118
117
  export interface DeploymentTemplateConfigCommonState extends SelectedChartDetailsType {
119
118
  /**
120
- * The first ever state of the deployment template on editor
119
+ * The first ever state of the deployment template
121
120
  */
122
121
  originalTemplate: Record<string, string>;
123
122
  isAppMetricsEnabled: boolean;
@@ -127,23 +126,6 @@ export interface DeploymentTemplateConfigCommonState extends SelectedChartDetail
127
126
  latestDraft?: DraftMetadataDTO;
128
127
  editorTemplate: string;
129
128
  editorTemplateWithoutLockedKeys: string;
130
- /**
131
- * This final template to be applied on the deployment in string format
132
- * In current editor, this may be null initially
133
- */
134
- mergedTemplate: string | null;
135
- /**
136
- * This final template to be applied on the deployment without locked keys in string format
137
- * In current editor, this may be null initially
138
- */
139
- mergedTemplateWithoutLockedKeys: string | null;
140
- /**
141
- * This final template to be applied on the deployment in object format
142
- * In current editor, this may be null initially
143
- */
144
- mergedTemplateObject: Record<string, string> | null;
145
- isLoadingMergedTemplate: boolean;
146
- mergedTemplateError: ServerErrors | null;
147
129
  }
148
130
  export type DeploymentTemplateConfigState = DeploymentTemplateConfigCommonState & (BaseDeploymentTemplateConfigState | EnvironmentOverrideDeploymentTemplateConfigState);
149
131
  type DTApplicationMetricsReadOnlyProps = {
@@ -1,3 +1,2 @@
1
- import { OverrideStrategyTippyContentProps } from './types';
2
- declare const OverrideStrategyTippyContent: ({ children }: OverrideStrategyTippyContentProps) => JSX.Element;
1
+ declare const OverrideStrategyTippyContent: () => JSX.Element;
3
2
  export default OverrideStrategyTippyContent;
@@ -3,4 +3,3 @@ export * from './types';
3
3
  export * from './constants';
4
4
  export { default as OverrideStrategyTippyContent } from './OverrideStrategyTippyContent';
5
5
  export { getDeploymentStageTitle } from './utils';
6
- export * from './ConfigMapSecret';
@@ -20,15 +20,8 @@ export interface ConfigToolbarPopupMenuConfigType {
20
20
  disabled?: boolean;
21
21
  icon?: ReactNode | null;
22
22
  variant?: 'default' | 'negative';
23
- tooltipText?: string;
24
23
  }
25
24
  export declare enum ConfigToolbarPopupNodeType {
26
25
  DISCARD_DRAFT = "discardDraft",
27
26
  EDIT_HISTORY = "editHistory"
28
27
  }
29
- export interface OverrideStrategyTippyContentProps {
30
- /**
31
- * Would be rendered as li conveying the information about the merge strategy
32
- */
33
- children?: ReactNode;
34
- }
@@ -1,2 +1,2 @@
1
1
  import { DeploymentStageType } from '../../../../../Shared/constants';
2
- export declare const getDeploymentStageTitle: (stage: DeploymentStageType) => "-" | "pre-deployment" | "post-deployment" | "deployment";
2
+ export declare const getDeploymentStageTitle: (stage: DeploymentStageType) => "deployment" | "pre-deployment" | "post-deployment" | "-";
@@ -1 +1,2 @@
1
1
  export * from './types';
2
+ export * from './services';
@@ -0,0 +1,7 @@
1
+ import { MutableRefObject } from 'react';
2
+ import { UploadFileDTO, UploadFileProps } from '../../../../../Shared/types';
3
+ export declare const uploadCDPipelineFile: ({ file, appId, envId, allowedExtensions, maxUploadSize, abortControllerRef, }: UploadFileProps & {
4
+ appId: number;
5
+ envId: number;
6
+ abortControllerRef?: MutableRefObject<AbortController>;
7
+ }) => Promise<UploadFileDTO>;
@@ -0,0 +1 @@
1
+ export declare const SystemVariableIcon: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './SystemVariableIcon';
@@ -0,0 +1,3 @@
1
+ import { SelectPickerOptionType } from '../../../../../Shared/Components';
2
+ export declare const IO_VARIABLES_VALUE_COLUMN_BOOL_OPTIONS: SelectPickerOptionType<string>[];
3
+ export declare const IO_VARIABLES_VALUE_COLUMN_DATE_OPTIONS: SelectPickerOptionType<string>[];
@@ -0,0 +1,3 @@
1
+ export * from './services';
2
+ export * from './constants';
3
+ export * from './components';
@@ -0,0 +1,11 @@
1
+ import { MutableRefObject } from 'react';
2
+ import { UploadFileDTO } from '../../../../../Shared/types';
3
+ export declare const uploadCIPipelineFile: ({ file, appId, ciPipelineId, envId, allowedExtensions, maxUploadSize, abortControllerRef, }: {
4
+ file: File[];
5
+ appId: number;
6
+ ciPipelineId: number;
7
+ envId?: number;
8
+ allowedExtensions?: string[];
9
+ maxUploadSize?: number;
10
+ abortControllerRef?: MutableRefObject<AbortController>;
11
+ }) => Promise<UploadFileDTO>;
@@ -1,2 +1,3 @@
1
1
  export * from './AppConfigurations';
2
2
  export * from './CDPipeline';
3
+ export * from './CIPipeline';
@@ -1,4 +1,3 @@
1
1
  export * from './GlobalConfigurations';
2
2
  export * from './ResourceBrowser';
3
3
  export * from './Applications';
4
- export * from './App';
@@ -54,12 +54,6 @@ export type CollapsibleListItem<TabType extends TabOptions = 'navLink'> = Condit
54
54
  */
55
55
  tooltipProps?: TippyProps;
56
56
  };
57
- /**
58
- * If `true`, clears query parameters during navigation.
59
- *
60
- * @default false
61
- */
62
- clearQueryParamsOnNavigation?: boolean;
63
57
  };
64
58
  export interface CollapsibleListConfig<TabType extends TabOptions = 'navLink'> {
65
59
  /**
@@ -4,6 +4,7 @@ import { UseStateFiltersReturnType } from '../../../Common/Hooks';
4
4
  import { TooltipProps } from '@Common/Tooltip/types';
5
5
  import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
6
6
  import { SelectTextAreaProps } from '../SelectTextArea';
7
+ import { FileUploadProps } from '../FileUpload';
7
8
  /**
8
9
  * Interface representing header for a dynamic data table.
9
10
  * @template K - A string representing the key type.
@@ -24,7 +25,8 @@ export declare enum DynamicDataTableRowDataType {
24
25
  TEXT = "text",
25
26
  DROPDOWN = "dropdown",
26
27
  SELECT_TEXT = "select-text",
27
- BUTTON = "button"
28
+ BUTTON = "button",
29
+ FILE_UPLOAD = "file-upload"
28
30
  }
29
31
  export type DynamicDataTableCellPropsMap = {
30
32
  [DynamicDataTableRowDataType.TEXT]: Omit<ResizableTagTextAreaProps, 'id' | 'className' | 'minHeight' | 'maxHeight' | 'value' | 'onChange' | 'disabled' | 'disableOnBlurResizeToMinHeight' | 'refVar' | 'dependentRef'>;
@@ -36,6 +38,7 @@ export type DynamicDataTableCellPropsMap = {
36
38
  icon?: ReactNode;
37
39
  text: string;
38
40
  };
41
+ [DynamicDataTableRowDataType.FILE_UPLOAD]: Omit<FileUploadProps, 'className' | 'fileName' | 'onUpload' | 'multiple'>;
39
42
  };
40
43
  type DynamicDataTableCellData<T extends keyof DynamicDataTableCellPropsMap = keyof DynamicDataTableCellPropsMap> = T extends keyof DynamicDataTableCellPropsMap ? {
41
44
  type: T;
@@ -120,6 +123,7 @@ export type DynamicDataTableProps<K extends string, CustomStateType = Record<str
120
123
  * @param extraData - Additional data, such as a selected value for dropdowns.
121
124
  */
122
125
  onRowEdit: (row: DynamicDataTableRowType<K, CustomStateType>, headerKey: K, value: string, extraData: {
126
+ files?: File[];
123
127
  selectedValue?: SelectPickerOptionType<string>;
124
128
  }) => void;
125
129
  /**
@@ -0,0 +1,2 @@
1
+ import { FileUploadProps } from './types';
2
+ export declare const FileUpload: ({ isLoading, label, fileName, multiple, fileTypes, onUpload, }: FileUploadProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './FileUpload';
2
+ export * from './types';
@@ -0,0 +1,8 @@
1
+ export interface FileUploadProps {
2
+ isLoading?: boolean;
3
+ fileName: string;
4
+ onUpload: (files: File[]) => void;
5
+ multiple?: boolean;
6
+ label?: string;
7
+ fileTypes?: string[];
8
+ }
@@ -41,7 +41,7 @@ export * from './Collapse';
41
41
  export * from './Security';
42
42
  export * from './Button';
43
43
  export * from './InvalidYAMLTippy';
44
- export * from './EnterpriseTag';
45
44
  export * from './ConfirmationModal';
46
45
  export * from './DiffViewer';
47
46
  export * from './DynamicDataTable';
47
+ export * from './FileUpload';
@@ -1,6 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { Pair } from 'yaml';
3
- import { StrictRJSFSchema } from '@rjsf/utils';
4
3
  import { MaterialHistoryType } from '@Shared/Services/app.types';
5
4
  import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
6
5
  import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, WebhookEventNameType } from './types';
@@ -67,11 +66,10 @@ export declare const getDefaultValueFromType: (value: unknown) => {};
67
66
  */
68
67
  export declare const groupArrayByObjectKey: <T extends Record<string, any>, K extends keyof T>(array: T[], key: K) => Record<string, T[]>;
69
68
  /**
70
- * This function returns a null/zero value corresponding to @type
71
- *
72
- * @param type - a RJSF supported type
69
+ * @description - Function to get the lower case object
70
+ * @param input - The input object
71
+ * @returns Record<string, any>
73
72
  */
74
- export declare const getNullValueFromType: (type: StrictRJSFSchema["type"]) => any;
75
73
  export declare const getLowerCaseObject: (input: any) => Record<string, any>;
76
74
  /**
77
75
  * @description - Function to get the webhook date
@@ -61,10 +61,6 @@ export declare const useForm: <T extends Record<keyof T, any> = {}>(options?: {
61
61
  keepTouched?: boolean;
62
62
  /** A boolean indicating whether to retain the current error state of the form fields. */
63
63
  keepErrors?: boolean;
64
- /** A boolean indicating whether the form should check for dirty state upon reset. */
65
- triggerDirty?: boolean;
66
- /** A boolean indicating whether the initial values of the form should be retained after reset. If false, provided formData will become initial data. */
67
- keepInitialValues?: boolean;
68
64
  }) => void;
69
65
  /** An object representing additional form state. */
70
66
  formState: {
@@ -1,4 +1,3 @@
1
- import { OverrideMergeStrategyType } from '../../Pages/Applications';
2
1
  import { ReleaseTag } from '../../Common';
3
2
  interface WebhookDataType {
4
3
  id: number;
@@ -148,11 +147,9 @@ export declare enum CMSecretExternalType {
148
147
  }
149
148
  export interface ConfigDatum {
150
149
  name: string;
151
- mergeStrategy: OverrideMergeStrategyType;
152
150
  type: string;
153
151
  external: boolean;
154
152
  data: Record<string, any>;
155
- patchData: Record<string, any>;
156
153
  defaultData: Record<string, any>;
157
154
  global: boolean;
158
155
  externalType: CMSecretExternalType;
@@ -175,7 +172,6 @@ export interface ConfigMapSecretDataType {
175
172
  id: number;
176
173
  appId: number;
177
174
  configData: ConfigMapSecretDataConfigDatumDTO[];
178
- isDeletable: boolean;
179
175
  }
180
176
  export declare enum ConfigResourceType {
181
177
  ConfigMap = "ConfigMap",
@@ -1,6 +1,5 @@
1
1
  import { Dayjs } from 'dayjs';
2
- import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
3
- import { KeyValueListType } from './Components';
2
+ import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
4
3
  import { EnvironmentTypeEnum, PatchOperationType } from './constants';
5
4
  export declare enum EnvType {
6
5
  CHART = "helm_charts",
@@ -282,11 +281,27 @@ export interface GitTriggers {
282
281
  CiConfigureSourceType: string;
283
282
  CiConfigureSourceValue: string;
284
283
  }
284
+ export interface RuntimePluginVariables extends Pick<VariableType, 'name' | 'value' | 'defaultValue' | 'format' | 'fileReferenceId' | 'fileMountDir'> {
285
+ variableStepScope: string;
286
+ valueConstraint: ValueConstraintType & {
287
+ id: number;
288
+ };
289
+ stepVariableId: number;
290
+ valueType: RefVariableType;
291
+ stepName: string;
292
+ stepType: PluginType;
293
+ isRequired: boolean;
294
+ pluginIcon?: string;
295
+ description?: string;
296
+ }
285
297
  export interface RuntimeParamsAPIResponseType {
286
298
  envVariables: Record<string, string>;
299
+ runtimePluginVariables: RuntimePluginVariables[];
287
300
  }
288
301
  export interface RuntimeParamsTriggerPayloadType {
289
- runtimeParams: RuntimeParamsAPIResponseType;
302
+ runtimeParams: {
303
+ runtimePluginVariables: Pick<RuntimePluginVariables, 'name' | 'fileMountDir' | 'fileReferenceId' | 'value' | 'format' | 'variableStepScope'>[];
304
+ };
290
305
  }
291
306
  export declare enum CIMaterialSidebarType {
292
307
  CODE_SOURCE = "Code Source",
@@ -595,9 +610,6 @@ export interface ConfigKeysWithLockType {
595
610
  allowed: boolean;
596
611
  }
597
612
  export type DataAttributes = Record<`data-${string}`, unknown>;
598
- export interface RuntimeParamsListItemType extends KeyValueListType {
599
- id: number;
600
- }
601
613
  export declare enum RuntimeParamsHeadingType {
602
614
  KEY = "key",
603
615
  VALUE = "value"
@@ -739,4 +751,16 @@ export interface PreventOutsideFocusProps {
739
751
  identifier: string;
740
752
  preventFocus: boolean;
741
753
  }
754
+ export interface UploadFileDTO {
755
+ id: number;
756
+ name: string;
757
+ size: number;
758
+ mimeType: string;
759
+ extension: string;
760
+ }
761
+ export interface UploadFileProps {
762
+ file: File[];
763
+ allowedExtensions?: string[];
764
+ maxUploadSize?: number;
765
+ }
742
766
  export {};
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M5.99995 12.999H4.49995C4.0036 12.9985 3.51303 12.8925 3.0608 12.6879C2.60857 12.4833 2.20502 12.1849 1.87694 11.8124C1.54886 11.44 1.30376 11.002 1.1579 10.5276C1.01203 10.0531 0.968751 9.55309 1.03092 9.06065C1.09309 8.56821 1.25928 8.09462 1.51848 7.67132C1.77768 7.24802 2.12394 6.88469 2.53429 6.60545C2.94465 6.3262 3.4097 6.13744 3.89859 6.05167C4.38747 5.9659 4.88901 5.9851 5.36991 6.10799M4.99995 7.99902C5.00003 7.20679 5.18836 6.42592 5.54942 5.72076C5.91048 5.01559 6.43393 4.40631 7.07665 3.94312C7.71937 3.47994 8.46295 3.17611 9.24612 3.05667C10.0293 2.93722 10.8296 3.00559 11.5812 3.25613C12.3328 3.50668 13.0141 3.93222 13.5689 4.49771C14.1237 5.06319 14.5363 5.75242 14.7725 6.50861C15.0087 7.2648 15.0619 8.0663 14.9276 8.84706C14.7933 9.62783 14.4754 10.3655 14.0001 10.9993M7.37864 10.1204L9.49995 7.999M9.49995 7.999L11.6213 10.1204M9.49995 7.999V12.999" stroke="#0066CC" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,7 @@
1
+ <!--
2
+ - Copyright (c) 2024. Devtron Inc.
3
+ -->
4
+
5
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
6
+ <path d="M4.66667 14H13.5005C13.5661 14 13.6312 13.9871 13.6918 13.9619C13.7525 13.9368 13.8076 13.9 13.854 13.8536C13.9005 13.8071 13.9373 13.752 13.9624 13.6913C13.9876 13.6307 14.0005 13.5657 14.0005 13.5V5.5M10.5005 2H4.5C4.36739 2 4.24021 2.05268 4.14645 2.14645C4.05268 2.24021 4 2.36739 4 2.5V5.25M10.5005 2L14.0005 5.5M10.5005 2V5.5H14.0005M3.30612 7.80952L2 9.56463L3.30612 11.3197M6.02721 7.80952L7.33333 9.56463L6.02721 11.3197" stroke="#0066CC" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
7
+ </svg>
@@ -0,0 +1,9 @@
1
+ <!--
2
+ - Copyright (c) 2024. Devtron Inc.
3
+ -->
4
+
5
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
6
+ <path d="M2.66675 14.6667H13.3334" stroke="#664BEE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
7
+ <rect x="2.66675" y="8.66675" width="10.6667" height="3.33333" rx="1" stroke="#664BEE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
8
+ <path d="M5.88853 3.7765C5.6041 2.52497 6.55536 1.33325 7.8388 1.33325H8.16104C9.44448 1.33325 10.3957 2.52497 10.1113 3.77649L8.99992 8.66659H6.99992L5.88853 3.7765Z" stroke="#664BEE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
9
+ </svg>
@@ -0,0 +1,25 @@
1
+ <!--
2
+ - Copyright (c) 2024. Devtron Inc.
3
+ -
4
+ - Licensed under the Apache License, Version 2.0 (the "License");
5
+ - you may not use this file except in compliance with the License.
6
+ - You may obtain a copy of the License at
7
+ -
8
+ - http://www.apache.org/licenses/LICENSE-2.0
9
+ -
10
+ - Unless required by applicable law or agreed to in writing, software
11
+ - distributed under the License is distributed on an "AS IS" BASIS,
12
+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ - See the License for the specific language governing permissions and
14
+ - limitations under the License.
15
+ -->
16
+
17
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
18
+ <g id="ic-var-initial">
19
+ <g id="Vector">
20
+ <path d="M11.8244 6.26696V7.90053C11.8244 7.94068 11.847 7.96075 11.8922 7.96075H12.2686C13.1619 7.96075 13.6086 7.64207 13.6086 7.0047C13.6086 6.4376 13.1945 6.15404 12.3664 6.15404C12.2159 6.15404 12.0578 6.16659 11.8922 6.19168C11.847 6.20172 11.8244 6.22681 11.8244 6.26696ZM11.2147 10.9042C11.0992 10.9042 10.9989 10.8615 10.9135 10.7762C10.8282 10.6909 10.7856 10.5905 10.7856 10.4751V5.87551C10.7856 5.75506 10.8257 5.64716 10.906 5.55181C10.9863 5.45645 11.0867 5.40376 11.2071 5.39372C11.6337 5.35357 12.0453 5.3335 12.4417 5.3335C13.1795 5.3335 13.7315 5.47151 14.0979 5.74753C14.4642 6.01854 14.6474 6.40247 14.6474 6.89931C14.6474 7.25563 14.5496 7.5693 14.3538 7.84031C14.1631 8.11131 13.9047 8.30202 13.5784 8.41243C13.5734 8.41243 13.5709 8.41494 13.5709 8.41996C13.5709 8.43 13.5734 8.43501 13.5784 8.43501C13.8193 8.58557 14.0251 8.88167 14.1957 9.32331L14.6474 10.5052C14.6825 10.6006 14.67 10.6909 14.6098 10.7762C14.5546 10.8615 14.4768 10.9042 14.3764 10.9042H14.143C14.0126 10.9042 13.8946 10.8691 13.7892 10.7988C13.6838 10.7235 13.6086 10.6256 13.5634 10.5052L13.1418 9.3459C13.0515 9.105 12.9486 8.94691 12.8332 8.87164C12.7177 8.79636 12.5195 8.75872 12.2385 8.75872H11.8922C11.847 8.75872 11.8244 8.7813 11.8244 8.82647V10.4751C11.8244 10.5905 11.7818 10.6909 11.6965 10.7762C11.6162 10.8615 11.5183 10.9042 11.4029 10.9042H11.2147Z" fill="#596168"/>
21
+ <path d="M7.75703 6.34232L7.09457 8.70609C7.08955 8.72115 7.09206 8.73621 7.10209 8.75126C7.11213 8.76632 7.12468 8.77385 7.13973 8.77385H8.38937C8.40443 8.77385 8.41698 8.76632 8.42701 8.75126C8.43705 8.73621 8.43956 8.72115 8.43454 8.70609L7.77208 6.34232C7.77208 6.3373 7.76957 6.33479 7.76455 6.33479C7.75954 6.33479 7.75703 6.3373 7.75703 6.34232ZM5.80729 10.9043C5.70189 10.9043 5.61909 10.8616 5.55886 10.7763C5.49864 10.691 5.48609 10.5981 5.52122 10.4977L7.07951 5.81536C7.12468 5.69491 7.19745 5.59705 7.29782 5.52177C7.40321 5.44649 7.51864 5.40885 7.64411 5.40885H7.91511C8.0456 5.40885 8.16103 5.44649 8.2614 5.52177C8.36679 5.59705 8.43956 5.69491 8.47971 5.81536L10.038 10.4977C10.0731 10.5981 10.0606 10.691 10.0004 10.7763C9.94014 10.8616 9.85733 10.9043 9.75194 10.9043H9.48093C9.36048 10.9043 9.24756 10.8666 9.14217 10.7913C9.0418 10.711 8.97405 10.6107 8.93892 10.4902L8.69802 9.63956C8.693 9.59941 8.6654 9.57934 8.61521 9.57934H6.9139C6.86873 9.57934 6.84112 9.59941 6.83109 9.63956L6.59019 10.4902C6.56008 10.6107 6.49233 10.711 6.38694 10.7913C6.28657 10.8666 6.17365 10.9043 6.04818 10.9043H5.80729Z" fill="#596168"/>
22
+ <path d="M2.9112 10.4977L1.35291 5.81536C1.31778 5.71499 1.33033 5.62214 1.39055 5.53682C1.45077 5.45151 1.53358 5.40885 1.63897 5.40885H1.90998C2.03545 5.40885 2.15087 5.449 2.25627 5.5293C2.36166 5.60458 2.42941 5.70244 2.45952 5.82289L3.6113 9.8654C3.6113 9.87042 3.61381 9.87293 3.61883 9.87293C3.62384 9.87293 3.62635 9.87042 3.62635 9.8654L4.79319 5.81536C4.82832 5.69491 4.89607 5.59705 4.99644 5.52177C5.10183 5.44649 5.21726 5.40885 5.34273 5.40885H5.58362C5.68901 5.40885 5.77182 5.45151 5.83205 5.53682C5.89227 5.62214 5.90482 5.71499 5.86969 5.81536L4.3114 10.4977C4.27125 10.6182 4.19848 10.7161 4.09309 10.7913C3.99271 10.8666 3.87729 10.9043 3.7468 10.9043H3.47579C3.35033 10.9043 3.2349 10.8666 3.12951 10.7913C3.02914 10.7161 2.95637 10.6182 2.9112 10.4977Z" fill="#596168"/>
23
+ </g>
24
+ </g>
25
+ </svg>
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { OverrideMergeStrategyType } from './Pages/Applications';
2
1
  export interface customEnv {
3
2
  SENTRY_ENV?: string;
4
3
  SENTRY_ERROR_ENABLED?: boolean;
@@ -79,7 +78,6 @@ export interface customEnv {
79
78
  FEATURE_PROMO_EMBEDDED_MODAL_TITLE?: string;
80
79
  FEATURE_PROMO_EMBEDDED_IFRAME_URL?: string;
81
80
  FEATURE_BULK_RESTART_WORKLOADS_FROM_RB: string;
82
- FEATURE_DEFAULT_MERGE_STRATEGY?: OverrideMergeStrategyType;
83
81
  FEATURE_DEFAULT_LANDING_RB_ENABLE?: boolean;
84
82
  }
85
83
  declare global {