ngx-dynamic-entity 0.0.1 → 1.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.
- package/README.md +139 -0
- package/esm2022/lib/field-types/array-field.component.mjs +160 -0
- package/esm2022/lib/field-types/boolean-field.component.mjs +100 -0
- package/esm2022/lib/field-types/checkbox-field.component.mjs +49 -41
- package/esm2022/lib/field-types/currency-field.component.mjs +101 -0
- package/esm2022/lib/field-types/date-field.component.mjs +47 -39
- package/esm2022/lib/field-types/dropdown-field.component.mjs +145 -54
- package/esm2022/lib/field-types/email-field.component.mjs +101 -0
- package/esm2022/lib/field-types/entity-ref-field.component.mjs +134 -70
- package/esm2022/lib/field-types/file-field.component.mjs +156 -0
- package/esm2022/lib/field-types/group-field.component.mjs +89 -0
- package/esm2022/lib/field-types/image-field.component.mjs +168 -0
- package/esm2022/lib/field-types/month-year-field.component.mjs +151 -0
- package/esm2022/lib/field-types/multi-select-field.component.mjs +110 -56
- package/esm2022/lib/field-types/number-field.component.mjs +84 -41
- package/esm2022/lib/field-types/password-field.component.mjs +109 -0
- package/esm2022/lib/field-types/radio-field.component.mjs +152 -0
- package/esm2022/lib/field-types/text-field.component.mjs +82 -42
- package/esm2022/lib/field-types/textarea-field.component.mjs +52 -41
- package/esm2022/lib/form/dynamic-field/dynamic-field.component.mjs +44 -26
- package/esm2022/lib/form/dynamic-form.component.mjs +501 -67
- package/esm2022/lib/form/dynamic-record-form.component.mjs +469 -0
- package/esm2022/lib/providers/provide-field-types.mjs +72 -0
- package/esm2022/lib/providers/provide-ngx-dynamic-entity.mjs +3 -5
- package/esm2022/lib/services/cascade-data.service.mjs +129 -0
- package/esm2022/lib/services/config-source.service.mjs +67 -0
- package/esm2022/lib/services/entity-ref-cache.mjs +20 -0
- package/esm2022/lib/services/entity-ref-registry.service.mjs +3 -3
- package/esm2022/lib/services/entity-ref-selection.service.mjs +27 -0
- package/esm2022/lib/services/entity-reference.service.mjs +168 -0
- package/esm2022/lib/services/field-registry.service.mjs +35 -30
- package/esm2022/lib/services/file-upload.service.mjs +89 -0
- package/esm2022/lib/services/lookup-registry.service.mjs +246 -0
- package/esm2022/lib/services/rbac.service.mjs +5 -11
- package/esm2022/lib/services/rules-evaluation.service.mjs +27 -0
- package/esm2022/lib/services/validator-registry.service.mjs +24 -7
- package/esm2022/lib/tokens/injection-tokens.mjs +88 -7
- package/esm2022/public-api.mjs +14 -5
- package/fesm2022/ngx-dynamic-entity.mjs +3985 -876
- package/fesm2022/ngx-dynamic-entity.mjs.map +1 -1
- package/lib/field-types/array-field.component.d.ts +22 -0
- package/lib/field-types/boolean-field.component.d.ts +18 -0
- package/lib/field-types/checkbox-field.component.d.ts +3 -2
- package/lib/field-types/currency-field.component.d.ts +17 -0
- package/lib/field-types/date-field.component.d.ts +3 -2
- package/lib/field-types/dropdown-field.component.d.ts +24 -4
- package/lib/field-types/email-field.component.d.ts +15 -0
- package/lib/field-types/entity-ref-field.component.d.ts +24 -11
- package/lib/field-types/file-field.component.d.ts +25 -0
- package/lib/field-types/group-field.component.d.ts +17 -0
- package/lib/field-types/image-field.component.d.ts +30 -0
- package/lib/field-types/month-year-field.component.d.ts +28 -0
- package/lib/field-types/multi-select-field.component.d.ts +18 -4
- package/lib/field-types/number-field.component.d.ts +5 -2
- package/lib/field-types/password-field.component.d.ts +17 -0
- package/lib/field-types/radio-field.component.d.ts +33 -0
- package/lib/field-types/text-field.component.d.ts +5 -3
- package/lib/field-types/textarea-field.component.d.ts +4 -2
- package/lib/form/dynamic-field/dynamic-field.component.d.ts +20 -7
- package/lib/form/dynamic-form.component.d.ts +111 -19
- package/lib/form/dynamic-record-form.component.d.ts +169 -0
- package/lib/providers/provide-field-types.d.ts +24 -0
- package/lib/providers/provide-ngx-dynamic-entity.d.ts +12 -7
- package/lib/services/cascade-data.service.d.ts +45 -0
- package/lib/services/config-source.service.d.ts +14 -0
- package/lib/services/entity-ref-cache.d.ts +27 -0
- package/lib/services/entity-ref-registry.service.d.ts +4 -3
- package/lib/services/entity-ref-selection.service.d.ts +24 -0
- package/lib/services/entity-reference.service.d.ts +49 -0
- package/lib/services/field-registry.service.d.ts +17 -7
- package/lib/services/file-upload.service.d.ts +27 -0
- package/lib/services/lookup-registry.service.d.ts +94 -0
- package/lib/services/rbac.service.d.ts +4 -9
- package/lib/services/rules-evaluation.service.d.ts +17 -0
- package/lib/services/validator-registry.service.d.ts +5 -4
- package/lib/tokens/injection-tokens.d.ts +90 -7
- package/package.json +14 -3
- package/public-api.d.ts +11 -4
- package/esm2022/lib/services/config.service.mjs +0 -58
- package/esm2022/lib/services/version.service.mjs +0 -40
- package/esm2022/lib/table/dynamic-table.component.mjs +0 -160
- package/lib/services/config.service.d.ts +0 -25
- package/lib/services/version.service.d.ts +0 -26
- package/lib/table/dynamic-table.component.d.ts +0 -56
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AbstractControl, FormArray } from '@angular/forms';
|
|
2
|
+
import type { NestedFieldConfig, EntityFormConfig } from '@dynamic-entity/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** ADR-008: ArrayFieldComponent — renders repeating rows for FormArray with + Add Item and Remove */
|
|
5
|
+
export declare class ArrayFieldComponent {
|
|
6
|
+
field: NestedFieldConfig;
|
|
7
|
+
control: AbstractControl;
|
|
8
|
+
config: EntityFormConfig;
|
|
9
|
+
language: string;
|
|
10
|
+
readonly: boolean;
|
|
11
|
+
masked: boolean;
|
|
12
|
+
userRoles: string[];
|
|
13
|
+
private readonly fb;
|
|
14
|
+
private readonly validatorRegistry;
|
|
15
|
+
get label(): string;
|
|
16
|
+
get formArray(): FormArray;
|
|
17
|
+
getItemChildControl(itemGroup: AbstractControl, childId: string): AbstractControl;
|
|
18
|
+
addItem(): void;
|
|
19
|
+
removeItem(index: number): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayFieldComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayFieldComponent, "ngx-array-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "config": { "alias": "config"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; "userRoles": { "alias": "userRoles"; "required": false; }; }, {}, never, never, true, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Boolean field: a slide-toggle style switch (true/false).
|
|
6
|
+
* Distinct from `checkbox` (which is a standalone bool) in that it renders as a
|
|
7
|
+
* toggle switch with Yes/No labels for clearer binary state communication.
|
|
8
|
+
*/
|
|
9
|
+
export declare class BooleanFieldComponent {
|
|
10
|
+
field: NestedFieldConfig;
|
|
11
|
+
control: AbstractControl;
|
|
12
|
+
language: string;
|
|
13
|
+
readonly: boolean;
|
|
14
|
+
masked: boolean;
|
|
15
|
+
get label(): string;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanFieldComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BooleanFieldComponent, "ngx-boolean-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { AbstractControl } from '@angular/forms';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class CheckboxFieldComponent {
|
|
5
|
-
field:
|
|
5
|
+
field: NestedFieldConfig;
|
|
6
6
|
control: AbstractControl;
|
|
7
7
|
language: string;
|
|
8
8
|
readonly: boolean;
|
|
9
9
|
masked: boolean;
|
|
10
|
+
get label(): string;
|
|
10
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxFieldComponent, never>;
|
|
11
12
|
static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxFieldComponent, "ngx-checkbox-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
12
13
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** Currency field: number input with locale-aware currency symbol prefix. */
|
|
5
|
+
export declare class CurrencyFieldComponent {
|
|
6
|
+
field: NestedFieldConfig;
|
|
7
|
+
control: AbstractControl;
|
|
8
|
+
language: string;
|
|
9
|
+
readonly: boolean;
|
|
10
|
+
masked: boolean;
|
|
11
|
+
get label(): string;
|
|
12
|
+
get placeholder(): string;
|
|
13
|
+
/** Picks the currency symbol from the locale — defaults to '$'. */
|
|
14
|
+
get symbol(): string;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyFieldComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CurrencyFieldComponent, "ngx-currency-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { AbstractControl } from '@angular/forms';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class DateFieldComponent {
|
|
5
|
-
field:
|
|
5
|
+
field: NestedFieldConfig;
|
|
6
6
|
control: AbstractControl;
|
|
7
7
|
language: string;
|
|
8
8
|
readonly: boolean;
|
|
9
9
|
masked: boolean;
|
|
10
|
+
get label(): string;
|
|
10
11
|
/** ISO 8601 date → locale display string (ONEHERMES convention: always UTC, display in user locale) */
|
|
11
12
|
formatDate(value: string | null): string;
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<DateFieldComponent, never>;
|
|
@@ -1,13 +1,33 @@
|
|
|
1
1
|
import { AbstractControl } from '@angular/forms';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class DropdownFieldComponent {
|
|
5
|
-
|
|
5
|
+
private readonly lookups;
|
|
6
|
+
private _field;
|
|
7
|
+
private _language;
|
|
8
|
+
/** Setter-based so options resolve however the input is set — see `refreshChoiceOptions`. */
|
|
9
|
+
set field(value: NestedFieldConfig);
|
|
10
|
+
get field(): NestedFieldConfig;
|
|
11
|
+
set language(value: string);
|
|
12
|
+
get language(): string;
|
|
6
13
|
control: AbstractControl;
|
|
7
|
-
language: string;
|
|
8
14
|
readonly: boolean;
|
|
9
15
|
masked: boolean;
|
|
16
|
+
/** Inline `options`, or the field's named list resolved through the registry (§6.3). */
|
|
17
|
+
readonly options: import("@angular/core").WritableSignal<import("@dynamic-entity/core").LocalizedText[]>;
|
|
18
|
+
readonly compareFn: (o1: any, o2: any) => boolean;
|
|
19
|
+
isObjectVal(option: any): boolean;
|
|
20
|
+
get label(): string;
|
|
21
|
+
get placeholder(): string;
|
|
22
|
+
getOptStoredVal(option: any): any;
|
|
23
|
+
getOptLabel(option: any): string;
|
|
24
|
+
/**
|
|
25
|
+
* Read-only display. Never awaits (§6.2): a warm list resolves the label, a cold one falls
|
|
26
|
+
* back to the stored text — which under the §2 contract *is* the display value, so it is
|
|
27
|
+
* never wrong, only unlocalised.
|
|
28
|
+
*/
|
|
10
29
|
getLabel(value: any): string;
|
|
30
|
+
get errorMessage(): string;
|
|
11
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownFieldComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownFieldComponent, "ngx-dropdown-field", never, { "field": { "alias": "field"; "required": false; }; "
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownFieldComponent, "ngx-dropdown-field", never, { "field": { "alias": "field"; "required": false; }; "language": { "alias": "language"; "required": false; }; "control": { "alias": "control"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
13
33
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** Email field: type="email" input with inline validation hint. */
|
|
5
|
+
export declare class EmailFieldComponent {
|
|
6
|
+
field: NestedFieldConfig;
|
|
7
|
+
control: AbstractControl;
|
|
8
|
+
language: string;
|
|
9
|
+
readonly: boolean;
|
|
10
|
+
masked: boolean;
|
|
11
|
+
get label(): string;
|
|
12
|
+
get placeholder(): string;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EmailFieldComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EmailFieldComponent, "ngx-email-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -1,26 +1,39 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractControl } from '@angular/forms';
|
|
3
|
-
import type {
|
|
3
|
+
import type { NestedFieldConfig, ReferenceOption } from '@dynamic-entity/core';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
|
-
* EntityRefFieldComponent —
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* EntityRefFieldComponent — a select populated from a consumer-registered loader.
|
|
7
|
+
*
|
|
8
|
+
* Cascades: when `entityReference.parentField` is set, the component watches that sibling
|
|
9
|
+
* control (via `control.parent`) and reloads its own options on every parent change,
|
|
10
|
+
* clearing a now-invalid selection. It publishes the picked record on
|
|
11
|
+
* `EntityRefSelectionService` so the owning form can run `autoPatch`.
|
|
9
12
|
*/
|
|
10
13
|
export declare class EntityRefFieldComponent implements OnInit {
|
|
11
|
-
field:
|
|
14
|
+
field: NestedFieldConfig;
|
|
12
15
|
control: AbstractControl;
|
|
13
16
|
language: string;
|
|
14
17
|
readonly: boolean;
|
|
15
18
|
masked: boolean;
|
|
16
|
-
private readonly
|
|
17
|
-
readonly
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}[]>;
|
|
19
|
+
private readonly cascade;
|
|
20
|
+
private readonly selectionBus;
|
|
21
|
+
private readonly destroyRef;
|
|
22
|
+
readonly options: import("@angular/core").WritableSignal<ReferenceOption[]>;
|
|
21
23
|
readonly loading: import("@angular/core").WritableSignal<boolean>;
|
|
22
|
-
|
|
24
|
+
/** True when this field cascades but its parent has no value yet. */
|
|
25
|
+
readonly awaitingParent: import("@angular/core").WritableSignal<boolean>;
|
|
26
|
+
get label(): string;
|
|
27
|
+
get placeholder(): string;
|
|
28
|
+
get parentFieldId(): string | undefined;
|
|
29
|
+
ngOnInit(): void;
|
|
30
|
+
/** Reload options against the parent's current value. */
|
|
31
|
+
reload(): Promise<void>;
|
|
32
|
+
onSelectionChange(): void;
|
|
23
33
|
getLabel(value: any): string;
|
|
34
|
+
private parentValue;
|
|
35
|
+
/** Reload (and drop a stale selection) whenever the parent control changes. */
|
|
36
|
+
private watchParent;
|
|
24
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<EntityRefFieldComponent, never>;
|
|
25
38
|
static ɵcmp: i0.ɵɵComponentDeclaration<EntityRefFieldComponent, "ngx-entity-ref-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
26
39
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* File field: file input with filename display and download link.
|
|
6
|
+
* Shares the `FileRef` / `UPLOAD_HANDLER` contract with image-field via FileUploadService.
|
|
7
|
+
*/
|
|
8
|
+
export declare class FileFieldComponent {
|
|
9
|
+
field: NestedFieldConfig;
|
|
10
|
+
control: AbstractControl;
|
|
11
|
+
language: string;
|
|
12
|
+
readonly: boolean;
|
|
13
|
+
masked: boolean;
|
|
14
|
+
private readonly uploads;
|
|
15
|
+
readonly uploading: import("@angular/core").WritableSignal<boolean>;
|
|
16
|
+
readonly uploadError: import("@angular/core").WritableSignal<string>;
|
|
17
|
+
get label(): string;
|
|
18
|
+
private get value();
|
|
19
|
+
fileUrl(): string | null;
|
|
20
|
+
fileName(): string | null;
|
|
21
|
+
onFileSelect(file: File | undefined): Promise<void>;
|
|
22
|
+
remove(): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileFieldComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileFieldComponent, "ngx-file-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import type { NestedFieldConfig, EntityFormConfig } from '@dynamic-entity/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** ADR-008: GroupFieldComponent — renders nested fieldset container for group.children */
|
|
5
|
+
export declare class GroupFieldComponent {
|
|
6
|
+
field: NestedFieldConfig;
|
|
7
|
+
control: AbstractControl;
|
|
8
|
+
config: EntityFormConfig;
|
|
9
|
+
language: string;
|
|
10
|
+
readonly: boolean;
|
|
11
|
+
masked: boolean;
|
|
12
|
+
userRoles: string[];
|
|
13
|
+
get label(): string;
|
|
14
|
+
getChildControl(childId: string): AbstractControl;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GroupFieldComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GroupFieldComponent, "ngx-group-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "config": { "alias": "config"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; "userRoles": { "alias": "userRoles"; "required": false; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
3
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Image field: preview thumbnail + upload button.
|
|
7
|
+
*
|
|
8
|
+
* With `UPLOAD_HANDLER` registered the file is persisted and stored as `{ url }`; without one
|
|
9
|
+
* it is stored as `{ file }` and previewed from an object URL (revoked when replaced/destroyed).
|
|
10
|
+
*/
|
|
11
|
+
export declare class ImageFieldComponent implements OnDestroy {
|
|
12
|
+
field: NestedFieldConfig;
|
|
13
|
+
control: AbstractControl;
|
|
14
|
+
language: string;
|
|
15
|
+
readonly: boolean;
|
|
16
|
+
masked: boolean;
|
|
17
|
+
private readonly uploads;
|
|
18
|
+
readonly uploading: import("@angular/core").WritableSignal<boolean>;
|
|
19
|
+
readonly uploadError: import("@angular/core").WritableSignal<string>;
|
|
20
|
+
/** Cached so an object URL is minted once per File, not once per change-detection pass. */
|
|
21
|
+
private previewSource;
|
|
22
|
+
private previewCache;
|
|
23
|
+
get label(): string;
|
|
24
|
+
previewUrl(): string | null;
|
|
25
|
+
onFileSelect(file: File | undefined): Promise<void>;
|
|
26
|
+
remove(): void;
|
|
27
|
+
ngOnDestroy(): void;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImageFieldComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImageFieldComponent, "ngx-image-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Month-Year field: two linked selects (Month + Year).
|
|
6
|
+
* Value stored as ISO partial date string "YYYY-MM" for unambiguous storage.
|
|
7
|
+
*/
|
|
8
|
+
export declare class MonthYearFieldComponent {
|
|
9
|
+
field: NestedFieldConfig;
|
|
10
|
+
control: AbstractControl;
|
|
11
|
+
language: string;
|
|
12
|
+
readonly: boolean;
|
|
13
|
+
masked: boolean;
|
|
14
|
+
readonly months: {
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}[];
|
|
18
|
+
readonly years: number[];
|
|
19
|
+
get label(): string;
|
|
20
|
+
/** Parses "YYYY-MM" or "YYYY-MM-DD" stored value → month part. */
|
|
21
|
+
get selectedMonth(): string;
|
|
22
|
+
get selectedYear(): string;
|
|
23
|
+
onMonthChange(month: string): void;
|
|
24
|
+
onYearChange(year: string): void;
|
|
25
|
+
formatValue(value: unknown): string;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MonthYearFieldComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MonthYearFieldComponent, "ngx-month-year-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
28
|
+
}
|
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
import { AbstractControl } from '@angular/forms';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class MultiSelectFieldComponent {
|
|
5
|
-
|
|
5
|
+
private readonly lookups;
|
|
6
|
+
private _field;
|
|
7
|
+
private _language;
|
|
8
|
+
/** Setter-based so options resolve however the input is set — see `refreshChoiceOptions`. */
|
|
9
|
+
set field(value: NestedFieldConfig);
|
|
10
|
+
get field(): NestedFieldConfig;
|
|
11
|
+
set language(value: string);
|
|
12
|
+
get language(): string;
|
|
6
13
|
control: AbstractControl;
|
|
7
|
-
language: string;
|
|
8
14
|
readonly: boolean;
|
|
9
15
|
masked: boolean;
|
|
16
|
+
/** Inline `options`, or the field's named list resolved through the registry (§6.3). */
|
|
17
|
+
readonly options: import("@angular/core").WritableSignal<import("@dynamic-entity/core").LocalizedText[]>;
|
|
18
|
+
readonly compareFn: (o1: any, o2: any) => boolean;
|
|
19
|
+
isObjectVal(option: any): boolean;
|
|
20
|
+
get label(): string;
|
|
21
|
+
getOptStoredVal(option: any): any;
|
|
22
|
+
getOptLabel(option: any): string;
|
|
23
|
+
/** Read-only display — synchronous, per §6.2. See `DropdownFieldComponent.getLabel`. */
|
|
10
24
|
getLabels(values: any[]): string;
|
|
11
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectFieldComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectFieldComponent, "ngx-multi-select-field", never, { "field": { "alias": "field"; "required": false; }; "
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectFieldComponent, "ngx-multi-select-field", never, { "field": { "alias": "field"; "required": false; }; "language": { "alias": "language"; "required": false; }; "control": { "alias": "control"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
13
27
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { AbstractControl } from '@angular/forms';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class NumberFieldComponent {
|
|
5
|
-
field:
|
|
5
|
+
field: NestedFieldConfig;
|
|
6
6
|
control: AbstractControl;
|
|
7
7
|
language: string;
|
|
8
8
|
readonly: boolean;
|
|
9
9
|
masked: boolean;
|
|
10
|
+
get label(): string;
|
|
11
|
+
get placeholder(): string;
|
|
12
|
+
get errorMessage(): string;
|
|
10
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<NumberFieldComponent, never>;
|
|
11
14
|
static ɵcmp: i0.ɵɵComponentDeclaration<NumberFieldComponent, "ngx-number-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
12
15
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** Password field: masked input with show/hide eye toggle. */
|
|
5
|
+
export declare class PasswordFieldComponent {
|
|
6
|
+
field: NestedFieldConfig;
|
|
7
|
+
control: AbstractControl;
|
|
8
|
+
language: string;
|
|
9
|
+
readonly: boolean;
|
|
10
|
+
masked: boolean;
|
|
11
|
+
readonly visible: import("@angular/core").WritableSignal<boolean>;
|
|
12
|
+
get label(): string;
|
|
13
|
+
get placeholder(): string;
|
|
14
|
+
toggleVisibility(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PasswordFieldComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PasswordFieldComponent, "ngx-password-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** Radio field: a group of radio buttons built from field.options. */
|
|
5
|
+
export declare class RadioFieldComponent {
|
|
6
|
+
private readonly lookups;
|
|
7
|
+
private _field;
|
|
8
|
+
private _language;
|
|
9
|
+
/** Setter-based so options resolve however the input is set — see `refreshChoiceOptions`. */
|
|
10
|
+
set field(value: NestedFieldConfig);
|
|
11
|
+
get field(): NestedFieldConfig;
|
|
12
|
+
set language(value: string);
|
|
13
|
+
get language(): string;
|
|
14
|
+
control: AbstractControl;
|
|
15
|
+
readonly: boolean;
|
|
16
|
+
masked: boolean;
|
|
17
|
+
/** Inline `options`, or the field's named list resolved through the registry (§6.3). */
|
|
18
|
+
readonly options: import("@angular/core").WritableSignal<import("@dynamic-entity/core").LocalizedText[]>;
|
|
19
|
+
get label(): string;
|
|
20
|
+
getOptStoredVal(option: any): any;
|
|
21
|
+
/**
|
|
22
|
+
* Stable DOM id for one radio, so the <label for> association works.
|
|
23
|
+
* Slugified because the option text is the value now — "On Leave" must not put a space
|
|
24
|
+
* into an id attribute.
|
|
25
|
+
*/
|
|
26
|
+
getRadioId(option: any): string;
|
|
27
|
+
getOptVal(option: any): any;
|
|
28
|
+
getOptLabel(option: any): string;
|
|
29
|
+
/** Read-only display — synchronous, per §6.2. See `DropdownFieldComponent.getLabel`. */
|
|
30
|
+
getSelectedLabel(): string;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RadioFieldComponent, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RadioFieldComponent, "ngx-radio-field", never, { "field": { "alias": "field"; "required": false; }; "language": { "alias": "language"; "required": false; }; "control": { "alias": "control"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
33
|
+
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { AbstractControl } from '@angular/forms';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
/** ADR-008: Shared field component contract — all 8 built-in types implement this. */
|
|
5
4
|
export declare class TextFieldComponent {
|
|
6
|
-
field:
|
|
5
|
+
field: NestedFieldConfig;
|
|
7
6
|
control: AbstractControl;
|
|
8
7
|
language: string;
|
|
9
8
|
readonly: boolean;
|
|
10
9
|
masked: boolean;
|
|
10
|
+
get label(): string;
|
|
11
|
+
get placeholder(): string;
|
|
12
|
+
get errorMessage(): string;
|
|
11
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextFieldComponent, never>;
|
|
12
14
|
static ɵcmp: i0.ɵɵComponentDeclaration<TextFieldComponent, "ngx-text-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
13
15
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { AbstractControl } from '@angular/forms';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class TextareaFieldComponent {
|
|
5
|
-
field:
|
|
5
|
+
field: NestedFieldConfig;
|
|
6
6
|
control: AbstractControl;
|
|
7
7
|
language: string;
|
|
8
8
|
readonly: boolean;
|
|
9
9
|
masked: boolean;
|
|
10
|
+
get label(): string;
|
|
11
|
+
get placeholder(): string;
|
|
10
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextareaFieldComponent, never>;
|
|
11
13
|
static ɵcmp: i0.ɵɵComponentDeclaration<TextareaFieldComponent, "ngx-textarea-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "masked": { "alias": "masked"; "required": false; }; }, {}, never, never, true, never>;
|
|
12
14
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { AbstractControl } from '@angular/forms';
|
|
3
|
-
import type {
|
|
3
|
+
import type { NestedFieldConfig, EntityFormConfig } from '@dynamic-entity/core';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
|
-
* DynamicFieldComponent — mounts the correct field component for a given
|
|
6
|
+
* DynamicFieldComponent — mounts the correct field component for a given NestedFieldConfig.
|
|
7
7
|
* Uses ViewContainerRef.createComponent() and passes inputs via setInput() (ADR-008).
|
|
8
8
|
* Never add field-type-specific logic here — this component must remain generic.
|
|
9
9
|
*
|
|
@@ -11,20 +11,33 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
* component uniformly — no special-casing per type.
|
|
12
12
|
*/
|
|
13
13
|
export declare class DynamicFieldComponent implements OnChanges {
|
|
14
|
-
field:
|
|
14
|
+
field: NestedFieldConfig;
|
|
15
15
|
control: AbstractControl;
|
|
16
|
-
config:
|
|
16
|
+
config: EntityFormConfig;
|
|
17
|
+
currentTabId?: string;
|
|
17
18
|
language: string;
|
|
18
19
|
readonly: boolean;
|
|
19
20
|
userRoles: string[];
|
|
20
21
|
private readonly fieldHost;
|
|
21
22
|
private readonly fieldRegistry;
|
|
22
23
|
private readonly rbacService;
|
|
23
|
-
private
|
|
24
|
+
private componentRef;
|
|
24
25
|
ngOnChanges(_changes: SimpleChanges): void;
|
|
25
26
|
private mountField;
|
|
26
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Field types are opt-in (see `provideFieldTypes` / `provideBuiltInFieldTypes`), so an
|
|
29
|
+
* unregistered type renders nothing. Say so once per type in dev builds rather than
|
|
30
|
+
* leaving a silently blank slot.
|
|
31
|
+
*/
|
|
32
|
+
private warnUnresolved;
|
|
33
|
+
private static readonly warnedTypes;
|
|
34
|
+
/**
|
|
35
|
+
* Pass all 5 contract inputs via ComponentRef.setInput() — uniform for all types (ADR-008).
|
|
36
|
+
* Must use setInput(), not property assignment: the field components declare inputs with
|
|
37
|
+
* definite assignment and no initializer, and the lib compiles with
|
|
38
|
+
* useDefineForClassFields:false, so `'field' in instance` is false until first set.
|
|
39
|
+
*/
|
|
27
40
|
private setInputs;
|
|
28
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFieldComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFieldComponent, "ngx-dynamic-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "config": { "alias": "config"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "userRoles": { "alias": "userRoles"; "required": false; }; }, {}, never, never, true, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFieldComponent, "ngx-dynamic-field", never, { "field": { "alias": "field"; "required": false; }; "control": { "alias": "control"; "required": false; }; "config": { "alias": "config"; "required": false; }; "currentTabId": { "alias": "currentTabId"; "required": false; }; "language": { "alias": "language"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "userRoles": { "alias": "userRoles"; "required": false; }; }, {}, never, never, true, never>;
|
|
30
43
|
}
|