@slickgrid-universal/rxjs-observable 0.16.1 → 0.19.0
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/CHANGELOG.md +56 -19
- package/dist/commonjs/rxjs.resource.d.ts +9 -2
- package/dist/commonjs/rxjs.resource.js +16 -5
- package/dist/commonjs/rxjs.resource.js.map +1 -1
- package/dist/esm/rxjs.resource.d.ts +9 -2
- package/dist/esm/rxjs.resource.js +13 -2
- package/dist/esm/rxjs.resource.js.map +1 -1
- package/package.json +15 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,34 +3,71 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [0.19.0](https://github.com/ghiscoding/slickgrid-universal/compare/v0.18.0...v0.19.0) (2021-10-28)
|
|
7
7
|
|
|
8
|
-
**Note:** Version bump only for package @slickgrid-universal/rxjs-observable
|
|
9
8
|
|
|
9
|
+
### Features
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# [0.16.0](https://github.com/ghiscoding/slickgrid-universal/compare/v0.15.0...v0.16.0) (2021-07-16)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @slickgrid-universal/rxjs-observable
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# [0.15.0](https://github.com/ghiscoding/slickgrid-universal/compare/v0.14.1...v0.15.0) (2021-07-06)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Bug Fixes
|
|
26
|
-
|
|
27
|
-
* **build:** the "files" property should be included in pkg.json ([3d8f12e](https://github.com/ghiscoding/slickgrid-universal/commit/3d8f12e5f55079445c6fb5cde767f8e0b4511ebb))
|
|
11
|
+
* add async process to use with Promise/Observable ([7350a6d](https://github.com/ghiscoding/slickgrid-universal/commit/7350a6d06ef5bb8495a05e22421f9b7b5a4270cb))
|
|
28
12
|
|
|
29
13
|
|
|
30
14
|
|
|
31
15
|
|
|
32
16
|
|
|
33
17
|
|
|
18
|
+
# [0.18.0](https://github.com/ghiscoding/slickgrid-universal/compare/v0.17.0...v0.18.0) (2021-09-29)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @slickgrid-universal/rxjs-observable
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# [0.17.0](https://github.com/ghiscoding/slickgrid-universal/compare/v0.16.2...v0.17.0) (2021-09-09)
|
|
28
|
+
|
|
29
|
+
**Note:** Version bump only for package @slickgrid-universal/rxjs-observable
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## [0.16.2](https://github.com/ghiscoding/slickgrid-universal/compare/v0.16.1...v0.16.2) (2021-07-23)
|
|
36
|
+
|
|
37
|
+
**Note:** Version bump only for package @slickgrid-universal/rxjs-observable
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## [0.16.1](https://github.com/ghiscoding/slickgrid-universal/compare/v0.16.0...v0.16.1) (2021-07-16)
|
|
44
|
+
|
|
45
|
+
**Note:** Version bump only for package @slickgrid-universal/rxjs-observable
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
# [0.16.0](https://github.com/ghiscoding/slickgrid-universal/compare/v0.15.0...v0.16.0) (2021-07-16)
|
|
52
|
+
|
|
53
|
+
**Note:** Version bump only for package @slickgrid-universal/rxjs-observable
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# [0.15.0](https://github.com/ghiscoding/slickgrid-universal/compare/v0.14.1...v0.15.0) (2021-07-06)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Bug Fixes
|
|
63
|
+
|
|
64
|
+
* **build:** the "files" property should be included in pkg.json ([3d8f12e](https://github.com/ghiscoding/slickgrid-universal/commit/3d8f12e5f55079445c6fb5cde767f8e0b4511ebb))
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
34
71
|
## [0.14.1](https://github.com/ghiscoding/slickgrid-universal/compare/v0.14.0...v0.14.1) (2021-05-22)
|
|
35
72
|
|
|
36
73
|
**Note:** Version bump only for package @slickgrid-universal/rxjs-observable
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RxJsFacade } from '@slickgrid-universal/common';
|
|
2
|
-
import { Observable, Subject } from 'rxjs';
|
|
2
|
+
import { Observable, ObservableInput, OperatorFunction, ObservedValueOf, Subject } from 'rxjs';
|
|
3
3
|
export declare class RxJsResource implements RxJsFacade {
|
|
4
4
|
readonly className = "RxJsResource";
|
|
5
5
|
/**
|
|
@@ -9,12 +9,19 @@ export declare class RxJsResource implements RxJsFacade {
|
|
|
9
9
|
get EMPTY(): Observable<never>;
|
|
10
10
|
/** Simple method to create an Observable */
|
|
11
11
|
createObservable<T>(): Observable<T>;
|
|
12
|
-
/** Simple method to create
|
|
12
|
+
/** Simple method to create a Subject */
|
|
13
13
|
createSubject<T>(): Subject<T>;
|
|
14
|
+
/** Converts an observable to a promise by subscribing to the observable, and returning a promise that will resolve
|
|
15
|
+
* as soon as the first value arrives from the observable. The subscription will then be closed.
|
|
16
|
+
*/
|
|
14
17
|
firstValueFrom<T>(source: Observable<T>): Promise<T>;
|
|
15
18
|
iif<T = never, F = never>(condition: () => boolean, trueResult?: any, falseResult?: any): Observable<T | F>;
|
|
16
19
|
/** Tests to see if the object is an RxJS Observable */
|
|
17
20
|
isObservable(obj: any): boolean;
|
|
21
|
+
/** Converts the arguments to an observable sequence. */
|
|
22
|
+
of(...value: any): Observable<any>;
|
|
23
|
+
/** Projects each source value to an Observable which is merged in the output Observable, emitting values only from the most recently projected Observable. */
|
|
24
|
+
switchMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O): OperatorFunction<T, ObservedValueOf<O>>;
|
|
18
25
|
/** Emits the values emitted by the source Observable until a `notifier` Observable emits a value. */
|
|
19
26
|
takeUntil<T>(notifier: Observable<any>): any;
|
|
20
27
|
}
|
|
@@ -18,23 +18,34 @@ class RxJsResource {
|
|
|
18
18
|
createObservable() {
|
|
19
19
|
return new rxjs_1.Observable();
|
|
20
20
|
}
|
|
21
|
-
/** Simple method to create
|
|
21
|
+
/** Simple method to create a Subject */
|
|
22
22
|
createSubject() {
|
|
23
23
|
return new rxjs_1.Subject();
|
|
24
24
|
}
|
|
25
|
+
/** Converts an observable to a promise by subscribing to the observable, and returning a promise that will resolve
|
|
26
|
+
* as soon as the first value arrives from the observable. The subscription will then be closed.
|
|
27
|
+
*/
|
|
25
28
|
firstValueFrom(source) {
|
|
26
|
-
return rxjs_1.firstValueFrom(source);
|
|
29
|
+
return (0, rxjs_1.firstValueFrom)(source);
|
|
27
30
|
}
|
|
28
31
|
iif(condition, trueResult, falseResult) {
|
|
29
|
-
return rxjs_1.iif(condition, trueResult, falseResult);
|
|
32
|
+
return (0, rxjs_1.iif)(condition, trueResult, falseResult);
|
|
30
33
|
}
|
|
31
34
|
/** Tests to see if the object is an RxJS Observable */
|
|
32
35
|
isObservable(obj) {
|
|
33
|
-
return rxjs_1.isObservable(obj);
|
|
36
|
+
return (0, rxjs_1.isObservable)(obj);
|
|
37
|
+
}
|
|
38
|
+
/** Converts the arguments to an observable sequence. */
|
|
39
|
+
of(...value) {
|
|
40
|
+
return (0, rxjs_1.of)(...value);
|
|
41
|
+
}
|
|
42
|
+
/** Projects each source value to an Observable which is merged in the output Observable, emitting values only from the most recently projected Observable. */
|
|
43
|
+
switchMap(project) {
|
|
44
|
+
return (0, rxjs_1.switchMap)(project);
|
|
34
45
|
}
|
|
35
46
|
/** Emits the values emitted by the source Observable until a `notifier` Observable emits a value. */
|
|
36
47
|
takeUntil(notifier) {
|
|
37
|
-
return operators_1.takeUntil(notifier);
|
|
48
|
+
return (0, operators_1.takeUntil)(notifier);
|
|
38
49
|
}
|
|
39
50
|
}
|
|
40
51
|
exports.RxJsResource = RxJsResource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxjs.resource.js","sourceRoot":"","sources":["../../src/rxjs.resource.ts"],"names":[],"mappings":";;;AACA,+
|
|
1
|
+
{"version":3,"file":"rxjs.resource.js","sourceRoot":"","sources":["../../src/rxjs.resource.ts"],"names":[],"mappings":";;;AACA,+BAAyJ;AACzJ,8CAA2C;AAE3C,MAAa,YAAY;IAAzB;QACW,cAAS,GAAG,cAAc,CAAC;IAkDtC,CAAC;IAhDC;;;OAGG;IACH,IAAI,KAAK;QACP,OAAO,YAAK,CAAC;IACf,CAAC;IAED,4CAA4C;IAC5C,gBAAgB;QACd,OAAO,IAAI,iBAAU,EAAK,CAAC;IAC7B,CAAC;IAED,wCAAwC;IACxC,aAAa;QACX,OAAO,IAAI,cAAO,EAAK,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,cAAc,CAAI,MAAqB;QACrC,OAAO,IAAA,qBAAc,EAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,GAAG,CAAuB,SAAwB,EAAE,UAAgB,EAAE,WAAiB;QACrF,OAAO,IAAA,UAAG,EAAO,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;IACvD,CAAC;IAED,uDAAuD;IACvD,YAAY,CAAC,GAAQ;QACnB,OAAO,IAAA,mBAAY,EAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED,wDAAwD;IACxD,EAAE,CAAC,GAAG,KAAU;QACd,OAAO,IAAA,SAAE,EAAC,GAAG,KAAK,CAAC,CAAC;IACtB,CAAC;IAED,8JAA8J;IAC9J,SAAS,CAAoC,OAAuC;QAClF,OAAO,IAAA,gBAAS,EAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAED,qGAAqG;IACrG,SAAS,CAAI,QAAyB;QACpC,OAAO,IAAA,qBAAS,EAAI,QAAQ,CAAC,CAAC;IAChC,CAAC;CACF;AAnDD,oCAmDC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RxJsFacade } from '@slickgrid-universal/common';
|
|
2
|
-
import { Observable, Subject } from 'rxjs';
|
|
2
|
+
import { Observable, ObservableInput, OperatorFunction, ObservedValueOf, Subject } from 'rxjs';
|
|
3
3
|
export declare class RxJsResource implements RxJsFacade {
|
|
4
4
|
readonly className = "RxJsResource";
|
|
5
5
|
/**
|
|
@@ -9,12 +9,19 @@ export declare class RxJsResource implements RxJsFacade {
|
|
|
9
9
|
get EMPTY(): Observable<never>;
|
|
10
10
|
/** Simple method to create an Observable */
|
|
11
11
|
createObservable<T>(): Observable<T>;
|
|
12
|
-
/** Simple method to create
|
|
12
|
+
/** Simple method to create a Subject */
|
|
13
13
|
createSubject<T>(): Subject<T>;
|
|
14
|
+
/** Converts an observable to a promise by subscribing to the observable, and returning a promise that will resolve
|
|
15
|
+
* as soon as the first value arrives from the observable. The subscription will then be closed.
|
|
16
|
+
*/
|
|
14
17
|
firstValueFrom<T>(source: Observable<T>): Promise<T>;
|
|
15
18
|
iif<T = never, F = never>(condition: () => boolean, trueResult?: any, falseResult?: any): Observable<T | F>;
|
|
16
19
|
/** Tests to see if the object is an RxJS Observable */
|
|
17
20
|
isObservable(obj: any): boolean;
|
|
21
|
+
/** Converts the arguments to an observable sequence. */
|
|
22
|
+
of(...value: any): Observable<any>;
|
|
23
|
+
/** Projects each source value to an Observable which is merged in the output Observable, emitting values only from the most recently projected Observable. */
|
|
24
|
+
switchMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O): OperatorFunction<T, ObservedValueOf<O>>;
|
|
18
25
|
/** Emits the values emitted by the source Observable until a `notifier` Observable emits a value. */
|
|
19
26
|
takeUntil<T>(notifier: Observable<any>): any;
|
|
20
27
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EMPTY, iif, isObservable, firstValueFrom, Observable, Subject } from 'rxjs';
|
|
1
|
+
import { EMPTY, iif, isObservable, firstValueFrom, Observable, of, Subject, switchMap, } from 'rxjs';
|
|
2
2
|
import { takeUntil } from 'rxjs/operators';
|
|
3
3
|
export class RxJsResource {
|
|
4
4
|
constructor() {
|
|
@@ -15,10 +15,13 @@ export class RxJsResource {
|
|
|
15
15
|
createObservable() {
|
|
16
16
|
return new Observable();
|
|
17
17
|
}
|
|
18
|
-
/** Simple method to create
|
|
18
|
+
/** Simple method to create a Subject */
|
|
19
19
|
createSubject() {
|
|
20
20
|
return new Subject();
|
|
21
21
|
}
|
|
22
|
+
/** Converts an observable to a promise by subscribing to the observable, and returning a promise that will resolve
|
|
23
|
+
* as soon as the first value arrives from the observable. The subscription will then be closed.
|
|
24
|
+
*/
|
|
22
25
|
firstValueFrom(source) {
|
|
23
26
|
return firstValueFrom(source);
|
|
24
27
|
}
|
|
@@ -29,6 +32,14 @@ export class RxJsResource {
|
|
|
29
32
|
isObservable(obj) {
|
|
30
33
|
return isObservable(obj);
|
|
31
34
|
}
|
|
35
|
+
/** Converts the arguments to an observable sequence. */
|
|
36
|
+
of(...value) {
|
|
37
|
+
return of(...value);
|
|
38
|
+
}
|
|
39
|
+
/** Projects each source value to an Observable which is merged in the output Observable, emitting values only from the most recently projected Observable. */
|
|
40
|
+
switchMap(project) {
|
|
41
|
+
return switchMap(project);
|
|
42
|
+
}
|
|
32
43
|
/** Emits the values emitted by the source Observable until a `notifier` Observable emits a value. */
|
|
33
44
|
takeUntil(notifier) {
|
|
34
45
|
return takeUntil(notifier);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxjs.resource.js","sourceRoot":"","sources":["../../src/rxjs.resource.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"rxjs.resource.js","sourceRoot":"","sources":["../../src/rxjs.resource.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAmB,EAAE,EAAqC,OAAO,EAAE,SAAS,GAAG,MAAM,MAAM,CAAC;AACzJ,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,OAAO,YAAY;IAAzB;QACW,cAAS,GAAG,cAAc,CAAC;IAkDtC,CAAC;IAhDC;;;OAGG;IACH,IAAI,KAAK;QACP,OAAO,KAAK,CAAC;IACf,CAAC;IAED,4CAA4C;IAC5C,gBAAgB;QACd,OAAO,IAAI,UAAU,EAAK,CAAC;IAC7B,CAAC;IAED,wCAAwC;IACxC,aAAa;QACX,OAAO,IAAI,OAAO,EAAK,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,cAAc,CAAI,MAAqB;QACrC,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,GAAG,CAAuB,SAAwB,EAAE,UAAgB,EAAE,WAAiB;QACrF,OAAO,GAAG,CAAO,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;IACvD,CAAC;IAED,uDAAuD;IACvD,YAAY,CAAC,GAAQ;QACnB,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED,wDAAwD;IACxD,EAAE,CAAC,GAAG,KAAU;QACd,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC;IACtB,CAAC;IAED,8JAA8J;IAC9J,SAAS,CAAoC,OAAuC;QAClF,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAED,qGAAqG;IACrG,SAAS,CAAI,QAAyB;QACpC,OAAO,SAAS,CAAI,QAAQ,CAAC,CAAC;IAChC,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slickgrid-universal/rxjs-observable",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "RxJS Observable Wrapper",
|
|
5
5
|
"main": "dist/commonjs/index.js",
|
|
6
6
|
"browser": "src/index.ts",
|
|
@@ -27,10 +27,19 @@
|
|
|
27
27
|
"package:add-browser-prop": "cross-env node ../change-package-browser.js --add-browser=true --folder-name=empty-warning-component",
|
|
28
28
|
"package:remove-browser-prop": "cross-env node ../change-package-browser.js --remove-browser=true --folder-name=empty-warning-component"
|
|
29
29
|
},
|
|
30
|
-
"author": "Ghislain B.",
|
|
31
30
|
"license": "MIT",
|
|
31
|
+
"author": "Ghislain B.",
|
|
32
|
+
"homepage": "https://github.com/ghiscoding/slickgrid-universal",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://github.com/ghiscoding/slickgrid-universal.git",
|
|
36
|
+
"directory": "packages/rxjs-observable"
|
|
37
|
+
},
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/ghiscoding/slickgrid-universal/issues"
|
|
40
|
+
},
|
|
32
41
|
"engines": {
|
|
33
|
-
"node": ">=14.
|
|
42
|
+
"node": ">=14.17.0",
|
|
34
43
|
"npm": ">=6.14.8"
|
|
35
44
|
},
|
|
36
45
|
"browserslist": [
|
|
@@ -39,13 +48,13 @@
|
|
|
39
48
|
"not dead"
|
|
40
49
|
],
|
|
41
50
|
"dependencies": {
|
|
42
|
-
"@slickgrid-universal/common": "^0.
|
|
43
|
-
"rxjs": "^7.
|
|
51
|
+
"@slickgrid-universal/common": "^0.19.0",
|
|
52
|
+
"rxjs": "^7.4.0"
|
|
44
53
|
},
|
|
45
54
|
"devDependencies": {
|
|
46
55
|
"cross-env": "^7.0.3",
|
|
47
56
|
"npm-run-all": "^4.1.5",
|
|
48
57
|
"rimraf": "^3.0.2"
|
|
49
58
|
},
|
|
50
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "d00b46c9265ac4ac0aa88b0dc7d6cafacecdaf60"
|
|
51
60
|
}
|