@pepperi-addons/ngx-lib 0.3.15-loader.27 → 0.3.15-loader.28
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 +14 -4
- package/bundles/pepperi-addons-ngx-lib-form.umd.js.map +1 -1
- package/esm2015/form/dynamic-field-generator.component.js +15 -5
- package/fesm2015/pepperi-addons-ngx-lib-form.js +14 -4
- package/fesm2015/pepperi-addons-ngx-lib-form.js.map +1 -1
- package/form/dynamic-field-generator.component.d.ts +2 -0
- package/form/pepperi-addons-ngx-lib-form.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -3223,6 +3223,8 @@
|
|
|
3223
3223
|
this.internalFormFieldClick = new core.EventEmitter();
|
|
3224
3224
|
this.formValueChange = new core.EventEmitter();
|
|
3225
3225
|
this.formFieldClick = new core.EventEmitter();
|
|
3226
|
+
this.componentMapper = new Map();
|
|
3227
|
+
this.createMap(); //temp - move to singleton service
|
|
3226
3228
|
}
|
|
3227
3229
|
Object.defineProperty(PepDynamicFieldGeneratorComponent.prototype, "field", {
|
|
3228
3230
|
set: function (value) {
|
|
@@ -3238,13 +3240,21 @@
|
|
|
3238
3240
|
PepDynamicFieldGeneratorComponent.prototype.hasProperty = function (obj, prop) {
|
|
3239
3241
|
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
3240
3242
|
};
|
|
3243
|
+
PepDynamicFieldGeneratorComponent.prototype.createMap = function () {
|
|
3244
|
+
this.componentMapper.set('address', address.PepAddressComponent);
|
|
3245
|
+
this.componentMapper.set('attachment', attachment.PepAttachmentComponent);
|
|
3246
|
+
this.componentMapper.set('checkbox', checkbox.PepCheckboxComponent);
|
|
3247
|
+
this.componentMapper.set('date', date.PepDateComponent);
|
|
3248
|
+
this.componentMapper.set('textbox', textbox.PepTextboxComponent);
|
|
3249
|
+
};
|
|
3241
3250
|
PepDynamicFieldGeneratorComponent.prototype.createControlDynamically = function () {
|
|
3242
3251
|
if (this.controlContainer) {
|
|
3243
|
-
|
|
3244
|
-
// const factory = this.
|
|
3252
|
+
//const factory: ComponentFactory<any> = this.getComponentFactory();
|
|
3253
|
+
// const factory = this.componentMapper.get(this._field.controlType);
|
|
3254
|
+
var factory = this._resolver.resolveComponentFactory(textbox.PepTextboxComponent);
|
|
3245
3255
|
if (factory) {
|
|
3256
|
+
// const componentRef: ComponentRef<any> = this.controlContainer.createComponent(factory);
|
|
3246
3257
|
var componentRef = this.controlContainer.createComponent(factory);
|
|
3247
|
-
//const componentRef: ComponentRef<PepTextboxComponent> = this._controlContainer.createComponent(factory);
|
|
3248
3258
|
this._containerRef = componentRef.instance;
|
|
3249
3259
|
this.setBaseProperties();
|
|
3250
3260
|
this.setControlProperties();
|
|
@@ -3363,7 +3373,7 @@
|
|
|
3363
3373
|
{ type: core.ComponentFactoryResolver }
|
|
3364
3374
|
]; };
|
|
3365
3375
|
PepDynamicFieldGeneratorComponent.propDecorators = {
|
|
3366
|
-
controlContainer: [{ type: core.ViewChild, args: ['controlContainer', { read: core.ViewContainerRef
|
|
3376
|
+
controlContainer: [{ type: core.ViewChild, args: ['controlContainer', { read: core.ViewContainerRef },] }],
|
|
3367
3377
|
field: [{ type: core.Input }],
|
|
3368
3378
|
isActive: [{ type: core.Input }],
|
|
3369
3379
|
uid: [{ type: core.Input }],
|