@reltio/dashboard 1.4.2343 → 1.4.2353

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.
@@ -1,5 +1,11 @@
1
1
  /*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */
2
2
 
3
+ /**
4
+ * @license
5
+ * Copyright 2017 Google LLC
6
+ * SPDX-License-Identifier: BSD-3-Clause
7
+ */
8
+
3
9
  /**
4
10
  * @license React
5
11
  * react-is.production.min.js
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@reltio/dashboard",
3
- "version": "1.4.2343",
3
+ "version": "1.4.2353",
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.2302",
9
- "@reltio/mdm-module": "^1.4.2109",
10
- "@reltio/mdm-sdk": "^1.4.2068",
8
+ "@reltio/components": "^1.4.2312",
9
+ "@reltio/mdm-module": "^1.4.2111",
10
+ "@reltio/mdm-sdk": "^1.4.2070",
11
11
  "object-hash": "^2.1.1"
12
12
  },
13
13
  "peerDependencies": {
@@ -1,17 +1,37 @@
1
1
  import React from 'react';
2
- import { MenuProps } from '@mui/material/Menu';
3
- import { DropDownMenuItem } from '../types';
4
- type Props<T> = {
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?: T[];
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 function DropDownMenuButton<T = DropDownMenuItem>({ className, menuId, buttonComponent, buttonContent, menuItems, buttonProps, popoverProps, onMenuOpen, onMenuClose, MenuItemRenderer }: Props<T>): React.JSX.Element;
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
- export { DropDownMenuButton } from './DropDownMenuButton';
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 {};