@pepperi-addons/ngx-lib 0.3.15-loader.25 → 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 +16 -13
- package/bundles/pepperi-addons-ngx-lib-form.umd.js.map +1 -1
- package/esm2015/form/dynamic-field-generator.component.js +17 -10
- package/fesm2015/pepperi-addons-ngx-lib-form.js +16 -9
- package/fesm2015/pepperi-addons-ngx-lib-form.js.map +1 -1
- package/form/dynamic-field-generator.component.d.ts +3 -2
- package/form/pepperi-addons-ngx-lib-form.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -3223,14 +3223,9 @@
|
|
|
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
|
-
Object.defineProperty(PepDynamicFieldGeneratorComponent.prototype, "controlContainer", {
|
|
3228
|
-
set: function (val) {
|
|
3229
|
-
this._controlContainer = val;
|
|
3230
|
-
},
|
|
3231
|
-
enumerable: false,
|
|
3232
|
-
configurable: true
|
|
3233
|
-
});
|
|
3234
3229
|
Object.defineProperty(PepDynamicFieldGeneratorComponent.prototype, "field", {
|
|
3235
3230
|
set: function (value) {
|
|
3236
3231
|
var _this = this;
|
|
@@ -3245,13 +3240,21 @@
|
|
|
3245
3240
|
PepDynamicFieldGeneratorComponent.prototype.hasProperty = function (obj, prop) {
|
|
3246
3241
|
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
3247
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
|
+
};
|
|
3248
3250
|
PepDynamicFieldGeneratorComponent.prototype.createControlDynamically = function () {
|
|
3249
|
-
if (this.
|
|
3250
|
-
|
|
3251
|
-
// const factory = this.
|
|
3251
|
+
if (this.controlContainer) {
|
|
3252
|
+
//const factory: ComponentFactory<any> = this.getComponentFactory();
|
|
3253
|
+
// const factory = this.componentMapper.get(this._field.controlType);
|
|
3254
|
+
var factory = this._resolver.resolveComponentFactory(textbox.PepTextboxComponent);
|
|
3252
3255
|
if (factory) {
|
|
3253
|
-
|
|
3254
|
-
|
|
3256
|
+
// const componentRef: ComponentRef<any> = this.controlContainer.createComponent(factory);
|
|
3257
|
+
var componentRef = this.controlContainer.createComponent(factory);
|
|
3255
3258
|
this._containerRef = componentRef.instance;
|
|
3256
3259
|
this.setBaseProperties();
|
|
3257
3260
|
this.setControlProperties();
|
|
@@ -3370,7 +3373,7 @@
|
|
|
3370
3373
|
{ type: core.ComponentFactoryResolver }
|
|
3371
3374
|
]; };
|
|
3372
3375
|
PepDynamicFieldGeneratorComponent.propDecorators = {
|
|
3373
|
-
controlContainer: [{ type: core.ViewChild, args: ['controlContainer', { read: core.ViewContainerRef
|
|
3376
|
+
controlContainer: [{ type: core.ViewChild, args: ['controlContainer', { read: core.ViewContainerRef },] }],
|
|
3374
3377
|
field: [{ type: core.Input }],
|
|
3375
3378
|
isActive: [{ type: core.Input }],
|
|
3376
3379
|
uid: [{ type: core.Input }],
|