@colijnit/articleapi 256.1.13 → 256.1.15

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.
@@ -36,11 +36,12 @@ export declare class Articles {
36
36
  useLoginEncryption: boolean;
37
37
  languageCode: string;
38
38
  articles: IoneApiArticles;
39
- private readonly _subs;
40
39
  private _connector;
41
40
  private boFactory;
42
41
  constructor(options?: Options);
42
+ destroy(): void;
43
43
  connect(url?: string, schema?: string, version?: string): Promise<LoginResponse>;
44
+ logOut(): void;
44
45
  searchArticles(request: ArticleExtendedRequest, showLoader?: boolean): Promise<DataServiceResponseData>;
45
46
  searchArticlesLight(request: ArticleExtendedRequest, showLoader?: boolean): Promise<DataServiceResponseData>;
46
47
  searchArticlesForTileView(request: ArticleStockSearchRequest, showLoader?: boolean): Promise<DataServiceResponseData>;
package/build/articles.js CHANGED
@@ -21,7 +21,6 @@ export class Articles {
21
21
  this.connectionResetInactivity = new Subject();
22
22
  this.useGroups = false;
23
23
  this.useLoginEncryption = false;
24
- this._subs = [];
25
24
  this.boFactory = new BusinessObjectFactory();
26
25
  if (options) {
27
26
  this.url = options.url ? options.url : '';
@@ -37,13 +36,21 @@ export class Articles {
37
36
  this.articles.connector = this._connector;
38
37
  this.articles.languageCode = this.languageCode;
39
38
  this.articles.branchNr = this.branch;
40
- 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()));
39
+ this.showLoader = this._connector.showLoader;
40
+ this.connectionAborted = this._connector.connectionAborted;
41
+ this.connectionResetInactivity = this._connector.connectionResetInactivity;
42
+ }
43
+ destroy() {
44
+ this._connector = null;
41
45
  }
42
46
  connect(url, schema, version) {
43
47
  return __awaiter(this, void 0, void 0, function* () {
44
48
  return this._connector.connect(url, schema, version);
45
49
  });
46
50
  }
51
+ logOut() {
52
+ this._connector.logOut();
53
+ }
47
54
  searchArticles(request, showLoader = true) {
48
55
  return this.articles.searchArticles(request, showLoader);
49
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colijnit/articleapi",
3
- "version": "256.1.13",
3
+ "version": "256.1.15",
4
4
  "scripts": {
5
5
  "build": "grunt clean && tsc",
6
6
  "browserify": "browserify build/connector.js --s colijn -o dist/out-tsc/bundle.js",
@@ -23,7 +23,7 @@
23
23
  "rxjs": "6.6.3"
24
24
  },
25
25
  "peerDependencies": {
26
- "@colijnit/ioneconnector": ">=256.1.4",
26
+ "@colijnit/ioneconnector": ">=256.1.7",
27
27
  "@colijnit/mainapi": ">=256.1.0"
28
28
  },
29
29
  "devDependencies": {