@c8y/tutorial 1020.2.10 → 1020.4.1

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.2.10",
3
+ "version": "1020.4.1",
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.2.10",
7
- "@c8y/ngx-components": "1020.2.10",
8
- "@c8y/client": "1020.2.10",
9
- "@c8y/bootstrap": "1020.2.10",
6
+ "@c8y/style": "1020.4.1",
7
+ "@c8y/ngx-components": "1020.4.1",
8
+ "@c8y/client": "1020.4.1",
9
+ "@c8y/bootstrap": "1020.4.1",
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.2.10",
17
- "@c8y/devkit": "1020.2.10"
16
+ "@c8y/options": "1020.4.1",
17
+ "@c8y/devkit": "1020.4.1"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@angular/common": ">=16 <18"
@@ -3,16 +3,25 @@ import { CoreModule, gettext } from '@c8y/ngx-components';
3
3
 
4
4
  @Component({
5
5
  selector: 'text-translation-gettext',
6
- template: ` <c8y-title>Text translation by gettext</c8y-title>
6
+ template: `<c8y-title>Text translation by gettext</c8y-title>
7
7
  <div class="card">
8
8
  <div class="card-header separator">
9
9
  <h4 class="card-title">Gettext example (mark string for translation)</h4>
10
10
  </div>
11
- <div class="card-block">This word will be translated: {{ getText | translate }}.</div>
11
+ <div class="card-block">
12
+ This word will be translated: {{ (enabled ? enabledLabel : disabledLabel) | translate }}.
13
+ </div>
14
+ <label class="c8y-switch">
15
+ <input type="checkbox" [(ngModel)]="enabled" />
16
+ <span></span>
17
+ Toggle state
18
+ </label>
12
19
  </div>`,
13
20
  standalone: true,
14
21
  imports: [CoreModule]
15
22
  })
16
23
  export class TextTranslationGettextComponent {
17
- getText = gettext('Device');
24
+ enabled = true;
25
+ enabledLabel = gettext('Enabled');
26
+ disabledLabel = gettext('Disabled');
18
27
  }