@ng-desktop/forms 0.6.0 → 0.7.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
|
@@ -19,7 +19,6 @@ import { NATIVE_UI_DIRECTIVES } from '@ng-desktop/platform';
|
|
|
19
19
|
|
|
20
20
|
@Component({
|
|
21
21
|
selector: 'app-preferences',
|
|
22
|
-
standalone: true,
|
|
23
22
|
imports: [NATIVE_UI_DIRECTIVES, NATIVE_SIGNAL_FORM_DIRECTIVES],
|
|
24
23
|
template: `
|
|
25
24
|
<ng-box orientation="vertical" spacing="10px">
|
|
@@ -54,7 +53,6 @@ import { NATIVE_UI_DIRECTIVES } from '@ng-desktop/platform';
|
|
|
54
53
|
|
|
55
54
|
@Component({
|
|
56
55
|
selector: 'app-legacy-preferences',
|
|
57
|
-
standalone: true,
|
|
58
56
|
imports: [ReactiveFormsModule, NATIVE_FORM_DIRECTIVES, NATIVE_UI_DIRECTIVES],
|
|
59
57
|
template: `
|
|
60
58
|
<ng-box [formGroup]="form" orientation="vertical" spacing="10px">
|
|
@@ -51,7 +51,7 @@ export declare class NativeBooleanFieldControl implements FormCheckboxControl, O
|
|
|
51
51
|
focus(): void;
|
|
52
52
|
ngOnDestroy(): void;
|
|
53
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>;
|
|
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],input[type=checkbox][formField],input[type=radio][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
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* First-class Angular Signal Forms `FormValueControl<number>` binding `[formField]` onto native
|
package/fesm2022/signal-forms.js
CHANGED
|
@@ -123,6 +123,7 @@ export class NativeTextFieldControl {
|
|
|
123
123
|
}
|
|
124
124
|
});
|
|
125
125
|
effect(() => {
|
|
126
|
+
syncDefinedNumericAttr(this.renderer, el, 'min-length', this.minLength());
|
|
126
127
|
syncDefinedNumericAttr(this.renderer, el, 'max-length', this.maxLength());
|
|
127
128
|
});
|
|
128
129
|
this.unlistenFns.push(this.renderer.listen(el, 'input', (event) => {
|
|
@@ -150,7 +151,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
150
151
|
type: Directive,
|
|
151
152
|
args: [{
|
|
152
153
|
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
154
|
}]
|
|
155
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
156
|
/**
|
|
@@ -196,6 +196,7 @@ export class NativeBooleanFieldControl {
|
|
|
196
196
|
this.unlistenFns.push(this.renderer.listen(el, 'toggled', (event) => {
|
|
197
197
|
const payload = event;
|
|
198
198
|
const active = typeof payload?.checked === 'boolean' ? payload.checked : Boolean(payload?.value);
|
|
199
|
+
el.attributes.set('active', active ? 'true' : 'false');
|
|
199
200
|
el.checked = active;
|
|
200
201
|
this.checked.set(active);
|
|
201
202
|
this.touch.emit();
|
|
@@ -212,13 +213,12 @@ export class NativeBooleanFieldControl {
|
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
215
|
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
|
+
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],input[type=checkbox][formField],input[type=radio][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
|
}
|
|
217
218
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeBooleanFieldControl, decorators: [{
|
|
218
219
|
type: Directive,
|
|
219
220
|
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,
|
|
221
|
+
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],input[type=checkbox][formField],input[type=radio][formField]',
|
|
222
222
|
}]
|
|
223
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
224
|
/**
|
|
@@ -295,7 +295,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
295
295
|
type: Directive,
|
|
296
296
|
args: [{
|
|
297
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
298
|
}]
|
|
300
299
|
}], 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
300
|
/**
|
|
@@ -63,7 +63,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
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]',
|
|
66
|
-
standalone: true,
|
|
67
66
|
providers: [
|
|
68
67
|
{
|
|
69
68
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -124,7 +123,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
124
123
|
type: Directive,
|
|
125
124
|
args: [{
|
|
126
125
|
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]',
|
|
127
|
-
standalone: true,
|
|
128
126
|
providers: [
|
|
129
127
|
{
|
|
130
128
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -189,7 +187,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
189
187
|
type: Directive,
|
|
190
188
|
args: [{
|
|
191
189
|
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]',
|
|
192
|
-
standalone: true,
|
|
193
190
|
providers: [
|
|
194
191
|
{
|
|
195
192
|
provide: NG_VALUE_ACCESSOR,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-desktop/forms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
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": [
|