@pepperi-addons/ngx-lib 0.3.15-loader.15 → 0.3.15-loader.18
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/pepperi-addons-ngx-lib-form.umd.js +32 -9
- package/bundles/pepperi-addons-ngx-lib-form.umd.js.map +1 -1
- package/esm2015/form/dynamic-field-generator.component.js +33 -10
- package/fesm2015/pepperi-addons-ngx-lib-form.js +32 -9
- package/fesm2015/pepperi-addons-ngx-lib-form.js.map +1 -1
- package/form/dynamic-field-generator.component.d.ts +3 -1
- package/form/pepperi-addons-ngx-lib-form.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -3248,11 +3248,18 @@
|
|
|
3248
3248
|
PepDynamicFieldGeneratorComponent.prototype.createControlDynamically = function () {
|
|
3249
3249
|
if (this._controlContainer) {
|
|
3250
3250
|
var factory = this.getComponentFactory();
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
this.
|
|
3251
|
+
if (factory) {
|
|
3252
|
+
var componentRef = this._controlContainer.createComponent(factory);
|
|
3253
|
+
this._containerRef = componentRef.instance;
|
|
3254
|
+
this.setBaseProperties();
|
|
3255
|
+
this.setControlProperties();
|
|
3256
|
+
this.setAdditionalProperties();
|
|
3255
3257
|
}
|
|
3258
|
+
else {
|
|
3259
|
+
console.log('no fctory for comp type - ', this._field.controlType);
|
|
3260
|
+
}
|
|
3261
|
+
//if (this._resolvedComponent) {
|
|
3262
|
+
// }
|
|
3256
3263
|
// this.pepList = componentRef.instance;
|
|
3257
3264
|
}
|
|
3258
3265
|
else {
|
|
@@ -3320,17 +3327,33 @@
|
|
|
3320
3327
|
return this._resolver.resolveComponentFactory(PepInternalCaruselComponent);
|
|
3321
3328
|
}
|
|
3322
3329
|
};
|
|
3323
|
-
PepDynamicFieldGeneratorComponent.prototype.
|
|
3330
|
+
PepDynamicFieldGeneratorComponent.prototype.setBaseProperties = function () {
|
|
3331
|
+
switch (this._field.controlType) {
|
|
3332
|
+
case 'textbox':
|
|
3333
|
+
this._containerRef.form = this.form;
|
|
3334
|
+
this._containerRef.showTitle = this.showTitle;
|
|
3335
|
+
this._containerRef.layoutType = this.layoutType;
|
|
3336
|
+
break;
|
|
3337
|
+
}
|
|
3338
|
+
};
|
|
3339
|
+
PepDynamicFieldGeneratorComponent.prototype.setControlProperties = function () {
|
|
3324
3340
|
var _this = this;
|
|
3325
|
-
|
|
3326
|
-
|
|
3341
|
+
// debugger;
|
|
3342
|
+
/*Object.entries(this._field).forEach((prop: [string, any]) => {
|
|
3343
|
+
console.log('prop', prop);
|
|
3344
|
+
if (prop[1] !== undefined && this.hasProperty(this._resolvedComponent.propDecorators, prop[0])) {
|
|
3345
|
+
this._containerRef[prop[0]] = prop[1];
|
|
3346
|
+
}
|
|
3347
|
+
}) */
|
|
3327
3348
|
Object.entries(this._field).forEach(function (prop) {
|
|
3328
3349
|
console.log('prop', prop);
|
|
3329
|
-
if (prop[1] !== undefined && _this.hasProperty(_this.
|
|
3350
|
+
if (prop[1] !== undefined && _this.hasProperty(_this._containerRef, prop[0])) {
|
|
3330
3351
|
_this._containerRef[prop[0]] = prop[1];
|
|
3331
3352
|
}
|
|
3332
3353
|
});
|
|
3333
3354
|
};
|
|
3355
|
+
PepDynamicFieldGeneratorComponent.prototype.setAdditionalProperties = function () {
|
|
3356
|
+
};
|
|
3334
3357
|
return PepDynamicFieldGeneratorComponent;
|
|
3335
3358
|
}());
|
|
3336
3359
|
PepDynamicFieldGeneratorComponent.decorators = [
|
|
@@ -3338,7 +3361,7 @@
|
|
|
3338
3361
|
selector: 'pep-dynamic-field-generator',
|
|
3339
3362
|
template: "<ng-container [formGroup]=\"form\">\n <ng-container #controlContainer></ng-container>\n</ng-container>",
|
|
3340
3363
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
3341
|
-
styles: [""]
|
|
3364
|
+
styles: [":host{width:100%;height:100%}"]
|
|
3342
3365
|
},] }
|
|
3343
3366
|
];
|
|
3344
3367
|
PepDynamicFieldGeneratorComponent.ctorParameters = function () { return [
|