Skip to content

Commit

Permalink
chore: update to angular v16
Browse files Browse the repository at this point in the history
  • Loading branch information
manekinekko committed Feb 10, 2024
1 parent 985975a commit 54a6d4c
Show file tree
Hide file tree
Showing 13 changed files with 6,752 additions and 4,404 deletions.
21 changes: 12 additions & 9 deletions docs/components/BatteryLevelComponent.html
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ <h3 id="methods">

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

Expand Down Expand Up @@ -438,8 +438,8 @@ <h3 id="methods">

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

Expand Down Expand Up @@ -507,8 +507,8 @@ <h3 id="methods">

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

Expand Down Expand Up @@ -618,8 +618,8 @@ <h3 id="methods">

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

Expand Down Expand Up @@ -1074,7 +1074,10 @@ <h3 id="accessors">

requestValue() {
this.valuesSubscription &#x3D; this.service.value()
.subscribe((value: number) &#x3D;&gt; this.updateValue(value), error &#x3D;&gt; this.hasError(error));
.subscribe({
next: (val: number) &#x3D;&gt; this.updateValue(val),
error: (err) &#x3D;&gt; this.hasError(err)
});
}

updateValue(value: number) {
Expand Down
33 changes: 32 additions & 1 deletion docs/components/DashboardComponent.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,37 @@ <h3 id="constructor">Constructor</h3>
&lt;/mat-card&gt;
&lt;/mat-grid-tile&gt;

&lt;!-- stepper --&gt;

&lt;mat-grid-tile colspan&#x3D;&quot;3&quot; rowspan&#x3D;&quot;1&quot;&gt;
&lt;mat-card class&#x3D;&quot;dashboard-card&quot;&gt;
&lt;mat-card-header&gt;
&lt;mat-card-title&gt;
Stepper
&lt;button mat-icon-button class&#x3D;&quot;more-button&quot; [matMenuTriggerFor]&#x3D;&quot;menuStepper&quot; aria-label&#x3D;&quot;Toggle menu&quot;&gt;
&lt;mat-icon&gt;more_vert&lt;/mat-icon&gt;
&lt;/button&gt;
&lt;mat-menu #menuStepper&#x3D;&quot;matMenu&quot; xPosition&#x3D;&quot;before&quot;&gt;
&lt;button mat-menu-item *ngIf&#x3D;&quot;(stepper.device | async) &#x3D;&#x3D;&#x3D; null&quot; (click)&#x3D;&quot;stepper.requestValue()&quot;&gt;
&lt;mat-icon&gt;bluetooth_searching&lt;/mat-icon&gt;
Connect
&lt;/button&gt;
&lt;button mat-menu-item *ngIf&#x3D;&quot;(stepper.device | async)&quot; (click)&#x3D;&quot;stepper.disconnect()&quot;&gt;
&lt;mat-icon&gt;bluetooth_disabled&lt;/mat-icon&gt;
Disconnect
&lt;/button&gt;
&lt;/mat-menu&gt;
&lt;/mat-card-title&gt;
&lt;mat-card-subtitle *ngIf&#x3D;&quot;(stepper.device | async) as device&quot;&gt;
{{ device.name }}
&lt;/mat-card-subtitle&gt;
&lt;/mat-card-header&gt;
&lt;mat-card-content class&#x3D;&quot;dashboard-card-content&quot;&gt;
&lt;ble-stepcounter #stepper&gt;&lt;/ble-stepcounter&gt;
&lt;/mat-card-content&gt;
&lt;/mat-card&gt;
&lt;/mat-grid-tile&gt;

&lt;/mat-grid-list&gt;
&lt;/div&gt;
</code></pre>
Expand Down Expand Up @@ -341,7 +372,7 @@ <h3 id="constructor">Constructor</h3>
<script src="../js/libs/htmlparser.js"></script>
<script src="../js/libs/deep-iterator.js"></script>
<script>
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>'
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>'
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'}];
var DIRECTIVES = [];
var ACTUAL_COMPONENT = {'name': 'DashboardComponent'};
Expand Down
18 changes: 9 additions & 9 deletions docs/components/HumidityComponent.html
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ <h3 id="accessors">
valuesSubscription: Subscription;
streamSubscription: Subscription;

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

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

this.streamSubscription &#x3D; this.service.stream()
.subscribe(
() &#x3D;&gt; this.updateValue.bind(this),
() &#x3D;&gt; of(this.hasError.bind(this)),
);
.subscribe({
next: (val: number) &#x3D;&gt; this.updateValue(val),
error: (err) &#x3D;&gt; this.hasError(err)
});
}

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

requestValue() {
this.valuesSubscription &#x3D; this.service.value()
.subscribe(
() &#x3D;&gt; null,
() &#x3D;&gt; of(this.hasError.bind(this)),
);
.subscribe(
() &#x3D;&gt; null,
() &#x3D;&gt; of(this.hasError.bind(this)),
);
}


Expand Down
Loading

0 comments on commit 54a6d4c

Please sign in to comment.