@devtron-labs/devtron-fe-common-lib 0.2.7 → 0.2.8-beta-1

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 (28) hide show
  1. package/dist/Pages/CDPipeline/index.d.ts +1 -0
  2. package/dist/Pages/CDPipeline/types.d.ts +84 -0
  3. package/dist/Pages/index.d.ts +1 -0
  4. package/dist/Shared/Components/CICDHistory/types.d.ts +1 -1
  5. package/dist/Shared/Components/TabGroup/TabGroup.component.d.ts +3 -0
  6. package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +108 -0
  7. package/dist/Shared/Components/TabGroup/index.d.ts +2 -0
  8. package/dist/Shared/Components/index.d.ts +1 -0
  9. package/dist/Shared/types.d.ts +1 -0
  10. package/dist/assets/index.css +1 -1
  11. package/dist/{cssMode-48c0f680.js → cssMode-865cd9aa.js} +1 -1
  12. package/dist/{freemarker2-abeb240d.js → freemarker2-6ebe8432.js} +1 -1
  13. package/dist/{handlebars-a1d03281.js → handlebars-b7faeee6.js} +1 -1
  14. package/dist/{html-b2ac7b3c.js → html-fe2f11b4.js} +1 -1
  15. package/dist/{htmlMode-9921d4db.js → htmlMode-14fd66d2.js} +1 -1
  16. package/dist/{index-55f67c02.js → index-f088f721.js} +8251 -8143
  17. package/dist/index.js +298 -296
  18. package/dist/{javascript-459ec784.js → javascript-ec7e847a.js} +1 -1
  19. package/dist/{jsonMode-61b52ed6.js → jsonMode-327213cb.js} +1 -1
  20. package/dist/{liquid-9d8a221e.js → liquid-b9b5d544.js} +1 -1
  21. package/dist/{mdx-dc4f9b48.js → mdx-c3efbd06.js} +1 -1
  22. package/dist/{python-6e74db51.js → python-056b8010.js} +1 -1
  23. package/dist/{razor-a92b516d.js → razor-abeae3b8.js} +1 -1
  24. package/dist/{tsMode-89890d25.js → tsMode-aea366fd.js} +1 -1
  25. package/dist/{typescript-119d98cc.js → typescript-03aacbdb.js} +1 -1
  26. package/dist/{xml-05861ac3.js → xml-8904f0be.js} +1 -1
  27. package/dist/{yaml-137573e5.js → yaml-e7fcdebe.js} +1 -1
  28. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1,84 @@
1
+ import { BuildStageType, FormType } from '../../Common/CIPipeline.Types';
2
+ import { DeploymentAppTypes } from '../../Common/Types';
3
+ import { DeploymentStrategy } from '../../Shared/Components';
4
+ import { EnvListMinDTO } from '../../Shared/types';
5
+
6
+ interface ConfigSecretType {
7
+ label: string;
8
+ value: string;
9
+ type: string;
10
+ }
11
+ export interface Environment extends Pick<EnvListMinDTO, 'id' | 'active' | 'namespace' | 'isClusterCdActive'>, Partial<Pick<EnvListMinDTO, 'isVirtualEnvironment' | 'allowedDeploymentTypes' | 'description' | 'isDigestEnforcedForEnv'>> {
12
+ name: string;
13
+ clusterName: string;
14
+ clusterId: string;
15
+ }
16
+ export interface PipelineBuildStageType extends BuildStageType {
17
+ triggerType?: string;
18
+ }
19
+ export interface SavedDeploymentStrategy extends DeploymentStrategy {
20
+ isCollapsed?: boolean;
21
+ defaultConfig?: any;
22
+ yamlStr?: any;
23
+ jsonStr?: any;
24
+ }
25
+ export interface CustomTagType {
26
+ tagPattern: string;
27
+ counterX: string;
28
+ }
29
+ export declare enum ReleaseMode {
30
+ NEW_DEPLOYMENT = "create",
31
+ MIGRATE_HELM = "link"
32
+ }
33
+ export interface CDFormType {
34
+ name: string;
35
+ ciPipelineId: number;
36
+ environmentId: number;
37
+ environmentName: string;
38
+ namespace: string;
39
+ environments: Environment[];
40
+ deploymentAppType: string;
41
+ deploymentAppName?: string;
42
+ releaseMode: ReleaseMode;
43
+ triggerType: string;
44
+ preBuildStage?: PipelineBuildStageType;
45
+ postBuildStage?: PipelineBuildStageType;
46
+ strategies: DeploymentStrategy[];
47
+ savedStrategies: SavedDeploymentStrategy[];
48
+ preStageConfigMapSecretNames: {
49
+ configMaps: ConfigSecretType[];
50
+ secrets: ConfigSecretType[];
51
+ };
52
+ postStageConfigMapSecretNames: {
53
+ configMaps: ConfigSecretType[];
54
+ secrets: ConfigSecretType[];
55
+ };
56
+ requiredApprovals: string;
57
+ userApprovalConfig?: {
58
+ requiredCount: number;
59
+ };
60
+ isClusterCdActive: boolean;
61
+ deploymentAppCreated: boolean;
62
+ clusterId: string;
63
+ clusterName: string;
64
+ runPreStageInEnv: boolean;
65
+ runPostStageInEnv: boolean;
66
+ allowedDeploymentTypes: DeploymentAppTypes[];
67
+ containerRegistryName: string;
68
+ repoName: string;
69
+ selectedRegistry: any;
70
+ generatedHelmPushAction: string;
71
+ }
72
+ export interface PipelineFormType extends Partial<FormType>, Partial<CDFormType> {
73
+ name: string;
74
+ triggerType: string;
75
+ preBuildStage?: PipelineBuildStageType;
76
+ postBuildStage?: PipelineBuildStageType;
77
+ defaultTag?: string[];
78
+ customTag?: CustomTagType;
79
+ enableCustomTag?: boolean;
80
+ customTagStage?: string;
81
+ isDigestEnforcedForPipeline?: boolean;
82
+ isDigestEnforcedForEnv?: boolean;
83
+ }
84
+ export {};
@@ -1,2 +1,3 @@
1
1
  export * from './GlobalConfigurations';
2
2
  export * from './ResourceBrowser';
3
+ export * from './CDPipeline';
@@ -524,7 +524,7 @@ export interface DeploymentHistory {
524
524
  runSource?: RunSourceType;
525
525
  }
526
526
  type DeploymentStrategyType = 'CANARY' | 'ROLLING' | 'RECREATE' | 'BLUE_GREEN';
527
- interface DeploymentStrategy {
527
+ export interface DeploymentStrategy {
528
528
  deploymentTemplate: DeploymentStrategyType;
529
529
  config: any;
530
530
  default: boolean;
@@ -0,0 +1,3 @@
1
+ import { TabGroupProps } from './TabGroup.types';
2
+
3
+ export declare const TabGroup: ({ tabs, size, rightComponent, alignActiveBorderWithContainer, hideTopPadding, }: TabGroupProps) => JSX.Element;
@@ -0,0 +1,108 @@
1
+ import { LinkProps, NavLinkProps } from 'react-router-dom';
2
+ import { ComponentSizeType } from '../../constants';
3
+ import { DataAttributes } from '../../types';
4
+
5
+ type TabComponentProps<TabTypeProps> = TabTypeProps & DataAttributes;
6
+ type ConditionalTabType = {
7
+ /**
8
+ * Type of the tab, either `button`, `link` or `navLink`.
9
+ */
10
+ tabType: 'button';
11
+ /**
12
+ * Props passed to button component.
13
+ */
14
+ props?: TabComponentProps<Omit<React.ComponentProps<'button'>, 'className' | 'style'>>;
15
+ /**
16
+ * Indicates if the tab is currently active.
17
+ */
18
+ active?: boolean;
19
+ } | {
20
+ /**
21
+ * Type of the tab, either `button`, `link` or `navLink`.
22
+ */
23
+ tabType: 'navLink';
24
+ /**
25
+ * Props passed to nav link component.
26
+ */
27
+ props: TabComponentProps<Omit<NavLinkProps, 'className' | 'style' | 'activeClassName'>>;
28
+ /**
29
+ * Active state is determined by matching the URL.
30
+ */
31
+ active?: false;
32
+ } | {
33
+ /**
34
+ * Type of the tab, either `button`, `link` or `navLink`.
35
+ */
36
+ tabType: 'link';
37
+ /**
38
+ * Props passed to link component.
39
+ */
40
+ props: TabComponentProps<Omit<LinkProps, 'className' | 'style'>>;
41
+ /**
42
+ * Indicates if the tab is currently active.
43
+ */
44
+ active?: boolean;
45
+ };
46
+ export type TabProps = {
47
+ /**
48
+ * Unique identifier for the tab.
49
+ */
50
+ id: string | number;
51
+ /**
52
+ * Text label for the tab.
53
+ */
54
+ label: string;
55
+ /**
56
+ * Icon component to be displayed in the tab.
57
+ * This should be a functional component that renders an SVG.
58
+ */
59
+ icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
60
+ /**
61
+ * Type of the icon, determining whether it uses a stroke or fill style.
62
+ */
63
+ iconType?: 'stroke' | 'fill';
64
+ /**
65
+ * Badge number to be displayed on the tab, typically for notifications.
66
+ */
67
+ badge?: number;
68
+ /**
69
+ * Indicates if an indicator should be shown on the tab.
70
+ */
71
+ showIndicator?: boolean;
72
+ /**
73
+ * Indicates if a warning state should be displayed on the tab.
74
+ * @note error state will take precedence over warning state.
75
+ */
76
+ showWarning?: boolean;
77
+ /**
78
+ * Indicates if an error state should be displayed on the tab.
79
+ * @note error state will take precedence over warning state.
80
+ */
81
+ showError?: boolean;
82
+ } & ConditionalTabType;
83
+ export interface TabGroupProps {
84
+ /**
85
+ * Array of tabs to be rendered.
86
+ */
87
+ tabs: TabProps[];
88
+ /**
89
+ * Size of the tabs.
90
+ * @default ComponentSizeType.large
91
+ */
92
+ size?: ComponentSizeType.large | ComponentSizeType.medium;
93
+ /**
94
+ * Optional component to be rendered on the right side of the tab list.
95
+ */
96
+ rightComponent?: React.ReactNode;
97
+ /**
98
+ * Set to `true` to align the active tab's border with the bottom border of the parent container.
99
+ * @default false
100
+ */
101
+ alignActiveBorderWithContainer?: boolean;
102
+ /**
103
+ * Determines if the top padding of the tab group should be hidden.
104
+ * @default false
105
+ */
106
+ hideTopPadding?: boolean;
107
+ }
108
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './TabGroup.component';
2
+ export * from './TabGroup.types';
@@ -35,5 +35,6 @@ export * from './SelectPicker';
35
35
  export * from './CollapsibleList';
36
36
  export * from './DeploymentConfigDiff';
37
37
  export * from './DetectBottom';
38
+ export * from './TabGroup';
38
39
  export * from './Collapse';
39
40
  export * from './FilterButton';
@@ -566,4 +566,5 @@ export type BaseFilterQueryParams<T> = {
566
566
  */
567
567
  showAll?: boolean;
568
568
  } & SortingParams<T>;
569
+ export type DataAttributes = Record<`data-${string}`, unknown>;
569
570
  export {};