@devtron-labs/devtron-fe-common-lib 1.1.3-beta-4 → 1.1.4-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.
- package/dist/Common/Hooks/UseRegisterShortcut/types.d.ts +2 -1
- package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
- package/dist/Common/RJSF/Form.d.ts +1 -1
- package/dist/Shared/Components/Backdrop/Backdrop.d.ts +3 -0
- package/dist/Shared/Components/Backdrop/index.d.ts +1 -0
- package/dist/Shared/Components/Backdrop/types.d.ts +5 -0
- package/dist/Shared/Components/ConfirmationModal/ConfirmationModal.d.ts +3 -0
- package/dist/Shared/Components/ConfirmationModal/index.d.ts +2 -0
- package/dist/Shared/Components/ConfirmationModal/types.d.ts +52 -0
- package/dist/Shared/Components/ConfirmationModal/utils.d.ts +6 -0
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/Shared/Helpers.d.ts +2 -1
- package/dist/Shared/constants.d.ts +1 -0
- package/dist/Shared/types.d.ts +5 -3
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-BRL0Xn_0.js → cssMode-CzjaPl0H.js} +1 -1
- package/dist/{freemarker2-D5-GLxrW.js → freemarker2-Deo_vMjx.js} +1 -1
- package/dist/{handlebars-Biab1g3M.js → handlebars-Bih0cEKh.js} +1 -1
- package/dist/{html-BfbbeK-t.js → html-lYCXybx6.js} +1 -1
- package/dist/{htmlMode-DeuDyjvR.js → htmlMode-CS-jOHWO.js} +1 -1
- package/dist/{index-DW5Wx3S4.js → index-CtiFsLZ0.js} +35987 -31770
- package/dist/index.js +530 -526
- package/dist/{javascript-Bf0DxSTU.js → javascript-BwIYWU-x.js} +1 -1
- package/dist/{jsonMode-BD7fZTrP.js → jsonMode-B1dtB8dW.js} +1 -1
- package/dist/{liquid-DLLbeFRe.js → liquid-CPeLQYnN.js} +1 -1
- package/dist/{mdx-Y1qJ7xea.js → mdx-B6ehkxmo.js} +1 -1
- package/dist/{python-CrRCaVIi.js → python-DPlSu-GY.js} +1 -1
- package/dist/{razor-BZ2OfqLu.js → razor-CUhGOkrA.js} +1 -1
- package/dist/{tsMode-CZukyc0K.js → tsMode-_BpKg-Vh.js} +1 -1
- package/dist/{typescript-MQ6K5-7_.js → typescript-BfAIwbF-.js} +1 -1
- package/dist/{xml-1t3vNK3x.js → xml-Dd9EyDyY.js} +1 -1
- package/dist/{yaml-D519AypU.js → yaml-D54bBLAK.js} +1 -1
- package/package.json +3 -2
|
@@ -3,11 +3,12 @@ export declare const KEYBOARD_KEYS_MAP: {
|
|
|
3
3
|
readonly Shift: "⇧";
|
|
4
4
|
readonly Meta: "⌘" | "Win";
|
|
5
5
|
readonly Alt: "⌥" | "Alt";
|
|
6
|
-
readonly Escape: "Escape";
|
|
7
6
|
readonly F: "F";
|
|
8
7
|
readonly E: "E";
|
|
9
8
|
readonly R: "R";
|
|
10
9
|
readonly K: "K";
|
|
10
|
+
readonly Escape: "Escape";
|
|
11
|
+
readonly Enter: "Enter";
|
|
11
12
|
};
|
|
12
13
|
export type SupportedKeyboardKeysType = keyof typeof KEYBOARD_KEYS_MAP;
|
|
13
14
|
export interface ShortcutType {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ShortcutType } from './types';
|
|
2
2
|
export declare const preprocessKeys: (keys: ShortcutType["keys"]) => {
|
|
3
|
-
keys: ("Alt" | "
|
|
3
|
+
keys: ("Alt" | "F" | "E" | "R" | "K" | "Escape" | "Enter" | "Control" | "Shift" | "Meta")[];
|
|
4
4
|
id: string;
|
|
5
5
|
};
|
|
6
6
|
export declare const verifyCallbackStack: (stack: ShortcutType["callbackStack"]) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { default as RJSF } from '@rjsf/core';
|
|
2
2
|
import { FormProps } from './types';
|
|
3
|
-
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "children" | "className" | "disabled" | "id" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "target" | "action" | "tagName" | "autoComplete" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "
|
|
3
|
+
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "children" | "className" | "disabled" | "id" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "target" | "action" | "tagName" | "autoComplete" | "method" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Backdrop } from './Backdrop';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode, SVGProps } from 'react';
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
3
|
+
export declare enum ConfirmationModalVariantType {
|
|
4
|
+
info = "info",
|
|
5
|
+
delete = "delete",
|
|
6
|
+
warning = "warning",
|
|
7
|
+
custom = "custom"
|
|
8
|
+
}
|
|
9
|
+
interface CommonButtonProps extends Pick<ButtonProps, 'text'>, Partial<Pick<ButtonProps, 'startIcon' | 'endIcon'>> {
|
|
10
|
+
onClick: (e?: any) => void;
|
|
11
|
+
}
|
|
12
|
+
interface CustomInputConfig {
|
|
13
|
+
identifier: string;
|
|
14
|
+
confirmationKeyword: string;
|
|
15
|
+
}
|
|
16
|
+
type ButtonConfig<PrimaryButtonConfig, SecondaryButtonConfig> = {
|
|
17
|
+
primaryButtonConfig: PrimaryButtonConfig & CommonButtonProps;
|
|
18
|
+
secondaryButtonConfig: SecondaryButtonConfig & CommonButtonProps;
|
|
19
|
+
} | {
|
|
20
|
+
primaryButtonConfig: PrimaryButtonConfig & CommonButtonProps;
|
|
21
|
+
secondaryButtonConfig?: never;
|
|
22
|
+
} | {
|
|
23
|
+
primaryButtonConfig?: never;
|
|
24
|
+
secondaryButtonConfig?: SecondaryButtonConfig & CommonButtonProps;
|
|
25
|
+
};
|
|
26
|
+
type CustomInputConfigOrChildrenType = {
|
|
27
|
+
customInputConfig: CustomInputConfig;
|
|
28
|
+
children?: never;
|
|
29
|
+
} | {
|
|
30
|
+
customInputConfig?: never;
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
} | {
|
|
33
|
+
customInputConfig?: never;
|
|
34
|
+
children?: never;
|
|
35
|
+
};
|
|
36
|
+
export type ConfirmationModalProps = {
|
|
37
|
+
title: ReactNode;
|
|
38
|
+
subtitle: ReactNode;
|
|
39
|
+
handleClose: (e?: any) => void;
|
|
40
|
+
showConfirmationModal: boolean;
|
|
41
|
+
} & ({
|
|
42
|
+
variant: Exclude<ConfirmationModalVariantType, ConfirmationModalVariantType.custom>;
|
|
43
|
+
Icon?: never;
|
|
44
|
+
buttonConfig: ButtonConfig<Pick<ButtonProps, 'isLoading' | 'disabled'>, Pick<ButtonProps, 'disabled'>>;
|
|
45
|
+
} | {
|
|
46
|
+
variant: ConfirmationModalVariantType.custom;
|
|
47
|
+
Icon: FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
48
|
+
customInputConfig?: never;
|
|
49
|
+
children?: ReactNode;
|
|
50
|
+
buttonConfig: ButtonConfig<Pick<ButtonProps, 'isLoading' | 'disabled' | 'style'>, Pick<ButtonProps, 'disabled' | 'style'>>;
|
|
51
|
+
}) & CustomInputConfigOrChildrenType;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode, SVGProps } from 'react';
|
|
2
|
+
import { ConfirmationModalVariantType } from './types';
|
|
3
|
+
import { ButtonStyleType } from '../Button';
|
|
4
|
+
export declare const getIconFromVariant: (variant: ConfirmationModalVariantType) => FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
5
|
+
export declare const getConfirmationLabel: (confirmationKeyword: string) => ReactNode;
|
|
6
|
+
export declare const getPrimaryButtonStyleFromVariant: (variant: ConfirmationModalVariantType) => ButtonStyleType;
|
package/dist/Shared/Helpers.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ReactElement } from 'react';
|
|
|
2
2
|
import { Pair } from 'yaml';
|
|
3
3
|
import { MaterialHistoryType } from '@Shared/Services/app.types';
|
|
4
4
|
import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
|
|
5
|
-
import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, WebhookEventNameType } from './types';
|
|
5
|
+
import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, WebhookEventNameType } from './types';
|
|
6
6
|
import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
|
|
7
7
|
interface HighlightSearchTextProps {
|
|
8
8
|
/**
|
|
@@ -21,6 +21,7 @@ interface HighlightSearchTextProps {
|
|
|
21
21
|
export declare const escapeRegExp: (text: string) => string;
|
|
22
22
|
export declare const highlightSearchText: ({ searchText, text, highlightClasses }: HighlightSearchTextProps) => string;
|
|
23
23
|
export declare const preventBodyScroll: (lock: boolean) => void;
|
|
24
|
+
export declare const preventOutsideFocus: ({ identifier, preventFocus }: PreventOutsideFocusProps) => void;
|
|
24
25
|
export declare const getIsMaterialInfoAvailable: (materialInfo: MaterialInfo[]) => boolean;
|
|
25
26
|
export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTriggers;
|
|
26
27
|
export declare const stringComparatorBySortOrder: (a: string, b: string, sortOrder?: SortingOrder, isCaseSensitive?: boolean) => number;
|
|
@@ -417,3 +417,4 @@ export declare const ALL_RESOURCE_KIND_FILTER = "all";
|
|
|
417
417
|
export declare const OPEN_NEW_TICKET = "https://enterprise.devtron.ai/portal/en/newticket";
|
|
418
418
|
export declare const VIEW_ALL_TICKETS = "https://enterprise.devtron.ai/portal/en/myarea";
|
|
419
419
|
export declare const RAISE_ISSUE = "https://github.com/devtron-labs/devtron/issues/new/choose";
|
|
420
|
+
export declare const DEVTRON_BASE_MAIN_ID = "devtron-base-main-identifier";
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -85,7 +85,6 @@ export declare enum Nodes {
|
|
|
85
85
|
PodDisruptionBudget = "PodDisruptionBudget",
|
|
86
86
|
Event = "Event",
|
|
87
87
|
Namespace = "Namespace",
|
|
88
|
-
Node = "Node",
|
|
89
88
|
Overview = "Overview",
|
|
90
89
|
MonitoringDashboard = "MonitoringDashboard",
|
|
91
90
|
UpgradeCluster = "UpgradeCluster"
|
|
@@ -454,8 +453,7 @@ export declare enum AggregationKeys {
|
|
|
454
453
|
'Custom Resource' = "Custom Resource",
|
|
455
454
|
'Other Resources' = "Other Resources",
|
|
456
455
|
Events = "Events",
|
|
457
|
-
Namespaces = "Namespaces"
|
|
458
|
-
'Nodes' = "Nodes"
|
|
456
|
+
Namespaces = "Namespaces"
|
|
459
457
|
}
|
|
460
458
|
export type AggregationKeysType = keyof typeof AggregationKeys;
|
|
461
459
|
export declare enum GitOpsAuthModeType {
|
|
@@ -735,4 +733,8 @@ export interface DynamicTabType extends CommonTabArgsType {
|
|
|
735
733
|
*/
|
|
736
734
|
lastActiveTabId: string | null;
|
|
737
735
|
}
|
|
736
|
+
export interface PreventOutsideFocusProps {
|
|
737
|
+
identifier: string;
|
|
738
|
+
preventFocus: boolean;
|
|
739
|
+
}
|
|
738
740
|
export {};
|