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

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 (41) hide show
  1. package/dist/{@code-editor-DNKnnjou.js → @code-editor-DTxBqjFg.js} +5301 -5237
  2. package/dist/{@common-rjsf-DG46ATXL.js → @common-rjsf-zu1qoo-Y.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/Constants.d.ts +2 -0
  10. package/dist/Common/Helper.d.ts +1 -1
  11. package/dist/Common/Markdown/MarkDown.d.ts +1 -1
  12. package/dist/Common/RJSF/index.d.ts +1 -1
  13. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/index.d.ts +2 -0
  14. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/types.d.ts +2 -0
  15. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/GUIView/utils.d.ts +6 -0
  16. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/index.d.ts +1 -0
  17. package/dist/Pages/App/AppConfiguration/index.d.ts +1 -0
  18. package/dist/Pages/App/index.d.ts +1 -0
  19. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/ConfigMapSecret/index.d.ts +1 -0
  20. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/ConfigMapSecret/utils.d.ts +3 -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/index.d.ts +1 -0
  24. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/types.d.ts +7 -0
  25. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/utils.d.ts +1 -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/index.d.ts +1 -0
  31. package/dist/Shared/Helpers.d.ts +5 -3
  32. package/dist/Shared/Hooks/useForm/useForm.d.ts +4 -0
  33. package/dist/Shared/Services/app.types.d.ts +4 -0
  34. package/dist/assets/ic-file-code.80000c9b.svg +7 -0
  35. package/dist/assets/ic-medal.4a7e5cbc.svg +3 -0
  36. package/dist/assets/ic-stamp.526499d2.svg +7 -0
  37. package/dist/index.d.ts +2 -1
  38. package/dist/index.js +530 -524
  39. package/package.json +1 -1
  40. package/dist/assets/ic-file-code.21a1f748.svg +0 -7
  41. package/dist/assets/ic-stamp.8689f42d.svg +0 -9
@@ -0,0 +1 @@
1
+ export * from './GUIView';
@@ -0,0 +1 @@
1
+ export * from './DeploymentTemplate';
@@ -0,0 +1 @@
1
+ export * from './AppConfiguration';
@@ -0,0 +1,3 @@
1
+ import { CMSecretExternalType } from '../../../../../../Shared/index';
2
+ export declare const hasHashiOrAWS: (externalType: CMSecretExternalType) => boolean;
3
+ export declare const hasESO: (externalType: CMSecretExternalType) => boolean;
@@ -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;
@@ -3,3 +3,4 @@ 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,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,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';
@@ -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';
44
45
  export * from './ConfirmationModal';
45
46
  export * from './DiffViewer';
46
47
  export * from './DynamicDataTable';
@@ -1,5 +1,6 @@
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
5
  import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
5
6
  import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, WebhookEventNameType } from './types';
@@ -66,10 +67,11 @@ export declare const getDefaultValueFromType: (value: unknown) => {};
66
67
  */
67
68
  export declare const groupArrayByObjectKey: <T extends Record<string, any>, K extends keyof T>(array: T[], key: K) => Record<string, T[]>;
68
69
  /**
69
- * @description - Function to get the lower case object
70
- * @param input - The input object
71
- * @returns Record<string, any>
70
+ * This function returns a null/zero value corresponding to @type
71
+ *
72
+ * @param type - a RJSF supported type
72
73
  */
74
+ export declare const getNullValueFromType: (type: StrictRJSFSchema["type"]) => any;
73
75
  export declare const getLowerCaseObject: (input: any) => Record<string, any>;
74
76
  /**
75
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,3 +1,4 @@
1
+ import { OverrideMergeStrategyType } from '../../Pages/Applications';
1
2
  import { ReleaseTag } from '../../Common';
2
3
  interface WebhookDataType {
3
4
  id: number;
@@ -147,9 +148,11 @@ export declare enum CMSecretExternalType {
147
148
  }
148
149
  export interface ConfigDatum {
149
150
  name: string;
151
+ mergeStrategy: OverrideMergeStrategyType;
150
152
  type: string;
151
153
  external: boolean;
152
154
  data: Record<string, any>;
155
+ patchData: Record<string, any>;
153
156
  defaultData: Record<string, any>;
154
157
  global: boolean;
155
158
  externalType: CMSecretExternalType;
@@ -172,6 +175,7 @@ export interface ConfigMapSecretDataType {
172
175
  id: number;
173
176
  appId: number;
174
177
  configData: ConfigMapSecretDataConfigDatumDTO[];
178
+ isDeletable: boolean;
175
179
  }
176
180
  export declare enum ConfigResourceType {
177
181
  ConfigMap = "ConfigMap",
@@ -0,0 +1,7 @@
1
+ <!--
2
+ - Copyright (c) 2024. Devtron Inc.
3
+ -->
4
+
5
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
6
+ <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"/>
7
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
2
+ <path d="M16.4996 14.9995V22.5L11.9989 20.25L7.49957 22.5V15.0002M19.499 9C19.499 13.1421 16.1412 16.5 11.999 16.5C7.85689 16.5 4.49902 13.1421 4.49902 9C4.49902 4.85786 7.85689 1.5 11.999 1.5C16.1412 1.5 19.499 4.85786 19.499 9Z" stroke="#3B444C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,7 @@
1
+ <!--
2
+ - Copyright (c) 2024. Devtron Inc.
3
+ -->
4
+
5
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
6
+ <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 1Zm8.5-5 1.945-8.557A2 2 0 0 0 13.495 2h-2.99a2 2 0 0 0-1.95 2.443L10.5 13h3Z" vector-effect="non-scaling-stroke"/>
7
+ </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,8 +79,8 @@ 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
- FEATURE_CLUSTER_MAP_ENABLE?: boolean;
83
84
  }
84
85
  declare global {
85
86
  interface Window {