@slickgrid-universal/rxjs-observable 1.2.4 → 1.3.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/LICENSE +20 -20
- package/README.md +56 -56
- package/dist/commonjs/index.js +5 -1
- package/dist/commonjs/index.js.map +1 -1
- package/package.json +10 -18
package/LICENSE
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
Copyright (c) 2020-2022, Ghislain B. - Slickgrid-Universal
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
-
a copy of this software and associated documentation files (the
|
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
-
the following conditions:
|
|
10
|
-
|
|
11
|
-
The above copyright notice and this permission notice shall be
|
|
12
|
-
included in all copies or substantial portions of the Software.
|
|
13
|
-
|
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
Copyright (c) 2020-2022, Ghislain B. - Slickgrid-Universal
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
[](https://opensource.org/licenses/MIT)
|
|
2
|
-
[](http://www.typescriptlang.org/)
|
|
3
|
-
[](https://www.npmjs.com/package/@slickgrid-universal/rxjs-observable)
|
|
5
|
-
[](https://www.npmjs.com/package/@slickgrid-universal/rxjs-observable)
|
|
6
|
-
|
|
7
|
-
[](https://github.com/ghiscoding/slickgrid-universal/actions)
|
|
8
|
-
[](https://www.cypress.io/)
|
|
9
|
-
[](https://github.com/facebook/jest)
|
|
10
|
-
[](https://codecov.io/gh/ghiscoding/slickgrid-universal)
|
|
11
|
-
|
|
12
|
-
## RxJS Observable Service Wrapper
|
|
13
|
-
#### @slickgrid-universal/rxjs-observable
|
|
14
|
-
|
|
15
|
-
An RxJS Observable Service Wrapper to make it possible to use RxJS with Slickgrid-Universal (with a Backend Service like OData/GraphQL). By default any Backend Service will be using Promises unless we use this RxJS Observable package.
|
|
16
|
-
|
|
17
|
-
This package is simply a bridge, a facade, to make it possible to use RxJS without adding RxJS to the `@slickgrid-universal/common` list of dependencies, so RxJS is a dependency of this package without being a dependency of the common (core) package, This will avoid adding dependencies not everyone need and won't clutter the common package (the common package will simply use an empty interface, which won't do anything, without requiring to install RxJS at all. We also have full unit tests coverage for all of that).
|
|
18
|
-
|
|
19
|
-
### Internal Dependencies
|
|
20
|
-
- [@slickgrid-universal/common](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/common)
|
|
21
|
-
|
|
22
|
-
### External Dependencies
|
|
23
|
-
- [RxJS 7+](https://github.com/ReactiveX/RxJS)
|
|
24
|
-
|
|
25
|
-
### Installation
|
|
26
|
-
Follow the instruction provided in the main [README](https://github.com/ghiscoding/slickgrid-universal#installation), you can see a demo by looking at the [GitHub Demo](https://ghiscoding.github.io/slickgrid-universal) page.
|
|
27
|
-
|
|
28
|
-
### Usage
|
|
29
|
-
In order to use the Service, you will need to register it in your grid options via the `registerExternalResources` as shown below and of course install RxJS itself (this package requires [RxJS 7](https://github.com/ReactiveX/RxJS)).
|
|
30
|
-
|
|
31
|
-
##### ViewModel
|
|
32
|
-
```ts
|
|
33
|
-
import { GridOdataService } from '@slickgrid-universal/odata';
|
|
34
|
-
import { RxJsResource } from '@slickgrid-universal/rxjs-observable';
|
|
35
|
-
|
|
36
|
-
export class MyExample {
|
|
37
|
-
gridOptions: GridOption;
|
|
38
|
-
|
|
39
|
-
initializeGrid {
|
|
40
|
-
this.gridOptions = {
|
|
41
|
-
// you will most probably use it with a Backend Service, for example with OData or GraphQL
|
|
42
|
-
backendServiceApi: {
|
|
43
|
-
service: new GridOdataService(),
|
|
44
|
-
preProcess: () => this.displaySpinner(true),
|
|
45
|
-
postProcess: () => this.displaySpinner(false),
|
|
46
|
-
|
|
47
|
-
// assuming your Http call is with an RxJS Observable
|
|
48
|
-
process: (query) => this.getAllCustomers$(query),
|
|
49
|
-
} as OdataServiceApi,
|
|
50
|
-
|
|
51
|
-
// ...
|
|
52
|
-
registerExternalResources: [new RxJsResource()],
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
```
|
|
1
|
+
[](https://opensource.org/licenses/MIT)
|
|
2
|
+
[](http://www.typescriptlang.org/)
|
|
3
|
+
[](https://github.com/ghiscoding/lerna-lite)
|
|
4
|
+
[](https://www.npmjs.com/package/@slickgrid-universal/rxjs-observable)
|
|
5
|
+
[](https://www.npmjs.com/package/@slickgrid-universal/rxjs-observable)
|
|
6
|
+
|
|
7
|
+
[](https://github.com/ghiscoding/slickgrid-universal/actions)
|
|
8
|
+
[](https://www.cypress.io/)
|
|
9
|
+
[](https://github.com/facebook/jest)
|
|
10
|
+
[](https://codecov.io/gh/ghiscoding/slickgrid-universal)
|
|
11
|
+
|
|
12
|
+
## RxJS Observable Service Wrapper
|
|
13
|
+
#### @slickgrid-universal/rxjs-observable
|
|
14
|
+
|
|
15
|
+
An RxJS Observable Service Wrapper to make it possible to use RxJS with Slickgrid-Universal (with a Backend Service like OData/GraphQL). By default any Backend Service will be using Promises unless we use this RxJS Observable package.
|
|
16
|
+
|
|
17
|
+
This package is simply a bridge, a facade, to make it possible to use RxJS without adding RxJS to the `@slickgrid-universal/common` list of dependencies, so RxJS is a dependency of this package without being a dependency of the common (core) package, This will avoid adding dependencies not everyone need and won't clutter the common package (the common package will simply use an empty interface, which won't do anything, without requiring to install RxJS at all. We also have full unit tests coverage for all of that).
|
|
18
|
+
|
|
19
|
+
### Internal Dependencies
|
|
20
|
+
- [@slickgrid-universal/common](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/common)
|
|
21
|
+
|
|
22
|
+
### External Dependencies
|
|
23
|
+
- [RxJS 7+](https://github.com/ReactiveX/RxJS)
|
|
24
|
+
|
|
25
|
+
### Installation
|
|
26
|
+
Follow the instruction provided in the main [README](https://github.com/ghiscoding/slickgrid-universal#installation), you can see a demo by looking at the [GitHub Demo](https://ghiscoding.github.io/slickgrid-universal) page.
|
|
27
|
+
|
|
28
|
+
### Usage
|
|
29
|
+
In order to use the Service, you will need to register it in your grid options via the `registerExternalResources` as shown below and of course install RxJS itself (this package requires [RxJS 7](https://github.com/ReactiveX/RxJS)).
|
|
30
|
+
|
|
31
|
+
##### ViewModel
|
|
32
|
+
```ts
|
|
33
|
+
import { GridOdataService } from '@slickgrid-universal/odata';
|
|
34
|
+
import { RxJsResource } from '@slickgrid-universal/rxjs-observable';
|
|
35
|
+
|
|
36
|
+
export class MyExample {
|
|
37
|
+
gridOptions: GridOption;
|
|
38
|
+
|
|
39
|
+
initializeGrid {
|
|
40
|
+
this.gridOptions = {
|
|
41
|
+
// you will most probably use it with a Backend Service, for example with OData or GraphQL
|
|
42
|
+
backendServiceApi: {
|
|
43
|
+
service: new GridOdataService(),
|
|
44
|
+
preProcess: () => this.displaySpinner(true),
|
|
45
|
+
postProcess: () => this.displaySpinner(false),
|
|
46
|
+
|
|
47
|
+
// assuming your Http call is with an RxJS Observable
|
|
48
|
+
process: (query) => this.getAllCustomers$(query),
|
|
49
|
+
} as OdataServiceApi,
|
|
50
|
+
|
|
51
|
+
// ...
|
|
52
|
+
registerExternalResources: [new RxJsResource()],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
package/dist/commonjs/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slickgrid-universal/rxjs-observable",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "RxJS Observable Wrapper",
|
|
5
5
|
"main": "dist/commonjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -13,16 +13,13 @@
|
|
|
13
13
|
"/dist"
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
|
-
"build": "
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"dev": "
|
|
20
|
-
"dev:watch": "run-p build:watch --npm-path npm",
|
|
16
|
+
"build": "pnpm run bundle:commonjs",
|
|
17
|
+
"build:watch": "tsc --incremental --watch",
|
|
18
|
+
"dev": "pnpm run bundle:commonjs",
|
|
19
|
+
"dev:watch": "tsc --incremental --watch",
|
|
21
20
|
"bundle": "run-p bundle:commonjs bundle:esm --npm-path npm",
|
|
22
21
|
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs",
|
|
23
|
-
"bundle:esm": "
|
|
24
|
-
"prebundle": "npm-run-all delete:dist --npm-path npm",
|
|
25
|
-
"delete:dist": "cross-env rimraf --maxBusyTries=10 dist",
|
|
22
|
+
"bundle:esm": "tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018",
|
|
26
23
|
"package:add-browser-prop": "cross-env node ../change-package-browser.js --add-browser=true --folder-name=rxjs-observable",
|
|
27
24
|
"package:remove-browser-prop": "cross-env node ../change-package-browser.js --remove-browser=true --folder-name=rxjs-observable"
|
|
28
25
|
},
|
|
@@ -37,23 +34,18 @@
|
|
|
37
34
|
"bugs": {
|
|
38
35
|
"url": "https://github.com/ghiscoding/slickgrid-universal/issues"
|
|
39
36
|
},
|
|
40
|
-
"engines": {
|
|
41
|
-
"node": ">=14.17.0",
|
|
42
|
-
"npm": ">=6.14.8"
|
|
43
|
-
},
|
|
44
37
|
"browserslist": [
|
|
45
38
|
"last 2 version",
|
|
46
39
|
"> 1%",
|
|
47
40
|
"not dead"
|
|
48
41
|
],
|
|
49
42
|
"dependencies": {
|
|
50
|
-
"@slickgrid-universal/common": "
|
|
51
|
-
"rxjs": "^7.5.
|
|
43
|
+
"@slickgrid-universal/common": "1.3.0",
|
|
44
|
+
"rxjs": "^7.5.5"
|
|
52
45
|
},
|
|
53
46
|
"devDependencies": {
|
|
54
47
|
"cross-env": "^7.0.3",
|
|
55
|
-
"npm-run-
|
|
56
|
-
"rimraf": "^3.0.2"
|
|
48
|
+
"npm-run-all2": "^6.0.1"
|
|
57
49
|
},
|
|
58
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "e36e97bc03591af0e15c50397aadf34530e58156"
|
|
59
51
|
}
|