@devtron-labs/devtron-fe-common-lib 1.1.5-beta-3 → 1.1.6-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 +8 -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 +50 -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 +4 -0
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-BxOVHzM2.js → cssMode-DtMm0SDm.js} +1 -1
- package/dist/{freemarker2-DS1LR6MW.js → freemarker2-9EjUTVsy.js} +1 -1
- package/dist/{handlebars-B2L8M52b.js → handlebars-Cqr4hoPT.js} +1 -1
- package/dist/{html-DHoLKSrN.js → html-C9Gsn18X.js} +1 -1
- package/dist/{htmlMode-B2hOX8_y.js → htmlMode-x4RP4E5q.js} +1 -1
- package/dist/{index-B2h-ZMsa.js → index-BwRQVDTx.js} +36451 -32245
- package/dist/index.js +538 -534
- package/dist/{javascript-Dw4Jsy24.js → javascript-D22Mg13p.js} +1 -1
- package/dist/{jsonMode-wLrkS-Z9.js → jsonMode-CfrQIF3d.js} +1 -1
- package/dist/{liquid-C9VsC0Vg.js → liquid-C4E_yX4z.js} +1 -1
- package/dist/{mdx-O0XLlnb1.js → mdx-D_RBF4BX.js} +1 -1
- package/dist/{python-DqxvlRGN.js → python-DjXx4zMe.js} +1 -1
- package/dist/{razor-PPyZi1Jl.js → razor-DpLj0g7V.js} +1 -1
- package/dist/{tsMode-roOBiYPY.js → tsMode-B1pt4ZcC.js} +1 -1
- package/dist/{typescript-CJ2Qfbv0.js → typescript-Ct3KRD6B.js} +1 -1
- package/dist/{xml-Ytg5lgZm.js → xml-CMW73-n2.js} +1 -1
- package/dist/{yaml-CTrzUIo2.js → yaml-fo1c31WO.js} +1 -1
- package/package.json +2 -1
|
@@ -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,50 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode, SVGProps, SyntheticEvent } 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?: SyntheticEvent) => 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: string;
|
|
38
|
+
subtitle: ReactNode;
|
|
39
|
+
handleClose: (e?: SyntheticEvent) => 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
|
+
buttonConfig: ButtonConfig<Pick<ButtonProps, 'isLoading' | 'disabled' | 'style'>, Pick<ButtonProps, 'disabled' | 'style'>>;
|
|
49
|
+
}) & CustomInputConfigOrChildrenType;
|
|
50
|
+
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;
|
|
@@ -41,6 +41,7 @@ export * from './Collapse';
|
|
|
41
41
|
export * from './Security';
|
|
42
42
|
export * from './Button';
|
|
43
43
|
export * from './InvalidYAMLTippy';
|
|
44
|
+
export * from './ConfirmationModal';
|
|
44
45
|
export * from './DiffViewer';
|
|
45
46
|
export * from './MultipleResizableTextArea';
|
|
46
47
|
export * from './DynamicDataTable';
|
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