@tenorlab/react-dashboard 1.5.44 → 1.6.0
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/LICENSE +21 -0
- package/README.md +30 -23
- package/package.json +6 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tenorlab
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# @tenorlab/react-dashboard
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
[](https://www.tenorlab.com)
|
|
5
|
+
[](https://react.dev/)
|
|
6
|
+
|
|
7
|
+
Foundation components for creating user-configurable, high-performance dashboards in React.
|
|
4
8
|
|
|
5
9
|
## 🏗 Relationship to Core
|
|
6
10
|
|
|
@@ -10,14 +14,15 @@ This package extends **@tenorlab/dashboard-core**. It provides the React impleme
|
|
|
10
14
|
|
|
11
15
|
|
|
12
16
|
## Demos
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
|
|
18
|
+
* [**React Demo**](https://react.tenorlab.com) (built with **@tenorlab/react-dashboard**)
|
|
19
|
+
* [**Vue Demo**](https://vue.tenorlab.com) (built with **@tenorlab/vue-dashboard**)
|
|
15
20
|
|
|
16
21
|
|
|
17
22
|
## ✨ Features
|
|
18
23
|
|
|
19
24
|
- **Type-Safe:** Deep integration with TypeScript 5.8+ for full IDE support.
|
|
20
|
-
- **State Management:** Built-in `useDashboardStore`
|
|
25
|
+
- **State Management:** Built-in `useDashboardStore` and `useDashboardUndoService`.
|
|
21
26
|
- **User Configurable:** Ready-to-use components for adding, removing, and dragging widgets.
|
|
22
27
|
- **Themeable:** Native support for CSS Variables and Tailwind CSS.
|
|
23
28
|
- **Vite Optimized:** Full ESM support and tree-shakeable.
|
|
@@ -73,19 +78,12 @@ import {
|
|
|
73
78
|
WrapperColumnContent
|
|
74
79
|
} from '@tenorlab/react-dashboard'
|
|
75
80
|
|
|
76
|
-
const WidgetKey: TDashboardWidgetKey = 'WidgetTotalOrders'
|
|
77
|
-
|
|
78
81
|
export function WidgetTotalOrders(props: IDashboardWidgetProps): IDashboardWidget {
|
|
79
82
|
return (
|
|
80
83
|
<DashboardWidgetBase
|
|
81
|
-
widgetKey=
|
|
84
|
+
widgetKey="WidgetTotalOrders"
|
|
82
85
|
title="Total Orders"
|
|
83
|
-
|
|
84
|
-
index={props.index}
|
|
85
|
-
maxIndex={props.maxIndex}
|
|
86
|
-
isEditing={props.isEditing}
|
|
87
|
-
onRemoveClick={props.onRemoveClick}
|
|
88
|
-
onMoveClick={props.onMoveClick}
|
|
86
|
+
{...props}
|
|
89
87
|
>
|
|
90
88
|
<WrapperColumnContent>
|
|
91
89
|
<div className="dashboard-number number-xl text-primary">1,250</div>
|
|
@@ -361,8 +359,8 @@ For a complete example including **Undo/Redo**, **Zooming**, **Catalog Flyouts**
|
|
|
361
359
|
|
|
362
360
|
- **`DashboardGrid`**: The main layout engine for positioning widgets.
|
|
363
361
|
- **`WidgetContainer`**: Wrapper providing common widget UI (headers, actions, loading states).
|
|
364
|
-
- **`WidgetsCatalogFlyout`**: A
|
|
365
|
-
- **`DynamicWidgetLoader`**:
|
|
362
|
+
- **`WidgetsCatalogFlyout`**: A draggable panel for users to browse and add new widgets.
|
|
363
|
+
- **`DynamicWidgetLoader`**: The core widget loader component.
|
|
366
364
|
|
|
367
365
|
### Hooks & State
|
|
368
366
|
|
|
@@ -374,24 +372,33 @@ For a complete example including **Undo/Redo**, **Zooming**, **Catalog Flyouts**
|
|
|
374
372
|
|
|
375
373
|
|
|
376
374
|
## Links
|
|
375
|
+
|
|
377
376
|
- [@tenorlab/react-dashboard](https://www.npmjs.com/package/@tenorlab/react-dashboard): React-specific components
|
|
378
377
|
- [@tenorlab/vue-dashboard](https://www.npmjs.com/package/@tenorlab/vue-dashboard): Vue-specific components
|
|
379
378
|
- [Official Website](https://www.tenorlab.com)
|
|
380
|
-
- [React Demo](https://react.tenorlab.com)
|
|
381
|
-
- [Vue Demo](https://vue.tenorlab.com)
|
|
382
|
-
- [
|
|
379
|
+
- [React Demo](https://react.tenorlab.com)
|
|
380
|
+
- [Vue Demo](https://vue.tenorlab.com)
|
|
381
|
+
- [Get the Pro Template](https://payhip.com/b/gPBpo)
|
|
383
382
|
- [Follow on BlueSky](https://bsky.app/profile/tenorlab.bsky.social)
|
|
384
383
|
|
|
385
384
|
|
|
386
385
|
------
|
|
387
386
|
|
|
388
387
|
|
|
389
|
-
## ⚖️ Licensing
|
|
388
|
+
## ⚖️ Licensing & Usage
|
|
389
|
+
|
|
390
|
+
**@tenorlab/react-dashboard** is [MIT licensed](https://opensource.org/licenses/MIT).
|
|
391
|
+
|
|
392
|
+
It provides the foundational components and logic for building dashboards. You are free to use it in any project, personal or commercial.
|
|
393
|
+
|
|
394
|
+
## ⚡️ Go Pro and Save Time: Tenorlab App Template
|
|
390
395
|
|
|
391
|
-
|
|
396
|
+
A commercial license for a full-blown professional app template is available for purchase [**here**](https://www.tenorlab.com) and comes with:
|
|
392
397
|
|
|
393
|
-
|
|
394
|
-
|
|
398
|
+
* **Full Application Shell:** A clean, optimized Vite + TypeScript project structure (with either React or Vue).
|
|
399
|
+
* **Dashboard Management:** Production-ready logic for creating, listing, renaming, and deleting multiple user-defined dashboards.
|
|
400
|
+
* **Implementation Examples:** Expert patterns for both "Read-Only" (Analyst view) and "User-Editable" (Admin view) dashboard modes.
|
|
401
|
+
* **Tenorlab Theme Engine:** A sophisticated Tailwind-based system supporting multiple custom themes (not just Light/Dark mode).
|
|
395
402
|
|
|
396
|
-
If you are using this library to build a revenue-generating product or within a commercial entity, please visit [https://payhip.com/b/gPBpo](https://payhip.com/b/gPBpo) to purchase a license.
|
|
397
403
|
|
|
404
|
+
[**Live React Demo**](https://react.tenorlab.com), [**Live Vue Demo**](https://vue.tenorlab.com)
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenorlab/react-dashboard",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Foundation components for creating user-configurable dashboards in React",
|
|
5
5
|
"author": "Damiano Fusco",
|
|
6
|
+
"license": "MIT",
|
|
6
7
|
"type": "module",
|
|
7
8
|
"repository": {
|
|
8
9
|
"type": "git",
|
|
@@ -32,7 +33,9 @@
|
|
|
32
33
|
"push": "npm run pretty; git add .; git commit -m \"Latest\"; git push"
|
|
33
34
|
},
|
|
34
35
|
"files": [
|
|
35
|
-
"dist"
|
|
36
|
+
"dist",
|
|
37
|
+
"LICENSE",
|
|
38
|
+
"README.md"
|
|
36
39
|
],
|
|
37
40
|
"exports": {
|
|
38
41
|
".": {
|
|
@@ -54,7 +57,7 @@
|
|
|
54
57
|
"zustand": "^5.0.0 || ^5.0.9"
|
|
55
58
|
},
|
|
56
59
|
"devDependencies": {
|
|
57
|
-
"@tenorlab/dashboard-core": "^1.
|
|
60
|
+
"@tenorlab/dashboard-core": "^1.6.0",
|
|
58
61
|
"@types/node": "^24.10.1",
|
|
59
62
|
"@types/react": "19.2.3",
|
|
60
63
|
"@types/react-dom": "19.2.3",
|