@reltio/dashboard 1.4.2343 → 1.4.2354
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/646.bundle.js +1 -0
- package/bundle.js +1 -1
- package/bundle.js.LICENSE.txt +6 -0
- package/package.json +4 -4
- package/types/components/src/DropDownMenuButton/DropDownMenuButton.d.ts +28 -8
- package/types/components/src/DropDownMenuButton/index.d.ts +12 -1
- package/types/components/src/DropDownMenuButton/legacy/DropDownMenuButton.d.ts +16 -0
- package/types/components/src/contexts/DesignMigrationContext/index.d.ts +8 -0
- /package/types/components/src/DropDownMenuButton/{components → legacy}/DefaultMenuItemRenderer/DefaultMenuItemRenderer.d.ts +0 -0
- /package/types/components/src/DropDownMenuButton/{components → legacy}/DefaultMenuItemRenderer/index.d.ts +0 -0
- /package/types/components/src/DropDownMenuButton/{components → legacy}/DefaultMenuItemRenderer/styles.d.ts +0 -0
- /package/types/components/src/DropDownMenuButton/{styles.d.ts → legacy/styles.d.ts} +0 -0
package/bundle.js.LICENSE.txt
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/dashboard",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2354",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "bundle.js",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@reltio/components": "^1.4.
|
|
9
|
-
"@reltio/mdm-module": "^1.4.
|
|
10
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
8
|
+
"@reltio/components": "^1.4.2313",
|
|
9
|
+
"@reltio/mdm-module": "^1.4.2112",
|
|
10
|
+
"@reltio/mdm-sdk": "^1.4.2071",
|
|
11
11
|
"object-hash": "^2.1.1"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
@@ -1,17 +1,37 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export type DropDownMenuItem = {
|
|
3
|
+
text?: string;
|
|
4
|
+
id?: string;
|
|
5
|
+
/** A SAP icon name. */
|
|
6
|
+
icon?: string;
|
|
7
|
+
additionalText?: string;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Only rendered inside a group, and controlled: the mark follows this prop, nothing else. */
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
onClick?: (e: any) => void;
|
|
13
|
+
items?: DropDownMenuNode[];
|
|
14
|
+
};
|
|
15
|
+
export type DropDownMenuGroup = {
|
|
16
|
+
checkMode: 'Single' | 'Multiple';
|
|
17
|
+
items: DropDownMenuItem[];
|
|
18
|
+
};
|
|
19
|
+
export type DropDownMenuSeparator = {
|
|
20
|
+
separator: true;
|
|
21
|
+
};
|
|
22
|
+
export type DropDownMenuNode = DropDownMenuItem | DropDownMenuGroup | DropDownMenuSeparator;
|
|
23
|
+
/** Narrower than the legacy contract: `popoverProps` and `MenuItemRenderer` are MUI-only. */
|
|
24
|
+
export type DropDownMenuButtonProps = {
|
|
5
25
|
className?: string;
|
|
6
26
|
buttonComponent?: React.ElementType;
|
|
7
27
|
buttonContent?: React.ReactNode;
|
|
8
|
-
menuItems?:
|
|
28
|
+
menuItems?: DropDownMenuNode[];
|
|
9
29
|
buttonProps?: Record<string, unknown>;
|
|
10
|
-
popoverProps?: Omit<MenuProps, 'open'>;
|
|
11
30
|
menuId: string;
|
|
31
|
+
horizontalAlign?: 'Start' | 'Center' | 'End';
|
|
12
32
|
onMenuOpen?: () => void;
|
|
13
33
|
onMenuClose?: () => void;
|
|
14
|
-
MenuItemRenderer?: (props: any) => React.ReactNode;
|
|
15
34
|
};
|
|
16
|
-
export declare
|
|
17
|
-
export
|
|
35
|
+
export declare const isSeparatorNode: (node: DropDownMenuNode) => node is DropDownMenuSeparator;
|
|
36
|
+
export declare const isGroupNode: (node: DropDownMenuNode) => node is DropDownMenuGroup;
|
|
37
|
+
export declare function DropDownMenuButton({ className, menuId, buttonComponent, buttonContent, menuItems, buttonProps, horizontalAlign, onMenuOpen, onMenuClose }: DropDownMenuButtonProps): React.JSX.Element;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DropDownMenuItem as LegacyDropDownMenuItem } from '../types';
|
|
3
|
+
import { DropDownMenuButtonProps as LegacyProps } from './legacy/DropDownMenuButton';
|
|
4
|
+
export type { DropDownMenuGroup, DropDownMenuItem, DropDownMenuNode, DropDownMenuSeparator } from './DropDownMenuButton';
|
|
5
|
+
/**
|
|
6
|
+
* The legacy contract plus what only the design rendering understands. `horizontalAlign` has no
|
|
7
|
+
* legacy counterpart, so it does nothing until the call site routes to the design implementation.
|
|
8
|
+
*/
|
|
9
|
+
type DropDownMenuButtonProps<T> = LegacyProps<T> & {
|
|
10
|
+
horizontalAlign?: 'Start' | 'Center' | 'End';
|
|
11
|
+
};
|
|
12
|
+
export declare function DropDownMenuButton<T = LegacyDropDownMenuItem>(props: DropDownMenuButtonProps<T>): React.JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MenuProps } from '@mui/material/Menu';
|
|
3
|
+
import { DropDownMenuItem } from '../../types';
|
|
4
|
+
export type DropDownMenuButtonProps<T> = {
|
|
5
|
+
className?: string;
|
|
6
|
+
buttonComponent?: React.ElementType;
|
|
7
|
+
buttonContent?: React.ReactNode;
|
|
8
|
+
menuItems?: T[];
|
|
9
|
+
buttonProps?: Record<string, unknown>;
|
|
10
|
+
popoverProps?: Omit<MenuProps, 'open'>;
|
|
11
|
+
menuId: string;
|
|
12
|
+
onMenuOpen?: () => void;
|
|
13
|
+
onMenuClose?: () => void;
|
|
14
|
+
MenuItemRenderer?: (props: any) => React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
export declare function DropDownMenuButton<T = DropDownMenuItem>({ className, menuId, buttonComponent, buttonContent, menuItems, buttonProps, popoverProps, onMenuOpen, onMenuClose, MenuItemRenderer }: DropDownMenuButtonProps<T>): React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const DesignMigrationProvider: ({ children, enabled }: Props) => React.JSX.Element;
|
|
7
|
+
export declare const useDesignMigration: () => boolean;
|
|
8
|
+
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|