@tenorlab/react-dashboard 1.6.1 → 1.6.3
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 +3 -0
- package/dist/core.es.js +5 -15
- package/dist/react-dashboard.d.ts +28 -4
- package/dist/react-dashboard.es.js +1712 -1538
- package/dist/styles.css +1 -1
- package/package.json +2 -2
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
|
@@ -275,6 +275,9 @@ export declare interface IDashboardWidgetPropsBase<TExtraProps = any> {
|
|
|
275
275
|
size?: TWidgetSize;
|
|
276
276
|
borderCssClasses?: string;
|
|
277
277
|
backgroundCssClasses?: string;
|
|
278
|
+
addCssClasses?: string;
|
|
279
|
+
overrideCssClasses?: string;
|
|
280
|
+
tags?: string[];
|
|
278
281
|
hideTitle?: boolean;
|
|
279
282
|
noShadow?: boolean;
|
|
280
283
|
noBorder?: boolean;
|
package/dist/core.es.js
CHANGED
|
@@ -106,16 +106,12 @@ const W = [
|
|
|
106
106
|
else {
|
|
107
107
|
l.forEach((d) => {
|
|
108
108
|
d.value = (d.value || "").replace(/NaN/g, "");
|
|
109
|
-
const c = a.cssSettings.find(
|
|
110
|
-
(g) => g.key === d.key
|
|
111
|
-
);
|
|
109
|
+
const c = a.cssSettings.find((g) => g.key === d.key);
|
|
112
110
|
c && (Object.keys(c).forEach((g) => {
|
|
113
111
|
g in d || (d[g] = c[g]);
|
|
114
112
|
}), d.step = c.step, d.minValue = c.minValue, d.defaultValue = c.defaultValue, d.defaultUnit = c.defaultUnit, /\d+/g.test(d.value) === !1 && (d.value = c ? c.value : "1.0rem"));
|
|
115
113
|
});
|
|
116
|
-
const o = a.cssSettings.filter((d) => !l.some(
|
|
117
|
-
(c) => c.key === d.key
|
|
118
|
-
));
|
|
114
|
+
const o = a.cssSettings.filter((d) => !l.some((c) => c.key === d.key));
|
|
119
115
|
s.cssSettings = [...l, ...o];
|
|
120
116
|
}
|
|
121
117
|
s.widgets = s.widgets.filter(
|
|
@@ -172,16 +168,12 @@ const W = [
|
|
|
172
168
|
(r) => r.parentWidgetKey === i
|
|
173
169
|
);
|
|
174
170
|
if (!a || a.length === 0)
|
|
175
|
-
return t.widgets = t.widgets.filter(
|
|
176
|
-
(r) => r !== i
|
|
177
|
-
), !1;
|
|
171
|
+
return t.widgets = t.widgets.filter((r) => r !== i), !1;
|
|
178
172
|
}
|
|
179
173
|
return !0;
|
|
180
174
|
}), t;
|
|
181
175
|
}, x = (e) => {
|
|
182
|
-
const t = e.widgets.filter(
|
|
183
|
-
(a) => a.includes("WidgetContainer")
|
|
184
|
-
), i = {};
|
|
176
|
+
const t = e.widgets.filter((a) => a.includes("WidgetContainer")), i = {};
|
|
185
177
|
return t.forEach((a, r) => {
|
|
186
178
|
const n = `${a.split("_container")[0]}_container${r + 1}`;
|
|
187
179
|
i[a] = n;
|
|
@@ -394,9 +386,7 @@ const W = [
|
|
|
394
386
|
updatedDashboardConfig: o
|
|
395
387
|
};
|
|
396
388
|
} else {
|
|
397
|
-
const n = (e.widgets || []).filter(
|
|
398
|
-
(l) => `${l}`.trim().toLowerCase() !== a
|
|
399
|
-
), s = e.childWidgetsConfig.filter(
|
|
389
|
+
const n = (e.widgets || []).filter((l) => `${l}`.trim().toLowerCase() !== a), s = e.childWidgetsConfig.filter(
|
|
400
390
|
(l) => `${l.parentWidgetKey}`.trim().toLowerCase() !== a
|
|
401
391
|
);
|
|
402
392
|
return {
|
|
@@ -8,10 +8,12 @@ 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 ChevronDownIcon({ className }: TIconProps): JSX_2.Element;
|
|
16
|
+
|
|
15
17
|
export declare function CircleQuestionMark({ className }: TIconProps): JSX_2.Element;
|
|
16
18
|
|
|
17
19
|
export declare function CrosshairIcon({ className }: TIconProps): JSX_2.Element;
|
|
@@ -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.
|
|
@@ -214,6 +218,9 @@ export declare interface IDashboardWidgetPropsBase<TExtraProps = any> {
|
|
|
214
218
|
size?: TWidgetSize;
|
|
215
219
|
borderCssClasses?: string;
|
|
216
220
|
backgroundCssClasses?: string;
|
|
221
|
+
addCssClasses?: string;
|
|
222
|
+
overrideCssClasses?: string;
|
|
223
|
+
tags?: string[];
|
|
217
224
|
hideTitle?: boolean;
|
|
218
225
|
noShadow?: boolean;
|
|
219
226
|
noBorder?: boolean;
|
|
@@ -298,6 +305,8 @@ export declare const ListItemMiddleChild: ForwardRefExoticComponent<TListItemChi
|
|
|
298
305
|
|
|
299
306
|
export declare const ListItemRightChild: ForwardRefExoticComponent<TListItemChildProps & RefAttributes<HTMLDivElement>>;
|
|
300
307
|
|
|
308
|
+
export declare function MinusCircleIcon({ className }: TIconProps): JSX_2.Element;
|
|
309
|
+
|
|
301
310
|
export declare function MonitorIcon({ className }: TIconProps): JSX_2.Element;
|
|
302
311
|
|
|
303
312
|
export declare function MonitorSmartphoneIcon({ className }: TIconProps): JSX_2.Element;
|
|
@@ -306,6 +315,8 @@ export declare function MoveLeftIcon({ className }: TIconProps): JSX_2.Element;
|
|
|
306
315
|
|
|
307
316
|
export declare function MoveRightIcon({ className }: TIconProps): JSX_2.Element;
|
|
308
317
|
|
|
318
|
+
export declare function PlusCircleIcon({ className }: TIconProps): JSX_2.Element;
|
|
319
|
+
|
|
309
320
|
export declare function RedoIcon({ className }: TIconProps): JSX_2.Element;
|
|
310
321
|
|
|
311
322
|
export declare function RenameIcon({ className }: TIconProps): JSX_2.Element;
|
|
@@ -479,7 +490,20 @@ export declare type TManifestEntry = {
|
|
|
479
490
|
meta: TWidgetMetaInfoBase;
|
|
480
491
|
};
|
|
481
492
|
|
|
482
|
-
declare
|
|
493
|
+
declare interface TProps {
|
|
494
|
+
testid?: string;
|
|
495
|
+
label?: string;
|
|
496
|
+
hideLabel?: boolean;
|
|
497
|
+
showChevron?: boolean;
|
|
498
|
+
hide?: boolean;
|
|
499
|
+
enabled: boolean;
|
|
500
|
+
isMenuOpen: boolean;
|
|
501
|
+
toggleOpen: (open: boolean) => void;
|
|
502
|
+
icon?: ReactNode;
|
|
503
|
+
children?: ReactNode;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
declare type TProps_2 = {
|
|
483
507
|
children: React.ReactNode;
|
|
484
508
|
addCssClasses?: string;
|
|
485
509
|
};
|
|
@@ -659,9 +683,9 @@ export declare function WidgetContainerRow(props: IDashboardWidgetProps): IDashb
|
|
|
659
683
|
|
|
660
684
|
export declare function WidgetsCatalogFlyout(props: TWidgetsCatalogFlyoutProps): JSX_2.Element;
|
|
661
685
|
|
|
662
|
-
export declare function WrapperColumnContent({ children, addCssClasses }:
|
|
686
|
+
export declare function WrapperColumnContent({ children, addCssClasses }: TProps_2): JSX_2.Element;
|
|
663
687
|
|
|
664
|
-
export declare function WrapperColumnContentListItem({ children, addCssClasses }:
|
|
688
|
+
export declare function WrapperColumnContentListItem({ children, addCssClasses }: TProps_2): JSX_2.Element;
|
|
665
689
|
|
|
666
690
|
export declare function XCircleIcon({ className }: TIconProps): JSX_2.Element;
|
|
667
691
|
|