@devtron-labs/devtron-fe-common-lib 0.2.32-beta-4 → 0.2.32
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/ToastBody.d.ts +23 -0
- package/dist/Common/index.d.ts +1 -0
- package/dist/Shared/Components/Button/constants.d.ts +4 -2
- package/dist/Shared/Services/index.d.ts +0 -1
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-DiXSL4Su.js → cssMode-M4DwGcPH.js} +1 -1
- package/dist/{freemarker2-DRGtejC1.js → freemarker2-CLFaMa5E.js} +1 -1
- package/dist/{handlebars-CXqg7HyI.js → handlebars-B4l-4sY9.js} +1 -1
- package/dist/{html-DwNS2QP5.js → html-Bi2VBaVP.js} +1 -1
- package/dist/{htmlMode-gmVNFd34.js → htmlMode-DAht50Y5.js} +1 -1
- package/dist/{index-UmAyscb8.js → index-NQuyL_Mo.js} +26149 -25785
- package/dist/index.js +200 -199
- package/dist/{javascript-DzPlFJvJ.js → javascript-Ccg1Aseq.js} +1 -1
- package/dist/{jsonMode-DQ7v3jyx.js → jsonMode-DKWJoNVp.js} +1 -1
- package/dist/{liquid-BL-3kizE.js → liquid-B41HoeXE.js} +1 -1
- package/dist/{mdx-DAupKC39.js → mdx-BUFzRr2f.js} +1 -1
- package/dist/{python-DX_W4j4e.js → python-awFItZgn.js} +1 -1
- package/dist/{razor-BEobSPQ6.js → razor-DOPL8r44.js} +1 -1
- package/dist/{tsMode-TpCHRKMa.js → tsMode-n3eok1R7.js} +1 -1
- package/dist/{typescript-CpdBBbgf.js → typescript-DVgXOzFY.js} +1 -1
- package/dist/{xml-DNDHKO1K.js → xml-D3KcHZhU.js} +1 -1
- package/dist/{yaml-CqAfWfzo.js → yaml-D-0j7PYX.js} +1 -1
- package/package.json +2 -2
- package/dist/Shared/Services/ToastManager/ToastContent.d.ts +0 -2
- package/dist/Shared/Services/ToastManager/constants.d.ts +0 -4
- package/dist/Shared/Services/ToastManager/index.d.ts +0 -3
- package/dist/Shared/Services/ToastManager/toastManager.service.d.ts +0 -80
- package/dist/Shared/Services/ToastManager/types.d.ts +0 -40
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as s } from "./index-
|
|
1
|
+
import { m as s } from "./index-NQuyL_Mo.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as r } from "./index-
|
|
1
|
+
import { m as r } from "./index-NQuyL_Mo.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as l } from "./index-
|
|
1
|
+
import { m as l } from "./index-NQuyL_Mo.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtron-labs/devtron-fe-common-lib",
|
|
3
|
-
"version": "0.2.32
|
|
3
|
+
"version": "0.2.32",
|
|
4
4
|
"description": "Supporting common component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"prettier": "^3.1.1",
|
|
65
65
|
"react-ga4": "^1.4.1",
|
|
66
66
|
"react-mde": "^11.5.0",
|
|
67
|
-
"react-toastify": "
|
|
67
|
+
"react-toastify": "^8.2.0",
|
|
68
68
|
"typescript": "5.5.4",
|
|
69
69
|
"vite": "5.4.2",
|
|
70
70
|
"vite-plugin-dts": "4.0.3",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ToastOptions, ToastContainerProps } from 'react-toastify';
|
|
2
|
-
import { ToastProps, ToastVariantType } from './types';
|
|
3
|
-
export declare const TOAST_BASE_CONFIG: ToastContainerProps;
|
|
4
|
-
export declare const TOAST_VARIANT_TO_CONFIG_MAP: Record<ToastVariantType, Required<Pick<ToastProps, 'icon' | 'title' | 'progressBarBg'>> & Pick<ToastOptions, 'type'>>;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { ToastOptions } from 'react-toastify';
|
|
2
|
-
import { ToastProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Service for handling toast across the application
|
|
5
|
-
*
|
|
6
|
-
* Note: The application needs to have `ToastManagerContainer` at the root
|
|
7
|
-
* level for the toast to work
|
|
8
|
-
*
|
|
9
|
-
* @example Default Usage
|
|
10
|
-
* ```ts
|
|
11
|
-
* ToastManager.showToast({
|
|
12
|
-
* description: 'Lorem ipsum'
|
|
13
|
-
* })
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* @example Custom Title
|
|
17
|
-
* ```ts
|
|
18
|
-
* ToastManager.showToast({
|
|
19
|
-
* description: 'Lorem ipsum',
|
|
20
|
-
* title: 'Toast title'
|
|
21
|
-
* })
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @example With Button
|
|
25
|
-
* ```ts
|
|
26
|
-
* ToastManager.showToast({
|
|
27
|
-
* description: 'Lorem ipsum',
|
|
28
|
-
* buttonProps: {
|
|
29
|
-
* dataTestId: 'toast-btn',
|
|
30
|
-
* text: 'Reload',
|
|
31
|
-
* startIcon: <ICArrowClockwise />
|
|
32
|
-
* }
|
|
33
|
-
* })
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @example Auto close disabled
|
|
37
|
-
* ```ts
|
|
38
|
-
* ToastManager.showToast({
|
|
39
|
-
* description: 'Lorem ipsum',
|
|
40
|
-
* toastOptions: {
|
|
41
|
-
* autoClose: false,
|
|
42
|
-
* },
|
|
43
|
-
* })
|
|
44
|
-
* ```
|
|
45
|
-
*
|
|
46
|
-
* @example Custom progress bar color
|
|
47
|
-
* ```ts
|
|
48
|
-
* ToastManager.showToast({
|
|
49
|
-
* description: 'Lorem ipsum',
|
|
50
|
-
* progressBarBg: 'var(--N700)',
|
|
51
|
-
* })
|
|
52
|
-
* ```
|
|
53
|
-
*
|
|
54
|
-
* @example Custom icon
|
|
55
|
-
* ```ts
|
|
56
|
-
* ToastManager.showToast({
|
|
57
|
-
* description: 'Lorem ipsum',
|
|
58
|
-
* icon: <ICCube />,
|
|
59
|
-
* })
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
|
-
declare class ToastManager {
|
|
63
|
-
#private;
|
|
64
|
-
static get instance(): ToastManager;
|
|
65
|
-
/**
|
|
66
|
-
* Handler for showing the toast
|
|
67
|
-
*/
|
|
68
|
-
showToast: ({ variant, icon: customIcon, title, description, buttonProps, progressBarBg: customProgressBarBg, }: ToastProps, options?: Pick<ToastOptions, "autoClose">) => import('react-toastify').Id;
|
|
69
|
-
/**
|
|
70
|
-
* Handler for dismissing an existing toast
|
|
71
|
-
*/
|
|
72
|
-
dismissToast: (id?: import('react-toastify').Id | undefined) => void;
|
|
73
|
-
/**
|
|
74
|
-
* Handler for checking if the toast is active
|
|
75
|
-
*/
|
|
76
|
-
isToastActive: (id: import('react-toastify').Id) => boolean;
|
|
77
|
-
}
|
|
78
|
-
export declare const ToastManagerContainer: () => JSX.Element;
|
|
79
|
-
declare const _default: ToastManager;
|
|
80
|
-
export default _default;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ButtonProps } from '../../Components';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
|
-
export declare enum ToastVariantType {
|
|
4
|
-
info = "info",
|
|
5
|
-
success = "success",
|
|
6
|
-
error = "error",
|
|
7
|
-
warn = "warn",
|
|
8
|
-
notAuthorized = "notAuthorized"
|
|
9
|
-
}
|
|
10
|
-
export interface ToastProps {
|
|
11
|
-
/**
|
|
12
|
-
* Title for the toast
|
|
13
|
-
* If not provided, defaults to a value based on the selected variant
|
|
14
|
-
*/
|
|
15
|
-
title?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Description for the toast
|
|
18
|
-
*/
|
|
19
|
-
description: string;
|
|
20
|
-
/**
|
|
21
|
-
* Custom icon for the toast to override the icon based on variant
|
|
22
|
-
*/
|
|
23
|
-
icon?: ReactElement;
|
|
24
|
-
/**
|
|
25
|
-
* Variant for the toast
|
|
26
|
-
*
|
|
27
|
-
* @default ToastVariantType.info
|
|
28
|
-
*/
|
|
29
|
-
variant?: ToastVariantType;
|
|
30
|
-
/**
|
|
31
|
-
* Props for the action button to be displayed in the toast
|
|
32
|
-
*
|
|
33
|
-
* Note: Size, variant and style are hard-coded and cannot be overriden
|
|
34
|
-
*/
|
|
35
|
-
buttonProps?: ButtonProps;
|
|
36
|
-
/**
|
|
37
|
-
* Custom progress bar color
|
|
38
|
-
*/
|
|
39
|
-
progressBarBg?: string;
|
|
40
|
-
}
|