@colijnit/product 260.1.1 → 260.1.2
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/app/components/product-related/product-related.component.d.ts +9 -4
- package/bundles/colijnit-product.umd.js +23 -37
- package/bundles/colijnit-product.umd.js.map +1 -1
- package/colijnit-product.metadata.json +1 -1
- package/esm2015/app/components/product-related/product-related.component.js +29 -20
- package/esm2015/app/product-version.js +3 -3
- package/fesm2015/colijnit-product.js +27 -18
- package/fesm2015/colijnit-product.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { ArticleListObject } from '@colijnit/articleapi/build/model/article-list-object';
|
|
2
2
|
import { ProductConnectorService } from '../../service/product-connector.service';
|
|
3
3
|
import { ProductEventService } from '../../service/product-event.service';
|
|
4
|
-
import { ProductConnectorAdapterService } from
|
|
5
|
-
import { ProductSettingsService } from
|
|
4
|
+
import { ProductConnectorAdapterService } from '../../service/product-connector-adapter.service';
|
|
5
|
+
import { ProductSettingsService } from '../../service/product-settings.service';
|
|
6
6
|
import { ExternalSource } from '@colijnit/articleapi/build/model/external-source.bo';
|
|
7
|
+
export declare class ArticleViewModel {
|
|
8
|
+
article: ArticleListObject;
|
|
9
|
+
imageData: string;
|
|
10
|
+
constructor(article: ArticleListObject, imageData?: string);
|
|
11
|
+
}
|
|
7
12
|
export declare class ProductRelatedComponent {
|
|
8
|
-
_iOne
|
|
13
|
+
private _iOne;
|
|
9
14
|
private _appEventService;
|
|
10
15
|
private _productConnectorAdapterService;
|
|
11
16
|
private _settingsService;
|
|
@@ -16,7 +21,7 @@ export declare class ProductRelatedComponent {
|
|
|
16
21
|
createFrozenArticle: boolean;
|
|
17
22
|
set articles(value: ArticleListObject[]);
|
|
18
23
|
get articles(): ArticleListObject[];
|
|
19
|
-
|
|
24
|
+
articleViewModels: ArticleViewModel[];
|
|
20
25
|
private _articles;
|
|
21
26
|
constructor(_iOne: ProductConnectorService, _appEventService: ProductEventService, _productConnectorAdapterService: ProductConnectorAdapterService, _settingsService: ProductSettingsService);
|
|
22
27
|
handleContentClick(article: ArticleListObject): void;
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
function Version() {
|
|
32
32
|
this.name = "@colijnit/product";
|
|
33
33
|
this.description = "Product detail page project for iOne";
|
|
34
|
-
this.symVer = "260.1.
|
|
35
|
-
this.publishDate = "
|
|
34
|
+
this.symVer = "260.1.2";
|
|
35
|
+
this.publishDate = "5-1-2026 18:13:02";
|
|
36
36
|
}
|
|
37
37
|
return Version;
|
|
38
38
|
}());
|
|
@@ -2785,6 +2785,15 @@
|
|
|
2785
2785
|
},] }
|
|
2786
2786
|
];
|
|
2787
2787
|
|
|
2788
|
+
var ArticleViewModel = /** @class */ (function () {
|
|
2789
|
+
function ArticleViewModel(article, imageData) {
|
|
2790
|
+
this.article = article;
|
|
2791
|
+
if (imageData) {
|
|
2792
|
+
this.imageData = imageData;
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
return ArticleViewModel;
|
|
2796
|
+
}());
|
|
2788
2797
|
var ProductRelatedComponent = /** @class */ (function () {
|
|
2789
2798
|
function ProductRelatedComponent(_iOne, _appEventService, _productConnectorAdapterService, _settingsService) {
|
|
2790
2799
|
this._iOne = _iOne;
|
|
@@ -2793,7 +2802,7 @@
|
|
|
2793
2802
|
this._settingsService = _settingsService;
|
|
2794
2803
|
this.isSmallModus = true;
|
|
2795
2804
|
this.createFrozenArticle = true;
|
|
2796
|
-
this.
|
|
2805
|
+
this.articleViewModels = [];
|
|
2797
2806
|
this._articles = [];
|
|
2798
2807
|
}
|
|
2799
2808
|
Object.defineProperty(ProductRelatedComponent.prototype, "articles", {
|
|
@@ -2815,6 +2824,8 @@
|
|
|
2815
2824
|
else {
|
|
2816
2825
|
this._articles = value;
|
|
2817
2826
|
}
|
|
2827
|
+
this.articleViewModels.length = 0;
|
|
2828
|
+
this._articles.forEach(function (a) { return _this.articleViewModels.push(new ArticleViewModel(a)); });
|
|
2818
2829
|
this._loadImages();
|
|
2819
2830
|
}
|
|
2820
2831
|
},
|
|
@@ -2875,39 +2886,14 @@
|
|
|
2875
2886
|
};
|
|
2876
2887
|
ProductRelatedComponent.prototype._loadImages = function () {
|
|
2877
2888
|
return __awaiter(this, void 0, void 0, function () {
|
|
2878
|
-
var
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
case 1:
|
|
2887
|
-
if (!!_b.done) return [3 /*break*/, 4];
|
|
2888
|
-
a = _b.value;
|
|
2889
|
-
if (!a.image) return [3 /*break*/, 3];
|
|
2890
|
-
return [4 /*yield*/, this._iOne.getImageForCoDocument(a.image, false)];
|
|
2891
|
-
case 2:
|
|
2892
|
-
imageContent = _d.sent();
|
|
2893
|
-
this.imageDataMap.set(a.goodId, imageContent.image);
|
|
2894
|
-
_d.label = 3;
|
|
2895
|
-
case 3:
|
|
2896
|
-
_b = _a.next();
|
|
2897
|
-
return [3 /*break*/, 1];
|
|
2898
|
-
case 4: return [3 /*break*/, 7];
|
|
2899
|
-
case 5:
|
|
2900
|
-
e_1_1 = _d.sent();
|
|
2901
|
-
e_1 = { error: e_1_1 };
|
|
2902
|
-
return [3 /*break*/, 7];
|
|
2903
|
-
case 6:
|
|
2904
|
-
try {
|
|
2905
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
2906
|
-
}
|
|
2907
|
-
finally { if (e_1) throw e_1.error; }
|
|
2908
|
-
return [7 /*endfinally*/];
|
|
2909
|
-
case 7: return [2 /*return*/];
|
|
2910
|
-
}
|
|
2889
|
+
var _this = this;
|
|
2890
|
+
return __generator(this, function (_a) {
|
|
2891
|
+
this.articleViewModels.forEach(function (avm) {
|
|
2892
|
+
if (avm.article.image) {
|
|
2893
|
+
_this._iOne.getImageForCoDocument(avm.article.image, false).then(function (imageContent) { return avm.imageData = imageContent.image; });
|
|
2894
|
+
}
|
|
2895
|
+
});
|
|
2896
|
+
return [2 /*return*/];
|
|
2911
2897
|
});
|
|
2912
2898
|
});
|
|
2913
2899
|
};
|
|
@@ -2916,7 +2902,7 @@
|
|
|
2916
2902
|
ProductRelatedComponent.decorators = [
|
|
2917
2903
|
{ type: i0.Component, args: [{
|
|
2918
2904
|
selector: 'app-product-related',
|
|
2919
|
-
template: "\n <div *ngIf=\"articles && articles.length > 0\">\n <app-header [label]=\"label\" [amount]=\"articles?.length\" *ngIf=\"label\"></app-header>\n <co-scroll-container>\n <div class=\"article-wrapper\" *ngFor=\"let
|
|
2905
|
+
template: "\n <div *ngIf=\"articles && articles.length > 0\">\n <app-header [label]=\"label\" [amount]=\"articles?.length\" *ngIf=\"label\"></app-header>\n <co-scroll-container>\n <div class=\"article-wrapper\" *ngFor=\"let articleViewModel of articleViewModels\">\n <co-article-tile \n [imageData]=\"articleViewModel.imageData\"\n [description]=\"articleViewModel.article.description\"\n [price]=\"articleViewModel.article.price\"\n [level]=\"articleViewModel.article.stockStatus\"\n [hasCartButton]=\"true\"\n [isSmallModus]=\"isSmallModus\"\n [hasConfigureButton]=\"articleViewModel.article.goodType === 'B'\"\n (contentClick)=\"handleContentClick(articleViewModel.article)\"\n (cartButtonClick)=\"handleAddToCartClick(articleViewModel.article)\"\n (configureButtonClick)=\"handleContentClick(articleViewModel.article)\"\n (threeDButtonClick)=\"handleThreeDButtonClick(articleViewModel.article)\"\n ></co-article-tile>\n </div>\n </co-scroll-container>\n </div>\n ",
|
|
2920
2906
|
styles: [":host{display:block}.article-wrapper{display:flex;flex-direction:row;flex:1;min-width:25%}.article-wrapper ::ng-deep co-tile{transition:all .14s ease-out;border:1px solid transparent;padding:10px 20px;display:flex;flex-direction:column;color:#171721;justify-content:space-between}.article-wrapper ::ng-deep co-tile .price{display:block}.article-wrapper ::ng-deep co-tile .description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;height:30px}.article-wrapper ::ng-deep co-tile .tile-bottom{display:flex;flex-direction:column;grid-gap:5px;gap:5px}.article-wrapper ::ng-deep co-tile:hover{border:1px solid #DCE4EA}.article-wrapper ::ng-deep co-tile .tile-extra-bottom co-button co-icon{width:24px;height:24px}.article-wrapper ::ng-deep co-tile .tile-extra-bottom co-button co-icon svg [fill]{fill:#fff}.article-wrapper ::ng-deep co-tile.small{max-width:189px;width:100%;height:100%;cursor:pointer}.article-wrapper ::ng-deep co-tile.small:hover .tile-bottom .left-buttons{margin:0!important}.article-wrapper ::ng-deep co-tile.small .tile-wrapper{outline:none!important;padding-bottom:0;overflow:hidden;grid-gap:10px;gap:10px;display:flex;flex-direction:column}.article-wrapper ::ng-deep co-tile.small .tile-wrapper div.image{height:100px}.article-wrapper ::ng-deep co-tile.small .tile-wrapper .tile-extra-bottom ::ng-deep co-button.card-button.mini{pointer-events:all;padding:0!important;font-size:0;width:42px;height:42px;text-align:center;margin:0;border-radius:100%;background:#3E7EFF;cursor:pointer;place-content:center;color:#fff}.article-wrapper ::ng-deep co-tile.small .tile-wrapper .tile-extra-bottom ::ng-deep co-button.card-button.mini ::ng-deep co-icon{width:30px;height:30px}.article-wrapper ::ng-deep co-tile.small .tile-extra-bottom{outline:none!important;background:transparent!important}.article-wrapper ::ng-deep co-tile.small .tile-extra-bottom .price{color:#74b77f;margin:5px 0 0;font-weight:400;font-size:12px}\n"]
|
|
2921
2907
|
},] }
|
|
2922
2908
|
];
|