@colijnit/catalog 255.1.20 → 255.1.21
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 +38 -16
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog-255.1.21.tgz +0 -0
- package/colijnit-catalog.metadata.json +1 -1
- package/esm2015/lib/catalog-version.js +3 -3
- package/esm2015/lib/component/base/article-base.component.js +12 -5
- package/esm2015/lib/component/catalog-article-list/catalog-article-list.component.js +8 -3
- package/esm2015/lib/component/catalog-article-tile/catalog-article-tile.component.js +8 -3
- package/esm2015/lib/component/catalog-search/catalog-search.component.js +5 -1
- package/esm2015/lib/component/catalog-search-result-list/catalog-search-result-list.component.js +9 -3
- package/esm2015/lib/component/catalog-search-result-tile/catalog-search-result-tile.component.js +6 -3
- package/fesm2015/colijnit-catalog.js +40 -10
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/component/base/article-base.component.d.ts +1 -1
- package/lib/component/catalog-article-list/catalog-article-list.component.d.ts +1 -0
- package/lib/component/catalog-article-tile/catalog-article-tile.component.d.ts +1 -0
- package/lib/component/catalog-search/catalog-search.component.d.ts +1 -0
- package/lib/component/catalog-search-result-list/catalog-search-result-list.component.d.ts +1 -0
- package/lib/component/catalog-search-result-tile/catalog-search-result-tile.component.d.ts +1 -0
- package/package.json +1 -1
- package/colijnit-catalog-255.1.19.tgz +0 -0
|
@@ -55,8 +55,8 @@ class Version {
|
|
|
55
55
|
constructor() {
|
|
56
56
|
this.name = "@colijnit/catalog";
|
|
57
57
|
this.description = "iOne Catalog module based on Angular 12";
|
|
58
|
-
this.symVer = "255.1.
|
|
59
|
-
this.publishDate = "
|
|
58
|
+
this.symVer = "255.1.21";
|
|
59
|
+
this.publishDate = "30-12-2024 11:00:44";
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -4478,6 +4478,7 @@ class CatalogSearchComponent {
|
|
|
4478
4478
|
this.showFilter = false;
|
|
4479
4479
|
this.tempFilter = false;
|
|
4480
4480
|
this.showViewModes = true;
|
|
4481
|
+
this.isReturn = false;
|
|
4481
4482
|
/**
|
|
4482
4483
|
* Defaults
|
|
4483
4484
|
* {name: 'CATEGORY', order: 1},
|
|
@@ -4651,11 +4652,13 @@ CatalogSearchComponent.decorators = [
|
|
|
4651
4652
|
<ng-container *ngIf="mode === 'tile'">
|
|
4652
4653
|
<co-catalog-search-result-tile
|
|
4653
4654
|
[createFrozenArticle]="createFrozenArticle"
|
|
4655
|
+
[isReturn]="isReturn"
|
|
4654
4656
|
></co-catalog-search-result-tile>
|
|
4655
4657
|
</ng-container>
|
|
4656
4658
|
<ng-container *ngIf="mode === 'list'">
|
|
4657
4659
|
<co-catalog-search-result-list
|
|
4658
4660
|
[createFrozenArticle]="createFrozenArticle"
|
|
4661
|
+
[isReturn]="isReturn"
|
|
4659
4662
|
></co-catalog-search-result-list>
|
|
4660
4663
|
</ng-container>
|
|
4661
4664
|
<ng-container *ngIf="mode === 'grid'">
|
|
@@ -4722,6 +4725,7 @@ CatalogSearchComponent.propDecorators = {
|
|
|
4722
4725
|
showFilter: [{ type: Input }],
|
|
4723
4726
|
tempFilter: [{ type: Input }],
|
|
4724
4727
|
showViewModes: [{ type: Input }],
|
|
4728
|
+
isReturn: [{ type: Input }],
|
|
4725
4729
|
generalFilterOrders: [{ type: Input }],
|
|
4726
4730
|
purchaseFilterOrders: [{ type: Input }],
|
|
4727
4731
|
logisticsFilterOrders: [{ type: Input }],
|
|
@@ -4907,11 +4911,11 @@ class ArticleBaseComponent {
|
|
|
4907
4911
|
this._appEventService.lookAtArticleButtonClick.next(this.article);
|
|
4908
4912
|
this.onLookAtArticleButtonClick.emit(this.article);
|
|
4909
4913
|
}
|
|
4910
|
-
handleAddArticleButtonClick(event) {
|
|
4914
|
+
handleAddArticleButtonClick(event, isRetour = false) {
|
|
4911
4915
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4912
4916
|
event.stopPropagation();
|
|
4913
4917
|
if (this.createFrozenArticle) {
|
|
4914
|
-
const json = yield this._getJSONFromArticleObject(this.article);
|
|
4918
|
+
const json = yield this._getJSONFromArticleObject(this.article, isRetour);
|
|
4915
4919
|
this._appEventService.addArticleButtonClick.next(json);
|
|
4916
4920
|
this.onAddArticleButtonClick.emit(json);
|
|
4917
4921
|
}
|
|
@@ -4938,12 +4942,19 @@ class ArticleBaseComponent {
|
|
|
4938
4942
|
desc = desc.replace(/\r?\n|\r/, '');
|
|
4939
4943
|
return desc;
|
|
4940
4944
|
}
|
|
4941
|
-
_getJSONFromArticleObject(article) {
|
|
4945
|
+
_getJSONFromArticleObject(article, isRetour = false) {
|
|
4942
4946
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4943
4947
|
if (!article) {
|
|
4944
4948
|
return "";
|
|
4945
4949
|
}
|
|
4946
|
-
|
|
4950
|
+
let quantity;
|
|
4951
|
+
if (isRetour) {
|
|
4952
|
+
quantity = -1;
|
|
4953
|
+
}
|
|
4954
|
+
else {
|
|
4955
|
+
quantity = 1;
|
|
4956
|
+
}
|
|
4957
|
+
return yield this._iOne.getJsonArticleFlatTree(article.goodId, article.goodType, quantity);
|
|
4947
4958
|
});
|
|
4948
4959
|
}
|
|
4949
4960
|
_detectChanges() {
|
|
@@ -5030,6 +5041,10 @@ ArticleBaseComponent.propDecorators = {
|
|
|
5030
5041
|
};
|
|
5031
5042
|
|
|
5032
5043
|
class CatalogArticleTileComponent extends ArticleBaseComponent {
|
|
5044
|
+
constructor() {
|
|
5045
|
+
super(...arguments);
|
|
5046
|
+
this.isReturn = false;
|
|
5047
|
+
}
|
|
5033
5048
|
showClass() {
|
|
5034
5049
|
return true;
|
|
5035
5050
|
}
|
|
@@ -5087,7 +5102,7 @@ CatalogArticleTileComponent.decorators = [
|
|
|
5087
5102
|
<co-button *ngIf="!configurable"
|
|
5088
5103
|
[label]="options.addArticleButtonText"
|
|
5089
5104
|
class="open-icon action pointer"
|
|
5090
|
-
(onClick)="handleAddArticleButtonClick($event)"
|
|
5105
|
+
(onClick)="handleAddArticleButtonClick($event, isReturn)"
|
|
5091
5106
|
[iconData]="iconCache.getIcon(icons.AddToCartDrop)">
|
|
5092
5107
|
</co-button>
|
|
5093
5108
|
<co-button *ngIf="configurable"
|
|
@@ -5111,6 +5126,7 @@ CatalogArticleTileComponent.decorators = [
|
|
|
5111
5126
|
},] }
|
|
5112
5127
|
];
|
|
5113
5128
|
CatalogArticleTileComponent.propDecorators = {
|
|
5129
|
+
isReturn: [{ type: Input }],
|
|
5114
5130
|
showClass: [{ type: HostBinding, args: ['class.co-catalog-article-tile',] }]
|
|
5115
5131
|
};
|
|
5116
5132
|
|
|
@@ -5119,6 +5135,7 @@ class CatalogSearchResultTileComponent extends CatalogSearchBaseComponent {
|
|
|
5119
5135
|
super(...arguments);
|
|
5120
5136
|
this.showClass = true;
|
|
5121
5137
|
this.smallScrollbar = true;
|
|
5138
|
+
this.isReturn = false;
|
|
5122
5139
|
}
|
|
5123
5140
|
set viewChildren(children) {
|
|
5124
5141
|
if (children) {
|
|
@@ -5139,6 +5156,7 @@ CatalogSearchResultTileComponent.decorators = [
|
|
|
5139
5156
|
[createFrozenArticle]="createFrozenArticle"
|
|
5140
5157
|
[showing]="intersection.isIntersecting"
|
|
5141
5158
|
[article]="article"
|
|
5159
|
+
[isReturn]="isReturn"
|
|
5142
5160
|
(onArticleClick)="onArticleClick.emit($event)"
|
|
5143
5161
|
(onAddArticleButtonClick)="onAddArticleButtonClick.emit($event)"
|
|
5144
5162
|
(onArButtonClick)="onArButtonClick.emit($event)"
|
|
@@ -5168,7 +5186,8 @@ CatalogSearchResultTileComponent.decorators = [
|
|
|
5168
5186
|
CatalogSearchResultTileComponent.propDecorators = {
|
|
5169
5187
|
viewChildren: [{ type: ViewChildren, args: [CatalogArticleTileComponent, { read: ElementRef },] }],
|
|
5170
5188
|
showClass: [{ type: HostBinding, args: ['class.co-catalog-search-result-tile',] }],
|
|
5171
|
-
smallScrollbar: [{ type: HostBinding, args: ['class.co-small-scrollbar',] }]
|
|
5189
|
+
smallScrollbar: [{ type: HostBinding, args: ['class.co-small-scrollbar',] }],
|
|
5190
|
+
isReturn: [{ type: Input }]
|
|
5172
5191
|
};
|
|
5173
5192
|
|
|
5174
5193
|
class CatalogArticleTileModule {
|
|
@@ -5331,6 +5350,10 @@ CatalogSearchResultTileModule.decorators = [
|
|
|
5331
5350
|
];
|
|
5332
5351
|
|
|
5333
5352
|
class CatalogArticleListComponent extends ArticleBaseComponent {
|
|
5353
|
+
constructor() {
|
|
5354
|
+
super(...arguments);
|
|
5355
|
+
this.isReturn = false;
|
|
5356
|
+
}
|
|
5334
5357
|
showClass() {
|
|
5335
5358
|
return true;
|
|
5336
5359
|
}
|
|
@@ -5385,7 +5408,7 @@ CatalogArticleListComponent.decorators = [
|
|
|
5385
5408
|
<co-button *ngIf="!configurable"
|
|
5386
5409
|
[label]="options.addArticleButtonText"
|
|
5387
5410
|
class="open-icon action pointer"
|
|
5388
|
-
(onClick)="handleAddArticleButtonClick($event)"
|
|
5411
|
+
(onClick)="handleAddArticleButtonClick($event, isReturn)"
|
|
5389
5412
|
[iconData]="iconCache.getIcon(icons.AddToCartDrop)">
|
|
5390
5413
|
</co-button>
|
|
5391
5414
|
<co-button *ngIf="configurable"
|
|
@@ -5409,10 +5432,15 @@ CatalogArticleListComponent.decorators = [
|
|
|
5409
5432
|
},] }
|
|
5410
5433
|
];
|
|
5411
5434
|
CatalogArticleListComponent.propDecorators = {
|
|
5435
|
+
isReturn: [{ type: Input }],
|
|
5412
5436
|
showClass: [{ type: HostBinding, args: ['class.co-catalog-article-list',] }]
|
|
5413
5437
|
};
|
|
5414
5438
|
|
|
5415
5439
|
class CatalogSearchResultListComponent extends CatalogSearchBaseComponent {
|
|
5440
|
+
constructor() {
|
|
5441
|
+
super(...arguments);
|
|
5442
|
+
this.isReturn = false;
|
|
5443
|
+
}
|
|
5416
5444
|
set viewChildren(children) {
|
|
5417
5445
|
if (children) {
|
|
5418
5446
|
this.elements = children.toArray();
|
|
@@ -5435,6 +5463,7 @@ CatalogSearchResultListComponent.decorators = [
|
|
|
5435
5463
|
[createFrozenArticle]="createFrozenArticle"
|
|
5436
5464
|
[showing]="intersection.isIntersecting"
|
|
5437
5465
|
[article]="article"
|
|
5466
|
+
[isReturn]="isReturn"
|
|
5438
5467
|
(onArticleClick)="onArticleClick.emit($event)"
|
|
5439
5468
|
(onAddArticleButtonClick)="onAddArticleButtonClick.emit($event)"
|
|
5440
5469
|
(onArButtonClick)="onArButtonClick.emit($event)"
|
|
@@ -5463,7 +5492,8 @@ CatalogSearchResultListComponent.decorators = [
|
|
|
5463
5492
|
];
|
|
5464
5493
|
CatalogSearchResultListComponent.propDecorators = {
|
|
5465
5494
|
viewChildren: [{ type: ViewChildren, args: [CatalogArticleListComponent, { read: ElementRef },] }],
|
|
5466
|
-
showClass: [{ type: HostBinding, args: ['class.co-catalog-search-result-list',] }]
|
|
5495
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-search-result-list',] }],
|
|
5496
|
+
isReturn: [{ type: Input }]
|
|
5467
5497
|
};
|
|
5468
5498
|
|
|
5469
5499
|
class CatalogArticleListModule {
|