@colijnit/catalog 255.1.4 → 255.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 +564 -647
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog.d.ts +8 -8
- package/colijnit-catalog.metadata.json +1 -1
- package/esm2015/colijnit-catalog.js +9 -9
- package/esm2015/lib/cache/service/catalog-business-object-cache-manager.service.js +142 -0
- package/esm2015/lib/cache/service/catalog-select-multiple-cache.service.js +38 -0
- package/esm2015/lib/cache/service/catalog-select-multiple-parameterized-cache.service.js +47 -0
- package/esm2015/lib/cache/service/catalog-select-single-cache.service.js +30 -0
- package/esm2015/lib/cache/service/catalog-select-single-parameterized-cache.service.js +47 -0
- package/esm2015/lib/catalog-version.js +3 -3
- package/esm2015/lib/component/catalog-external-source/catalog-external-source.module.js +2 -2
- package/esm2015/lib/component/catalog-external-sources/catalog-external-sources.component.js +7 -5
- package/esm2015/lib/component/catalog-search/catalog-search.component.js +11 -13
- package/esm2015/lib/component/catalog-search/catalog-search.module.js +1 -54
- package/esm2015/lib/component/catalog-stock-overview-list/catalog-stock-overview-list.component.js +6 -6
- package/esm2015/lib/component/catalog-stock-overview-tile/catalog-stock-overview-tile.component.js +4 -4
- package/esm2015/lib/component/catalog-warehouse-transfers-list/catalog-warehouse-transfers-list.component.js +2 -2
- package/esm2015/lib/component/catalog-warehouse-transfers-tile/catalog-warehouse-transfers-tile.component.js +4 -4
- package/esm2015/lib/service/catalog-connector-adapter.service.js +6 -2
- package/esm2015/lib/service/catalog-connector.service.js +19 -10
- package/esm2015/lib/service/catalog-filter.service.js +7 -2
- package/esm2015/lib/service/catalog-image.service.js +7 -2
- package/esm2015/lib/service/catalog-options.service.js +8 -2
- package/esm2015/lib/service/catalog-search.service.js +11 -2
- package/esm2015/lib/service/catalog-settings.service.js +7 -2
- package/esm2015/lib/service/catalog-stock-comparison.service.js +4 -4
- package/esm2015/lib/service/catalog-stock-transfer.service.js +4 -4
- package/esm2015/lib/service/catalog-stock.service.js +4 -4
- package/esm2015/lib/service/catalog.service.js +13 -2
- package/esm2015/public_api.js +6 -6
- package/fesm2015/colijnit-catalog.js +479 -469
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/cache/service/{business-object-cache-manager.service.d.ts → catalog-business-object-cache-manager.service.d.ts} +1 -1
- package/lib/cache/service/{select-multiple-cache.service.d.ts → catalog-select-multiple-cache.service.d.ts} +3 -3
- package/lib/cache/service/{select-multiple-parameterized-cache.service.d.ts → catalog-select-multiple-parameterized-cache.service.d.ts} +3 -3
- package/lib/cache/service/{select-single-cache.service.d.ts → catalog-select-single-cache.service.d.ts} +3 -3
- package/lib/cache/service/{select-single-parameterized-cache.service.d.ts → catalog-select-single-parameterized-cache.service.d.ts} +3 -3
- package/lib/component/catalog-search/catalog-search.module.d.ts +0 -2
- package/lib/service/catalog-connector.service.d.ts +5 -5
- package/package.json +3 -3
- package/public_api.d.ts +5 -5
- package/esm2015/lib/cache/service/business-object-cache-manager.service.js +0 -138
- package/esm2015/lib/cache/service/select-multiple-cache.service.js +0 -33
- package/esm2015/lib/cache/service/select-multiple-parameterized-cache.service.js +0 -42
- package/esm2015/lib/cache/service/select-single-cache.service.js +0 -25
- package/esm2015/lib/cache/service/select-single-parameterized-cache.service.js +0 -42
|
@@ -53,8 +53,8 @@ class Version {
|
|
|
53
53
|
constructor() {
|
|
54
54
|
this.name = "@colijnit/catalog";
|
|
55
55
|
this.description = "iOne Catalog module based on Angular 12";
|
|
56
|
-
this.symVer = "255.1.
|
|
57
|
-
this.publishDate = "
|
|
56
|
+
this.symVer = "255.1.6";
|
|
57
|
+
this.publishDate = "2-9-2024 16:25:22";
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -266,8 +266,11 @@ class CatalogSettingsService {
|
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
+
CatalogSettingsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogSettingsService_Factory() { return new CatalogSettingsService(i0.ɵɵinject(DictionaryService)); }, token: CatalogSettingsService, providedIn: "root" });
|
|
269
270
|
CatalogSettingsService.decorators = [
|
|
270
|
-
{ type: Injectable
|
|
271
|
+
{ type: Injectable, args: [{
|
|
272
|
+
providedIn: 'root'
|
|
273
|
+
},] }
|
|
271
274
|
];
|
|
272
275
|
CatalogSettingsService.ctorParameters = () => [
|
|
273
276
|
{ type: DictionaryService }
|
|
@@ -939,8 +942,11 @@ class CatalogConnectorAdapterService {
|
|
|
939
942
|
this._shouldShowLoader = showLoader;
|
|
940
943
|
}
|
|
941
944
|
}
|
|
945
|
+
CatalogConnectorAdapterService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogConnectorAdapterService_Factory() { return new CatalogConnectorAdapterService(); }, token: CatalogConnectorAdapterService, providedIn: "root" });
|
|
942
946
|
CatalogConnectorAdapterService.decorators = [
|
|
943
|
-
{ type: Injectable
|
|
947
|
+
{ type: Injectable, args: [{
|
|
948
|
+
providedIn: 'root'
|
|
949
|
+
},] }
|
|
944
950
|
];
|
|
945
951
|
|
|
946
952
|
// 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.
|
|
@@ -1079,7 +1085,7 @@ class ParameterCacheField {
|
|
|
1079
1085
|
*
|
|
1080
1086
|
* All caches are reset when the user logs out.
|
|
1081
1087
|
*/
|
|
1082
|
-
class
|
|
1088
|
+
class CatalogBusinessObjectCacheManagerService {
|
|
1083
1089
|
constructor() {
|
|
1084
1090
|
// emits after this BO cache manager has been reset (e.g. after user logs out)
|
|
1085
1091
|
this.reset = new Subject();
|
|
@@ -1106,7 +1112,7 @@ class BusinessObjectCacheManagerService {
|
|
|
1106
1112
|
this._selectMultipleCache.set(key, newCacheItem);
|
|
1107
1113
|
return newCacheItem;
|
|
1108
1114
|
}
|
|
1109
|
-
addNewSelectSingleCacheItem(key, id =
|
|
1115
|
+
addNewSelectSingleCacheItem(key, id = CatalogBusinessObjectCacheManagerService._NullBoId, loadFunction, overrideOld = false) {
|
|
1110
1116
|
const cacheId = id.toString();
|
|
1111
1117
|
if (!overrideOld && this.hasSingleCacheItem(key, id)) {
|
|
1112
1118
|
return;
|
|
@@ -1146,7 +1152,7 @@ class BusinessObjectCacheManagerService {
|
|
|
1146
1152
|
hasSelectMultipleCacheItem(key) {
|
|
1147
1153
|
return this._selectMultipleCache.has(key);
|
|
1148
1154
|
}
|
|
1149
|
-
hasSingleCacheItem(key, id =
|
|
1155
|
+
hasSingleCacheItem(key, id = CatalogBusinessObjectCacheManagerService._NullBoId) {
|
|
1150
1156
|
const cacheId = id.toString();
|
|
1151
1157
|
return this._selectSingleCache.has(key) && !!this._selectSingleCache.get(key)[cacheId];
|
|
1152
1158
|
}
|
|
@@ -1160,7 +1166,7 @@ class BusinessObjectCacheManagerService {
|
|
|
1160
1166
|
getSelectMultipleCacheItem(key) {
|
|
1161
1167
|
return this._selectMultipleCache.get(key);
|
|
1162
1168
|
}
|
|
1163
|
-
getSingleCacheItem(key, id =
|
|
1169
|
+
getSingleCacheItem(key, id = CatalogBusinessObjectCacheManagerService._NullBoId) {
|
|
1164
1170
|
const cacheId = id.toString();
|
|
1165
1171
|
return this._selectSingleCache.has(key) && this._selectSingleCache.get(key)[cacheId];
|
|
1166
1172
|
}
|
|
@@ -1197,12 +1203,15 @@ class BusinessObjectCacheManagerService {
|
|
|
1197
1203
|
this.reset.next();
|
|
1198
1204
|
}
|
|
1199
1205
|
}
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1206
|
+
CatalogBusinessObjectCacheManagerService._NullBoId = -1;
|
|
1207
|
+
CatalogBusinessObjectCacheManagerService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogBusinessObjectCacheManagerService_Factory() { return new CatalogBusinessObjectCacheManagerService(); }, token: CatalogBusinessObjectCacheManagerService, providedIn: "root" });
|
|
1208
|
+
CatalogBusinessObjectCacheManagerService.decorators = [
|
|
1209
|
+
{ type: Injectable, args: [{
|
|
1210
|
+
providedIn: 'root'
|
|
1211
|
+
},] }
|
|
1203
1212
|
];
|
|
1204
1213
|
|
|
1205
|
-
class
|
|
1214
|
+
class CatalogSelectSingleCacheService {
|
|
1206
1215
|
constructor(_boCacheManager) {
|
|
1207
1216
|
this._boCacheManager = _boCacheManager;
|
|
1208
1217
|
}
|
|
@@ -1218,14 +1227,17 @@ class SelectSingleCacheService {
|
|
|
1218
1227
|
return this._boCacheManager.addNewSelectSingleCacheItem(clazz, sourceId, loadFunction);
|
|
1219
1228
|
}
|
|
1220
1229
|
}
|
|
1221
|
-
|
|
1222
|
-
|
|
1230
|
+
CatalogSelectSingleCacheService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogSelectSingleCacheService_Factory() { return new CatalogSelectSingleCacheService(i0.ɵɵinject(CatalogBusinessObjectCacheManagerService)); }, token: CatalogSelectSingleCacheService, providedIn: "root" });
|
|
1231
|
+
CatalogSelectSingleCacheService.decorators = [
|
|
1232
|
+
{ type: Injectable, args: [{
|
|
1233
|
+
providedIn: 'root'
|
|
1234
|
+
},] }
|
|
1223
1235
|
];
|
|
1224
|
-
|
|
1225
|
-
{ type:
|
|
1236
|
+
CatalogSelectSingleCacheService.ctorParameters = () => [
|
|
1237
|
+
{ type: CatalogBusinessObjectCacheManagerService }
|
|
1226
1238
|
];
|
|
1227
1239
|
|
|
1228
|
-
class
|
|
1240
|
+
class CatalogSelectMultipleCacheService {
|
|
1229
1241
|
constructor(_boCacheManager) {
|
|
1230
1242
|
this._boCacheManager = _boCacheManager;
|
|
1231
1243
|
}
|
|
@@ -1247,16 +1259,19 @@ class SelectMultipleCacheService {
|
|
|
1247
1259
|
return this._boCacheManager.addNewSelectMultipleCacheItem(clazz, loadFunction);
|
|
1248
1260
|
}
|
|
1249
1261
|
}
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1262
|
+
CatalogSelectMultipleCacheService._NullCache = new CacheField();
|
|
1263
|
+
CatalogSelectMultipleCacheService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogSelectMultipleCacheService_Factory() { return new CatalogSelectMultipleCacheService(i0.ɵɵinject(CatalogBusinessObjectCacheManagerService)); }, token: CatalogSelectMultipleCacheService, providedIn: "root" });
|
|
1264
|
+
CatalogSelectMultipleCacheService.decorators = [
|
|
1265
|
+
{ type: Injectable, args: [{
|
|
1266
|
+
providedIn: 'root'
|
|
1267
|
+
},] }
|
|
1253
1268
|
];
|
|
1254
|
-
|
|
1255
|
-
{ type:
|
|
1269
|
+
CatalogSelectMultipleCacheService.ctorParameters = () => [
|
|
1270
|
+
{ type: CatalogBusinessObjectCacheManagerService }
|
|
1256
1271
|
];
|
|
1257
1272
|
|
|
1258
1273
|
// service resonsible for filling the global BO cache manager service with parameterized select multiple cache items
|
|
1259
|
-
class
|
|
1274
|
+
class CatalogSelectMultipleParameterizedCacheService {
|
|
1260
1275
|
constructor(_boCacheManager) {
|
|
1261
1276
|
this._boCacheManager = _boCacheManager;
|
|
1262
1277
|
// emits after this select multiple parameterized cache service has been reset (e.g. after user logs out)
|
|
@@ -1287,15 +1302,18 @@ class SelectMultipleParameterizedCacheService {
|
|
|
1287
1302
|
return this._boCacheManager.addNewSelectMultipleParameterizedCacheItem(clazz, loadFunction);
|
|
1288
1303
|
}
|
|
1289
1304
|
}
|
|
1290
|
-
|
|
1291
|
-
|
|
1305
|
+
CatalogSelectMultipleParameterizedCacheService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogSelectMultipleParameterizedCacheService_Factory() { return new CatalogSelectMultipleParameterizedCacheService(i0.ɵɵinject(CatalogBusinessObjectCacheManagerService)); }, token: CatalogSelectMultipleParameterizedCacheService, providedIn: "root" });
|
|
1306
|
+
CatalogSelectMultipleParameterizedCacheService.decorators = [
|
|
1307
|
+
{ type: Injectable, args: [{
|
|
1308
|
+
providedIn: 'root'
|
|
1309
|
+
},] }
|
|
1292
1310
|
];
|
|
1293
|
-
|
|
1294
|
-
{ type:
|
|
1311
|
+
CatalogSelectMultipleParameterizedCacheService.ctorParameters = () => [
|
|
1312
|
+
{ type: CatalogBusinessObjectCacheManagerService }
|
|
1295
1313
|
];
|
|
1296
1314
|
|
|
1297
1315
|
// service resonsible for filling the global BO cache manager service with parameterized select single cache items
|
|
1298
|
-
class
|
|
1316
|
+
class CatalogSelectSingleParameterizedCacheService {
|
|
1299
1317
|
constructor(_boCacheManager) {
|
|
1300
1318
|
this._boCacheManager = _boCacheManager;
|
|
1301
1319
|
// emits after this select single parameterized cache service has been reset (e.g. after user logs out)
|
|
@@ -1326,11 +1344,14 @@ class SelectSingleParameterizedCacheService {
|
|
|
1326
1344
|
return this._boCacheManager.addNewSelectSingleParameterizedCacheItem(clazz, loadFunction);
|
|
1327
1345
|
}
|
|
1328
1346
|
}
|
|
1329
|
-
|
|
1330
|
-
|
|
1347
|
+
CatalogSelectSingleParameterizedCacheService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogSelectSingleParameterizedCacheService_Factory() { return new CatalogSelectSingleParameterizedCacheService(i0.ɵɵinject(CatalogBusinessObjectCacheManagerService)); }, token: CatalogSelectSingleParameterizedCacheService, providedIn: "root" });
|
|
1348
|
+
CatalogSelectSingleParameterizedCacheService.decorators = [
|
|
1349
|
+
{ type: Injectable, args: [{
|
|
1350
|
+
providedIn: 'root'
|
|
1351
|
+
},] }
|
|
1331
1352
|
];
|
|
1332
|
-
|
|
1333
|
-
{ type:
|
|
1353
|
+
CatalogSelectSingleParameterizedCacheService.ctorParameters = () => [
|
|
1354
|
+
{ type: CatalogBusinessObjectCacheManagerService }
|
|
1334
1355
|
];
|
|
1335
1356
|
|
|
1336
1357
|
class CatalogConnectorService {
|
|
@@ -1579,15 +1600,18 @@ class CatalogConnectorService {
|
|
|
1579
1600
|
});
|
|
1580
1601
|
}
|
|
1581
1602
|
}
|
|
1603
|
+
CatalogConnectorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogConnectorService_Factory() { return new CatalogConnectorService(i0.ɵɵinject(CatalogConnectorAdapterService), i0.ɵɵinject(CatalogSelectSingleCacheService), i0.ɵɵinject(CatalogSelectMultipleCacheService), i0.ɵɵinject(CatalogSelectMultipleParameterizedCacheService), i0.ɵɵinject(CatalogSelectSingleParameterizedCacheService)); }, token: CatalogConnectorService, providedIn: "root" });
|
|
1582
1604
|
CatalogConnectorService.decorators = [
|
|
1583
|
-
{ type: Injectable
|
|
1605
|
+
{ type: Injectable, args: [{
|
|
1606
|
+
providedIn: 'root'
|
|
1607
|
+
},] }
|
|
1584
1608
|
];
|
|
1585
1609
|
CatalogConnectorService.ctorParameters = () => [
|
|
1586
1610
|
{ type: CatalogConnectorAdapterService },
|
|
1587
|
-
{ type:
|
|
1588
|
-
{ type:
|
|
1589
|
-
{ type:
|
|
1590
|
-
{ type:
|
|
1611
|
+
{ type: CatalogSelectSingleCacheService },
|
|
1612
|
+
{ type: CatalogSelectMultipleCacheService },
|
|
1613
|
+
{ type: CatalogSelectMultipleParameterizedCacheService },
|
|
1614
|
+
{ type: CatalogSelectSingleParameterizedCacheService }
|
|
1591
1615
|
];
|
|
1592
1616
|
|
|
1593
1617
|
class CatalogOptionsService {
|
|
@@ -1661,8 +1685,11 @@ class CatalogOptionsService {
|
|
|
1661
1685
|
return this._parameters;
|
|
1662
1686
|
}
|
|
1663
1687
|
}
|
|
1688
|
+
CatalogOptionsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogOptionsService_Factory() { return new CatalogOptionsService(i0.ɵɵinject(DictionaryService), i0.ɵɵinject(CatalogSettingsService)); }, token: CatalogOptionsService, providedIn: "root" });
|
|
1664
1689
|
CatalogOptionsService.decorators = [
|
|
1665
|
-
{ type: Injectable
|
|
1690
|
+
{ type: Injectable, args: [{
|
|
1691
|
+
providedIn: 'root'
|
|
1692
|
+
},] }
|
|
1666
1693
|
];
|
|
1667
1694
|
CatalogOptionsService.ctorParameters = () => [
|
|
1668
1695
|
{ type: DictionaryService },
|
|
@@ -1778,8 +1805,11 @@ class CatalogImageService {
|
|
|
1778
1805
|
}
|
|
1779
1806
|
}
|
|
1780
1807
|
}
|
|
1808
|
+
CatalogImageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogImageService_Factory() { return new CatalogImageService(i0.ɵɵinject(CatalogConnectorService)); }, token: CatalogImageService, providedIn: "root" });
|
|
1781
1809
|
CatalogImageService.decorators = [
|
|
1782
|
-
{ type: Injectable
|
|
1810
|
+
{ type: Injectable, args: [{
|
|
1811
|
+
providedIn: 'root'
|
|
1812
|
+
},] }
|
|
1783
1813
|
];
|
|
1784
1814
|
CatalogImageService.ctorParameters = () => [
|
|
1785
1815
|
{ type: CatalogConnectorService }
|
|
@@ -1917,8 +1947,11 @@ class CatalogFilterService {
|
|
|
1917
1947
|
return returnCollection;
|
|
1918
1948
|
}
|
|
1919
1949
|
}
|
|
1950
|
+
CatalogFilterService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogFilterService_Factory() { return new CatalogFilterService(i0.ɵɵinject(CatalogConnectorService)); }, token: CatalogFilterService, providedIn: "root" });
|
|
1920
1951
|
CatalogFilterService.decorators = [
|
|
1921
|
-
{ type: Injectable
|
|
1952
|
+
{ type: Injectable, args: [{
|
|
1953
|
+
providedIn: 'root'
|
|
1954
|
+
},] }
|
|
1922
1955
|
];
|
|
1923
1956
|
CatalogFilterService.ctorParameters = () => [
|
|
1924
1957
|
{ type: CatalogConnectorService }
|
|
@@ -2050,8 +2083,11 @@ class CatalogSearchService {
|
|
|
2050
2083
|
this.searchRequest.general = null;
|
|
2051
2084
|
}
|
|
2052
2085
|
}
|
|
2086
|
+
CatalogSearchService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogSearchService_Factory() { return new CatalogSearchService(i0.ɵɵinject(CatalogFilterService), i0.ɵɵinject(CatalogConnectorService), i0.ɵɵinject(CatalogConnectorAdapterService), i0.ɵɵinject(CatalogSettingsService), i0.ɵɵinject(CatalogOptionsService)); }, token: CatalogSearchService, providedIn: "root" });
|
|
2053
2087
|
CatalogSearchService.decorators = [
|
|
2054
|
-
{ type: Injectable
|
|
2088
|
+
{ type: Injectable, args: [{
|
|
2089
|
+
providedIn: 'root'
|
|
2090
|
+
},] }
|
|
2055
2091
|
];
|
|
2056
2092
|
CatalogSearchService.ctorParameters = () => [
|
|
2057
2093
|
{ type: CatalogFilterService },
|
|
@@ -2218,8 +2254,11 @@ class CatalogService {
|
|
|
2218
2254
|
this.activeStockViewSubject.next(value);
|
|
2219
2255
|
}
|
|
2220
2256
|
}
|
|
2257
|
+
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" });
|
|
2221
2258
|
CatalogService.decorators = [
|
|
2222
|
-
{ type: Injectable
|
|
2259
|
+
{ type: Injectable, args: [{
|
|
2260
|
+
providedIn: 'root'
|
|
2261
|
+
},] }
|
|
2223
2262
|
];
|
|
2224
2263
|
CatalogService.ctorParameters = () => [
|
|
2225
2264
|
{ type: CatalogConnectorService },
|
|
@@ -3863,10 +3902,12 @@ class CatalogExternalSourcesComponent {
|
|
|
3863
3902
|
ngOnInit() {
|
|
3864
3903
|
this.externalSourceViewModels.length = 0;
|
|
3865
3904
|
this._catalogConnectorService.getCatalogDefinitions().then((defs) => __awaiter(this, void 0, void 0, function* () {
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3905
|
+
if (defs) {
|
|
3906
|
+
for (let i = 0; i < defs.length; i++) {
|
|
3907
|
+
this._imageService.getExternalSourceImage(defs[i]);
|
|
3908
|
+
const viewModel = new ExternalSourceViewmodel(defs[i], defs[i].externalSourceId ? yield this._catalogConnectorService.getExternalSource(defs[i].externalSourceId, false) : new ExternalSource());
|
|
3909
|
+
this.externalSourceViewModels.push(viewModel);
|
|
3910
|
+
}
|
|
3870
3911
|
}
|
|
3871
3912
|
}));
|
|
3872
3913
|
}
|
|
@@ -3976,7 +4017,7 @@ class CatalogStockService {
|
|
|
3976
4017
|
lowerBound = 1;
|
|
3977
4018
|
}
|
|
3978
4019
|
this.searchRequest.paging = new PagingParameters(lowerBound, lowerBound + this.articlesPerPage - 1, this.articlesPerPage);
|
|
3979
|
-
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate:
|
|
4020
|
+
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate: null, rangeWarehouse: null, rangeStockStatus: null });
|
|
3980
4021
|
this._catalogConnectorService.getArticlesForStockSearchTile(this.stockSearchRequest).then((result) => {
|
|
3981
4022
|
this.tileArticles = result && result.articles ? result.articles : [];
|
|
3982
4023
|
this.resultCount = result && result.count ? result.count : 0;
|
|
@@ -3993,7 +4034,7 @@ class CatalogStockService {
|
|
|
3993
4034
|
lowerBound = 1;
|
|
3994
4035
|
}
|
|
3995
4036
|
this.searchRequest.paging = new PagingParameters(lowerBound, lowerBound + this.articlesPerPage - 1, this.articlesPerPage);
|
|
3996
|
-
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate:
|
|
4037
|
+
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate: null, rangeWarehouse: null, rangeStockStatus: null });
|
|
3997
4038
|
this._catalogConnectorService.getArticlesForStockSearchGrid(this.stockSearchRequest).then((result) => {
|
|
3998
4039
|
this.gridArticles = result && result.articles ? result.articles : [];
|
|
3999
4040
|
this.resultCount = result && result.count ? result.count : 0;
|
|
@@ -4001,7 +4042,7 @@ class CatalogStockService {
|
|
|
4001
4042
|
});
|
|
4002
4043
|
}
|
|
4003
4044
|
getArticleGridViewExcelFile() {
|
|
4004
|
-
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate:
|
|
4045
|
+
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate: null, rangeWarehouse: null, rangeStockStatus: null });
|
|
4005
4046
|
this._catalogConnectorService.getArticleGridViewExcelFile(this.stockSearchRequest).then((result) => {
|
|
4006
4047
|
console.log('export: ', result);
|
|
4007
4048
|
});
|
|
@@ -4058,7 +4099,7 @@ class CatalogStockTransferService {
|
|
|
4058
4099
|
lowerBound = 1;
|
|
4059
4100
|
}
|
|
4060
4101
|
this.searchRequest.paging = new PagingParameters(lowerBound, lowerBound + this.articlesPerPage - 1, this.articlesPerPage);
|
|
4061
|
-
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate:
|
|
4102
|
+
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate: null, rangeStockStatus: null, rangeSourceWarehouse: null, rangeTargetWarehouse: null });
|
|
4062
4103
|
this._catalogConnectorService.getArticlesForStockTransferSearchTile(this.stockSearchRequest).then((result) => {
|
|
4063
4104
|
this.transferTileArticles = result && result.articles ? result.articles : [];
|
|
4064
4105
|
this.resultCount = result && result.count ? result.count : 0;
|
|
@@ -4075,7 +4116,7 @@ class CatalogStockTransferService {
|
|
|
4075
4116
|
lowerBound = 1;
|
|
4076
4117
|
}
|
|
4077
4118
|
this.searchRequest.paging = new PagingParameters(lowerBound, lowerBound + this.articlesPerPage - 1, this.articlesPerPage);
|
|
4078
|
-
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate:
|
|
4119
|
+
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate: null, rangeStockStatus: null, rangeSourceWarehouse: null, rangeTargetWarehouse: null });
|
|
4079
4120
|
this._catalogConnectorService.getArticlesForStockTransferSearchGrid(this.stockSearchRequest).then((result) => {
|
|
4080
4121
|
this.transferGridArticles = result && result.articles ? result.articles : [];
|
|
4081
4122
|
this.resultCount = result && result.count ? result.count : 0;
|
|
@@ -4083,7 +4124,7 @@ class CatalogStockTransferService {
|
|
|
4083
4124
|
});
|
|
4084
4125
|
}
|
|
4085
4126
|
getArticleGridViewExcelFile() {
|
|
4086
|
-
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate:
|
|
4127
|
+
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate: null, rangeStockStatus: null, rangeSourceWarehouse: null, rangeTargetWarehouse: null });
|
|
4087
4128
|
this._catalogConnectorService.getTransferArticleGridViewExcelFile(this.stockSearchRequest).then((result) => {
|
|
4088
4129
|
console.log('export: ', result);
|
|
4089
4130
|
});
|
|
@@ -4099,83 +4140,6 @@ CatalogStockTransferService.ctorParameters = () => [
|
|
|
4099
4140
|
{ type: CatalogOptionsService }
|
|
4100
4141
|
];
|
|
4101
4142
|
|
|
4102
|
-
class CatalogNavigationService {
|
|
4103
|
-
constructor(_catalog, _iOne, _optionsService, _imageService) {
|
|
4104
|
-
this._catalog = _catalog;
|
|
4105
|
-
this._iOne = _iOne;
|
|
4106
|
-
this._optionsService = _optionsService;
|
|
4107
|
-
this._imageService = _imageService;
|
|
4108
|
-
this._subs = [];
|
|
4109
|
-
this._connectionMade = false;
|
|
4110
|
-
this._optionsSet = false;
|
|
4111
|
-
this.navigationCategories = [];
|
|
4112
|
-
this.allTurnoverGroups = [];
|
|
4113
|
-
// this._subs.push(
|
|
4114
|
-
// this._iOne.controllerInitialized.subscribe((initialized: boolean) => {
|
|
4115
|
-
// if (initialized) {
|
|
4116
|
-
// this._connectionMade = true;
|
|
4117
|
-
// this.getCategories();
|
|
4118
|
-
// }
|
|
4119
|
-
// }),
|
|
4120
|
-
// this._optionsService.parametersSet.subscribe((set: boolean) => {
|
|
4121
|
-
// if (set) {
|
|
4122
|
-
// this._optionsSet = true;
|
|
4123
|
-
// this.getCategories();
|
|
4124
|
-
// }
|
|
4125
|
-
// })
|
|
4126
|
-
// );
|
|
4127
|
-
}
|
|
4128
|
-
ngOnDestroy() {
|
|
4129
|
-
this._subs.forEach(s => s.unsubscribe());
|
|
4130
|
-
}
|
|
4131
|
-
setCategory(category) {
|
|
4132
|
-
// this._catalog.category = category;
|
|
4133
|
-
}
|
|
4134
|
-
setTurnoverGroup(turnoverGroup) {
|
|
4135
|
-
// this._catalog.turnoverGroup = turnoverGroup;
|
|
4136
|
-
}
|
|
4137
|
-
setExternalSourceUrl(url) {
|
|
4138
|
-
this._catalog.externalSourceUrl = url;
|
|
4139
|
-
}
|
|
4140
|
-
setIoneSourceUrl(url, ioneUrl, id, username, password) {
|
|
4141
|
-
this._catalog.ioneSourceUrl = url + '?url=' + ioneUrl + '&id=' + id + '&user=' + username + '&pass=' + password;
|
|
4142
|
-
}
|
|
4143
|
-
navigateToHome() {
|
|
4144
|
-
this._catalog.reset();
|
|
4145
|
-
}
|
|
4146
|
-
getCategories() {
|
|
4147
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
4148
|
-
// if (this._optionsSet && this._connectionMade) {
|
|
4149
|
-
// try {
|
|
4150
|
-
// this._iOne.getArticleCategories(this._optionsService.parameters.publicationCode).then((cats: ArticleCategory[]) => {
|
|
4151
|
-
// this._catalog.sortTurnoverGroups(cats);
|
|
4152
|
-
// this.navigationCategories = cats;
|
|
4153
|
-
// this.navigationCategories.forEach(cat => this._imageService.getCategoryImage(cat));
|
|
4154
|
-
// this.getTurnoverGroupList();
|
|
4155
|
-
// });
|
|
4156
|
-
// } catch (e) {
|
|
4157
|
-
//
|
|
4158
|
-
// }
|
|
4159
|
-
// }
|
|
4160
|
-
});
|
|
4161
|
-
}
|
|
4162
|
-
getTurnoverGroupList() {
|
|
4163
|
-
this.navigationCategories.forEach((category) => {
|
|
4164
|
-
category.turnoverGroups.forEach(tog => this._imageService.getTurnoverGroupImage(tog));
|
|
4165
|
-
this.allTurnoverGroups.push(...category.turnoverGroups);
|
|
4166
|
-
});
|
|
4167
|
-
}
|
|
4168
|
-
}
|
|
4169
|
-
CatalogNavigationService.decorators = [
|
|
4170
|
-
{ type: Injectable }
|
|
4171
|
-
];
|
|
4172
|
-
CatalogNavigationService.ctorParameters = () => [
|
|
4173
|
-
{ type: CatalogService },
|
|
4174
|
-
{ type: CatalogConnectorService },
|
|
4175
|
-
{ type: CatalogOptionsService },
|
|
4176
|
-
{ type: CatalogImageService }
|
|
4177
|
-
];
|
|
4178
|
-
|
|
4179
4143
|
class CatalogStockComparisonService {
|
|
4180
4144
|
constructor(_filterService, _catalogConnectorService, _settingsService, _optionService) {
|
|
4181
4145
|
this._filterService = _filterService;
|
|
@@ -4217,7 +4181,7 @@ class CatalogStockComparisonService {
|
|
|
4217
4181
|
lowerBound = 1;
|
|
4218
4182
|
}
|
|
4219
4183
|
this.searchRequest.paging = new PagingParameters(lowerBound, lowerBound + this.articlesPerPage - 1, this.articlesPerPage);
|
|
4220
|
-
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { sourceWarehouse: 0, targetWarehouse:
|
|
4184
|
+
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { sourceWarehouse: 0, targetWarehouse: 1 });
|
|
4221
4185
|
this._catalogConnectorService.getArticlesForStockComparisonSearchTile(this.stockSearchRequest).then((result) => {
|
|
4222
4186
|
this.comparisonTileArticles = result && result.articles ? result.articles : [];
|
|
4223
4187
|
this.resultCount = result && result.count ? result.count : 0;
|
|
@@ -4234,7 +4198,7 @@ class CatalogStockComparisonService {
|
|
|
4234
4198
|
lowerBound = 1;
|
|
4235
4199
|
}
|
|
4236
4200
|
this.searchRequest.paging = new PagingParameters(lowerBound, lowerBound + this.articlesPerPage - 1, this.articlesPerPage);
|
|
4237
|
-
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { sourceWarehouse: 0, targetWarehouse:
|
|
4201
|
+
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { sourceWarehouse: 0, targetWarehouse: 1 });
|
|
4238
4202
|
this._catalogConnectorService.getArticlesForStockComparisonSearchGrid(this.stockSearchRequest).then((result) => {
|
|
4239
4203
|
this.comparisonGridArticles = result && result.articles ? result.articles : [];
|
|
4240
4204
|
this.resultCount = result && result.count ? result.count : 0;
|
|
@@ -4242,7 +4206,7 @@ class CatalogStockComparisonService {
|
|
|
4242
4206
|
});
|
|
4243
4207
|
}
|
|
4244
4208
|
getArticleGridViewExcelFile() {
|
|
4245
|
-
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { sourceWarehouse: 0, targetWarehouse:
|
|
4209
|
+
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { sourceWarehouse: 0, targetWarehouse: 1 });
|
|
4246
4210
|
this._catalogConnectorService.getComparisonArticleGridViewExcelFile(this.stockSearchRequest).then((result) => {
|
|
4247
4211
|
console.log('export: ', result);
|
|
4248
4212
|
});
|
|
@@ -4409,16 +4373,15 @@ CatalogSearchComponent.decorators = [
|
|
|
4409
4373
|
</div>
|
|
4410
4374
|
`,
|
|
4411
4375
|
providers: [
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4376
|
+
CatalogSelectSingleCacheService,
|
|
4377
|
+
CatalogSelectMultipleCacheService,
|
|
4378
|
+
CatalogSelectMultipleParameterizedCacheService,
|
|
4379
|
+
CatalogSelectSingleParameterizedCacheService,
|
|
4380
|
+
CatalogBusinessObjectCacheManagerService,
|
|
4417
4381
|
CatalogImageService,
|
|
4418
4382
|
CatalogFilterService,
|
|
4419
4383
|
CatalogOptionsService,
|
|
4420
4384
|
CatalogConnectorService,
|
|
4421
|
-
CatalogNavigationService,
|
|
4422
4385
|
CatalogConnectorAdapterService,
|
|
4423
4386
|
CatalogService,
|
|
4424
4387
|
CatalogSettingsService,
|
|
@@ -5238,121 +5201,328 @@ CatalogSearchResultListModule.decorators = [
|
|
|
5238
5201
|
},] }
|
|
5239
5202
|
];
|
|
5240
5203
|
|
|
5241
|
-
class
|
|
5242
|
-
constructor(iconCache, catalogStockService) {
|
|
5243
|
-
this.iconCache = iconCache;
|
|
5244
|
-
this.catalogStockService = catalogStockService;
|
|
5245
|
-
this.showClass = true;
|
|
5246
|
-
this.icons = IconEnum;
|
|
5247
|
-
this.valutaSymbol = '€';
|
|
5248
|
-
}
|
|
5249
|
-
ngOnInit() {
|
|
5250
|
-
this.catalogStockService.searchArticlesForTileView();
|
|
5251
|
-
}
|
|
5252
|
-
onPreviousClick() {
|
|
5253
|
-
this.catalogStockService.currentPage -= 1;
|
|
5254
|
-
}
|
|
5255
|
-
onNextClick() {
|
|
5256
|
-
this.catalogStockService.currentPage += 1;
|
|
5257
|
-
}
|
|
5258
|
-
onPageClick(pageNr) {
|
|
5259
|
-
this.catalogStockService.currentPage = pageNr;
|
|
5260
|
-
}
|
|
5261
|
-
}
|
|
5262
|
-
CatalogStockOverviewTileComponent.decorators = [
|
|
5263
|
-
{ type: Component, args: [{
|
|
5264
|
-
selector: 'co-catalog-stock-overview-tile',
|
|
5265
|
-
template: `
|
|
5266
|
-
<div class="article-tiles">
|
|
5267
|
-
<div class="article-tile" *ngFor="let article of catalogStockService.tileArticles">
|
|
5268
|
-
<div class="image">
|
|
5269
|
-
<co-image class="co-image" [source]="article.imageData"></co-image>
|
|
5270
|
-
</div>
|
|
5271
|
-
<div class="brand" [innerText]="article.buyerDescription"></div>
|
|
5272
|
-
<div class="product" [innerText]="article.name"></div>
|
|
5273
|
-
<div class="description" [innerText]="article.description"></div>
|
|
5274
|
-
<div class="price">
|
|
5275
|
-
<span [innerText]="'FROM' | localize"></span>
|
|
5276
|
-
<span [innerText]="article.price | priceDisplay:valutaSymbol"></span>
|
|
5277
|
-
</div>
|
|
5278
|
-
<div class="article-info">
|
|
5279
|
-
<div class="product-num">
|
|
5280
|
-
<co-icon [iconData]="iconCache.getIcon(icons.BarsFilter)"></co-icon>
|
|
5281
|
-
<span [innerText]="article.goodId"></span>
|
|
5282
|
-
</div>
|
|
5283
|
-
<div class="turnover-group">
|
|
5284
|
-
<span [innerText]="'GROUP' | localize"></span>:
|
|
5285
|
-
<span [innerText]="article.turnoverGroupDescr"></span>
|
|
5286
|
-
</div>
|
|
5287
|
-
<div class="stock-quantity">
|
|
5288
|
-
<span [innerText]="'AMOUNT_IN_STOCK' | localize"></span>:
|
|
5289
|
-
<span [innerText]="article.quantity"></span>
|
|
5290
|
-
</div>
|
|
5291
|
-
<div class="direct-available">
|
|
5292
|
-
Direct available:
|
|
5293
|
-
<span [innerText]="article.nowAvailable"></span>
|
|
5294
|
-
</div>
|
|
5295
|
-
<div class="details">Details</div>
|
|
5296
|
-
</div>
|
|
5297
|
-
</div>
|
|
5298
|
-
</div>
|
|
5299
|
-
<co-pagination-bar
|
|
5300
|
-
*ngIf="catalogStockService.tileArticles?.length > 0"
|
|
5301
|
-
[currentPage]="catalogStockService.currentPage"
|
|
5302
|
-
[itemsPerPage]="catalogStockService.articlesPerPage"
|
|
5303
|
-
[totalItems]="catalogStockService.resultCount"
|
|
5304
|
-
[previousLabel]="'PREVIOUS' | localize"
|
|
5305
|
-
[nextLabel]="'NEXT' | localize"
|
|
5306
|
-
[autoHide]="true"
|
|
5307
|
-
[directionLinks]="true"
|
|
5308
|
-
[paginationRange]="8"
|
|
5309
|
-
(previousClick)="onPreviousClick()"
|
|
5310
|
-
(nextClick)="onNextClick()"
|
|
5311
|
-
(pageClick)="onPageClick($event)">
|
|
5312
|
-
</co-pagination-bar>
|
|
5313
|
-
`,
|
|
5314
|
-
encapsulation: ViewEncapsulation.None,
|
|
5315
|
-
styles: [".article-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,.5fr));grid-gap:20px;gap:20px;padding:40px 0;z-index:1}.article-tile{padding:10px;border:1px solid #DCE4EA}.article-tile .image{display:flex;align-items:center;justify-content:center;overflow:hidden;width:100%;height:150px}.article-tile .image .co-image{height:100%;width:-moz-fit-content;width:fit-content}.article-tile .image .no-image-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;opacity:.2;width:150px;height:150px}.article-tile .image .no-image-wrapper .no-image{height:50%;width:50%}.article-tile .image .no-image-wrapper .no-image span{font-size:14px}.article-tile .brand,.article-tile .description{margin-bottom:10px}.article-tile .product,.article-tile .price{margin-bottom:10px;font-weight:bold}.article-tile .article-info{display:grid;grid-template-columns:repeat(2,1fr);grid-row-gap:10px;row-gap:10px}.article-tile .product-num{display:flex;align-items:center}.article-tile .product-num co-icon{width:10px;height:10px;margin-right:5px}.article-tile .details{font-weight:bold;color:#1a73e8;cursor:pointer}.article-tile .details:hover{text-decoration:underline}\n"]
|
|
5316
|
-
},] }
|
|
5317
|
-
];
|
|
5318
|
-
CatalogStockOverviewTileComponent.ctorParameters = () => [
|
|
5319
|
-
{ type: IconCacheService },
|
|
5320
|
-
{ type: CatalogStockService }
|
|
5321
|
-
];
|
|
5322
|
-
CatalogStockOverviewTileComponent.propDecorators = {
|
|
5323
|
-
showClass: [{ type: HostBinding, args: ['class.co-catalog-stock-overview-tile',] }]
|
|
5324
|
-
};
|
|
5325
|
-
|
|
5326
|
-
class CatalogStockOverviewTileModule {
|
|
5204
|
+
class CatalogSearchModule {
|
|
5327
5205
|
}
|
|
5328
|
-
|
|
5206
|
+
CatalogSearchModule.decorators = [
|
|
5329
5207
|
{ type: NgModule, args: [{
|
|
5330
5208
|
imports: [
|
|
5331
5209
|
CommonModule,
|
|
5332
|
-
|
|
5210
|
+
CatalogFilterModule,
|
|
5211
|
+
CatalogSearchHeaderModule,
|
|
5212
|
+
CatalogSearchResultTileModule,
|
|
5213
|
+
CatalogSearchResultListModule,
|
|
5214
|
+
CatalogCategoriesModule,
|
|
5215
|
+
CatalogExternalSourcesModule,
|
|
5216
|
+
CatalogNavigationModule,
|
|
5333
5217
|
IconModule,
|
|
5334
|
-
|
|
5335
|
-
PriceDisplayPipeModule,
|
|
5336
|
-
PaginationBarModule,
|
|
5218
|
+
ButtonModule
|
|
5337
5219
|
],
|
|
5338
5220
|
declarations: [
|
|
5339
|
-
|
|
5221
|
+
CatalogSearchComponent
|
|
5340
5222
|
],
|
|
5341
5223
|
exports: [
|
|
5342
|
-
|
|
5224
|
+
CatalogSearchComponent
|
|
5343
5225
|
]
|
|
5344
5226
|
},] }
|
|
5345
5227
|
];
|
|
5346
5228
|
|
|
5347
|
-
class
|
|
5348
|
-
constructor(
|
|
5349
|
-
this.
|
|
5229
|
+
class CatalogExternalSourceComponent {
|
|
5230
|
+
constructor(_sanitizer, _catalogConnectorService, _appEventService) {
|
|
5231
|
+
this._sanitizer = _sanitizer;
|
|
5232
|
+
this._catalogConnectorService = _catalogConnectorService;
|
|
5233
|
+
this._appEventService = _appEventService;
|
|
5234
|
+
this.showFilter = true;
|
|
5235
|
+
this.showNavigation = true;
|
|
5236
|
+
this.articleClick = new EventEmitter();
|
|
5237
|
+
this.addArticleClick = new EventEmitter();
|
|
5238
|
+
this.iFrameFeedbackReceived = new EventEmitter();
|
|
5350
5239
|
this.showClass = true;
|
|
5240
|
+
this.showCatalog = false;
|
|
5241
|
+
this.vadainCounter = 0;
|
|
5242
|
+
this.loaded = false;
|
|
5243
|
+
this.externalSettings = {};
|
|
5244
|
+
this._subs = [];
|
|
5351
5245
|
}
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5246
|
+
set container(content) {
|
|
5247
|
+
if (content) {
|
|
5248
|
+
this.catalogFrame = content;
|
|
5249
|
+
this.catalogFrame.nativeElement.setAttribute('data-password', this.password);
|
|
5250
|
+
this.catalogFrame.nativeElement.setAttribute('data-username', this.username);
|
|
5251
|
+
}
|
|
5252
|
+
}
|
|
5253
|
+
set catalogDefinitionId(value) {
|
|
5254
|
+
this._catalogDefinitionId = value;
|
|
5255
|
+
}
|
|
5256
|
+
get catalogDefinitionId() {
|
|
5257
|
+
return this._catalogDefinitionId;
|
|
5258
|
+
}
|
|
5259
|
+
set externalCatalogStartupInfo(value) {
|
|
5260
|
+
this._externalCatalogStartupInfo = value;
|
|
5261
|
+
this._externalSource = value.externalSource;
|
|
5262
|
+
this.loaded = false;
|
|
5263
|
+
this._prepareExternalSource();
|
|
5264
|
+
}
|
|
5265
|
+
get externalCatalogStartupInfo() {
|
|
5266
|
+
return this._externalCatalogStartupInfo;
|
|
5267
|
+
}
|
|
5268
|
+
ngOnInit() {
|
|
5269
|
+
this._subs.push(this._appEventService.addArticleButtonClick.subscribe((article) => {
|
|
5270
|
+
if (!(article instanceof ArticleExtended)) {
|
|
5271
|
+
this.addArticleClick.next({ quantity: 1, article: article });
|
|
5272
|
+
}
|
|
5273
|
+
}));
|
|
5274
|
+
}
|
|
5275
|
+
handleArticleClick(article) {
|
|
5276
|
+
if (article && this.externalSettings) {
|
|
5277
|
+
this.articleClick.emit({ article: article, settings: { name: this.name, settings: this.externalSettings } });
|
|
5278
|
+
}
|
|
5279
|
+
}
|
|
5280
|
+
receiveMessage(event) {
|
|
5281
|
+
//if(event.origin === this.externalSource.url) {
|
|
5282
|
+
if (typeof event.data === 'string') {
|
|
5283
|
+
this.iFrameFeedbackReceived.emit(event.data);
|
|
5284
|
+
}
|
|
5285
|
+
else {
|
|
5286
|
+
this.iFrameFeedbackReceived.emit(JSON.stringify(event.data));
|
|
5287
|
+
}
|
|
5288
|
+
//}
|
|
5289
|
+
}
|
|
5290
|
+
iframeLoaded(event) {
|
|
5291
|
+
if (this.username && this.password) {
|
|
5292
|
+
event.target.contentWindow.postMessage({
|
|
5293
|
+
'USERNAME': this.username,
|
|
5294
|
+
'PASSWORD': this.password
|
|
5295
|
+
}, '*');
|
|
5296
|
+
}
|
|
5297
|
+
if (this.externalOrderNr && this.vadainCounter === 1) {
|
|
5298
|
+
event.target.contentWindow.postMessage({
|
|
5299
|
+
'EDIT_ORDER': true,
|
|
5300
|
+
'ORDER_ID': this.externalOrderNr
|
|
5301
|
+
}, '*');
|
|
5302
|
+
this.externalOrderNr = null;
|
|
5303
|
+
}
|
|
5304
|
+
this.vadainCounter++;
|
|
5305
|
+
}
|
|
5306
|
+
_prepareExternalSource() {
|
|
5307
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5308
|
+
if (!this._externalSource) {
|
|
5309
|
+
return;
|
|
5310
|
+
}
|
|
5311
|
+
this.externalUrl = undefined;
|
|
5312
|
+
this.externalSettings = {};
|
|
5313
|
+
if (this._externalSource.type === 'CATF') {
|
|
5314
|
+
// get bundle settings from external source
|
|
5315
|
+
const bundleSettings = yield this._catalogConnectorService.getCatalogBundleSettings(this._externalSource.url, parseInt(this._externalSource.schema));
|
|
5316
|
+
this.externalSettings = JSON.parse(bundleSettings);
|
|
5317
|
+
if (this.options) {
|
|
5318
|
+
this.externalSettings.options = this.options;
|
|
5319
|
+
}
|
|
5320
|
+
if (this._externalSource.username && this._externalSource.password) {
|
|
5321
|
+
this.externalSettings.username = this._externalSource.username;
|
|
5322
|
+
this.externalSettings.password = this._externalSource.password;
|
|
5323
|
+
}
|
|
5324
|
+
// finally show the catalog
|
|
5325
|
+
this.showCatalog = true;
|
|
5326
|
+
}
|
|
5327
|
+
else {
|
|
5328
|
+
if (this._externalSource.type !== ExternalCatalogTypes.Webshop) {
|
|
5329
|
+
this.externalUrl = this._externalCatalogStartupInfo.apiUrl;
|
|
5330
|
+
if (this._externalSource.type === ExternalCatalogTypes.Vadain) {
|
|
5331
|
+
this.username = this._externalCatalogStartupInfo.username;
|
|
5332
|
+
this.password = this._externalCatalogStartupInfo.password;
|
|
5333
|
+
this.externalOrderNr = this._externalCatalogStartupInfo.orderId;
|
|
5334
|
+
}
|
|
5335
|
+
}
|
|
5336
|
+
else {
|
|
5337
|
+
this.externalUrl = this._externalSource.url;
|
|
5338
|
+
}
|
|
5339
|
+
this.safeUrl = this._sanitizer.bypassSecurityTrustResourceUrl(this.externalUrl);
|
|
5340
|
+
this.showCatalog = false;
|
|
5341
|
+
window.addEventListener("message", (event) => { this.receiveMessage(event); });
|
|
5342
|
+
}
|
|
5343
|
+
this.loaded = true;
|
|
5344
|
+
});
|
|
5345
|
+
}
|
|
5346
|
+
}
|
|
5347
|
+
CatalogExternalSourceComponent.decorators = [
|
|
5348
|
+
{ type: Component, args: [{
|
|
5349
|
+
selector: 'co-catalog-external-source',
|
|
5350
|
+
template: `
|
|
5351
|
+
<ng-container *ngIf="loaded">
|
|
5352
|
+
<ng-container *ngIf="showCatalog">
|
|
5353
|
+
<co-catalog-search
|
|
5354
|
+
[(settings)]="externalSettings"
|
|
5355
|
+
[title]="title"
|
|
5356
|
+
[subTitle]="subTitle"
|
|
5357
|
+
[searchPlaceholder]="searchPlaceholder"
|
|
5358
|
+
[showFilter]="showFilter"
|
|
5359
|
+
[showNavigation]="showNavigation"
|
|
5360
|
+
(onArticleClick)="handleArticleClick($event)"
|
|
5361
|
+
></co-catalog-search>
|
|
5362
|
+
</ng-container>
|
|
5363
|
+
<ng-container *ngIf="!showCatalog">
|
|
5364
|
+
<iframe #catalogFrame width="100%" height="100%" [src]="safeUrl" frameborder="0" allowfullscreen (load)="iframeLoaded($event)"></iframe>
|
|
5365
|
+
</ng-container>
|
|
5366
|
+
</ng-container>
|
|
5367
|
+
`,
|
|
5368
|
+
encapsulation: ViewEncapsulation.None
|
|
5369
|
+
},] }
|
|
5370
|
+
];
|
|
5371
|
+
CatalogExternalSourceComponent.ctorParameters = () => [
|
|
5372
|
+
{ type: DomSanitizer },
|
|
5373
|
+
{ type: CatalogConnectorService },
|
|
5374
|
+
{ type: CatalogEventService }
|
|
5375
|
+
];
|
|
5376
|
+
CatalogExternalSourceComponent.propDecorators = {
|
|
5377
|
+
container: [{ type: ViewChild, args: ['catalogFrame', { read: ElementRef },] }],
|
|
5378
|
+
catalogDefinitionId: [{ type: Input }],
|
|
5379
|
+
user: [{ type: Input }],
|
|
5380
|
+
externalCatalogStartupInfo: [{ type: Input }],
|
|
5381
|
+
title: [{ type: Input }],
|
|
5382
|
+
subTitle: [{ type: Input }],
|
|
5383
|
+
searchPlaceholder: [{ type: Input }],
|
|
5384
|
+
showFilter: [{ type: Input }],
|
|
5385
|
+
showNavigation: [{ type: Input }],
|
|
5386
|
+
options: [{ type: Input }],
|
|
5387
|
+
name: [{ type: Input }],
|
|
5388
|
+
articleClick: [{ type: Output }],
|
|
5389
|
+
addArticleClick: [{ type: Output }],
|
|
5390
|
+
iFrameFeedbackReceived: [{ type: Output }],
|
|
5391
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-external-source',] }]
|
|
5392
|
+
};
|
|
5393
|
+
|
|
5394
|
+
class CatalogExternalSourceModule {
|
|
5395
|
+
}
|
|
5396
|
+
CatalogExternalSourceModule.decorators = [
|
|
5397
|
+
{ type: NgModule, args: [{
|
|
5398
|
+
imports: [
|
|
5399
|
+
CommonModule,
|
|
5400
|
+
CatalogSearchModule //.ForRoot()
|
|
5401
|
+
],
|
|
5402
|
+
declarations: [
|
|
5403
|
+
CatalogExternalSourceComponent
|
|
5404
|
+
],
|
|
5405
|
+
exports: [
|
|
5406
|
+
CatalogExternalSourceComponent
|
|
5407
|
+
]
|
|
5408
|
+
},] }
|
|
5409
|
+
];
|
|
5410
|
+
|
|
5411
|
+
class CatalogStockOverviewTileComponent {
|
|
5412
|
+
constructor(iconCache, catalogStockService) {
|
|
5413
|
+
this.iconCache = iconCache;
|
|
5414
|
+
this.catalogStockService = catalogStockService;
|
|
5415
|
+
this.showClass = true;
|
|
5416
|
+
this.icons = IconEnum;
|
|
5417
|
+
this.valutaSymbol = '€';
|
|
5418
|
+
}
|
|
5419
|
+
ngOnInit() {
|
|
5420
|
+
this.catalogStockService.searchArticlesForTileView();
|
|
5421
|
+
}
|
|
5422
|
+
onPreviousClick() {
|
|
5423
|
+
this.catalogStockService.currentPage -= 1;
|
|
5424
|
+
}
|
|
5425
|
+
onNextClick() {
|
|
5426
|
+
this.catalogStockService.currentPage += 1;
|
|
5427
|
+
}
|
|
5428
|
+
onPageClick(pageNr) {
|
|
5429
|
+
this.catalogStockService.currentPage = pageNr;
|
|
5430
|
+
}
|
|
5431
|
+
}
|
|
5432
|
+
CatalogStockOverviewTileComponent.decorators = [
|
|
5433
|
+
{ type: Component, args: [{
|
|
5434
|
+
selector: 'co-catalog-stock-overview-tile',
|
|
5435
|
+
template: `
|
|
5436
|
+
<div class="article-tiles">
|
|
5437
|
+
<div class="article-tile" *ngFor="let article of catalogStockService.tileArticles">
|
|
5438
|
+
<div class="image">
|
|
5439
|
+
<co-image class="co-image" [source]="article.imageData"></co-image>
|
|
5440
|
+
</div>
|
|
5441
|
+
<div class="brand" [innerText]="article.brandDescription"></div>
|
|
5442
|
+
<div class="product" [innerText]="article.superArticleDescr"></div>
|
|
5443
|
+
<div class="description" [innerText]="article.description"></div>
|
|
5444
|
+
<div class="price">
|
|
5445
|
+
<span [innerText]="'FROM' | localize"></span>
|
|
5446
|
+
<span [innerText]="article.price | priceDisplay:valutaSymbol"></span>
|
|
5447
|
+
</div>
|
|
5448
|
+
<div class="article-info">
|
|
5449
|
+
<div class="product-num">
|
|
5450
|
+
<co-icon [iconData]="iconCache.getIcon(icons.BarsFilter)"></co-icon>
|
|
5451
|
+
<span [innerText]="article.articleNumber"></span>
|
|
5452
|
+
</div>
|
|
5453
|
+
<div class="turnover-group">
|
|
5454
|
+
<span [innerText]="'GROUP' | localize"></span>:
|
|
5455
|
+
<span [innerText]="article.turnoverGroupDescr"></span>
|
|
5456
|
+
</div>
|
|
5457
|
+
<div class="stock-quantity">
|
|
5458
|
+
<span [innerText]="'AMOUNT_IN_STOCK' | localize"></span>:
|
|
5459
|
+
<span [innerText]="article.quantity"></span>
|
|
5460
|
+
</div>
|
|
5461
|
+
<div class="direct-available">
|
|
5462
|
+
Direct available:
|
|
5463
|
+
<span [innerText]="article.nowAvailable"></span>
|
|
5464
|
+
</div>
|
|
5465
|
+
<div class="details">Details</div>
|
|
5466
|
+
</div>
|
|
5467
|
+
</div>
|
|
5468
|
+
</div>
|
|
5469
|
+
<co-pagination-bar
|
|
5470
|
+
*ngIf="catalogStockService.tileArticles?.length > 0"
|
|
5471
|
+
[currentPage]="catalogStockService.currentPage"
|
|
5472
|
+
[itemsPerPage]="catalogStockService.articlesPerPage"
|
|
5473
|
+
[totalItems]="catalogStockService.resultCount"
|
|
5474
|
+
[previousLabel]="'PREVIOUS' | localize"
|
|
5475
|
+
[nextLabel]="'NEXT' | localize"
|
|
5476
|
+
[autoHide]="true"
|
|
5477
|
+
[directionLinks]="true"
|
|
5478
|
+
[paginationRange]="8"
|
|
5479
|
+
(previousClick)="onPreviousClick()"
|
|
5480
|
+
(nextClick)="onNextClick()"
|
|
5481
|
+
(pageClick)="onPageClick($event)">
|
|
5482
|
+
</co-pagination-bar>
|
|
5483
|
+
`,
|
|
5484
|
+
encapsulation: ViewEncapsulation.None,
|
|
5485
|
+
styles: [".article-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,.5fr));grid-gap:20px;gap:20px;padding:40px 0;z-index:1}.article-tile{padding:10px;border:1px solid #DCE4EA}.article-tile .image{display:flex;align-items:center;justify-content:center;overflow:hidden;width:100%;height:150px}.article-tile .image .co-image{height:100%;width:-moz-fit-content;width:fit-content}.article-tile .image .no-image-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;opacity:.2;width:150px;height:150px}.article-tile .image .no-image-wrapper .no-image{height:50%;width:50%}.article-tile .image .no-image-wrapper .no-image span{font-size:14px}.article-tile .brand,.article-tile .description{margin-bottom:10px}.article-tile .product,.article-tile .price{margin-bottom:10px;font-weight:bold}.article-tile .article-info{display:grid;grid-template-columns:repeat(2,1fr);grid-row-gap:10px;row-gap:10px}.article-tile .product-num{display:flex;align-items:center}.article-tile .product-num co-icon{width:10px;height:10px;margin-right:5px}.article-tile .details{font-weight:bold;color:#1a73e8;cursor:pointer}.article-tile .details:hover{text-decoration:underline}\n"]
|
|
5486
|
+
},] }
|
|
5487
|
+
];
|
|
5488
|
+
CatalogStockOverviewTileComponent.ctorParameters = () => [
|
|
5489
|
+
{ type: IconCacheService },
|
|
5490
|
+
{ type: CatalogStockService }
|
|
5491
|
+
];
|
|
5492
|
+
CatalogStockOverviewTileComponent.propDecorators = {
|
|
5493
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-stock-overview-tile',] }]
|
|
5494
|
+
};
|
|
5495
|
+
|
|
5496
|
+
class CatalogStockOverviewTileModule {
|
|
5497
|
+
}
|
|
5498
|
+
CatalogStockOverviewTileModule.decorators = [
|
|
5499
|
+
{ type: NgModule, args: [{
|
|
5500
|
+
imports: [
|
|
5501
|
+
CommonModule,
|
|
5502
|
+
PipeModule,
|
|
5503
|
+
IconModule,
|
|
5504
|
+
ImageModule,
|
|
5505
|
+
PriceDisplayPipeModule,
|
|
5506
|
+
PaginationBarModule,
|
|
5507
|
+
],
|
|
5508
|
+
declarations: [
|
|
5509
|
+
CatalogStockOverviewTileComponent
|
|
5510
|
+
],
|
|
5511
|
+
exports: [
|
|
5512
|
+
CatalogStockOverviewTileComponent
|
|
5513
|
+
]
|
|
5514
|
+
},] }
|
|
5515
|
+
];
|
|
5516
|
+
|
|
5517
|
+
class CatalogStockOverviewListComponent {
|
|
5518
|
+
constructor(catalogStockService) {
|
|
5519
|
+
this.catalogStockService = catalogStockService;
|
|
5520
|
+
this.showClass = true;
|
|
5521
|
+
}
|
|
5522
|
+
ngOnInit() {
|
|
5523
|
+
this.catalogStockService.searchArticlesForGridView();
|
|
5524
|
+
}
|
|
5525
|
+
onPreviousClick() {
|
|
5356
5526
|
this.catalogStockService.currentPage -= 1;
|
|
5357
5527
|
}
|
|
5358
5528
|
onNextClick() {
|
|
@@ -5377,7 +5547,7 @@ CatalogStockOverviewListComponent.decorators = [
|
|
|
5377
5547
|
</co-simple-grid-column>
|
|
5378
5548
|
<co-simple-grid-column
|
|
5379
5549
|
[headerText]="'SUPER_ARTICLE' | localize"
|
|
5380
|
-
[field]="'
|
|
5550
|
+
[field]="'superArticleDescr'">
|
|
5381
5551
|
</co-simple-grid-column>
|
|
5382
5552
|
<co-simple-grid-column
|
|
5383
5553
|
[headerText]="'TURNOVER_GROUP' | localize"
|
|
@@ -5385,19 +5555,19 @@ CatalogStockOverviewListComponent.decorators = [
|
|
|
5385
5555
|
</co-simple-grid-column>
|
|
5386
5556
|
<co-simple-grid-column
|
|
5387
5557
|
[headerText]="'SUPPLIER' | localize"
|
|
5388
|
-
[field]="'
|
|
5558
|
+
[field]="'supplierNumber'">
|
|
5389
5559
|
</co-simple-grid-column>
|
|
5390
5560
|
<co-simple-grid-column
|
|
5391
5561
|
[headerText]="'STOREROOM' | localize"
|
|
5392
|
-
[field]="'
|
|
5562
|
+
[field]="'warehouseNumber'">
|
|
5393
5563
|
</co-simple-grid-column>
|
|
5394
5564
|
<co-simple-grid-column
|
|
5395
5565
|
[headerText]="'LOCATION' | localize"
|
|
5396
|
-
[field]="'
|
|
5566
|
+
[field]="'stockLocationNumber'">
|
|
5397
5567
|
</co-simple-grid-column>
|
|
5398
5568
|
<co-simple-grid-column
|
|
5399
5569
|
[headerText]="'STOCK' | localize"
|
|
5400
|
-
[field]="'
|
|
5570
|
+
[field]="'quantity'">
|
|
5401
5571
|
</co-simple-grid-column>
|
|
5402
5572
|
<co-simple-grid-column
|
|
5403
5573
|
[headerText]="'TOTAL_ARTICLES_IN_ORDER' | localize"
|
|
@@ -5706,8 +5876,8 @@ CatalogWarehouseTransfersTileComponent.decorators = [
|
|
|
5706
5876
|
<div class="image">
|
|
5707
5877
|
<co-image class="co-image" [source]="article.imageData"></co-image>
|
|
5708
5878
|
</div>
|
|
5709
|
-
<div class="brand" [innerText]="article.
|
|
5710
|
-
<div class="product" [innerText]="article.
|
|
5879
|
+
<div class="brand" [innerText]="article.brandDescription"></div>
|
|
5880
|
+
<div class="product" [innerText]="article.superArticleDescr"></div>
|
|
5711
5881
|
<div class="description" [innerText]="article.description"></div>
|
|
5712
5882
|
<div class="price">
|
|
5713
5883
|
<span [innerText]="'FROM' | localize"></span>
|
|
@@ -5716,7 +5886,7 @@ CatalogWarehouseTransfersTileComponent.decorators = [
|
|
|
5716
5886
|
<div class="one-liner">
|
|
5717
5887
|
<div class="product-num">
|
|
5718
5888
|
<co-icon [iconData]="iconCache.getIcon(icons.BarsFilter)"></co-icon>
|
|
5719
|
-
<span [innerText]="article.
|
|
5889
|
+
<span [innerText]="article.articleNumber"></span>
|
|
5720
5890
|
</div>
|
|
5721
5891
|
<div class="turnover-group">
|
|
5722
5892
|
<span [innerText]="'GROUP' | localize"></span>:
|
|
@@ -5821,7 +5991,7 @@ CatalogWarehouseTransfersListComponent.decorators = [
|
|
|
5821
5991
|
</co-simple-grid-column>
|
|
5822
5992
|
<co-simple-grid-column
|
|
5823
5993
|
[headerText]="'SUPER_ARTICLE' | localize"
|
|
5824
|
-
[field]="'
|
|
5994
|
+
[field]="'superArticleDescr'">
|
|
5825
5995
|
</co-simple-grid-column>
|
|
5826
5996
|
<co-simple-grid-column
|
|
5827
5997
|
[headerText]="'TURNOVER_GROUP' | localize"
|
|
@@ -5913,246 +6083,86 @@ CatalogWarehouseTransfersListModule.decorators = [
|
|
|
5913
6083
|
},] }
|
|
5914
6084
|
];
|
|
5915
6085
|
|
|
5916
|
-
class
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
SelectMultipleCacheService,
|
|
5923
|
-
SelectMultipleParameterizedCacheService,
|
|
5924
|
-
SelectSingleParameterizedCacheService,
|
|
5925
|
-
BusinessObjectCacheManagerService,
|
|
5926
|
-
CatalogImageService,
|
|
5927
|
-
CatalogFilterService,
|
|
5928
|
-
CatalogOptionsService,
|
|
5929
|
-
CatalogConnectorService,
|
|
5930
|
-
CatalogNavigationService,
|
|
5931
|
-
CatalogConnectorAdapterService,
|
|
5932
|
-
CatalogService,
|
|
5933
|
-
CatalogSettingsService,
|
|
5934
|
-
CatalogSearchService,
|
|
5935
|
-
CatalogStockService,
|
|
5936
|
-
CatalogStockComparisonService,
|
|
5937
|
-
CatalogStockTransferService
|
|
5938
|
-
]
|
|
5939
|
-
};
|
|
5940
|
-
}
|
|
5941
|
-
}
|
|
5942
|
-
CatalogSearchModule.decorators = [
|
|
5943
|
-
{ type: NgModule, args: [{
|
|
5944
|
-
imports: [
|
|
5945
|
-
CommonModule,
|
|
5946
|
-
CatalogFilterModule,
|
|
5947
|
-
CatalogSearchHeaderModule,
|
|
5948
|
-
CatalogSearchResultTileModule,
|
|
5949
|
-
CatalogSearchResultListModule,
|
|
5950
|
-
CatalogStockOverviewTileModule,
|
|
5951
|
-
CatalogStockOverviewListModule,
|
|
5952
|
-
CatalogStockComparisonTileModule,
|
|
5953
|
-
CatalogStockComparisonListModule,
|
|
5954
|
-
CatalogWarehouseTransfersTileModule,
|
|
5955
|
-
CatalogWarehouseTransfersListModule,
|
|
5956
|
-
CatalogCategoriesModule,
|
|
5957
|
-
CatalogExternalSourcesModule,
|
|
5958
|
-
CatalogNavigationModule,
|
|
5959
|
-
IconModule,
|
|
5960
|
-
ButtonModule
|
|
5961
|
-
],
|
|
5962
|
-
declarations: [
|
|
5963
|
-
CatalogSearchComponent
|
|
5964
|
-
],
|
|
5965
|
-
exports: [
|
|
5966
|
-
CatalogSearchComponent
|
|
5967
|
-
]
|
|
5968
|
-
},] }
|
|
5969
|
-
];
|
|
5970
|
-
|
|
5971
|
-
class CatalogExternalSourceComponent {
|
|
5972
|
-
constructor(_sanitizer, _catalogConnectorService, _appEventService) {
|
|
5973
|
-
this._sanitizer = _sanitizer;
|
|
5974
|
-
this._catalogConnectorService = _catalogConnectorService;
|
|
5975
|
-
this._appEventService = _appEventService;
|
|
5976
|
-
this.showFilter = true;
|
|
5977
|
-
this.showNavigation = true;
|
|
5978
|
-
this.articleClick = new EventEmitter();
|
|
5979
|
-
this.addArticleClick = new EventEmitter();
|
|
5980
|
-
this.iFrameFeedbackReceived = new EventEmitter();
|
|
5981
|
-
this.showClass = true;
|
|
5982
|
-
this.showCatalog = false;
|
|
5983
|
-
this.vadainCounter = 0;
|
|
5984
|
-
this.loaded = false;
|
|
5985
|
-
this.externalSettings = {};
|
|
6086
|
+
class CatalogNavigationService {
|
|
6087
|
+
constructor(_catalog, _iOne, _optionsService, _imageService) {
|
|
6088
|
+
this._catalog = _catalog;
|
|
6089
|
+
this._iOne = _iOne;
|
|
6090
|
+
this._optionsService = _optionsService;
|
|
6091
|
+
this._imageService = _imageService;
|
|
5986
6092
|
this._subs = [];
|
|
6093
|
+
this._connectionMade = false;
|
|
6094
|
+
this._optionsSet = false;
|
|
6095
|
+
this.navigationCategories = [];
|
|
6096
|
+
this.allTurnoverGroups = [];
|
|
6097
|
+
// this._subs.push(
|
|
6098
|
+
// this._iOne.controllerInitialized.subscribe((initialized: boolean) => {
|
|
6099
|
+
// if (initialized) {
|
|
6100
|
+
// this._connectionMade = true;
|
|
6101
|
+
// this.getCategories();
|
|
6102
|
+
// }
|
|
6103
|
+
// }),
|
|
6104
|
+
// this._optionsService.parametersSet.subscribe((set: boolean) => {
|
|
6105
|
+
// if (set) {
|
|
6106
|
+
// this._optionsSet = true;
|
|
6107
|
+
// this.getCategories();
|
|
6108
|
+
// }
|
|
6109
|
+
// })
|
|
6110
|
+
// );
|
|
5987
6111
|
}
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
this.catalogFrame = content;
|
|
5991
|
-
this.catalogFrame.nativeElement.setAttribute('data-password', this.password);
|
|
5992
|
-
this.catalogFrame.nativeElement.setAttribute('data-username', this.username);
|
|
5993
|
-
}
|
|
5994
|
-
}
|
|
5995
|
-
set catalogDefinitionId(value) {
|
|
5996
|
-
this._catalogDefinitionId = value;
|
|
5997
|
-
}
|
|
5998
|
-
get catalogDefinitionId() {
|
|
5999
|
-
return this._catalogDefinitionId;
|
|
6000
|
-
}
|
|
6001
|
-
set externalCatalogStartupInfo(value) {
|
|
6002
|
-
this._externalCatalogStartupInfo = value;
|
|
6003
|
-
this._externalSource = value.externalSource;
|
|
6004
|
-
this.loaded = false;
|
|
6005
|
-
this._prepareExternalSource();
|
|
6112
|
+
ngOnDestroy() {
|
|
6113
|
+
this._subs.forEach(s => s.unsubscribe());
|
|
6006
6114
|
}
|
|
6007
|
-
|
|
6008
|
-
|
|
6115
|
+
setCategory(category) {
|
|
6116
|
+
// this._catalog.category = category;
|
|
6009
6117
|
}
|
|
6010
|
-
|
|
6011
|
-
this.
|
|
6012
|
-
if (!(article instanceof ArticleExtended)) {
|
|
6013
|
-
this.addArticleClick.next({ quantity: 1, article: article });
|
|
6014
|
-
}
|
|
6015
|
-
}));
|
|
6118
|
+
setTurnoverGroup(turnoverGroup) {
|
|
6119
|
+
// this._catalog.turnoverGroup = turnoverGroup;
|
|
6016
6120
|
}
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
this.articleClick.emit({ article: article, settings: { name: this.name, settings: this.externalSettings } });
|
|
6020
|
-
}
|
|
6121
|
+
setExternalSourceUrl(url) {
|
|
6122
|
+
this._catalog.externalSourceUrl = url;
|
|
6021
6123
|
}
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
if (typeof event.data === 'string') {
|
|
6025
|
-
this.iFrameFeedbackReceived.emit(event.data);
|
|
6026
|
-
}
|
|
6027
|
-
else {
|
|
6028
|
-
this.iFrameFeedbackReceived.emit(JSON.stringify(event.data));
|
|
6029
|
-
}
|
|
6030
|
-
//}
|
|
6124
|
+
setIoneSourceUrl(url, ioneUrl, id, username, password) {
|
|
6125
|
+
this._catalog.ioneSourceUrl = url + '?url=' + ioneUrl + '&id=' + id + '&user=' + username + '&pass=' + password;
|
|
6031
6126
|
}
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
event.target.contentWindow.postMessage({
|
|
6035
|
-
'USERNAME': this.username,
|
|
6036
|
-
'PASSWORD': this.password
|
|
6037
|
-
}, '*');
|
|
6038
|
-
}
|
|
6039
|
-
if (this.externalOrderNr && this.vadainCounter === 1) {
|
|
6040
|
-
event.target.contentWindow.postMessage({
|
|
6041
|
-
'EDIT_ORDER': true,
|
|
6042
|
-
'ORDER_ID': this.externalOrderNr
|
|
6043
|
-
}, '*');
|
|
6044
|
-
this.externalOrderNr = null;
|
|
6045
|
-
}
|
|
6046
|
-
this.vadainCounter++;
|
|
6127
|
+
navigateToHome() {
|
|
6128
|
+
this._catalog.reset();
|
|
6047
6129
|
}
|
|
6048
|
-
|
|
6130
|
+
getCategories() {
|
|
6049
6131
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6050
|
-
if (
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
this.
|
|
6054
|
-
this.
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
}
|
|
6069
|
-
else {
|
|
6070
|
-
if (this._externalSource.type !== ExternalCatalogTypes.Webshop) {
|
|
6071
|
-
this.externalUrl = this._externalCatalogStartupInfo.apiUrl;
|
|
6072
|
-
if (this._externalSource.type === ExternalCatalogTypes.Vadain) {
|
|
6073
|
-
this.username = this._externalCatalogStartupInfo.username;
|
|
6074
|
-
this.password = this._externalCatalogStartupInfo.password;
|
|
6075
|
-
this.externalOrderNr = this._externalCatalogStartupInfo.orderId;
|
|
6076
|
-
}
|
|
6077
|
-
}
|
|
6078
|
-
else {
|
|
6079
|
-
this.externalUrl = this._externalSource.url;
|
|
6080
|
-
}
|
|
6081
|
-
this.safeUrl = this._sanitizer.bypassSecurityTrustResourceUrl(this.externalUrl);
|
|
6082
|
-
this.showCatalog = false;
|
|
6083
|
-
window.addEventListener("message", (event) => { this.receiveMessage(event); });
|
|
6084
|
-
}
|
|
6085
|
-
this.loaded = true;
|
|
6132
|
+
// if (this._optionsSet && this._connectionMade) {
|
|
6133
|
+
// try {
|
|
6134
|
+
// this._iOne.getArticleCategories(this._optionsService.parameters.publicationCode).then((cats: ArticleCategory[]) => {
|
|
6135
|
+
// this._catalog.sortTurnoverGroups(cats);
|
|
6136
|
+
// this.navigationCategories = cats;
|
|
6137
|
+
// this.navigationCategories.forEach(cat => this._imageService.getCategoryImage(cat));
|
|
6138
|
+
// this.getTurnoverGroupList();
|
|
6139
|
+
// });
|
|
6140
|
+
// } catch (e) {
|
|
6141
|
+
//
|
|
6142
|
+
// }
|
|
6143
|
+
// }
|
|
6144
|
+
});
|
|
6145
|
+
}
|
|
6146
|
+
getTurnoverGroupList() {
|
|
6147
|
+
this.navigationCategories.forEach((category) => {
|
|
6148
|
+
category.turnoverGroups.forEach(tog => this._imageService.getTurnoverGroupImage(tog));
|
|
6149
|
+
this.allTurnoverGroups.push(...category.turnoverGroups);
|
|
6086
6150
|
});
|
|
6087
6151
|
}
|
|
6088
6152
|
}
|
|
6089
|
-
|
|
6090
|
-
{ type:
|
|
6091
|
-
selector: 'co-catalog-external-source',
|
|
6092
|
-
template: `
|
|
6093
|
-
<ng-container *ngIf="loaded">
|
|
6094
|
-
<ng-container *ngIf="showCatalog">
|
|
6095
|
-
<co-catalog-search
|
|
6096
|
-
[(settings)]="externalSettings"
|
|
6097
|
-
[title]="title"
|
|
6098
|
-
[subTitle]="subTitle"
|
|
6099
|
-
[searchPlaceholder]="searchPlaceholder"
|
|
6100
|
-
[showFilter]="showFilter"
|
|
6101
|
-
[showNavigation]="showNavigation"
|
|
6102
|
-
(onArticleClick)="handleArticleClick($event)"
|
|
6103
|
-
></co-catalog-search>
|
|
6104
|
-
</ng-container>
|
|
6105
|
-
<ng-container *ngIf="!showCatalog">
|
|
6106
|
-
<iframe #catalogFrame width="100%" height="100%" [src]="safeUrl" frameborder="0" allowfullscreen (load)="iframeLoaded($event)"></iframe>
|
|
6107
|
-
</ng-container>
|
|
6108
|
-
</ng-container>
|
|
6109
|
-
`,
|
|
6110
|
-
encapsulation: ViewEncapsulation.None
|
|
6111
|
-
},] }
|
|
6153
|
+
CatalogNavigationService.decorators = [
|
|
6154
|
+
{ type: Injectable }
|
|
6112
6155
|
];
|
|
6113
|
-
|
|
6114
|
-
{ type:
|
|
6156
|
+
CatalogNavigationService.ctorParameters = () => [
|
|
6157
|
+
{ type: CatalogService },
|
|
6115
6158
|
{ type: CatalogConnectorService },
|
|
6116
|
-
{ type:
|
|
6117
|
-
|
|
6118
|
-
CatalogExternalSourceComponent.propDecorators = {
|
|
6119
|
-
container: [{ type: ViewChild, args: ['catalogFrame', { read: ElementRef },] }],
|
|
6120
|
-
catalogDefinitionId: [{ type: Input }],
|
|
6121
|
-
user: [{ type: Input }],
|
|
6122
|
-
externalCatalogStartupInfo: [{ type: Input }],
|
|
6123
|
-
title: [{ type: Input }],
|
|
6124
|
-
subTitle: [{ type: Input }],
|
|
6125
|
-
searchPlaceholder: [{ type: Input }],
|
|
6126
|
-
showFilter: [{ type: Input }],
|
|
6127
|
-
showNavigation: [{ type: Input }],
|
|
6128
|
-
options: [{ type: Input }],
|
|
6129
|
-
name: [{ type: Input }],
|
|
6130
|
-
articleClick: [{ type: Output }],
|
|
6131
|
-
addArticleClick: [{ type: Output }],
|
|
6132
|
-
iFrameFeedbackReceived: [{ type: Output }],
|
|
6133
|
-
showClass: [{ type: HostBinding, args: ['class.co-catalog-external-source',] }]
|
|
6134
|
-
};
|
|
6135
|
-
|
|
6136
|
-
class CatalogExternalSourceModule {
|
|
6137
|
-
}
|
|
6138
|
-
CatalogExternalSourceModule.decorators = [
|
|
6139
|
-
{ type: NgModule, args: [{
|
|
6140
|
-
imports: [
|
|
6141
|
-
CommonModule,
|
|
6142
|
-
CatalogSearchModule.ForRoot()
|
|
6143
|
-
],
|
|
6144
|
-
declarations: [
|
|
6145
|
-
CatalogExternalSourceComponent
|
|
6146
|
-
],
|
|
6147
|
-
exports: [
|
|
6148
|
-
CatalogExternalSourceComponent
|
|
6149
|
-
]
|
|
6150
|
-
},] }
|
|
6159
|
+
{ type: CatalogOptionsService },
|
|
6160
|
+
{ type: CatalogImageService }
|
|
6151
6161
|
];
|
|
6152
6162
|
|
|
6153
6163
|
/**
|
|
6154
6164
|
* Generated bundle index. Do not edit.
|
|
6155
6165
|
*/
|
|
6156
6166
|
|
|
6157
|
-
export {
|
|
6167
|
+
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, VisibilityObserverDirective as ɵba, CatalogSearchResultTileComponent as ɵbb, CatalogSearchBaseComponent as ɵbc, CatalogArticleListComponent as ɵbd, CatalogSearchResultListComponent as ɵbe, CatalogSearchComponent as ɵbf, CatalogExternalSourceComponent as ɵbg, CatalogStockOverviewTileComponent as ɵbh, CatalogStockOverviewListComponent as ɵbi, CatalogStockComparisonTileComponent as ɵbj, CatalogStockComparisonListComponent as ɵbk, CatalogWarehouseTransfersTileComponent as ɵbl, CatalogWarehouseTransfersListComponent as ɵbm, 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, CatalogFilterComponent as ɵp, ResponsiveTextModule as ɵq, ResponsiveTextComponent as ɵr, CatalogCategoriesComponent as ɵs, CatalogExternalSourcesComponent as ɵt, CatalogNavigationComponent as ɵu, CatalogSearchHeaderComponent as ɵv, CatalogArticleTileComponent as ɵw, ArticleBaseComponent as ɵx, VisibilityObserverModule as ɵy, VisibilityObserverMasterDirective as ɵz };
|
|
6158
6168
|
//# sourceMappingURL=colijnit-catalog.js.map
|