@ngx-formly/core 7.1.0 → 8.0.0

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.
Files changed (67) hide show
  1. package/README.md +10 -0
  2. package/fesm2022/ngx-formly-core-json-schema.mjs +159 -39
  3. package/fesm2022/ngx-formly-core-json-schema.mjs.map +1 -1
  4. package/fesm2022/ngx-formly-core-preset.mjs +4 -4
  5. package/fesm2022/ngx-formly-core-preset.mjs.map +1 -1
  6. package/fesm2022/ngx-formly-core-select.mjs +28 -21
  7. package/fesm2022/ngx-formly-core-select.mjs.map +1 -1
  8. package/fesm2022/ngx-formly-core-testing.mjs +3 -3
  9. package/fesm2022/ngx-formly-core-testing.mjs.map +1 -1
  10. package/fesm2022/ngx-formly-core.mjs +129 -73
  11. package/fesm2022/ngx-formly-core.mjs.map +1 -1
  12. package/json-schema/formly-json-schema.service.d.ts +5 -0
  13. package/lib/components/formly.field.d.ts +7 -4
  14. package/lib/core.d.ts +1 -1
  15. package/lib/core.module.d.ts +7 -0
  16. package/lib/templates/field-array.type.d.ts +1 -1
  17. package/lib/templates/field.type.d.ts +1 -1
  18. package/lib/templates/field.wrapper.d.ts +1 -1
  19. package/lib/templates/formly.attributes.d.ts +5 -2
  20. package/lib/templates/formly.validation-message.d.ts +2 -2
  21. package/package.json +2 -12
  22. package/select/select-options.pipe.d.ts +1 -0
  23. package/esm2022/json-schema/formly-json-schema.service.mjs +0 -728
  24. package/esm2022/json-schema/ngx-formly-core-json-schema.mjs +0 -5
  25. package/esm2022/json-schema/public_api.mjs +0 -2
  26. package/esm2022/lib/components/formly.field.mjs +0 -292
  27. package/esm2022/lib/components/formly.form.mjs +0 -171
  28. package/esm2022/lib/components/formly.template.mjs +0 -36
  29. package/esm2022/lib/core.config.mjs +0 -66
  30. package/esm2022/lib/core.mjs +0 -20
  31. package/esm2022/lib/core.module.mjs +0 -74
  32. package/esm2022/lib/extensions/core/core.mjs +0 -144
  33. package/esm2022/lib/extensions/field-expression/field-expression.mjs +0 -8
  34. package/esm2022/lib/extensions/field-expression/utils.mjs +0 -459
  35. package/esm2022/lib/extensions/field-expression-legacy/field-expression.mjs +0 -249
  36. package/esm2022/lib/extensions/field-expression-legacy/utils.mjs +0 -20
  37. package/esm2022/lib/extensions/field-form/field-form.mjs +0 -141
  38. package/esm2022/lib/extensions/field-form/utils.mjs +0 -100
  39. package/esm2022/lib/extensions/field-validation/field-validation.mjs +0 -135
  40. package/esm2022/lib/models/config.mjs +0 -2
  41. package/esm2022/lib/models/fieldconfig.cache.mjs +0 -2
  42. package/esm2022/lib/models/fieldconfig.mjs +0 -2
  43. package/esm2022/lib/models/index.mjs +0 -4
  44. package/esm2022/lib/services/formly.builder.mjs +0 -98
  45. package/esm2022/lib/services/formly.config.mjs +0 -236
  46. package/esm2022/lib/templates/field-array.type.mjs +0 -84
  47. package/esm2022/lib/templates/field-template.type.mjs +0 -34
  48. package/esm2022/lib/templates/field.type.mjs +0 -57
  49. package/esm2022/lib/templates/field.wrapper.mjs +0 -21
  50. package/esm2022/lib/templates/formly.attributes.mjs +0 -201
  51. package/esm2022/lib/templates/formly.group.mjs +0 -31
  52. package/esm2022/lib/templates/formly.validation-message.mjs +0 -84
  53. package/esm2022/lib/utils.mjs +0 -313
  54. package/esm2022/ngx-formly-core.mjs +0 -5
  55. package/esm2022/preset/ngx-formly-core-preset.mjs +0 -5
  56. package/esm2022/preset/preset-substitution.extension.mjs +0 -30
  57. package/esm2022/preset/preset.config.mjs +0 -11
  58. package/esm2022/preset/preset.module.mjs +0 -18
  59. package/esm2022/preset/public_api.mjs +0 -3
  60. package/esm2022/public_api.mjs +0 -5
  61. package/esm2022/select/ngx-formly-core-select.mjs +0 -5
  62. package/esm2022/select/public_api.mjs +0 -3
  63. package/esm2022/select/select-options.pipe.mjs +0 -108
  64. package/esm2022/select/select.module.mjs +0 -16
  65. package/esm2022/testing/component-factory.mjs +0 -86
  66. package/esm2022/testing/ngx-formly-core-testing.mjs +0 -5
  67. package/esm2022/testing/public_api.mjs +0 -2
@@ -1,9 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Type, TemplateRef, ComponentRef, ChangeDetectorRef, ɵNoopNgZone as _NoopNgZone, VERSION, Input, ViewChildren, Directive, ChangeDetectionStrategy, Component, Injectable, ViewContainerRef, ViewChild, Optional, InjectionToken, inject, Inject, EventEmitter, ContentChildren, Output, NgModule } from '@angular/core';
2
+ import { Type, TemplateRef, ComponentRef, ChangeDetectorRef, ɵNoopNgZone as _NoopNgZone, VERSION, Input, ViewChildren, Directive, ChangeDetectionStrategy, Component, Injectable, Injector, ViewContainerRef, ViewChild, Optional, InjectionToken, inject, Inject, EventEmitter, ContentChildren, Output, NgModule } from '@angular/core';
3
3
  import { isObservable, Observable, Subject, of, merge } from 'rxjs';
4
4
  import * as i2 from '@angular/forms';
5
5
  import { AbstractControl, UntypedFormArray, UntypedFormGroup, FormControl, UntypedFormControl, Validators, NgControl } from '@angular/forms';
6
- import { tap, map, distinctUntilChanged, startWith, debounceTime, filter, switchMap, take } from 'rxjs/operators';
6
+ import { tap, map, startWith, distinctUntilChanged, skip, debounceTime, filter, switchMap, take } from 'rxjs/operators';
7
7
  import * as i1 from '@angular/platform-browser';
8
8
  import * as i2$1 from '@angular/common';
9
9
  import { DOCUMENT, AsyncPipe, CommonModule } from '@angular/common';
@@ -1594,10 +1594,10 @@ class FieldType {
1594
1594
  get formState() {
1595
1595
  return this.options?.formState || {};
1596
1596
  }
1597
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FieldType, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1598
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: FieldType, inputs: { field: "field" }, viewQueries: [{ propertyName: "_formlyControls", predicate: NgControl, descendants: true }], ngImport: i0 }); }
1597
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FieldType, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1598
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: FieldType, isStandalone: true, inputs: { field: "field" }, viewQueries: [{ propertyName: "_formlyControls", predicate: NgControl, descendants: true }], ngImport: i0 }); }
1599
1599
  }
1600
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FieldType, decorators: [{
1600
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FieldType, decorators: [{
1601
1601
  type: Directive
1602
1602
  }], propDecorators: { _formlyControls: [{
1603
1603
  type: ViewChildren,
@@ -1624,15 +1624,16 @@ class FormlyTemplateType extends FieldType {
1624
1624
  this.sanitizer = sanitizer;
1625
1625
  this.innerHtml = {};
1626
1626
  }
1627
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyTemplateType, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
1628
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormlyTemplateType, selector: "formly-template", usesInheritance: true, ngImport: i0, template: `<div [innerHtml]="template"></div>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1627
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyTemplateType, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
1628
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: FormlyTemplateType, isStandalone: false, selector: "formly-template", usesInheritance: true, ngImport: i0, template: `<div [innerHtml]="template"></div>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1629
1629
  }
1630
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyTemplateType, decorators: [{
1630
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyTemplateType, decorators: [{
1631
1631
  type: Component,
1632
1632
  args: [{
1633
1633
  selector: 'formly-template',
1634
1634
  template: `<div [innerHtml]="template"></div>`,
1635
1635
  changeDetection: ChangeDetectionStrategy.OnPush,
1636
+ standalone: false,
1636
1637
  }]
1637
1638
  }], ctorParameters: () => [{ type: i1.DomSanitizer }] });
1638
1639
 
@@ -1861,10 +1862,10 @@ class FormlyConfig {
1861
1862
  this.types[name].wrappers = extendedType.wrappers;
1862
1863
  }
1863
1864
  }
1864
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1865
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyConfig, providedIn: 'root' }); }
1865
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1866
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyConfig, providedIn: 'root' }); }
1866
1867
  }
1867
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyConfig, decorators: [{
1868
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyConfig, decorators: [{
1868
1869
  type: Injectable,
1869
1870
  args: [{ providedIn: 'root' }]
1870
1871
  }] });
@@ -1876,10 +1877,10 @@ class FormlyTemplate {
1876
1877
  ngOnChanges() {
1877
1878
  this.name = this.name || 'formly-group';
1878
1879
  }
1879
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyTemplate, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1880
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: FormlyTemplate, isStandalone: true, selector: "[formlyTemplate]", inputs: { name: ["formlyTemplate", "name"] }, usesOnChanges: true, ngImport: i0 }); }
1880
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyTemplate, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1881
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: FormlyTemplate, isStandalone: true, selector: "[formlyTemplate]", inputs: { name: ["formlyTemplate", "name"] }, usesOnChanges: true, ngImport: i0 }); }
1881
1882
  }
1882
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyTemplate, decorators: [{
1883
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyTemplate, decorators: [{
1883
1884
  type: Directive,
1884
1885
  args: [{ selector: '[formlyTemplate]', standalone: true }]
1885
1886
  }], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { name: [{
@@ -1887,19 +1888,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1887
1888
  args: ['formlyTemplate']
1888
1889
  }] } });
1889
1890
  class LegacyFormlyTemplate extends FormlyTemplate {
1890
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LegacyFormlyTemplate, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
1891
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: LegacyFormlyTemplate, selector: "[formlyTemplate]", usesInheritance: true, ngImport: i0 }); }
1891
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LegacyFormlyTemplate, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
1892
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: LegacyFormlyTemplate, isStandalone: false, selector: "[formlyTemplate]", usesInheritance: true, ngImport: i0 }); }
1892
1893
  }
1893
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LegacyFormlyTemplate, decorators: [{
1894
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LegacyFormlyTemplate, decorators: [{
1894
1895
  type: Directive,
1895
1896
  args: [{ selector: '[formlyTemplate]', standalone: false }]
1896
1897
  }] });
1897
1898
  // workarround for https://github.com/angular/angular/issues/43227#issuecomment-904173738
1898
1899
  class FormlyFieldTemplates {
1899
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyFieldTemplates, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1900
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyFieldTemplates }); }
1900
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyFieldTemplates, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1901
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyFieldTemplates }); }
1901
1902
  }
1902
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyFieldTemplates, decorators: [{
1903
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyFieldTemplates, decorators: [{
1903
1904
  type: Injectable
1904
1905
  }] });
1905
1906
 
@@ -1919,11 +1920,12 @@ class FormlyField {
1919
1920
  }
1920
1921
  return null;
1921
1922
  }
1922
- constructor(config, renderer, _elementRef, hostContainerRef, form) {
1923
+ constructor(config, renderer, _elementRef, hostContainerRef, injector, form) {
1923
1924
  this.config = config;
1924
1925
  this.renderer = renderer;
1925
1926
  this._elementRef = _elementRef;
1926
1927
  this.hostContainerRef = hostContainerRef;
1928
+ this.injector = injector;
1927
1929
  this.form = form;
1928
1930
  this.hostObservers = [];
1929
1931
  this.componentRefs = [];
@@ -1986,7 +1988,7 @@ class FormlyField {
1986
1988
  const inlineType = this.form?.templates?.find((ref) => ref.name === f.type);
1987
1989
  let ref;
1988
1990
  if (inlineType) {
1989
- ref = containerRef.createEmbeddedView(inlineType.ref, { $implicit: f });
1991
+ ref = containerRef.createEmbeddedView(inlineType.ref, { $implicit: f }, { injector: this.createFieldInjector() });
1990
1992
  }
1991
1993
  else {
1992
1994
  const { component } = this.config.getType(f.type, true);
@@ -2014,6 +2016,28 @@ class FormlyField {
2014
2016
  this.render();
2015
2017
  }
2016
2018
  }
2019
+ attachLocalField(field, previousField) {
2020
+ const currentField = this.field;
2021
+ if (!currentField) {
2022
+ return;
2023
+ }
2024
+ const localFields = (currentField._localFields || []).filter((f) => f !== field && f !== previousField);
2025
+ if (field && field !== currentField) {
2026
+ localFields.push(field);
2027
+ }
2028
+ if (currentField._localFields) {
2029
+ currentField._localFields = localFields;
2030
+ }
2031
+ else if (localFields.length > 0) {
2032
+ defineHiddenProp(currentField, '_localFields', localFields);
2033
+ }
2034
+ }
2035
+ createFieldInjector() {
2036
+ return Injector.create({
2037
+ providers: [{ provide: FormlyField, useValue: this }],
2038
+ parent: this.injector,
2039
+ });
2040
+ }
2017
2041
  attachComponentRef(ref, field) {
2018
2042
  this.componentRefs.push(ref);
2019
2043
  field._componentRefs.push(ref);
@@ -2123,7 +2147,7 @@ class FormlyField {
2123
2147
  }
2124
2148
  if (field.formControl && !field.fieldGroup) {
2125
2149
  const control = field.formControl;
2126
- let valueChanges = control.valueChanges.pipe(map((value) => {
2150
+ let valueChanges = control.valueChanges.pipe(startWith(control.value), map((value) => {
2127
2151
  field.parsers?.map((parserFn) => (value = parserFn(value, field)));
2128
2152
  if (!Object.is(value, field.formControl.value)) {
2129
2153
  field.formControl.setValue(value);
@@ -2134,7 +2158,7 @@ class FormlyField {
2134
2158
  return false;
2135
2159
  }
2136
2160
  return true;
2137
- }));
2161
+ }), skip(1));
2138
2162
  if (control.value !== getFieldValue(field)) {
2139
2163
  valueChanges = valueChanges.pipe(startWith(control.value));
2140
2164
  }
@@ -2164,13 +2188,13 @@ class FormlyField {
2164
2188
  templateFieldsSubs.forEach((unsubscribe) => unsubscribe());
2165
2189
  };
2166
2190
  }
2167
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyField, deps: [{ token: FormlyConfig }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: FormlyFieldTemplates, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
2168
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormlyField, isStandalone: true, selector: "formly-field", inputs: { field: "field" }, viewQueries: [{ propertyName: "viewContainerRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: '<ng-template #container></ng-template>', isInline: true, styles: [":host:empty{display:none}\n"] }); }
2191
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyField, deps: [{ token: FormlyConfig }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.Injector }, { token: FormlyFieldTemplates, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
2192
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: FormlyField, isStandalone: true, selector: "formly-field", inputs: { field: "field" }, viewQueries: [{ propertyName: "viewContainerRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: '<ng-template #container></ng-template>', isInline: true, styles: [":host:empty{display:none}\n"] }); }
2169
2193
  }
2170
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyField, decorators: [{
2194
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyField, decorators: [{
2171
2195
  type: Component,
2172
2196
  args: [{ selector: 'formly-field', template: '<ng-template #container></ng-template>', standalone: true, styles: [":host:empty{display:none}\n"] }]
2173
- }], ctorParameters: () => [{ type: FormlyConfig }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: FormlyFieldTemplates, decorators: [{
2197
+ }], ctorParameters: () => [{ type: FormlyConfig }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.Injector }, { type: FormlyFieldTemplates, decorators: [{
2174
2198
  type: Optional
2175
2199
  }] }], propDecorators: { field: [{
2176
2200
  type: Input
@@ -2179,25 +2203,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2179
2203
  args: ['container', { read: ViewContainerRef, static: true }]
2180
2204
  }] } });
2181
2205
  class LegacyFormlyField extends FormlyField {
2182
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LegacyFormlyField, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2183
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: LegacyFormlyField, selector: "formly-field", usesInheritance: true, ngImport: i0, template: '<ng-template #container></ng-template>', isInline: true, styles: [":host:empty{display:none}\n"] }); }
2206
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LegacyFormlyField, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2207
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: LegacyFormlyField, isStandalone: false, selector: "formly-field", usesInheritance: true, ngImport: i0, template: '<ng-template #container></ng-template>', isInline: true, styles: [":host:empty{display:none}\n"] }); }
2184
2208
  }
2185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LegacyFormlyField, decorators: [{
2209
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LegacyFormlyField, decorators: [{
2186
2210
  type: Component,
2187
2211
  args: [{ selector: 'formly-field', template: '<ng-template #container></ng-template>', standalone: false, styles: [":host:empty{display:none}\n"] }]
2188
2212
  }] });
2189
2213
 
2190
2214
  /** @ignore */
2191
2215
  class FormlyGroup extends FieldType {
2192
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyGroup, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2193
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormlyGroup, selector: "formly-group", host: { properties: { "class": "field.fieldGroupClassName || \"\"" } }, usesInheritance: true, ngImport: i0, template: `
2216
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyGroup, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2217
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: FormlyGroup, isStandalone: false, selector: "formly-group", host: { properties: { "class": "field.fieldGroupClassName || \"\"" } }, usesInheritance: true, ngImport: i0, template: `
2194
2218
  @for (f of field.fieldGroup; track $index) {
2195
2219
  <formly-field [field]="f"></formly-field>
2196
2220
  }
2197
2221
  <ng-content></ng-content>
2198
2222
  `, isInline: true, dependencies: [{ kind: "component", type: LegacyFormlyField, selector: "formly-field" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2199
2223
  }
2200
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyGroup, decorators: [{
2224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyGroup, decorators: [{
2201
2225
  type: Component,
2202
2226
  args: [{
2203
2227
  selector: 'formly-group',
@@ -2211,6 +2235,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2211
2235
  '[class]': 'field.fieldGroupClassName || ""',
2212
2236
  },
2213
2237
  changeDetection: ChangeDetectionStrategy.OnPush,
2238
+ standalone: false,
2214
2239
  }]
2215
2240
  }] });
2216
2241
 
@@ -2249,6 +2274,7 @@ function withFormlyFieldExpression() {
2249
2274
  }
2250
2275
  const provideFormlyCore = (configs = []) => {
2251
2276
  return [
2277
+ FormlyConfig,
2252
2278
  { provide: FORMLY_CONFIG, multi: true, useFactory: withDefaultConfig, deps: [FormlyConfig] },
2253
2279
  provideFormlyConfig(configs),
2254
2280
  ];
@@ -2262,8 +2288,9 @@ const provideFormlyConfig = (configs = []) => {
2262
2288
  skipSelf: true,
2263
2289
  optional: true,
2264
2290
  });
2265
- if (currentConfig) {
2266
- currentConfig.push(configs);
2291
+ if (currentConfig && inject(FormlyConfig) === inject(FormlyConfig, { skipSelf: true, optional: true })) {
2292
+ configs = Array.isArray(configs) ? configs : [configs];
2293
+ currentConfig.push(...configs);
2267
2294
  return currentConfig;
2268
2295
  }
2269
2296
  return configs;
@@ -2345,10 +2372,10 @@ class FormlyFormBuilder {
2345
2372
  }
2346
2373
  }
2347
2374
  }
2348
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyFormBuilder, deps: [{ token: FormlyConfig }, { token: i0.Injector }, { token: i0.ViewContainerRef, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: FORMLY_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
2349
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyFormBuilder, providedIn: 'root' }); }
2375
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyFormBuilder, deps: [{ token: FormlyConfig }, { token: i0.Injector }, { token: i0.ViewContainerRef, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: FORMLY_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
2376
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyFormBuilder, providedIn: 'root' }); }
2350
2377
  }
2351
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyFormBuilder, decorators: [{
2378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyFormBuilder, decorators: [{
2352
2379
  type: Injectable,
2353
2380
  args: [{ providedIn: 'root' }]
2354
2381
  }], ctorParameters: () => [{ type: FormlyConfig }, { type: i0.Injector }, { type: i0.ViewContainerRef, decorators: [{
@@ -2472,18 +2499,18 @@ class FormlyForm {
2472
2499
  Object.keys(field).forEach((p) => (this.field[p] = field[p]));
2473
2500
  }
2474
2501
  }
2475
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyForm, deps: [{ token: FormlyFormBuilder }, { token: FormlyConfig }, { token: i0.NgZone }, { token: FormlyFieldTemplates }], target: i0.ɵɵFactoryTarget.Component }); }
2476
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormlyForm, isStandalone: true, selector: "formly-form", inputs: { form: "form", model: "model", fields: "fields", options: "options" }, outputs: { modelChange: "modelChange" }, providers: [FormlyFormBuilder, FormlyFieldTemplates], queries: [{ propertyName: "templates", predicate: FormlyTemplate }], usesOnChanges: true, ngImport: i0, template: '<formly-field [field]="field"></formly-field>', isInline: true, dependencies: [{ kind: "component", type: FormlyField, selector: "formly-field", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2502
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyForm, deps: [{ token: FormlyFormBuilder }, { token: FormlyConfig }, { token: i0.NgZone }, { token: FormlyFieldTemplates }], target: i0.ɵɵFactoryTarget.Component }); }
2503
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: FormlyForm, isStandalone: true, selector: "formly-form", inputs: { form: "form", model: "model", fields: "fields", options: "options" }, outputs: { modelChange: "modelChange" }, providers: [FormlyFormBuilder, FormlyFieldTemplates], queries: [{ propertyName: "templates", predicate: FormlyTemplate }], usesOnChanges: true, ngImport: i0, template: '<formly-field [field]="field"></formly-field>', isInline: true, dependencies: [{ kind: "component", type: FormlyField, selector: "formly-field", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2477
2504
  }
2478
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyForm, decorators: [{
2505
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyForm, decorators: [{
2479
2506
  type: Component,
2480
2507
  args: [{
2481
2508
  selector: 'formly-form',
2482
2509
  template: '<formly-field [field]="field"></formly-field>',
2483
2510
  providers: [FormlyFormBuilder, FormlyFieldTemplates],
2511
+ standalone: true,
2484
2512
  imports: [FormlyField],
2485
2513
  changeDetection: ChangeDetectionStrategy.OnPush,
2486
- standalone: true,
2487
2514
  }]
2488
2515
  }], ctorParameters: () => [{ type: FormlyFormBuilder }, { type: FormlyConfig }, { type: i0.NgZone }, { type: FormlyFieldTemplates }], propDecorators: { form: [{
2489
2516
  type: Input
@@ -2503,10 +2530,10 @@ class LegacyFormlyForm extends FormlyForm {
2503
2530
  set templates(templates) {
2504
2531
  this.fieldTemplates.templates = templates;
2505
2532
  }
2506
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LegacyFormlyForm, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2507
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: LegacyFormlyForm, selector: "formly-form", providers: [FormlyFormBuilder, FormlyFieldTemplates], queries: [{ propertyName: "templates", predicate: LegacyFormlyTemplate }], usesInheritance: true, ngImport: i0, template: '<formly-field [field]="field"></formly-field>', isInline: true, dependencies: [{ kind: "component", type: LegacyFormlyField, selector: "formly-field" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2533
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LegacyFormlyForm, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2534
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: LegacyFormlyForm, isStandalone: false, selector: "formly-form", providers: [FormlyFormBuilder, FormlyFieldTemplates], queries: [{ propertyName: "templates", predicate: LegacyFormlyTemplate }], usesInheritance: true, ngImport: i0, template: '<formly-field [field]="field"></formly-field>', isInline: true, dependencies: [{ kind: "component", type: LegacyFormlyField, selector: "formly-field" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2508
2535
  }
2509
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LegacyFormlyForm, decorators: [{
2536
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LegacyFormlyForm, decorators: [{
2510
2537
  type: Component,
2511
2538
  args: [{
2512
2539
  selector: 'formly-form',
@@ -2530,9 +2557,10 @@ class FormlyAttributes {
2530
2557
  get fieldAttrElements() {
2531
2558
  return this.field?.['_elementRefs'] || [];
2532
2559
  }
2533
- constructor(renderer, elementRef, _document) {
2560
+ constructor(renderer, elementRef, _document, formlyField) {
2534
2561
  this.renderer = renderer;
2535
2562
  this.elementRef = elementRef;
2563
+ this.formlyField = formlyField;
2536
2564
  this.uiAttributesCache = {};
2537
2565
  /**
2538
2566
  * HostBinding doesn't register listeners conditionally which may produce some perf issues.
@@ -2580,8 +2608,10 @@ class FormlyAttributes {
2580
2608
  }
2581
2609
  });
2582
2610
  }
2583
- this.detachElementRef(changes.field.previousValue);
2611
+ const previousField = changes.field.previousValue;
2612
+ this.detachElementRef(previousField);
2584
2613
  this.attachElementRef(changes.field.currentValue);
2614
+ this.formlyField?.attachLocalField(changes.field.currentValue, previousField?._elementRefs?.length ? undefined : previousField);
2585
2615
  if (this.fieldAttrElements.length === 1) {
2586
2616
  !this.id && this.field.id && this.setAttribute('id', this.field.id);
2587
2617
  this.focusObserver = observe(this.field, ['focus'], ({ currentValue }) => {
@@ -2613,7 +2643,7 @@ class FormlyAttributes {
2613
2643
  (!this.props.attributes || !this.props.attributes.hasOwnProperty(attr.toLowerCase()))) {
2614
2644
  this.uiAttributesCache[attr] = value;
2615
2645
  if (value || value === 0) {
2616
- this.setAttribute(attr, value === true ? attr : `${value}`);
2646
+ this.setAttribute(attr, this.getSafeAttributeValue(attr, value));
2617
2647
  }
2618
2648
  else {
2619
2649
  this.removeAttribute(attr);
@@ -2624,6 +2654,9 @@ class FormlyAttributes {
2624
2654
  ngOnDestroy() {
2625
2655
  this.uiEvents.listeners.forEach((listener) => listener());
2626
2656
  this.detachElementRef(this.field);
2657
+ if (!this.field?._elementRefs?.length) {
2658
+ this.formlyField?.attachLocalField(undefined, this.field);
2659
+ }
2627
2660
  this.focusObserver?.unsubscribe();
2628
2661
  }
2629
2662
  toggleFocus(value) {
@@ -2671,10 +2704,22 @@ class FormlyAttributes {
2671
2704
  }
2672
2705
  }
2673
2706
  detachElementRef(f) {
2674
- const index = f?.['_elementRefs'] ? this.fieldAttrElements.indexOf(this.elementRef) : -1;
2707
+ const elements = f?.['_elementRefs'] || [];
2708
+ const index = elements.indexOf(this.elementRef);
2675
2709
  if (index !== -1) {
2676
- f['_elementRefs'].splice(index, 1);
2710
+ elements.splice(index, 1);
2711
+ }
2712
+ }
2713
+ getSafeAttributeValue(attr, value) {
2714
+ if (attr === 'pattern') {
2715
+ let pattern = value instanceof RegExp ? value.source : value;
2716
+ // 1. Safely escape unescaped hyphens inside character classes for 'v' flag compatibility
2717
+ pattern = pattern.replace(/(\[[^\]]*?)(?<!\\)-(.*?\])/g, '$1\\-$2');
2718
+ // 2. Cleanly strip leading ^ and trailing $ so HTML5 handles the boundaries natively
2719
+ pattern = pattern.replace(/^^\^/, '').replace(/\$$/, '');
2720
+ return pattern;
2677
2721
  }
2722
+ return value === true ? attr : `${value}`;
2678
2723
  }
2679
2724
  setAttribute(attr, value) {
2680
2725
  this.renderer.setAttribute(this.elementRef.nativeElement, attr, value);
@@ -2682,10 +2727,10 @@ class FormlyAttributes {
2682
2727
  removeAttribute(attr) {
2683
2728
  this.renderer.removeAttribute(this.elementRef.nativeElement, attr);
2684
2729
  }
2685
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyAttributes, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive }); }
2686
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: FormlyAttributes, isStandalone: true, selector: "[formlyAttributes]", inputs: { field: ["formlyAttributes", "field"], id: "id" }, host: { listeners: { "change": "onHostChange($event)" } }, usesOnChanges: true, ngImport: i0 }); }
2730
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyAttributes, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: DOCUMENT }, { token: FormlyField, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2731
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: FormlyAttributes, isStandalone: true, selector: "[formlyAttributes]", inputs: { field: ["formlyAttributes", "field"], id: "id" }, host: { listeners: { "change": "onHostChange($event)" } }, usesOnChanges: true, ngImport: i0 }); }
2687
2732
  }
2688
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyAttributes, decorators: [{
2733
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyAttributes, decorators: [{
2689
2734
  type: Directive,
2690
2735
  args: [{
2691
2736
  selector: '[formlyAttributes]',
@@ -2697,6 +2742,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2697
2742
  }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: undefined, decorators: [{
2698
2743
  type: Inject,
2699
2744
  args: [DOCUMENT]
2745
+ }] }, { type: FormlyField, decorators: [{
2746
+ type: Optional
2700
2747
  }] }], propDecorators: { field: [{
2701
2748
  type: Input,
2702
2749
  args: ['formlyAttributes']
@@ -2704,16 +2751,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2704
2751
  type: Input
2705
2752
  }] } });
2706
2753
  class LegacyFormlyAttributes extends FormlyAttributes {
2707
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LegacyFormlyAttributes, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2708
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: LegacyFormlyAttributes, selector: "[formlyAttributes]", host: { listeners: { "change": "onHostChange($event)" } }, usesInheritance: true, ngImport: i0 }); }
2754
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LegacyFormlyAttributes, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2755
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: LegacyFormlyAttributes, isStandalone: false, selector: "[formlyAttributes]", host: { listeners: { "change": "onHostChange($event)" } }, usesInheritance: true, ngImport: i0 }); }
2709
2756
  }
2710
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LegacyFormlyAttributes, decorators: [{
2757
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LegacyFormlyAttributes, decorators: [{
2711
2758
  type: Directive,
2712
2759
  args: [{
2713
2760
  selector: '[formlyAttributes]',
2714
2761
  host: {
2715
2762
  '(change)': 'onHostChange($event)',
2716
2763
  },
2764
+ standalone: false,
2717
2765
  }]
2718
2766
  }] });
2719
2767
 
@@ -2764,10 +2812,10 @@ class FormlyValidationMessage {
2764
2812
  }
2765
2813
  return undefined;
2766
2814
  }
2767
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyValidationMessage, deps: [{ token: FormlyConfig }], target: i0.ɵɵFactoryTarget.Component }); }
2768
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormlyValidationMessage, isStandalone: true, selector: "formly-validation-message", inputs: { field: "field" }, usesOnChanges: true, ngImport: i0, template: '{{ errorMessage$ | async }}', isInline: true, dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2815
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyValidationMessage, deps: [{ token: FormlyConfig }], target: i0.ɵɵFactoryTarget.Component }); }
2816
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: FormlyValidationMessage, isStandalone: true, selector: "formly-validation-message", inputs: { field: "field" }, usesOnChanges: true, ngImport: i0, template: '{{ errorMessage$ | async }}', isInline: true, dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2769
2817
  }
2770
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyValidationMessage, decorators: [{
2818
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyValidationMessage, decorators: [{
2771
2819
  type: Component,
2772
2820
  args: [{
2773
2821
  selector: 'formly-validation-message',
@@ -2780,15 +2828,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2780
2828
  type: Input
2781
2829
  }] } });
2782
2830
  class LegacyFormlyValidationMessage extends FormlyValidationMessage {
2783
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LegacyFormlyValidationMessage, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2784
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: LegacyFormlyValidationMessage, selector: "formly-validation-message", usesInheritance: true, ngImport: i0, template: '{{ errorMessage$ | async }}', isInline: true, dependencies: [{ kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2831
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LegacyFormlyValidationMessage, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2832
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: LegacyFormlyValidationMessage, isStandalone: false, selector: "formly-validation-message", usesInheritance: true, ngImport: i0, template: '{{ errorMessage$ | async }}', isInline: true, dependencies: [{ kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2785
2833
  }
2786
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LegacyFormlyValidationMessage, decorators: [{
2834
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LegacyFormlyValidationMessage, decorators: [{
2787
2835
  type: Component,
2788
2836
  args: [{
2789
2837
  selector: 'formly-validation-message',
2790
2838
  template: '{{ errorMessage$ | async }}',
2791
2839
  changeDetection: ChangeDetectionStrategy.OnPush,
2840
+ standalone: false,
2792
2841
  }]
2793
2842
  }] });
2794
2843
 
@@ -2863,10 +2912,10 @@ class FieldArrayType extends FieldType {
2863
2912
  this.options._hiddenFieldsForCheck.push({ field: f });
2864
2913
  }
2865
2914
  }
2866
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FieldArrayType, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2867
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: FieldArrayType, usesInheritance: true, ngImport: i0 }); }
2915
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FieldArrayType, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2916
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: FieldArrayType, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
2868
2917
  }
2869
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FieldArrayType, decorators: [{
2918
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FieldArrayType, decorators: [{
2870
2919
  type: Directive
2871
2920
  }] });
2872
2921
 
@@ -2875,10 +2924,10 @@ class FieldWrapper extends FieldType {
2875
2924
  set _staticContent(content) {
2876
2925
  this.fieldComponent = content;
2877
2926
  }
2878
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FieldWrapper, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2879
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: FieldWrapper, viewQueries: [{ propertyName: "fieldComponent", first: true, predicate: ["fieldComponent"], descendants: true, read: ViewContainerRef }, { propertyName: "_staticContent", first: true, predicate: ["fieldComponent"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0 }); }
2927
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FieldWrapper, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
2928
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: FieldWrapper, isStandalone: true, viewQueries: [{ propertyName: "fieldComponent", first: true, predicate: ["fieldComponent"], descendants: true, read: ViewContainerRef }, { propertyName: "_staticContent", first: true, predicate: ["fieldComponent"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0 }); }
2880
2929
  }
2881
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FieldWrapper, decorators: [{
2930
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FieldWrapper, decorators: [{
2882
2931
  type: Directive
2883
2932
  }], propDecorators: { fieldComponent: [{
2884
2933
  type: ViewChild,
@@ -2888,6 +2937,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2888
2937
  args: ['fieldComponent', { read: ViewContainerRef, static: true }]
2889
2938
  }] } });
2890
2939
 
2940
+ /**
2941
+ * Registers Formly components and configuration for NgModule-based applications.
2942
+ *
2943
+ * `forRoot()` provides the shared `FormlyConfig` at the application root, while
2944
+ * `forChild()` adds feature configuration using the inherited service. This follows
2945
+ * Angular's [root/child module registration convention](https://frontendatlas.com/angular/trivia/angular-forroot-forchild).
2946
+ */
2891
2947
  class FormlyModule {
2892
2948
  static forRoot(config = {}) {
2893
2949
  return {
@@ -2910,8 +2966,8 @@ class FormlyModule {
2910
2966
  ],
2911
2967
  };
2912
2968
  }
2913
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2914
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: FormlyModule, declarations: [LegacyFormlyTemplate,
2969
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2970
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.25", ngImport: i0, type: FormlyModule, declarations: [LegacyFormlyTemplate,
2915
2971
  LegacyFormlyForm,
2916
2972
  LegacyFormlyField,
2917
2973
  LegacyFormlyAttributes,
@@ -2923,9 +2979,9 @@ class FormlyModule {
2923
2979
  LegacyFormlyAttributes,
2924
2980
  LegacyFormlyValidationMessage,
2925
2981
  FormlyGroup] }); }
2926
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyModule, imports: [CommonModule] }); }
2982
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyModule, imports: [CommonModule] }); }
2927
2983
  }
2928
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormlyModule, decorators: [{
2984
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: FormlyModule, decorators: [{
2929
2985
  type: NgModule,
2930
2986
  args: [{
2931
2987
  declarations: [