@colijnit/product 256.1.8 → 256.1.10

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.
@@ -1,18 +1,11 @@
1
- import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
- import { JsonUtilsService } from './utils/json-utils.service';
3
- import { ProductConnectorService } from './service/product-connector.service';
4
- import { DictionaryService } from './service/dictionary.service';
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
5
2
  import { ProductEventService } from './service/product-event.service';
6
3
  import { ArticleListObject } from '@colijnit/articleapi/build/model/article-list-object';
7
4
  import { ProductSettingsService } from './service/product-settings.service';
8
5
  import { Selection } from '@colijnit/articleapi/build/model/selection';
9
6
  import { ArticleQuickSel } from '@colijnit/articleapi/build/model/article-quick-sel';
10
7
  import { ArticleListObjectExtended } from '@colijnit/articleapi/build/model/article-list-object-extended.bo';
11
- export declare class IoneProductComponent implements OnInit, OnChanges, OnDestroy {
12
- private _dictionary;
13
- private _jsonUtils;
14
- private _ione;
15
- private _changeDetector;
8
+ export declare class IoneProductComponent implements OnInit, OnDestroy {
16
9
  private _appEventService;
17
10
  private _settingsService;
18
11
  sku: string;
@@ -36,9 +29,8 @@ export declare class IoneProductComponent implements OnInit, OnChanges, OnDestro
36
29
  showHD: boolean;
37
30
  private _settings;
38
31
  private _subs;
39
- constructor(_dictionary: DictionaryService, _jsonUtils: JsonUtilsService, _ione: ProductConnectorService, _changeDetector: ChangeDetectorRef, _appEventService: ProductEventService, _settingsService: ProductSettingsService);
32
+ constructor(_appEventService: ProductEventService, _settingsService: ProductSettingsService);
40
33
  ngOnInit(): Promise<void>;
41
- ngOnChanges(changes: SimpleChanges): void;
42
34
  ngOnDestroy(): void;
43
35
  private _handleAnswerInfoReceived;
44
36
  private _handleAddToCart;
@@ -1,20 +1,10 @@
1
1
  import { SettingsOptions } from './settings-options';
2
2
  import { RenderParameters } from './render-parameters';
3
- import { LanguageCode } from '@colijnit/ioneconnector/build/enum/language-code.enum';
4
- export declare class ProductSettings {
5
- url: string;
6
- schema: string;
7
- version: string;
8
- branch: string;
3
+ import { Options } from '@colijnit/ioneconnector/build/model/options';
4
+ export declare class ProductSettings extends Options {
9
5
  currency: number;
10
- username: string;
11
- password: string;
12
6
  session: any;
13
- useGroups: boolean;
14
- useRenders: boolean;
15
- useLoginEncryption: boolean;
16
7
  createWebOrder: boolean;
17
- useMatch: boolean;
18
8
  assetPath: string;
19
9
  assetIndex: string;
20
10
  currencySymbol: string;
@@ -23,8 +13,6 @@ export declare class ProductSettings {
23
13
  additionalTranslationFile: string;
24
14
  gtm: string;
25
15
  client: string;
26
- timeoutInMs: number;
27
- languageCode: LanguageCode;
28
16
  options: SettingsOptions;
29
17
  renderParameters: RenderParameters;
30
18
  }
@@ -31,8 +31,8 @@
31
31
  function Version() {
32
32
  this.name = "@colijnit/product";
33
33
  this.description = "Product detail page project for iOne";
34
- this.symVer = "256.1.8";
35
- this.publishDate = "24-3-2025 10:57:29";
34
+ this.symVer = "256.1.10";
35
+ this.publishDate = "27-5-2025 10:01:40";
36
36
  }
37
37
  return Version;
38
38
  }());
@@ -514,44 +514,6 @@
514
514
  __disposeResources: __disposeResources,
515
515
  };
516
516
 
517
- var JsonUtilsService = /** @class */ (function () {
518
- function JsonUtilsService() {
519
- }
520
- JsonUtilsService.prototype.readJsonFile = function (filePath) {
521
- return __awaiter(this, void 0, void 0, function () {
522
- var response, e_1;
523
- return __generator(this, function (_a) {
524
- switch (_a.label) {
525
- case 0:
526
- _a.trys.push([0, 2, , 3]);
527
- return [4 /*yield*/, fetch(filePath)];
528
- case 1:
529
- response = _a.sent();
530
- if (!response.ok) {
531
- return [2 /*return*/, null];
532
- }
533
- else {
534
- return [2 /*return*/, response.json()];
535
- }
536
- return [3 /*break*/, 3];
537
- case 2:
538
- e_1 = _a.sent();
539
- console.error('Error getting file:', e_1.message);
540
- return [2 /*return*/, ''];
541
- case 3: return [2 /*return*/];
542
- }
543
- });
544
- });
545
- };
546
- return JsonUtilsService;
547
- }());
548
- JsonUtilsService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function JsonUtilsService_Factory() { return new JsonUtilsService(); }, token: JsonUtilsService, providedIn: "root" });
549
- JsonUtilsService.decorators = [
550
- { type: i0.Injectable, args: [{
551
- providedIn: 'root'
552
- },] }
553
- ];
554
-
555
517
  var SettingsOptions = /** @class */ (function () {
556
518
  function SettingsOptions() {
557
519
  this.showStockStatus = false;
@@ -583,20 +545,19 @@
583
545
  return RenderParameters;
584
546
  }());
585
547
 
586
- var ProductSettings = /** @class */ (function () {
548
+ var ProductSettings = /** @class */ (function (_super) {
549
+ __extends(ProductSettings, _super);
587
550
  function ProductSettings() {
588
- this.session = undefined;
589
- this.useGroups = true;
590
- this.useRenders = false;
591
- this.useLoginEncryption = true;
592
- this.createWebOrder = true;
593
- this.useMatch = false;
594
- this.currencySymbol = '€';
595
- this.options = new SettingsOptions();
596
- this.renderParameters = new RenderParameters();
551
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
552
+ _this.session = undefined;
553
+ _this.createWebOrder = true;
554
+ _this.currencySymbol = '€';
555
+ _this.options = new SettingsOptions();
556
+ _this.renderParameters = new RenderParameters();
557
+ return _this;
597
558
  }
598
559
  return ProductSettings;
599
- }());
560
+ }(options.Options));
600
561
 
601
562
  var ProductEventService = /** @class */ (function () {
602
563
  function ProductEventService() {
@@ -890,6 +851,44 @@
890
851
  { type: ProductEventService }
891
852
  ]; };
892
853
 
854
+ var JsonUtilsService = /** @class */ (function () {
855
+ function JsonUtilsService() {
856
+ }
857
+ JsonUtilsService.prototype.readJsonFile = function (filePath) {
858
+ return __awaiter(this, void 0, void 0, function () {
859
+ var response, e_1;
860
+ return __generator(this, function (_a) {
861
+ switch (_a.label) {
862
+ case 0:
863
+ _a.trys.push([0, 2, , 3]);
864
+ return [4 /*yield*/, fetch(filePath)];
865
+ case 1:
866
+ response = _a.sent();
867
+ if (!response.ok) {
868
+ return [2 /*return*/, null];
869
+ }
870
+ else {
871
+ return [2 /*return*/, response.json()];
872
+ }
873
+ return [3 /*break*/, 3];
874
+ case 2:
875
+ e_1 = _a.sent();
876
+ console.error('Error getting file:', e_1.message);
877
+ return [2 /*return*/, ''];
878
+ case 3: return [2 /*return*/];
879
+ }
880
+ });
881
+ });
882
+ };
883
+ return JsonUtilsService;
884
+ }());
885
+ JsonUtilsService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function JsonUtilsService_Factory() { return new JsonUtilsService(); }, token: JsonUtilsService, providedIn: "root" });
886
+ JsonUtilsService.decorators = [
887
+ { type: i0.Injectable, args: [{
888
+ providedIn: 'root'
889
+ },] }
890
+ ];
891
+
893
892
  var LanguageCode;
894
893
  (function (LanguageCode) {
895
894
  LanguageCode["Dutch"] = "nl-NL";
@@ -1326,7 +1325,7 @@
1326
1325
  ]; };
1327
1326
 
1328
1327
  var IoneProductComponent = /** @class */ (function () {
1329
- function IoneProductComponent(_dictionary, _jsonUtils, _ione, _changeDetector, _appEventService, _settingsService) {
1328
+ function IoneProductComponent(_appEventService, _settingsService) {
1330
1329
  var _this = this;
1331
1330
  // this.sku = 'CF-HILL';
1332
1331
  // this.sku = 'CF-ALMADA';
@@ -1336,16 +1335,10 @@
1336
1335
  // this.sku = '1000561986';
1337
1336
  // this.sku = '1000567768';
1338
1337
  // this.sku = '1000234793';
1339
- // this.sku = '001-123';
1340
1338
  // this.sku = '1066';
1341
1339
  // this.sku = '104';
1342
1340
  // this.sku = "70000107";
1343
1341
  // this.sku = "grover";
1344
- // this.sku = "22000";
1345
- this._dictionary = _dictionary;
1346
- this._jsonUtils = _jsonUtils;
1347
- this._ione = _ione;
1348
- this._changeDetector = _changeDetector;
1349
1342
  this._appEventService = _appEventService;
1350
1343
  this._settingsService = _settingsService;
1351
1344
  this.handleAddArticleInternally = true;
@@ -1360,9 +1353,7 @@
1360
1353
  this.settingsLoaded = false;
1361
1354
  this.showHD = false;
1362
1355
  this._subs = [];
1363
- this._subs.push(
1364
- // this._dictionary.dictionaryLoaded.subscribe(d => this.upAndLoaded = true),
1365
- this._appEventService.onAddToCart.subscribe(function (data) {
1356
+ this._subs.push(this._appEventService.onAddToCart.subscribe(function (data) {
1366
1357
  _this._handleAddToCart(data);
1367
1358
  }), this._appEventService.onAddToQuote.subscribe(function (json) { return _this.onAddToQuote.emit(json); }), this._appEventService.onAlternativeClick.subscribe(function (article) { return _this.onAlternativeClick.emit(article); }), this._appEventService.onArticleInfoReceived.subscribe(function (info) { return _this._handleAnswerInfoReceived(info); }), this._appEventService.onArticleReceived.subscribe(function (article) { return _this.onArticleReceived.emit(article); }), this._appEventService.onSelectionsReceived.subscribe(function (selections) { return _this.onSelectionsReceived.emit(selections); }), this._settingsService.settingsLoaded.subscribe(function (loaded) {
1368
1359
  _this.settingsLoaded = loaded;
@@ -1400,9 +1391,6 @@
1400
1391
  });
1401
1392
  });
1402
1393
  };
1403
- IoneProductComponent.prototype.ngOnChanges = function (changes) {
1404
- this._changeDetector.detectChanges();
1405
- };
1406
1394
  IoneProductComponent.prototype.ngOnDestroy = function () {
1407
1395
  this._subs.forEach(function (s) { return s.unsubscribe(); });
1408
1396
  };
@@ -1426,15 +1414,17 @@
1426
1414
  { type: i0.Component, args: [{
1427
1415
  selector: 'app-ione-product',
1428
1416
  template: "\n <app-product-page *ngIf=\"settingsLoaded\"\n [createFrozenArticle]=\"handleAddArticleInternally\"\n [isReturn]=\"isReturn\"\n (openStockEvent)=\"openStock()\"\n [sku]=\"sku\"\n [showRelatedProductsPopup]=\"showRelatedProductsPopup\"\n ></app-product-page>\n<!-- <co-button [label]=\"'click'\" (click)=\"showHD = !showHD\"></co-button>\n <co-product-hd [sku]=\"'657946ca-e1e1-41fd-7ae0-08dbf7df0cef'\" *ngIf=\"showHD\"></co-product-hd>-->\n ",
1417
+ providers: [
1418
+ ProductSettingsService,
1419
+ ProductConnectorService,
1420
+ ProductEventService,
1421
+ ProductConnectorAdapterService
1422
+ ],
1429
1423
  encapsulation: i0.ViewEncapsulation.Emulated,
1430
1424
  styles: [""]
1431
1425
  },] }
1432
1426
  ];
1433
1427
  IoneProductComponent.ctorParameters = function () { return [
1434
- { type: DictionaryService },
1435
- { type: JsonUtilsService },
1436
- { type: ProductConnectorService },
1437
- { type: i0.ChangeDetectorRef },
1438
1428
  { type: ProductEventService },
1439
1429
  { type: ProductSettingsService }
1440
1430
  ]; };
@@ -3864,12 +3854,6 @@
3864
3854
  ],
3865
3855
  bootstrap: [
3866
3856
  IoneProductComponent
3867
- ],
3868
- providers: [
3869
- ProductSettingsService,
3870
- ProductConnectorService,
3871
- ProductEventService,
3872
- ProductConnectorAdapterService
3873
3857
  ]
3874
3858
  },] }
3875
3859
  ];