@digital-ai/dot-components 2.5.1 → 2.5.2
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 +24 -11
- package/index.esm.js +1602 -1502
- package/index.umd.js +1728 -1627
- package/lib/components/app-switcher/AppSwitcher.d.ts +2 -1
- package/lib/components/app-switcher/utils/helpers.d.ts +15 -5
- package/lib/components/link/Link.d.ts +4 -2
- package/lib/components/link/Link.stories.d.ts +1 -1
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ interface ActiveAppInfo {
|
|
|
7
7
|
}
|
|
8
8
|
interface CommonAppSwitcherProps extends CommonProps {
|
|
9
9
|
activeApp: ActiveAppInfo;
|
|
10
|
+
maxRecentInstances?: number;
|
|
10
11
|
noAppTypeLabel?: string;
|
|
11
12
|
onClose?: (event: MouseEvent | KeyboardEvent) => void;
|
|
12
13
|
searchInstancesThreshold?: number;
|
|
@@ -19,7 +20,7 @@ interface AppSwitcherViewProps extends CommonAppSwitcherProps {
|
|
|
19
20
|
platformConsoleUrl?: string;
|
|
20
21
|
selectedAppType: string;
|
|
21
22
|
}
|
|
22
|
-
export declare const DotAppSwitcherView: ({ activeApp, apps, className, noAppTypeLabel, platformConsoleUrl, onClose, open, searchInstancesThreshold, selectedAppType, yOffset, zIndex, }: AppSwitcherViewProps) => JSX.Element;
|
|
23
|
+
export declare const DotAppSwitcherView: ({ activeApp, apps, className, maxRecentInstances, noAppTypeLabel, platformConsoleUrl, onClose, open, searchInstancesThreshold, selectedAppType, yOffset, zIndex, }: AppSwitcherViewProps) => JSX.Element;
|
|
23
24
|
interface AppSwitcherProps extends CommonAppSwitcherProps {
|
|
24
25
|
accountId?: string;
|
|
25
26
|
includePlatformConsole?: boolean;
|
|
@@ -1,16 +1,26 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import { PointerEvent, ReactElement } from 'react';
|
|
2
2
|
import { MenuItemProps } from '../../menu/Menu';
|
|
3
|
+
import { ApplicationModel } from '../../core-api/openapi';
|
|
4
|
+
export declare type RecentAppInstance = {
|
|
5
|
+
application: Partial<ApplicationModel>;
|
|
6
|
+
lastAccess: number;
|
|
7
|
+
};
|
|
3
8
|
export declare const getLogoForAppType: (appType: string) => string;
|
|
4
9
|
export declare const daiAppsHeaderMenuItem: (count?: number) => {
|
|
5
10
|
children: JSX.Element;
|
|
6
11
|
key: string;
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
divider: boolean;
|
|
9
|
-
height: number;
|
|
10
12
|
};
|
|
11
|
-
export declare const
|
|
13
|
+
export declare const sectionHeaderMenuItem: (title: string, count: number, showEmpty?: boolean) => {
|
|
14
|
+
children: JSX.Element;
|
|
15
|
+
key: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const createMenuItem: (url: string, title: string, subtitle: string, onClick: (event: PointerEvent<Element>) => void) => ReactElement;
|
|
12
18
|
export declare const createTopLevelMenuItem: (url: string, logo: string, title: string, openNewTab?: boolean) => ReactElement;
|
|
13
19
|
export declare const createAppTypeLabel: (appTypeName: string, logo: string, appProps: MenuItemProps[]) => JSX.Element;
|
|
14
20
|
export declare const getInstanceStateText: (application: {
|
|
15
21
|
instance_state?: number;
|
|
16
22
|
}) => "Production instance" | "Non-production instance";
|
|
23
|
+
export declare const sortRecentAppInstancesFn: (a: RecentAppInstance, b: RecentAppInstance) => number;
|
|
24
|
+
export declare const sortAppInstancesFn: (a: Partial<ApplicationModel>, b: Partial<ApplicationModel>) => number;
|
|
25
|
+
export declare const RECENT_INSTANCES_KEY = "dot-app-switcher-recent-app-instances";
|
|
26
|
+
export declare const recentAppInstancesSetter: (latestInstance: Partial<ApplicationModel>, maxRecentItems: number) => (orig: RecentAppInstance[]) => RecentAppInstance[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KeyboardEvent, MouseEvent, ReactNode } from 'react';
|
|
1
|
+
import { KeyboardEvent, MouseEvent, PointerEvent, ReactNode } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
export declare type LinkColor = 'initial' | 'inherit' | 'primary' | 'secondary' | 'textPrimary' | 'textSecondary' | 'error';
|
|
4
4
|
export declare type LinkUnderline = 'always' | 'hover' | 'none';
|
|
@@ -15,6 +15,8 @@ export interface LinkProps extends CommonProps {
|
|
|
15
15
|
/** mouse enter event callback */
|
|
16
16
|
onMouseEnter?: (event: MouseEvent<Element>) => void;
|
|
17
17
|
/** specifies the relationship between the current document and the linked document */
|
|
18
|
+
/** event callback, for handling a middle-click or other non-'onClick' behavior */
|
|
19
|
+
onPointerDown?: (event: PointerEvent<Element>) => void;
|
|
18
20
|
rel?: string;
|
|
19
21
|
/** tab order for the link */
|
|
20
22
|
tabIndex?: number;
|
|
@@ -25,4 +27,4 @@ export interface LinkProps extends CommonProps {
|
|
|
25
27
|
/** underline the link */
|
|
26
28
|
underline?: LinkUnderline;
|
|
27
29
|
}
|
|
28
|
-
export declare const DotLink: ({ ariaLabel, children, className, color, "data-testid": dataTestId, href, onClick, onMouseEnter, rel, tabIndex, target, tooltip, underline, }: LinkProps) => JSX.Element;
|
|
30
|
+
export declare const DotLink: ({ ariaLabel, children, className, color, "data-testid": dataTestId, href, onClick, onMouseEnter, onPointerDown, rel, tabIndex, target, tooltip, underline, }: LinkProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Story, ComponentMeta } from '@storybook/react';
|
|
2
2
|
import { LinkProps } from './Link';
|
|
3
|
-
declare const _default: ComponentMeta<({ ariaLabel, children, className, color, "data-testid": dataTestId, href, onClick, onMouseEnter, rel, tabIndex, target, tooltip, underline, }: LinkProps) => JSX.Element>;
|
|
3
|
+
declare const _default: ComponentMeta<({ ariaLabel, children, className, color, "data-testid": dataTestId, href, onClick, onMouseEnter, onPointerDown, rel, tabIndex, target, tooltip, underline, }: LinkProps) => JSX.Element>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: Story<LinkProps>;
|
|
6
6
|
export declare const LinkInParagraph: Story<LinkProps>;
|