@colijnit/catalog 253.1.1 → 254.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/bundles/colijnit-catalog.umd.js +46 -116
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog-254.1.2.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 +9 -4
- 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 +41 -11
- 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-external-source/style/_material-definition.scss +32 -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 +7 -7
|
@@ -49,8 +49,8 @@ class Version {
|
|
|
49
49
|
constructor() {
|
|
50
50
|
this.name = "@colijnit/catalog";
|
|
51
51
|
this.description = "iOne Catalog module based on Angular 12";
|
|
52
|
-
this.symVer = "
|
|
53
|
-
this.publishDate = "
|
|
52
|
+
this.symVer = "254.1.2";
|
|
53
|
+
this.publishDate = "30-12-2024 12:03:34";
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -3642,6 +3642,7 @@ class CatalogSearchComponent {
|
|
|
3642
3642
|
this.showLandingPage = false;
|
|
3643
3643
|
this.showFilter = false;
|
|
3644
3644
|
this.showViewModes = true;
|
|
3645
|
+
this.isReturn = false;
|
|
3645
3646
|
this.settingsChange = new EventEmitter();
|
|
3646
3647
|
this.onLookAtArticleButtonClick = new EventEmitter();
|
|
3647
3648
|
this.onArButtonClick = new EventEmitter();
|
|
@@ -3763,11 +3764,13 @@ CatalogSearchComponent.decorators = [
|
|
|
3763
3764
|
<ng-container *ngIf="mode === 'tile'">
|
|
3764
3765
|
<co-catalog-search-result-tile
|
|
3765
3766
|
[createFrozenArticle]="createFrozenArticle"
|
|
3767
|
+
[isReturn]="isReturn"
|
|
3766
3768
|
></co-catalog-search-result-tile>
|
|
3767
3769
|
</ng-container>
|
|
3768
3770
|
<ng-container *ngIf="mode === 'list'">
|
|
3769
3771
|
<co-catalog-search-result-list
|
|
3770
3772
|
[createFrozenArticle]="createFrozenArticle"
|
|
3773
|
+
[isReturn]="isReturn"
|
|
3771
3774
|
></co-catalog-search-result-list>
|
|
3772
3775
|
</ng-container>
|
|
3773
3776
|
<ng-container *ngIf="mode === 'grid'">
|
|
@@ -3822,6 +3825,7 @@ CatalogSearchComponent.propDecorators = {
|
|
|
3822
3825
|
showLandingPage: [{ type: Input }],
|
|
3823
3826
|
showFilter: [{ type: Input }],
|
|
3824
3827
|
showViewModes: [{ type: Input }],
|
|
3828
|
+
isReturn: [{ type: Input }],
|
|
3825
3829
|
settingsChange: [{ type: Output }],
|
|
3826
3830
|
onLookAtArticleButtonClick: [{ type: Output }],
|
|
3827
3831
|
onArButtonClick: [{ type: Output }],
|
|
@@ -4004,11 +4008,11 @@ class ArticleBaseComponent {
|
|
|
4004
4008
|
this._appEventService.lookAtArticleButtonClick.next(this.article);
|
|
4005
4009
|
this.onLookAtArticleButtonClick.emit(this.article);
|
|
4006
4010
|
}
|
|
4007
|
-
handleAddArticleButtonClick(event) {
|
|
4011
|
+
handleAddArticleButtonClick(event, isRetour = false) {
|
|
4008
4012
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4009
4013
|
event.stopPropagation();
|
|
4010
4014
|
if (this.createFrozenArticle) {
|
|
4011
|
-
const json = yield this._getJSONFromArticleObject(this.article);
|
|
4015
|
+
const json = yield this._getJSONFromArticleObject(this.article, isRetour);
|
|
4012
4016
|
this._appEventService.addArticleButtonClick.next(json);
|
|
4013
4017
|
this.onAddArticleButtonClick.emit(json);
|
|
4014
4018
|
}
|
|
@@ -4035,12 +4039,19 @@ class ArticleBaseComponent {
|
|
|
4035
4039
|
desc = desc.replace(/\r?\n|\r/, '');
|
|
4036
4040
|
return desc;
|
|
4037
4041
|
}
|
|
4038
|
-
_getJSONFromArticleObject(article) {
|
|
4042
|
+
_getJSONFromArticleObject(article, isRetour = false) {
|
|
4039
4043
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4040
4044
|
if (!article) {
|
|
4041
4045
|
return "";
|
|
4042
4046
|
}
|
|
4043
|
-
|
|
4047
|
+
let quantity;
|
|
4048
|
+
if (isRetour) {
|
|
4049
|
+
quantity = -1;
|
|
4050
|
+
}
|
|
4051
|
+
else {
|
|
4052
|
+
quantity = 1;
|
|
4053
|
+
}
|
|
4054
|
+
return yield this._iOne.getJsonArticleFlatTree(article.goodId, article.goodType, quantity);
|
|
4044
4055
|
});
|
|
4045
4056
|
}
|
|
4046
4057
|
_detectChanges() {
|
|
@@ -4127,6 +4138,10 @@ ArticleBaseComponent.propDecorators = {
|
|
|
4127
4138
|
};
|
|
4128
4139
|
|
|
4129
4140
|
class CatalogArticleTileComponent extends ArticleBaseComponent {
|
|
4141
|
+
constructor() {
|
|
4142
|
+
super(...arguments);
|
|
4143
|
+
this.isReturn = false;
|
|
4144
|
+
}
|
|
4130
4145
|
showClass() {
|
|
4131
4146
|
return true;
|
|
4132
4147
|
}
|
|
@@ -4184,7 +4199,7 @@ CatalogArticleTileComponent.decorators = [
|
|
|
4184
4199
|
<co-button *ngIf="!configurable"
|
|
4185
4200
|
[label]="options.addArticleButtonText"
|
|
4186
4201
|
class="open-icon action pointer"
|
|
4187
|
-
(onClick)="handleAddArticleButtonClick($event)"
|
|
4202
|
+
(onClick)="handleAddArticleButtonClick($event, isReturn)"
|
|
4188
4203
|
[iconData]="iconCache.getIcon(icons.AddToCartDrop)">
|
|
4189
4204
|
</co-button>
|
|
4190
4205
|
<co-button *ngIf="configurable"
|
|
@@ -4208,7 +4223,8 @@ CatalogArticleTileComponent.decorators = [
|
|
|
4208
4223
|
},] }
|
|
4209
4224
|
];
|
|
4210
4225
|
CatalogArticleTileComponent.propDecorators = {
|
|
4211
|
-
showClass: [{ type: HostBinding, args: ['class.co-catalog-article-tile',] }]
|
|
4226
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-article-tile',] }],
|
|
4227
|
+
isReturn: [{ type: Input }]
|
|
4212
4228
|
};
|
|
4213
4229
|
|
|
4214
4230
|
class CatalogSearchResultTileComponent extends CatalogSearchBaseComponent {
|
|
@@ -4216,6 +4232,7 @@ class CatalogSearchResultTileComponent extends CatalogSearchBaseComponent {
|
|
|
4216
4232
|
super(...arguments);
|
|
4217
4233
|
this.showClass = true;
|
|
4218
4234
|
this.smallScrollbar = true;
|
|
4235
|
+
this.isReturn = false;
|
|
4219
4236
|
}
|
|
4220
4237
|
set viewChildren(children) {
|
|
4221
4238
|
if (children) {
|
|
@@ -4236,6 +4253,7 @@ CatalogSearchResultTileComponent.decorators = [
|
|
|
4236
4253
|
[createFrozenArticle]="createFrozenArticle"
|
|
4237
4254
|
[showing]="intersection.isIntersecting"
|
|
4238
4255
|
[article]="article"
|
|
4256
|
+
[isReturn]="isReturn"
|
|
4239
4257
|
(onArticleClick)="onArticleClick.emit($event)"
|
|
4240
4258
|
(onAddArticleButtonClick)="onAddArticleButtonClick.emit($event)"
|
|
4241
4259
|
(onArButtonClick)="onArButtonClick.emit($event)"
|
|
@@ -4265,7 +4283,8 @@ CatalogSearchResultTileComponent.decorators = [
|
|
|
4265
4283
|
CatalogSearchResultTileComponent.propDecorators = {
|
|
4266
4284
|
viewChildren: [{ type: ViewChildren, args: [CatalogArticleTileComponent, { read: ElementRef },] }],
|
|
4267
4285
|
showClass: [{ type: HostBinding, args: ['class.co-catalog-search-result-tile',] }],
|
|
4268
|
-
smallScrollbar: [{ type: HostBinding, args: ['class.co-small-scrollbar',] }]
|
|
4286
|
+
smallScrollbar: [{ type: HostBinding, args: ['class.co-small-scrollbar',] }],
|
|
4287
|
+
isReturn: [{ type: Input }]
|
|
4269
4288
|
};
|
|
4270
4289
|
|
|
4271
4290
|
class CatalogArticleTileModule {
|
|
@@ -4428,6 +4447,10 @@ CatalogSearchResultTileModule.decorators = [
|
|
|
4428
4447
|
];
|
|
4429
4448
|
|
|
4430
4449
|
class CatalogArticleListComponent extends ArticleBaseComponent {
|
|
4450
|
+
constructor() {
|
|
4451
|
+
super(...arguments);
|
|
4452
|
+
this.isReturn = false;
|
|
4453
|
+
}
|
|
4431
4454
|
showClass() {
|
|
4432
4455
|
return true;
|
|
4433
4456
|
}
|
|
@@ -4482,7 +4505,7 @@ CatalogArticleListComponent.decorators = [
|
|
|
4482
4505
|
<co-button *ngIf="!configurable"
|
|
4483
4506
|
[label]="options.addArticleButtonText"
|
|
4484
4507
|
class="open-icon action pointer"
|
|
4485
|
-
(onClick)="handleAddArticleButtonClick($event)"
|
|
4508
|
+
(onClick)="handleAddArticleButtonClick($event, isReturn)"
|
|
4486
4509
|
[iconData]="iconCache.getIcon(icons.AddToCartDrop)">
|
|
4487
4510
|
</co-button>
|
|
4488
4511
|
<co-button *ngIf="configurable"
|
|
@@ -4506,10 +4529,15 @@ CatalogArticleListComponent.decorators = [
|
|
|
4506
4529
|
},] }
|
|
4507
4530
|
];
|
|
4508
4531
|
CatalogArticleListComponent.propDecorators = {
|
|
4532
|
+
isReturn: [{ type: Input }],
|
|
4509
4533
|
showClass: [{ type: HostBinding, args: ['class.co-catalog-article-list',] }]
|
|
4510
4534
|
};
|
|
4511
4535
|
|
|
4512
4536
|
class CatalogSearchResultListComponent extends CatalogSearchBaseComponent {
|
|
4537
|
+
constructor() {
|
|
4538
|
+
super(...arguments);
|
|
4539
|
+
this.isReturn = false;
|
|
4540
|
+
}
|
|
4513
4541
|
set viewChildren(children) {
|
|
4514
4542
|
if (children) {
|
|
4515
4543
|
this.elements = children.toArray();
|
|
@@ -4532,6 +4560,7 @@ CatalogSearchResultListComponent.decorators = [
|
|
|
4532
4560
|
[createFrozenArticle]="createFrozenArticle"
|
|
4533
4561
|
[showing]="intersection.isIntersecting"
|
|
4534
4562
|
[article]="article"
|
|
4563
|
+
[isReturn]="isReturn"
|
|
4535
4564
|
(onArticleClick)="onArticleClick.emit($event)"
|
|
4536
4565
|
(onAddArticleButtonClick)="onAddArticleButtonClick.emit($event)"
|
|
4537
4566
|
(onArButtonClick)="onArButtonClick.emit($event)"
|
|
@@ -4560,7 +4589,8 @@ CatalogSearchResultListComponent.decorators = [
|
|
|
4560
4589
|
];
|
|
4561
4590
|
CatalogSearchResultListComponent.propDecorators = {
|
|
4562
4591
|
viewChildren: [{ type: ViewChildren, args: [CatalogArticleListComponent, { read: ElementRef },] }],
|
|
4563
|
-
showClass: [{ type: HostBinding, args: ['class.co-catalog-search-result-list',] }]
|
|
4592
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-search-result-list',] }],
|
|
4593
|
+
isReturn: [{ type: Input }]
|
|
4564
4594
|
};
|
|
4565
4595
|
|
|
4566
4596
|
class CatalogArticleListModule {
|