pattern="validationUtils.getValidationPattern(property.type)"
[value]="property.isDeclared ? property.value : property.valueObj"
[type]="property.isDeclared ? 'string' : property.type"
+ [childType]="property.schema.property.type"
[name]="property.name"
[path]="property.propertiesName"
(elementChanged)="onElementChanged($event)"
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2018 Nokia
+ * ================================================================================
*/
import * as _ from "lodash";
@ViewChild('target', { read: ViewContainerRef }) target: any;
@Input() type: any;
+ @Input() childType: any;
@Input() name: string;
@Input() testId: string;
@Input() readonly:boolean;
case this.type === 'boolean':
this.elementCreatorIdentifier = DynamicElementComponentCreatorIdentifier.BOOLEAN;
break;
+ case this.type === 'map':
+ this.createElementCreatorIdentifierForChild();
+ break;
default:
this.elementCreatorIdentifier = DynamicElementComponentCreatorIdentifier.DEFAULT;
}
}
}
+ createElementCreatorIdentifierForChild():void{
+ switch(this.childType) {
+ case 'integer':
+ this.elementCreatorIdentifier = DynamicElementComponentCreatorIdentifier.INTEGER;
+ break;
+ case 'float':
+ this.elementCreatorIdentifier = DynamicElementComponentCreatorIdentifier.FLOAT;
+ break;
+ case 'string':
+ this.elementCreatorIdentifier = DynamicElementComponentCreatorIdentifier.STRING;
+ break;
+ case 'boolean':
+ this.elementCreatorIdentifier = DynamicElementComponentCreatorIdentifier.BOOLEAN;
+ break;
+ default:
+ this.elementCreatorIdentifier = DynamicElementComponentCreatorIdentifier.DEFAULT;
+ }
+ }
+
createComponentByIdentifier() {
switch(this.elementCreatorIdentifier) {
case DynamicElementComponentCreatorIdentifier.SUBNETPOOLID: