@ngx-formly/core 10.0.1 → 11.1.0-rc.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.
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ngx-formly/core",
3
- "version": "10.0.1",
3
+ "version": "11.1.0-rc.0",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
6
  "tslib": "^2.0.0"
7
7
  },
8
8
  "peerDependencies": {
9
- "@angular/forms": ">=21.0.0",
9
+ "@angular/forms": ">=22.0.0",
10
10
  "rxjs": "^6.5.3 || ^7.0.0"
11
11
  },
12
12
  "module": "fesm2022/ngx-formly-core.mjs",
@@ -1,44 +1,42 @@
1
- import { FormlyFieldConfig } from '@ngx-formly/core';
2
- import { JSONSchema7 } from 'json-schema';
3
- import * as i0 from '@angular/core';
4
-
1
+ import { FormlyFieldConfig } from "@ngx-formly/core";
2
+ import { JSONSchema7 } from "json-schema";
3
+ import * as i0 from "@angular/core";
5
4
  interface FormlyJsonschemaOptions {
6
- /**
7
- * Leave required strings without a schema default undefined instead of defaulting to ''.
8
- * Defaults to false. Explicit schema defaults and other types are unaffected.
9
- */
10
- ignoreImplicitStringDefaults?: boolean;
11
- /**
12
- * allows to intercept the mapping, taking the already mapped
13
- * formly field and the original JSONSchema source from which it
14
- * was mapped.
15
- */
16
- map?: (mappedField: FormlyFieldConfig, mapSource: JSONSchema7) => FormlyFieldConfig;
5
+ /**
6
+ * Leave required strings without a schema default undefined instead of defaulting to ''.
7
+ * Defaults to false. Explicit schema defaults and other types are unaffected.
8
+ */
9
+ ignoreImplicitStringDefaults?: boolean;
10
+ /**
11
+ * allows to intercept the mapping, taking the already mapped
12
+ * formly field and the original JSONSchema source from which it
13
+ * was mapped.
14
+ */
15
+ map?: (mappedField: FormlyFieldConfig, mapSource: JSONSchema7) => FormlyFieldConfig;
17
16
  }
18
- declare class FormlyJsonschema {
19
- toFieldConfig(schema: JSONSchema7, options?: FormlyJsonschemaOptions): FormlyFieldConfig;
20
- private _toFieldConfig;
21
- private resolveSchema;
22
- private resolveAllOf;
23
- private resolveMultiSchema;
24
- private createMultiSchemaField;
25
- private ensureMultiSchemaField;
26
- private getSchemaField;
27
- private isRecursiveMultiSchema;
28
- private getDefinition;
29
- private resolveDefinition;
30
- private resolveDependencies;
31
- private extractIfCondition;
32
- private resolveIfThenElse;
33
- private resolveConditionalSchema;
34
- private guessSchemaType;
35
- private addValidator;
36
- private isEnum;
37
- private toEnumOptions;
38
- private isFieldValid;
39
- private mergeFields;
40
- static ɵfac: i0.ɵɵFactoryDeclaration<FormlyJsonschema, never>;
41
- static ɵprov: i0.ɵɵInjectableDeclaration<FormlyJsonschema>;
17
+ export declare class FormlyJsonschema {
18
+ toFieldConfig(schema: JSONSchema7, options?: FormlyJsonschemaOptions): FormlyFieldConfig;
19
+ private _toFieldConfig;
20
+ private resolveSchema;
21
+ private resolveAllOf;
22
+ private resolveMultiSchema;
23
+ private createMultiSchemaField;
24
+ private ensureMultiSchemaField;
25
+ private getSchemaField;
26
+ private isRecursiveMultiSchema;
27
+ private getDefinition;
28
+ private resolveDefinition;
29
+ private resolveDependencies;
30
+ private extractIfCondition;
31
+ private resolveIfThenElse;
32
+ private resolveConditionalSchema;
33
+ private guessSchemaType;
34
+ private addValidator;
35
+ private isEnum;
36
+ private toEnumOptions;
37
+ private isFieldValid;
38
+ private mergeFields;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormlyJsonschema, never>;
40
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
42
41
  }
43
-
44
- export { FormlyJsonschema };
42
+ export {};
@@ -1,13 +1,9 @@
1
- import * as i0 from '@angular/core';
2
- import { Provider } from '@angular/core';
3
- import * as i1 from '@ngx-formly/core';
4
-
5
- declare class FormlyPresetModule {
6
- static ɵfac: i0.ɵɵFactoryDeclaration<FormlyPresetModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<FormlyPresetModule, never, [typeof i1.FormlyModule], never>;
8
- static ɵinj: i0.ɵɵInjectorDeclaration<FormlyPresetModule>;
1
+ import * as i0 from "@angular/core";
2
+ import { Provider } from "@angular/core";
3
+ import * as i1 from "@ngx-formly/core";
4
+ export declare class FormlyPresetModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormlyPresetModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FormlyPresetModule, never, [typeof i1.FormlyModule], never>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<FormlyPresetModule>;
9
8
  }
10
-
11
- declare function provideFormlyPreset(): Provider;
12
-
13
- export { FormlyPresetModule, provideFormlyPreset };
9
+ export declare function provideFormlyPreset(): Provider;
@@ -1,44 +1,39 @@
1
- import * as i0 from '@angular/core';
2
- import { PipeTransform, OnDestroy } from '@angular/core';
3
- import { Observable } from 'rxjs';
4
- import { FormlyFieldProps, FormlyFieldConfig } from '@ngx-formly/core';
5
-
6
- interface FormlySelectOption {
7
- label: string;
8
- disabled?: boolean;
9
- value?: any;
10
- group?: FormlySelectOption[];
1
+ import * as i0 from "@angular/core";
2
+ import { OnDestroy, PipeTransform } from "@angular/core";
3
+ import { Observable } from "rxjs";
4
+ import { FormlyFieldConfig, FormlyFieldProps } from "@ngx-formly/core";
5
+ export interface FormlySelectOption {
6
+ label: string;
7
+ disabled?: boolean;
8
+ value?: any;
9
+ group?: FormlySelectOption[];
11
10
  }
12
- interface FormlyFieldSelectProps extends FormlyFieldProps {
13
- groupProp?: string | ((option: any) => string);
14
- labelProp?: string | ((option: any) => string);
15
- valueProp?: string | ((option: any) => any);
16
- disabledProp?: string | ((option: any) => boolean);
17
- mapProp?: (option: any) => FormlySelectOption;
11
+ export interface FormlyFieldSelectProps extends FormlyFieldProps {
12
+ groupProp?: string | ((option: any) => string);
13
+ labelProp?: string | ((option: any) => string);
14
+ valueProp?: string | ((option: any) => any);
15
+ disabledProp?: string | ((option: any) => boolean);
16
+ mapProp?: (option: any) => FormlySelectOption;
18
17
  }
19
- declare class FormlySelectOptionsPipe implements PipeTransform, OnDestroy {
20
- private _subscription;
21
- private _options;
22
- transform(options: any, field?: FormlyFieldConfig): Observable<FormlySelectOption[]>;
23
- ngOnDestroy(): void;
24
- private transformOptions;
25
- private transformOption;
26
- private transformSelectProps;
27
- private dispose;
28
- private observableOf;
29
- static ɵfac: i0.ɵɵFactoryDeclaration<FormlySelectOptionsPipe, never>;
30
- static ɵpipe: i0.ɵɵPipeDeclaration<FormlySelectOptionsPipe, "formlySelectOptions", true>;
18
+ export declare class FormlySelectOptionsPipe implements PipeTransform, OnDestroy {
19
+ private _subscription;
20
+ private _options;
21
+ transform(options: any, field?: FormlyFieldConfig): Observable<FormlySelectOption[]>;
22
+ ngOnDestroy(): void;
23
+ private transformOptions;
24
+ private transformOption;
25
+ private transformSelectProps;
26
+ private dispose;
27
+ private observableOf;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormlySelectOptionsPipe, never>;
29
+ static ɵpipe: i0.ɵɵPipeDeclaration<FormlySelectOptionsPipe, "formlySelectOptions", true>;
31
30
  }
32
- declare class LegacyFormlySelectOptionsPipe extends FormlySelectOptionsPipe implements PipeTransform, OnDestroy {
33
- static ɵfac: i0.ɵɵFactoryDeclaration<LegacyFormlySelectOptionsPipe, never>;
34
- static ɵpipe: i0.ɵɵPipeDeclaration<LegacyFormlySelectOptionsPipe, "formlySelectOptions", false>;
31
+ export declare class LegacyFormlySelectOptionsPipe extends FormlySelectOptionsPipe implements PipeTransform, OnDestroy {
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<LegacyFormlySelectOptionsPipe, never>;
33
+ static ɵpipe: i0.ɵɵPipeDeclaration<LegacyFormlySelectOptionsPipe, "formlySelectOptions", false>;
35
34
  }
36
-
37
- declare class FormlySelectModule {
38
- static ɵfac: i0.ɵɵFactoryDeclaration<FormlySelectModule, never>;
39
- static ɵmod: i0.ɵɵNgModuleDeclaration<FormlySelectModule, [typeof LegacyFormlySelectOptionsPipe], never, [typeof LegacyFormlySelectOptionsPipe]>;
40
- static ɵinj: i0.ɵɵInjectorDeclaration<FormlySelectModule>;
41
- }
42
-
43
- export { FormlySelectModule, FormlySelectOptionsPipe, LegacyFormlySelectOptionsPipe };
44
- export type { FormlyFieldSelectProps, FormlySelectOption };
35
+ export declare class FormlySelectModule {
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormlySelectModule, never>;
37
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FormlySelectModule, [typeof LegacyFormlySelectOptionsPipe], never, [typeof LegacyFormlySelectOptionsPipe]>;
38
+ static ɵinj: i0.ɵɵInjectorDeclaration<FormlySelectModule>;
39
+ }
@@ -1,37 +1,35 @@
1
- import { ComponentFixture } from '@angular/core/testing';
2
- import { NgModule, DebugElement } from '@angular/core';
3
- import { ConfigOption, FormlyFieldConfig } from '@ngx-formly/core';
4
-
1
+ import { ComponentFixture } from "@angular/core/testing";
2
+ import { DebugElement, NgModule } from "@angular/core";
3
+ import { ConfigOption, FormlyFieldConfig } from "@ngx-formly/core";
5
4
  interface IComponentOptions<T> extends NgModule {
6
- template?: string;
7
- inputs?: T;
8
- config?: ConfigOption;
9
- detectChanges?: boolean;
5
+ template?: string;
6
+ inputs?: T;
7
+ config?: ConfigOption;
8
+ detectChanges?: boolean;
10
9
  }
11
10
  interface IFormlyDebugElement<E> extends DebugElement {
12
- readonly nativeElement: E;
11
+ readonly nativeElement: E;
13
12
  }
14
- declare function createComponent<T>({ template, inputs, config, detectChanges, imports, declarations, providers, }: IComponentOptions<T>): T & {
15
- fixture: ComponentFixture<T>;
16
- detectChanges: (checkNoChanges?: boolean) => void;
17
- setInputs: (inputs: Partial<T>) => void;
18
- query: <E extends Element = Element>(selector: string) => IFormlyDebugElement<E>;
19
- queryAll: <E extends Element = Element>(selector: string) => IFormlyDebugElement<E>[];
13
+ export declare function createComponent<T>({ template, inputs, config, detectChanges, imports, declarations, providers }: IComponentOptions<T>): T & {
14
+ fixture: ComponentFixture<T>;
15
+ detectChanges: (checkNoChanges?: boolean) => void;
16
+ setInputs: (inputs: Partial<T>) => void;
17
+ query: <E extends Element = Element>(selector: string) => IFormlyDebugElement<E>;
18
+ queryAll: <E extends Element = Element>(selector: string) => IFormlyDebugElement<E>[];
20
19
  };
21
- declare function createFieldComponent(field: FormlyFieldConfig, config?: IComponentOptions<{
22
- field: FormlyFieldConfig;
20
+ export declare function createFieldComponent(field: FormlyFieldConfig, config?: IComponentOptions<{
21
+ field: FormlyFieldConfig;
23
22
  }>): {
24
- field: FormlyFieldConfig;
23
+ field: FormlyFieldConfig;
25
24
  } & {
26
- fixture: ComponentFixture<{
27
- field: FormlyFieldConfig;
28
- }>;
29
- detectChanges: (checkNoChanges?: boolean) => void;
30
- setInputs: (inputs: Partial<{
31
- field: FormlyFieldConfig;
32
- }>) => void;
33
- query: <E extends Element = Element>(selector: string) => IFormlyDebugElement<E>;
34
- queryAll: <E extends Element = Element>(selector: string) => IFormlyDebugElement<E>[];
25
+ fixture: ComponentFixture<{
26
+ field: FormlyFieldConfig;
27
+ }>;
28
+ detectChanges: (checkNoChanges?: boolean) => void;
29
+ setInputs: (inputs: Partial<{
30
+ field: FormlyFieldConfig;
31
+ }>) => void;
32
+ query: <E extends Element = Element>(selector: string) => IFormlyDebugElement<E>;
33
+ queryAll: <E extends Element = Element>(selector: string) => IFormlyDebugElement<E>[];
35
34
  };
36
-
37
- export { createComponent, createFieldComponent };
35
+ export {};