@devtron-labs/devtron-fe-common-lib 0.3.6-beta-2 → 0.3.6-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.
- package/dist/Common/Helper.d.ts +1 -0
- package/dist/Common/RJSF/types.d.ts +5 -8
- package/dist/Common/RJSF/utils.d.ts +0 -2
- package/dist/Common/Toggle/Toggle.d.ts +2 -1
- package/dist/Common/Tooltip/index.d.ts +0 -1
- package/dist/Shared/Components/CollapsibleList/utils.d.ts +14 -0
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.types.d.ts +9 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.utils.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffMain.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/type.d.ts +5 -0
- package/dist/Shared/Helpers.d.ts +1 -2
- package/dist/Shared/Services/app.service.d.ts +7 -1
- package/dist/Shared/Services/app.types.d.ts +21 -5
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-Bo83jZie.js → cssMode-vA9gH0w8.js} +1 -1
- package/dist/{freemarker2-B6-R9S2y.js → freemarker2-D6DTPzEc.js} +1 -1
- package/dist/{handlebars-Bvf7NllX.js → handlebars-8NbaQzbS.js} +1 -1
- package/dist/{html-B0debMBR.js → html-D42MJuBu.js} +1 -1
- package/dist/{htmlMode-CC3nzNvi.js → htmlMode-CPsG5eC1.js} +1 -1
- package/dist/{index-KgUU9rLM.js → index-D6jxPkpU.js} +12650 -12598
- package/dist/index.js +261 -262
- package/dist/{javascript-BLmLN-T9.js → javascript-BNC4ZqNA.js} +1 -1
- package/dist/{jsonMode-sLoWUfho.js → jsonMode-CIAdJ3rx.js} +1 -1
- package/dist/{liquid-Dt5XTcHR.js → liquid-CHBcBRal.js} +1 -1
- package/dist/{mdx-B4wlS-oM.js → mdx-B6h0lWX-.js} +1 -1
- package/dist/{python-Bedr2nyu.js → python-DU_mTF8x.js} +1 -1
- package/dist/{razor-BMit4z_i.js → razor-BAQITVkW.js} +1 -1
- package/dist/{tsMode-Dfo7c9f4.js → tsMode-6h0U-cNh.js} +1 -1
- package/dist/{typescript-bwW1THll.js → typescript-f_qrm8yb.js} +1 -1
- package/dist/{xml-Cg2BPpeb.js → xml-BqpSxoUZ.js} +1 -1
- package/dist/{yaml-CaGfGjJ5.js → yaml-CnUq4BV-.js} +1 -1
- package/package.json +1 -1
- package/dist/Common/Tooltip/constants.d.ts +0 -3
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -126,4 +126,5 @@ export declare const DropdownIndicator: (props: any) => JSX.Element;
|
|
|
126
126
|
export declare function mapByKey<T = Map<any, any>>(arr: any[], id: string): T;
|
|
127
127
|
export declare function asyncWrap(promise: any): any[];
|
|
128
128
|
export declare const prefixZeroIfSingleDigit: (value?: number) => string | number;
|
|
129
|
+
export declare const throttle: <T extends (...args: unknown[]) => unknown>(func: T, delay?: number) => ((...args: Parameters<T>) => void);
|
|
129
130
|
export {};
|
|
@@ -2,17 +2,14 @@ import { ComponentProps } from 'react';
|
|
|
2
2
|
import { default as RJSFForm } from '@rjsf/core';
|
|
3
3
|
import { StrictRJSFSchema } from '@rjsf/utils';
|
|
4
4
|
export type FormProps = Omit<ComponentProps<typeof RJSFForm>, 'validator'>;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
interface Hidden {
|
|
6
|
+
condition: boolean;
|
|
7
|
+
match: string;
|
|
8
8
|
}
|
|
9
|
-
export type HiddenType = MetaHiddenType | {
|
|
10
|
-
condition: any;
|
|
11
|
-
value: string;
|
|
12
|
-
} | string;
|
|
13
9
|
export interface RJSFFormSchema extends StrictRJSFSchema {
|
|
14
10
|
properties: {
|
|
15
11
|
[key: string]: RJSFFormSchema;
|
|
16
12
|
};
|
|
17
|
-
hidden:
|
|
13
|
+
hidden: Hidden;
|
|
18
14
|
}
|
|
15
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TranslatableString } from '@rjsf/utils';
|
|
2
|
-
import { HiddenType, MetaHiddenType } from './types';
|
|
3
2
|
/**
|
|
4
3
|
* Override for the TranslatableString from RJSF
|
|
5
4
|
*/
|
|
@@ -24,4 +23,3 @@ export declare const getRedirectionProps: (url: string) => React.AnchorHTMLAttri
|
|
|
24
23
|
* Infers the type for json schema from value type
|
|
25
24
|
*/
|
|
26
25
|
export declare const getInferredTypeFromValueType: (value: any) => "string" | "number" | "boolean" | "object" | "array" | "null";
|
|
27
|
-
export declare const parseSchemaHiddenType: (hiddenSchema: HiddenType) => MetaHiddenType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, ...props }: {
|
|
1
|
+
declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
selected?: boolean;
|
|
4
4
|
onSelect?: any;
|
|
@@ -8,5 +8,6 @@ declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dat
|
|
|
8
8
|
dataTestId?: string;
|
|
9
9
|
Icon?: any;
|
|
10
10
|
iconClass?: string;
|
|
11
|
+
throttleOnChange?: boolean;
|
|
11
12
|
}) => JSX.Element;
|
|
12
13
|
export default Toggle;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NavLinkProps } from 'react-router-dom';
|
|
2
|
+
/**
|
|
3
|
+
* Determines if a navigation link is active based on the current location.
|
|
4
|
+
*
|
|
5
|
+
* This function checks if the provided `href` matches the current location's pathname
|
|
6
|
+
* and/or search query, and returns a boolean indicating whether the link should be considered active.
|
|
7
|
+
*
|
|
8
|
+
* @param href - The target URL or path to compare against the current location.
|
|
9
|
+
*
|
|
10
|
+
* @returns A function that takes the current location and returns a boolean:
|
|
11
|
+
* - `true` if the `href` matches the current location's pathname and/or search query.
|
|
12
|
+
* - `false` otherwise.
|
|
13
|
+
*/
|
|
14
|
+
export declare const checkNavLinkActiveState: (href: string) => NavLinkProps["isActive"];
|
|
@@ -46,6 +46,7 @@ export interface DeploymentConfigDiffProps {
|
|
|
46
46
|
selectorsConfig: {
|
|
47
47
|
primaryConfig: DeploymentConfigDiffSelectPickerProps[];
|
|
48
48
|
secondaryConfig: DeploymentConfigDiffSelectPickerProps[];
|
|
49
|
+
hideDivider?: boolean;
|
|
49
50
|
};
|
|
50
51
|
sortingConfig?: {
|
|
51
52
|
sortBy: string;
|
|
@@ -62,10 +63,14 @@ export interface DeploymentConfigDiffProps {
|
|
|
62
63
|
activeTab: string;
|
|
63
64
|
onClick: (tab: string) => void;
|
|
64
65
|
};
|
|
66
|
+
scopeVariablesConfig?: {
|
|
67
|
+
convertVariables: boolean;
|
|
68
|
+
onConvertVariablesClick: () => void;
|
|
69
|
+
};
|
|
65
70
|
}
|
|
66
71
|
export interface DeploymentConfigDiffNavigationProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText' | 'tabConfig'> {
|
|
67
72
|
}
|
|
68
|
-
export interface DeploymentConfigDiffMainProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'errorConfig' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortingConfig'> {
|
|
73
|
+
export interface DeploymentConfigDiffMainProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'errorConfig' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortingConfig' | 'scopeVariablesConfig'> {
|
|
69
74
|
}
|
|
70
75
|
export interface DeploymentConfigDiffAccordionProps extends Pick<CollapseProps, 'onTransitionEnd'> {
|
|
71
76
|
id: string;
|
|
@@ -87,4 +92,7 @@ export type AppEnvDeploymentConfigListParams<IsManifestView> = (IsManifestView e
|
|
|
87
92
|
}) & {
|
|
88
93
|
getNavItemHref: (resourceType: EnvResourceType, resourceName: string) => string;
|
|
89
94
|
isManifestView?: IsManifestView;
|
|
95
|
+
convertVariables?: boolean;
|
|
96
|
+
currentDeploymentTemplateResolvedData?: AppEnvDeploymentConfigDTO;
|
|
97
|
+
compareDeploymentTemplateResolvedData?: AppEnvDeploymentConfigDTO;
|
|
90
98
|
};
|
|
@@ -27,7 +27,7 @@ export declare const mergeConfigDataArraysByName: (primaryArray: ConfigMapSecret
|
|
|
27
27
|
*
|
|
28
28
|
* @returns An object containing the combined deployment configuration list, a collapsible navigation list, and a navigation list.
|
|
29
29
|
*/
|
|
30
|
-
export declare const getAppEnvDeploymentConfigList: <ManifestView extends boolean = false>({ currentList, compareList, getNavItemHref, isManifestView, sortOrder, }: AppEnvDeploymentConfigListParams<ManifestView>) => {
|
|
30
|
+
export declare const getAppEnvDeploymentConfigList: <ManifestView extends boolean = false>({ currentList, compareList, getNavItemHref, isManifestView, sortOrder, convertVariables, currentDeploymentTemplateResolvedData, compareDeploymentTemplateResolvedData, }: AppEnvDeploymentConfigListParams<ManifestView>) => {
|
|
31
31
|
configList: DeploymentConfigDiffProps["configList"];
|
|
32
32
|
navList: DeploymentConfigDiffProps["navList"];
|
|
33
33
|
collapsibleNavList: DeploymentConfigDiffProps["collapsibleNavList"];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DeploymentConfigDiffMainProps } from './DeploymentConfigDiff.types';
|
|
2
|
-
export declare const DeploymentConfigDiffMain: ({ isLoading, errorConfig, headerText, configList, selectorsConfig, sortingConfig, scrollIntoViewId, }: DeploymentConfigDiffMainProps) => JSX.Element;
|
|
2
|
+
export declare const DeploymentConfigDiffMain: ({ isLoading, errorConfig, headerText, configList, selectorsConfig, sortingConfig, scrollIntoViewId, scopeVariablesConfig, }: DeploymentConfigDiffMainProps) => JSX.Element;
|
|
@@ -4,6 +4,7 @@ import { ComponentSizeType } from '../../constants';
|
|
|
4
4
|
import { MutableRefObject, ReactElement, ReactNode } from 'react';
|
|
5
5
|
import { GroupBase, GroupHeadingProps, Props as ReactSelectProps, SelectInstance } from 'react-select';
|
|
6
6
|
import { CreatableProps } from 'react-select/creatable';
|
|
7
|
+
import { TippyProps } from '@tippyjs/react';
|
|
7
8
|
export interface SelectPickerOptionType<OptionValue = string | number> extends OptionType<OptionValue, ReactNode> {
|
|
8
9
|
/**
|
|
9
10
|
* Description to be displayed for the option
|
|
@@ -17,6 +18,10 @@ export interface SelectPickerOptionType<OptionValue = string | number> extends O
|
|
|
17
18
|
* Icon at the end of the option
|
|
18
19
|
*/
|
|
19
20
|
endIcon?: ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* Props passed to show the tippy on option
|
|
23
|
+
*/
|
|
24
|
+
tooltipProps?: TippyProps;
|
|
20
25
|
}
|
|
21
26
|
type SelectProps<OptionValue, IsMulti extends boolean> = ReactSelectProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>;
|
|
22
27
|
declare module 'react-select/base' {
|
package/dist/Shared/Helpers.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const getIsMaterialInfoAvailable: (materialInfo: MaterialInfo[])
|
|
|
24
24
|
export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTriggers;
|
|
25
25
|
export declare const stringComparatorBySortOrder: (a: string, b: string, sortOrder?: SortingOrder, isCaseSensitive?: boolean) => number;
|
|
26
26
|
export declare const numberComparatorBySortOrder: (a: number, b: number, sortOrder?: SortingOrder) => number;
|
|
27
|
-
export declare function versionComparatorBySortOrder(a: string, b: string, orderBy
|
|
27
|
+
export declare function versionComparatorBySortOrder(a: Record<string, any>, b: Record<string, any>, compareKey: string, orderBy: SortingOrder): any;
|
|
28
28
|
export declare const getWebhookEventIcon: (eventName: WebhookEventNameType) => JSX.Element;
|
|
29
29
|
export declare const yamlComparatorBySortOrder: (a: Pair, b: Pair, sortOrder?: SortingOrder) => number;
|
|
30
30
|
export declare const useIntersection: (target: React.RefObject<Element> | Element | null, options?: IntersectionOptions, callback?: IntersectionChangeHandler) => boolean;
|
|
@@ -49,5 +49,4 @@ export declare const getIsManualApprovalSpecific: (userApprovalConfig?: Pick<Use
|
|
|
49
49
|
* @param url - url to be opened in new tab
|
|
50
50
|
*/
|
|
51
51
|
export declare const getHandleOpenURL: (url: string) => () => void;
|
|
52
|
-
export declare const getDefaultValueFromType: (value: unknown) => {};
|
|
53
52
|
export {};
|
|
@@ -5,4 +5,10 @@ export declare const getCITriggerInfo: (params: GetCITriggerInfoParamsType) => P
|
|
|
5
5
|
* The only difference between this and getCITriggerInfo is it doesn't have env and trigger related meta info
|
|
6
6
|
*/
|
|
7
7
|
export declare const getArtifactInfo: (params: Pick<GetCITriggerInfoParamsType, "ciArtifactId">) => Promise<CIMaterialInfoType>;
|
|
8
|
-
export declare const getAppEnvDeploymentConfig: (params
|
|
8
|
+
export declare const getAppEnvDeploymentConfig: ({ params, payload, signal, }: {
|
|
9
|
+
params: AppEnvDeploymentConfigPayloadType;
|
|
10
|
+
payload?: {
|
|
11
|
+
values: string;
|
|
12
|
+
};
|
|
13
|
+
signal?: AbortSignal;
|
|
14
|
+
}) => Promise<ResponseType<AppEnvDeploymentConfigDTO>>;
|
|
@@ -114,6 +114,7 @@ export interface DraftMetadataDTO {
|
|
|
114
114
|
draftId: number;
|
|
115
115
|
draftVersionId: number;
|
|
116
116
|
draftState: number;
|
|
117
|
+
draftResolvedValue: string;
|
|
117
118
|
approvers: string[];
|
|
118
119
|
canApprove: boolean;
|
|
119
120
|
commentsCount: number;
|
|
@@ -154,14 +155,18 @@ export declare enum ConfigResourceType {
|
|
|
154
155
|
}
|
|
155
156
|
export interface DeploymentTemplateDTO {
|
|
156
157
|
resourceType: ConfigResourceType.DeploymentTemplate;
|
|
157
|
-
data:
|
|
158
|
-
[key: string]: any;
|
|
159
|
-
};
|
|
158
|
+
data: Record<string, any>;
|
|
160
159
|
deploymentDraftData: ConfigMapSecretDataType | null;
|
|
160
|
+
variableSnapshot: {
|
|
161
|
+
'Deployment Template': Record<string, string>;
|
|
162
|
+
};
|
|
163
|
+
resolvedValue: Record<string, any>;
|
|
161
164
|
}
|
|
162
165
|
export interface ConfigMapSecretDataDTO {
|
|
163
166
|
resourceType: Extract<ConfigResourceType, ConfigResourceType.ConfigMap | ConfigResourceType.Secret>;
|
|
164
167
|
data: ConfigMapSecretDataType;
|
|
168
|
+
variableSnapshot: Record<string, Record<string, string>>;
|
|
169
|
+
resolvedValue: string;
|
|
165
170
|
}
|
|
166
171
|
export interface AppEnvDeploymentConfigDTO {
|
|
167
172
|
deploymentTemplate: DeploymentTemplateDTO | null;
|
|
@@ -169,7 +174,7 @@ export interface AppEnvDeploymentConfigDTO {
|
|
|
169
174
|
secretsData: ConfigMapSecretDataDTO | null;
|
|
170
175
|
isAppAdmin: boolean;
|
|
171
176
|
}
|
|
172
|
-
export
|
|
177
|
+
export type AppEnvDeploymentConfigPayloadType = {
|
|
173
178
|
appName: string;
|
|
174
179
|
envName: string;
|
|
175
180
|
configType: AppEnvDeploymentConfigType;
|
|
@@ -178,7 +183,18 @@ export interface AppEnvDeploymentConfigPayloadType {
|
|
|
178
183
|
resourceType?: ConfigResourceType;
|
|
179
184
|
resourceId?: number;
|
|
180
185
|
resourceName?: string;
|
|
181
|
-
|
|
186
|
+
configArea?: 'AppConfiguration';
|
|
187
|
+
} | {
|
|
188
|
+
appName: string;
|
|
189
|
+
envName: string;
|
|
190
|
+
configArea: 'ResolveData';
|
|
191
|
+
} | {
|
|
192
|
+
appName: string;
|
|
193
|
+
envName: string;
|
|
194
|
+
pipelineId: number;
|
|
195
|
+
configArea: 'CdRollback' | 'DeploymentHistory';
|
|
196
|
+
wfrId: number;
|
|
197
|
+
};
|
|
182
198
|
export declare enum TemplateListType {
|
|
183
199
|
DefaultVersions = 1,
|
|
184
200
|
PublishedOnEnvironments = 2,
|