@devtron-labs/devtron-fe-common-lib 1.2.4-beta-14 → 1.2.4-beta-15

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 (74) hide show
  1. package/dist/{@code-editor-_xd9VoYJ.js → @code-editor-BSVDLRPR.js} +6231 -5698
  2. package/dist/{@common-rjsf-CEo9W3ac.js → @common-rjsf-C4tOt_0L.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 +28 -1
  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 +7 -1
  11. package/dist/Common/Constants.d.ts +2 -3
  12. package/dist/Common/CustomTagSelector/ResizableTagTextArea.d.ts +1 -1
  13. package/dist/Common/CustomTagSelector/Types.d.ts +8 -15
  14. package/dist/Common/Helper.d.ts +3 -3
  15. package/dist/Common/Markdown/MarkDown.d.ts +1 -1
  16. package/dist/Common/RJSF/Form.d.ts +1 -1
  17. package/dist/Common/RJSF/index.d.ts +1 -1
  18. package/dist/Common/Types.d.ts +16 -4
  19. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/types.d.ts +3 -21
  20. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/OverrideStrategyTippyContent.d.ts +1 -2
  21. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/index.d.ts +0 -1
  22. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/types.d.ts +0 -7
  23. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/utils.d.ts +1 -1
  24. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/index.d.ts +1 -0
  25. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/services.d.ts +7 -0
  26. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/components/SystemVariableIcon.d.ts +1 -0
  27. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/components/index.d.ts +1 -0
  28. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/constants.d.ts +3 -0
  29. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/index.d.ts +3 -0
  30. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/services.d.ts +11 -0
  31. package/dist/Pages/Applications/DevtronApps/Details/index.d.ts +1 -0
  32. package/dist/Pages/index.d.ts +0 -1
  33. package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +0 -6
  34. package/dist/Shared/Components/DynamicDataTable/DynamicDataTable.d.ts +2 -0
  35. package/dist/Shared/Components/DynamicDataTable/DynamicDataTableHeader.d.ts +2 -0
  36. package/dist/Shared/Components/DynamicDataTable/DynamicDataTableRow.d.ts +2 -0
  37. package/dist/Shared/Components/DynamicDataTable/constants.d.ts +2 -0
  38. package/dist/Shared/Components/DynamicDataTable/index.d.ts +2 -0
  39. package/dist/Shared/Components/DynamicDataTable/types.d.ts +166 -0
  40. package/dist/Shared/Components/DynamicDataTable/utils.d.ts +5 -0
  41. package/dist/Shared/Components/FileUpload/FileUpload.d.ts +2 -0
  42. package/dist/Shared/Components/FileUpload/index.d.ts +2 -0
  43. package/dist/Shared/Components/FileUpload/types.d.ts +8 -0
  44. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +1 -1
  45. package/dist/Shared/Components/SelectTextArea/SelectTextArea.d.ts +2 -0
  46. package/dist/Shared/Components/SelectTextArea/index.d.ts +2 -0
  47. package/dist/Shared/Components/SelectTextArea/types.d.ts +12 -0
  48. package/dist/Shared/Components/index.d.ts +2 -1
  49. package/dist/Shared/Helpers.d.ts +3 -5
  50. package/dist/Shared/Hooks/useForm/useForm.d.ts +0 -4
  51. package/dist/Shared/Services/app.types.d.ts +0 -4
  52. package/dist/Shared/types.d.ts +33 -2
  53. package/dist/assets/@code-editor.css +1 -1
  54. package/dist/assets/ic-clear-square.e60de021.svg +1 -0
  55. package/dist/assets/ic-cloud-upload.18066e05.svg +1 -0
  56. package/dist/assets/ic-file-code.21a1f748.svg +1 -0
  57. package/dist/assets/ic-stamp.8689f42d.svg +1 -0
  58. package/dist/assets/ic-var-initial.afdaa854.svg +1 -0
  59. package/dist/index.d.ts +0 -2
  60. package/dist/index.js +515 -511
  61. package/package.json +1 -1
  62. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/index.d.ts +0 -2
  63. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/types.d.ts +0 -2
  64. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/utils.d.ts +0 -6
  65. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/index.d.ts +0 -1
  66. package/dist/Pages/App/AppConfiguration/index.d.ts +0 -1
  67. package/dist/Pages/App/index.d.ts +0 -1
  68. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/ConfigMapSecret/index.d.ts +0 -1
  69. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/ConfigMapSecret/utils.d.ts +0 -3
  70. package/dist/Shared/Components/EnterpriseTag/EnterpriseTag.component.d.ts +0 -2
  71. package/dist/Shared/Components/EnterpriseTag/index.d.ts +0 -1
  72. package/dist/assets/ic-file-code.80000c9b.svg +0 -1
  73. package/dist/assets/ic-medal.4a7e5cbc.svg +0 -1
  74. package/dist/assets/ic-stamp.526499d2.svg +0 -1
@@ -1,5 +1,6 @@
1
+ import { MutableRefObject } from 'react';
1
2
  import { RuntimeParamsAPIResponseType, RuntimeParamsListItemType } from '../Shared/types';
2
- import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse } from './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 {
@@ -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;
@@ -95,6 +94,8 @@ export declare const ROUTES: {
95
94
  USER_LIST_MIN: string;
96
95
  CONFIG_DATA: string;
97
96
  K8S_RESOURCE_LIST: string;
97
+ FILE_UPLOAD: string;
98
+ PLUGIN_GLOBAL_VARIABLES: string;
98
99
  };
99
100
  export declare enum KEY_VALUE {
100
101
  KEY = "key",
@@ -259,7 +260,6 @@ export declare const API_STATUS_CODES: {
259
260
  EXPECTATION_FAILED: number;
260
261
  UNPROCESSABLE_ENTITY: number;
261
262
  LOCKED: number;
262
- UNPROCESSABLE_CONTENT: number;
263
263
  };
264
264
  export declare enum SERVER_MODE {
265
265
  EA_ONLY = "EA_ONLY",
@@ -311,4 +311,3 @@ export declare enum GitProviderType {
311
311
  * Formats the schema removing any irregularity in the existing schema
312
312
  */
313
313
  export declare const getFormattedSchema: (schema?: string) => string;
314
- export declare const UNCHANGED_ARRAY_ELEMENT_SYMBOL: unique symbol;
@@ -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,3 +1,4 @@
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 {
@@ -48,24 +49,16 @@ export interface TagLabelValueSelectorType {
48
49
  tagInputType?: KEY_VALUE;
49
50
  placeholder?: string;
50
51
  tabIndex?: number;
51
- refVar?: React.MutableRefObject<HTMLTextAreaElement>;
52
- dependentRef?: React.MutableRefObject<HTMLTextAreaElement>;
52
+ refVar?: MutableRefObject<HTMLTextAreaElement>;
53
+ dependentRef?: MutableRefObject<HTMLTextAreaElement>;
53
54
  noBackDrop?: boolean;
54
55
  }
55
- export interface ResizableTagTextAreaProps {
56
- className?: string;
56
+ export interface ResizableTagTextAreaProps extends Omit<DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, 'value'> {
57
57
  minHeight?: number;
58
58
  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;
59
+ value: string;
60
+ refVar?: MutableRefObject<HTMLTextAreaElement>;
61
+ dependentRef?: MutableRefObject<HTMLTextAreaElement>;
62
+ dependentRefs?: Record<string | number, MutableRefObject<HTMLTextAreaElement>>;
70
63
  disableOnBlurResizeToMinHeight?: boolean;
71
64
  }
@@ -58,10 +58,9 @@ export declare const getFilteredChartVersions: (charts: any, selectedChartType:
58
58
  * @param {object} object from which we need to delete nulls in its arrays
59
59
  * @returns object after removing (in-place) the null items in arrays
60
60
  */
61
- export declare const recursivelyRemoveSymbolFromArraysInObject: (object: object, symbol: symbol) => object;
61
+ export declare const recursivelyRemoveNullsFromArraysInObject: (object: object) => object;
62
62
  /**
63
63
  * Merges the objects into one object
64
- * Works more like Object.assign; that doesn't deep copy
65
64
  * @param {object[]} objects list of js objects
66
65
  * @returns object after the merge
67
66
  */
@@ -90,7 +89,7 @@ export declare const getRegexMatchPositions: (string: string, regex: RegExp) =>
90
89
  export declare const powerSetOfSubstringsFromStart: (strings: string[], regex: RegExp) => string[];
91
90
  export declare const convertJSONPointerToJSONPath: (pointer: string) => string;
92
91
  export declare const flatMapOfJSONPaths: (paths: string[], json: object, resultType?: JSONPathOptions["resultType"]) => string[];
93
- export declare const applyCompareDiffOnUneditedDocument: (uneditedDocument: object, editedDocument: object) => any;
92
+ export declare const applyCompareDiffOnUneditedDocument: (uneditedDocument: object, editedDocument: object) => object;
94
93
  /**
95
94
  * Returns a debounced variant of the function
96
95
  */
@@ -134,4 +133,5 @@ export declare const getSanitizedIframe: (iframeString: string) => string;
134
133
  * This method adds default attributes to iframe - title, loading ="lazy", width="100%", height="100%"
135
134
  */
136
135
  export declare const getIframeWithDefaultAttributes: (iframeString: string, defaultName?: string) => string;
136
+ export declare const getGoLangFormattedDateWithTimezone: (dateFormat: string) => string;
137
137
  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';
@@ -1,9 +1,10 @@
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 { 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, SortingOrder, TaskErrorObj, VariableTypeFormat } from '.';
7
8
  /**
8
9
  * Generic response type object with support for overriding the result type
9
10
  *
@@ -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;
@@ -93,6 +94,7 @@ export interface TippyCustomizedProps {
93
94
  documentationLink?: string;
94
95
  documentationLinkText?: string;
95
96
  children: React.ReactElement<any>;
97
+ disableClose?: boolean;
96
98
  }
97
99
  export interface InfoIconTippyProps extends Pick<TippyCustomizedProps, 'heading' | 'infoText' | 'iconClass' | 'documentationLink' | 'documentationLinkText' | 'additionalContent' | 'placement' | 'Icon' | 'headingInfo'> {
98
100
  dataTestid?: string;
@@ -591,7 +593,7 @@ export interface CDMaterialsMetaInfo {
591
593
  * This is the ID of user that has request the material
592
594
  */
593
595
  requestedUserId: number;
594
- runtimeParams: RuntimeParamsListItemType[];
596
+ runtimeParams: RuntimePluginVariables[];
595
597
  }
596
598
  export interface ImagePromotionMaterialInfo {
597
599
  isApprovalPendingForPromotion: boolean;
@@ -870,4 +872,14 @@ export interface WidgetEventDetails {
870
872
  age: string;
871
873
  lastSeen: string;
872
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
+ };
873
885
  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
  /**
@@ -0,0 +1,2 @@
1
+ import { DynamicDataTableProps } from './types';
2
+ export declare const DynamicDataTable: <K extends string, CustomStateType = Record<string, unknown>>({ headers, ...props }: DynamicDataTableProps<K, CustomStateType>) => JSX.Element;
@@ -0,0 +1,2 @@
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;
@@ -0,0 +1,2 @@
1
+ import { DynamicDataTableRowProps } from './types';
2
+ export declare const DynamicDataTableRow: <K extends string, CustomStateType = Record<string, unknown>>({ rows, headers, readOnly, isDeletionNotAllowed, cellError, actionButtonConfig, onRowEdit, onRowDelete, leadingCellIcon, trailingCellIcon, buttonCellWrapComponent, }: DynamicDataTableRowProps<K, CustomStateType>) => 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,166 @@
1
+ import { DetailedHTMLProps, ReactElement, ReactNode } from 'react';
2
+ import { ResizableTagTextAreaProps } from '../../../Common/CustomTagSelector';
3
+ import { UseStateFiltersReturnType } from '../../../Common/Hooks';
4
+ import { TooltipProps } from '@Common/Tooltip/types';
5
+ import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
6
+ import { SelectTextAreaProps } from '../SelectTextArea';
7
+ import { FileUploadProps } from '../FileUpload';
8
+ /**
9
+ * Interface representing header for a dynamic data table.
10
+ * @template K - A string representing the key type.
11
+ */
12
+ export type DynamicDataTableHeaderType<K extends string> = {
13
+ /** The display label of the header, shown in the table's column header. */
14
+ label: string;
15
+ /** The unique key associated with the header, used to map the column to data fields. */
16
+ key: K;
17
+ /** The width of the column, defined as a CSS string (e.g., "100px", "10%", "1fr", or "auto"). */
18
+ width: string;
19
+ /** An optional boolean indicating whether the column is sortable. */
20
+ isSortable?: boolean;
21
+ /** An optional boolean to control the visibility of the column. */
22
+ isHidden?: boolean;
23
+ };
24
+ export declare enum DynamicDataTableRowDataType {
25
+ TEXT = "text",
26
+ DROPDOWN = "dropdown",
27
+ SELECT_TEXT = "select-text",
28
+ BUTTON = "button",
29
+ FILE_UPLOAD = "file-upload"
30
+ }
31
+ export type DynamicDataTableCellPropsMap = {
32
+ [DynamicDataTableRowDataType.TEXT]: Omit<ResizableTagTextAreaProps, 'id' | 'className' | 'minHeight' | 'maxHeight' | 'value' | 'onChange' | 'disabled' | 'disableOnBlurResizeToMinHeight' | 'refVar' | 'dependentRef'>;
33
+ [DynamicDataTableRowDataType.DROPDOWN]: Omit<SelectPickerProps<string, false>, 'inputId' | 'value' | 'onChange' | 'fullWidth' | 'isDisabled'>;
34
+ [DynamicDataTableRowDataType.SELECT_TEXT]: Omit<SelectTextAreaProps, 'value' | 'onChange' | 'inputId' | 'isDisabled' | 'dependentRef' | 'refVar' | 'textAreaProps'> & {
35
+ textAreaProps?: Omit<SelectTextAreaProps['textAreaProps'], 'className' | 'disableOnBlurResizeToMinHeight' | 'minHeight' | 'maxHeight'>;
36
+ };
37
+ [DynamicDataTableRowDataType.BUTTON]: Pick<DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, 'onClick'> & {
38
+ icon?: ReactNode;
39
+ text: string;
40
+ };
41
+ [DynamicDataTableRowDataType.FILE_UPLOAD]: Omit<FileUploadProps, 'className' | 'fileName' | 'onUpload' | 'multiple'>;
42
+ };
43
+ type DynamicDataTableCellData<T extends keyof DynamicDataTableCellPropsMap = keyof DynamicDataTableCellPropsMap> = T extends keyof DynamicDataTableCellPropsMap ? {
44
+ type: T;
45
+ props: DynamicDataTableCellPropsMap[T];
46
+ } : never;
47
+ /**
48
+ * Type representing a key-value row.
49
+ * @template K - A string representing the key type.
50
+ */
51
+ export type DynamicDataTableRowType<K extends string, CustomStateType = Record<string, unknown>> = {
52
+ data: {
53
+ [key in K]: {
54
+ value: string;
55
+ disabled?: boolean;
56
+ /** An optional boolean indicating if an asterisk should be shown. */
57
+ required?: boolean;
58
+ /** An optional tooltip to show when hovering over cell. */
59
+ tooltip?: Partial<Pick<TooltipProps, 'content' | 'className'>>;
60
+ } & DynamicDataTableCellData;
61
+ };
62
+ id: string | number;
63
+ /** */
64
+ customState?: CustomStateType;
65
+ /** An optional boolean indicating if row deletion is disabled. */
66
+ disableDelete?: boolean;
67
+ };
68
+ /**
69
+ * Represents the validation state of a cell in a dynamic data table.
70
+ */
71
+ export type DynamicDataTableCellValidationState = {
72
+ isValid: boolean;
73
+ errorMessages: string[];
74
+ };
75
+ /**
76
+ * Defines the structure of validation errors for a cell.
77
+ *
78
+ * `K` represents the column `key` of the cell (i.e., the column identifiers).
79
+ */
80
+ export type DynamicDataTableCellErrorType<K extends string> = {
81
+ [rowId: string | number]: Partial<Record<K, DynamicDataTableCellValidationState>>;
82
+ };
83
+ type DynamicDataTableCellIcon<K extends string, CustomStateType = Record<string, unknown>> = {
84
+ [key in K]?: (row: DynamicDataTableRowType<K, CustomStateType>) => ReactNode;
85
+ };
86
+ /**
87
+ * Interface representing the properties for the dynamic data table component.
88
+ * @template K - A string representing the key type.
89
+ */
90
+ export type DynamicDataTableProps<K extends string, CustomStateType = Record<string, unknown>> = {
91
+ /**
92
+ * An array containing the headers for the data table. \
93
+ * Each header defines a column with its label, key, width, and optional settings.
94
+ */
95
+ headers: DynamicDataTableHeaderType<K>[];
96
+ /**
97
+ * An array of rows where each row contains data corresponding to the table headers.
98
+ */
99
+ rows: DynamicDataTableRowType<K, CustomStateType>[];
100
+ /** Optional configuration for sorting the table. */
101
+ sortingConfig?: Pick<UseStateFiltersReturnType<K>, 'sortBy' | 'sortOrder' | 'handleSorting'>;
102
+ /** Optional configuration for displaying an icon in the leading position of a cell. */
103
+ leadingCellIcon?: DynamicDataTableCellIcon<K, CustomStateType>;
104
+ /** Optional configuration for displaying an icon in the trailing position of a cell. */
105
+ trailingCellIcon?: DynamicDataTableCellIcon<K, CustomStateType>;
106
+ /** An optional function to render a custom wrapper component for the type `DynamicDataTableRowDataType.BUTTON`. */
107
+ buttonCellWrapComponent?: (row: DynamicDataTableRowType<K, CustomStateType>) => ReactElement;
108
+ /** An optional React node for a custom header component. */
109
+ headerComponent?: ReactNode;
110
+ /** When true, data addition field will not be shown. */
111
+ isAdditionNotAllowed?: boolean;
112
+ /** When true, data addition field will not be shown. */
113
+ isDeletionNotAllowed?: boolean;
114
+ /** When true, data add or update is disabled. */
115
+ readOnly?: boolean;
116
+ /** Function to handle the addition of a new row to the table. */
117
+ onRowAdd: () => void;
118
+ /**
119
+ * Function to handle changes in the table rows.
120
+ * @param row - The row that changed.
121
+ * @param headerKey - The key of the header that changed.
122
+ * @param value - The value of the cell.
123
+ * @param extraData - Additional data, such as a selected value for dropdowns.
124
+ */
125
+ onRowEdit: (row: DynamicDataTableRowType<K, CustomStateType>, headerKey: K, value: string, extraData: {
126
+ files?: File[];
127
+ selectedValue?: SelectPickerOptionType<string>;
128
+ }) => void;
129
+ /**
130
+ * Function to handle row deletions.
131
+ * @param row - The row that was deleted.
132
+ */
133
+ onRowDelete: (row: DynamicDataTableRowType<K, CustomStateType>) => void;
134
+ /** Optional configuration for rendering a custom action button in a row. */
135
+ actionButtonConfig?: {
136
+ /**
137
+ * Function to render the action button.
138
+ * @param row - The current row being rendered.
139
+ * @returns A React node representing the action button.
140
+ */
141
+ renderer: (row: DynamicDataTableRowType<K, CustomStateType>) => ReactNode;
142
+ /**
143
+ * This represents under which header key the action button will be rendered.
144
+ */
145
+ key: K;
146
+ /**
147
+ * The width of the action button.
148
+ * @default '33px'
149
+ */
150
+ width?: string;
151
+ /**
152
+ * The position of the action button under the header key.
153
+ * @default 'start'
154
+ */
155
+ position?: 'start' | 'end';
156
+ };
157
+ /**
158
+ * Validation state for a specific cell in a dynamic data table.
159
+ */
160
+ cellError?: DynamicDataTableCellErrorType<K>;
161
+ };
162
+ export interface DynamicDataTableHeaderProps<K extends string, CustomStateType = Record<string, unknown>> extends Pick<DynamicDataTableProps<K, CustomStateType>, 'headers' | 'rows' | 'headerComponent' | 'sortingConfig' | 'onRowAdd' | 'readOnly' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'actionButtonConfig'> {
163
+ }
164
+ export interface DynamicDataTableRowProps<K extends string, CustomStateType = Record<string, unknown>> extends Pick<DynamicDataTableProps<K, CustomStateType>, 'rows' | 'headers' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'readOnly' | 'onRowEdit' | 'onRowDelete' | 'actionButtonConfig' | 'cellError' | 'leadingCellIcon' | 'trailingCellIcon' | 'buttonCellWrapComponent'> {
165
+ }
166
+ export {};
@@ -0,0 +1,5 @@
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;
5
+ export declare const rowTypeHasInputField: (type: DynamicDataTableRowDataType) => boolean;
@@ -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
+ }
@@ -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
+ };
@@ -41,6 +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';
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