@devtron-labs/devtron-fe-common-lib 0.0.50 → 0.0.51-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.
- package/dist/Common/ChartVersionAndTypeSelector.d.ts +4 -0
- package/dist/Common/Common.service.d.ts +1 -0
- package/dist/Common/Constants.d.ts +2 -0
- package/dist/Common/DraggableWrapper/DraggableButton.d.ts +3 -0
- package/dist/Common/DraggableWrapper/DraggableWrapper.d.ts +9 -0
- package/dist/Common/DraggableWrapper/index.d.ts +3 -0
- package/dist/Common/DraggableWrapper/types.d.ts +19 -0
- package/dist/Common/Grid/Grid.d.ts +1 -1
- package/dist/Common/Grid/types.d.ts +2 -2
- package/dist/Common/Helper.d.ts +9 -0
- package/dist/Common/Hooks/UseWindowSize/UseWindowSize.d.ts +4 -0
- package/dist/Common/Hooks/index.d.ts +1 -0
- package/dist/Common/Types.d.ts +64 -0
- package/dist/Common/index.d.ts +2 -0
- package/dist/index.js +1920 -157
- package/package.json +5 -2
- package/src/Assets/Icon/ic-drag.svg +8 -0
- package/src/Common/ChartVersionAndTypeSelector.tsx +78 -0
- package/src/Common/Common.service.ts +4 -0
- package/src/Common/Constants.ts +5 -2
- package/src/Common/DraggableWrapper/DraggableButton.tsx +11 -0
- package/src/Common/DraggableWrapper/DraggableWrapper.tsx +109 -0
- package/src/Common/DraggableWrapper/index.ts +3 -0
- package/src/Common/DraggableWrapper/types.ts +22 -0
- package/src/Common/Grid/Grid.tsx +7 -2
- package/src/Common/Grid/types.ts +3 -1
- package/src/Common/Helper.tsx +101 -0
- package/src/Common/Hooks/UseWindowSize/UseWindowSize.tsx +30 -0
- package/src/Common/Hooks/index.ts +1 -0
- package/src/Common/Types.ts +69 -0
- package/src/Common/index.ts +2 -0
|
@@ -16,4 +16,5 @@ export declare function setImageTags(request: any, pipelineId: number, artifactI
|
|
|
16
16
|
export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
|
|
17
17
|
export declare function extractImage(image: string): string;
|
|
18
18
|
export declare function createGitCommitUrl(url: string, revision: string): string;
|
|
19
|
+
export declare function fetchChartTemplateVersions(): Promise<ResponseType>;
|
|
19
20
|
export {};
|
|
@@ -20,6 +20,7 @@ export declare const ROUTES: {
|
|
|
20
20
|
USER_CHECK_ROLE: string;
|
|
21
21
|
IMAGE_TAGGING: string;
|
|
22
22
|
CD_MATERIAL_GET: string;
|
|
23
|
+
DEPLOYMENT_TEMPLATE_LIST: string;
|
|
23
24
|
};
|
|
24
25
|
export declare enum KEY_VALUE {
|
|
25
26
|
KEY = "key",
|
|
@@ -63,3 +64,4 @@ export declare const RepositoryAction: {
|
|
|
63
64
|
CHART_PULL: string;
|
|
64
65
|
CHART_PUSH: string;
|
|
65
66
|
};
|
|
67
|
+
export declare const MAX_Z_INDEX = 2147483647;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DraggableWrapperProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* TODO: import it as lazy, after it is supported in common
|
|
5
|
+
* 1. If using react select please use menuPlacement='auto'
|
|
6
|
+
* 2. dragClassName will be used to identify the grabbable button that will grab the div to drag
|
|
7
|
+
* 3. parentRef is the reference point from which we will derive the base top:0 ,left: 0 position
|
|
8
|
+
*/
|
|
9
|
+
export default function DraggableWrapper({ children, zIndex, positionVariant, dragClassName, parentRef, boundaryGap, childDivProps, }: DraggableWrapperProps): JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export declare enum DraggablePositionVariant {
|
|
3
|
+
PARENT_BOTTOM_CENTER = "PARENT_BOTTOM_CENTER",
|
|
4
|
+
SCREEN_BOTTOM_CENTER = "SCREEN_BOTTOM_CENTER"
|
|
5
|
+
}
|
|
6
|
+
export interface DraggableWrapperProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
zIndex?: number;
|
|
9
|
+
positionVariant?: DraggablePositionVariant;
|
|
10
|
+
dragClassName: string;
|
|
11
|
+
parentRef?: React.RefObject<HTMLDivElement>;
|
|
12
|
+
boundaryGap?: number;
|
|
13
|
+
childDivProps?: HTMLAttributes<HTMLDivElement>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* dragClassName is the class that we feed to Draggable to identify dragging buttons
|
|
17
|
+
*/
|
|
18
|
+
export interface DraggableButtonProps extends Pick<DraggableWrapperProps, 'dragClassName'> {
|
|
19
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GridProps } from './types';
|
|
3
|
-
export default function Grid({ container, spacing, item, xs, containerClass, itemClass, children, }: GridProps): JSX.Element;
|
|
3
|
+
export default function Grid({ container, spacing, item, xs, containerClass, itemClass, children, ...containerDivProps }: GridProps): JSX.Element;
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -48,4 +48,13 @@ export declare const getUrlWithSearchParams: (url: string, params: Record<string
|
|
|
48
48
|
* Custom exception logger function for logging errors to sentry
|
|
49
49
|
*/
|
|
50
50
|
export declare const logExceptionToSentry: typeof Sentry.captureException;
|
|
51
|
+
export declare const customStyles: {
|
|
52
|
+
control: (base: any, state: any) => any;
|
|
53
|
+
indicatorSeparator: (base: any, state: any) => any;
|
|
54
|
+
valueContainer: (base: any, state: any) => any;
|
|
55
|
+
dropdownIndicator: (base: any, state: any) => any;
|
|
56
|
+
};
|
|
57
|
+
export declare const getFilteredChartVersions: (charts: any, selectedChartType: any) => any;
|
|
58
|
+
export declare function getUnlockedJSON(json: any, jsonPathArray: any): any;
|
|
59
|
+
export declare function getLockedJSON(json: any, jsonPathArray: string[]): any;
|
|
51
60
|
export {};
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -570,6 +570,70 @@ export interface CiPipeline {
|
|
|
570
570
|
isOffendingMandatoryPlugin?: boolean;
|
|
571
571
|
pipelineType?: string;
|
|
572
572
|
}
|
|
573
|
+
export interface InformationBarProps {
|
|
574
|
+
text: string;
|
|
575
|
+
className?: string;
|
|
576
|
+
children?: React.ReactNode;
|
|
577
|
+
}
|
|
578
|
+
export interface CodeEditorInterface {
|
|
579
|
+
value?: string;
|
|
580
|
+
lineDecorationsWidth?: number;
|
|
581
|
+
responseType?: string;
|
|
582
|
+
onChange?: (string: any) => void;
|
|
583
|
+
onBlur?: () => void;
|
|
584
|
+
onFocus?: () => void;
|
|
585
|
+
children?: any;
|
|
586
|
+
defaultValue?: string;
|
|
587
|
+
mode?: 'json' | 'yaml' | 'shell' | 'dockerfile' | 'plaintext';
|
|
588
|
+
tabSize?: number;
|
|
589
|
+
readOnly?: boolean;
|
|
590
|
+
noParsing?: boolean;
|
|
591
|
+
minHeight?: number;
|
|
592
|
+
maxHeight?: number;
|
|
593
|
+
inline?: boolean;
|
|
594
|
+
height?: number | string;
|
|
595
|
+
shebang?: string | JSX.Element;
|
|
596
|
+
diffView?: boolean;
|
|
597
|
+
loading?: boolean;
|
|
598
|
+
customLoader?: JSX.Element;
|
|
599
|
+
theme?: string;
|
|
600
|
+
original?: string;
|
|
601
|
+
focus?: boolean;
|
|
602
|
+
validatorSchema?: any;
|
|
603
|
+
isKubernetes?: boolean;
|
|
604
|
+
cleanData?: boolean;
|
|
605
|
+
chartVersion?: any;
|
|
606
|
+
}
|
|
607
|
+
export interface CodeEditorComposition {
|
|
608
|
+
Header?: React.FC<any>;
|
|
609
|
+
LanguageChanger?: React.FC<any>;
|
|
610
|
+
ThemeChanger?: React.FC<any>;
|
|
611
|
+
ValidationError?: React.FC<any>;
|
|
612
|
+
Clipboard?: React.FC<any>;
|
|
613
|
+
Warning?: React.FC<InformationBarProps>;
|
|
614
|
+
ErrorBar?: React.FC<InformationBarProps>;
|
|
615
|
+
Information?: React.FC<InformationBarProps>;
|
|
616
|
+
}
|
|
617
|
+
export interface CodeEditorHeaderComposition {
|
|
618
|
+
LanguageChanger?: React.FC<any>;
|
|
619
|
+
ThemeChanger?: React.FC<any>;
|
|
620
|
+
ValidationError?: React.FC<any>;
|
|
621
|
+
Clipboard?: React.FC<any>;
|
|
622
|
+
}
|
|
623
|
+
export interface CodeEditorHeaderInterface {
|
|
624
|
+
children?: any;
|
|
625
|
+
className?: string;
|
|
626
|
+
hideDefaultSplitHeader?: boolean;
|
|
627
|
+
}
|
|
628
|
+
export interface DeploymentChartVersionType {
|
|
629
|
+
chartRefId: number;
|
|
630
|
+
chartVersion: string;
|
|
631
|
+
chartType: string;
|
|
632
|
+
type: number;
|
|
633
|
+
}
|
|
634
|
+
export interface ChartVersionAndTypeSelectorProps {
|
|
635
|
+
setSelectedChartRefId: React.Dispatch<React.SetStateAction<number>>;
|
|
636
|
+
}
|
|
573
637
|
export declare enum PipelineType {
|
|
574
638
|
CI_PIPELINE = "CI_PIPELINE",
|
|
575
639
|
CD_PIPELINE = "CD_PIPELINE",
|
package/dist/Common/index.d.ts
CHANGED
|
@@ -42,5 +42,7 @@ export * from './Hooks';
|
|
|
42
42
|
export { AppStatus } from './AppStatus';
|
|
43
43
|
export * from './RJSF';
|
|
44
44
|
export * from './DevtronProgressing';
|
|
45
|
+
export { default as ChartVersionAndTypeSelector } from './ChartVersionAndTypeSelector';
|
|
45
46
|
export * from './AddCDButton';
|
|
46
47
|
export * from './CustomInput';
|
|
48
|
+
export * from './DraggableWrapper';
|