@colijnit/product 12.0.2 → 12.0.3

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.
@@ -10,7 +10,7 @@ export declare class ProductSettingsService {
10
10
  settingsLoaded: BehaviorSubject<boolean>;
11
11
  private _settings;
12
12
  constructor(_jsonUtilsService: JsonUtilsService, _dictionaryService: DictionaryService);
13
- initializeSettings(): Promise<void>;
13
+ initializeSettings(finish?: boolean): Promise<void>;
14
14
  createSettingsFromObject(obj: any): Promise<void>;
15
15
  settingsFinished(): Promise<void>;
16
16
  }
@@ -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 = "12.0.2";
35
- this.publishDate = "3-10-2023 14:44:54";
34
+ this.symVer = "12.0.3";
35
+ this.publishDate = "14-10-2023 14:22:44";
36
36
  }
37
37
  return Version;
38
38
  }());
@@ -995,7 +995,8 @@
995
995
  enumerable: false,
996
996
  configurable: true
997
997
  });
998
- ProductSettingsService.prototype.initializeSettings = function () {
998
+ ProductSettingsService.prototype.initializeSettings = function (finish) {
999
+ if (finish === void 0) { finish = true; }
999
1000
  return __awaiter(this, void 0, void 0, function () {
1000
1001
  var jsonSettings;
1001
1002
  return __generator(this, function (_a) {
@@ -1008,13 +1009,17 @@
1008
1009
  if (jsonSettings) {
1009
1010
  this.settings = Object.assign(new ProductSettings(), jsonSettings);
1010
1011
  this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
1011
- this.settingsFinished();
1012
+ if (finish) {
1013
+ this.settingsFinished();
1014
+ }
1012
1015
  }
1013
1016
  return [3 /*break*/, 3];
1014
1017
  case 2:
1015
1018
  this.settings = Object.assign(new ProductSettings(), settings);
1016
1019
  this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
1017
- this.settingsFinished();
1020
+ if (finish) {
1021
+ this.settingsFinished();
1022
+ }
1018
1023
  _a.label = 3;
1019
1024
  case 3: return [2 /*return*/];
1020
1025
  }
@@ -1243,6 +1248,16 @@
1243
1248
  var IoneProductComponent = /** @class */ (function () {
1244
1249
  function IoneProductComponent(_dictionary, _jsonUtils, _ione, _changeDetector, _appEventService, _settingsService) {
1245
1250
  var _this = this;
1251
+ // this.sku = 'CF-HILL';
1252
+ // this.sku = 'CF-ALMADA';
1253
+ // this.sku = 'CF-39904ANT';
1254
+ // this.sku = 'CF-22346001';
1255
+ // this.sku = '104';
1256
+ // this.sku = '1000561986';
1257
+ // this.sku = '1000567768';
1258
+ // this.sku = '1000234793';
1259
+ // this.sku = '1066';
1260
+ // this.sku = '104';
1246
1261
  this._dictionary = _dictionary;
1247
1262
  this._jsonUtils = _jsonUtils;
1248
1263
  this._ione = _ione;
@@ -1259,16 +1274,6 @@
1259
1274
  this.openStockEvent = new i0.EventEmitter();
1260
1275
  this.settingsLoaded = false;
1261
1276
  this._subs = [];
1262
- // this.sku = 'CF-HILL';
1263
- // this.sku = 'CF-ALMADA';
1264
- // this.sku = 'CF-39904ANT';
1265
- // this.sku = 'CF-22346001';
1266
- // this.sku = '104';
1267
- // this.sku = '1000561986';
1268
- // this.sku = '1000567768';
1269
- this.sku = '1000234793';
1270
- // this.sku = '1066';
1271
- // this.sku = '104';
1272
1277
  // this.sku = "70000107";
1273
1278
  this._subs.push(
1274
1279
  // this._dictionary.dictionaryLoaded.subscribe(d => this.upAndLoaded = true),
@@ -1284,15 +1289,12 @@
1284
1289
  },
1285
1290
  set: function (value) {
1286
1291
  if (value) {
1287
- var settings = void 0;
1288
1292
  if (typeof value === 'string') {
1289
- settings = JSON.parse(value);
1293
+ this._settings = JSON.parse(value);
1290
1294
  }
1291
1295
  else {
1292
- settings = value;
1296
+ this._settings = value;
1293
1297
  }
1294
- this._settingsService.createSettingsFromObject(settings);
1295
- // this._initConnection(settings);
1296
1298
  }
1297
1299
  },
1298
1300
  enumerable: false,
@@ -1302,9 +1304,12 @@
1302
1304
  return __awaiter(this, void 0, void 0, function () {
1303
1305
  return __generator(this, function (_a) {
1304
1306
  switch (_a.label) {
1305
- case 0: return [4 /*yield*/, this._settingsService.initializeSettings()];
1307
+ case 0: return [4 /*yield*/, this._settingsService.initializeSettings(this._settings !== undefined)];
1306
1308
  case 1:
1307
1309
  _a.sent();
1310
+ if (this._settings) {
1311
+ this._settingsService.createSettingsFromObject(this._settings);
1312
+ }
1308
1313
  return [2 /*return*/];
1309
1314
  }
1310
1315
  });
@@ -1385,7 +1390,6 @@
1385
1390
  template: "\n <app-product-page *ngIf=\"settingsLoaded\"\n (openStockEvent)=\"openStock()\" [sku]=\"sku\"\n ></app-product-page>\n ",
1386
1391
  providers: [
1387
1392
  ProductEventService,
1388
- ProductSettingsService,
1389
1393
  ProductConnectorAdapterService,
1390
1394
  ProductConnectorService
1391
1395
  ],