@ng-forge/dynamic-forms 1.3.0-next.2 → 1.3.0-next.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.
- package/fesm2022/ng-forge-dynamic-forms-active-page-initialized.event-CiKN-mcc.mjs +12 -0
- package/fesm2022/ng-forge-dynamic-forms-active-page-initialized.event-CiKN-mcc.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-array-field.component-Dv9mPnJ3.mjs +770 -0
- package/fesm2022/ng-forge-dynamic-forms-array-field.component-Dv9mPnJ3.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-array-item-registry.service-D-AxVLdk.mjs +83 -0
- package/fesm2022/ng-forge-dynamic-forms-array-item-registry.service-D-AxVLdk.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-EuYCbquo.mjs +1887 -0
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-EuYCbquo.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-web-mcp-2wQK_wPp.mjs +954 -0
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-web-mcp-2wQK_wPp.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-container-field-processors-C_JRvaVt.mjs +117 -0
- package/fesm2022/ng-forge-dynamic-forms-container-field-processors-C_JRvaVt.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-container-field.component-Bg7Win9n.mjs +228 -0
- package/fesm2022/ng-forge-dynamic-forms-container-field.component-Bg7Win9n.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-css-wrapper.component-R2yc-H0T.mjs +102 -0
- package/fesm2022/ng-forge-dynamic-forms-css-wrapper.component-R2yc-H0T.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-debounce-CG3uP5B-.mjs +4 -0
- package/fesm2022/{ng-forge-dynamic-forms-debounce-C9F4v1Ke.mjs.map → ng-forge-dynamic-forms-debounce-CG3uP5B-.mjs.map} +1 -1
- package/fesm2022/ng-forge-dynamic-forms-default-value-D5M4MNE-.mjs +77 -0
- package/fesm2022/ng-forge-dynamic-forms-default-value-D5M4MNE-.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-dev-mode-4rbYBBo_.mjs +4 -0
- package/fesm2022/ng-forge-dynamic-forms-dev-mode-4rbYBBo_.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-df-field-outlet.directive-CQsDMV-s.mjs +644 -0
- package/fesm2022/ng-forge-dynamic-forms-df-field-outlet.directive-CQsDMV-s.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-field-errors-wrapper.component-DKgkpIpG.mjs +56 -0
- package/fesm2022/ng-forge-dynamic-forms-field-errors-wrapper.component-DKgkpIpG.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-form-schema.service-Dd-gHJ_7.mjs +38 -0
- package/fesm2022/{ng-forge-dynamic-forms-form-schema.service-Dx5Dlb15.mjs.map → ng-forge-dynamic-forms-form-schema.service-Dd-gHJ_7.mjs.map} +1 -1
- package/fesm2022/ng-forge-dynamic-forms-form-state-manager-DcOXRFRL.mjs +1522 -0
- package/fesm2022/ng-forge-dynamic-forms-form-state-manager-DcOXRFRL.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-group-field.component-BjZi0bhq.mjs +292 -0
- package/fesm2022/ng-forge-dynamic-forms-group-field.component-BjZi0bhq.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-integration.mjs +1318 -843
- package/fesm2022/ng-forge-dynamic-forms-integration.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-internal.mjs +3326 -3641
- package/fesm2022/ng-forge-dynamic-forms-internal.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-page-field.component-BRjQmWC9.mjs +295 -0
- package/fesm2022/ng-forge-dynamic-forms-page-field.component-BRjQmWC9.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-resolve-field-ByGa5cpo.mjs +329 -0
- package/fesm2022/ng-forge-dynamic-forms-resolve-field-ByGa5cpo.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-row-wrapper.component-CuFycQb-.mjs +81 -0
- package/fesm2022/ng-forge-dynamic-forms-row-wrapper.component-CuFycQb-.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-schema-builder-C62afItJ.mjs +400 -0
- package/fesm2022/ng-forge-dynamic-forms-schema-builder-C62afItJ.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-schema-registry.service-axBV9FBH.mjs +45 -0
- package/fesm2022/ng-forge-dynamic-forms-schema-registry.service-axBV9FBH.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-schema.mjs +8 -14
- package/fesm2022/ng-forge-dynamic-forms-schema.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-testing.mjs +68 -73
- package/fesm2022/ng-forge-dynamic-forms-testing.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-text-field.component--MAh_h4Q.mjs +257 -0
- package/fesm2022/ng-forge-dynamic-forms-text-field.component--MAh_h4Q.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-validation-execution.token-BFyySKtp.mjs +8 -0
- package/fesm2022/ng-forge-dynamic-forms-validation-execution.token-BFyySKtp.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-with-logger-config-BAATqYY0.mjs +94 -0
- package/fesm2022/ng-forge-dynamic-forms-with-logger-config-BAATqYY0.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-wrapper-chain-BnntfNU1.mjs +115 -0
- package/fesm2022/ng-forge-dynamic-forms-wrapper-chain-BnntfNU1.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms.mjs +2136 -3
- package/fesm2022/ng-forge-dynamic-forms.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ng-forge-dynamic-forms-integration.d.ts +543 -415
- package/types/ng-forge-dynamic-forms-internal.d.ts +2319 -2436
- package/types/ng-forge-dynamic-forms-schema.d.ts +13 -16
- package/types/ng-forge-dynamic-forms-testing.d.ts +34 -37
- package/types/ng-forge-dynamic-forms.d.ts +735 -722
- package/fesm2022/ng-forge-dynamic-forms-array-field.component-CSCKq_1K.mjs +0 -750
- package/fesm2022/ng-forge-dynamic-forms-array-field.component-CSCKq_1K.mjs.map +0 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-CTOTwzzw.mjs +0 -2394
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-CTOTwzzw.mjs.map +0 -1
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-web-mcp-BtjqeJOj.mjs +0 -1054
- package/fesm2022/ng-forge-dynamic-forms-bootstrap-web-mcp-BtjqeJOj.mjs.map +0 -1
- package/fesm2022/ng-forge-dynamic-forms-container-field.component-Dc3ROhHL.mjs +0 -86
- package/fesm2022/ng-forge-dynamic-forms-container-field.component-Dc3ROhHL.mjs.map +0 -1
- package/fesm2022/ng-forge-dynamic-forms-css-wrapper.component-BzgX8lAD.mjs +0 -33
- package/fesm2022/ng-forge-dynamic-forms-css-wrapper.component-BzgX8lAD.mjs.map +0 -1
- package/fesm2022/ng-forge-dynamic-forms-debounce-C9F4v1Ke.mjs +0 -17
- package/fesm2022/ng-forge-dynamic-forms-field-errors-wrapper.component-CIKbWqYA.mjs +0 -25
- package/fesm2022/ng-forge-dynamic-forms-field-errors-wrapper.component-CIKbWqYA.mjs.map +0 -1
- package/fesm2022/ng-forge-dynamic-forms-form-schema.service-Dx5Dlb15.mjs +0 -24
- package/fesm2022/ng-forge-dynamic-forms-group-field.component-DAC3P9DC.mjs +0 -177
- package/fesm2022/ng-forge-dynamic-forms-group-field.component-DAC3P9DC.mjs.map +0 -1
- package/fesm2022/ng-forge-dynamic-forms-ng-forge-dynamic-forms-CXQe_5td.mjs +0 -5133
- package/fesm2022/ng-forge-dynamic-forms-ng-forge-dynamic-forms-CXQe_5td.mjs.map +0 -1
- package/fesm2022/ng-forge-dynamic-forms-page-field.component-DPKJcwUO.mjs +0 -176
- package/fesm2022/ng-forge-dynamic-forms-page-field.component-DPKJcwUO.mjs.map +0 -1
- package/fesm2022/ng-forge-dynamic-forms-row-wrapper.component-DMEeKZny.mjs +0 -19
- package/fesm2022/ng-forge-dynamic-forms-row-wrapper.component-DMEeKZny.mjs.map +0 -1
- package/fesm2022/ng-forge-dynamic-forms-schema-builder-BvDTzfdM.mjs +0 -570
- package/fesm2022/ng-forge-dynamic-forms-schema-builder-BvDTzfdM.mjs.map +0 -1
- package/fesm2022/ng-forge-dynamic-forms-text-field.component-BB-jutBq.mjs +0 -126
- package/fesm2022/ng-forge-dynamic-forms-text-field.component-BB-jutBq.mjs.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { SchemaPath, SchemaPathTree } from
|
|
2
|
-
import { StandardSchemaV1 } from
|
|
3
|
-
|
|
1
|
+
import { SchemaPath, SchemaPathTree } from "@angular/forms/signals";
|
|
2
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
4
3
|
/**
|
|
5
4
|
* Internal marker symbol to identify StandardSchemaMarker instances.
|
|
6
5
|
* Uses ɵ prefix following Angular's convention for internal APIs.
|
|
@@ -21,14 +20,14 @@ type AngularSchemaCallback<T = unknown> = (path: SchemaPath<T> & SchemaPathTree<
|
|
|
21
20
|
* @typeParam T - The inferred type that the schema validates to (covariant)
|
|
22
21
|
*/
|
|
23
22
|
interface StandardSchemaMarker<out T = unknown> {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Internal marker identifying this as a standard schema wrapper.
|
|
25
|
+
*
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
readonly ɵkind: typeof STANDARD_SCHEMA_KIND;
|
|
29
|
+
/** The underlying schema that implements the Standard Schema spec. */
|
|
30
|
+
readonly schema: StandardSchemaV1<T>;
|
|
32
31
|
}
|
|
33
32
|
/**
|
|
34
33
|
* Type alias for form schemas that can be used with dynamic forms.
|
|
@@ -45,19 +44,17 @@ type FormSchema<T = unknown> = StandardSchemaMarker<T> | AngularSchemaCallback<T
|
|
|
45
44
|
* @param schema - A schema implementing the Standard Schema V1 spec
|
|
46
45
|
* @returns A wrapped schema marker that can be passed to dynamic form configuration
|
|
47
46
|
*/
|
|
48
|
-
declare function standardSchema<T>(schema: StandardSchemaV1<T>): StandardSchemaMarker<T>;
|
|
47
|
+
export declare function standardSchema<T>(schema: StandardSchemaV1<T>): StandardSchemaMarker<T>;
|
|
49
48
|
/**
|
|
50
49
|
* Type guard to check if a value is a StandardSchemaMarker.
|
|
51
50
|
*
|
|
52
51
|
* @param value - The value to check
|
|
53
52
|
* @returns True if the value is a StandardSchemaMarker, false otherwise
|
|
54
53
|
*/
|
|
55
|
-
declare function isStandardSchemaMarker(value: unknown): value is StandardSchemaMarker;
|
|
54
|
+
export declare function isStandardSchemaMarker(value: unknown): value is StandardSchemaMarker;
|
|
56
55
|
/**
|
|
57
56
|
* Extracts the output type from a Standard Schema.
|
|
58
57
|
* Works with Zod, Valibot, ArkType, and other Standard Schema compliant libraries.
|
|
59
58
|
*/
|
|
60
59
|
type InferSchemaOutput<T> = T extends StandardSchemaV1<infer Output> ? Output : never;
|
|
61
|
-
|
|
62
|
-
export { isStandardSchemaMarker, standardSchema };
|
|
63
|
-
export type { AngularSchemaCallback, FormSchema, InferSchemaOutput, StandardSchemaMarker };
|
|
60
|
+
export type { AngularSchemaCallback, FormSchema, InferSchemaOutput, StandardSchemaMarker };
|
|
@@ -1,58 +1,55 @@
|
|
|
1
|
-
import { Provider,
|
|
2
|
-
import { ComponentFixture } from
|
|
3
|
-
import {
|
|
4
|
-
import { FormEvent, FormEventConstructor } from
|
|
5
|
-
import { DynamicText, EventBus, ValidationMessages } from
|
|
6
|
-
|
|
1
|
+
import { Provider, Type, WritableSignal } from "@angular/core";
|
|
2
|
+
import { ComponentFixture } from "@angular/core/testing";
|
|
3
|
+
import { FieldTree, SchemaPath } from "@angular/forms/signals";
|
|
4
|
+
import { FormEvent, FormEventConstructor } from "@ng-forge/dynamic-forms";
|
|
5
|
+
import { DynamicText, EventBus, ValidationMessages } from "@ng-forge/dynamic-forms/internal";
|
|
7
6
|
/** Structural copy of integration's EventArgs; importing it would cycle the entrypoints. */
|
|
8
7
|
type EventArgs = readonly (string | number | boolean | null | undefined)[];
|
|
9
8
|
interface CreateNgForgeFieldFixtureOptions<TValue = unknown> {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
/** Field key. Becomes the only property on the wrapping form. */
|
|
10
|
+
readonly key: string;
|
|
11
|
+
/** Initial value for the field. */
|
|
12
|
+
readonly value?: TValue;
|
|
13
|
+
/** Optional schema callback that receives the field's `SchemaPath`. Use it to attach validators (`required`, `minLength`, etc.). */
|
|
14
|
+
readonly schema?: (fieldPath: SchemaPath<TValue>) => void;
|
|
15
|
+
/** Mark the field as touched after creation (useful for invalid-state assertions). */
|
|
16
|
+
readonly touched?: boolean;
|
|
17
|
+
/** Extra inputs to set on the component before `detectChanges()`. */
|
|
18
|
+
readonly inputs?: Record<string, unknown>;
|
|
19
|
+
/** Extra TestBed providers. */
|
|
20
|
+
readonly providers?: readonly Provider[];
|
|
22
21
|
}
|
|
23
22
|
interface NgForgeFieldFixture<C, TValue = unknown> {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
readonly fixture: ComponentFixture<C>;
|
|
24
|
+
readonly field: FieldTree<TValue>;
|
|
25
|
+
readonly rootValue: WritableSignal<Record<string, TValue>>;
|
|
27
26
|
}
|
|
28
27
|
/**
|
|
29
28
|
* Builds a `ComponentFixture` for an `NgForgeField`-composing component with
|
|
30
29
|
* `field` + `key` bound BEFORE `detectChanges()` — sidesteps the NG0950 that
|
|
31
30
|
* Shell's required `key` and Field's required `field` would otherwise throw.
|
|
32
31
|
*/
|
|
33
|
-
declare function createNgForgeFieldFixture<C, TValue = unknown>(component: Type<C>, options: CreateNgForgeFieldFixtureOptions<TValue>): NgForgeFieldFixture<C, TValue>;
|
|
32
|
+
export declare function createNgForgeFieldFixture<C, TValue = unknown>(component: Type<C>, options: CreateNgForgeFieldFixtureOptions<TValue>): NgForgeFieldFixture<C, TValue>;
|
|
34
33
|
interface CreateNgForgeActionFixtureOptions<TEvent extends FormEvent = FormEvent> {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
readonly key: string;
|
|
35
|
+
readonly label: DynamicText;
|
|
36
|
+
readonly event?: FormEventConstructor<TEvent>;
|
|
37
|
+
readonly eventArgs?: EventArgs;
|
|
38
|
+
readonly disabled?: boolean;
|
|
39
|
+
readonly hidden?: boolean;
|
|
40
|
+
readonly inputs?: Record<string, unknown>;
|
|
41
|
+
readonly providers?: readonly Provider[];
|
|
43
42
|
}
|
|
44
43
|
interface NgForgeActionFixture<C> {
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
readonly fixture: ComponentFixture<C>;
|
|
45
|
+
readonly eventBus: EventBus;
|
|
47
46
|
}
|
|
48
47
|
/**
|
|
49
48
|
* Builds a `ComponentFixture` for an `NgForgeAction`-composing component with
|
|
50
49
|
* `key` + `label` bound and `EventBus` provided. The caller calls
|
|
51
50
|
* `detectChanges()`; the harness handles the NG0950-avoidance bindings.
|
|
52
51
|
*/
|
|
53
|
-
declare function createNgForgeActionFixture<C, TEvent extends FormEvent = FormEvent>(component: Type<C>, options: CreateNgForgeActionFixtureOptions<TEvent>): NgForgeActionFixture<C>;
|
|
52
|
+
export declare function createNgForgeActionFixture<C, TEvent extends FormEvent = FormEvent>(component: Type<C>, options: CreateNgForgeActionFixtureOptions<TEvent>): NgForgeActionFixture<C>;
|
|
54
53
|
/** Provider for `DEFAULT_VALIDATION_MESSAGES` in field tests — supply the default-messages map and the directive resolves it from DI. */
|
|
55
|
-
declare function provideTestValidationMessages(messages: ValidationMessages): Provider;
|
|
56
|
-
|
|
57
|
-
export { createNgForgeActionFixture, createNgForgeFieldFixture, provideTestValidationMessages };
|
|
58
|
-
export type { CreateNgForgeActionFixtureOptions, CreateNgForgeFieldFixtureOptions, NgForgeActionFixture, NgForgeFieldFixture };
|
|
54
|
+
export declare function provideTestValidationMessages(messages: ValidationMessages): Provider;
|
|
55
|
+
export type { CreateNgForgeActionFixtureOptions, CreateNgForgeFieldFixtureOptions, NgForgeActionFixture, NgForgeFieldFixture };
|