@tenorlab/react-dashboard 1.6.2 → 1.6.4
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/README.md +6 -6
- package/dist/core.d.ts +13 -1
- package/dist/react-dashboard.d.ts +72 -28
- package/dist/react-dashboard.es.js +1884 -1541
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @tenorlab/react-dashboard
|
|
2
2
|
|
|
3
3
|
[](https://opensource.org/licenses/MIT)
|
|
4
|
-
[](https://www.tenorlab.com)
|
|
5
5
|
[](https://react.dev/)
|
|
6
6
|
|
|
7
7
|
Foundation components for creating user-configurable, high-performance dashboards in React.
|
|
@@ -13,7 +13,7 @@ This package extends **@tenorlab/dashboard-core**. It provides the React impleme
|
|
|
13
13
|
> **Note**: This package re-exports all types and utilities from `@tenorlab/dashboard-core`. You do not need to install the core package separately.
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
## Pro
|
|
16
|
+
## Tenorlab Pro Demos
|
|
17
17
|
- [React Demo](https://react.tenorlab.com) (built with @tenorlab/react-dashboard)
|
|
18
18
|
- [Vue Demo](https://vue.tenorlab.com) (built with @tenorlab/vue-dashboard)
|
|
19
19
|
- [Nuxt Demo](https://nuxt.tenorlab.com) (built with @tenorlab/vue-dashboard)
|
|
@@ -397,7 +397,7 @@ export function DashboardReadonly() {
|
|
|
397
397
|
|
|
398
398
|
#### 5. Full Editable Dashboard
|
|
399
399
|
|
|
400
|
-
For editable dashboard examples, including **Undo/Redo**, **Zooming**, **Catalog Flyouts**, and **Multiple Dashboards**, please refer to
|
|
400
|
+
For editable dashboard examples, including **Undo/Redo**, **Zooming**, **Catalog Flyouts**, and **Multiple Dashboards**, please refer to [Tenorlab Pro](https://www.tenorlab.com).
|
|
401
401
|
|
|
402
402
|
|
|
403
403
|
------
|
|
@@ -426,7 +426,7 @@ For editable dashboard examples, including **Undo/Redo**, **Zooming**, **Catalog
|
|
|
426
426
|
- [@tenorlab/react-dashboard](https://www.npmjs.com/package/@tenorlab/react-dashboard): React-specific components
|
|
427
427
|
- [@tenorlab/vue-dashboard](https://www.npmjs.com/package/@tenorlab/vue-dashboard): Vue-specific components
|
|
428
428
|
|
|
429
|
-
### Pro
|
|
429
|
+
### Tenorlab Pro Demos
|
|
430
430
|
- [React Demo](https://react.tenorlab.com) (built with @tenorlab/react-dashboard)
|
|
431
431
|
- [Vue Demo](https://vue.tenorlab.com) (built with @tenorlab/vue-dashboard)
|
|
432
432
|
- [Nuxt Demo](https://nuxt.tenorlab.com) (built with @tenorlab/vue-dashboard)
|
|
@@ -446,9 +446,9 @@ For editable dashboard examples, including **Undo/Redo**, **Zooming**, **Catalog
|
|
|
446
446
|
|
|
447
447
|
It provides the foundational components and logic for building dashboards. You are free to use it in any project, personal or commercial.
|
|
448
448
|
|
|
449
|
-
## ⚡️ Go Pro and Save Time: Tenorlab
|
|
449
|
+
## ⚡️ Go Pro and Save Time: Tenorlab Pro
|
|
450
450
|
|
|
451
|
-
A commercial license for a full-blown professional app
|
|
451
|
+
A commercial license for a full-blown professional app code is available for purchase [**here**](https://www.tenorlab.com) and comes with:
|
|
452
452
|
|
|
453
453
|
* **Full Application Shell:** A clean, optimized Vite + TypeScript project structure (with either React, Vue or Nuxt).
|
|
454
454
|
* **Dashboard Management:** Production-ready logic for creating, listing, renaming, and deleting multiple user-defined dashboards.
|
package/dist/core.d.ts
CHANGED
|
@@ -197,6 +197,7 @@ export declare interface IDashboardConfig {
|
|
|
197
197
|
responsiveGrid: boolean;
|
|
198
198
|
widgets: TDashboardWidgetKey[];
|
|
199
199
|
childWidgetsConfig: IChildWidgetConfigEntry[];
|
|
200
|
+
savedProps?: IWidgetSavedProps[];
|
|
200
201
|
cssSettings: IDashboardSettingEntry[];
|
|
201
202
|
_version?: number;
|
|
202
203
|
_stateDescription?: string;
|
|
@@ -282,7 +283,10 @@ export declare interface IDashboardWidgetPropsBase<TExtraProps = any> {
|
|
|
282
283
|
noShadow?: boolean;
|
|
283
284
|
noBorder?: boolean;
|
|
284
285
|
noPadding?: boolean;
|
|
286
|
+
noCollapse?: boolean;
|
|
285
287
|
direction?: TWidgetDirection;
|
|
288
|
+
widgetSavedProps?: IWidgetSavedProps;
|
|
289
|
+
meta?: TWidgetMetaInfoBase;
|
|
286
290
|
extraProps?: TExtraProps;
|
|
287
291
|
}
|
|
288
292
|
|
|
@@ -315,6 +319,12 @@ export declare interface IDynamicWidgetCatalogEntryBase<TFrameworkElementType =
|
|
|
315
319
|
loader?: TWidgetFactoryBase<TFrameworkComponentType>;
|
|
316
320
|
}
|
|
317
321
|
|
|
322
|
+
export declare interface IWidgetSavedProps {
|
|
323
|
+
parentWidgetKey?: TDashboardWidgetKey;
|
|
324
|
+
widgetKey: TDashboardWidgetKey;
|
|
325
|
+
isCollapsed?: boolean;
|
|
326
|
+
}
|
|
327
|
+
|
|
318
328
|
/**
|
|
319
329
|
* @name localWidgetDiscovery
|
|
320
330
|
* @description Scans local directories for widgets.
|
|
@@ -537,8 +547,10 @@ export declare type TWidgetMetaInfoBase<TFrameworkElementType = any> = {
|
|
|
537
547
|
description: string;
|
|
538
548
|
categories: TWidgetCategory[];
|
|
539
549
|
noDuplicatedWidgets?: boolean;
|
|
540
|
-
icon?: TFrameworkElementType | undefined;
|
|
550
|
+
icon?: TFrameworkElementType | string | undefined;
|
|
541
551
|
externalDependencies: string[];
|
|
552
|
+
tags?: string[];
|
|
553
|
+
noCollapse?: boolean;
|
|
542
554
|
};
|
|
543
555
|
|
|
544
556
|
/**
|
|
@@ -8,13 +8,15 @@ import { RefAttributes } from 'react';
|
|
|
8
8
|
import { StoreApi } from 'zustand';
|
|
9
9
|
import { UseBoundStore } from 'zustand';
|
|
10
10
|
|
|
11
|
-
export declare
|
|
11
|
+
export declare const AddIcon: typeof PlusCircleIcon;
|
|
12
12
|
|
|
13
13
|
export declare function Button(props: IButtonProps): JSX_2.Element;
|
|
14
14
|
|
|
15
|
-
export declare function
|
|
15
|
+
export declare function ChevronDownIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
16
16
|
|
|
17
|
-
export declare function
|
|
17
|
+
export declare function CircleQuestionMark({ className, style }: TIconProps): JSX_2.Element;
|
|
18
|
+
|
|
19
|
+
export declare function CrosshairIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
18
20
|
|
|
19
21
|
export declare const DashboardGrid: ForwardRefExoticComponent<IDashboardGridProps & RefAttributes<HTMLDivElement>>;
|
|
20
22
|
|
|
@@ -22,7 +24,7 @@ export declare const DashboardWidgetBase: (props: IDashboardWidgetProps & {
|
|
|
22
24
|
ref?: React.ForwardedRef<HTMLDivElement>;
|
|
23
25
|
}) => React.ReactElement | null;
|
|
24
26
|
|
|
25
|
-
export declare function DeleteIcon({ className }: TIconProps): JSX_2.Element;
|
|
27
|
+
export declare function DeleteIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
26
28
|
|
|
27
29
|
export declare const DraggablePanel: ForwardRefExoticComponent<DraggablePanelProps & RefAttributes<HTMLDivElement>>;
|
|
28
30
|
|
|
@@ -35,6 +37,8 @@ declare type DraggablePanelProps = {
|
|
|
35
37
|
children: React.ReactNode;
|
|
36
38
|
};
|
|
37
39
|
|
|
40
|
+
export declare const Dropdown: default_2.FC<TProps>;
|
|
41
|
+
|
|
38
42
|
/**
|
|
39
43
|
* Component to safely load and render dynamic widgets.
|
|
40
44
|
* This ensures the widget component (and its hooks) is called consistently.
|
|
@@ -42,15 +46,15 @@ declare type DraggablePanelProps = {
|
|
|
42
46
|
* @param {string} props.widgetKey
|
|
43
47
|
* @param {(key: string) => Promise<void>} props.onRemoveClick
|
|
44
48
|
*/
|
|
45
|
-
export declare function DynamicWidgetLoader({ index, maxIndex, widgetKey, parentWidgetKey, targetContainerKey, childWidgetsConfig, widgetCatalog, isEditing, extraProps, onRemoveClick, onMoveClick, selectContainer, }: TDynamicWidgetLoaderProps): JSX_2.Element;
|
|
49
|
+
export declare function DynamicWidgetLoader({ index, maxIndex, widgetKey, parentWidgetKey, targetContainerKey, childWidgetsConfig, savedProps, widgetCatalog, isEditing, extraProps, onRemoveClick, onMoveClick, selectContainer, savedPropsChanged, }: TDynamicWidgetLoaderProps): JSX_2.Element;
|
|
46
50
|
|
|
47
|
-
export declare function EditIcon({ className }: TIconProps): JSX_2.Element;
|
|
51
|
+
export declare function EditIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
48
52
|
|
|
49
|
-
export declare function GridIcon({ className }: TIconProps): JSX_2.Element;
|
|
53
|
+
export declare function GridIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
50
54
|
|
|
51
|
-
export declare function HandGrabIcon({ className }: TIconProps): JSX_2.Element;
|
|
55
|
+
export declare function HandGrabIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
52
56
|
|
|
53
|
-
export declare function HandIcon({ className }: TIconProps): JSX_2.Element;
|
|
57
|
+
export declare function HandIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
54
58
|
|
|
55
59
|
export declare interface IButtonProps {
|
|
56
60
|
disabled?: boolean;
|
|
@@ -106,6 +110,7 @@ export declare interface IDashboardConfig {
|
|
|
106
110
|
responsiveGrid: boolean;
|
|
107
111
|
widgets: TDashboardWidgetKey[];
|
|
108
112
|
childWidgetsConfig: IChildWidgetConfigEntry[];
|
|
113
|
+
savedProps?: IWidgetSavedProps[];
|
|
109
114
|
cssSettings: IDashboardSettingEntry[];
|
|
110
115
|
_version?: number;
|
|
111
116
|
_stateDescription?: string;
|
|
@@ -181,9 +186,12 @@ export declare interface IDashboardWidget extends JSX.Element {
|
|
|
181
186
|
*/
|
|
182
187
|
export declare interface IDashboardWidgetProps<TExtraProps = any> extends IDashboardWidgetPropsBase<TExtraProps> {
|
|
183
188
|
children?: ReactNode;
|
|
189
|
+
titleNode?: ReactNode;
|
|
190
|
+
titleRightNode?: ReactNode;
|
|
184
191
|
onRemoveClick?: (widgetKey: TDashboardWidgetKey, parentWidgetKey?: TDashboardWidgetKey) => void;
|
|
185
192
|
onMoveClick?: (direction: -1 | 1, widgetKey: TDashboardWidgetKey, parentWidgetKey?: TDashboardWidgetKey) => void;
|
|
186
193
|
selectContainer?: (containerKey?: TDashboardWidgetKey) => void;
|
|
194
|
+
savedPropsChanged?: (value: IWidgetSavedProps) => any;
|
|
187
195
|
}
|
|
188
196
|
|
|
189
197
|
/**
|
|
@@ -221,7 +229,10 @@ export declare interface IDashboardWidgetPropsBase<TExtraProps = any> {
|
|
|
221
229
|
noShadow?: boolean;
|
|
222
230
|
noBorder?: boolean;
|
|
223
231
|
noPadding?: boolean;
|
|
232
|
+
noCollapse?: boolean;
|
|
224
233
|
direction?: TWidgetDirection;
|
|
234
|
+
widgetSavedProps?: IWidgetSavedProps;
|
|
235
|
+
meta?: TWidgetMetaInfoBase;
|
|
225
236
|
extraProps?: TExtraProps;
|
|
226
237
|
}
|
|
227
238
|
|
|
@@ -291,6 +302,12 @@ export declare interface ITooltipProps {
|
|
|
291
302
|
title: string;
|
|
292
303
|
}
|
|
293
304
|
|
|
305
|
+
declare interface IWidgetSavedProps {
|
|
306
|
+
parentWidgetKey?: TDashboardWidgetKey;
|
|
307
|
+
widgetKey: TDashboardWidgetKey;
|
|
308
|
+
isCollapsed?: boolean;
|
|
309
|
+
}
|
|
310
|
+
|
|
294
311
|
export declare const ListItem: ForwardRefExoticComponent<TStackProps & {
|
|
295
312
|
innerClass?: string;
|
|
296
313
|
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -301,30 +318,35 @@ export declare const ListItemMiddleChild: ForwardRefExoticComponent<TListItemChi
|
|
|
301
318
|
|
|
302
319
|
export declare const ListItemRightChild: ForwardRefExoticComponent<TListItemChildProps & RefAttributes<HTMLDivElement>>;
|
|
303
320
|
|
|
304
|
-
export declare function
|
|
321
|
+
export declare function MinusCircleIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
305
322
|
|
|
306
|
-
export declare function
|
|
323
|
+
export declare function MonitorIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
307
324
|
|
|
308
|
-
export declare function
|
|
325
|
+
export declare function MonitorSmartphoneIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
309
326
|
|
|
310
|
-
export declare function
|
|
327
|
+
export declare function MoveLeftIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
311
328
|
|
|
312
|
-
export declare function
|
|
329
|
+
export declare function MoveRightIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
313
330
|
|
|
314
|
-
export declare function
|
|
331
|
+
export declare function PlusCircleIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
315
332
|
|
|
316
|
-
export declare function
|
|
333
|
+
export declare function RedoIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
334
|
+
|
|
335
|
+
export declare function RenameIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
336
|
+
|
|
337
|
+
export declare function SettingsIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
317
338
|
|
|
318
339
|
export declare const showToast: (options: any) => void;
|
|
319
340
|
|
|
320
341
|
export declare function Stack(props: TStackProps): JSX_2.Element;
|
|
321
342
|
|
|
322
|
-
export declare function SvgBaseWrapper({ children, className, }: {
|
|
343
|
+
export declare function SvgBaseWrapper({ children, className, style, }: {
|
|
323
344
|
children: React.ReactNode;
|
|
324
345
|
className?: string;
|
|
346
|
+
style?: React.CSSProperties;
|
|
325
347
|
}): JSX_2.Element;
|
|
326
348
|
|
|
327
|
-
export declare function TabletSmartphoneIcon({ className }: TIconProps): JSX_2.Element;
|
|
349
|
+
export declare function TabletSmartphoneIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
328
350
|
|
|
329
351
|
/**
|
|
330
352
|
* @name TAddWidgetResponse
|
|
@@ -341,7 +363,7 @@ declare type TAddWidgetResponse = {
|
|
|
341
363
|
allUpdatedDashboardConfigs: IDashboardConfig[];
|
|
342
364
|
};
|
|
343
365
|
|
|
344
|
-
export declare function TargetIcon({ className }: TIconProps): JSX_2.Element;
|
|
366
|
+
export declare function TargetIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
345
367
|
|
|
346
368
|
export declare type TButtonJustifyCss = 'justify-start' | 'justify-center' | 'justify-end';
|
|
347
369
|
|
|
@@ -354,6 +376,10 @@ declare type TDashboardSlice = {
|
|
|
354
376
|
currentDashboardConfig: IDashboardConfig;
|
|
355
377
|
targetContainerKey?: TDashboardWidgetKey | undefined;
|
|
356
378
|
getNextContainerKey: (containerWidgetKey: TDashboardWidgetKey) => TDashboardWidgetKey;
|
|
379
|
+
getCurrentDashboardConfig: () => IDashboardConfig;
|
|
380
|
+
getCurrentDashboardId: () => string;
|
|
381
|
+
getIsResponsive: () => boolean;
|
|
382
|
+
getTargetContainerKey: () => TDashboardWidgetKey | undefined;
|
|
357
383
|
setIsLoading: (value: boolean) => boolean;
|
|
358
384
|
setIsEditing: (value: boolean) => boolean;
|
|
359
385
|
setTargetContainerKey: (value: TDashboardWidgetKey | undefined) => TDashboardWidgetKey | undefined;
|
|
@@ -422,12 +448,14 @@ declare type TDynamicWidgetLoaderProps<TExtraProps = any> = {
|
|
|
422
448
|
parentWidgetKey?: TDashboardWidgetKey;
|
|
423
449
|
targetContainerKey?: TDashboardWidgetKey;
|
|
424
450
|
childWidgetsConfig?: IChildWidgetConfigEntry[];
|
|
451
|
+
savedProps?: IWidgetSavedProps[];
|
|
425
452
|
widgetCatalog: TDashboardWidgetCatalog;
|
|
426
453
|
isEditing: boolean;
|
|
427
454
|
extraProps?: TExtraProps;
|
|
428
455
|
onRemoveClick?: (widgetKey: TDashboardWidgetKey, parentWidgetKey?: TDashboardWidgetKey) => void;
|
|
429
456
|
onMoveClick?: (direction: -1 | 1, widgetKey: TDashboardWidgetKey, parentWidgetKey?: TDashboardWidgetKey) => void;
|
|
430
457
|
selectContainer?: (containerKey: TDashboardWidgetKey) => void;
|
|
458
|
+
savedPropsChanged: (value: IWidgetSavedProps) => any;
|
|
431
459
|
};
|
|
432
460
|
|
|
433
461
|
/**
|
|
@@ -459,9 +487,10 @@ declare type TGetSavedDashboards = (userID: number | string, clientAppKey: strin
|
|
|
459
487
|
|
|
460
488
|
declare type TIconProps = {
|
|
461
489
|
className?: string;
|
|
490
|
+
style?: React.CSSProperties;
|
|
462
491
|
};
|
|
463
492
|
|
|
464
|
-
export declare function TimerResetIcon({ className }: TIconProps): JSX_2.Element;
|
|
493
|
+
export declare function TimerResetIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
465
494
|
|
|
466
495
|
declare type TListItemChildProps = {
|
|
467
496
|
testId?: string;
|
|
@@ -482,7 +511,20 @@ export declare type TManifestEntry = {
|
|
|
482
511
|
meta: TWidgetMetaInfoBase;
|
|
483
512
|
};
|
|
484
513
|
|
|
485
|
-
declare
|
|
514
|
+
declare interface TProps {
|
|
515
|
+
testid?: string;
|
|
516
|
+
label?: string;
|
|
517
|
+
hideLabel?: boolean;
|
|
518
|
+
showChevron?: boolean;
|
|
519
|
+
hide?: boolean;
|
|
520
|
+
enabled: boolean;
|
|
521
|
+
isMenuOpen: boolean;
|
|
522
|
+
toggleOpen: (open: boolean) => void;
|
|
523
|
+
icon?: ReactNode;
|
|
524
|
+
children?: ReactNode;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
declare type TProps_2 = {
|
|
486
528
|
children: React.ReactNode;
|
|
487
529
|
addCssClasses?: string;
|
|
488
530
|
};
|
|
@@ -604,8 +646,10 @@ export declare type TWidgetMetaInfoBase<TFrameworkElementType = any> = {
|
|
|
604
646
|
description: string;
|
|
605
647
|
categories: TWidgetCategory[];
|
|
606
648
|
noDuplicatedWidgets?: boolean;
|
|
607
|
-
icon?: TFrameworkElementType | undefined;
|
|
649
|
+
icon?: TFrameworkElementType | string | undefined;
|
|
608
650
|
externalDependencies: string[];
|
|
651
|
+
tags?: string[];
|
|
652
|
+
noCollapse?: boolean;
|
|
609
653
|
};
|
|
610
654
|
|
|
611
655
|
export declare type TWidgetsCatalogFlyoutProps = {
|
|
@@ -630,7 +674,7 @@ export declare type TWidgetsCatalogFlyoutProps = {
|
|
|
630
674
|
*/
|
|
631
675
|
export declare type TWidgetSize = 'default' | 'large' | 'xlarge';
|
|
632
676
|
|
|
633
|
-
export declare function UndoIcon({ className }: TIconProps): JSX_2.Element;
|
|
677
|
+
export declare function UndoIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
634
678
|
|
|
635
679
|
export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<TDashboardSlice>, "subscribe"> & {
|
|
636
680
|
subscribe: {
|
|
@@ -662,14 +706,14 @@ export declare function WidgetContainerRow(props: IDashboardWidgetProps): IDashb
|
|
|
662
706
|
|
|
663
707
|
export declare function WidgetsCatalogFlyout(props: TWidgetsCatalogFlyoutProps): JSX_2.Element;
|
|
664
708
|
|
|
665
|
-
export declare function WrapperColumnContent({ children, addCssClasses }:
|
|
709
|
+
export declare function WrapperColumnContent({ children, addCssClasses }: TProps_2): JSX_2.Element;
|
|
666
710
|
|
|
667
|
-
export declare function WrapperColumnContentListItem({ children, addCssClasses }:
|
|
711
|
+
export declare function WrapperColumnContentListItem({ children, addCssClasses }: TProps_2): JSX_2.Element;
|
|
668
712
|
|
|
669
|
-
export declare function XCircleIcon({ className }: TIconProps): JSX_2.Element;
|
|
713
|
+
export declare function XCircleIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
670
714
|
|
|
671
|
-
export declare function ZoomInIcon({ className }: TIconProps): JSX_2.Element;
|
|
715
|
+
export declare function ZoomInIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
672
716
|
|
|
673
|
-
export declare function ZoomOutIcon({ className }: TIconProps): JSX_2.Element;
|
|
717
|
+
export declare function ZoomOutIcon({ className, style }: TIconProps): JSX_2.Element;
|
|
674
718
|
|
|
675
719
|
export { }
|