@dragonworks/ngx-dashboard-widgets 20.0.0 → 20.0.2

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.
Files changed (2) hide show
  1. package/README.md +41 -46
  2. package/package.json +19 -1
package/README.md CHANGED
@@ -1,63 +1,58 @@
1
- # NgxDashboardWidgets
1
+ # @dragonworks/ngx-dashboard-widgets
2
2
 
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.0.0.
3
+ Widget collection for ngx-dashboard with Material Design 3 compliance.
4
4
 
5
- ## Code scaffolding
6
-
7
- Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
5
+ ## Installation
8
6
 
9
7
  ```bash
10
- ng generate component component-name
8
+ npm install @dragonworks/ngx-dashboard-widgets @dragonworks/ngx-dashboard
11
9
  ```
12
10
 
13
- For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
11
+ ## Included Widgets
14
12
 
15
- ```bash
16
- ng generate --help
17
- ```
13
+ - **Arrow Widget** - Directional indicators with rotation
14
+ - **Label Widget** - Text display with responsive sizing
15
+ - **Clock Widget** - Analog/digital clock with real-time updates
16
+ - **ResponsiveText Directive** - Canvas-optimized text sizing
18
17
 
19
- ## Building
18
+ ## Usage
20
19
 
21
- To build the library, run:
20
+ ```typescript
21
+ import { DashboardService } from '@dragonworks/ngx-dashboard';
22
+ import { ArrowWidgetComponent } from '@dragonworks/ngx-dashboard-widgets';
22
23
 
23
- ```bash
24
- ng build ngx-dashboard-widgets
24
+ export class AppComponent {
25
+ constructor(dashboardService: DashboardService) {
26
+ // Register widgets
27
+ dashboardService.registerWidgetType(ArrowWidgetComponent);
28
+ }
29
+ }
25
30
  ```
26
31
 
27
- This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
28
-
29
- ### Publishing the Library
30
-
31
- Once the project is built, you can publish your library by following these steps:
32
-
33
- 1. Navigate to the `dist` directory:
34
- ```bash
35
- cd dist/ngx-dashboard-widgets
36
- ```
37
-
38
- 2. Run the `npm publish` command to publish your library to the npm registry:
39
- ```bash
40
- npm publish
41
- ```
42
-
43
- ## Running unit tests
44
-
45
- To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
46
-
47
- ```bash
48
- ng test
32
+ ## Creating Custom Widgets
33
+
34
+ ```typescript
35
+ @Component({
36
+ selector: 'my-widget',
37
+ template: `<div>{{ state?.text }}</div>`,
38
+ standalone: true
39
+ })
40
+ export class MyWidgetComponent {
41
+ state = signal<any>({});
42
+
43
+ static readonly metadata = {
44
+ widgetTypeId: 'my-widget',
45
+ displayName: 'My Widget',
46
+ iconName: 'star',
47
+ description: 'Custom widget example'
48
+ };
49
+ }
49
50
  ```
50
51
 
51
- ## Running end-to-end tests
52
-
53
- For end-to-end (e2e) testing, run:
54
-
55
- ```bash
56
- ng e2e
57
- ```
52
+ ## Documentation
58
53
 
59
- Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
54
+ See the [main repository](https://github.com/dragonworks/ngx-dashboard) for full documentation.
60
55
 
61
- ## Additional Resources
56
+ ## License
62
57
 
63
- For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
58
+ MIT
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@dragonworks/ngx-dashboard-widgets",
3
- "version": "20.0.0",
3
+ "version": "20.0.2",
4
+ "description": "Widget collection for ngx-dashboard with Material Design 3 compliance including arrow, label, clock widgets and responsive text directive",
4
5
  "peerDependencies": {
5
6
  "@angular/common": "^20.0.0",
6
7
  "@angular/core": "^20.0.0",
@@ -10,6 +11,23 @@
10
11
  "tslib": "^2.3.0"
11
12
  },
12
13
  "sideEffects": false,
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/TobyBackstrom/ngx-dashboard.git"
17
+ },
18
+ "author": "Toby Backstrom",
19
+ "license": "Apache-2.0",
20
+ "bugs": {
21
+ "url": "https://github.com/TobyBackstrom/ngx-dashboard/issues"
22
+ },
23
+ "homepage": "https://github.com/TobyBackstrom/ngx-dashboard#readme",
24
+ "keywords": [
25
+ "angular",
26
+ "dashboard",
27
+ "widgets",
28
+ "material-design",
29
+ "md3"
30
+ ],
13
31
  "module": "fesm2022/dragonworks-ngx-dashboard-widgets.mjs",
14
32
  "typings": "index.d.ts",
15
33
  "exports": {