@pepperi-addons/ngx-lib 0.3.15-loader.12 → 0.3.15-loader.15

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.
@@ -3233,8 +3233,11 @@
3233
3233
  });
3234
3234
  Object.defineProperty(PepDynamicFieldGeneratorComponent.prototype, "field", {
3235
3235
  set: function (value) {
3236
+ var _this = this;
3236
3237
  this._field = value;
3237
- this.createControlDynamically();
3238
+ setTimeout(function () {
3239
+ _this.createControlDynamically();
3240
+ }, 0);
3238
3241
  },
3239
3242
  enumerable: false,
3240
3243
  configurable: true
@@ -3247,7 +3250,9 @@
3247
3250
  var factory = this.getComponentFactory();
3248
3251
  var componentRef = this._controlContainer.createComponent(factory);
3249
3252
  this._containerRef = componentRef.instance;
3250
- this.setControlVariables();
3253
+ if (this._resolvedComponent) {
3254
+ this.setControlVariables();
3255
+ }
3251
3256
  // this.pepList = componentRef.instance;
3252
3257
  }
3253
3258
  else {
@@ -3257,42 +3262,61 @@
3257
3262
  PepDynamicFieldGeneratorComponent.prototype.getComponentFactory = function () {
3258
3263
  switch (this._field.controlType) {
3259
3264
  case 'address':
3265
+ this._resolvedComponent = address.PepAddressComponent;
3260
3266
  return this._resolver.resolveComponentFactory(address.PepAddressComponent);
3261
3267
  case 'attachment':
3268
+ this._resolvedComponent = attachment.PepAttachmentComponent;
3262
3269
  return this._resolver.resolveComponentFactory(attachment.PepAttachmentComponent);
3263
3270
  case 'checkbox':
3271
+ this._resolvedComponent = checkbox.PepCheckboxComponent;
3264
3272
  return this._resolver.resolveComponentFactory(checkbox.PepCheckboxComponent);
3265
3273
  case 'date':
3274
+ this._resolvedComponent = date.PepDateComponent;
3266
3275
  return this._resolver.resolveComponentFactory(date.PepDateComponent);
3267
3276
  case 'image':
3277
+ this._resolvedComponent = image.PepImageComponent;
3268
3278
  return this._resolver.resolveComponentFactory(image.PepImageComponent);
3269
3279
  case 'images':
3280
+ this._resolvedComponent = imagesFilmstrip.PepImagesFilmstripComponent;
3270
3281
  return this._resolver.resolveComponentFactory(imagesFilmstrip.PepImagesFilmstripComponent);
3271
3282
  case 'qs':
3283
+ this._resolvedComponent = quantitySelector.PepQuantitySelectorComponent;
3272
3284
  return this._resolver.resolveComponentFactory(quantitySelector.PepQuantitySelectorComponent);
3273
3285
  case 'richhtmltextarea':
3286
+ this._resolvedComponent = richHtmlTextarea.PepRichHtmlTextareaComponent;
3274
3287
  return this._resolver.resolveComponentFactory(richHtmlTextarea.PepRichHtmlTextareaComponent);
3275
3288
  case 'select':
3289
+ this._resolvedComponent = select.PepSelectComponent;
3276
3290
  return this._resolver.resolveComponentFactory(select.PepSelectComponent);
3277
3291
  case 'separator':
3292
+ this._resolvedComponent = separator.PepSeparatorComponent;
3278
3293
  return this._resolver.resolveComponentFactory(separator.PepSeparatorComponent);
3279
3294
  /*case 'signature':
3295
+ this._resolvedComponent = PepSignatureComponent;
3280
3296
  return this._resolver.resolveComponentFactory(PepSignatureComponent); */
3281
3297
  case 'textarea':
3298
+ this._resolvedComponent = textarea.PepTextareaComponent;
3282
3299
  return this._resolver.resolveComponentFactory(textarea.PepTextareaComponent);
3283
3300
  case 'textbox':
3301
+ this._resolvedComponent = textbox.PepTextboxComponent;
3284
3302
  return this._resolver.resolveComponentFactory(textbox.PepTextboxComponent);
3285
3303
  case 'link':
3304
+ this._resolvedComponent = link.PepLinkComponent;
3286
3305
  return this._resolver.resolveComponentFactory(link.PepLinkComponent);
3287
3306
  case 'indicators':
3307
+ this._resolvedComponent = PepIndicatorsComponent;
3288
3308
  return this._resolver.resolveComponentFactory(PepIndicatorsComponent);
3289
3309
  case 'button':
3310
+ this._resolvedComponent = PepInternalButtonComponent;
3290
3311
  return this._resolver.resolveComponentFactory(PepInternalButtonComponent);
3291
3312
  case 'menu':
3313
+ this._resolvedComponent = PepInternalMenuComponent;
3292
3314
  return this._resolver.resolveComponentFactory(PepInternalMenuComponent);
3293
3315
  case 'internalPage':
3316
+ this._resolvedComponent = PepInternalPageComponent;
3294
3317
  return this._resolver.resolveComponentFactory(PepInternalPageComponent);
3295
3318
  case 'internalCarusel':
3319
+ this._resolvedComponent = PepInternalCaruselComponent;
3296
3320
  return this._resolver.resolveComponentFactory(PepInternalCaruselComponent);
3297
3321
  }
3298
3322
  };
@@ -3302,7 +3326,7 @@
3302
3326
  debugger;
3303
3327
  Object.entries(this._field).forEach(function (prop) {
3304
3328
  console.log('prop', prop);
3305
- if (_this.hasProperty(PepInternalMenuComponent, prop[0])) {
3329
+ if (prop[1] !== undefined && _this.hasProperty(_this._resolvedComponent.propDecorators, prop[0])) {
3306
3330
  _this._containerRef[prop[0]] = prop[1];
3307
3331
  }
3308
3332
  });