@devtron-labs/devtron-fe-common-lib 1.2.3-beta-1 → 1.2.3-beta-2

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 (47) hide show
  1. package/dist/{@code-editor-DHk1T-mO.js → @code-editor-BoiJOahc.js} +5235 -5230
  2. package/dist/{@common-rjsf-DvOQq0L2.js → @common-rjsf-CSlAKJfL.js} +2 -2
  3. package/dist/{@framer-motion-DHY98qq3.js → @framer-motion-DFECMTRh.js} +1 -1
  4. package/dist/{@react-dates-WNnwjI5S.js → @react-dates-MalCS5BJ.js} +1 -1
  5. package/dist/{@react-select-BbR996pa.js → @react-select-B8JuvbeY.js} +50 -50
  6. package/dist/{@vendor-RU8AW1bK.js → @vendor-CPMO6uwj.js} +94 -93
  7. package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +2 -1
  8. package/dist/Common/CodeEditor/types.d.ts +2 -1
  9. package/dist/Common/Common.service.d.ts +1 -2
  10. package/dist/Common/Constants.d.ts +2 -0
  11. package/dist/Common/Helper.d.ts +2 -2
  12. package/dist/Common/Markdown/MarkDown.d.ts +1 -1
  13. package/dist/Common/RJSF/index.d.ts +1 -1
  14. package/dist/Common/Types.d.ts +41 -50
  15. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/index.d.ts +2 -0
  16. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/types.d.ts +2 -0
  17. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/utils.d.ts +6 -0
  18. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/index.d.ts +1 -0
  19. package/dist/Pages/App/AppConfiguration/index.d.ts +1 -0
  20. package/dist/Pages/App/index.d.ts +1 -0
  21. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/types.d.ts +21 -3
  22. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/OverrideStrategyTippyContent.d.ts +2 -1
  23. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/types.d.ts +7 -0
  24. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/utils.d.ts +1 -1
  25. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/types.d.ts +2 -1
  26. package/dist/Pages/index.d.ts +1 -0
  27. package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +6 -0
  28. package/dist/Shared/Components/EnterpriseTag/EnterpriseTag.component.d.ts +2 -0
  29. package/dist/Shared/Components/EnterpriseTag/index.d.ts +1 -0
  30. package/dist/Shared/Components/FeatureDescription/FeatureDescriptionModal.d.ts +1 -1
  31. package/dist/Shared/Components/FeatureDescription/FeatureTitleWithInfo.d.ts +1 -1
  32. package/dist/Shared/Components/FeatureDescription/types.d.ts +6 -34
  33. package/dist/Shared/Components/index.d.ts +1 -0
  34. package/dist/Shared/Helpers.d.ts +8 -7
  35. package/dist/Shared/Hooks/useForm/useForm.d.ts +4 -0
  36. package/dist/Shared/Services/app.types.d.ts +5 -2
  37. package/dist/Shared/constants.d.ts +0 -7
  38. package/dist/Shared/types.d.ts +5 -17
  39. package/dist/assets/ic-file-code.80000c9b.svg +1 -0
  40. package/dist/assets/ic-medal.4a7e5cbc.svg +1 -0
  41. package/dist/assets/ic-stamp.526499d2.svg +1 -0
  42. package/dist/index.d.ts +2 -0
  43. package/dist/index.js +397 -399
  44. package/package.json +1 -1
  45. package/dist/assets/ic-file-code.21a1f748.svg +0 -1
  46. package/dist/assets/ic-stamp.8689f42d.svg +0 -1
  47. /package/dist/assets/{ic-arrow-square-out.3d1a0d41.svg → ic-arrow-square-out.1be837ac.svg} +0 -0
@@ -1,3 +1,3 @@
1
1
  import { MarkDownProps } from './Types';
2
- declare const MarkDown: ({ setExpandableIcon, markdown, className, breaks, disableEscapedText, ...props }: MarkDownProps) => JSX.Element;
2
+ declare const MarkDown: ({ setExpandableIcon, markdown: markdownProp, className, breaks, disableEscapedText, ...props }: MarkDownProps) => JSX.Element;
3
3
  export default MarkDown;
@@ -1,4 +1,4 @@
1
1
  export { RJSFForm } from './Form';
2
- export * from './types';
2
+ export type * from './types';
3
3
  export { getInferredTypeFromValueType, getRedirectionProps } from './utils';
4
4
  export { HIDE_SUBMIT_BUTTON_UI_SCHEMA } from './constants';
@@ -1,5 +1,5 @@
1
1
  import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObject } from 'react';
2
- import { TippyProps } from '@tippyjs/react';
2
+ import { Placement } from 'tippy.js';
3
3
  import { UserGroupDTO } from '../Pages/GlobalConfigurations';
4
4
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
5
5
  import { MandatoryPluginBaseStateType, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
@@ -65,7 +65,7 @@ export interface CheckboxProps {
65
65
  id?: string;
66
66
  dataTestId?: string;
67
67
  }
68
- export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
68
+ export interface TippyCustomizedProps {
69
69
  theme: TippyTheme;
70
70
  visible?: boolean;
71
71
  heading?: ReactNode | string;
@@ -73,7 +73,7 @@ export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
73
73
  noHeadingBorder?: boolean;
74
74
  infoTextHeading?: string;
75
75
  hideHeading?: boolean;
76
- placement?: TippyProps['placement'];
76
+ placement?: Placement;
77
77
  className?: string;
78
78
  Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
79
79
  iconPath?: string;
@@ -273,6 +273,21 @@ export declare enum ManualApprovalType {
273
273
  any = "ANY",
274
274
  notConfigured = "NOT_CONFIGURED"
275
275
  }
276
+ export interface UserGroupApproverType {
277
+ email: string;
278
+ hasAccess: boolean;
279
+ }
280
+ export interface ImageApprovalPolicyUserGroupDataType {
281
+ dataStore: Record<string, UserGroupApproverType>;
282
+ requiredCount: number;
283
+ emails: string[];
284
+ }
285
+ export interface ImageApprovalPolicyType {
286
+ isPolicyConfigured: boolean;
287
+ specificUsersData: ImageApprovalPolicyUserGroupDataType;
288
+ userGroupData: Record<string, ImageApprovalPolicyUserGroupDataType>;
289
+ validGroups: string[];
290
+ }
276
291
  export type ImageApprovalUsersInfoDTO = Record<string, Pick<UserGroupDTO, 'identifier' | 'name'>[]>;
277
292
  export interface UserApprovalConfigType {
278
293
  type: ManualApprovalType;
@@ -285,6 +300,13 @@ export interface UserApprovalConfigType {
285
300
  requiredCount: number;
286
301
  })[];
287
302
  }
303
+ export type UserApprovalConfigPayloadType = ({
304
+ type: ManualApprovalType.any;
305
+ } & Pick<UserApprovalConfigType, 'requiredCount'>) | ({
306
+ type: ManualApprovalType.specific;
307
+ } & Pick<UserApprovalConfigType, 'userGroups' | 'specificUsers'>) | {
308
+ type: ManualApprovalType.notConfigured;
309
+ };
288
310
  interface ApprovalUserDataType {
289
311
  dataId: number;
290
312
  userActionTime: string;
@@ -294,44 +316,12 @@ interface ApprovalUserDataType {
294
316
  userResponse: number;
295
317
  userGroups?: Pick<UserGroupDTO, 'identifier' | 'name'>[];
296
318
  }
297
- export interface UserApprovalInfo {
298
- requiredCount: number;
299
- currentCount: number;
300
- approverList: {
301
- hasApproved: boolean;
302
- canApprove: boolean;
303
- identifier: string;
304
- }[];
305
- }
306
- export declare enum ApprovalConfigDataKindType {
307
- configMap = "CM",
308
- configSecret = "CS",
309
- deploymentTemplate = "DEPLOYMENT_TEMPLATE"
310
- }
311
- export interface ApprovalConfigDataType extends Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> {
312
- kind: ApprovalConfigDataKindType | null;
313
- anyUserApprovedInfo: UserApprovalInfo;
314
- specificUsersApprovedInfo: UserApprovalInfo;
315
- userGroupsApprovedInfo: Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> & {
316
- userGroups: (UserApprovalInfo & {
317
- groupIdentifier: UserGroupDTO['identifier'];
318
- groupName: UserGroupDTO['name'];
319
- })[];
320
- };
321
- }
322
- export declare enum ApprovalRuntimeStateType {
323
- init = 0,
324
- requested = 1,
325
- approved = 2,
326
- consumed = 3
327
- }
328
319
  export interface UserApprovalMetadataType {
329
320
  approvalRequestId: number;
330
- approvalRuntimeState: ApprovalRuntimeStateType;
321
+ approvalRuntimeState: number;
322
+ approvedUsersData: ApprovalUserDataType[];
331
323
  requestedUserData: ApprovalUserDataType;
332
- hasCurrentUserApproved: boolean;
333
- canCurrentUserApprove: boolean;
334
- approvalConfigData: ApprovalConfigDataType;
324
+ approvalConfig?: UserApprovalConfigType;
335
325
  }
336
326
  export declare enum FilterStates {
337
327
  ALLOWED = 0,
@@ -388,6 +378,7 @@ export interface CDMaterialListModalServiceUtilProps {
388
378
  artifactId?: number;
389
379
  artifactStatus?: string;
390
380
  disableDefaultSelection?: boolean;
381
+ userApprovalConfig?: UserApprovalConfigType;
391
382
  }
392
383
  export interface CDMaterialType {
393
384
  index: number;
@@ -523,7 +514,8 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
523
514
  primaryBranchAfterRegex?: string;
524
515
  storageConfigured?: boolean;
525
516
  deploymentAppDeleteRequest?: boolean;
526
- approvalConfigData: ApprovalConfigDataType;
517
+ approvalUsers?: string[];
518
+ userApprovalConfig?: UserApprovalConfigType;
527
519
  requestedUserId?: number;
528
520
  showPluginWarning: boolean;
529
521
  helmPackageName?: string;
@@ -580,17 +572,14 @@ export interface FilterConditionsListType {
580
572
  description: string;
581
573
  conditions: FilterConditionsInfo[];
582
574
  }
583
- export interface DeploymentApprovalInfoType {
584
- eligibleApprovers: {
585
- specificUsers: Pick<UserApprovalInfo, 'approverList'>;
586
- anyUsers: Pick<UserApprovalInfo, 'approverList'>;
587
- userGroups: (Pick<ApprovalConfigDataType['userGroupsApprovedInfo']['userGroups'][number], 'groupIdentifier' | 'groupName'> & Pick<UserApprovalInfo, 'approverList'>)[];
588
- };
589
- approvalConfigData: ApprovalConfigDataType;
590
- }
591
575
  export interface CDMaterialsApprovalInfo {
576
+ approvalUsers: string[];
577
+ userApprovalConfig: UserApprovalConfigType;
592
578
  canApproverDeploy: boolean;
593
- deploymentApprovalInfo: DeploymentApprovalInfoType;
579
+ /**
580
+ * Only available incase of approvals do'nt use in cd materials or any other flow since approvalUsers are not present there
581
+ */
582
+ imageApprovalPolicyDetails: ImageApprovalPolicyType;
594
583
  }
595
584
  export interface CDMaterialsMetaInfo {
596
585
  tagsEditable: boolean;
@@ -669,6 +658,7 @@ export interface AppEnvironment {
669
658
  appStatus?: string;
670
659
  deploymentAppDeleteRequest?: boolean;
671
660
  isVirtualEnvironment?: boolean;
661
+ isProtected?: boolean;
672
662
  pipelineId?: number;
673
663
  latestCdWorkflowRunnerId?: number;
674
664
  commits?: string[];
@@ -719,6 +709,7 @@ export interface CdPipeline {
719
709
  parentPipelineType?: string;
720
710
  deploymentAppDeleteRequest?: boolean;
721
711
  deploymentAppCreated?: boolean;
712
+ userApprovalConfig?: UserApprovalConfigType;
722
713
  isVirtualEnvironment?: boolean;
723
714
  deploymentAppType: DeploymentAppTypes;
724
715
  helmPackageName?: string;
@@ -727,7 +718,6 @@ export interface CdPipeline {
727
718
  isProdEnv?: boolean;
728
719
  isGitOpsRepoNotConfigured?: boolean;
729
720
  isDeploymentBlocked?: boolean;
730
- approvalConfigData: ApprovalConfigDataType;
731
721
  }
732
722
  export interface ExternalCiConfig {
733
723
  id: number;
@@ -829,11 +819,12 @@ export interface Point {
829
819
  export interface EdgeNodeType {
830
820
  height: number;
831
821
  width: number;
822
+ userApprovalConfig?: UserApprovalConfigType;
832
823
  type?: any;
833
824
  id?: number | string;
834
825
  }
835
826
  export interface EdgeEndNodeType extends EdgeNodeType {
836
- approvalConfigData: ApprovalConfigDataType;
827
+ userApprovalConfig?: UserApprovalConfigType;
837
828
  }
838
829
  /**
839
830
  * Search params for sorting configuration
@@ -0,0 +1,2 @@
1
+ export { ViewError as GUIViewError } from './utils';
2
+ export type { ViewErrorType as GUIViewErrorType } from './types';
@@ -0,0 +1,2 @@
1
+ export interface ViewErrorType extends Record<'title' | 'subTitle', string> {
2
+ }
@@ -0,0 +1,6 @@
1
+ import { ViewErrorType } from './types';
2
+ export declare class ViewError implements ViewErrorType {
3
+ title: string;
4
+ subTitle: string;
5
+ constructor(title: string, subTitle: string);
6
+ }
@@ -0,0 +1 @@
1
+ export * from './GUIView';
@@ -0,0 +1 @@
1
+ export * from './DeploymentTemplate';
@@ -0,0 +1 @@
1
+ export * from './AppConfiguration';
@@ -1,4 +1,5 @@
1
1
  import { DraftMetadataDTO, TemplateListType } from '../../../../../../Shared/Services';
2
+ import { ServerErrors } from '../../../../../../Common/ServerError';
2
3
  import { OverrideMergeStrategyType } from '../types';
3
4
  export type DeploymentChartOptionkind = 'base' | 'env' | 'chartVersion' | 'deployment';
4
5
  export interface DeploymentChartVersionType {
@@ -108,15 +109,15 @@ interface BaseDeploymentTemplateConfigState {
108
109
  environmentConfig?: never;
109
110
  mergeStrategy?: never;
110
111
  }
111
- interface EnvironmentOverrideDeploymentTemplateConfigState {
112
+ type EnvironmentOverrideDeploymentTemplateConfigState = {
112
113
  chartConfig?: never;
113
114
  isOverridden: boolean;
114
115
  environmentConfig: EnvironmentConfigType;
115
116
  mergeStrategy: OverrideMergeStrategyType;
116
- }
117
+ };
117
118
  export interface DeploymentTemplateConfigCommonState extends SelectedChartDetailsType {
118
119
  /**
119
- * The first ever state of the deployment template
120
+ * The first ever state of the deployment template on editor
120
121
  */
121
122
  originalTemplate: Record<string, string>;
122
123
  isAppMetricsEnabled: boolean;
@@ -126,6 +127,23 @@ export interface DeploymentTemplateConfigCommonState extends SelectedChartDetail
126
127
  latestDraft?: DraftMetadataDTO;
127
128
  editorTemplate: string;
128
129
  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;
129
147
  }
130
148
  export type DeploymentTemplateConfigState = DeploymentTemplateConfigCommonState & (BaseDeploymentTemplateConfigState | EnvironmentOverrideDeploymentTemplateConfigState);
131
149
  type DTApplicationMetricsReadOnlyProps = {
@@ -1,2 +1,3 @@
1
- declare const OverrideStrategyTippyContent: () => JSX.Element;
1
+ import { OverrideStrategyTippyContentProps } from './types';
2
+ declare const OverrideStrategyTippyContent: ({ children }: OverrideStrategyTippyContentProps) => JSX.Element;
2
3
  export default OverrideStrategyTippyContent;
@@ -20,8 +20,15 @@ export interface ConfigToolbarPopupMenuConfigType {
20
20
  disabled?: boolean;
21
21
  icon?: ReactNode | null;
22
22
  variant?: 'default' | 'negative';
23
+ tooltipText?: string;
23
24
  }
24
25
  export declare enum ConfigToolbarPopupNodeType {
25
26
  DISCARD_DRAFT = "discardDraft",
26
27
  EDIT_HISTORY = "editHistory"
27
28
  }
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) => "deployment" | "pre-deployment" | "post-deployment" | "-";
2
+ export declare const getDeploymentStageTitle: (stage: DeploymentStageType) => "-" | "pre-deployment" | "post-deployment" | "deployment";
@@ -1,5 +1,5 @@
1
1
  import { BuildStageType, FormType } from '../../../../../Common/CIPipeline.Types';
2
- import { DeploymentAppTypes } from '../../../../../Common/Types';
2
+ import { DeploymentAppTypes, UserApprovalConfigType } from '../../../../../Common/Types';
3
3
  import { DeploymentStrategy } from '../../../../../Shared/Components';
4
4
  import { EnvListMinDTO } from '../../../../../Shared/types';
5
5
  interface ConfigSecretType {
@@ -53,6 +53,7 @@ export interface CDFormType {
53
53
  secrets: ConfigSecretType[];
54
54
  };
55
55
  requiredApprovals: string;
56
+ userApprovalConfig?: UserApprovalConfigType;
56
57
  isClusterCdActive: boolean;
57
58
  deploymentAppCreated: boolean;
58
59
  clusterId: string;
@@ -1,3 +1,4 @@
1
1
  export * from './GlobalConfigurations';
2
2
  export * from './ResourceBrowser';
3
3
  export * from './Applications';
4
+ export * from './App';
@@ -54,6 +54,12 @@ 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;
57
63
  };
58
64
  export interface CollapsibleListConfig<TabType extends TabOptions = 'navLink'> {
59
65
  /**
@@ -0,0 +1,2 @@
1
+ declare const EnterpriseTag: () => JSX.Element;
2
+ export default EnterpriseTag;
@@ -0,0 +1 @@
1
+ export { default as EnterpriseTag } from './EnterpriseTag.component';
@@ -1,2 +1,2 @@
1
1
  import { FeatureDescriptionModalProps } from './types';
2
- export declare const FeatureDescriptionModal: ({ title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles, tabsConfig, }: FeatureDescriptionModalProps) => JSX.Element;
2
+ export declare const FeatureDescriptionModal: ({ title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles, }: FeatureDescriptionModalProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { DescriptorProps } from './types';
2
- declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, showInfoIcon, tabsConfig, }: DescriptorProps) => JSX.Element;
2
+ declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, showInfoIcon, }: DescriptorProps) => JSX.Element;
3
3
  export default FeatureTitleWithInfo;
@@ -1,44 +1,17 @@
1
1
  import { default as React, ReactNode } from 'react';
2
2
  import { ImageType } from '../../../Common';
3
3
  import { Breadcrumb } from '../../../Common/BreadCrumb/Types';
4
- interface BaseFeatureDescriptionModalProps {
4
+ export interface FeatureDescriptionModalProps {
5
+ title: string;
5
6
  renderDescriptionContent?: () => ReactNode;
7
+ closeModalText?: string;
6
8
  docLink?: string;
9
+ closeModal?: () => void;
7
10
  imageVariant?: ImageType;
8
11
  SVGImage?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
9
12
  imageStyles?: React.CSSProperties;
10
13
  }
11
- type FeatureDescriptionModalWithTabsConfig = {
12
- /**
13
- * If provided, tabs are shown and have higher precedence over normal modal
14
- */
15
- tabsConfig: ({
16
- /**
17
- * Unique id of the tab
18
- */
19
- id: string;
20
- /**
21
- * Title for the tab
22
- */
23
- title: string;
24
- } & BaseFeatureDescriptionModalProps)[];
25
- } & {
26
- renderDescriptionContent?: never;
27
- docLink?: never;
28
- imageVariant?: never;
29
- SVGImage?: never;
30
- imageStyles?: never;
31
- };
32
- export type FeatureDescriptionModalProps = {
33
- title: string;
34
- closeModalText?: string;
35
- closeModal?: () => void;
36
- } & ((BaseFeatureDescriptionModalProps & {
37
- tabsConfig?: never;
38
- }) | FeatureDescriptionModalWithTabsConfig);
39
- export type DescriptorProps = ((Omit<FeatureDescriptionModalProps, 'tabsConfig'> & {
40
- tabsConfig?: never;
41
- }) | (Pick<FeatureDescriptionModalProps, 'title' | 'closeModalText' | 'closeModal'> & FeatureDescriptionModalWithTabsConfig)) & {
14
+ export interface DescriptorProps extends FeatureDescriptionModalProps {
42
15
  breadCrumbs?: Breadcrumb[];
43
16
  additionalContainerClasses?: string;
44
17
  iconClassName?: string;
@@ -53,5 +26,4 @@ export type DescriptorProps = ((Omit<FeatureDescriptionModalProps, 'tabsConfig'>
53
26
  * @default false
54
27
  */
55
28
  showInfoIcon?: boolean;
56
- };
57
- export {};
29
+ }
@@ -41,5 +41,6 @@ export * from './Collapse';
41
41
  export * from './Security';
42
42
  export * from './Button';
43
43
  export * from './InvalidYAMLTippy';
44
+ export * from './EnterpriseTag';
44
45
  export * from './ConfirmationModal';
45
46
  export * from './DiffViewer';
@@ -1,7 +1,8 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { Pair } from 'yaml';
3
+ import { StrictRJSFSchema } from '@rjsf/utils';
3
4
  import { MaterialHistoryType } from '@Shared/Services/app.types';
4
- import { MaterialInfo, SortingOrder, UserApprovalConfigType, ApprovalConfigDataType, UserApprovalInfo } from '../Common';
5
+ import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
5
6
  import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, WebhookEventNameType } from './types';
6
7
  import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
7
8
  interface HighlightSearchTextProps {
@@ -40,13 +41,12 @@ export declare const decode: (data: any, isEncoded?: boolean) => {};
40
41
  export declare const isTimeStringAvailable: (time: string) => boolean;
41
42
  export declare const getTimeDifference: (startTime: string, endTime: string) => string;
42
43
  export declare const getFileNameFromHeaders: (headers: Headers) => string;
43
- export declare const sanitizeUserApprovalList: (approverList: UserApprovalInfo["approverList"]) => UserApprovalInfo["approverList"];
44
- export declare const sanitizeApprovalConfigData: (approvalConfigData: ApprovalConfigDataType | null) => ApprovalConfigDataType;
44
+ export declare const sanitizeUserApprovalConfig: (userApprovalConfig: UserApprovalConfigType) => UserApprovalConfigType;
45
45
  /**
46
46
  * Manual approval is considered configured only if the type is not notConfigured
47
47
  */
48
48
  export declare const getIsManualApprovalConfigured: (userApprovalConfig?: Pick<UserApprovalConfigType, "type">) => boolean;
49
- export declare const getIsApprovalPolicyConfigured: (approvalConfigData: ApprovalConfigDataType) => boolean;
49
+ export declare const getIsManualApprovalSpecific: (userApprovalConfig?: Pick<UserApprovalConfigType, "type">) => boolean;
50
50
  /**
51
51
  * @description - Function to open a new tab with the given url
52
52
  * @param url - url to be opened in new tab
@@ -67,10 +67,11 @@ export declare const getDefaultValueFromType: (value: unknown) => {};
67
67
  */
68
68
  export declare const groupArrayByObjectKey: <T extends Record<string, any>, K extends keyof T>(array: T[], key: K) => Record<string, T[]>;
69
69
  /**
70
- * @description - Function to get the lower case object
71
- * @param input - The input object
72
- * @returns Record<string, any>
70
+ * This function returns a null/zero value corresponding to @type
71
+ *
72
+ * @param type - a RJSF supported type
73
73
  */
74
+ export declare const getNullValueFromType: (type: StrictRJSFSchema["type"]) => any;
74
75
  export declare const getLowerCaseObject: (input: any) => Record<string, any>;
75
76
  /**
76
77
  * @description - Function to get the webhook date
@@ -61,6 +61,10 @@ 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;
64
68
  }) => void;
65
69
  /** An object representing additional form state. */
66
70
  formState: {
@@ -1,4 +1,5 @@
1
- import { ReleaseTag, UserApprovalMetadataType } from '../../Common';
1
+ import { OverrideMergeStrategyType } from '../../Pages/Applications';
2
+ import { ReleaseTag } from '../../Common';
2
3
  interface WebhookDataType {
3
4
  id: number;
4
5
  eventActionType: string;
@@ -132,7 +133,6 @@ export interface DraftMetadataDTO {
132
133
  commentsCount: number;
133
134
  dataEncrypted: boolean;
134
135
  isAppAdmin: boolean;
135
- userApprovalMetadata: UserApprovalMetadataType;
136
136
  }
137
137
  export declare enum CMSecretExternalType {
138
138
  Internal = "",
@@ -148,9 +148,11 @@ export declare enum CMSecretExternalType {
148
148
  }
149
149
  export interface ConfigDatum {
150
150
  name: string;
151
+ mergeStrategy: OverrideMergeStrategyType;
151
152
  type: string;
152
153
  external: boolean;
153
154
  data: Record<string, any>;
155
+ patchData: Record<string, any>;
154
156
  defaultData: Record<string, any>;
155
157
  global: boolean;
156
158
  externalType: CMSecretExternalType;
@@ -173,6 +175,7 @@ export interface ConfigMapSecretDataType {
173
175
  id: number;
174
176
  appId: number;
175
177
  configData: ConfigMapSecretDataConfigDatumDTO[];
178
+ isDeletable: boolean;
176
179
  }
177
180
  export declare enum ConfigResourceType {
178
181
  ConfigMap = "ConfigMap",
@@ -417,11 +417,4 @@ export declare const ALL_RESOURCE_KIND_FILTER = "all";
417
417
  export declare const OPEN_NEW_TICKET = "https://enterprise.devtron.ai/portal/en/newticket";
418
418
  export declare const VIEW_ALL_TICKETS = "https://enterprise.devtron.ai/portal/en/myarea";
419
419
  export declare const RAISE_ISSUE = "https://github.com/devtron-labs/devtron/issues/new/choose";
420
- export declare const TARGET_IDS: {
421
- WORKFLOW_EDITOR_CONTAINER: string;
422
- };
423
- /**
424
- * Env ID to get the data for base configuration
425
- */
426
- export declare const BASE_CONFIGURATION_ENV_ID = -1;
427
420
  export declare const DEVTRON_BASE_MAIN_ID = "devtron-base-main-identifier";
@@ -1,8 +1,7 @@
1
1
  import { Dayjs } from 'dayjs';
2
- import { ApprovalConfigDataType } from '../Common/Types';
3
- import { OptionType, CommonNodeAttr, ResponseType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
2
+ import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
4
3
  import { KeyValueListType } from './Components';
5
- import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
4
+ import { EnvironmentTypeEnum, PatchOperationType } from './constants';
6
5
  export declare enum EnvType {
7
6
  CHART = "helm_charts",
8
7
  APPLICATION = "apps"
@@ -187,7 +186,7 @@ export interface AppDetails {
187
186
  clusterName?: string;
188
187
  dockerRegistryId?: string;
189
188
  deploymentAppDeleteRequest?: boolean;
190
- approvalConfigData?: ApprovalConfigDataType;
189
+ userApprovalConfig?: string;
191
190
  isVirtualEnvironment?: boolean;
192
191
  imageTag?: string;
193
192
  helmPackageName?: string;
@@ -247,7 +246,7 @@ export interface WorkflowType {
247
246
  showTippy?: boolean;
248
247
  appId?: number;
249
248
  isSelected?: boolean;
250
- approvalConfiguredIdsMap?: Record<number, ApprovalConfigDataType>;
249
+ approvalConfiguredIdsMap?: Record<number, UserApprovalConfigType>;
251
250
  imageReleaseTags: string[];
252
251
  appReleaseTags?: string[];
253
252
  tagsEditable?: boolean;
@@ -404,8 +403,7 @@ export interface SeverityCount {
404
403
  export declare enum PolicyKindType {
405
404
  lockConfiguration = "lock-configuration",
406
405
  imagePromotion = "image-promotion",
407
- plugins = "plugin",
408
- approval = "approval"
406
+ plugins = "plugin"
409
407
  }
410
408
  export interface LastExecutionResultType {
411
409
  lastExecution: string;
@@ -737,16 +735,6 @@ export interface DynamicTabType extends CommonTabArgsType {
737
735
  */
738
736
  lastActiveTabId: string | null;
739
737
  }
740
- export interface ResourceApprovalPolicyConfigDTO {
741
- appId: number;
742
- envId: number;
743
- approvalConfigurations: ApprovalConfigDataType[];
744
- }
745
- export interface ResourceApprovalPolicyConfigType extends Omit<ResourceApprovalPolicyConfigDTO, 'state' | 'approvalConfigurations'> {
746
- isApprovalApplicable: boolean;
747
- approvalConfigurationMap: Record<ApprovalConfigDataType['kind'], ApprovalConfigDataType>;
748
- }
749
- export type ResourceIdToResourceApprovalPolicyConfigMapType = Record<ResourceApprovalPolicyConfigType['envId'] | typeof BASE_CONFIGURATION_ENV_ID, Pick<ResourceApprovalPolicyConfigType, 'isApprovalApplicable' | 'approvalConfigurationMap'>>;
750
738
  export interface PreventOutsideFocusProps {
751
739
  identifier: string;
752
740
  preventFocus: boolean;
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="#3B444C" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7 21h13.25a.75.75 0 0 0 .75-.75v-12M15.75 3h-9a.75.75 0 0 0-.75.75v4.125M15.75 3 21 8.25M15.75 3v5.25H21M4.96 11.714 3 14.347l1.96 2.633m4.08-5.266L11 14.347 9.04 16.98" vector-effect="non-scaling-stroke"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="#3B444C" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16.5 15v7.5l-4.501-2.25-4.5 2.25V15m12-6a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="#3B444C" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4 22h16M5 18h14a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1m8.5-5 1.945-8.557A2 2 0 0 0 13.495 2h-2.99a2 2 0 0 0-1.95 2.443L10.5 13z" vector-effect="non-scaling-stroke"/></svg>
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { OverrideMergeStrategyType } from './Pages/Applications';
1
2
  export interface customEnv {
2
3
  SENTRY_ENV?: string;
3
4
  SENTRY_ERROR_ENABLED?: boolean;
@@ -78,6 +79,7 @@ export interface customEnv {
78
79
  FEATURE_PROMO_EMBEDDED_MODAL_TITLE?: string;
79
80
  FEATURE_PROMO_EMBEDDED_IFRAME_URL?: string;
80
81
  FEATURE_BULK_RESTART_WORKLOADS_FROM_RB: string;
82
+ FEATURE_DEFAULT_MERGE_STRATEGY?: OverrideMergeStrategyType;
81
83
  FEATURE_DEFAULT_LANDING_RB_ENABLE?: boolean;
82
84
  }
83
85
  declare global {