Skip to content

Commit 54a6d4c

Browse files
committed
chore: update to angular v16
1 parent 985975a commit 54a6d4c

13 files changed

+6752
-4404
lines changed

docs/components/BatteryLevelComponent.html

+12-9
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,8 @@ <h3 id="methods">
364364

365365
<tr>
366366
<td class="col-md-4">
367-
<div class="io-line">Defined in <a href="" data-line="126"
368-
class="link-to-prism">src/app/thingy52/battery-level.component.ts:126</a></div>
367+
<div class="io-line">Defined in <a href="" data-line="129"
368+
class="link-to-prism">src/app/thingy52/battery-level.component.ts:129</a></div>
369369
</td>
370370
</tr>
371371

@@ -438,8 +438,8 @@ <h3 id="methods">
438438

439439
<tr>
440440
<td class="col-md-4">
441-
<div class="io-line">Defined in <a href="" data-line="132"
442-
class="link-to-prism">src/app/thingy52/battery-level.component.ts:132</a></div>
441+
<div class="io-line">Defined in <a href="" data-line="135"
442+
class="link-to-prism">src/app/thingy52/battery-level.component.ts:135</a></div>
443443
</td>
444444
</tr>
445445

@@ -507,8 +507,8 @@ <h3 id="methods">
507507

508508
<tr>
509509
<td class="col-md-4">
510-
<div class="io-line">Defined in <a href="" data-line="136"
511-
class="link-to-prism">src/app/thingy52/battery-level.component.ts:136</a></div>
510+
<div class="io-line">Defined in <a href="" data-line="139"
511+
class="link-to-prism">src/app/thingy52/battery-level.component.ts:139</a></div>
512512
</td>
513513
</tr>
514514

@@ -618,8 +618,8 @@ <h3 id="methods">
618618

619619
<tr>
620620
<td class="col-md-4">
621-
<div class="io-line">Defined in <a href="" data-line="120"
622-
class="link-to-prism">src/app/thingy52/battery-level.component.ts:120</a></div>
621+
<div class="io-line">Defined in <a href="" data-line="123"
622+
class="link-to-prism">src/app/thingy52/battery-level.component.ts:123</a></div>
623623
</td>
624624
</tr>
625625

@@ -1074,7 +1074,10 @@ <h3 id="accessors">
10741074

10751075
requestValue() {
10761076
this.valuesSubscription &#x3D; this.service.value()
1077-
.subscribe((value: number) &#x3D;&gt; this.updateValue(value), error &#x3D;&gt; this.hasError(error));
1077+
.subscribe({
1078+
next: (val: number) &#x3D;&gt; this.updateValue(val),
1079+
error: (err) &#x3D;&gt; this.hasError(err)
1080+
});
10781081
}
10791082

10801083
updateValue(value: number) {

docs/components/DashboardComponent.html

+32-1
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,37 @@ <h3 id="constructor">Constructor</h3>
262262
&lt;/mat-card&gt;
263263
&lt;/mat-grid-tile&gt;
264264

265+
&lt;!-- stepper --&gt;
266+
267+
&lt;mat-grid-tile colspan&#x3D;&quot;3&quot; rowspan&#x3D;&quot;1&quot;&gt;
268+
&lt;mat-card class&#x3D;&quot;dashboard-card&quot;&gt;
269+
&lt;mat-card-header&gt;
270+
&lt;mat-card-title&gt;
271+
Stepper
272+
&lt;button mat-icon-button class&#x3D;&quot;more-button&quot; [matMenuTriggerFor]&#x3D;&quot;menuStepper&quot; aria-label&#x3D;&quot;Toggle menu&quot;&gt;
273+
&lt;mat-icon&gt;more_vert&lt;/mat-icon&gt;
274+
&lt;/button&gt;
275+
&lt;mat-menu #menuStepper&#x3D;&quot;matMenu&quot; xPosition&#x3D;&quot;before&quot;&gt;
276+
&lt;button mat-menu-item *ngIf&#x3D;&quot;(stepper.device | async) &#x3D;&#x3D;&#x3D; null&quot; (click)&#x3D;&quot;stepper.requestValue()&quot;&gt;
277+
&lt;mat-icon&gt;bluetooth_searching&lt;/mat-icon&gt;
278+
Connect
279+
&lt;/button&gt;
280+
&lt;button mat-menu-item *ngIf&#x3D;&quot;(stepper.device | async)&quot; (click)&#x3D;&quot;stepper.disconnect()&quot;&gt;
281+
&lt;mat-icon&gt;bluetooth_disabled&lt;/mat-icon&gt;
282+
Disconnect
283+
&lt;/button&gt;
284+
&lt;/mat-menu&gt;
285+
&lt;/mat-card-title&gt;
286+
&lt;mat-card-subtitle *ngIf&#x3D;&quot;(stepper.device | async) as device&quot;&gt;
287+
{{ device.name }}
288+
&lt;/mat-card-subtitle&gt;
289+
&lt;/mat-card-header&gt;
290+
&lt;mat-card-content class&#x3D;&quot;dashboard-card-content&quot;&gt;
291+
&lt;ble-stepcounter #stepper&gt;&lt;/ble-stepcounter&gt;
292+
&lt;/mat-card-content&gt;
293+
&lt;/mat-card&gt;
294+
&lt;/mat-grid-tile&gt;
295+
265296
&lt;/mat-grid-list&gt;
266297
&lt;/div&gt;
267298
</code></pre>
@@ -341,7 +372,7 @@ <h3 id="constructor">Constructor</h3>
341372
<script src="../js/libs/htmlparser.js"></script>
342373
<script src="../js/libs/deep-iterator.js"></script>
343374
<script>
344-
var COMPONENT_TEMPLATE = '<div><mat-toolbar color="primary"> <img src="assets/angular-web-ble.png" /> <span>Angular Web BLE Demo</span></mat-toolbar><div class="grid-container"> <mat-grid-list cols="3" rows="2" rowHeight="300px"> <!-- battery --> <mat-grid-tile colspan="1" rowspan="2"> <mat-card class="dashboard-card"> <mat-card-header> <mat-card-title> Battery Level <button mat-icon-button class="more-button" [matMenuTriggerFor]="menuBattery" aria-label="Toggle menu"> <mat-icon>more_vert</mat-icon> </button> <mat-menu #menuBattery="matMenu" xPosition="before"> <button mat-menu-item *ngIf="(battery.device | async) === null" (click)="battery.requestValue()"> <mat-icon>bluetooth_searching</mat-icon> Connect </button> <button mat-menu-item *ngIf="(battery.device | async)" (click)="battery.disconnect()"> <mat-icon>bluetooth_disabled</mat-icon> Disconnect </button> </mat-menu> </mat-card-title> <mat-card-subtitle *ngIf="(battery.device | async) as device"> {{ device.name }} </mat-card-subtitle> </mat-card-header> <mat-card-content class="dashboard-card-content"> <ble-battery-level #battery></ble-battery-level> </mat-card-content> </mat-card> </mat-grid-tile> <!-- humidity --> <mat-grid-tile colspan="2" rowspan="1"> <mat-card class="dashboard-card"> <mat-card-header> <mat-card-title> Humidity Level <button mat-icon-button class="more-button" [matMenuTriggerFor]="menuHumidity" aria-label="Toggle menu"> <mat-icon>more_vert</mat-icon> </button> <mat-menu #menuHumidity="matMenu" xPosition="before"> <button mat-menu-item *ngIf="(humidity.device | async) === null" (click)="humidity.requestValue()"> <mat-icon>bluetooth_searching</mat-icon> Connect </button> <button mat-menu-item *ngIf="(humidity.device | async)" (click)="humidity.disconnect()"> <mat-icon>bluetooth_disabled</mat-icon> Disconnect </button> </mat-menu> </mat-card-title> <mat-card-subtitle *ngIf="(humidity.device | async) as device"> {{ device.name }} </mat-card-subtitle> </mat-card-header> <mat-card-content class="dashboard-card-content"> <ble-humidity #humidity></ble-humidity> </mat-card-content> </mat-card> </mat-grid-tile> <!-- temperature --> <mat-grid-tile colspan="2" rowspan="1"> <mat-card class="dashboard-card"> <mat-card-header> <mat-card-title> Temperature <button mat-icon-button class="more-button" [matMenuTriggerFor]="menuTemperature" aria-label="Toggle menu"> <mat-icon>more_vert</mat-icon> </button> <mat-menu #menuTemperature="matMenu" xPosition="before"> <button mat-menu-item *ngIf="(temperature.device | async) === null" (click)="temperature.requestValue()"> <mat-icon>bluetooth_searching</mat-icon> Connect </button> <button mat-menu-item *ngIf="(temperature.device | async)" (click)="temperature.disconnect()"> <mat-icon>bluetooth_disabled</mat-icon> Disconnect </button> </mat-menu> </mat-card-title> <mat-card-subtitle *ngIf="(temperature.device | async) as device"> {{ device.name }} </mat-card-subtitle> </mat-card-header> <mat-card-content class="dashboard-card-content"> <ble-temperature #temperature></ble-temperature> </mat-card-content> </mat-card> </mat-grid-tile> </mat-grid-list></div></div>'
375+
var COMPONENT_TEMPLATE = '<div><mat-toolbar color="primary"> <img src="assets/angular-web-ble.png" /> <span>Angular Web BLE Demo</span></mat-toolbar><div class="grid-container"> <mat-grid-list cols="3" rows="2" rowHeight="300px"> <!-- battery --> <mat-grid-tile colspan="1" rowspan="2"> <mat-card class="dashboard-card"> <mat-card-header> <mat-card-title> Battery Level <button mat-icon-button class="more-button" [matMenuTriggerFor]="menuBattery" aria-label="Toggle menu"> <mat-icon>more_vert</mat-icon> </button> <mat-menu #menuBattery="matMenu" xPosition="before"> <button mat-menu-item *ngIf="(battery.device | async) === null" (click)="battery.requestValue()"> <mat-icon>bluetooth_searching</mat-icon> Connect </button> <button mat-menu-item *ngIf="(battery.device | async)" (click)="battery.disconnect()"> <mat-icon>bluetooth_disabled</mat-icon> Disconnect </button> </mat-menu> </mat-card-title> <mat-card-subtitle *ngIf="(battery.device | async) as device"> {{ device.name }} </mat-card-subtitle> </mat-card-header> <mat-card-content class="dashboard-card-content"> <ble-battery-level #battery></ble-battery-level> </mat-card-content> </mat-card> </mat-grid-tile> <!-- humidity --> <mat-grid-tile colspan="2" rowspan="1"> <mat-card class="dashboard-card"> <mat-card-header> <mat-card-title> Humidity Level <button mat-icon-button class="more-button" [matMenuTriggerFor]="menuHumidity" aria-label="Toggle menu"> <mat-icon>more_vert</mat-icon> </button> <mat-menu #menuHumidity="matMenu" xPosition="before"> <button mat-menu-item *ngIf="(humidity.device | async) === null" (click)="humidity.requestValue()"> <mat-icon>bluetooth_searching</mat-icon> Connect </button> <button mat-menu-item *ngIf="(humidity.device | async)" (click)="humidity.disconnect()"> <mat-icon>bluetooth_disabled</mat-icon> Disconnect </button> </mat-menu> </mat-card-title> <mat-card-subtitle *ngIf="(humidity.device | async) as device"> {{ device.name }} </mat-card-subtitle> </mat-card-header> <mat-card-content class="dashboard-card-content"> <ble-humidity #humidity></ble-humidity> </mat-card-content> </mat-card> </mat-grid-tile> <!-- temperature --> <mat-grid-tile colspan="2" rowspan="1"> <mat-card class="dashboard-card"> <mat-card-header> <mat-card-title> Temperature <button mat-icon-button class="more-button" [matMenuTriggerFor]="menuTemperature" aria-label="Toggle menu"> <mat-icon>more_vert</mat-icon> </button> <mat-menu #menuTemperature="matMenu" xPosition="before"> <button mat-menu-item *ngIf="(temperature.device | async) === null" (click)="temperature.requestValue()"> <mat-icon>bluetooth_searching</mat-icon> Connect </button> <button mat-menu-item *ngIf="(temperature.device | async)" (click)="temperature.disconnect()"> <mat-icon>bluetooth_disabled</mat-icon> Disconnect </button> </mat-menu> </mat-card-title> <mat-card-subtitle *ngIf="(temperature.device | async) as device"> {{ device.name }} </mat-card-subtitle> </mat-card-header> <mat-card-content class="dashboard-card-content"> <ble-temperature #temperature></ble-temperature> </mat-card-content> </mat-card> </mat-grid-tile> <!-- stepper --> <mat-grid-tile colspan="3" rowspan="1"> <mat-card class="dashboard-card"> <mat-card-header> <mat-card-title> Stepper <button mat-icon-button class="more-button" [matMenuTriggerFor]="menuStepper" aria-label="Toggle menu"> <mat-icon>more_vert</mat-icon> </button> <mat-menu #menuStepper="matMenu" xPosition="before"> <button mat-menu-item *ngIf="(stepper.device | async) === null" (click)="stepper.requestValue()"> <mat-icon>bluetooth_searching</mat-icon> Connect </button> <button mat-menu-item *ngIf="(stepper.device | async)" (click)="stepper.disconnect()"> <mat-icon>bluetooth_disabled</mat-icon> Disconnect </button> </mat-menu> </mat-card-title> <mat-card-subtitle *ngIf="(stepper.device | async) as device"> {{ device.name }} </mat-card-subtitle> </mat-card-header> <mat-card-content class="dashboard-card-content"> <ble-stepcounter #stepper></ble-stepcounter> </mat-card-content> </mat-card> </mat-grid-tile> </mat-grid-list></div></div>'
345376
var COMPONENTS = [{'name': 'AppComponent', 'selector': 'ble-root'},{'name': 'BatteryLevelComponent', 'selector': 'ble-battery-level'},{'name': 'DashboardComponent', 'selector': 'ble-dashboard'},{'name': 'HumidityComponent', 'selector': 'ble-humidity'},{'name': 'StepCounterComponent', 'selector': 'ble-stepcounter'},{'name': 'TemperatureComponent', 'selector': 'ble-temperature'}];
346377
var DIRECTIVES = [];
347378
var ACTUAL_COMPONENT = {'name': 'DashboardComponent'};

docs/components/HumidityComponent.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ <h3 id="accessors">
894894
valuesSubscription: Subscription;
895895
streamSubscription: Subscription;
896896

897-
@ViewChild(&#x27;chart&#x27;, {static: true})
897+
@ViewChild(&#x27;chart&#x27;, { static: true })
898898
chartRef: ElementRef&lt;HTMLCanvasElement&gt;;
899899

900900
get device() {
@@ -916,10 +916,10 @@ <h3 id="accessors">
916916
this.initChart();
917917

918918
this.streamSubscription &#x3D; this.service.stream()
919-
.subscribe(
920-
() &#x3D;&gt; this.updateValue.bind(this),
921-
() &#x3D;&gt; of(this.hasError.bind(this)),
922-
);
919+
.subscribe({
920+
next: (val: number) &#x3D;&gt; this.updateValue(val),
921+
error: (err) &#x3D;&gt; this.hasError(err)
922+
});
923923
}
924924

925925
initChart() {
@@ -934,10 +934,10 @@ <h3 id="accessors">
934934

935935
requestValue() {
936936
this.valuesSubscription &#x3D; this.service.value()
937-
.subscribe(
938-
() &#x3D;&gt; null,
939-
() &#x3D;&gt; of(this.hasError.bind(this)),
940-
);
937+
.subscribe(
938+
() &#x3D;&gt; null,
939+
() &#x3D;&gt; of(this.hasError.bind(this)),
940+
);
941941
}
942942

943943

0 commit comments

Comments
 (0)