@stemy/ngx-dynamic-form 13.2.1 → 13.2.3

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.
@@ -619,6 +619,26 @@ class DynamicFormService extends DynamicFormService$1 {
619
619
  const models = await this.getFormControlModels(property, schema, customizeModels);
620
620
  controls.push(...models);
621
621
  }
622
+ const config = { id: "root", group: controls };
623
+ const root = await customizeModels({
624
+ id: "root",
625
+ type: "object",
626
+ properties: schema.properties
627
+ }, schema, DynamicFormGroupModel, config);
628
+ if (!root) {
629
+ return controls;
630
+ }
631
+ if (Array.isArray(root)) {
632
+ controls.length = 0;
633
+ for (const model of root) {
634
+ if (model instanceof DynamicFormGroupModel) {
635
+ controls.push(...model.group);
636
+ }
637
+ else {
638
+ controls.push(model);
639
+ }
640
+ }
641
+ }
622
642
  return controls.filter(t => null !== t);
623
643
  }
624
644
  checkIsEditorProperty(property) {
@@ -722,6 +742,9 @@ class DynamicFormService extends DynamicFormService$1 {
722
742
  getFormInputConfig(property, schema) {
723
743
  let inputType = StringUtils.has(property.id, "password", "Password") ? "password" : (property.format || property.items?.type || property.type);
724
744
  switch (inputType) {
745
+ case "string":
746
+ inputType = "text";
747
+ break;
725
748
  case "boolean":
726
749
  inputType = "checkbox";
727
750
  break;