@colijnit/catalog 256.1.11 → 256.1.12

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 = "256.1.11";
34
- this.publishDate = "9-12-2024 15:21:51";
33
+ this.symVer = "256.1.12";
34
+ this.publishDate = "10-12-2024 12:28:29";
35
35
  }
36
36
  return Version;
37
37
  }());
@@ -4843,68 +4843,87 @@
4843
4843
  }());
4844
4844
 
4845
4845
  var CatalogExternalSourcesComponent = /** @class */ (function () {
4846
- function CatalogExternalSourcesComponent(_catalogConnectorService, _imageService) {
4846
+ function CatalogExternalSourcesComponent(_catalogConnectorService, _imageService, _settingsService, _catalogService) {
4847
4847
  this._catalogConnectorService = _catalogConnectorService;
4848
4848
  this._imageService = _imageService;
4849
+ this._settingsService = _settingsService;
4850
+ this._catalogService = _catalogService;
4849
4851
  this.isStandalone = false;
4850
4852
  this.externalSourceClick = new i0.EventEmitter();
4851
4853
  this.externalSourceViewModels = [];
4852
4854
  this.unavailableCatalogs = [];
4855
+ this._settings = { searchOnStart: true };
4853
4856
  }
4854
4857
  CatalogExternalSourcesComponent.prototype.showClass = function () {
4855
4858
  return true;
4856
4859
  };
4857
4860
  CatalogExternalSourcesComponent.prototype.ngOnInit = function () {
4858
- var _this = this;
4859
- this.externalSourceViewModels.length = 0;
4860
- if (!this.isStandalone) {
4861
- this._catalogConnectorService.getAvailabeCatalogsForLoggedInUser().then(function (result) {
4862
- var e_1, _a;
4863
- if (result['validationResult']['success'] === true) {
4864
- if (result['resultObject']['availableCatalogs']) {
4865
- var availableCatalogs = [];
4866
- try {
4867
- for (var _b = __values(result['resultObject']['availableCatalogs']), _c = _b.next(); !_c.done; _c = _b.next()) {
4868
- var availableCatalog = _c.value;
4869
- var instance = Object.assign(new catalogDefinition_bo.CatalogDefinition(), availableCatalog);
4870
- availableCatalogs.push(instance);
4871
- }
4861
+ return __awaiter(this, void 0, void 0, function () {
4862
+ var _this = this;
4863
+ return __generator(this, function (_a) {
4864
+ switch (_a.label) {
4865
+ case 0: return [4 /*yield*/, this._settingsService.initializeSettings()];
4866
+ case 1:
4867
+ _a.sent();
4868
+ return [4 /*yield*/, this._catalogService.init(this._settings, true)];
4869
+ case 2:
4870
+ _a.sent();
4871
+ this.externalSourceViewModels.length = 0;
4872
+ if (!this.isStandalone) {
4873
+ this._catalogConnectorService.getAvailabeCatalogsForLoggedInUser().then(function (result) {
4874
+ var e_1, _a;
4875
+ if (result['validationResult']['success'] === true) {
4876
+ if (result['resultObject']['availableCatalogs']) {
4877
+ var availableCatalogs = [];
4878
+ try {
4879
+ for (var _b = __values(result['resultObject']['availableCatalogs']), _c = _b.next(); !_c.done; _c = _b.next()) {
4880
+ var availableCatalog = _c.value;
4881
+ var instance = Object.assign(new catalogDefinition_bo.CatalogDefinition(), availableCatalog);
4882
+ availableCatalogs.push(instance);
4883
+ }
4884
+ }
4885
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
4886
+ finally {
4887
+ try {
4888
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
4889
+ }
4890
+ finally { if (e_1) throw e_1.error; }
4891
+ }
4892
+ _this.loadCatalogs(availableCatalogs).then(function (result) {
4893
+ });
4894
+ }
4895
+ if (result['resultObject']['unavailableCatalogs']) {
4896
+ _this.loadUnavailableCatalogs(result['resultObject']['unavailableCatalogs']);
4897
+ }
4898
+ }
4899
+ else {
4900
+ _this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
4901
+ return __generator(this, function (_a) {
4902
+ if (defs) {
4903
+ this.loadCatalogs(defs).then(function (result) {
4904
+ });
4905
+ }
4906
+ return [2 /*return*/];
4907
+ });
4908
+ }); });
4909
+ }
4910
+ });
4872
4911
  }
4873
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
4874
- finally {
4875
- try {
4876
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
4877
- }
4878
- finally { if (e_1) throw e_1.error; }
4912
+ else {
4913
+ this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
4914
+ return __generator(this, function (_a) {
4915
+ if (defs) {
4916
+ this.loadCatalogs(defs).then(function (result) {
4917
+ });
4918
+ }
4919
+ return [2 /*return*/];
4920
+ });
4921
+ }); });
4879
4922
  }
4880
- _this.loadCatalogs(availableCatalogs).then(function (result) { });
4881
- }
4882
- if (result['resultObject']['unavailableCatalogs']) {
4883
- _this.loadUnavailableCatalogs(result['resultObject']['unavailableCatalogs']);
4884
- }
4885
- }
4886
- else {
4887
- _this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
4888
- return __generator(this, function (_a) {
4889
- if (defs) {
4890
- this.loadCatalogs(defs).then(function (result) { });
4891
- }
4892
- return [2 /*return*/];
4893
- });
4894
- }); });
4923
+ return [2 /*return*/];
4895
4924
  }
4896
4925
  });
4897
- }
4898
- else {
4899
- this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
4900
- return __generator(this, function (_a) {
4901
- if (defs) {
4902
- this.loadCatalogs(defs).then(function (result) { });
4903
- }
4904
- return [2 /*return*/];
4905
- });
4906
- }); });
4907
- }
4926
+ });
4908
4927
  };
4909
4928
  CatalogExternalSourcesComponent.prototype.loadCatalogs = function (defs) {
4910
4929
  return __awaiter(this, void 0, void 0, function () {
@@ -4953,7 +4972,9 @@
4953
4972
  ];
4954
4973
  CatalogExternalSourcesComponent.ctorParameters = function () { return [
4955
4974
  { type: CatalogConnectorService },
4956
- { type: CatalogImageService }
4975
+ { type: CatalogImageService },
4976
+ { type: CatalogSettingsService },
4977
+ { type: CatalogService }
4957
4978
  ]; };
4958
4979
  CatalogExternalSourcesComponent.propDecorators = {
4959
4980
  isStandalone: [{ type: i0.Input }],