@colijnit/catalog 256.1.4 → 256.1.6
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 +204 -126
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog-256.1.4.tgz +0 -0
- package/colijnit-catalog.d.ts +25 -24
- package/colijnit-catalog.metadata.json +1 -1
- package/esm2015/colijnit-catalog.js +26 -25
- package/esm2015/lib/catalog-version.js +3 -3
- package/esm2015/lib/component/base/article-base.component.js +6 -5
- package/esm2015/lib/component/base/catalog-search-base.component.js +2 -1
- package/esm2015/lib/component/catalog-external-source/catalog-external-source.component.js +20 -17
- package/esm2015/lib/component/catalog-search/catalog-search.component.js +35 -34
- package/esm2015/lib/component/catalog-search/catalog-search.module.js +1 -1
- package/esm2015/lib/component/catalog-search-result-list/catalog-search-result-list.component.js +2 -1
- package/esm2015/lib/component/catalog-search-result-tile/catalog-search-result-tile.component.js +2 -1
- package/esm2015/lib/service/catalog-connector-adapter.service.js +15 -1
- package/esm2015/lib/service/catalog-screen-configuration.service.js +48 -0
- package/esm2015/lib/service/catalog.service.js +15 -9
- package/fesm2015/colijnit-catalog.js +125 -59
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/component/base/article-base.component.d.ts +3 -1
- package/lib/component/base/catalog-search-base.component.d.ts +3 -1
- package/lib/component/catalog-external-source/catalog-external-source.component.d.ts +3 -1
- package/lib/component/catalog-search/catalog-search.component.d.ts +7 -2
- package/lib/service/catalog-connector-adapter.service.d.ts +3 -0
- package/lib/service/catalog-screen-configuration.service.d.ts +13 -0
- package/lib/service/catalog.service.d.ts +5 -2
- package/package.json +2 -2
|
@@ -33,9 +33,10 @@ import { ExternalCatalogStartupInfo } from '@colijnit/articleapi/build/model/ext
|
|
|
33
33
|
import { Color } from '@colijnit/mainapi/build/model/color.bo';
|
|
34
34
|
import { TransactionInfoResponse } from '@colijnit/transactionapi/build/model/transaction-info-response.bo';
|
|
35
35
|
import { DateField } from '@colijnit/ioneconnector/build/factory/decorators/date-field.decorator';
|
|
36
|
+
import { ObjectConfiguration } from '@colijnit/ioneconnector/build/model/object-configuration';
|
|
36
37
|
import { ObjectUtils } from '@colijnit/ioneconnector/build/utils/object-utils';
|
|
37
38
|
import { FileUtils } from '@colijnit/ioneconnector/build/utils/file-utils';
|
|
38
|
-
import { FilterViewmodel, FilterItemViewmodel, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, FilterItemModule, ScreenConfigurationModule, InputTextModule, ButtonModule, IconModule, FilterItemMode as FilterItemMode$1, InputDatePickerModule, IconCollapseHandleModule, CoDialogModule, ListOfValuesModule, CheckmarkOverlayModule, ImageModule, OverlayModule, OverlayService,
|
|
39
|
+
import { FilterViewmodel, FilterItemViewmodel, BaseModuleScreenConfigService, BaseModuleService, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, FilterItemModule, ScreenConfigurationModule, InputTextModule, ButtonModule, IconModule, FilterItemMode as FilterItemMode$1, InputDatePickerModule, IconCollapseHandleModule, CoDialogModule, ListOfValuesModule, CheckmarkOverlayModule, ImageModule, OverlayModule, OverlayService, InputSearchModule, PaginationBarModule, SimpleGridModule } from '@colijnit/corecomponents_v12';
|
|
39
40
|
import { PagingParameters } from '@colijnit/ioneconnector/build/model/paging-parameters';
|
|
40
41
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
41
42
|
import * as i1 from '@angular/platform-browser';
|
|
@@ -53,8 +54,8 @@ class Version {
|
|
|
53
54
|
constructor() {
|
|
54
55
|
this.name = "@colijnit/catalog";
|
|
55
56
|
this.description = "iOne Catalog module based on Angular 12";
|
|
56
|
-
this.symVer = "256.1.
|
|
57
|
-
this.publishDate = "
|
|
57
|
+
this.symVer = "256.1.6";
|
|
58
|
+
this.publishDate = "6-11-2024 17:11:51";
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
|
|
@@ -328,6 +329,7 @@ class CatalogConnectorAdapterService {
|
|
|
328
329
|
this._boFactory = new BusinessObjectFactory();
|
|
329
330
|
this._initializing = false;
|
|
330
331
|
this._initialized = false;
|
|
332
|
+
console.log('create');
|
|
331
333
|
}
|
|
332
334
|
get shouldShowLoader() {
|
|
333
335
|
return this._shouldShowLoader;
|
|
@@ -938,6 +940,17 @@ class CatalogConnectorAdapterService {
|
|
|
938
940
|
getJsonArticleFlatTree(goodId, goodType, quantity, externalSource = false, showLoader = true, instanceId = undefined, configuratorStatistics) {
|
|
939
941
|
return this.connector.getJsonArticleFlatTree(goodId, goodType, quantity, externalSource, showLoader, undefined, configuratorStatistics);
|
|
940
942
|
}
|
|
943
|
+
getObjectConfiguration(screenCfgModule, params, insertMode) {
|
|
944
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
945
|
+
const response = yield this.mainConnector.getObjectConfigurations(screenCfgModule, params, insertMode);
|
|
946
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
947
|
+
return this._boFactory.makeBOArrayFromRawBackendDataArray(ObjectConfiguration, response.resultObjects);
|
|
948
|
+
}
|
|
949
|
+
else {
|
|
950
|
+
console.error(response.validationMessagesAsString);
|
|
951
|
+
}
|
|
952
|
+
});
|
|
953
|
+
}
|
|
941
954
|
onShowLoaderChange(showLoader) {
|
|
942
955
|
this._shouldShowLoader = showLoader;
|
|
943
956
|
}
|
|
@@ -947,7 +960,8 @@ CatalogConnectorAdapterService.decorators = [
|
|
|
947
960
|
{ type: Injectable, args: [{
|
|
948
961
|
providedIn: 'root'
|
|
949
962
|
},] }
|
|
950
|
-
];
|
|
963
|
+
];
|
|
964
|
+
CatalogConnectorAdapterService.ctorParameters = () => [];
|
|
951
965
|
|
|
952
966
|
// Class represents a value that is to be loaded only once, lazily, by its .loadFunction, despite how many times or how fast its getValue() is called.
|
|
953
967
|
class CacheField {
|
|
@@ -2114,10 +2128,54 @@ CatalogSearchService.ctorParameters = () => [
|
|
|
2114
2128
|
{ type: CatalogOptionsService }
|
|
2115
2129
|
];
|
|
2116
2130
|
|
|
2117
|
-
class
|
|
2118
|
-
constructor(
|
|
2131
|
+
class CatalogScreenConfigurationService extends BaseModuleScreenConfigService {
|
|
2132
|
+
constructor(_catalogAdapterService) {
|
|
2133
|
+
super();
|
|
2134
|
+
this._catalogAdapterService = _catalogAdapterService;
|
|
2135
|
+
this.screenModuleName = "Selector";
|
|
2136
|
+
this._screenConfigurationObjectCache = [];
|
|
2137
|
+
}
|
|
2138
|
+
clear() {
|
|
2139
|
+
this._screenConfigurationObjectCache = [];
|
|
2140
|
+
}
|
|
2141
|
+
loadConfigForModule(params, insertRights) {
|
|
2142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2143
|
+
if (!this._screenConfigurationLoaded()) {
|
|
2144
|
+
const config = yield this._catalogAdapterService.getObjectConfiguration(this.screenModuleName);
|
|
2145
|
+
if (config) {
|
|
2146
|
+
this._setScreenConfigurationObjectCache(config);
|
|
2147
|
+
return config;
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
else {
|
|
2151
|
+
return Promise.resolve(this._screenConfigurationObjectCache);
|
|
2152
|
+
}
|
|
2153
|
+
return Promise.resolve([]);
|
|
2154
|
+
});
|
|
2155
|
+
}
|
|
2156
|
+
_setScreenConfigurationObjectCache(objects) {
|
|
2157
|
+
this._screenConfigurationObjectCache = objects;
|
|
2158
|
+
}
|
|
2159
|
+
_screenConfigurationLoaded() {
|
|
2160
|
+
return this._screenConfigurationObjectCache.length !== 0;
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
CatalogScreenConfigurationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogScreenConfigurationService_Factory() { return new CatalogScreenConfigurationService(i0.ɵɵinject(CatalogConnectorAdapterService)); }, token: CatalogScreenConfigurationService, providedIn: "root" });
|
|
2164
|
+
CatalogScreenConfigurationService.decorators = [
|
|
2165
|
+
{ type: Injectable, args: [{
|
|
2166
|
+
providedIn: "root"
|
|
2167
|
+
},] }
|
|
2168
|
+
];
|
|
2169
|
+
CatalogScreenConfigurationService.ctorParameters = () => [
|
|
2170
|
+
{ type: CatalogConnectorAdapterService }
|
|
2171
|
+
];
|
|
2172
|
+
|
|
2173
|
+
class CatalogService extends BaseModuleService {
|
|
2174
|
+
constructor(connector, connectorAdapter, screenConfigService, settingsService, optionsService, _imageService, _filterService, _catalogSearchService) {
|
|
2175
|
+
super(screenConfigService);
|
|
2119
2176
|
this.connector = connector;
|
|
2120
2177
|
this.connectorAdapter = connectorAdapter;
|
|
2178
|
+
this.screenConfigService = screenConfigService;
|
|
2121
2179
|
this.settingsService = settingsService;
|
|
2122
2180
|
this.optionsService = optionsService;
|
|
2123
2181
|
this._imageService = _imageService;
|
|
@@ -2271,7 +2329,7 @@ class CatalogService {
|
|
|
2271
2329
|
this.activeStockViewSubject.next(value);
|
|
2272
2330
|
}
|
|
2273
2331
|
}
|
|
2274
|
-
CatalogService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogService_Factory() { return new CatalogService(i0.ɵɵinject(CatalogConnectorService), i0.ɵɵinject(CatalogConnectorAdapterService), i0.ɵɵinject(CatalogSettingsService), i0.ɵɵinject(CatalogOptionsService), i0.ɵɵinject(CatalogImageService), i0.ɵɵinject(CatalogFilterService), i0.ɵɵinject(CatalogSearchService)); }, token: CatalogService, providedIn: "root" });
|
|
2332
|
+
CatalogService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogService_Factory() { return new CatalogService(i0.ɵɵinject(CatalogConnectorService), i0.ɵɵinject(CatalogConnectorAdapterService), i0.ɵɵinject(CatalogScreenConfigurationService), i0.ɵɵinject(CatalogSettingsService), i0.ɵɵinject(CatalogOptionsService), i0.ɵɵinject(CatalogImageService), i0.ɵɵinject(CatalogFilterService), i0.ɵɵinject(CatalogSearchService)); }, token: CatalogService, providedIn: "root" });
|
|
2275
2333
|
CatalogService.decorators = [
|
|
2276
2334
|
{ type: Injectable, args: [{
|
|
2277
2335
|
providedIn: 'root'
|
|
@@ -2280,6 +2338,7 @@ CatalogService.decorators = [
|
|
|
2280
2338
|
CatalogService.ctorParameters = () => [
|
|
2281
2339
|
{ type: CatalogConnectorService },
|
|
2282
2340
|
{ type: CatalogConnectorAdapterService },
|
|
2341
|
+
{ type: CatalogScreenConfigurationService },
|
|
2283
2342
|
{ type: CatalogSettingsService },
|
|
2284
2343
|
{ type: CatalogOptionsService },
|
|
2285
2344
|
{ type: CatalogImageService },
|
|
@@ -4299,11 +4358,12 @@ CatalogStockComparisonService.ctorParameters = () => [
|
|
|
4299
4358
|
];
|
|
4300
4359
|
|
|
4301
4360
|
class CatalogSearchComponent {
|
|
4302
|
-
constructor(_settingsService, _catalogService, _catalogSearchService, _catalogEventService, iconCacheService, _cfgService) {
|
|
4361
|
+
constructor(_settingsService, _catalogService, _catalogSearchService, _catalogEventService, _catalogAdapterService, iconCacheService, _cfgService) {
|
|
4303
4362
|
this._settingsService = _settingsService;
|
|
4304
4363
|
this._catalogService = _catalogService;
|
|
4305
4364
|
this._catalogSearchService = _catalogSearchService;
|
|
4306
4365
|
this._catalogEventService = _catalogEventService;
|
|
4366
|
+
this._catalogAdapterService = _catalogAdapterService;
|
|
4307
4367
|
this.iconCacheService = iconCacheService;
|
|
4308
4368
|
this._cfgService = _cfgService;
|
|
4309
4369
|
this.icons = IconEnum;
|
|
@@ -4322,6 +4382,7 @@ class CatalogSearchComponent {
|
|
|
4322
4382
|
this.onExternalSourceClick = new EventEmitter();
|
|
4323
4383
|
this.mode = 'tile';
|
|
4324
4384
|
this.showCategories = true;
|
|
4385
|
+
this.configLoaded = false;
|
|
4325
4386
|
this._subs = [];
|
|
4326
4387
|
}
|
|
4327
4388
|
set settings(value) {
|
|
@@ -4332,7 +4393,6 @@ class CatalogSearchComponent {
|
|
|
4332
4393
|
else {
|
|
4333
4394
|
this._settings = value;
|
|
4334
4395
|
}
|
|
4335
|
-
this._catalogService.init(this._settings, true);
|
|
4336
4396
|
}
|
|
4337
4397
|
}
|
|
4338
4398
|
showClass() {
|
|
@@ -4341,10 +4401,25 @@ class CatalogSearchComponent {
|
|
|
4341
4401
|
ngOnInit() {
|
|
4342
4402
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4343
4403
|
yield this._settingsService.initializeSettings();
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4404
|
+
yield this._catalogService.init(this._settings, true);
|
|
4405
|
+
this._subs.push(this._catalogAdapterService.controllerInitialized.subscribe((initialized) => {
|
|
4406
|
+
if (initialized) {
|
|
4407
|
+
this._cfgService.loadConfig().then((configs) => {
|
|
4408
|
+
if (configs && configs.length > 0) {
|
|
4409
|
+
this.configLoaded = true;
|
|
4410
|
+
let configObject = this._cfgService.getObjectConfigurationFor('resultSetting');
|
|
4411
|
+
if (configObject) {
|
|
4412
|
+
if (configObject.getDefaultBooleanValue()) {
|
|
4413
|
+
this.mode = 'tile';
|
|
4414
|
+
}
|
|
4415
|
+
else {
|
|
4416
|
+
this.mode = 'list';
|
|
4417
|
+
}
|
|
4418
|
+
}
|
|
4419
|
+
}
|
|
4420
|
+
});
|
|
4421
|
+
}
|
|
4422
|
+
}), this._catalogEventService.addArticleButtonClick.subscribe((article) => {
|
|
4348
4423
|
this.onAddArticleButtonClick.emit(article);
|
|
4349
4424
|
}), this._catalogEventService.arButtonClick.subscribe((article) => {
|
|
4350
4425
|
this.onArButtonClick.emit(article);
|
|
@@ -4354,30 +4429,7 @@ class CatalogSearchComponent {
|
|
|
4354
4429
|
this.onLookAtArticleButtonClick.emit(article);
|
|
4355
4430
|
}), this._catalogEventService.stockDetailsClick.subscribe((article) => {
|
|
4356
4431
|
this.onStockDetailsClick.emit(article);
|
|
4357
|
-
}), this._cfgService.configSet.subscribe((config) => {
|
|
4358
|
-
if (config && config.length > 0) {
|
|
4359
|
-
let configObject = this._cfgService.getObjectConfigurationFor('resultSetting');
|
|
4360
|
-
if (configObject) {
|
|
4361
|
-
if (configObject.getDefaultBooleanValue()) {
|
|
4362
|
-
this.mode = 'tile';
|
|
4363
|
-
}
|
|
4364
|
-
else {
|
|
4365
|
-
this.mode = 'list';
|
|
4366
|
-
}
|
|
4367
|
-
}
|
|
4368
|
-
}
|
|
4369
4432
|
}));
|
|
4370
|
-
if (this._cfgService.configObjects && this._cfgService.configObjects.length > 0) {
|
|
4371
|
-
let config = this._cfgService.getObjectConfigurationFor('resultSetting');
|
|
4372
|
-
if (config) {
|
|
4373
|
-
if (config.getDefaultBooleanValue()) {
|
|
4374
|
-
this.mode = 'tile';
|
|
4375
|
-
}
|
|
4376
|
-
else {
|
|
4377
|
-
this.mode = 'list';
|
|
4378
|
-
}
|
|
4379
|
-
}
|
|
4380
|
-
}
|
|
4381
4433
|
});
|
|
4382
4434
|
}
|
|
4383
4435
|
ngOnDestroy() {
|
|
@@ -4400,7 +4452,7 @@ CatalogSearchComponent.decorators = [
|
|
|
4400
4452
|
{ type: Component, args: [{
|
|
4401
4453
|
selector: 'co-catalog-search',
|
|
4402
4454
|
template: `
|
|
4403
|
-
<div class="catalog-search-wrapper">
|
|
4455
|
+
<div class="catalog-search-wrapper" *ngIf="configLoaded">
|
|
4404
4456
|
<ng-container *ngIf="tempFilter">
|
|
4405
4457
|
<div class="filter-content" @showHideFilter>
|
|
4406
4458
|
<div class="search-filter-panel-header-wrapper">
|
|
@@ -4462,12 +4514,14 @@ CatalogSearchComponent.decorators = [
|
|
|
4462
4514
|
<co-catalog-search-result-tile
|
|
4463
4515
|
[createFrozenArticle]="createFrozenArticle"
|
|
4464
4516
|
[isHomeDecoHub]="isHomeDecoHub"
|
|
4517
|
+
[externalSource]="externalSource"
|
|
4465
4518
|
></co-catalog-search-result-tile>
|
|
4466
4519
|
</ng-container>
|
|
4467
4520
|
<ng-container *ngIf="mode === 'list'">
|
|
4468
4521
|
<co-catalog-search-result-list
|
|
4469
4522
|
[createFrozenArticle]="createFrozenArticle"
|
|
4470
4523
|
[isHomeDecoHub]="isHomeDecoHub"
|
|
4524
|
+
[externalSource]="externalSource"
|
|
4471
4525
|
></co-catalog-search-result-list>
|
|
4472
4526
|
</ng-container>
|
|
4473
4527
|
<ng-container *ngIf="mode === 'grid'">
|
|
@@ -4485,17 +4539,20 @@ CatalogSearchComponent.decorators = [
|
|
|
4485
4539
|
CatalogSelectMultipleParameterizedCacheService,
|
|
4486
4540
|
CatalogSelectSingleParameterizedCacheService,
|
|
4487
4541
|
CatalogBusinessObjectCacheManagerService,
|
|
4542
|
+
CatalogService,
|
|
4543
|
+
CatalogScreenConfigurationService,
|
|
4488
4544
|
CatalogImageService,
|
|
4489
4545
|
CatalogFilterService,
|
|
4490
4546
|
CatalogOptionsService,
|
|
4491
4547
|
CatalogConnectorService,
|
|
4492
4548
|
CatalogConnectorAdapterService,
|
|
4493
|
-
CatalogService,
|
|
4494
4549
|
CatalogSettingsService,
|
|
4495
4550
|
CatalogSearchService,
|
|
4496
4551
|
CatalogStockService,
|
|
4497
4552
|
CatalogStockComparisonService,
|
|
4498
4553
|
CatalogStockTransferService,
|
|
4554
|
+
{ provide: BaseModuleService, useExisting: CatalogService },
|
|
4555
|
+
{ provide: BaseModuleScreenConfigService, useExisting: CatalogScreenConfigurationService },
|
|
4499
4556
|
{
|
|
4500
4557
|
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
4501
4558
|
useExisting: forwardRef(() => CatalogSearchComponent)
|
|
@@ -4516,8 +4573,9 @@ CatalogSearchComponent.ctorParameters = () => [
|
|
|
4516
4573
|
{ type: CatalogService, decorators: [{ type: Host }] },
|
|
4517
4574
|
{ type: CatalogSearchService, decorators: [{ type: Host }] },
|
|
4518
4575
|
{ type: CatalogEventService },
|
|
4576
|
+
{ type: CatalogConnectorAdapterService },
|
|
4519
4577
|
{ type: IconCacheService },
|
|
4520
|
-
{ type:
|
|
4578
|
+
{ type: CatalogScreenConfigurationService }
|
|
4521
4579
|
];
|
|
4522
4580
|
CatalogSearchComponent.propDecorators = {
|
|
4523
4581
|
settings: [{ type: Input }],
|
|
@@ -4531,6 +4589,7 @@ CatalogSearchComponent.propDecorators = {
|
|
|
4531
4589
|
tempFilter: [{ type: Input }],
|
|
4532
4590
|
showViewModes: [{ type: Input }],
|
|
4533
4591
|
isHomeDecoHub: [{ type: Input }],
|
|
4592
|
+
externalSource: [{ type: Input }],
|
|
4534
4593
|
settingsChange: [{ type: Output }],
|
|
4535
4594
|
onLookAtArticleButtonClick: [{ type: Output }],
|
|
4536
4595
|
onArButtonClick: [{ type: Output }],
|
|
@@ -4641,6 +4700,7 @@ CatalogSearchBaseComponent.ctorParameters = () => [
|
|
|
4641
4700
|
];
|
|
4642
4701
|
CatalogSearchBaseComponent.propDecorators = {
|
|
4643
4702
|
createFrozenArticle: [{ type: Input }],
|
|
4703
|
+
externalSource: [{ type: Input }],
|
|
4644
4704
|
onLookAtArticleButtonClick: [{ type: Output }],
|
|
4645
4705
|
onArButtonClick: [{ type: Output }],
|
|
4646
4706
|
onAddArticleButtonClick: [{ type: Output }],
|
|
@@ -4717,7 +4777,7 @@ class ArticleBaseComponent {
|
|
|
4717
4777
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4718
4778
|
event.stopPropagation();
|
|
4719
4779
|
if (this.createFrozenArticle) {
|
|
4720
|
-
const json = yield this._getJSONFromArticleObject(this.article);
|
|
4780
|
+
const json = yield this._getJSONFromArticleObject(this.article, !!this.externalSource);
|
|
4721
4781
|
this._appEventService.addArticleButtonClick.next(json);
|
|
4722
4782
|
this.onAddArticleButtonClick.emit(json);
|
|
4723
4783
|
}
|
|
@@ -4744,12 +4804,12 @@ class ArticleBaseComponent {
|
|
|
4744
4804
|
desc = desc.replace(/\r?\n|\r/, '');
|
|
4745
4805
|
return desc;
|
|
4746
4806
|
}
|
|
4747
|
-
_getJSONFromArticleObject(article) {
|
|
4807
|
+
_getJSONFromArticleObject(article, externalSource = false) {
|
|
4748
4808
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4749
4809
|
if (!article) {
|
|
4750
4810
|
return "";
|
|
4751
4811
|
}
|
|
4752
|
-
return yield this._iOne.getJsonArticleFlatTree(article.goodId, article.goodType, 1);
|
|
4812
|
+
return yield this._iOne.getJsonArticleFlatTree(article.goodId, article.goodType, 1, externalSource);
|
|
4753
4813
|
});
|
|
4754
4814
|
}
|
|
4755
4815
|
_detectChanges() {
|
|
@@ -4822,6 +4882,7 @@ ArticleBaseComponent.propDecorators = {
|
|
|
4822
4882
|
isSmallModus: [{ type: Input }, { type: HostBinding, args: ['class.small-modus',] }],
|
|
4823
4883
|
hasMagnifierButton: [{ type: Input }],
|
|
4824
4884
|
hasInfoButton: [{ type: Input }],
|
|
4885
|
+
externalSource: [{ type: Input }],
|
|
4825
4886
|
onLookAtArticleButtonClick: [{ type: Output }],
|
|
4826
4887
|
onArButtonClick: [{ type: Output }],
|
|
4827
4888
|
onAddArticleButtonClick: [{ type: Output }],
|
|
@@ -4949,6 +5010,7 @@ CatalogSearchResultTileComponent.decorators = [
|
|
|
4949
5010
|
[showing]="intersection.isIntersecting"
|
|
4950
5011
|
[article]="article"
|
|
4951
5012
|
[isHomeDecoHub]="isHomeDecoHub"
|
|
5013
|
+
[externalSource]="externalSource"
|
|
4952
5014
|
(onArticleClick)="onArticleClick.emit($event)"
|
|
4953
5015
|
(onAddArticleButtonClick)="onAddArticleButtonClick.emit($event)"
|
|
4954
5016
|
(onArButtonClick)="onArButtonClick.emit($event)"
|
|
@@ -5247,6 +5309,7 @@ CatalogSearchResultListComponent.decorators = [
|
|
|
5247
5309
|
[createFrozenArticle]="createFrozenArticle"
|
|
5248
5310
|
[showing]="intersection.isIntersecting"
|
|
5249
5311
|
[article]="article"
|
|
5312
|
+
[externalSource]="externalSource"
|
|
5250
5313
|
[isHomeDecoHub]="isHomeDecoHub"
|
|
5251
5314
|
(onArticleClick)="onArticleClick.emit($event)"
|
|
5252
5315
|
(onAddArticleButtonClick)="onAddArticleButtonClick.emit($event)"
|
|
@@ -5359,6 +5422,7 @@ class CatalogExternalSourceComponent {
|
|
|
5359
5422
|
this.isHomeDecoHub = false;
|
|
5360
5423
|
this.articleClick = new EventEmitter();
|
|
5361
5424
|
this.addArticleClick = new EventEmitter();
|
|
5425
|
+
this.lookAtArticleClick = new EventEmitter();
|
|
5362
5426
|
this.iFrameFeedbackReceived = new EventEmitter();
|
|
5363
5427
|
this.showClass = true;
|
|
5364
5428
|
this.showCatalog = false;
|
|
@@ -5376,7 +5440,7 @@ class CatalogExternalSourceComponent {
|
|
|
5376
5440
|
}
|
|
5377
5441
|
set externalCatalogStartupInfo(value) {
|
|
5378
5442
|
this._externalCatalogStartupInfo = value;
|
|
5379
|
-
this.
|
|
5443
|
+
this.externalSource = value.externalSource;
|
|
5380
5444
|
this.loaded = false;
|
|
5381
5445
|
this._prepareExternalSource();
|
|
5382
5446
|
}
|
|
@@ -5390,7 +5454,7 @@ class CatalogExternalSourceComponent {
|
|
|
5390
5454
|
quantity: 1,
|
|
5391
5455
|
article: article,
|
|
5392
5456
|
catalogDefinition: this.catalogDefinition,
|
|
5393
|
-
externalSource: this.
|
|
5457
|
+
externalSource: this.externalSource
|
|
5394
5458
|
});
|
|
5395
5459
|
}
|
|
5396
5460
|
}));
|
|
@@ -5401,12 +5465,12 @@ class CatalogExternalSourceComponent {
|
|
|
5401
5465
|
article: article,
|
|
5402
5466
|
settings: { name: this.name, settings: this.externalSettings },
|
|
5403
5467
|
catalogDefinition: this.catalogDefinition,
|
|
5404
|
-
externalSource: this.
|
|
5468
|
+
externalSource: this.externalSource
|
|
5405
5469
|
});
|
|
5406
5470
|
}
|
|
5407
5471
|
}
|
|
5408
5472
|
receiveMessage(event) {
|
|
5409
|
-
if (this.
|
|
5473
|
+
if (this.externalSource.type !== '3DIMERCE')
|
|
5410
5474
|
if (typeof event.data === 'string') {
|
|
5411
5475
|
this.iFrameFeedbackReceived.emit(event.data);
|
|
5412
5476
|
}
|
|
@@ -5421,10 +5485,10 @@ class CatalogExternalSourceComponent {
|
|
|
5421
5485
|
}
|
|
5422
5486
|
fetchAndCombineThreeDimerseData(hash) {
|
|
5423
5487
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5424
|
-
const customerName = this.
|
|
5488
|
+
const customerName = this.externalSource.username;
|
|
5425
5489
|
// two main api urls
|
|
5426
|
-
const configurationUrl = this.
|
|
5427
|
-
const priceDataUrl = this.
|
|
5490
|
+
const configurationUrl = this.externalSource.domain + '/configurationData/' + hash;
|
|
5491
|
+
const priceDataUrl = this.externalSource.domain + '/rules/api/' + customerName.toLowerCase() + '/' + hash;
|
|
5428
5492
|
//test setup for local testing
|
|
5429
5493
|
//const configurationUrl: string = "https://bertplantagie.platformapi-accept.3dimerce.com/configurationData/8eb5b35697c96716d3e253294344d98e4dcdcb68969c288189d45829164e3177";
|
|
5430
5494
|
//console.log(configurationUrl);
|
|
@@ -5509,36 +5573,36 @@ class CatalogExternalSourceComponent {
|
|
|
5509
5573
|
}
|
|
5510
5574
|
_prepareExternalSource() {
|
|
5511
5575
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5512
|
-
if (!this.
|
|
5576
|
+
if (!this.externalSource) {
|
|
5513
5577
|
return;
|
|
5514
5578
|
}
|
|
5515
5579
|
this.externalUrl = undefined;
|
|
5516
5580
|
this.externalSettings = {};
|
|
5517
|
-
if (this.
|
|
5581
|
+
if (this.externalSource.type === 'CATF') {
|
|
5518
5582
|
// get bundle settings from external source
|
|
5519
|
-
const bundleSettings = yield this._catalogConnectorService.getCatalogBundleSettings(this.
|
|
5583
|
+
const bundleSettings = yield this._catalogConnectorService.getCatalogBundleSettings(this.externalSource.url, parseInt(this.externalSource.schema));
|
|
5520
5584
|
this.externalSettings = JSON.parse(bundleSettings);
|
|
5521
5585
|
if (this.options) {
|
|
5522
5586
|
this.externalSettings.options = this.options;
|
|
5523
5587
|
}
|
|
5524
|
-
if (this.
|
|
5525
|
-
this.externalSettings.username = this.
|
|
5526
|
-
this.externalSettings.password = this.
|
|
5588
|
+
if (this.externalSource.username && this.externalSource.password) {
|
|
5589
|
+
this.externalSettings.username = this.externalSource.username;
|
|
5590
|
+
this.externalSettings.password = this.externalSource.password;
|
|
5527
5591
|
}
|
|
5528
5592
|
// finally show the catalog
|
|
5529
5593
|
this.showCatalog = true;
|
|
5530
5594
|
}
|
|
5531
5595
|
else {
|
|
5532
|
-
if (this.
|
|
5596
|
+
if (this.externalSource.type !== ExternalCatalogTypes.Webshop && this.externalSource.type !== ExternalCatalogTypes.ThreeDimerse) {
|
|
5533
5597
|
this.externalUrl = this._externalCatalogStartupInfo.apiUrl;
|
|
5534
|
-
if (this.
|
|
5598
|
+
if (this.externalSource.type === ExternalCatalogTypes.Vadain) {
|
|
5535
5599
|
this.username = this._externalCatalogStartupInfo.username;
|
|
5536
5600
|
this.password = this._externalCatalogStartupInfo.password;
|
|
5537
5601
|
this.externalOrderNr = this._externalCatalogStartupInfo.orderId;
|
|
5538
5602
|
}
|
|
5539
5603
|
}
|
|
5540
5604
|
else {
|
|
5541
|
-
this.externalUrl = this.
|
|
5605
|
+
this.externalUrl = this.externalSource.url;
|
|
5542
5606
|
}
|
|
5543
5607
|
this.safeUrl = this._sanitizer.bypassSecurityTrustResourceUrl(this.externalUrl);
|
|
5544
5608
|
this.showCatalog = false;
|
|
@@ -5558,6 +5622,7 @@ CatalogExternalSourceComponent.decorators = [
|
|
|
5558
5622
|
<ng-container *ngIf="showCatalog">
|
|
5559
5623
|
<co-catalog-search
|
|
5560
5624
|
[(settings)]="externalSettings"
|
|
5625
|
+
[externalSource]="externalSource"
|
|
5561
5626
|
[title]="title"
|
|
5562
5627
|
[subTitle]="subTitle"
|
|
5563
5628
|
[searchPlaceholder]="searchPlaceholder"
|
|
@@ -5598,6 +5663,7 @@ CatalogExternalSourceComponent.propDecorators = {
|
|
|
5598
5663
|
name: [{ type: Input }],
|
|
5599
5664
|
articleClick: [{ type: Output }],
|
|
5600
5665
|
addArticleClick: [{ type: Output }],
|
|
5666
|
+
lookAtArticleClick: [{ type: Output }],
|
|
5601
5667
|
iFrameFeedbackReceived: [{ type: Output }],
|
|
5602
5668
|
showClass: [{ type: HostBinding, args: ['class.co-catalog-external-source',] }]
|
|
5603
5669
|
};
|
|
@@ -6375,5 +6441,5 @@ CatalogNavigationService.ctorParameters = () => [
|
|
|
6375
6441
|
* Generated bundle index. Do not edit.
|
|
6376
6442
|
*/
|
|
6377
6443
|
|
|
6378
|
-
export { CatalogArticleListModule, CatalogArticleTileModule, CatalogBusinessObjectCacheManagerService, CatalogCategoriesModule, CatalogConnectorAdapterService, CatalogConnectorService, CatalogEventService, CatalogExternalSourceModule, CatalogExternalSourcesModule, CatalogFilterModule, CatalogFilterService, CatalogImageService, CatalogNavigationModule, CatalogNavigationService, CatalogOptionsService, CatalogSearchHeaderModule, CatalogSearchModule, CatalogSearchResultListModule, CatalogSearchResultTileModule, CatalogSearchService, CatalogSelectMultipleCacheService, CatalogSelectMultipleParameterizedCacheService, CatalogSelectSingleCacheService, CatalogSelectSingleParameterizedCacheService, CatalogService, CatalogSettingsService, CatalogStockComparisonListModule, CatalogStockComparisonService, CatalogStockComparisonTileModule, CatalogStockOverviewListModule, CatalogStockOverviewTileModule, CatalogStockService, CatalogStockTransferService, CatalogWarehouseTransfersListModule, CatalogWarehouseTransfersTileModule, StockView, Version, CatalogFilterCategoriesModule as ɵa, PipeModule as ɵb,
|
|
6444
|
+
export { CatalogArticleListModule, CatalogArticleTileModule, CatalogBusinessObjectCacheManagerService, CatalogCategoriesModule, CatalogConnectorAdapterService, CatalogConnectorService, CatalogEventService, CatalogExternalSourceModule, CatalogExternalSourcesModule, CatalogFilterModule, CatalogFilterService, CatalogImageService, CatalogNavigationModule, CatalogNavigationService, CatalogOptionsService, CatalogSearchHeaderModule, CatalogSearchModule, CatalogSearchResultListModule, CatalogSearchResultTileModule, CatalogSearchService, CatalogSelectMultipleCacheService, CatalogSelectMultipleParameterizedCacheService, CatalogSelectSingleCacheService, CatalogSelectSingleParameterizedCacheService, CatalogService, CatalogSettingsService, CatalogStockComparisonListModule, CatalogStockComparisonService, CatalogStockComparisonTileModule, CatalogStockOverviewListModule, CatalogStockOverviewTileModule, CatalogStockService, CatalogStockTransferService, CatalogWarehouseTransfersListModule, CatalogWarehouseTransfersTileModule, StockView, Version, CatalogFilterCategoriesModule as ɵa, PipeModule as ɵb, VisibilityObserverMasterDirective as ɵba, VisibilityObserverDirective as ɵbb, CatalogSearchResultTileComponent as ɵbc, CatalogSearchBaseComponent as ɵbd, CatalogArticleListComponent as ɵbe, CatalogSearchResultListComponent as ɵbf, CatalogSearchComponent as ɵbg, CatalogExternalSourceComponent as ɵbh, CatalogStockOverviewTileComponent as ɵbi, CatalogStockOverviewListComponent as ɵbj, CatalogStockComparisonTileComponent as ɵbk, CatalogStockComparisonListComponent as ɵbl, CatalogWarehouseTransfersTileComponent as ɵbm, CatalogWarehouseTransfersListComponent as ɵbn, LocalizePipe as ɵc, DictionaryService as ɵd, CatalogFilterCategoriesComponent as ɵe, CatalogFilterContentGeneralModule as ɵf, CatalogFilterItemModule as ɵg, CatalogFilterItemComponent as ɵh, CacheField as ɵi, CatalogFilterContentGeneralComponent as ɵj, IconCacheService as ɵk, CatalogFilterContentPurchaseModule as ɵl, CatalogFilterContentPurchaseComponent as ɵm, CatalogFilterContentLogisticsModule as ɵn, CatalogFilterContentLogisticsComponent as ɵo, CatalogScreenConfigurationService as ɵp, CatalogFilterComponent as ɵq, ResponsiveTextModule as ɵr, ResponsiveTextComponent as ɵs, CatalogCategoriesComponent as ɵt, CatalogExternalSourcesComponent as ɵu, CatalogNavigationComponent as ɵv, CatalogSearchHeaderComponent as ɵw, CatalogArticleTileComponent as ɵx, ArticleBaseComponent as ɵy, VisibilityObserverModule as ɵz };
|
|
6379
6445
|
//# sourceMappingURL=colijnit-catalog.js.map
|