@colijnit/catalog 255.1.16 → 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.16";
34
- this.publishDate = "3-12-2024 09:51:00";
33
+ this.symVer = "255.1.18";
34
+ this.publishDate = "10-12-2024 13:29:16";
35
35
  }
36
36
  return Version;
37
37
  }());
@@ -3381,6 +3381,7 @@
3381
3381
  _this.onResetFilters = new rxjs.Subject();
3382
3382
  _this.activeStockViewSubject = new rxjs.BehaviorSubject(undefined);
3383
3383
  _this.activeStockView = _this.activeStockViewSubject.asObservable();
3384
+ _this._readonly = false;
3384
3385
  _this._currentPage = 1;
3385
3386
  _this._filterText = [];
3386
3387
  _this.minMillisBetweenArticleSearches = 400;
@@ -4769,68 +4770,87 @@
4769
4770
  }());
4770
4771
 
4771
4772
  var CatalogExternalSourcesComponent = /** @class */ (function () {
4772
- function CatalogExternalSourcesComponent(_catalogConnectorService, _imageService) {
4773
+ function CatalogExternalSourcesComponent(_catalogConnectorService, _imageService, _settingsService, _catalogService) {
4773
4774
  this._catalogConnectorService = _catalogConnectorService;
4774
4775
  this._imageService = _imageService;
4776
+ this._settingsService = _settingsService;
4777
+ this._catalogService = _catalogService;
4775
4778
  this.isStandalone = false;
4776
4779
  this.externalSourceClick = new i0.EventEmitter();
4777
4780
  this.externalSourceViewModels = [];
4778
4781
  this.unavailableCatalogs = [];
4782
+ this._settings = { searchOnStart: true };
4779
4783
  }
4780
4784
  CatalogExternalSourcesComponent.prototype.showClass = function () {
4781
4785
  return true;
4782
4786
  };
4783
4787
  CatalogExternalSourcesComponent.prototype.ngOnInit = function () {
4784
- var _this = this;
4785
- this.externalSourceViewModels.length = 0;
4786
- if (!this.isStandalone) {
4787
- this._catalogConnectorService.getAvailabeCatalogsForLoggedInUser().then(function (result) {
4788
- var e_1, _a;
4789
- if (result['validationResult']['success'] === true) {
4790
- if (result['resultObject']['availableCatalogs']) {
4791
- var availableCatalogs = [];
4792
- try {
4793
- for (var _b = __values(result['resultObject']['availableCatalogs']), _c = _b.next(); !_c.done; _c = _b.next()) {
4794
- var availableCatalog = _c.value;
4795
- var instance = Object.assign(new catalogDefinition_bo.CatalogDefinition(), availableCatalog);
4796
- availableCatalogs.push(instance);
4797
- }
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
+ });
4798
4838
  }
4799
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
4800
- finally {
4801
- try {
4802
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
4803
- }
4804
- 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
+ }); });
4805
4849
  }
4806
- _this.loadCatalogs(availableCatalogs).then(function (result) { });
4807
- }
4808
- if (result['resultObject']['unavailableCatalogs']) {
4809
- _this.loadUnavailableCatalogs(result['resultObject']['unavailableCatalogs']);
4810
- }
4811
- }
4812
- else {
4813
- _this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
4814
- return __generator(this, function (_a) {
4815
- if (defs) {
4816
- this.loadCatalogs(defs).then(function (result) { });
4817
- }
4818
- return [2 /*return*/];
4819
- });
4820
- }); });
4850
+ return [2 /*return*/];
4821
4851
  }
4822
4852
  });
4823
- }
4824
- else {
4825
- this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
4826
- return __generator(this, function (_a) {
4827
- if (defs) {
4828
- this.loadCatalogs(defs).then(function (result) { });
4829
- }
4830
- return [2 /*return*/];
4831
- });
4832
- }); });
4833
- }
4853
+ });
4834
4854
  };
4835
4855
  CatalogExternalSourcesComponent.prototype.loadCatalogs = function (defs) {
4836
4856
  return __awaiter(this, void 0, void 0, function () {
@@ -4879,7 +4899,9 @@
4879
4899
  ];
4880
4900
  CatalogExternalSourcesComponent.ctorParameters = function () { return [
4881
4901
  { type: CatalogConnectorService },
4882
- { type: CatalogImageService }
4902
+ { type: CatalogImageService },
4903
+ { type: CatalogSettingsService },
4904
+ { type: CatalogService }
4883
4905
  ]; };
4884
4906
  CatalogExternalSourcesComponent.propDecorators = {
4885
4907
  isStandalone: [{ type: i0.Input }],