@c8y/tutorial 1020.29.0 → 1020.34.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/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c8y/tutorial",
|
|
3
|
-
"version": "1020.
|
|
3
|
+
"version": "1020.34.0",
|
|
4
4
|
"description": "This package is used to scaffold a tutorial for Cumulocity IoT Web SDK which explains a lot of concepts.",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@c8y/style": "1020.
|
|
7
|
-
"@c8y/ngx-components": "1020.
|
|
8
|
-
"@c8y/client": "1020.
|
|
9
|
-
"@c8y/bootstrap": "1020.
|
|
6
|
+
"@c8y/style": "1020.34.0",
|
|
7
|
+
"@c8y/ngx-components": "1020.34.0",
|
|
8
|
+
"@c8y/client": "1020.34.0",
|
|
9
|
+
"@c8y/bootstrap": "1020.34.0",
|
|
10
10
|
"@angular/cdk": "^17.3.9",
|
|
11
11
|
"ngx-bootstrap": "12.0.0",
|
|
12
12
|
"leaflet": "1.9.4",
|
|
13
13
|
"rxjs": "^7.4.0"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@c8y/options": "1020.
|
|
17
|
-
"@c8y/devkit": "1020.
|
|
16
|
+
"@c8y/options": "1020.34.0",
|
|
17
|
+
"@c8y/devkit": "1020.34.0"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@angular/common": ">=16 <18"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
2
|
import { Component } from '@angular/core';
|
|
3
3
|
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import { IApplication } from '@c8y/client';
|
|
4
5
|
import { AppStateService, CoreModule, PackageType } from '@c8y/ngx-components';
|
|
5
6
|
import { SharedEcosystemModule } from '@c8y/ngx-components/ecosystem/shared';
|
|
6
|
-
import { IApplication } from '@c8y/client';
|
|
7
7
|
import { Observable, of } from 'rxjs';
|
|
8
8
|
|
|
9
9
|
@Component({
|
|
@@ -43,7 +43,7 @@ export class ApplicationCardExampleComponent {
|
|
|
43
43
|
key: 'devicemanagement-application-key',
|
|
44
44
|
label: PackageType.OFFICIAL,
|
|
45
45
|
description:
|
|
46
|
-
'This package is used to scaffold a Device
|
|
46
|
+
'This package is used to scaffold a Device Management application for Cumulocity IoT.',
|
|
47
47
|
manifest: { version: '1.0.0', author: 'c8y_dev' }
|
|
48
48
|
}
|
|
49
49
|
]);
|
|
@@ -104,6 +104,7 @@ export class ServerGridExampleService {
|
|
|
104
104
|
icon: 'online',
|
|
105
105
|
iconClasses: 'm-r-4',
|
|
106
106
|
text: 'Custom action',
|
|
107
|
+
showIf: selectedItemIds => selectedItemIds?.every(id => Number.parseInt(id) % 2 === 0),
|
|
107
108
|
callback: selectedItemIds => console.dir(selectedItemIds)
|
|
108
109
|
}
|
|
109
110
|
];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NgModule } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import {
|
|
3
|
+
import { hookWidget } from '@c8y/ngx-components';
|
|
4
4
|
|
|
5
5
|
async function loadViewComponent() {
|
|
6
6
|
const { LazyWidgetViewComponent } = await import('./lazy-widget-view');
|
|
@@ -15,7 +15,7 @@ async function loadConfigComponent() {
|
|
|
15
15
|
@NgModule({
|
|
16
16
|
imports: [CommonModule],
|
|
17
17
|
providers: [
|
|
18
|
-
|
|
18
|
+
hookWidget({
|
|
19
19
|
id: 'tutorial-lazy-widget',
|
|
20
20
|
label: 'Lazy Loaded Widget',
|
|
21
21
|
description: 'Lazy Loaded Widget',
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { NgModule } from '@angular/core';
|
|
2
2
|
import {
|
|
3
3
|
CommonModule as C8yCommonModule,
|
|
4
|
-
DynamicComponentDefinition,
|
|
5
4
|
DynamicComponentErrorStrategy,
|
|
5
|
+
DynamicWidgetDefinition,
|
|
6
6
|
FormsModule,
|
|
7
|
-
|
|
7
|
+
hookWidget,
|
|
8
|
+
WidgetDataType
|
|
8
9
|
} from '@c8y/ngx-components';
|
|
9
10
|
import { AssetSelectorModule } from '@c8y/ngx-components/assets-navigator';
|
|
10
|
-
import { ContextWidgetConfig } from '@c8y/ngx-components/context-dashboard';
|
|
11
11
|
import { WidgetConfigDemo } from './demo-widget-config.component';
|
|
12
12
|
import { WidgetDemo } from './demo-widget.component';
|
|
13
13
|
|
|
@@ -23,7 +23,7 @@ import { WidgetDemo } from './demo-widget.component';
|
|
|
23
23
|
imports: [FormsModule, AssetSelectorModule, C8yCommonModule],
|
|
24
24
|
exports: [],
|
|
25
25
|
providers: [
|
|
26
|
-
|
|
26
|
+
hookWidget({
|
|
27
27
|
id: 'angular.widget.demo',
|
|
28
28
|
label: 'My angular widget',
|
|
29
29
|
description: 'This is a description from angular',
|
|
@@ -47,8 +47,8 @@ import { WidgetDemo } from './demo-widget.component';
|
|
|
47
47
|
displaySettings: {
|
|
48
48
|
globalTimeContext: true // Set this to true, to add a global time context binding
|
|
49
49
|
}
|
|
50
|
-
} as
|
|
51
|
-
} as
|
|
50
|
+
} as WidgetDataType
|
|
51
|
+
} as DynamicWidgetDefinition)
|
|
52
52
|
]
|
|
53
53
|
})
|
|
54
54
|
export class DashboardWidgetDemoModule {}
|