@colijnit/catalog 255.1.17 → 255.1.18

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 = "255.1.17";
34
- this.publishDate = "4-12-2024 17:48:23";
33
+ this.symVer = "255.1.18";
34
+ this.publishDate = "10-12-2024 13:29:16";
35
35
  }
36
36
  return Version;
37
37
  }());
@@ -4770,68 +4770,87 @@
4770
4770
  }());
4771
4771
 
4772
4772
  var CatalogExternalSourcesComponent = /** @class */ (function () {
4773
- function CatalogExternalSourcesComponent(_catalogConnectorService, _imageService) {
4773
+ function CatalogExternalSourcesComponent(_catalogConnectorService, _imageService, _settingsService, _catalogService) {
4774
4774
  this._catalogConnectorService = _catalogConnectorService;
4775
4775
  this._imageService = _imageService;
4776
+ this._settingsService = _settingsService;
4777
+ this._catalogService = _catalogService;
4776
4778
  this.isStandalone = false;
4777
4779
  this.externalSourceClick = new i0.EventEmitter();
4778
4780
  this.externalSourceViewModels = [];
4779
4781
  this.unavailableCatalogs = [];
4782
+ this._settings = { searchOnStart: true };
4780
4783
  }
4781
4784
  CatalogExternalSourcesComponent.prototype.showClass = function () {
4782
4785
  return true;
4783
4786
  };
4784
4787
  CatalogExternalSourcesComponent.prototype.ngOnInit = function () {
4785
- var _this = this;
4786
- this.externalSourceViewModels.length = 0;
4787
- if (!this.isStandalone) {
4788
- this._catalogConnectorService.getAvailabeCatalogsForLoggedInUser().then(function (result) {
4789
- var e_1, _a;
4790
- if (result['validationResult']['success'] === true) {
4791
- if (result['resultObject']['availableCatalogs']) {
4792
- var availableCatalogs = [];
4793
- try {
4794
- for (var _b = __values(result['resultObject']['availableCatalogs']), _c = _b.next(); !_c.done; _c = _b.next()) {
4795
- var availableCatalog = _c.value;
4796
- var instance = Object.assign(new catalogDefinition_bo.CatalogDefinition(), availableCatalog);
4797
- availableCatalogs.push(instance);
4798
- }
4788
+ return __awaiter(this, void 0, void 0, function () {
4789
+ var _this = this;
4790
+ return __generator(this, function (_a) {
4791
+ switch (_a.label) {
4792
+ case 0: return [4 /*yield*/, this._settingsService.initializeSettings()];
4793
+ case 1:
4794
+ _a.sent();
4795
+ return [4 /*yield*/, this._catalogService.init(this._settings, true)];
4796
+ case 2:
4797
+ _a.sent();
4798
+ this.externalSourceViewModels.length = 0;
4799
+ if (!this.isStandalone) {
4800
+ this._catalogConnectorService.getAvailabeCatalogsForLoggedInUser().then(function (result) {
4801
+ var e_1, _a;
4802
+ if (result['validationResult']['success'] === true) {
4803
+ if (result['resultObject']['availableCatalogs']) {
4804
+ var availableCatalogs = [];
4805
+ try {
4806
+ for (var _b = __values(result['resultObject']['availableCatalogs']), _c = _b.next(); !_c.done; _c = _b.next()) {
4807
+ var availableCatalog = _c.value;
4808
+ var instance = Object.assign(new catalogDefinition_bo.CatalogDefinition(), availableCatalog);
4809
+ availableCatalogs.push(instance);
4810
+ }
4811
+ }
4812
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
4813
+ finally {
4814
+ try {
4815
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
4816
+ }
4817
+ finally { if (e_1) throw e_1.error; }
4818
+ }
4819
+ _this.loadCatalogs(availableCatalogs).then(function (result) {
4820
+ });
4821
+ }
4822
+ if (result['resultObject']['unavailableCatalogs']) {
4823
+ _this.loadUnavailableCatalogs(result['resultObject']['unavailableCatalogs']);
4824
+ }
4825
+ }
4826
+ else {
4827
+ _this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
4828
+ return __generator(this, function (_a) {
4829
+ if (defs) {
4830
+ this.loadCatalogs(defs).then(function (result) {
4831
+ });
4832
+ }
4833
+ return [2 /*return*/];
4834
+ });
4835
+ }); });
4836
+ }
4837
+ });
4799
4838
  }
4800
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
4801
- finally {
4802
- try {
4803
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
4804
- }
4805
- finally { if (e_1) throw e_1.error; }
4839
+ else {
4840
+ this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
4841
+ return __generator(this, function (_a) {
4842
+ if (defs) {
4843
+ this.loadCatalogs(defs).then(function (result) {
4844
+ });
4845
+ }
4846
+ return [2 /*return*/];
4847
+ });
4848
+ }); });
4806
4849
  }
4807
- _this.loadCatalogs(availableCatalogs).then(function (result) { });
4808
- }
4809
- if (result['resultObject']['unavailableCatalogs']) {
4810
- _this.loadUnavailableCatalogs(result['resultObject']['unavailableCatalogs']);
4811
- }
4812
- }
4813
- else {
4814
- _this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
4815
- return __generator(this, function (_a) {
4816
- if (defs) {
4817
- this.loadCatalogs(defs).then(function (result) { });
4818
- }
4819
- return [2 /*return*/];
4820
- });
4821
- }); });
4850
+ return [2 /*return*/];
4822
4851
  }
4823
4852
  });
4824
- }
4825
- else {
4826
- this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
4827
- return __generator(this, function (_a) {
4828
- if (defs) {
4829
- this.loadCatalogs(defs).then(function (result) { });
4830
- }
4831
- return [2 /*return*/];
4832
- });
4833
- }); });
4834
- }
4853
+ });
4835
4854
  };
4836
4855
  CatalogExternalSourcesComponent.prototype.loadCatalogs = function (defs) {
4837
4856
  return __awaiter(this, void 0, void 0, function () {
@@ -4880,7 +4899,9 @@
4880
4899
  ];
4881
4900
  CatalogExternalSourcesComponent.ctorParameters = function () { return [
4882
4901
  { type: CatalogConnectorService },
4883
- { type: CatalogImageService }
4902
+ { type: CatalogImageService },
4903
+ { type: CatalogSettingsService },
4904
+ { type: CatalogService }
4884
4905
  ]; };
4885
4906
  CatalogExternalSourcesComponent.propDecorators = {
4886
4907
  isStandalone: [{ type: i0.Input }],