@devtron-labs/devtron-fe-common-lib 0.2.30-beta-8 → 0.2.30-beta-9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/Common/ToastBody.d.ts +1 -1
  2. package/dist/Shared/Components/Button/Button.component.d.ts +1 -6
  3. package/dist/Shared/Components/Button/constants.d.ts +2 -3
  4. package/dist/Shared/Components/Button/types.d.ts +12 -29
  5. package/dist/Shared/Components/Button/utils.d.ts +1 -3
  6. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.component.d.ts +2 -2
  7. package/dist/Shared/Components/DeploymentConfigDiff/{types.d.ts → DeploymentConfigDiff.types.d.ts} +25 -3
  8. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.utils.d.ts +9 -8
  9. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffAccordion.d.ts +1 -1
  10. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffMain.d.ts +2 -2
  11. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffNavigation.d.ts +2 -2
  12. package/dist/Shared/Components/DeploymentConfigDiff/index.d.ts +1 -1
  13. package/dist/Shared/Services/app.types.d.ts +7 -1
  14. package/dist/Shared/Services/index.d.ts +0 -1
  15. package/dist/assets/index.css +1 -1
  16. package/dist/{cssMode-BG6o7oFP.js → cssMode-jOx1oE6F.js} +1 -1
  17. package/dist/{freemarker2-DdoIf_sp.js → freemarker2-DCBlJz9A.js} +1 -1
  18. package/dist/{handlebars-CGQHNJr1.js → handlebars-C9eSwgkV.js} +1 -1
  19. package/dist/{html-Dj9xTLBG.js → html-CuTQ2Wkc.js} +1 -1
  20. package/dist/{htmlMode-CskuHMJm.js → htmlMode-CnRtuDqr.js} +1 -1
  21. package/dist/{index-raDXwKRX.js → index-BUJGeFtx.js} +27421 -27008
  22. package/dist/index.js +253 -256
  23. package/dist/{javascript-C8zDaPOb.js → javascript-Cm5F6YtQ.js} +1 -1
  24. package/dist/{jsonMode-HCpu5k3I.js → jsonMode-e_sq_oLU.js} +1 -1
  25. package/dist/{liquid-BancFx9U.js → liquid-kYf0zUNJ.js} +1 -1
  26. package/dist/{mdx-BT84XBrj.js → mdx-CRYh7geO.js} +1 -1
  27. package/dist/{python-Bk9QOSWL.js → python-CcQguiBw.js} +1 -1
  28. package/dist/{razor-DSRo2jh3.js → razor-DxCG6Jjf.js} +1 -1
  29. package/dist/{tsMode-BUf6TKWa.js → tsMode-Dp1BkTaD.js} +1 -1
  30. package/dist/{typescript-64xZmZfe.js → typescript-BTMLprlf.js} +1 -1
  31. package/dist/{xml-Dc8p_cP6.js → xml-DlpstO5v.js} +1 -1
  32. package/dist/{yaml-CAfuHNby.js → yaml-JRaTKs78.js} +1 -1
  33. package/package.json +2 -2
  34. package/dist/Shared/Services/ToastManager/ToastContent.d.ts +0 -2
  35. package/dist/Shared/Services/ToastManager/constants.d.ts +0 -4
  36. package/dist/Shared/Services/ToastManager/index.d.ts +0 -3
  37. package/dist/Shared/Services/ToastManager/toastManager.service.d.ts +0 -69
  38. package/dist/Shared/Services/ToastManager/types.d.ts +0 -40
@@ -20,4 +20,4 @@ export declare class ToastBodyWithButton extends React.Component<{
20
20
  }> {
21
21
  render(): JSX.Element;
22
22
  }
23
- export declare const toastAccessDenied: (title?: string, subtitle?: string) => import('react-toastify').Id;
23
+ export declare const toastAccessDenied: (title?: string, subtitle?: string) => React.ReactText;
@@ -57,11 +57,6 @@ import { ButtonProps } from './types';
57
57
  * ```tsx
58
58
  * <Button component={ButtonComponentType.link} linkProps={{ to: '#' }} />
59
59
  * ```
60
- *
61
- * @example Icon button
62
- * ```tsx
63
- * <Button icon={<ICCube />} ariaLabel="Label" />
64
- * ```
65
60
  */
66
- declare const Button: ({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, icon, ariaLabel, ...props }: ButtonProps) => JSX.Element;
61
+ declare const Button: ({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, ...props }: ButtonProps) => JSX.Element;
67
62
  export default Button;
@@ -1,6 +1,5 @@
1
1
  import { ProgressingProps } from '../../../Common/Types';
2
2
  import { ButtonProps } from './types';
3
3
  export declare const BUTTON_SIZE_TO_CLASS_NAME_MAP: Record<ButtonProps['size'], string>;
4
- export declare const ICON_BUTTON_SIZE_TO_CLASS_NAME_MAP: Record<ButtonProps['size'], string>;
5
- export declare const BUTTON_SIZE_TO_ICON_SIZE_MAP: Record<ButtonProps['size'], ProgressingProps['size']>;
6
- export declare const ICON_BUTTON_SIZE_TO_ICON_SIZE_MAP: Record<ButtonProps['size'], ProgressingProps['size']>;
4
+ export declare const BUTTON_SIZE_TO_ICON_CLASS_NAME_MAP: Record<ButtonProps['size'], string>;
5
+ export declare const BUTTON_SIZE_TO_LOADER_SIZE_MAP: Record<ButtonProps['size'], ProgressingProps['size']>;
@@ -11,7 +11,6 @@ export declare enum ButtonVariantType {
11
11
  export declare enum ButtonStyleType {
12
12
  default = "default",
13
13
  negative = "negative",
14
- negativeGrey = "negative-grey",
15
14
  positive = "positive",
16
15
  warning = "warning",
17
16
  neutral = "neutral"
@@ -60,6 +59,18 @@ export type ButtonProps = ({
60
59
  * @default ButtonStyleType.default
61
60
  */
62
61
  style?: ButtonStyleType;
62
+ /**
63
+ * Text to be displayed in the button
64
+ */
65
+ text: string;
66
+ /**
67
+ * If provided, icon to be displayed at the start of the button
68
+ */
69
+ startIcon?: ReactElement;
70
+ /**
71
+ * If provided, icon to be displayed at the end of the button
72
+ */
73
+ endIcon?: ReactElement;
63
74
  /**
64
75
  * If true, the loading state is shown for the button with disabled
65
76
  */
@@ -86,32 +97,4 @@ export type ButtonProps = ({
86
97
  } | {
87
98
  showTooltip?: never;
88
99
  tooltipProps?: never;
89
- }) & ({
90
- icon?: never;
91
- ariaLabel?: never;
92
- /**
93
- * Text to be displayed in the button
94
- */
95
- text: string;
96
- /**
97
- * If provided, icon to be displayed at the start of the button
98
- */
99
- startIcon?: ReactElement;
100
- /**
101
- * If provided, icon to be displayed at the end of the button
102
- */
103
- endIcon?: ReactElement;
104
- } | {
105
- /**
106
- * If provided, icon button is rendered
107
- */
108
- icon: ReactElement;
109
- /**
110
- * Label for the icon button for accessibility.
111
- * Shown on hover in tooltip if tippy is not provided explicitly
112
- */
113
- ariaLabel: string;
114
- text?: never;
115
- startIcon?: never;
116
- endIcon?: never;
117
100
  });
@@ -1,4 +1,2 @@
1
1
  import { ButtonProps } from './types';
2
- export declare const getButtonIconClassName: ({ size, icon }: Pick<ButtonProps, "size" | "icon">) => string;
3
- export declare const getButtonLoaderSize: ({ size, icon }: Pick<ButtonProps, "size" | "icon">) => number;
4
- export declare const getButtonDerivedClass: ({ size, variant, style, isLoading, icon, }: Pick<ButtonProps, "variant" | "size" | "style" | "isLoading" | "icon">) => string;
2
+ export declare const getButtonDerivedClass: ({ size, variant, style, isLoading, }: Pick<ButtonProps, "variant" | "size" | "style" | "isLoading">) => string;
@@ -1,2 +1,2 @@
1
- import { DeploymentConfigDiffProps } from './types';
2
- export declare const DeploymentConfigDiff: ({ isLoading, configList, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, ...resProps }: DeploymentConfigDiffProps) => JSX.Element;
1
+ import { DeploymentConfigDiffProps } from './DeploymentConfigDiff.types';
2
+ export declare const DeploymentConfigDiff: ({ isLoading, configList, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, tabConfig, ...resProps }: DeploymentConfigDiffProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { SortingOrder } from '../../../Common/Constants';
2
- import { ConfigMapSecretDataConfigDatumDTO, DeploymentTemplateDTO } from '../../Services';
2
+ import { AppEnvDeploymentConfigDTO, ConfigMapSecretDataConfigDatumDTO, DeploymentTemplateDTO, EnvResourceType, ManifestTemplateDTO } from '../../Services';
3
3
  import { DeploymentHistoryDetail } from '../CICDHistory';
4
4
  import { CollapsibleListConfig, CollapsibleListItem } from '../CollapsibleList';
5
5
  import { SelectPickerProps } from '../SelectPicker';
@@ -35,6 +35,11 @@ export interface DeploymentConfigDiffNavigationCollapsibleItem extends Pick<Coll
35
35
  }
36
36
  export interface DeploymentConfigDiffProps {
37
37
  isLoading?: boolean;
38
+ errorConfig?: {
39
+ error: boolean;
40
+ code: number;
41
+ reload: () => void;
42
+ };
38
43
  configList: DeploymentConfigListItem[];
39
44
  headerText?: string;
40
45
  scrollIntoViewId?: string;
@@ -52,10 +57,15 @@ export interface DeploymentConfigDiffProps {
52
57
  goBackURL?: string;
53
58
  navHeading: string;
54
59
  navHelpText?: string;
60
+ tabConfig?: {
61
+ tabs: string[];
62
+ activeTab: string;
63
+ onClick: (tab: string) => void;
64
+ };
55
65
  }
56
- export interface DeploymentConfigDiffNavigationProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText'> {
66
+ export interface DeploymentConfigDiffNavigationProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText' | 'tabConfig'> {
57
67
  }
58
- export interface DeploymentConfigDiffMainProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortingConfig'> {
68
+ export interface DeploymentConfigDiffMainProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'errorConfig' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortingConfig'> {
59
69
  }
60
70
  export interface DeploymentConfigDiffAccordionProps extends Pick<CollapseProps, 'onTransitionEnd'> {
61
71
  id: string;
@@ -66,3 +76,15 @@ export interface DeploymentConfigDiffAccordionProps extends Pick<CollapseProps,
66
76
  onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
67
77
  }
68
78
  export type DiffHeadingDataType<DeploymentTemplate> = DeploymentTemplate extends true ? DeploymentTemplateDTO : ConfigMapSecretDataConfigDatumDTO;
79
+ export type AppEnvDeploymentConfigListParams<IsManifestView> = (IsManifestView extends true ? {
80
+ currentList: ManifestTemplateDTO;
81
+ compareList: ManifestTemplateDTO;
82
+ sortOrder?: never;
83
+ } : {
84
+ currentList: AppEnvDeploymentConfigDTO;
85
+ compareList: AppEnvDeploymentConfigDTO;
86
+ sortOrder?: SortingOrder;
87
+ }) & {
88
+ getNavItemHref: (resourceType: EnvResourceType, resourceName: string) => string;
89
+ isManifestView?: IsManifestView;
90
+ };
@@ -1,6 +1,5 @@
1
- import { SortingOrder } from '../../../Common/Constants';
2
- import { DeploymentConfigDiffProps } from '..';
3
- import { AppEnvDeploymentConfigDTO, ConfigMapSecretDataConfigDatumDTO, EnvResourceType, TemplateListDTO } from '../../Services/app.types';
1
+ import { AppEnvDeploymentConfigListParams, DeploymentConfigDiffProps } from '..';
2
+ import { ConfigMapSecretDataConfigDatumDTO, TemplateListDTO } from '../../Services/app.types';
4
3
  /**
5
4
  * Retrieves the draft data from the given configuration data object.
6
5
  *
@@ -19,14 +18,16 @@ export declare const mergeConfigDataArraysByName: (primaryArray: ConfigMapSecret
19
18
  /**
20
19
  * Generates a list of deployment configurations for application environments and identifies changes between the current and compare lists.
21
20
  *
22
- * @param currentList - The current deployment configuration list.
23
- * @param compareList - The deployment configuration list to compare against.
24
- * @param getNavItemHref - A function to generate navigation item URLs based on the resource type and resource name.
25
- * @param sortOrder - (Optional) The order in which to sort the deployment templates.
21
+ * @param params - An object containing the following properties:
22
+ * @param params.currentList - The current deployment configuration list.
23
+ * @param params.compareList - The deployment configuration list to compare against.
24
+ * @param params.getNavItemHref - A function to generate navigation item URLs based on the resource type and resource name.
25
+ * @param params.isManifestView - A boolean that, when true, modifies the output for a manifest view.
26
+ * @param params.sortOrder - (Optional) The order in which to sort the deployment templates.
26
27
  *
27
28
  * @returns An object containing the combined deployment configuration list, a collapsible navigation list, and a navigation list.
28
29
  */
29
- export declare const getAppEnvDeploymentConfigList: (currentList: AppEnvDeploymentConfigDTO, compareList: AppEnvDeploymentConfigDTO, getNavItemHref: (resourceType: EnvResourceType, resourceName: string) => string, sortOrder?: SortingOrder) => {
30
+ export declare const getAppEnvDeploymentConfigList: <ManifestView extends boolean = false>({ currentList, compareList, getNavItemHref, isManifestView, sortOrder, }: AppEnvDeploymentConfigListParams<ManifestView>) => {
30
31
  configList: DeploymentConfigDiffProps["configList"];
31
32
  navList: DeploymentConfigDiffProps["navList"];
32
33
  collapsibleNavList: DeploymentConfigDiffProps["collapsibleNavList"];
@@ -1,2 +1,2 @@
1
- import { DeploymentConfigDiffAccordionProps } from './types';
1
+ import { DeploymentConfigDiffAccordionProps } from './DeploymentConfigDiff.types';
2
2
  export declare const DeploymentConfigDiffAccordion: import('react').ForwardRefExoticComponent<DeploymentConfigDiffAccordionProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,2 +1,2 @@
1
- import { DeploymentConfigDiffMainProps } from './types';
2
- export declare const DeploymentConfigDiffMain: ({ isLoading, headerText, configList, selectorsConfig, sortingConfig, scrollIntoViewId, }: DeploymentConfigDiffMainProps) => JSX.Element;
1
+ import { DeploymentConfigDiffMainProps } from './DeploymentConfigDiff.types';
2
+ export declare const DeploymentConfigDiffMain: ({ isLoading, errorConfig, headerText, configList, selectorsConfig, sortingConfig, scrollIntoViewId, }: DeploymentConfigDiffMainProps) => JSX.Element;
@@ -1,2 +1,2 @@
1
- import { DeploymentConfigDiffNavigationProps } from './types';
2
- export declare const DeploymentConfigDiffNavigation: ({ isLoading, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, }: DeploymentConfigDiffNavigationProps) => JSX.Element;
1
+ import { DeploymentConfigDiffNavigationProps } from './DeploymentConfigDiff.types';
2
+ export declare const DeploymentConfigDiffNavigation: ({ isLoading, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, tabConfig, }: DeploymentConfigDiffNavigationProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  export * from './DeploymentConfigDiff.component';
2
- export * from './types';
2
+ export * from './DeploymentConfigDiff.types';
3
3
  export * from './DeploymentConfigDiff.utils';
@@ -197,6 +197,11 @@ export interface TemplateListDTO {
197
197
  status?: string;
198
198
  pipelineId?: number;
199
199
  }
200
+ export interface ManifestTemplateDTO {
201
+ data: string;
202
+ resolvedData: string;
203
+ variableSnapshot: null;
204
+ }
200
205
  export declare enum DraftState {
201
206
  Init = 1,
202
207
  Discarded = 2,
@@ -206,6 +211,7 @@ export declare enum DraftState {
206
211
  export declare enum EnvResourceType {
207
212
  ConfigMap = "configmap",
208
213
  Secret = "secrets",
209
- DeploymentTemplate = "deployment-template"
214
+ DeploymentTemplate = "deployment-template",
215
+ Manifest = "manifest"
210
216
  }
211
217
  export {};
@@ -2,4 +2,3 @@ export * from './types';
2
2
  export * from './app.types';
3
3
  export * from './app.service';
4
4
  export * from './common.service';
5
- export * from './ToastManager';