Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be81e89

Browse files
authored
Merge branch 'master' into fix/hold-log-error
2 parents 8c3a9c1 + 4946f36 commit be81e89

File tree

48 files changed

+1403
-933
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1403
-933
lines changed

apps/demos/src/app/features/integrations/dynamic-counter/rx-state-and-reactive-forms/rx-state-and-reactive-forms.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import { updateCount } from '../shared/utils';
3737
<br/>
3838
3939
<button
40-
(click)="btnSetTo.next()"
40+
(click)="btnSetTo.next(undefined)"
4141
mat-raised-button>
4242
Set To
4343
</button>

apps/demos/src/app/features/integrations/dynamic-counter/rx-state-and-subjects/rx-state-and-subjects.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { updateCount } from '../shared/utils';
2929
3030
<br/>
3131
32-
<button (click)="setToClick.next()" mat-raised-button>
32+
<button (click)="setToClick.next(undefined)" mat-raised-button>
3333
Set To
3434
</button>
3535

apps/demos/src/app/features/integrations/dynamic-counter/rx-state-as-presenter/counter.presenter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class CounterPresenterService extends RxState<CounterState> {
4040
}
4141

4242
setToClick() {
43-
this.countChangeSubject.next();
43+
this.countChangeSubject.next(undefined);
4444
}
4545

4646
changeTickSpeed(tickSpeed: string) {

apps/demos/src/app/features/integrations/dynamic-counter/rx-state-in-the-view/rx-state-in-the-view.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { updateCount } from '../shared/utils';
3030
3131
<br/>
3232
33-
<button (click)="setToClick.next()" mat-raised-button>
33+
<button (click)="setToClick.next($event)" mat-raised-button>
3434
Set To
3535
</button>
3636

apps/demos/src/app/features/template/render-callback/render-callback.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { map, scan, shareReplay, startWith, switchMap, switchMapTo, take, tap }
1414
template: `
1515
<h1 class="mat-header">Render Callback</h1>
1616
<h4 class="mat-subheader">Height calculation using rendered$ Event</h4>
17-
<button mat-raised-button [unpatch] (click)="updateClick.next()">Update content</button>
17+
<button mat-raised-button [unpatch] (click)="updateClick.next(undefined)">Update content</button>
1818
<div class="example-results">
1919
<div class="example-result">
2020
<h4>Calculated after renderCallback</h4>

apps/demos/src/app/features/template/rx-let/lazy-loading-components/lazy-loading-components-observable.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { delay, scan, shareReplay, switchMap } from 'rxjs/operators';
99
<rxa-visualizer>
1010
<div visualizerHeader>
1111
<h3>Resolving over Observable</h3>
12-
<button mat-raised-button [unpatch] (click)="toggleSubject.next();">Toggle</button>
12+
<button mat-raised-button [unpatch] (click)="toggleSubject.next(undefined);">Toggle</button>
1313
</div>
1414
<ng-template #suspenseView>
1515
<rxa-list-item-ghost></rxa-list-item-ghost>

apps/demos/src/app/features/template/rx-let/let-template-binding/examples/let-template-binding-http-example.component.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Component } from '@angular/core';
2-
import { BehaviorSubject, interval, Subject, throwError } from 'rxjs';
3-
import { fromPromise } from 'rxjs/internal-compatibility';
2+
import { BehaviorSubject, from, interval, Subject, throwError } from 'rxjs';
43
import { map, share, switchMap, takeUntil, withLatestFrom } from 'rxjs/operators';
54

65
@Component({
@@ -120,13 +119,11 @@ export class LetTemplateBindingHttpExampleComponent {
120119
if (error) {
121120
return throwError(error);
122121
} else {
123-
return fromPromise(
124-
fetch(
125-
`https://swapi.dev/api/people/${
126-
Math.floor(Math.random() * 50) + 1
127-
}`
128-
).then((a) => a.json())
129-
);
122+
return fetch(
123+
`https://swapi.dev/api/people/${
124+
Math.floor(Math.random() * 50) + 1
125+
}`
126+
).then((a) => a.json());
130127
}
131128
}),
132129
map((hero) => hero.name || hero.detail || 'Not found')
@@ -137,12 +134,12 @@ export class LetTemplateBindingHttpExampleComponent {
137134
);
138135

139136
startFetch() {
140-
this.start$.next();
137+
this.start$.next(undefined);
141138
this.start$.complete();
142139
}
143140

144141
completeFetch() {
145-
this.complete$.next();
142+
this.complete$.next(undefined);
146143
this.complete$.complete();
147144
}
148145

apps/demos/src/app/features/template/viewport-prio/basic-example/basic-example.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { scan, switchMap } from 'rxjs/operators';
1212
<button mat-raised-button [unpatch] (click)="valP.next()">
1313
count up
1414
</button>
15-
<button mat-raised-button [unpatch] (click)="runningToggle$.next()">
15+
<button mat-raised-button [unpatch] (click)="runningToggle$.next(undefined)">
1616
auto
1717
</button>
1818
</rxa-value-provider>
@@ -63,7 +63,7 @@ import { scan, switchMap } from 'rxjs/operators';
6363
],
6464
})
6565
export class BasicExampleComponent {
66-
runningToggle$ = new Subject<boolean>();
66+
runningToggle$ = new Subject<any>();
6767
running$ = this.runningToggle$.pipe(
6868
scan((b) => !b, false),
6969
switchMap((b) => (b ? interval(200) : NEVER))

apps/demos/src/app/features/tutorials/basics/5-side-effects/side-effects.solution.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class SideEffectsSolution extends RxState<ComponentState>
9494
}
9595

9696
ngOnInit(): void {
97-
this.refreshClicks$.next();
97+
this.refreshClicks$.next(undefined);
9898
}
9999

100100
parseListItems(l: ListServerItem[]): DemoBasicsItem[] {

apps/demos/src/app/shared/debug-helper/hooks.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ import { ReplaySubject, Subject } from 'rxjs';
44
@Injectable()
55
export abstract class Hooks implements OnDestroy, AfterViewInit, OnChanges {
66
afterViewInit$ = new ReplaySubject(1);
7-
onChanges$ = new Subject();
7+
onChanges$ = new Subject<SimpleChanges>();
88
onDestroy$ = new ReplaySubject(1);
99

1010
ngOnChanges(changes: SimpleChanges): void {
11-
this.onChanges$.next();
11+
this.onChanges$.next(changes);
1212
}
1313

1414
ngAfterViewInit(): void {
15-
this.afterViewInit$.next();
15+
this.afterViewInit$.next(undefined);
1616
this.afterViewInit$.complete();
1717
}
1818

1919
ngOnDestroy(): void {
20-
this.onDestroy$.next();
20+
this.onDestroy$.next(undefined);
2121

2222
this.onChanges$.complete();
2323
this.afterViewInit$.complete();

apps/demos/src/app/shared/debug-helper/trigger-provider/trigger-provider.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import { Subject } from 'rxjs';
55
selector: 'rxa-trigger-provider',
66
exportAs: 'rxaTriggerProvider',
77
template: `
8-
<button mat-raised-button (click)="suspense$.next()">
8+
<button mat-raised-button (click)="suspense$.next(undefined)">
99
Suspense <mat-icon></mat-icon>
1010
<rxa-zone-patched-icon class="mat-icon" [zoneState]="getZoneState()"></rxa-zone-patched-icon>
1111
</button>
1212
<button mat-raised-button [unpatch]="unpatched" (click)="error$.next(error)">
1313
Error
1414
<rxa-zone-patched-icon class="mat-icon" [zoneState]="getZoneState()"></rxa-zone-patched-icon>
1515
</button>
16-
<button mat-raised-button [unpatch]="unpatched" (click)="complete$.next()">
16+
<button mat-raised-button [unpatch]="unpatched" (click)="complete$.next(undefined)">
1717
Complete
1818
<rxa-zone-patched-icon class="mat-icon" [zoneState]="getZoneState()"></rxa-zone-patched-icon>
1919
</button>

apps/demos/src/app/shared/debug-helper/value-provider/array-provider.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ export class ArrayProviderService extends RxState<ProvidedValues> {
139139
}
140140

141141
error(): void {
142-
this.errorSubject.next();
142+
this.errorSubject.next(undefined);
143143
}
144144

145145
complete(): void {
146-
this.completeSubject.next();
146+
this.completeSubject.next(undefined);
147147
}
148148

149149
reset(): void {
150-
this.resetSubject.next();
150+
this.resetSubject.next(undefined);
151151
}
152152
}

apps/demos/src/app/shared/debug-helper/value-provider/primitives-provider.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,18 @@ export class PrimitivesProviderService {
9292
}
9393

9494
next(): void {
95-
this.nextSubject.next();
95+
this.nextSubject.next(undefined);
9696
}
9797

9898
error(): void {
99-
this.errorSubject.next();
99+
this.errorSubject.next(undefined);
100100
}
101101

102102
complete(): void {
103-
this.completeSubject.next();
103+
this.completeSubject.next(undefined);
104104
}
105105

106106
reset(): void {
107-
this.resetSubject.next();
107+
this.resetSubject.next(undefined);
108108
}
109109
}

apps/demos/src/app/shared/debug-helper/value-provider/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { EMPTY, from, Observable, of, timer } from 'rxjs';
2-
import { merge as mergeWith, share, switchMap, take, takeUntil } from 'rxjs/operators';
2+
import { mergeWith, share, switchMap, take, takeUntil } from 'rxjs/operators';
33
import { SchedulerConfig, TestItem } from './model';
44
import { fromFetch } from 'rxjs/fetch';
55

@@ -9,8 +9,8 @@ export function compareIdFn(a, b) {
99

1010
const theMax = 10000;
1111

12-
export function withCompleteAndError<T>(error$, complete$) {
13-
return (o: Observable<T>): Observable<T> =>
12+
export function withCompleteAndError<T, E>(error$: Observable<E>, complete$) {
13+
return (o: Observable<T>): Observable<T | E> =>
1414
o.pipe(
1515
/* tslint:disable */
1616
mergeWith(error$),

apps/demos/src/app/shared/debug-helper/value-provider/value-provider/value-provider.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class ValueProviderComponent extends PrimitivesProviderService {
6262

6363
reset() {
6464
super.reset();
65-
this.resetState.next();
65+
this.resetState.next(undefined);
6666
}
6767

6868
getZoneState() {

apps/demos/src/app/shared/debug-helper/work/work.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class WorkComponent extends Hooks {
7979
}
8080

8181
dirtyCheck() {
82-
this.dirtyCheckSubject.next();
82+
this.dirtyCheckSubject.next(undefined);
8383
}
8484

8585
scriptingWork(iterations: number) {

libs/cdk/CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
# [1.0.0-alpha.10](https://github.com/rx-angular/rx-angular/compare/[email protected]@1.0.0-alpha.10) (2021-08-23)
2+
3+
* **cdk:** fix RxJS7 update ([#907](https://github.com/rx-angular/rx-angular/pull/907)) ([674d584]()
4+
5+
6+
# [1.0.0-alpha.9](https://github.com/rx-angular/rx-angular/compare/[email protected]@1.0.0-alpha.9) (2021-08-16)
7+
8+
9+
### Bug Fixes
10+
11+
* **cdk:** setup polyfills for non browser environments in scheduler ([#820](https://github.com/rx-angular/rx-angular/issues/820)) ([674d584](https://github.com/rx-angular/rx-angular/commit/674d5847d709380d6e6bee6e5e230ae36b688818))
12+
* **cdk:** skip logging irelevant browser API error ([#741](https://github.com/rx-angular/rx-angular/issues/741)) ([78a624f](https://github.com/rx-angular/rx-angular/commit/78a624f993a63327ffce2fcd4ce032d693deb129))
13+
* **demos:** fix most of the demos ([#640](https://github.com/rx-angular/rx-angular/issues/640)) ([3d443e9](https://github.com/rx-angular/rx-angular/commit/3d443e927ccc90f2bc7919c7364e3f3ab5cb8595))
14+
15+
### Features
16+
17+
* **cdk:** add accumulateObservable creation function ([#582](https://github.com/rx-angular/rx-angular/issues/582)) ([65250ba](https://github.com/rx-angular/rx-angular/commit/65250ba15ab2c6569a00b0d82c57be9ba54787c8))
18+
* **cdk:** improve rendering error handling ([#626](https://github.com/rx-angular/rx-angular/issues/626)) ([0437438](https://github.com/rx-angular/rx-angular/commit/0437438112c42b8f072b219d599d5ea8d68b30bc))
19+
* **cdk:** move scheduler into `internals/scheduler` ([#725](https://github.com/rx-angular/rx-angular/issues/725)) ([26aedbd](https://github.com/rx-angular/rx-angular/commit/26aedbd5c3f78e65d40797e3c310e797f00c426f))
20+
* **cdk:** swap arguments in the `getZoneUnPatchedApi` to benefit from autocomplete ([#707](https://github.com/rx-angular/rx-angular/issues/707)) ([6d5341d](https://github.com/rx-angular/rx-angular/commit/6d5341d22d5e24bf55289654989d3c11dd47c1e8))
21+
* **zone-configuration:** add ts docs to zone configuration ([#667](https://github.com/rx-angular/rx-angular/issues/667)) ([da4eb77](https://github.com/rx-angular/rx-angular/commit/da4eb776747c0e812e2fea1c4eac533db71d04cb))
22+
* **coercing:** add ts docs to coercing
23+
* **coalescing:** add ts docs to coalescing
24+
25+
26+
### Performance Improvements
27+
28+
* **cdk:** decouple `notifications` into a lib ([#782](https://github.com/rx-angular/rx-angular/issues/782)) ([3032b69](https://github.com/rx-angular/rx-angular/commit/3032b696a909bd9066572584fd2fbb1a132fb730))
29+
* **cdk:** decouple `zone-configurations` into its own library ([#728](https://github.com/rx-angular/rx-angular/issues/728)) ([4f35bfa](https://github.com/rx-angular/rx-angular/commit/4f35bfaf2a65333b3eff2f74671ad2c443946ca4))
30+
* **cdk:** decouple `zone-less` into its own self-contained library ([#688](https://github.com/rx-angular/rx-angular/issues/688)) ([bf561e8](https://github.com/rx-angular/rx-angular/commit/bf561e837b37c25ae2ce5430eb861f08ec9c0204))
31+
* **cdk:** move `coercing` into lib ([#730](https://github.com/rx-angular/rx-angular/issues/730)) ([803412b](https://github.com/rx-angular/rx-angular/commit/803412b8f00d1e0b31f07ced1a2951e445b48546))
32+
* **cdk:** use existing `rxjs` schedulers ([#700](https://github.com/rx-angular/rx-angular/issues/700)) ([15d0333](https://github.com/rx-angular/rx-angular/commit/15d0333d74b4da56407a7514f2cc50b7db82c93d))
33+
34+
135
# [1.0.0-alpha.8](https://github.com/rx-angular/rx-angular/compare/[email protected]@1.0.0-alpha.8) (2021-04-13)
236

337
### Features

0 commit comments

Comments
 (0)