@colijnit/articleapi 1.0.21 → 1.0.22
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/build/articles.js +5 -4
- package/package.json +6 -7
package/build/articles.js
CHANGED
|
@@ -12,13 +12,14 @@ import { Subject } from 'rxjs';
|
|
|
12
12
|
import { ArticlesPublic } from './articles-public';
|
|
13
13
|
import { Connector } from '@colijnit/ioneconnector/build/connector';
|
|
14
14
|
import { SelectorArticle } from './model/selector-article';
|
|
15
|
+
import { Session } from '@colijnit/ioneconnector/build/model/session';
|
|
15
16
|
import { BusinessObjectFactory } from '@colijnit/ioneconnector/build/service/business-object-factory';
|
|
16
17
|
export class Articles {
|
|
17
18
|
constructor(options) {
|
|
18
19
|
this.showLoader = new Subject();
|
|
19
20
|
this.connectionAborted = new Subject();
|
|
20
21
|
this.connectionResetInactivity = new Subject();
|
|
21
|
-
this.session =
|
|
22
|
+
this.session = new Session();
|
|
22
23
|
this.useGroups = false;
|
|
23
24
|
this.useLoginEncryption = false;
|
|
24
25
|
this._subs = [];
|
|
@@ -38,10 +39,10 @@ export class Articles {
|
|
|
38
39
|
this.articles.connector = this._connector;
|
|
39
40
|
this.articles.languageCode = this.languageCode;
|
|
40
41
|
this.articles.branchNr = this.branch;
|
|
41
|
-
if (
|
|
42
|
+
if (this._connector.hasOwnProperty('session')) {
|
|
42
43
|
this.session = this._connector['session'];
|
|
43
44
|
}
|
|
44
|
-
this._subs.push(this.
|
|
45
|
+
this._subs.push(this._connector.showLoader.subscribe(value => this.showLoader.next(value)), this._connector.connectionAborted.subscribe(() => this.connectionAborted.next()), this._connector.connectionResetInactivity.subscribe(() => this._handleConnectionReset()));
|
|
45
46
|
}
|
|
46
47
|
searchArticles(request, showLoader = true) {
|
|
47
48
|
return this.articles.searchArticles(request, showLoader);
|
|
@@ -270,7 +271,7 @@ export class Articles {
|
|
|
270
271
|
}));
|
|
271
272
|
}
|
|
272
273
|
static createConnector(options) {
|
|
273
|
-
if (
|
|
274
|
+
if (options.username && options.password) {
|
|
274
275
|
return new ArticlesAuth();
|
|
275
276
|
}
|
|
276
277
|
return new ArticlesPublic();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colijnit/articleapi",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "grunt clean && tsc",
|
|
6
6
|
"browserify": "browserify build/connector.js --s colijn -o dist/out-tsc/bundle.js",
|
|
@@ -20,16 +20,15 @@
|
|
|
20
20
|
"private": false,
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"reflect-metadata": "^0.1.12",
|
|
23
|
-
"rxjs": "
|
|
24
|
-
"rxjs-compat": "^6.6.3"
|
|
23
|
+
"rxjs": "6.6.3"
|
|
25
24
|
},
|
|
26
25
|
"peerDependencies": {
|
|
27
|
-
"@colijnit/ioneconnector": ">=2.1.
|
|
28
|
-
"@colijnit/mainapi": ">=1.0.
|
|
26
|
+
"@colijnit/ioneconnector": ">=2.1.13",
|
|
27
|
+
"@colijnit/mainapi": ">=1.0.13"
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
31
|
-
"@colijnit/ioneconnector": "2.1.
|
|
32
|
-
"@colijnit/mainapi": "1.0.
|
|
30
|
+
"@colijnit/ioneconnector": "2.1.13",
|
|
31
|
+
"@colijnit/mainapi": "1.0.13",
|
|
33
32
|
"@types/jest": "^24.0.13",
|
|
34
33
|
"grunt": "^1.0.3",
|
|
35
34
|
"grunt-clean": "^0.4.0",
|