@digital-ai/dot-components 2.2.1 → 2.3.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/CHANGE_LOG.md +227 -539
- package/index.esm.js +1073 -771
- package/index.umd.js +1177 -834
- package/lib/components/app-switcher/AppSwitcher.d.ts +17 -15
- package/lib/components/app-switcher/AppSwitcher.styles.d.ts +1 -1
- package/lib/components/app-switcher/utils/helpers.d.ts +16 -0
- package/lib/components/button/CopyButton.d.ts +7 -0
- package/lib/components/button/CopyButton.styles.d.ts +2 -0
- package/lib/components/button/index.d.ts +2 -0
- package/lib/components/core-api/CoreApiProvider.d.ts +6 -0
- package/lib/components/index.d.ts +2 -2
- package/package.json +3 -3
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { ApplicationModel } from '../core-api/openapi';
|
|
2
3
|
import { CommonProps } from '../CommonProps';
|
|
4
|
+
interface ActiveAppInfo {
|
|
5
|
+
name: string;
|
|
6
|
+
product?: 'Release' | 'Deploy' | 'Agility' | 'Continuous Testing' | 'Intelligence' | 'Application Protection';
|
|
7
|
+
}
|
|
3
8
|
interface CommonAppSwitcherProps extends CommonProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
platformConsoleUrl?: string;
|
|
9
|
+
activeApp: ActiveAppInfo;
|
|
10
|
+
onClose?: (event: MouseEvent | KeyboardEvent) => void;
|
|
11
|
+
yOffset?: number;
|
|
12
|
+
zIndex?: number;
|
|
9
13
|
}
|
|
10
14
|
interface AppSwitcherViewProps extends CommonAppSwitcherProps {
|
|
11
|
-
apps:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
name: string;
|
|
16
|
-
url: string;
|
|
17
|
-
}[];
|
|
15
|
+
apps: Partial<ApplicationModel>[];
|
|
16
|
+
open: boolean;
|
|
17
|
+
platformConsoleUrl?: string;
|
|
18
|
+
selectedAppType: string;
|
|
18
19
|
}
|
|
19
|
-
export declare const DotAppSwitcherView: ({
|
|
20
|
+
export declare const DotAppSwitcherView: ({ activeApp, apps, className, platformConsoleUrl, onClose, open, selectedAppType, yOffset, zIndex, }: AppSwitcherViewProps) => JSX.Element;
|
|
20
21
|
interface AppSwitcherProps extends CommonAppSwitcherProps {
|
|
21
22
|
accountId?: string;
|
|
23
|
+
includePlatformConsole?: boolean;
|
|
22
24
|
}
|
|
23
|
-
export declare const DotAppSwitcher: ({ accountId,
|
|
25
|
+
export declare const DotAppSwitcher: ({ accountId, includePlatformConsole, onClose, ...commonProps }: AppSwitcherProps) => JSX.Element;
|
|
24
26
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const rootClassName = "dot-app-switcher";
|
|
2
|
-
export declare const StyledAppSwitcher: import("styled-components").StyledComponent<({
|
|
2
|
+
export declare const StyledAppSwitcher: import("styled-components").StyledComponent<({ anchor, ariaLabel, className, children, "data-testid": dataTestId, drawerBodyProps, drawerFooterProps, drawerHeaderProps, height, ModalProps, onClose, open, PaperProps, variant, width, }: import("../drawer/Drawer").DrawerProps) => JSX.Element, any, {}, never>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { MenuItemProps } from '../../menu/Menu';
|
|
3
|
+
export declare const getLogoForAppType: (appType: string) => string;
|
|
4
|
+
export declare const daiAppsHeaderMenuItem: {
|
|
5
|
+
children: JSX.Element;
|
|
6
|
+
key: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
divider: boolean;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const createMenuItem: (url: string, title: string, subtitle?: string) => ReactElement;
|
|
12
|
+
export declare const createTopLevelMenuItem: (url: string, logo: string, title: string, openNewTab?: boolean) => ReactElement;
|
|
13
|
+
export declare const createAppTypeLabel: (appTypeName: string, logo: string, appProps: MenuItemProps[]) => JSX.Element;
|
|
14
|
+
export declare const getInstanceStateText: (application: {
|
|
15
|
+
instance_state?: number;
|
|
16
|
+
}) => "Production instance" | "Non-production instance";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommonProps } from '../CommonProps';
|
|
2
|
+
export interface CopyButtonProps extends CommonProps {
|
|
3
|
+
copiedTooltip?: string;
|
|
4
|
+
copyTooltip?: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const DotCopyButton: ({ ariaLabel, copiedTooltip, copyTooltip, "data-testid": dataTestId, value, }: CopyButtonProps) => JSX.Element;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export type { ButtonProps } from './Button';
|
|
2
|
+
export type { CopyButtonProps } from './CopyButton';
|
|
2
3
|
export type { IconButtonProps, IconButtonColor, IconButtonSize, } from './IconButton';
|
|
3
4
|
export { DotButton } from './Button';
|
|
5
|
+
export { DotCopyButton } from './CopyButton';
|
|
4
6
|
export { DotIconButton } from './IconButton';
|
|
@@ -5,11 +5,17 @@ interface CoreApiProviderProps {
|
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
token?: string;
|
|
7
7
|
}
|
|
8
|
+
declare type booleanSetter = (b: boolean) => boolean;
|
|
8
9
|
interface DotCoreApiContextProps {
|
|
9
10
|
applications: ApplicationModel[];
|
|
10
11
|
applicationsError: ApiError;
|
|
11
12
|
applicationsLoading: boolean;
|
|
13
|
+
isAppSwitcherOpen: boolean;
|
|
12
14
|
loadApplications: (accountId: string, force?: boolean) => void;
|
|
15
|
+
platformConsoleUrl: string;
|
|
16
|
+
selectedAppSwitcherAppType: string;
|
|
17
|
+
setIsAppSwitcherOpen: (open: boolean | booleanSetter) => void;
|
|
18
|
+
setSelectedAppSwitcherAppType: (appType: string) => void;
|
|
13
19
|
setToken: (token: string) => void;
|
|
14
20
|
}
|
|
15
21
|
export declare const DotCoreApiProvider: ({ apiUrl, token, children, }: CoreApiProviderProps) => JSX.Element;
|
|
@@ -2,7 +2,7 @@ export type { AppToolbarProps } from './app-toolbar/AppToolbar';
|
|
|
2
2
|
export type { AutoCompleteOption, AutoCompleteProps, AutoCompleteValue, AutocompleteRenderOptionState, } from './auto-complete';
|
|
3
3
|
export type { AvatarProps } from './avatar/Avatar';
|
|
4
4
|
export type { BreadcrumbItem } from './breadcrumbs/Breadcrumbs';
|
|
5
|
-
export type { ButtonProps, IconButtonProps, IconButtonColor, IconButtonSize, } from './button';
|
|
5
|
+
export type { ButtonProps, CopyButtonProps, IconButtonProps, IconButtonColor, IconButtonSize, } from './button';
|
|
6
6
|
export type { ButtonToggleProps, ButtonToggleValue, ButtonToggleOption, ButtonToggleOrientation, ButtonToggleSingleValue, ButtonToggleSize, } from './button-toggle';
|
|
7
7
|
export type { CheckboxProps } from './checkbox/Checkbox';
|
|
8
8
|
export type { CheckboxGroupProps } from './checkbox/CheckboxGroup';
|
|
@@ -44,7 +44,7 @@ export { DotAvatar } from './avatar/Avatar';
|
|
|
44
44
|
export { DotAvatarGroup } from './avatar-group/AvatarGroup';
|
|
45
45
|
export { DotBadge } from './badge';
|
|
46
46
|
export { DotBreadcrumbs } from './breadcrumbs/Breadcrumbs';
|
|
47
|
-
export { DotButton, DotIconButton } from './button';
|
|
47
|
+
export { DotButton, DotCopyButton, DotIconButton } from './button';
|
|
48
48
|
export { DotButtonToggle } from './button-toggle';
|
|
49
49
|
export { DotCard } from './card/Card';
|
|
50
50
|
export { DotCardContent } from './card/CardContent';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digital-ai/dot-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE.md>",
|
|
6
6
|
"contributors": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "^17.0.2 || ^18.0.0",
|
|
37
|
-
"react-dom": "
|
|
38
|
-
"
|
|
37
|
+
"react-router-dom": "6.4.4",
|
|
38
|
+
"jwt-decode": "^3.1.2"
|
|
39
39
|
}
|
|
40
40
|
}
|