@stemy/ngx-dynamic-form 19.9.40 → 19.9.41

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.
@@ -615,6 +615,12 @@ class ConfigForSchemaWrap {
615
615
  const res = await ForbiddenZone.run("customizer", () => this.fieldCustomizer(field, this.forCustomizer(), this.injector, property, schema));
616
616
  return !res ? [field] : handleConfigs(res);
617
617
  }
618
+ options(opts) {
619
+ return new ConfigForSchemaWrap({
620
+ ...this.opts,
621
+ ...opts
622
+ }, this.mode, this.injector, this.schema);
623
+ }
618
624
  forCustomizer() {
619
625
  return new ConfigForSchemaWrap(this.opts, "customizer", this.injector, this.schema);
620
626
  }
@@ -622,7 +628,7 @@ class ConfigForSchemaWrap {
622
628
  return new ConfigForSchemaWrap(this.opts, this.mode, this.injector, schema);
623
629
  }
624
630
  }
625
- async function toWrapOptions(customizeOrOptions, injector, schema, errorMsg) {
631
+ function toWrapOptions(customizeOrOptions, injector, schema, errorMsg) {
626
632
  if (errorMsg && ForbiddenZone.isForbidden("customizer")) {
627
633
  throw new Error(errorMsg);
628
634
  }
@@ -690,7 +696,7 @@ class DynamicFormBuilderService {
690
696
  this.events.languageChanged.subscribe(value => lang.next(value));
691
697
  this.language = lang;
692
698
  }
693
- resolveFormFields(type, parent, options) {
699
+ resolveFormFields(type, parent, options, fieldSet) {
694
700
  const target = type || { prototype: null };
695
701
  const prototype = target.prototype || target;
696
702
  const fields = ReflectUtils.getMetadata("dynamicFormFields", prototype) || new Set();
@@ -700,6 +706,7 @@ class DynamicFormBuilderService {
700
706
  const builder = ReflectUtils.getMetadata("dynamicFormField", prototype, key);
701
707
  const field = builder(this, parent, options);
702
708
  if (field) {
709
+ field.fieldSet = field.fieldSet || fieldSet;
703
710
  result.push(field);
704
711
  }
705
712
  }