@tenorlab/react-dashboard 1.1.7 → 1.1.8
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,5 @@
|
|
|
1
1
|
import type { IChildWidgetConfigEntry, TDashboardWidgetCatalog, TDashboardWidgetKey } from './interfaces';
|
|
2
|
-
type TDynamicWidgetLoaderProps = {
|
|
2
|
+
type TDynamicWidgetLoaderProps<TExtraProps = any> = {
|
|
3
3
|
index: number;
|
|
4
4
|
maxIndex: number;
|
|
5
5
|
widgetKey: TDashboardWidgetKey;
|
|
@@ -8,6 +8,7 @@ type TDynamicWidgetLoaderProps = {
|
|
|
8
8
|
childWidgetsConfig?: IChildWidgetConfigEntry[];
|
|
9
9
|
widgetCatalog: TDashboardWidgetCatalog;
|
|
10
10
|
isEditing: boolean;
|
|
11
|
+
extraProps?: TExtraProps;
|
|
11
12
|
onRemoveClick?: (widgetKey: TDashboardWidgetKey, parentWidgetKey?: TDashboardWidgetKey) => void;
|
|
12
13
|
onMoveClick?: (direction: -1 | 1, widgetKey: TDashboardWidgetKey, parentWidgetKey?: TDashboardWidgetKey) => void;
|
|
13
14
|
selectContainer?: (containerKey: TDashboardWidgetKey) => void;
|
|
@@ -25,5 +26,5 @@ export declare const _isVersionCompatible: (hostVer: string, widgetVer: string)
|
|
|
25
26
|
* @param {string} props.widgetKey
|
|
26
27
|
* @param {(key: string) => Promise<void>} props.onRemoveClick
|
|
27
28
|
*/
|
|
28
|
-
export declare function DynamicWidgetLoader({ index, maxIndex, widgetKey, parentWidgetKey, targetContainerKey, childWidgetsConfig, widgetCatalog, isEditing, onRemoveClick, onMoveClick, selectContainer, }: TDynamicWidgetLoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function DynamicWidgetLoader({ index, maxIndex, widgetKey, parentWidgetKey, targetContainerKey, childWidgetsConfig, widgetCatalog, isEditing, extraProps, onRemoveClick, onMoveClick, selectContainer, }: TDynamicWidgetLoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
29
30
|
export {};
|
|
@@ -15,7 +15,7 @@ export interface IDashboardGridPropsBase {
|
|
|
15
15
|
}
|
|
16
16
|
export type TWidgetSize = 'default' | 'large' | 'xlarge';
|
|
17
17
|
export type TWidgetDirection = 'row' | 'column';
|
|
18
|
-
export interface IDashboardWidgetPropsBase {
|
|
18
|
+
export interface IDashboardWidgetPropsBase<TExtraProps = any> {
|
|
19
19
|
index: number;
|
|
20
20
|
maxIndex: number;
|
|
21
21
|
widgetKey: TDashboardWidgetKey;
|
|
@@ -32,6 +32,7 @@ export interface IDashboardWidgetPropsBase {
|
|
|
32
32
|
noBorder?: boolean;
|
|
33
33
|
noPadding?: boolean;
|
|
34
34
|
direction?: TWidgetDirection;
|
|
35
|
+
extraProps?: TExtraProps;
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
37
38
|
* 1. Define the Async Loader type
|