@c8y/tutorial 1019.6.3 → 1019.6.10
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/cumulocity.config.ts +1 -0
- package/package.json +6 -6
- package/src/application-card/application-card-example.component.html +2 -0
- package/src/help/help-example.component.html +12 -0
- package/src/help/help-example.component.ts +2 -13
- package/src/properties-list/properties-list-example.component.html +22 -0
- package/src/properties-list/properties-list-example.component.ts +75 -27
package/cumulocity.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c8y/tutorial",
|
|
3
|
-
"version": "1019.6.
|
|
3
|
+
"version": "1019.6.10",
|
|
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/devkit": "1019.6.
|
|
7
|
-
"@c8y/style": "1019.6.
|
|
8
|
-
"@c8y/ngx-components": "1019.6.
|
|
9
|
-
"@c8y/client": "1019.6.
|
|
10
|
-
"@c8y/bootstrap": "1019.6.
|
|
6
|
+
"@c8y/devkit": "1019.6.10",
|
|
7
|
+
"@c8y/style": "1019.6.10",
|
|
8
|
+
"@c8y/ngx-components": "1019.6.10",
|
|
9
|
+
"@c8y/client": "1019.6.10",
|
|
10
|
+
"@c8y/bootstrap": "1019.6.10",
|
|
11
11
|
"@angular/cdk": "^16.2.11",
|
|
12
12
|
"ngx-bootstrap": "11.0.2",
|
|
13
13
|
"leaflet": "1.7.1",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<c8y-title>Context help</c8y-title>
|
|
2
|
+
<c8y-action-bar-item [placement]="'right'">
|
|
3
|
+
<a class="btn btn-link" title="{{ 'Only pretends to do something...' }}" disabled="disabled">
|
|
4
|
+
<i c8yIcon="refresh"></i>
|
|
5
|
+
{{ 'Refresh' }}
|
|
6
|
+
</a>
|
|
7
|
+
</c8y-action-bar-item>
|
|
8
|
+
<!-- important -->
|
|
9
|
+
<c8y-help
|
|
10
|
+
src="/docs/device-management-application/viewing-all-devices/#viewing-all-devices"
|
|
11
|
+
></c8y-help>
|
|
12
|
+
<!-- /important -->
|
|
@@ -2,21 +2,10 @@ import { Component } from '@angular/core';
|
|
|
2
2
|
import { CommonModule, CoreModule } from '@c8y/ngx-components';
|
|
3
3
|
import { DeviceGridModule } from '@c8y/ngx-components/device-grid';
|
|
4
4
|
import { DeviceListModule } from '@c8y/ngx-components/device-list';
|
|
5
|
+
|
|
5
6
|
@Component({
|
|
6
7
|
selector: 'help-example',
|
|
7
|
-
|
|
8
|
-
<div class="card">
|
|
9
|
-
<div class="card-block">
|
|
10
|
-
<div>
|
|
11
|
-
The "Help" component adds contextual help to the action bar(question mark icon). The
|
|
12
|
-
content of contextual help comes from the user guide.
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
<c8y-help
|
|
18
|
-
src="/docs/device-management-application/viewing-all-devices/#viewing-all-devices"
|
|
19
|
-
></c8y-help> `,
|
|
8
|
+
templateUrl: './help-example.component.html',
|
|
20
9
|
standalone: true,
|
|
21
10
|
imports: [CoreModule, CommonModule, DeviceGridModule, DeviceListModule]
|
|
22
11
|
})
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<div class="p-t-16">
|
|
2
|
+
<c8y-title>Properties list</c8y-title>
|
|
3
|
+
<!-- important -->
|
|
4
|
+
<c8y-properties-list
|
|
5
|
+
[title]="'Custom object properties'"
|
|
6
|
+
[data]="customData"
|
|
7
|
+
[emptyLabel]="'--'"
|
|
8
|
+
[properties]="customProperties"
|
|
9
|
+
></c8y-properties-list>
|
|
10
|
+
<!-- /important -->
|
|
11
|
+
|
|
12
|
+
<br />
|
|
13
|
+
|
|
14
|
+
<!-- important -->
|
|
15
|
+
<c8y-properties-list
|
|
16
|
+
[title]="'Typed object properties'"
|
|
17
|
+
[data]="archiveManifest"
|
|
18
|
+
[emptyLabel]="'--'"
|
|
19
|
+
[properties]="specifiedPackageVersionProperties"
|
|
20
|
+
></c8y-properties-list>
|
|
21
|
+
<!-- /important -->
|
|
22
|
+
</div>
|
|
@@ -1,49 +1,97 @@
|
|
|
1
1
|
import { Component } from '@angular/core';
|
|
2
|
-
import { CoreModule, gettext, PropertiesListItem } from '@c8y/ngx-components';
|
|
3
2
|
import { IManifest } from '@c8y/client';
|
|
4
|
-
|
|
3
|
+
import { CoreModule, PropertiesListItem } from '@c8y/ngx-components';
|
|
5
4
|
|
|
6
5
|
@Component({
|
|
7
|
-
selector: 'properties-list-example',
|
|
8
|
-
|
|
9
|
-
<c8y-properties-list
|
|
10
|
-
[title]="'Application properties'"
|
|
11
|
-
[data]="archiveManifest"
|
|
12
|
-
[emptyLabel]="'--'"
|
|
13
|
-
[properties]="packageVersionProperties"
|
|
14
|
-
>
|
|
15
|
-
</c8y-properties-list>
|
|
16
|
-
`,
|
|
6
|
+
selector: 'tut-properties-list-example',
|
|
7
|
+
templateUrl: './properties-list-example.component.html',
|
|
17
8
|
standalone: true,
|
|
18
9
|
imports: [CoreModule]
|
|
19
10
|
})
|
|
20
11
|
export class PropertiesListExampleComponent {
|
|
21
|
-
|
|
12
|
+
readonly customData: any = {
|
|
13
|
+
string: 'Hello, world!',
|
|
14
|
+
number: 42,
|
|
15
|
+
boolean: true,
|
|
16
|
+
array: [1, 'two', false],
|
|
17
|
+
object: { key: 'value' },
|
|
18
|
+
null: null,
|
|
19
|
+
undefined: undefined
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
readonly customProperties: PropertiesListItem[] = [
|
|
23
|
+
{
|
|
24
|
+
label: 'String property',
|
|
25
|
+
key: 'string'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: 'Number property',
|
|
29
|
+
key: 'number'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: 'Boolean property',
|
|
33
|
+
key: 'boolean'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: 'Array property',
|
|
37
|
+
key: 'array'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: 'Object property',
|
|
41
|
+
key: 'object',
|
|
42
|
+
transform: (object: any) => object.key
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: 'Null property',
|
|
46
|
+
key: 'null'
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: 'Undefined property',
|
|
50
|
+
key: 'undefined'
|
|
51
|
+
}
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
readonly archiveManifest: Partial<IManifest> = {
|
|
22
55
|
author: 'Cumulocity IoT',
|
|
56
|
+
homepage: 'https://cumulocity.com/guides/web/overview/',
|
|
57
|
+
keywords: ['Cumulocity', 'Plugin', 'Widget'],
|
|
58
|
+
license: 'Apache 2.0',
|
|
59
|
+
repository: {
|
|
60
|
+
type: 'git',
|
|
61
|
+
url: 'git+https://github.com/SoftwareAG/some-not-exisiting-repository.git'
|
|
62
|
+
},
|
|
63
|
+
requiredPlatformVersion: '>=10.18.0.0',
|
|
23
64
|
version: '10.20.0.0',
|
|
24
|
-
|
|
25
|
-
|
|
65
|
+
name: 'Application name',
|
|
66
|
+
custom: 'Custom property value'
|
|
26
67
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
readonly packageVersionProperties: PropertiesListItem[] = [
|
|
68
|
+
|
|
69
|
+
readonly specifiedPackageVersionProperties: PropertiesListItem[] = [
|
|
30
70
|
{
|
|
31
|
-
label:
|
|
32
|
-
key: '
|
|
71
|
+
label: 'Author',
|
|
72
|
+
key: 'author'
|
|
33
73
|
},
|
|
34
74
|
{
|
|
35
|
-
label:
|
|
36
|
-
key: '
|
|
75
|
+
label: 'Homepage',
|
|
76
|
+
key: 'homepage',
|
|
77
|
+
type: 'link',
|
|
78
|
+
action: (event, link: string) => window.open(link, '_blank', 'noopener,noreferrer')
|
|
37
79
|
},
|
|
38
80
|
{
|
|
39
|
-
label:
|
|
81
|
+
label: 'Required platform version',
|
|
40
82
|
key: 'requiredPlatformVersion'
|
|
41
83
|
},
|
|
42
84
|
{
|
|
43
|
-
label:
|
|
44
|
-
key: '
|
|
45
|
-
|
|
46
|
-
|
|
85
|
+
label: 'Version',
|
|
86
|
+
key: 'version'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: 'Name',
|
|
90
|
+
key: 'name'
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
label: 'Custom property',
|
|
94
|
+
key: 'custom'
|
|
47
95
|
}
|
|
48
96
|
];
|
|
49
97
|
}
|