@ng-desktop/forms 0.4.0 → 0.5.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 CHANGED
@@ -1,14 +1,86 @@
1
- # @ng-desktop/forms
1
+ # `@ng-desktop/forms`
2
2
 
3
- Angular ControlValueAccessor directives for Native GTK4 / WinUI 3 / AppKit widgets (<ng-entry>, <ng-switch>, <ng-checkbox>, <ng-slider>, <ng-select>)
3
+ First-class Angular Signal Forms (`[formField]` via `FormValueControl` / `FormCheckboxControl`) and `ControlValueAccessor` directives (`ReactiveFormsModule`, `FormsModule`) wired directly to native GTK4 / WinUI 3 / AppKit desktop widgets.
4
4
 
5
- Part of **[NgDesktop Engine](https://github.com/Gaspar1992/ng-desktop-engine)** — Native desktop rendering engine for Angular 22+ (`GTK4`, `WinUI 3`, `AppKit`).
6
-
7
- ## Installation
5
+ ## Install
8
6
 
9
7
  ```bash
10
- pnpm add @ng-desktop/forms
8
+ pnpm add @ng-desktop/forms @ng-desktop/platform
9
+ ```
10
+
11
+ Peer dependencies: `@angular/core >= 22.0.0`, `@angular/forms >= 22.0.0`, `@ng-desktop/platform`.
12
+
13
+ ## Quick Usage — Angular Signal Forms (`[formField]`)
14
+
15
+ ```ts
16
+ import { Component, signal } from '@angular/core';
17
+ import { form, max, min, NATIVE_SIGNAL_FORM_DIRECTIVES, required } from '@ng-desktop/forms';
18
+ import { NATIVE_UI_DIRECTIVES } from '@ng-desktop/platform';
19
+
20
+ @Component({
21
+ selector: 'app-preferences',
22
+ standalone: true,
23
+ imports: [NATIVE_UI_DIRECTIVES, NATIVE_SIGNAL_FORM_DIRECTIVES],
24
+ template: `
25
+ <ng-box orientation="vertical" spacing="10px">
26
+ <ng-entry placeholder="Display name" [formField]="settingsForm.name" />
27
+ <ng-switch [formField]="settingsForm.enabled" />
28
+ <ng-slider [formField]="settingsForm.volume" />
29
+ </ng-box>
30
+ `,
31
+ })
32
+ export class PreferencesComponent {
33
+ readonly model = signal({ name: 'Ada', enabled: true, volume: 75 });
34
+
35
+ readonly settingsForm = form(this.model, (path) => {
36
+ required(path.name);
37
+ min(path.volume, 0);
38
+ max(path.volume, 100);
39
+ });
40
+ }
41
+ ```
42
+
43
+ Standard HTML form elements (`<input [formField]>`, `<textarea [formField]>`, `<select [formField]>`) also work out of the box without `CUSTOM_ELEMENTS_SCHEMA`. Schema states (`disabled`, `readonly`, `hidden`, `min`/`max`, `maxLength`, `invalid`, `touched`, `dirty`, `focusBoundControl()`) propagate automatically to native attributes and CSS classes (`ng-invalid`, `ng-touched`, `ng-dirty`).
44
+
45
+ ## Quick Usage — Reactive & Template Forms
46
+
47
+ `NATIVE_FORM_DIRECTIVES` includes both the Signal Forms controls and the classic `ControlValueAccessor` directives:
48
+
49
+ ```ts
50
+ import { Component } from '@angular/core';
51
+ import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
52
+ import { NATIVE_FORM_DIRECTIVES } from '@ng-desktop/forms';
53
+ import { NATIVE_UI_DIRECTIVES } from '@ng-desktop/platform';
54
+
55
+ @Component({
56
+ selector: 'app-legacy-preferences',
57
+ standalone: true,
58
+ imports: [ReactiveFormsModule, NATIVE_FORM_DIRECTIVES, NATIVE_UI_DIRECTIVES],
59
+ template: `
60
+ <ng-box [formGroup]="form" orientation="vertical" spacing="10px">
61
+ <ng-entry placeholder="Display name" formControlName="name" />
62
+ <ng-switch formControlName="enabled" />
63
+ <ng-slider min="0" max="100" formControlName="volume" />
64
+ </ng-box>
65
+ `,
66
+ })
67
+ export class LegacyPreferencesComponent {
68
+ readonly form = new FormGroup({
69
+ name: new FormControl('', { nonNullable: true }),
70
+ enabled: new FormControl(true, { nonNullable: true }),
71
+ volume: new FormControl(75, { nonNullable: true }),
72
+ });
73
+ }
11
74
  ```
12
75
 
13
- - Repository path: `packages/forms-native`
14
- - Documentation & Ecosystem Guide: https://github.com/Gaspar1992/ng-desktop-engine/blob/main/docs/ECOSYSTEM_COMPATIBILITY.md
76
+ ## Key Exports
77
+
78
+ - **Bundles:** `NATIVE_SIGNAL_FORM_DIRECTIVES` (Signal Forms `[formField]`), `NATIVE_FORM_DIRECTIVES` (all Signal Forms + CVA directives)
79
+ - **Signal Forms Controls:** `NativeTextFieldControl` (`FormValueControl<string>`), `NativeBooleanFieldControl` (`FormCheckboxControl`), `NativeNumberFieldControl` (`FormValueControl<number>`)
80
+ - **Re-exported Signal Forms APIs:** `form`, `schema`, `FormField`, `FormRoot`, `required`, `min`, `max`, `minLength`, `maxLength`, `pattern`, `email`, `disabled`, `readonly`, `hidden`, `debounce`, `submit`, `validate`, `provideSignalFormsConfig`
81
+ - **Classic CVAs:** `NativeTextValueAccessor`, `NativeBooleanValueAccessor`, `NativeNumberValueAccessor`
82
+
83
+ ## Documentation
84
+
85
+ - [Getting Started with External Angular 22+ & Nx Apps](../../docs/GETTING_STARTED.md)
86
+ - [Architectural Roadmap & OS Maturity Matrix](../../ROADMAP.md)
@@ -1 +1,11 @@
1
- export { NATIVE_FORM_DIRECTIVES, NativeBooleanValueAccessor, NativeNumberValueAccessor, NativeTextValueAccessor, } from './value-accessors';
1
+ import { FormField } from '@angular/forms/signals';
2
+ import { NativeBooleanFieldControl, NativeNumberFieldControl, NativeTextFieldControl } from './signal-forms';
3
+ import { NativeBooleanValueAccessor, NativeNumberValueAccessor, NativeTextValueAccessor } from './value-accessors';
4
+ export { NativeBooleanValueAccessor, NativeNumberValueAccessor, NativeTextValueAccessor, } from './value-accessors';
5
+ export { NATIVE_SIGNAL_FORM_DIRECTIVES, NativeBooleanFieldControl, NativeNumberFieldControl, NativeTextFieldControl, } from './signal-forms';
6
+ export { disabled, email, form, FormField, FormRoot, hidden, max, maxLength, min, minLength, pattern, provideSignalFormsConfig, readonly, required, schema, submit, validate, type FieldState, type FieldTree, type FormCheckboxControl, type FormUiControl, type FormValueControl, type ValidationError, } from '@angular/forms/signals';
7
+ /**
8
+ * Unified standalone directive bundle supporting both Reactive/Template forms (`[formControl]`,
9
+ * `[formControlName]`, `[(ngModel)]`) and Angular Signal Forms (`[formField]`).
10
+ */
11
+ export declare const NATIVE_FORM_DIRECTIVES: readonly [typeof NativeTextValueAccessor, typeof NativeBooleanValueAccessor, typeof NativeNumberValueAccessor, typeof FormField, typeof NativeTextFieldControl, typeof NativeBooleanFieldControl, typeof NativeNumberFieldControl];
package/fesm2022/index.js CHANGED
@@ -1 +1,19 @@
1
- export { NATIVE_FORM_DIRECTIVES, NativeBooleanValueAccessor, NativeNumberValueAccessor, NativeTextValueAccessor, } from './value-accessors.js';
1
+ import { FormField } from '@angular/forms/signals';
2
+ import { NativeBooleanFieldControl, NativeNumberFieldControl, NativeTextFieldControl, } from './signal-forms.js';
3
+ import { NativeBooleanValueAccessor, NativeNumberValueAccessor, NativeTextValueAccessor, } from './value-accessors.js';
4
+ export { NativeBooleanValueAccessor, NativeNumberValueAccessor, NativeTextValueAccessor, } from './value-accessors.js';
5
+ export { NATIVE_SIGNAL_FORM_DIRECTIVES, NativeBooleanFieldControl, NativeNumberFieldControl, NativeTextFieldControl, } from './signal-forms.js';
6
+ export { disabled, email, form, FormField, FormRoot, hidden, max, maxLength, min, minLength, pattern, provideSignalFormsConfig, readonly, required, schema, submit, validate, } from '@angular/forms/signals';
7
+ /**
8
+ * Unified standalone directive bundle supporting both Reactive/Template forms (`[formControl]`,
9
+ * `[formControlName]`, `[(ngModel)]`) and Angular Signal Forms (`[formField]`).
10
+ */
11
+ export const NATIVE_FORM_DIRECTIVES = [
12
+ NativeTextValueAccessor,
13
+ NativeBooleanValueAccessor,
14
+ NativeNumberValueAccessor,
15
+ FormField,
16
+ NativeTextFieldControl,
17
+ NativeBooleanFieldControl,
18
+ NativeNumberFieldControl,
19
+ ];
@@ -0,0 +1,87 @@
1
+ import { InputSignal, OnDestroy } from '@angular/core';
2
+ import { FormCheckboxControl, FormField, FormValueControl, type ValidationError } from '@angular/forms/signals';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * First-class Angular Signal Forms `FormValueControl<string>` binding `[formField]` onto native
6
+ * text widgets (`<ng-entry>`, `<ng-search-entry>`, `<ng-password-entry>`, `<ng-text-view>`, `<input>`, `<textarea>`).
7
+ */
8
+ export declare class NativeTextFieldControl implements FormValueControl<string>, OnDestroy {
9
+ private readonly renderer;
10
+ private readonly elementRef;
11
+ private readonly unlistenFns;
12
+ readonly value: import("@angular/core").ModelSignal<string>;
13
+ readonly disabled: InputSignal<boolean>;
14
+ readonly readonly: InputSignal<boolean>;
15
+ readonly hidden: InputSignal<boolean>;
16
+ readonly required: InputSignal<boolean>;
17
+ readonly invalid: InputSignal<boolean>;
18
+ readonly touched: InputSignal<boolean>;
19
+ readonly dirty: InputSignal<boolean>;
20
+ readonly name: InputSignal<string>;
21
+ readonly minLength: InputSignal<number | undefined>;
22
+ readonly maxLength: InputSignal<number | undefined>;
23
+ readonly errors: InputSignal<readonly ValidationError.WithOptionalFieldTree[]>;
24
+ readonly touch: import("@angular/core").OutputEmitterRef<void>;
25
+ constructor();
26
+ focus(): void;
27
+ ngOnDestroy(): void;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<NativeTextFieldControl, never>;
29
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NativeTextFieldControl, "ng-entry[formField],gtk-entry[formField],ng-search-entry[formField],gtk-search-entry[formField],ng-password-entry[formField],gtk-password-entry[formField],ng-text-view[formField],gtk-text-view[formField],adw-entry-row[formField],adw-password-entry-row[formField],input[formField]:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=number]),textarea[formField]", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "dirty": { "alias": "dirty"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
30
+ }
31
+ /**
32
+ * First-class Angular Signal Forms `FormCheckboxControl` binding `[formField]` onto native boolean
33
+ * widgets (`<ng-switch>`, `<ng-checkbox>`, `<ng-check>`, `<ng-check-button>`, `<gtk-switch>`, `<gtk-check-button>`).
34
+ */
35
+ export declare class NativeBooleanFieldControl implements FormCheckboxControl, OnDestroy {
36
+ private readonly renderer;
37
+ private readonly elementRef;
38
+ private readonly unlistenFns;
39
+ readonly checked: import("@angular/core").ModelSignal<boolean>;
40
+ readonly disabled: InputSignal<boolean>;
41
+ readonly readonly: InputSignal<boolean>;
42
+ readonly hidden: InputSignal<boolean>;
43
+ readonly required: InputSignal<boolean>;
44
+ readonly invalid: InputSignal<boolean>;
45
+ readonly touched: InputSignal<boolean>;
46
+ readonly dirty: InputSignal<boolean>;
47
+ readonly name: InputSignal<string>;
48
+ readonly errors: InputSignal<readonly ValidationError.WithOptionalFieldTree[]>;
49
+ readonly touch: import("@angular/core").OutputEmitterRef<void>;
50
+ constructor();
51
+ focus(): void;
52
+ ngOnDestroy(): void;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<NativeBooleanFieldControl, never>;
54
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NativeBooleanFieldControl, "ng-switch[formField],gtk-switch[formField],ng-checkbox[formField],ng-check[formField],ng-check-button[formField],gtk-check-button[formField],adw-switch-row[formField]", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "dirty": { "alias": "dirty"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "touch": "touch"; }, never, never, true, never>;
55
+ }
56
+ /**
57
+ * First-class Angular Signal Forms `FormValueControl<number>` binding `[formField]` onto native
58
+ * numeric/selection widgets (`<ng-slider>`, `<ng-spin-button>`, `<ng-select>`, `<select>`, `<input type="number|range">`).
59
+ */
60
+ export declare class NativeNumberFieldControl implements FormValueControl<number>, OnDestroy {
61
+ private readonly renderer;
62
+ private readonly elementRef;
63
+ private readonly unlistenFns;
64
+ readonly value: import("@angular/core").ModelSignal<number>;
65
+ readonly disabled: InputSignal<boolean>;
66
+ readonly readonly: InputSignal<boolean>;
67
+ readonly hidden: InputSignal<boolean>;
68
+ readonly required: InputSignal<boolean>;
69
+ readonly invalid: InputSignal<boolean>;
70
+ readonly touched: InputSignal<boolean>;
71
+ readonly dirty: InputSignal<boolean>;
72
+ readonly name: InputSignal<string>;
73
+ readonly min: InputSignal<number | undefined>;
74
+ readonly max: InputSignal<number | undefined>;
75
+ readonly errors: InputSignal<readonly ValidationError.WithOptionalFieldTree[]>;
76
+ readonly touch: import("@angular/core").OutputEmitterRef<void>;
77
+ constructor();
78
+ focus(): void;
79
+ ngOnDestroy(): void;
80
+ static ɵfac: i0.ɵɵFactoryDeclaration<NativeNumberFieldControl, never>;
81
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NativeNumberFieldControl, "ng-slider[formField],ng-scale[formField],gtk-scale[formField],ng-select[formField],ng-dropdown[formField],gtk-dropdown[formField],gtk-drop-down[formField],ng-spin-button[formField],gtk-spin-button[formField],adw-combo-row[formField],adw-spin-row[formField],select[formField],input[type=number][formField],input[type=range][formField]", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "dirty": { "alias": "dirty"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
82
+ }
83
+ /**
84
+ * Convenience standalone directive bundle enabling Angular Signal Forms (`[formField]`) on all
85
+ * native text, boolean, numeric, and mapped standard HTML widgets.
86
+ */
87
+ export declare const NATIVE_SIGNAL_FORM_DIRECTIVES: readonly [typeof FormField, typeof NativeTextFieldControl, typeof NativeBooleanFieldControl, typeof NativeNumberFieldControl];
@@ -0,0 +1,310 @@
1
+ import { Directive, effect, ElementRef, inject, input, model, output, Renderer2, } from '@angular/core';
2
+ import { FormField, } from '@angular/forms/signals';
3
+ import { SELECT_NUMBER_TAGS } from './value-accessors.js';
4
+ import * as i0 from "@angular/core";
5
+ function syncBooleanStateAttr(renderer, el, attrName, active, activeValue, inactiveValue, stateFlag) {
6
+ const current = el.attributes.get(attrName);
7
+ if (active) {
8
+ stateFlag.applied = true;
9
+ if (current !== activeValue) {
10
+ renderer.setAttribute(el, attrName, activeValue);
11
+ }
12
+ return;
13
+ }
14
+ if ((stateFlag.applied || current === activeValue) && current !== inactiveValue) {
15
+ renderer.setAttribute(el, attrName, inactiveValue);
16
+ }
17
+ }
18
+ function syncStateClass(renderer, el, className, active) {
19
+ if (active && !el.classes.has(className)) {
20
+ renderer.addClass(el, className);
21
+ }
22
+ else if (!active && el.classes.has(className)) {
23
+ renderer.removeClass(el, className);
24
+ }
25
+ }
26
+ /**
27
+ * Attaches reactive `effect()` synchronizers projecting Signal Forms `FormUiControl` status
28
+ * signals onto native widget attributes, ARIA flags, and CSS classes without redundant commands.
29
+ */
30
+ function bindNativeSignalUiEffects(renderer, el, ui) {
31
+ const disabledFlag = { applied: false };
32
+ const readonlyFlag = { applied: false };
33
+ const hiddenFlag = { applied: false };
34
+ const requiredFlag = { applied: false };
35
+ const invalidFlag = { applied: false };
36
+ effect(() => {
37
+ syncBooleanStateAttr(renderer, el, 'sensitive', ui.disabled(), 'false', 'true', disabledFlag);
38
+ syncBooleanStateAttr(renderer, el, 'aria-disabled', ui.disabled(), 'true', 'false', {
39
+ applied: disabledFlag.applied,
40
+ });
41
+ });
42
+ effect(() => {
43
+ const isReadonly = ui.readonly();
44
+ syncBooleanStateAttr(renderer, el, 'editable', isReadonly, 'false', 'true', readonlyFlag);
45
+ syncBooleanStateAttr(renderer, el, 'aria-readonly', isReadonly, 'true', 'false', {
46
+ applied: readonlyFlag.applied,
47
+ });
48
+ });
49
+ effect(() => {
50
+ syncBooleanStateAttr(renderer, el, 'visible', ui.hidden(), 'false', 'true', hiddenFlag);
51
+ });
52
+ effect(() => {
53
+ syncBooleanStateAttr(renderer, el, 'aria-required', ui.required(), 'true', 'false', requiredFlag);
54
+ });
55
+ effect(() => {
56
+ const isInvalid = ui.invalid();
57
+ syncStateClass(renderer, el, 'ng-invalid', isInvalid);
58
+ syncBooleanStateAttr(renderer, el, 'aria-invalid', isInvalid, 'true', 'false', invalidFlag);
59
+ });
60
+ effect(() => {
61
+ syncStateClass(renderer, el, 'ng-touched', ui.touched());
62
+ });
63
+ effect(() => {
64
+ syncStateClass(renderer, el, 'ng-dirty', ui.dirty());
65
+ });
66
+ effect(() => {
67
+ const fieldName = ui.name();
68
+ if (fieldName && el.attributes.get('name') !== fieldName) {
69
+ renderer.setAttribute(el, 'name', fieldName);
70
+ }
71
+ });
72
+ }
73
+ function syncDefinedNumericAttr(renderer, el, attrName, val) {
74
+ if (val === undefined || !Number.isFinite(val)) {
75
+ return;
76
+ }
77
+ const next = String(val);
78
+ if (el.attributes.get(attrName) !== next) {
79
+ renderer.setAttribute(el, attrName, next);
80
+ }
81
+ }
82
+ /**
83
+ * First-class Angular Signal Forms `FormValueControl<string>` binding `[formField]` onto native
84
+ * text widgets (`<ng-entry>`, `<ng-search-entry>`, `<ng-password-entry>`, `<ng-text-view>`, `<input>`, `<textarea>`).
85
+ */
86
+ export class NativeTextFieldControl {
87
+ renderer = inject(Renderer2);
88
+ elementRef = inject(ElementRef);
89
+ unlistenFns = [];
90
+ value = model('', /* @ts-ignore */
91
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
92
+ disabled = input(false, /* @ts-ignore */
93
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
94
+ readonly = input(false, /* @ts-ignore */
95
+ ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
96
+ hidden = input(false, /* @ts-ignore */
97
+ ...(ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []));
98
+ required = input(false, /* @ts-ignore */
99
+ ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
100
+ invalid = input(false, /* @ts-ignore */
101
+ ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
102
+ touched = input(false, /* @ts-ignore */
103
+ ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
104
+ dirty = input(false, /* @ts-ignore */
105
+ ...(ngDevMode ? [{ debugName: "dirty" }] : /* istanbul ignore next */ []));
106
+ name = input('', /* @ts-ignore */
107
+ ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
108
+ minLength = input(undefined, /* @ts-ignore */
109
+ ...(ngDevMode ? [{ debugName: "minLength" }] : /* istanbul ignore next */ []));
110
+ maxLength = input(undefined, /* @ts-ignore */
111
+ ...(ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []));
112
+ errors = input([], /* @ts-ignore */
113
+ ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
114
+ touch = output();
115
+ constructor() {
116
+ const el = this.elementRef.nativeElement;
117
+ bindNativeSignalUiEffects(this.renderer, el, this);
118
+ effect(() => {
119
+ const normalized = this.value() ?? '';
120
+ if (el.attributes.get('value') !== normalized || el.textContent !== normalized) {
121
+ this.renderer.setValue(el, normalized);
122
+ this.renderer.setAttribute(el, 'value', normalized);
123
+ }
124
+ });
125
+ effect(() => {
126
+ syncDefinedNumericAttr(this.renderer, el, 'max-length', this.maxLength());
127
+ });
128
+ this.unlistenFns.push(this.renderer.listen(el, 'input', (event) => {
129
+ const payload = event;
130
+ const nextText = typeof payload?.value === 'string' ? payload.value : String(payload?.value ?? '');
131
+ el.textContent = nextText;
132
+ el.attributes.set('value', nextText);
133
+ this.value.set(nextText);
134
+ }), this.renderer.listen(el, 'blur', () => {
135
+ this.touch.emit();
136
+ }));
137
+ }
138
+ focus() {
139
+ this.elementRef.nativeElement.focus?.();
140
+ }
141
+ ngOnDestroy() {
142
+ for (const unlisten of this.unlistenFns) {
143
+ unlisten();
144
+ }
145
+ }
146
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeTextFieldControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
147
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.3.0", type: NativeTextFieldControl, isStandalone: true, selector: "ng-entry[formField],gtk-entry[formField],ng-search-entry[formField],gtk-search-entry[formField],ng-password-entry[formField],gtk-password-entry[formField],ng-text-view[formField],gtk-text-view[formField],adw-entry-row[formField],adw-password-entry-row[formField],input[formField]:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=number]),textarea[formField]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touch: "touch" }, ngImport: i0 });
148
+ }
149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeTextFieldControl, decorators: [{
150
+ type: Directive,
151
+ args: [{
152
+ selector: 'ng-entry[formField],gtk-entry[formField],ng-search-entry[formField],gtk-search-entry[formField],ng-password-entry[formField],gtk-password-entry[formField],ng-text-view[formField],gtk-text-view[formField],adw-entry-row[formField],adw-password-entry-row[formField],input[formField]:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=number]),textarea[formField]',
153
+ standalone: true,
154
+ }]
155
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], dirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "dirty", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] } });
156
+ /**
157
+ * First-class Angular Signal Forms `FormCheckboxControl` binding `[formField]` onto native boolean
158
+ * widgets (`<ng-switch>`, `<ng-checkbox>`, `<ng-check>`, `<ng-check-button>`, `<gtk-switch>`, `<gtk-check-button>`).
159
+ */
160
+ export class NativeBooleanFieldControl {
161
+ renderer = inject(Renderer2);
162
+ elementRef = inject(ElementRef);
163
+ unlistenFns = [];
164
+ checked = model(false, /* @ts-ignore */
165
+ ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
166
+ disabled = input(false, /* @ts-ignore */
167
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
168
+ readonly = input(false, /* @ts-ignore */
169
+ ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
170
+ hidden = input(false, /* @ts-ignore */
171
+ ...(ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []));
172
+ required = input(false, /* @ts-ignore */
173
+ ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
174
+ invalid = input(false, /* @ts-ignore */
175
+ ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
176
+ touched = input(false, /* @ts-ignore */
177
+ ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
178
+ dirty = input(false, /* @ts-ignore */
179
+ ...(ngDevMode ? [{ debugName: "dirty" }] : /* istanbul ignore next */ []));
180
+ name = input('', /* @ts-ignore */
181
+ ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
182
+ errors = input([], /* @ts-ignore */
183
+ ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
184
+ touch = output();
185
+ constructor() {
186
+ const el = this.elementRef.nativeElement;
187
+ bindNativeSignalUiEffects(this.renderer, el, this);
188
+ effect(() => {
189
+ const nextBool = Boolean(this.checked());
190
+ const nextAttr = nextBool ? 'true' : 'false';
191
+ if (el.attributes.get('active') !== nextAttr) {
192
+ this.renderer.setAttribute(el, 'active', nextAttr);
193
+ }
194
+ el.checked = nextBool;
195
+ });
196
+ this.unlistenFns.push(this.renderer.listen(el, 'toggled', (event) => {
197
+ const payload = event;
198
+ const active = typeof payload?.checked === 'boolean' ? payload.checked : Boolean(payload?.value);
199
+ el.checked = active;
200
+ this.checked.set(active);
201
+ this.touch.emit();
202
+ }), this.renderer.listen(el, 'blur', () => {
203
+ this.touch.emit();
204
+ }));
205
+ }
206
+ focus() {
207
+ this.elementRef.nativeElement.focus?.();
208
+ }
209
+ ngOnDestroy() {
210
+ for (const unlisten of this.unlistenFns) {
211
+ unlisten();
212
+ }
213
+ }
214
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeBooleanFieldControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
215
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.3.0", type: NativeBooleanFieldControl, isStandalone: true, selector: "ng-switch[formField],gtk-switch[formField],ng-checkbox[formField],ng-check[formField],ng-check-button[formField],gtk-check-button[formField],adw-switch-row[formField]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touch: "touch" }, ngImport: i0 });
216
+ }
217
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeBooleanFieldControl, decorators: [{
218
+ type: Directive,
219
+ args: [{
220
+ selector: 'ng-switch[formField],gtk-switch[formField],ng-checkbox[formField],ng-check[formField],ng-check-button[formField],gtk-check-button[formField],adw-switch-row[formField]',
221
+ standalone: true,
222
+ }]
223
+ }], ctorParameters: () => [], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], dirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "dirty", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] } });
224
+ /**
225
+ * First-class Angular Signal Forms `FormValueControl<number>` binding `[formField]` onto native
226
+ * numeric/selection widgets (`<ng-slider>`, `<ng-spin-button>`, `<ng-select>`, `<select>`, `<input type="number|range">`).
227
+ */
228
+ export class NativeNumberFieldControl {
229
+ renderer = inject(Renderer2);
230
+ elementRef = inject(ElementRef);
231
+ unlistenFns = [];
232
+ value = model(0, /* @ts-ignore */
233
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
234
+ disabled = input(false, /* @ts-ignore */
235
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
236
+ readonly = input(false, /* @ts-ignore */
237
+ ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
238
+ hidden = input(false, /* @ts-ignore */
239
+ ...(ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []));
240
+ required = input(false, /* @ts-ignore */
241
+ ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
242
+ invalid = input(false, /* @ts-ignore */
243
+ ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
244
+ touched = input(false, /* @ts-ignore */
245
+ ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
246
+ dirty = input(false, /* @ts-ignore */
247
+ ...(ngDevMode ? [{ debugName: "dirty" }] : /* istanbul ignore next */ []));
248
+ name = input('', /* @ts-ignore */
249
+ ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
250
+ min = input(undefined, /* @ts-ignore */
251
+ ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
252
+ max = input(undefined, /* @ts-ignore */
253
+ ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
254
+ errors = input([], /* @ts-ignore */
255
+ ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
256
+ touch = output();
257
+ constructor() {
258
+ const el = this.elementRef.nativeElement;
259
+ const attrKey = SELECT_NUMBER_TAGS.has(el.tag) || el.tag === 'select' ? 'selected' : 'value';
260
+ bindNativeSignalUiEffects(this.renderer, el, this);
261
+ effect(() => {
262
+ const nextStr = String(this.value() ?? 0);
263
+ if (el.attributes.get(attrKey) !== nextStr) {
264
+ this.renderer.setAttribute(el, attrKey, nextStr);
265
+ }
266
+ });
267
+ effect(() => {
268
+ syncDefinedNumericAttr(this.renderer, el, 'min', this.min());
269
+ });
270
+ effect(() => {
271
+ syncDefinedNumericAttr(this.renderer, el, 'max', this.max());
272
+ });
273
+ this.unlistenFns.push(this.renderer.listen(el, 'value-changed', (event) => {
274
+ const payload = event;
275
+ const numValue = Number(payload?.value ?? 0);
276
+ el.attributes.set(attrKey, String(numValue));
277
+ this.value.set(numValue);
278
+ this.touch.emit();
279
+ }), this.renderer.listen(el, 'blur', () => {
280
+ this.touch.emit();
281
+ }));
282
+ }
283
+ focus() {
284
+ this.elementRef.nativeElement.focus?.();
285
+ }
286
+ ngOnDestroy() {
287
+ for (const unlisten of this.unlistenFns) {
288
+ unlisten();
289
+ }
290
+ }
291
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeNumberFieldControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
292
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.3.0", type: NativeNumberFieldControl, isStandalone: true, selector: "ng-slider[formField],ng-scale[formField],gtk-scale[formField],ng-select[formField],ng-dropdown[formField],gtk-dropdown[formField],gtk-drop-down[formField],ng-spin-button[formField],gtk-spin-button[formField],adw-combo-row[formField],adw-spin-row[formField],select[formField],input[type=number][formField],input[type=range][formField]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touch: "touch" }, ngImport: i0 });
293
+ }
294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeNumberFieldControl, decorators: [{
295
+ type: Directive,
296
+ args: [{
297
+ selector: 'ng-slider[formField],ng-scale[formField],gtk-scale[formField],ng-select[formField],ng-dropdown[formField],gtk-dropdown[formField],gtk-drop-down[formField],ng-spin-button[formField],gtk-spin-button[formField],adw-combo-row[formField],adw-spin-row[formField],select[formField],input[type=number][formField],input[type=range][formField]',
298
+ standalone: true,
299
+ }]
300
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], dirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "dirty", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] } });
301
+ /**
302
+ * Convenience standalone directive bundle enabling Angular Signal Forms (`[formField]`) on all
303
+ * native text, boolean, numeric, and mapped standard HTML widgets.
304
+ */
305
+ export const NATIVE_SIGNAL_FORM_DIRECTIVES = [
306
+ FormField,
307
+ NativeTextFieldControl,
308
+ NativeBooleanFieldControl,
309
+ NativeNumberFieldControl,
310
+ ];
@@ -1,6 +1,7 @@
1
1
  import { OnDestroy } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
3
  import * as i0 from "@angular/core";
4
+ export declare const SELECT_NUMBER_TAGS: Set<string>;
4
5
  /**
5
6
  * Angular `ControlValueAccessor` for `<ng-entry>` / `<gtk-entry>` / `<adw-entry-row>` text input widgets.
6
7
  * Bridges `GtkEditable::changed` (`input`) native signals and `gtk_editable_set_text`.
@@ -1,7 +1,7 @@
1
1
  import { Directive, ElementRef, forwardRef, inject, Renderer2 } from '@angular/core';
2
2
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
3
  import * as i0 from "@angular/core";
4
- const SELECT_NUMBER_TAGS = new Set([
4
+ export const SELECT_NUMBER_TAGS = new Set([
5
5
  'ng-select',
6
6
  'ng-dropdown',
7
7
  'gtk-dropdown',
@@ -50,8 +50,8 @@ export class NativeTextValueAccessor {
50
50
  unlisten();
51
51
  }
52
52
  }
53
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeTextValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive });
54
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.2.6", type: NativeTextValueAccessor, isStandalone: true, selector: "ng-entry[formControlName],ng-entry[formControl],ng-entry[ngModel],gtk-entry[formControlName],gtk-entry[formControl],gtk-entry[ngModel],ng-search-entry[formControlName],ng-search-entry[formControl],ng-search-entry[ngModel],gtk-search-entry[formControlName],gtk-search-entry[formControl],gtk-search-entry[ngModel],ng-password-entry[formControlName],ng-password-entry[formControl],ng-password-entry[ngModel],gtk-password-entry[formControlName],gtk-password-entry[formControl],gtk-password-entry[ngModel],ng-text-view[formControlName],ng-text-view[formControl],ng-text-view[ngModel],gtk-text-view[formControlName],gtk-text-view[formControl],gtk-text-view[ngModel],adw-entry-row[formControlName],adw-entry-row[formControl],adw-entry-row[ngModel],adw-password-entry-row[formControlName],adw-password-entry-row[formControl],adw-password-entry-row[ngModel]", providers: [
53
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeTextValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive });
54
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.0", type: NativeTextValueAccessor, isStandalone: true, selector: "ng-entry[formControlName],ng-entry[formControl],ng-entry[ngModel],gtk-entry[formControlName],gtk-entry[formControl],gtk-entry[ngModel],ng-search-entry[formControlName],ng-search-entry[formControl],ng-search-entry[ngModel],gtk-search-entry[formControlName],gtk-search-entry[formControl],gtk-search-entry[ngModel],ng-password-entry[formControlName],ng-password-entry[formControl],ng-password-entry[ngModel],gtk-password-entry[formControlName],gtk-password-entry[formControl],gtk-password-entry[ngModel],ng-text-view[formControlName],ng-text-view[formControl],ng-text-view[ngModel],gtk-text-view[formControlName],gtk-text-view[formControl],gtk-text-view[ngModel],adw-entry-row[formControlName],adw-entry-row[formControl],adw-entry-row[ngModel],adw-password-entry-row[formControlName],adw-password-entry-row[formControl],adw-password-entry-row[ngModel]", providers: [
55
55
  {
56
56
  provide: NG_VALUE_ACCESSOR,
57
57
  useExisting: forwardRef(() => NativeTextValueAccessor),
@@ -59,7 +59,7 @@ export class NativeTextValueAccessor {
59
59
  },
60
60
  ], ngImport: i0 });
61
61
  }
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeTextValueAccessor, decorators: [{
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeTextValueAccessor, decorators: [{
63
63
  type: Directive,
64
64
  args: [{
65
65
  selector: 'ng-entry[formControlName],ng-entry[formControl],ng-entry[ngModel],gtk-entry[formControlName],gtk-entry[formControl],gtk-entry[ngModel],ng-search-entry[formControlName],ng-search-entry[formControl],ng-search-entry[ngModel],gtk-search-entry[formControlName],gtk-search-entry[formControl],gtk-search-entry[ngModel],ng-password-entry[formControlName],ng-password-entry[formControl],ng-password-entry[ngModel],gtk-password-entry[formControlName],gtk-password-entry[formControl],gtk-password-entry[ngModel],ng-text-view[formControlName],ng-text-view[formControl],ng-text-view[ngModel],gtk-text-view[formControlName],gtk-text-view[formControl],gtk-text-view[ngModel],adw-entry-row[formControlName],adw-entry-row[formControl],adw-entry-row[ngModel],adw-password-entry-row[formControlName],adw-password-entry-row[formControl],adw-password-entry-row[ngModel]',
@@ -111,8 +111,8 @@ export class NativeBooleanValueAccessor {
111
111
  unlisten();
112
112
  }
113
113
  }
114
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeBooleanValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive });
115
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.2.6", type: NativeBooleanValueAccessor, isStandalone: true, selector: "ng-switch[formControlName],ng-switch[formControl],ng-switch[ngModel],ng-checkbox[formControlName],ng-checkbox[formControl],ng-checkbox[ngModel],ng-check[formControlName],ng-check[formControl],ng-check[ngModel],ng-check-button[formControlName],ng-check-button[formControl],ng-check-button[ngModel],gtk-switch[formControlName],gtk-switch[formControl],gtk-switch[ngModel],gtk-check-button[formControlName],gtk-check-button[formControl],gtk-check-button[ngModel],adw-switch-row[formControlName],adw-switch-row[formControl],adw-switch-row[ngModel]", providers: [
114
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeBooleanValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive });
115
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.0", type: NativeBooleanValueAccessor, isStandalone: true, selector: "ng-switch[formControlName],ng-switch[formControl],ng-switch[ngModel],ng-checkbox[formControlName],ng-checkbox[formControl],ng-checkbox[ngModel],ng-check[formControlName],ng-check[formControl],ng-check[ngModel],ng-check-button[formControlName],ng-check-button[formControl],ng-check-button[ngModel],gtk-switch[formControlName],gtk-switch[formControl],gtk-switch[ngModel],gtk-check-button[formControlName],gtk-check-button[formControl],gtk-check-button[ngModel],adw-switch-row[formControlName],adw-switch-row[formControl],adw-switch-row[ngModel]", providers: [
116
116
  {
117
117
  provide: NG_VALUE_ACCESSOR,
118
118
  useExisting: forwardRef(() => NativeBooleanValueAccessor),
@@ -120,7 +120,7 @@ export class NativeBooleanValueAccessor {
120
120
  },
121
121
  ], ngImport: i0 });
122
122
  }
123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeBooleanValueAccessor, decorators: [{
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeBooleanValueAccessor, decorators: [{
124
124
  type: Directive,
125
125
  args: [{
126
126
  selector: 'ng-switch[formControlName],ng-switch[formControl],ng-switch[ngModel],ng-checkbox[formControlName],ng-checkbox[formControl],ng-checkbox[ngModel],ng-check[formControlName],ng-check[formControl],ng-check[ngModel],ng-check-button[formControlName],ng-check-button[formControl],ng-check-button[ngModel],gtk-switch[formControlName],gtk-switch[formControl],gtk-switch[ngModel],gtk-check-button[formControlName],gtk-check-button[formControl],gtk-check-button[ngModel],adw-switch-row[formControlName],adw-switch-row[formControl],adw-switch-row[ngModel]',
@@ -176,8 +176,8 @@ export class NativeNumberValueAccessor {
176
176
  unlisten();
177
177
  }
178
178
  }
179
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeNumberValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive });
180
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.2.6", type: NativeNumberValueAccessor, isStandalone: true, selector: "ng-slider[formControlName],ng-slider[formControl],ng-slider[ngModel],ng-scale[formControlName],ng-scale[formControl],ng-scale[ngModel],gtk-scale[formControlName],gtk-scale[formControl],gtk-scale[ngModel],ng-select[formControlName],ng-select[formControl],ng-select[ngModel],ng-dropdown[formControlName],ng-dropdown[formControl],ng-dropdown[ngModel],gtk-dropdown[formControlName],gtk-dropdown[formControl],gtk-dropdown[ngModel],gtk-drop-down[formControlName],gtk-drop-down[formControl],gtk-drop-down[ngModel],ng-spin-button[formControlName],ng-spin-button[formControl],ng-spin-button[ngModel],gtk-spin-button[formControlName],gtk-spin-button[formControl],gtk-spin-button[ngModel],adw-combo-row[formControlName],adw-combo-row[formControl],adw-combo-row[ngModel],adw-spin-row[formControlName],adw-spin-row[formControl],adw-spin-row[ngModel]", providers: [
179
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeNumberValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive });
180
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.0", type: NativeNumberValueAccessor, isStandalone: true, selector: "ng-slider[formControlName],ng-slider[formControl],ng-slider[ngModel],ng-scale[formControlName],ng-scale[formControl],ng-scale[ngModel],gtk-scale[formControlName],gtk-scale[formControl],gtk-scale[ngModel],ng-select[formControlName],ng-select[formControl],ng-select[ngModel],ng-dropdown[formControlName],ng-dropdown[formControl],ng-dropdown[ngModel],gtk-dropdown[formControlName],gtk-dropdown[formControl],gtk-dropdown[ngModel],gtk-drop-down[formControlName],gtk-drop-down[formControl],gtk-drop-down[ngModel],ng-spin-button[formControlName],ng-spin-button[formControl],ng-spin-button[ngModel],gtk-spin-button[formControlName],gtk-spin-button[formControl],gtk-spin-button[ngModel],adw-combo-row[formControlName],adw-combo-row[formControl],adw-combo-row[ngModel],adw-spin-row[formControlName],adw-spin-row[formControl],adw-spin-row[ngModel]", providers: [
181
181
  {
182
182
  provide: NG_VALUE_ACCESSOR,
183
183
  useExisting: forwardRef(() => NativeNumberValueAccessor),
@@ -185,7 +185,7 @@ export class NativeNumberValueAccessor {
185
185
  },
186
186
  ], ngImport: i0 });
187
187
  }
188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeNumberValueAccessor, decorators: [{
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeNumberValueAccessor, decorators: [{
189
189
  type: Directive,
190
190
  args: [{
191
191
  selector: 'ng-slider[formControlName],ng-slider[formControl],ng-slider[ngModel],ng-scale[formControlName],ng-scale[formControl],ng-scale[ngModel],gtk-scale[formControlName],gtk-scale[formControl],gtk-scale[ngModel],ng-select[formControlName],ng-select[formControl],ng-select[ngModel],ng-dropdown[formControlName],ng-dropdown[formControl],ng-dropdown[ngModel],gtk-dropdown[formControlName],gtk-dropdown[formControl],gtk-dropdown[ngModel],gtk-drop-down[formControlName],gtk-drop-down[formControl],gtk-drop-down[ngModel],ng-spin-button[formControlName],ng-spin-button[formControl],ng-spin-button[ngModel],gtk-spin-button[formControlName],gtk-spin-button[formControl],gtk-spin-button[ngModel],adw-combo-row[formControlName],adw-combo-row[formControl],adw-combo-row[ngModel],adw-spin-row[formControlName],adw-spin-row[formControl],adw-spin-row[ngModel]',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ng-desktop/forms",
3
- "version": "0.4.0",
4
- "description": "Angular ControlValueAccessor directives for Native GTK4 / WinUI 3 / AppKit widgets (<ng-entry>, <ng-switch>, <ng-checkbox>, <ng-slider>, <ng-select>)",
3
+ "version": "0.5.0",
4
+ "description": "Angular Signal Forms ([formField]) & ControlValueAccessor directives for Native GTK4 / WinUI 3 / AppKit widgets (<ng-entry>, <ng-switch>, <ng-checkbox>, <ng-slider>, <ng-select>)",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "angular",