@colijnit/catalog 260.1.4 → 260.1.5
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.
- package/bundles/colijnit-catalog.umd.js +34 -13
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog.metadata.json +1 -1
- package/esm2015/lib/catalog-version.js +3 -3
- package/esm2015/lib/component/catalog-external-sources/catalog-external-sources.component.js +37 -8
- package/esm2015/lib/component/catalog-external-sources/catalog-external-sources.module.js +4 -2
- package/esm2015/lib/component/catalog-navigation/catalog-navigation.component.js +2 -2
- package/fesm2015/colijnit-catalog.js +41 -11
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/component/catalog-external-sources/catalog-external-sources.component.d.ts +2 -0
- package/lib/component/catalog-external-sources/style/_layout.scss +16 -0
- package/lib/component/catalog-external-sources/style/_material-definition.scss +1 -0
- package/package.json +2 -2
|
@@ -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 = "260.1.
|
|
34
|
-
this.publishDate = "
|
|
33
|
+
this.symVer = "260.1.5";
|
|
34
|
+
this.publishDate = "4-3-2026 17:45:17";
|
|
35
35
|
}
|
|
36
36
|
return Version;
|
|
37
37
|
}());
|
|
@@ -5222,7 +5222,7 @@
|
|
|
5222
5222
|
this.icons = IconEnum;
|
|
5223
5223
|
this.homeLabel = 'HOME2';
|
|
5224
5224
|
this.collectionLabel = 'COLLECTION';
|
|
5225
|
-
this.externalSourcesLabel = '
|
|
5225
|
+
this.externalSourcesLabel = 'EXTERNAL_CATALOGS';
|
|
5226
5226
|
this.showTurnoverGroups = true;
|
|
5227
5227
|
this.homeClick = new i0.EventEmitter();
|
|
5228
5228
|
this.categoryClick = new i0.EventEmitter();
|
|
@@ -5441,6 +5441,7 @@
|
|
|
5441
5441
|
this.embedded = false;
|
|
5442
5442
|
this.externalSourceClick = new i0.EventEmitter();
|
|
5443
5443
|
this.catalogsLoaded = new i0.EventEmitter();
|
|
5444
|
+
this.pinnedExternalSourceViewModels = [];
|
|
5444
5445
|
this.externalSourceViewModels = [];
|
|
5445
5446
|
this.unavailableCatalogs = [];
|
|
5446
5447
|
this._subs = [];
|
|
@@ -5490,7 +5491,7 @@
|
|
|
5490
5491
|
}
|
|
5491
5492
|
finally { if (e_1) throw e_1.error; }
|
|
5492
5493
|
}
|
|
5493
|
-
_this.
|
|
5494
|
+
_this._sortAndLoadAvailableCatalogs(availableCatalogs);
|
|
5494
5495
|
}
|
|
5495
5496
|
if (result['resultObject']['unavailableCatalogs']) {
|
|
5496
5497
|
_this._loadUnavailableCatalogs(result['resultObject']['unavailableCatalogs']);
|
|
@@ -5500,7 +5501,7 @@
|
|
|
5500
5501
|
_this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
|
|
5501
5502
|
return __generator(this, function (_a) {
|
|
5502
5503
|
if (defs && defs.length > 0) {
|
|
5503
|
-
this.
|
|
5504
|
+
this._sortAndLoadAvailableCatalogs(defs);
|
|
5504
5505
|
}
|
|
5505
5506
|
else {
|
|
5506
5507
|
this.catalogsLoaded.emit(false);
|
|
@@ -5515,7 +5516,7 @@
|
|
|
5515
5516
|
this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
|
|
5516
5517
|
return __generator(this, function (_a) {
|
|
5517
5518
|
if (defs && defs.length > 0) {
|
|
5518
|
-
this.
|
|
5519
|
+
this._sortAndLoadAvailableCatalogs(defs);
|
|
5519
5520
|
}
|
|
5520
5521
|
else {
|
|
5521
5522
|
this.catalogsLoaded.emit(false);
|
|
@@ -5525,7 +5526,28 @@
|
|
|
5525
5526
|
}); });
|
|
5526
5527
|
}
|
|
5527
5528
|
};
|
|
5528
|
-
CatalogExternalSourcesComponent.prototype.
|
|
5529
|
+
CatalogExternalSourcesComponent.prototype._sortAndLoadAvailableCatalogs = function (defs) {
|
|
5530
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5531
|
+
var pinnedExternalDefs, availableExternalDefs;
|
|
5532
|
+
return __generator(this, function (_a) {
|
|
5533
|
+
switch (_a.label) {
|
|
5534
|
+
case 0:
|
|
5535
|
+
pinnedExternalDefs = defs.filter(function (def) { return (def.externalSourceId !== null && def.externalSourceId !== undefined) && def.isPinned; });
|
|
5536
|
+
pinnedExternalDefs.sort(function (defA, defB) { return defA.pinnedOrder < defB.pinnedOrder ? -1 : 1; });
|
|
5537
|
+
return [4 /*yield*/, this._loadCatalogs(pinnedExternalDefs, this.pinnedExternalSourceViewModels)];
|
|
5538
|
+
case 1:
|
|
5539
|
+
_a.sent();
|
|
5540
|
+
availableExternalDefs = defs.filter(function (def) { return (def.externalSourceId !== null && def.externalSourceId !== undefined) && !def.isPinned; });
|
|
5541
|
+
return [4 /*yield*/, this._loadCatalogs(availableExternalDefs, this.externalSourceViewModels)];
|
|
5542
|
+
case 2:
|
|
5543
|
+
_a.sent();
|
|
5544
|
+
this.catalogsLoaded.emit((this.externalSourceViewModels.length + this.pinnedExternalSourceViewModels.length) > 0);
|
|
5545
|
+
return [2 /*return*/];
|
|
5546
|
+
}
|
|
5547
|
+
});
|
|
5548
|
+
});
|
|
5549
|
+
};
|
|
5550
|
+
CatalogExternalSourcesComponent.prototype._loadCatalogs = function (defs, resultList) {
|
|
5529
5551
|
return __awaiter(this, void 0, void 0, function () {
|
|
5530
5552
|
var i, viewModel, _a, _b, _c;
|
|
5531
5553
|
return __generator(this, function (_d) {
|
|
@@ -5550,15 +5572,13 @@
|
|
|
5550
5572
|
viewModel = new (_a.apply(ExternalSourceViewmodel, _b.concat([_c])))();
|
|
5551
5573
|
//There is no current easy way to do this in the backend so we filter out the unwanted HTDL tiles in the front end for now.
|
|
5552
5574
|
if ((!viewModel.externalSource.type) || (viewModel.externalSource.type !== 'HTDL')) {
|
|
5553
|
-
|
|
5575
|
+
resultList.push(viewModel);
|
|
5554
5576
|
}
|
|
5555
5577
|
_d.label = 5;
|
|
5556
5578
|
case 5:
|
|
5557
5579
|
i++;
|
|
5558
5580
|
return [3 /*break*/, 1];
|
|
5559
|
-
case 6:
|
|
5560
|
-
this.catalogsLoaded.emit(this.externalSourceViewModels.length > 0);
|
|
5561
|
-
return [2 /*return*/];
|
|
5581
|
+
case 6: return [2 /*return*/];
|
|
5562
5582
|
}
|
|
5563
5583
|
});
|
|
5564
5584
|
});
|
|
@@ -5571,7 +5591,7 @@
|
|
|
5571
5591
|
CatalogExternalSourcesComponent.decorators = [
|
|
5572
5592
|
{ type: i0.Component, args: [{
|
|
5573
5593
|
selector: 'co-catalog-external-sources',
|
|
5574
|
-
template: "\n <ng-container *ngIf=\"
|
|
5594
|
+
template: "\n <ng-container *ngIf=\"pinnedExternalSourceViewModels && pinnedExternalSourceViewModels.length > 0\">\n <div class=\"pinned-section\">\n <div class=\"pinned-label\" [textContent]=\"'PINNED' | caLocalize\"></div> \n <div class=\"catalog-external-sources-wrapper\">\n <div class=\"external-source-item\" *ngFor=\"let externalSourceViewModel of pinnedExternalSourceViewModels\"\n (click)=\"externalSourceClick.emit(externalSourceViewModel)\">\n <div class=\"external-source-description\"\n [textContent]=\"externalSourceViewModel.catalogDefinition.name\"></div>\n <co-image [source]=\"externalSourceViewModel.catalogDefinition.imageData\"></co-image>\n </div>\n </div>\n <div class=\"pinned-divider-padding\">\n <div class=\"pinned-divider\"></div> \n </div> \n </div>\n </ng-container>\n \n <ng-container *ngIf=\"pinnedExternalSourceViewModels && pinnedExternalSourceViewModels.length > 0\">\n <div class=\"catalog-external-sources-wrapper\">\n <div class=\"external-source-item\" *ngFor=\"let externalSourceViewModel of externalSourceViewModels\"\n (click)=\"externalSourceClick.emit(externalSourceViewModel)\">\n <div class=\"external-source-description\"\n [textContent]=\"externalSourceViewModel.catalogDefinition.name\"></div>\n <co-image [source]=\"externalSourceViewModel.catalogDefinition.imageData\"></co-image>\n </div>\n </div>\n </ng-container>\n \n <ng-container *ngIf=\"unavailableCatalogs && unavailableCatalogs.length > 0\">\n <div class=\"catalog-external-sources-wrapper catalog-external-sources-wrapper-unavailable\">\n <div class=\"external-source-item external-source-item-unavailable\"\n *ngFor=\"let unavailableCatalog of unavailableCatalogs\">\n <div class=\"external-source-description\"\n [textContent]=\"unavailableCatalog.name\"></div>\n <co-image [source]=\"unavailableCatalog.imageData\"></co-image>\n </div>\n </div>\n </ng-container>\n ",
|
|
5575
5595
|
encapsulation: i0.ViewEncapsulation.None
|
|
5576
5596
|
},] }
|
|
5577
5597
|
];
|
|
@@ -5600,7 +5620,8 @@
|
|
|
5600
5620
|
common.CommonModule,
|
|
5601
5621
|
CatalogFilterModule,
|
|
5602
5622
|
corecomponents_v12.ImageModule,
|
|
5603
|
-
ResponsiveTextModule
|
|
5623
|
+
ResponsiveTextModule,
|
|
5624
|
+
CatalogPipeModule
|
|
5604
5625
|
],
|
|
5605
5626
|
declarations: [
|
|
5606
5627
|
CatalogExternalSourcesComponent
|