@colijnit/catalog 258.1.2 → 258.1.3

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.
@@ -30,8 +30,8 @@
30
30
  function Version() {
31
31
  this.name = "@colijnit/catalog";
32
32
  this.description = "iOne Catalog module based on Angular 12";
33
- this.symVer = "258.1.2";
34
- this.publishDate = "30-5-2025 08:21:52";
33
+ this.symVer = "258.1.3";
34
+ this.publishDate = "3-6-2025 08:42:59";
35
35
  }
36
36
  return Version;
37
37
  }());
@@ -986,9 +986,35 @@
986
986
  },] }
987
987
  ];
988
988
 
989
+ var CatalogExternalSourcesService = /** @class */ (function () {
990
+ function CatalogExternalSourcesService() {
991
+ this.connectorsExternalSources = [];
992
+ }
993
+ CatalogExternalSourcesService.prototype.addConnector = function (connector) {
994
+ this.connectorsExternalSources.push(connector);
995
+ };
996
+ CatalogExternalSourcesService.prototype.logOutExternalSources = function () {
997
+ var len = this.connectorsExternalSources.length;
998
+ for (var i = 0; i < len; i++) {
999
+ var conn = this.connectorsExternalSources[i];
1000
+ conn.logOut();
1001
+ conn.destroy();
1002
+ }
1003
+ this.connectorsExternalSources.length = 0;
1004
+ };
1005
+ return CatalogExternalSourcesService;
1006
+ }());
1007
+ CatalogExternalSourcesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CatalogExternalSourcesService_Factory() { return new CatalogExternalSourcesService(); }, token: CatalogExternalSourcesService, providedIn: "root" });
1008
+ CatalogExternalSourcesService.decorators = [
1009
+ { type: i0.Injectable, args: [{
1010
+ providedIn: 'root'
1011
+ },] }
1012
+ ];
1013
+
989
1014
  var CatalogConnectorAdapterService = /** @class */ (function () {
990
- function CatalogConnectorAdapterService(_catalogRootService) {
1015
+ function CatalogConnectorAdapterService(_catalogRootService, _catalogExternalSourcesService) {
991
1016
  this._catalogRootService = _catalogRootService;
1017
+ this._catalogExternalSourcesService = _catalogExternalSourcesService;
992
1018
  this.controllerInitialized = new rxjs.BehaviorSubject(false);
993
1019
  this.connectorOptions = {};
994
1020
  this._boFactory = new businessObjectFactory.BusinessObjectFactory();
@@ -1004,9 +1030,8 @@
1004
1030
  });
1005
1031
  CatalogConnectorAdapterService.prototype.ngOnDestroy = function () {
1006
1032
  if (this.connector) {
1007
- this.connector.logOut();
1008
1033
  this.connector.showLoader.unsubscribe();
1009
- this.connector.destroy();
1034
+ // this.connector.destroy();
1010
1035
  }
1011
1036
  };
1012
1037
  CatalogConnectorAdapterService.prototype.initConnector = function (settings, forceReload) {
@@ -1037,6 +1062,9 @@
1037
1062
  this.connector.showLoader.subscribe(function (showLoader) { return _this.onShowLoaderChange(showLoader); });
1038
1063
  this._initialized = true;
1039
1064
  this._initializing = false;
1065
+ if (this.connectorOptions.externalSourceId) {
1066
+ this._catalogExternalSourcesService.addConnector(this.connector);
1067
+ }
1040
1068
  this.controllerInitialized.next(true);
1041
1069
  }
1042
1070
  return [3 /*break*/, 4];
@@ -2278,14 +2306,15 @@
2278
2306
  };
2279
2307
  return CatalogConnectorAdapterService;
2280
2308
  }());
2281
- CatalogConnectorAdapterService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CatalogConnectorAdapterService_Factory() { return new CatalogConnectorAdapterService(i0__namespace.ɵɵinject(CatalogRootService)); }, token: CatalogConnectorAdapterService, providedIn: "root" });
2309
+ CatalogConnectorAdapterService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CatalogConnectorAdapterService_Factory() { return new CatalogConnectorAdapterService(i0__namespace.ɵɵinject(CatalogRootService), i0__namespace.ɵɵinject(CatalogExternalSourcesService)); }, token: CatalogConnectorAdapterService, providedIn: "root" });
2282
2310
  CatalogConnectorAdapterService.decorators = [
2283
2311
  { type: i0.Injectable, args: [{
2284
2312
  providedIn: 'root'
2285
2313
  },] }
2286
2314
  ];
2287
2315
  CatalogConnectorAdapterService.ctorParameters = function () { return [
2288
- { type: CatalogRootService }
2316
+ { type: CatalogRootService },
2317
+ { type: CatalogExternalSourcesService }
2289
2318
  ]; };
2290
2319
 
2291
2320
  // Class represents a value that is to be loaded only once, lazily, by its .loadFunction, despite how many times or how fast its getValue() is called.
@@ -7533,6 +7562,7 @@
7533
7562
  exports.CatalogEventService = CatalogEventService;
7534
7563
  exports.CatalogExternalSourceModule = CatalogExternalSourceModule;
7535
7564
  exports.CatalogExternalSourcesModule = CatalogExternalSourcesModule;
7565
+ exports.CatalogExternalSourcesService = CatalogExternalSourcesService;
7536
7566
  exports.CatalogFilterModule = CatalogFilterModule;
7537
7567
  exports.CatalogFilterService = CatalogFilterService;
7538
7568
  exports.CatalogImageService = CatalogImageService;