@devtron-labs/devtron-fe-common-lib 1.10.17 → 1.10.18
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/{@code-editor-BvjrvTRt.js → @code-editor-rOxqP3qu.js} +4841 -4723
- package/dist/{@common-rjsf-DM5WzH7I.js → @common-rjsf-HdXVC2be.js} +1 -1
- package/dist/Common/CodeMirror/utils.d.ts +1 -0
- package/dist/Common/SegmentedControl/types.d.ts +4 -0
- package/dist/Common/Toggle/Toggle.d.ts +2 -1
- package/dist/Common/Types.d.ts +1 -0
- package/dist/Shared/Components/ConfirmationModal/index.d.ts +1 -0
- package/dist/Shared/Components/FramerComponents/MotionDiv.d.ts +2 -0
- package/dist/Shared/Components/FramerComponents/index.d.ts +3 -0
- package/dist/Shared/Components/Icon/Icon.d.ts +14 -0
- package/dist/Shared/Components/Icon/types.d.ts +1 -1
- package/dist/Shared/Components/TabGroup/TabGroup.helpers.d.ts +2 -2
- package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +5 -3
- package/dist/Shared/Components/TabGroup/TabGroup.utils.d.ts +2 -0
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/Shared/Hooks/index.d.ts +1 -0
- package/dist/Shared/Hooks/useForm/useForm.d.ts +8 -0
- package/dist/Shared/Hooks/useOneTimePrompt/constants.d.ts +1 -0
- package/dist/Shared/Hooks/useOneTimePrompt/index.d.ts +1 -0
- package/dist/Shared/Hooks/useOneTimePrompt/types.d.ts +3 -0
- package/dist/Shared/Hooks/useOneTimePrompt/useOneTimePrompt.d.ts +6 -0
- package/dist/Shared/types.d.ts +13 -4
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-arrows-left-right.2d4dda45.svg +3 -0
- package/dist/assets/ic-check.a0f5ee85.svg +3 -0
- package/dist/assets/ic-close-large.fb6095e0.svg +3 -0
- package/dist/assets/ic-delete-lightning.2a7545bd.svg +3 -0
- package/dist/assets/ic-folder-user.ff0670e8.svg +3 -0
- package/dist/assets/ic-hibernate.f75c1e70.svg +19 -0
- package/dist/assets/ic-lightning-fill.25ce980f.svg +3 -0
- package/dist/assets/ic-lightning.02da5bf8.svg +3 -0
- package/dist/assets/ic-medium-delete.f33a9cd7.svg +11 -0
- package/dist/assets/ic-pencil.3ea1c075.svg +3 -0
- package/dist/assets/ic-sort-ascending.45f474ff.svg +3 -0
- package/dist/assets/ic-sort-descending.0ee6b8dd.svg +3 -0
- package/dist/assets/ic-sortable.1d3308e1.svg +3 -0
- package/dist/assets/ic-stamp.23836e37.svg +3 -0
- package/dist/assets/ic-users.102d4732.svg +3 -0
- package/dist/index.js +539 -534
- package/package.json +1 -1
- package/dist/assets/ic-hibernate.988d2323.svg +0 -28
@@ -1,7 +1,7 @@
|
|
1
1
|
import { j as n, au as y, aw as k, av as W } from "./@vendor-DZHtXPTX.js";
|
2
2
|
import V, { forwardRef as J, useMemo as P } from "react";
|
3
3
|
import K, { getDefaultRegistry as q } from "@rjsf/core";
|
4
|
-
import { T as F, j as N, c as v, b as S, a as Y, i as z, d as w, e as E, S as G } from "./@code-editor-
|
4
|
+
import { T as F, j as N, c as v, b as S, a as Y, i as z, d as w, e as E, S as G } from "./@code-editor-rOxqP3qu.js";
|
5
5
|
import Q, { components as D } from "react-select";
|
6
6
|
import { ReactComponent as X } from "./assets/ic-chevron-down.fc70d7a7.svg";
|
7
7
|
import { getUiOptions as B, getTemplate as $, getSubmitButtonOptions as Z, ADDITIONAL_PROPERTY_FLAG as L, errorId as ee, englishStringTranslator as te, TranslatableString as ne, titleId as re, canExpand as se, deepEquals as ae } from "@rjsf/utils";
|
@@ -10,6 +10,7 @@ export declare const getUpdatedSearchMatchesCount: (newQuery: SearchQuery, view:
|
|
10
10
|
current: number;
|
11
11
|
};
|
12
12
|
export declare const updateDiffMinimapValues: (view: MergeView, transactions: readonly Transaction[], side: "a" | "b") => void;
|
13
|
+
export declare const getScanLimit: (lhsValue: string, value: string) => 500 | 10000 | 5000 | 15000 | 20000;
|
13
14
|
export declare const getFoldGutterElement: (open: boolean) => HTMLSpanElement;
|
14
15
|
export declare const getReadOnlyElement: () => HTMLDivElement;
|
15
16
|
export declare const getRevertControlButton: () => HTMLButtonElement;
|
@@ -8,6 +8,10 @@ export type SegmentType = Pick<SelectPickerOptionType, 'value'> & {
|
|
8
8
|
* If true, the segment will be in error state with error icon
|
9
9
|
*/
|
10
10
|
isError?: boolean;
|
11
|
+
/**
|
12
|
+
* If true, the segment will be in disabled state
|
13
|
+
*/
|
14
|
+
isDisabled?: boolean;
|
11
15
|
} & (({
|
12
16
|
/**
|
13
17
|
* Label for the segment
|
@@ -1,4 +1,4 @@
|
|
1
|
-
declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, shouldToggleValueOnLabelClick, ...props }: {
|
1
|
+
declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, shouldToggleValueOnLabelClick, isLoading, ...props }: {
|
2
2
|
[x: string]: any;
|
3
3
|
selected?: boolean;
|
4
4
|
onSelect?: any;
|
@@ -10,5 +10,6 @@ declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dat
|
|
10
10
|
iconClass?: string;
|
11
11
|
throttleOnChange?: boolean;
|
12
12
|
shouldToggleValueOnLabelClick?: boolean;
|
13
|
+
isLoading?: boolean;
|
13
14
|
}) => JSX.Element;
|
14
15
|
export default Toggle;
|
package/dist/Common/Types.d.ts
CHANGED
@@ -4,3 +4,4 @@ export { ForceDeleteConfirmationModal } from './ForceDeleteConfirmationModal';
|
|
4
4
|
export { CannotDeleteModal } from './CannotDeleteModal';
|
5
5
|
export { ConfirmationModalVariantType, type ConfirmationModalProps, type DeleteConfirmationModalProps } from './types';
|
6
6
|
export { ConfirmationModalProvider } from './ConfirmationModalContext';
|
7
|
+
export { getConfirmationLabel } from './utils';
|
@@ -6,6 +6,7 @@ export declare const iconMap: {
|
|
6
6
|
'ic-apica': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
7
7
|
'ic-app-group': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
8
8
|
'ic-arrow-right': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
9
|
+
'ic-arrows-left-right': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
9
10
|
'ic-ather': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
10
11
|
'ic-azure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
11
12
|
'ic-bharatpe': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -19,10 +20,12 @@ export declare const iconMap: {
|
|
19
20
|
'ic-caret-left': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
20
21
|
'ic-cd': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
21
22
|
'ic-chat-circle-dots': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
23
|
+
'ic-check': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
22
24
|
'ic-ci-linked': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
23
25
|
'ic-ci-webhook': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
24
26
|
'ic-circle-loader': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
25
27
|
'ic-clock': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
28
|
+
'ic-close-large': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
26
29
|
'ic-close-small': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
27
30
|
'ic-code': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
28
31
|
'ic-container': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -30,6 +33,7 @@ export declare const iconMap: {
|
|
30
33
|
'ic-copy': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
31
34
|
'ic-crown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
32
35
|
'ic-cube': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
36
|
+
'ic-delete-lightning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
33
37
|
'ic-delete': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
34
38
|
'ic-delhivery': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
35
39
|
'ic-devtron-header-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -39,6 +43,7 @@ export declare const iconMap: {
|
|
39
43
|
'ic-env': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
40
44
|
'ic-error': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
41
45
|
'ic-failure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
46
|
+
'ic-folder-user': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
42
47
|
'ic-gear': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
43
48
|
'ic-git': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
44
49
|
'ic-github': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -59,9 +64,12 @@ export declare const iconMap: {
|
|
59
64
|
'ic-job-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
60
65
|
'ic-k8s-job': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
61
66
|
'ic-ldap': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
67
|
+
'ic-lightning-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
68
|
+
'ic-lightning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
62
69
|
'ic-livspace': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
63
70
|
'ic-login-devtron-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
64
71
|
'ic-logout': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
72
|
+
'ic-medium-delete': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
65
73
|
'ic-medium-paintbucket': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
66
74
|
'ic-microsoft': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
67
75
|
'ic-missing': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -74,11 +82,16 @@ export declare const iconMap: {
|
|
74
82
|
'ic-openshift': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
75
83
|
'ic-out-of-sync': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
76
84
|
'ic-paper-plane-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
85
|
+
'ic-pencil': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
77
86
|
'ic-quay': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
78
87
|
'ic-quote': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
79
88
|
'ic-shield-check': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
89
|
+
'ic-sort-ascending': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
90
|
+
'ic-sort-descending': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
91
|
+
'ic-sortable': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
80
92
|
'ic-spinny': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
81
93
|
'ic-stack': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
94
|
+
'ic-stamp': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
82
95
|
'ic-success': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
83
96
|
'ic-suspended': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
84
97
|
'ic-tata1mg': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -87,6 +100,7 @@ export declare const iconMap: {
|
|
87
100
|
'ic-travclan': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
88
101
|
'ic-unknown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
89
102
|
'ic-user-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
103
|
+
'ic-users': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
90
104
|
'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
91
105
|
};
|
92
106
|
export type IconName = keyof typeof iconMap;
|
@@ -18,6 +18,6 @@ export interface IconBaseProps {
|
|
18
18
|
* If `null`, the default color present in icon is used.
|
19
19
|
* @example `'B500'`, `'N200'`, `'G50'`, `'R700'`
|
20
20
|
*/
|
21
|
-
color: `${'B' | 'N' | 'G' | 'Y' | 'R' | 'V' | 'O'}${`${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00` | '50'}` | 'white' | 'black' | null;
|
21
|
+
color: `${'B' | 'N' | 'G' | 'Y' | 'R' | 'V' | 'O'}${`${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00` | '50' | '0'}` | 'white' | 'black' | null;
|
22
22
|
}
|
23
23
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { TabProps } from './TabGroup.types';
|
2
|
-
export declare const getTabIcon: ({ icon
|
1
|
+
import { TabGroupProps, TabProps } from './TabGroup.types';
|
2
|
+
export declare const getTabIcon: ({ icon, showError, showWarning, className, size, active, }: Pick<TabProps, "showError" | "showWarning" | "icon" | "active"> & Pick<TabGroupProps, "size"> & {
|
3
3
|
className: string;
|
4
4
|
}) => JSX.Element;
|
5
5
|
export declare const getTabBadge: (badge: TabProps["badge"], className: string) => JSX.Element;
|
@@ -2,6 +2,7 @@ import { LinkProps, NavLinkProps } from 'react-router-dom';
|
|
2
2
|
import { ComponentSizeType } from '../../constants';
|
3
3
|
import { DataAttributes } from '../../types';
|
4
4
|
import { TooltipProps } from '@Common/Tooltip/types';
|
5
|
+
import { IconName } from '../Icon';
|
5
6
|
type TabComponentProps<TabTypeProps> = TabTypeProps & DataAttributes;
|
6
7
|
type ConditionalTabType = {
|
7
8
|
/**
|
@@ -79,10 +80,11 @@ export type TabProps = {
|
|
79
80
|
*/
|
80
81
|
description?: string | string[];
|
81
82
|
/**
|
82
|
-
* Icon
|
83
|
-
* This
|
83
|
+
* Icon to be displayed in the tab.
|
84
|
+
* This can either be a functional component that renders a SVG
|
85
|
+
* or a string representing the name of the icon to be rendered by the Icon component.
|
84
86
|
*/
|
85
|
-
icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement
|
87
|
+
icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>> | IconName;
|
86
88
|
/**
|
87
89
|
* Badge number to be displayed on the tab, typically for notifications.
|
88
90
|
*/
|
@@ -1,7 +1,9 @@
|
|
1
|
+
import { IconsProps } from '../Icon';
|
1
2
|
import { TabGroupProps } from './TabGroup.types';
|
2
3
|
export declare const getClassNameBySizeMap: ({ hideTopPadding, alignActiveBorderWithContainer, }: Pick<TabGroupProps, "hideTopPadding" | "alignActiveBorderWithContainer">) => Record<TabGroupProps["size"], {
|
3
4
|
tabClassName: string;
|
4
5
|
iconClassName: string;
|
5
6
|
badgeClassName: string;
|
6
7
|
}>;
|
8
|
+
export declare const TAB_ICON_SIZE_MAP: Record<TabGroupProps['size'], IconsProps['size']>;
|
7
9
|
export declare const tabGroupClassMap: Record<TabGroupProps['size'], string>;
|
@@ -57,6 +57,8 @@ export declare const useForm: <T extends Record<keyof T, any> = {}>(options?: {
|
|
57
57
|
shouldDirty?: boolean;
|
58
58
|
/** A boolean indicating whether to mark the field as touched after setting the value. */
|
59
59
|
shouldTouch?: boolean;
|
60
|
+
/** A boolean indicating whether to trigger validation after setting the value. */
|
61
|
+
triggerError?: boolean;
|
60
62
|
}) => void;
|
61
63
|
reset: (formData: T, resetOptions?: {
|
62
64
|
/** A boolean indicating whether to retain the current dirty state of the form fields. */
|
@@ -67,8 +69,14 @@ export declare const useForm: <T extends Record<keyof T, any> = {}>(options?: {
|
|
67
69
|
keepErrors?: boolean;
|
68
70
|
/** A boolean indicating whether the form should check for dirty state upon reset. */
|
69
71
|
triggerDirty?: boolean;
|
72
|
+
/** A boolean indicating whether the form should check for errors upon reset. */
|
73
|
+
triggerError?: boolean;
|
70
74
|
/** A boolean indicating whether the initial values of the form should be retained after reset. If false, provided formData will become initial data. */
|
71
75
|
keepInitialValues?: boolean;
|
76
|
+
/** Partial initial values to override the current initial values upon reset.
|
77
|
+
* @note `keepInitialValues` will have no effect when this is provided.
|
78
|
+
*/
|
79
|
+
formInitialValues?: Partial<T>;
|
72
80
|
}) => void;
|
73
81
|
/** An object representing additional form state. */
|
74
82
|
formState: {
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const ONE_TIME_PROMPT_LOCAL_STORAGE_KEY = "one-time-prompt-do-not-show-again";
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './useOneTimePrompt';
|
package/dist/Shared/types.d.ts
CHANGED
@@ -340,8 +340,7 @@ export declare enum CDMaterialSidebarType {
|
|
340
340
|
* }
|
341
341
|
* ```
|
342
342
|
*
|
343
|
-
* @example Usage with `PatchOperationType.remove`
|
344
|
-
* Note: Value is not allowed for remove operation
|
343
|
+
* @example Usage with `PatchOperationType.remove` without value
|
345
344
|
*
|
346
345
|
* ```ts
|
347
346
|
* const query: PatchQueryType<string> = {
|
@@ -349,8 +348,18 @@ export declare enum CDMaterialSidebarType {
|
|
349
348
|
* path: 'name'
|
350
349
|
* }
|
351
350
|
* ```
|
351
|
+
*
|
352
|
+
* @example Usage with `PatchOperationType.remove` with value
|
353
|
+
*
|
354
|
+
* ```ts
|
355
|
+
* const query: PatchQueryType<string, number, true> = {
|
356
|
+
* op: PatchOperationType.remove,
|
357
|
+
* path: 'name'
|
358
|
+
* value: 1
|
359
|
+
* }
|
360
|
+
* ```
|
352
361
|
*/
|
353
|
-
export type PatchQueryType<T extends string, K = unknown> = {
|
362
|
+
export type PatchQueryType<T extends string, K = unknown, IsRemoveValueEnabled extends boolean = false> = {
|
354
363
|
/**
|
355
364
|
* The path of the json to be patched
|
356
365
|
*/
|
@@ -369,7 +378,7 @@ export type PatchQueryType<T extends string, K = unknown> = {
|
|
369
378
|
* Operation type for patch
|
370
379
|
*/
|
371
380
|
op: PatchOperationType.remove;
|
372
|
-
value?: never;
|
381
|
+
value?: IsRemoveValueEnabled extends true ? K : never;
|
373
382
|
} | {
|
374
383
|
/**
|
375
384
|
* Operation type for add
|