@ng-forge/dynamic-forms-material 1.2.0-next.5 → 1.2.0-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-button.mjs +106 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-button.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-icon.mjs +34 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-icon.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-button.mjs +60 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-button.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-checkbox.mjs +76 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-checkbox.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-datepicker.mjs +124 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-datepicker.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-input.mjs +196 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-input.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-multi-checkbox.mjs +136 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-multi-checkbox.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-radio.mjs +92 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-radio.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-select.mjs +106 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-select.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-slider.mjs +76 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-slider.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-textarea.mjs +92 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-textarea.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-toggle.mjs +76 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-toggle.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-QsDJRuUx.mjs +26 -0
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-QsDJRuUx.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-shared.mjs +14 -0
- package/fesm2022/ng-forge-dynamic-forms-material-shared.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material.mjs +42 -93
- package/fesm2022/ng-forge-dynamic-forms-material.mjs.map +1 -1
- package/package.json +55 -3
- package/types/ng-forge-dynamic-forms-material-lazy-addon-button.d.ts +18 -0
- package/types/ng-forge-dynamic-forms-material-lazy-addon-icon.d.ts +17 -0
- package/types/ng-forge-dynamic-forms-material-lazy-button.d.ts +114 -0
- package/types/ng-forge-dynamic-forms-material-lazy-checkbox.d.ts +26 -0
- package/types/ng-forge-dynamic-forms-material-lazy-datepicker.d.ts +37 -0
- package/types/ng-forge-dynamic-forms-material-lazy-input.d.ts +55 -0
- package/types/ng-forge-dynamic-forms-material-lazy-multi-checkbox.d.ts +29 -0
- package/types/ng-forge-dynamic-forms-material-lazy-radio.d.ts +24 -0
- package/types/ng-forge-dynamic-forms-material-lazy-select.d.ts +35 -0
- package/types/ng-forge-dynamic-forms-material-lazy-slider.d.ts +27 -0
- package/types/ng-forge-dynamic-forms-material-lazy-textarea.d.ts +31 -0
- package/types/ng-forge-dynamic-forms-material-lazy-toggle.d.ts +28 -0
- package/types/ng-forge-dynamic-forms-material-shared.d.ts +91 -0
- package/types/ng-forge-dynamic-forms-material.d.ts +10 -161
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as _angular_material_form_field from '@angular/material/form-field';
|
|
2
|
+
import { MatFormFieldAppearance, SubscriptSizing, FloatLabelType } from '@angular/material/form-field';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
|
|
5
|
+
import { InputField, InputProps, WrapperFieldInputs } from '@ng-forge/dynamic-forms/integration';
|
|
6
|
+
import { DynamicText, TextAddon, TemplateAddon } from '@ng-forge/dynamic-forms';
|
|
7
|
+
import { MatIconAddon, MatButtonAddon } from '@ng-forge/dynamic-forms-material/shared';
|
|
8
|
+
|
|
9
|
+
interface MatInputProps extends InputProps {
|
|
10
|
+
appearance?: MatFormFieldAppearance;
|
|
11
|
+
disableRipple?: boolean;
|
|
12
|
+
subscriptSizing?: SubscriptSizing;
|
|
13
|
+
floatLabel?: FloatLabelType;
|
|
14
|
+
hideRequiredMarker?: boolean;
|
|
15
|
+
type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
|
|
16
|
+
hint?: DynamicText;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Module-augmentable seam for adding custom addon types to `mat-input` at
|
|
20
|
+
* the type level. Pair with `withCustomAddon(...)` for the runtime side:
|
|
21
|
+
*/
|
|
22
|
+
interface MatAddonExtensions {
|
|
23
|
+
}
|
|
24
|
+
type MatAddonExtension = MatAddonExtensions[keyof MatAddonExtensions];
|
|
25
|
+
/** Addon types accepted by `mat-input`. */
|
|
26
|
+
type MatInputAddon = MatIconAddon | MatButtonAddon | TextAddon | TemplateAddon | MatAddonExtension;
|
|
27
|
+
type MatInputField = InputField<MatInputProps> & {
|
|
28
|
+
addons?: ReadonlyArray<MatInputAddon>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
declare class MatInputFieldComponent {
|
|
32
|
+
private materialConfig;
|
|
33
|
+
protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<string>;
|
|
34
|
+
protected readonly ngfa: _ng_forge_dynamic_forms_integration.TypedNgForgeAddons<MatInputAddon>;
|
|
35
|
+
readonly props: _angular_core.InputSignal<MatInputProps | undefined>;
|
|
36
|
+
/**
|
|
37
|
+
* Wrapper-style host bag pushed by `DfFieldOutlet`. Declared at the
|
|
38
|
+
* component level so `setInputIfDeclared` (which uses
|
|
39
|
+
* `reflectComponentType`) can write it.
|
|
40
|
+
*/
|
|
41
|
+
readonly fieldInputs: _angular_core.InputSignal<WrapperFieldInputs | undefined>;
|
|
42
|
+
/** Per-instance type override populated by `toggle-password-visibility` preset. */
|
|
43
|
+
private readonly typeOverride;
|
|
44
|
+
readonly appearance: _angular_core.Signal<_angular_material_form_field.MatFormFieldAppearance>;
|
|
45
|
+
readonly subscriptSizing: _angular_core.Signal<_angular_material_form_field.SubscriptSizing>;
|
|
46
|
+
readonly floatLabel: _angular_core.Signal<_angular_material_form_field.FloatLabelType>;
|
|
47
|
+
readonly hideRequiredMarker: _angular_core.Signal<boolean>;
|
|
48
|
+
/** Override (set by `toggle-password-visibility` preset) wins over `props().type`. */
|
|
49
|
+
protected readonly type: _angular_core.Signal<string>;
|
|
50
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatInputFieldComponent, never>;
|
|
51
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatInputFieldComponent, "df-mat-input", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; "fieldInputs": { "alias": "fieldInputs"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }, { directive: typeof _ng_forge_dynamic_forms_integration.NgForgeAddons; inputs: {}; outputs: {}; }]>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { MatInputFieldComponent };
|
|
55
|
+
export type { MatInputField, MatInputProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
|
|
3
|
+
import { MultiCheckboxField } from '@ng-forge/dynamic-forms/integration';
|
|
4
|
+
import { DynamicText, ValueType, FieldOption } from '@ng-forge/dynamic-forms';
|
|
5
|
+
import { ThemePalette } from '@angular/material/core';
|
|
6
|
+
|
|
7
|
+
interface MatMultiCheckboxProps {
|
|
8
|
+
disableRipple?: boolean;
|
|
9
|
+
hint?: DynamicText;
|
|
10
|
+
labelPosition?: 'before' | 'after';
|
|
11
|
+
color?: ThemePalette;
|
|
12
|
+
}
|
|
13
|
+
type MatMultiCheckboxField<T> = MultiCheckboxField<T, MatMultiCheckboxProps>;
|
|
14
|
+
|
|
15
|
+
declare class MatMultiCheckboxFieldComponent {
|
|
16
|
+
protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<ValueType[]>;
|
|
17
|
+
readonly options: _angular_core.InputSignal<FieldOption<ValueType>[]>;
|
|
18
|
+
readonly props: _angular_core.InputSignal<MatMultiCheckboxProps | undefined>;
|
|
19
|
+
valueViewModel: _angular_core.WritableSignal<FieldOption<ValueType>[]>;
|
|
20
|
+
/** Computed map of checked option values for O(1) lookup in template */
|
|
21
|
+
readonly checkedValuesMap: _angular_core.Signal<Record<string, boolean>>;
|
|
22
|
+
constructor();
|
|
23
|
+
onCheckboxChange(option: FieldOption<ValueType>, checked: boolean): void;
|
|
24
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatMultiCheckboxFieldComponent, never>;
|
|
25
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatMultiCheckboxFieldComponent, "df-mat-multi-checkbox", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { MatMultiCheckboxFieldComponent };
|
|
29
|
+
export type { MatMultiCheckboxField, MatMultiCheckboxProps };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
|
|
3
|
+
import { RadioField } from '@ng-forge/dynamic-forms/integration';
|
|
4
|
+
import { DynamicText, ValueType, FieldOption } from '@ng-forge/dynamic-forms';
|
|
5
|
+
import { ThemePalette } from '@angular/material/core';
|
|
6
|
+
|
|
7
|
+
interface MatRadioProps {
|
|
8
|
+
disableRipple?: boolean;
|
|
9
|
+
color?: ThemePalette;
|
|
10
|
+
labelPosition?: 'before' | 'after';
|
|
11
|
+
hint?: DynamicText;
|
|
12
|
+
}
|
|
13
|
+
type MatRadioField<T> = RadioField<T, MatRadioProps>;
|
|
14
|
+
|
|
15
|
+
declare class MatRadioFieldComponent {
|
|
16
|
+
protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<ValueType>;
|
|
17
|
+
readonly options: _angular_core.InputSignal<FieldOption<ValueType>[]>;
|
|
18
|
+
readonly props: _angular_core.InputSignal<MatRadioProps | undefined>;
|
|
19
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatRadioFieldComponent, never>;
|
|
20
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatRadioFieldComponent, "df-mat-radio", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { MatRadioFieldComponent };
|
|
24
|
+
export type { MatRadioField, MatRadioProps };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as _angular_material_form_field from '@angular/material/form-field';
|
|
2
|
+
import { MatFormFieldAppearance, SubscriptSizing, FloatLabelType } from '@angular/material/form-field';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
|
|
5
|
+
import { SelectField, SelectProps } from '@ng-forge/dynamic-forms/integration';
|
|
6
|
+
import { ValueType, DynamicText, FieldOption } from '@ng-forge/dynamic-forms';
|
|
7
|
+
|
|
8
|
+
interface MatSelectProps extends SelectProps {
|
|
9
|
+
appearance?: MatFormFieldAppearance;
|
|
10
|
+
multiple?: boolean;
|
|
11
|
+
panelMaxHeight?: string;
|
|
12
|
+
subscriptSizing?: SubscriptSizing;
|
|
13
|
+
floatLabel?: FloatLabelType;
|
|
14
|
+
hideRequiredMarker?: boolean;
|
|
15
|
+
compareWith?: (o1: ValueType, o2: ValueType) => boolean;
|
|
16
|
+
hint?: DynamicText;
|
|
17
|
+
}
|
|
18
|
+
type MatSelectField<T> = SelectField<T, MatSelectProps>;
|
|
19
|
+
|
|
20
|
+
declare class MatSelectFieldComponent {
|
|
21
|
+
private materialConfig;
|
|
22
|
+
protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<ValueType>;
|
|
23
|
+
readonly options: _angular_core.InputSignal<FieldOption<ValueType>[]>;
|
|
24
|
+
readonly props: _angular_core.InputSignal<MatSelectProps | undefined>;
|
|
25
|
+
readonly appearance: _angular_core.Signal<_angular_material_form_field.MatFormFieldAppearance>;
|
|
26
|
+
readonly subscriptSizing: _angular_core.Signal<_angular_material_form_field.SubscriptSizing>;
|
|
27
|
+
readonly floatLabel: _angular_core.Signal<_angular_material_form_field.FloatLabelType>;
|
|
28
|
+
readonly hideRequiredMarker: _angular_core.Signal<boolean>;
|
|
29
|
+
defaultCompare: (value1: any, value2: any) => boolean;
|
|
30
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatSelectFieldComponent, never>;
|
|
31
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatSelectFieldComponent, "df-mat-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { MatSelectFieldComponent };
|
|
35
|
+
export type { MatSelectField, MatSelectProps };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
|
|
3
|
+
import { SliderField } from '@ng-forge/dynamic-forms/integration';
|
|
4
|
+
import { DynamicText } from '@ng-forge/dynamic-forms';
|
|
5
|
+
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
6
|
+
|
|
7
|
+
interface MatSliderProps {
|
|
8
|
+
hint?: DynamicText;
|
|
9
|
+
color?: 'primary' | 'accent' | 'warn';
|
|
10
|
+
appearance?: MatFormFieldAppearance;
|
|
11
|
+
thumbLabel?: boolean;
|
|
12
|
+
showThumbLabel?: boolean;
|
|
13
|
+
tickInterval?: number | 'auto';
|
|
14
|
+
step?: number;
|
|
15
|
+
}
|
|
16
|
+
type MatSliderField = SliderField<MatSliderProps>;
|
|
17
|
+
|
|
18
|
+
declare class MatSliderFieldComponent {
|
|
19
|
+
protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<number>;
|
|
20
|
+
readonly step: _angular_core.InputSignal<number | undefined>;
|
|
21
|
+
readonly props: _angular_core.InputSignal<MatSliderProps | undefined>;
|
|
22
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatSliderFieldComponent, never>;
|
|
23
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatSliderFieldComponent, "df-mat-slider", never, { "step": { "alias": "step"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { MatSliderFieldComponent };
|
|
27
|
+
export type { MatSliderField, MatSliderProps };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as _angular_material_form_field from '@angular/material/form-field';
|
|
2
|
+
import { MatFormFieldAppearance, SubscriptSizing, FloatLabelType } from '@angular/material/form-field';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
|
|
5
|
+
import { TextareaField, TextareaProps } from '@ng-forge/dynamic-forms/integration';
|
|
6
|
+
import { DynamicText } from '@ng-forge/dynamic-forms';
|
|
7
|
+
|
|
8
|
+
interface MatTextareaProps extends TextareaProps {
|
|
9
|
+
hint?: DynamicText;
|
|
10
|
+
appearance?: MatFormFieldAppearance;
|
|
11
|
+
subscriptSizing?: SubscriptSizing;
|
|
12
|
+
floatLabel?: FloatLabelType;
|
|
13
|
+
hideRequiredMarker?: boolean;
|
|
14
|
+
resize?: 'none' | 'both' | 'horizontal' | 'vertical';
|
|
15
|
+
}
|
|
16
|
+
type MatTextareaField = TextareaField<MatTextareaProps>;
|
|
17
|
+
|
|
18
|
+
declare class MatTextareaFieldComponent {
|
|
19
|
+
private materialConfig;
|
|
20
|
+
protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<string>;
|
|
21
|
+
readonly props: _angular_core.InputSignal<MatTextareaProps | undefined>;
|
|
22
|
+
readonly appearance: _angular_core.Signal<_angular_material_form_field.MatFormFieldAppearance>;
|
|
23
|
+
readonly subscriptSizing: _angular_core.Signal<_angular_material_form_field.SubscriptSizing>;
|
|
24
|
+
readonly floatLabel: _angular_core.Signal<_angular_material_form_field.FloatLabelType>;
|
|
25
|
+
readonly hideRequiredMarker: _angular_core.Signal<boolean>;
|
|
26
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatTextareaFieldComponent, never>;
|
|
27
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatTextareaFieldComponent, "df-mat-textarea", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { MatTextareaFieldComponent };
|
|
31
|
+
export type { MatTextareaField, MatTextareaProps };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
|
|
3
|
+
import { ToggleField } from '@ng-forge/dynamic-forms/integration';
|
|
4
|
+
import { DynamicText } from '@ng-forge/dynamic-forms';
|
|
5
|
+
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
6
|
+
import { ThemePalette } from '@angular/material/core';
|
|
7
|
+
|
|
8
|
+
interface MatToggleProps {
|
|
9
|
+
hint?: DynamicText;
|
|
10
|
+
appearance?: MatFormFieldAppearance;
|
|
11
|
+
color?: ThemePalette;
|
|
12
|
+
labelPosition?: 'before' | 'after';
|
|
13
|
+
disableRipple?: boolean;
|
|
14
|
+
hideIcon?: boolean;
|
|
15
|
+
}
|
|
16
|
+
type MatToggleField = ToggleField<MatToggleProps>;
|
|
17
|
+
|
|
18
|
+
declare class MatToggleFieldComponent {
|
|
19
|
+
private materialConfig;
|
|
20
|
+
protected readonly ngf: _ng_forge_dynamic_forms_integration.TypedNgForgeField<boolean>;
|
|
21
|
+
readonly props: _angular_core.InputSignal<MatToggleProps | undefined>;
|
|
22
|
+
readonly disableRipple: _angular_core.Signal<boolean>;
|
|
23
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatToggleFieldComponent, never>;
|
|
24
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatToggleFieldComponent, "df-mat-toggle", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { MatToggleFieldComponent };
|
|
28
|
+
export type { MatToggleField, MatToggleProps };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { ThemePalette } from '@angular/material/core';
|
|
2
|
+
import { MatFormFieldAppearance, SubscriptSizing, FloatLabelType } from '@angular/material/form-field';
|
|
3
|
+
import { InjectionToken, WritableSignal } from '@angular/core';
|
|
4
|
+
import { AddonActionPreset, AddonActionContext, BaseAddon, DynamicText, DynamicValue, RegisteredActionRef } from '@ng-forge/dynamic-forms';
|
|
5
|
+
import { PresetCollaborators, AddonActionHandler } from '@ng-forge/dynamic-forms/integration';
|
|
6
|
+
export { PresetCollaborators } from '@ng-forge/dynamic-forms/integration';
|
|
7
|
+
|
|
8
|
+
/** Configuration options for Material Design form fields. */
|
|
9
|
+
interface MaterialConfig {
|
|
10
|
+
/** Default appearance for Material form fields. @default 'outline' */
|
|
11
|
+
appearance?: MatFormFieldAppearance;
|
|
12
|
+
/** Default subscript sizing for Material form fields. @default 'dynamic' */
|
|
13
|
+
subscriptSizing?: SubscriptSizing;
|
|
14
|
+
/** Whether to disable ripple effects by default. @default false */
|
|
15
|
+
disableRipple?: boolean;
|
|
16
|
+
/** Default color theme for form controls. @default 'primary' */
|
|
17
|
+
color?: ThemePalette;
|
|
18
|
+
/** Default label position for checkboxes and radios. @default 'after' */
|
|
19
|
+
labelPosition?: 'before' | 'after';
|
|
20
|
+
/** Default float label behavior for form fields. @default 'auto' */
|
|
21
|
+
floatLabel?: FloatLabelType;
|
|
22
|
+
/** Whether to hide the required marker by default. @default false */
|
|
23
|
+
hideRequiredMarker?: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Global configuration for Material Design form fields. */
|
|
27
|
+
declare const MATERIAL_CONFIG: InjectionToken<MaterialConfig>;
|
|
28
|
+
|
|
29
|
+
/** Per-field writable signal that overrides the input's `type` attribute. */
|
|
30
|
+
declare const MAT_INPUT_TYPE_OVERRIDE: InjectionToken<WritableSignal<string | undefined>>;
|
|
31
|
+
|
|
32
|
+
/** Material adapter binding for the shared preset runner. */
|
|
33
|
+
declare function runMatPresetAction(preset: AddonActionPreset, context: AddonActionContext, collaborators: PresetCollaborators): Promise<void>;
|
|
34
|
+
|
|
35
|
+
/** Decorative icon addon for Material fields. */
|
|
36
|
+
interface MatIconAddon extends BaseAddon {
|
|
37
|
+
readonly type: 'mat-icon';
|
|
38
|
+
/** Material Icons name (ligature, e.g., `'search'`, `'close'`). */
|
|
39
|
+
readonly icon: string;
|
|
40
|
+
/** Accessible label for icons that convey meaning. */
|
|
41
|
+
readonly ariaLabel?: DynamicText;
|
|
42
|
+
}
|
|
43
|
+
interface MatButtonBase extends BaseAddon {
|
|
44
|
+
readonly type: 'mat-button';
|
|
45
|
+
readonly color?: 'primary' | 'accent' | 'warn';
|
|
46
|
+
readonly loading?: DynamicValue<boolean>;
|
|
47
|
+
}
|
|
48
|
+
type MatButtonActionRef = [RegisteredActionRef] extends [never] ? string : RegisteredActionRef;
|
|
49
|
+
type MatButtonClick = {
|
|
50
|
+
readonly preset: AddonActionPreset;
|
|
51
|
+
readonly actionRef?: never;
|
|
52
|
+
readonly action?: never;
|
|
53
|
+
} | {
|
|
54
|
+
readonly preset?: never;
|
|
55
|
+
readonly actionRef: MatButtonActionRef;
|
|
56
|
+
readonly action?: never;
|
|
57
|
+
} | {
|
|
58
|
+
readonly preset?: never;
|
|
59
|
+
readonly actionRef?: never;
|
|
60
|
+
readonly action: AddonActionHandler;
|
|
61
|
+
} | {
|
|
62
|
+
readonly preset?: never;
|
|
63
|
+
readonly actionRef?: never;
|
|
64
|
+
readonly action?: never;
|
|
65
|
+
};
|
|
66
|
+
type MatButtonContent = {
|
|
67
|
+
readonly icon: string;
|
|
68
|
+
readonly label?: never;
|
|
69
|
+
readonly ariaLabel: DynamicText;
|
|
70
|
+
} | {
|
|
71
|
+
readonly icon?: string;
|
|
72
|
+
readonly label: DynamicText;
|
|
73
|
+
readonly ariaLabel?: DynamicText;
|
|
74
|
+
} | {
|
|
75
|
+
readonly icon?: never;
|
|
76
|
+
readonly label?: never;
|
|
77
|
+
readonly ariaLabel?: DynamicText;
|
|
78
|
+
};
|
|
79
|
+
/** Interactive button addon for Material fields. */
|
|
80
|
+
type MatButtonAddon = MatButtonBase & MatButtonContent & MatButtonClick;
|
|
81
|
+
/** Union of all Material-shipped addon types. */
|
|
82
|
+
type MatAddon = MatIconAddon | MatButtonAddon;
|
|
83
|
+
declare module '@ng-forge/dynamic-forms' {
|
|
84
|
+
interface DynamicFormAddonRegistry {
|
|
85
|
+
'mat-icon': MatIconAddon;
|
|
86
|
+
'mat-button': MatButtonAddon;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export { MATERIAL_CONFIG, MAT_INPUT_TYPE_OVERRIDE, runMatPresetAction };
|
|
91
|
+
export type { MatAddon, MatButtonAddon, MatIconAddon, MaterialConfig };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Provider } from '@angular/core';
|
|
3
3
|
import * as _ng_forge_dynamic_forms_integration from '@ng-forge/dynamic-forms/integration';
|
|
4
|
-
import { CheckboxField, DatepickerField, DatepickerProps,
|
|
4
|
+
import { CheckboxField, DatepickerField, DatepickerProps, InputField, InputProps, WrapperFieldInputs, MultiCheckboxField, RadioField, SelectField, SelectProps, SliderField, ButtonField, TextareaField, TextareaProps, ToggleField, FieldTypeDefinition, WrapperTypeDefinition } from '@ng-forge/dynamic-forms/integration';
|
|
5
5
|
import * as _ng_forge_dynamic_forms from '@ng-forge/dynamic-forms';
|
|
6
|
-
import { DynamicText,
|
|
6
|
+
import { DynamicText, TextAddon, TemplateAddon, ValueType, FieldOption, FormEvent, FormSubmitEvent, NextPageEvent, PreviousPageEvent, AppendArrayItemEvent, ArrayAllowedChildren, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, NarrowFields, RegisteredFieldTypes, InferFormValue, FormConfig } from '@ng-forge/dynamic-forms';
|
|
7
7
|
import { ThemePalette } from '@angular/material/core';
|
|
8
8
|
import * as _angular_material_form_field from '@angular/material/form-field';
|
|
9
9
|
import { MatFormFieldAppearance, SubscriptSizing, FloatLabelType } from '@angular/material/form-field';
|
|
10
|
+
import { MatIconAddon, MatButtonAddon, MaterialConfig } from '@ng-forge/dynamic-forms-material/shared';
|
|
11
|
+
export { MATERIAL_CONFIG, MAT_INPUT_TYPE_OVERRIDE, MatAddon, MatButtonAddon, MatIconAddon, MaterialConfig } from '@ng-forge/dynamic-forms-material/shared';
|
|
10
12
|
|
|
11
13
|
interface MatCheckboxProps {
|
|
12
14
|
color?: ThemePalette;
|
|
@@ -54,96 +56,6 @@ declare class MatDatepickerFieldComponent {
|
|
|
54
56
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatDatepickerFieldComponent, "df-mat-datepicker", never, { "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
|
|
55
57
|
}
|
|
56
58
|
|
|
57
|
-
/** Decorative icon addon for Material fields. */
|
|
58
|
-
interface MatIconAddon extends BaseAddon {
|
|
59
|
-
readonly type: 'mat-icon';
|
|
60
|
-
/** Material Icons name (ligature, e.g., `'search'`, `'close'`). */
|
|
61
|
-
readonly icon: string;
|
|
62
|
-
/** Accessible label for icons that convey meaning. */
|
|
63
|
-
readonly ariaLabel?: DynamicText;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Common shape of every `mat-button` addon — properties that don't
|
|
67
|
-
* participate in either XOR axis.
|
|
68
|
-
*/
|
|
69
|
-
interface MatButtonBase extends BaseAddon {
|
|
70
|
-
readonly type: 'mat-button';
|
|
71
|
-
/** Material button colour variant. */
|
|
72
|
-
readonly color?: 'primary' | 'accent' | 'warn';
|
|
73
|
-
/** Reactive loading state — when truthy the button is disabled. */
|
|
74
|
-
readonly loading?: DynamicValue<boolean>;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Click axis — XOR enforced at type level so configurations that combine
|
|
78
|
-
* two click handlers (e.g., `preset` AND `actionRef`) are rejected by
|
|
79
|
-
* TypeScript. Runtime XOR validation stays as defence-in-depth for
|
|
80
|
-
* JSON-source configs that bypass the type checker.
|
|
81
|
-
*/
|
|
82
|
-
type MatButtonClickPreset = {
|
|
83
|
-
/** Built-in preset action (e.g., `'clear'`, `'toggle-password-visibility'`). JSON-safe. */
|
|
84
|
-
readonly preset: AddonActionPreset;
|
|
85
|
-
readonly actionRef?: never;
|
|
86
|
-
readonly action?: never;
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Value type for the `actionRef` slot. When no actions have been registered
|
|
90
|
-
* via `withAddonActions(...)`, `RegisteredActionRef` resolves to `never` —
|
|
91
|
-
* which would make this variant uninhabitable and break `addon.actionRef`
|
|
92
|
-
* narrowing in the renderer. Fall back to `string` so the variant stays
|
|
93
|
-
* usable; once the user augments `DynamicFormActionRegistry`, autocomplete
|
|
94
|
-
* tightens to the registered keys.
|
|
95
|
-
*/
|
|
96
|
-
type MatButtonActionRef = [RegisteredActionRef] extends [never] ? string : RegisteredActionRef;
|
|
97
|
-
type MatButtonClickActionRef = {
|
|
98
|
-
readonly preset?: never;
|
|
99
|
-
/** Reference to a handler registered via `withAddonActions(...)`. JSON-safe. */
|
|
100
|
-
readonly actionRef: MatButtonActionRef;
|
|
101
|
-
readonly action?: never;
|
|
102
|
-
};
|
|
103
|
-
type MatButtonClickAction = {
|
|
104
|
-
readonly preset?: never;
|
|
105
|
-
readonly actionRef?: never;
|
|
106
|
-
/** Inline handler — code-only; dropped from JSON-derived configs. */
|
|
107
|
-
readonly action: AddonActionHandler;
|
|
108
|
-
};
|
|
109
|
-
type MatButtonClickNone = {
|
|
110
|
-
readonly preset?: never;
|
|
111
|
-
readonly actionRef?: never;
|
|
112
|
-
readonly action?: never;
|
|
113
|
-
};
|
|
114
|
-
type MatButtonClick = MatButtonClickPreset | MatButtonClickActionRef | MatButtonClickAction | MatButtonClickNone;
|
|
115
|
-
/**
|
|
116
|
-
* Content axis — XOR enforced at type level so an icon-only button is
|
|
117
|
-
* forced to declare `ariaLabel`. The three shapes:
|
|
118
|
-
*/
|
|
119
|
-
type MatButtonContentIconOnly = {
|
|
120
|
-
readonly icon: string;
|
|
121
|
-
readonly label?: never;
|
|
122
|
-
/** REQUIRED: icon-only buttons must carry an accessible label. */
|
|
123
|
-
readonly ariaLabel: DynamicText;
|
|
124
|
-
};
|
|
125
|
-
type MatButtonContentLabeled = {
|
|
126
|
-
readonly icon?: string;
|
|
127
|
-
readonly label: DynamicText;
|
|
128
|
-
readonly ariaLabel?: DynamicText;
|
|
129
|
-
};
|
|
130
|
-
type MatButtonContentDecorative = {
|
|
131
|
-
readonly icon?: never;
|
|
132
|
-
readonly label?: never;
|
|
133
|
-
readonly ariaLabel?: DynamicText;
|
|
134
|
-
};
|
|
135
|
-
type MatButtonContent = MatButtonContentIconOnly | MatButtonContentLabeled | MatButtonContentDecorative;
|
|
136
|
-
/** Interactive button addon for Material fields. */
|
|
137
|
-
type MatButtonAddon = MatButtonBase & MatButtonContent & MatButtonClick;
|
|
138
|
-
/** Union of all Material-shipped addon types. */
|
|
139
|
-
type MatAddon = MatIconAddon | MatButtonAddon;
|
|
140
|
-
declare module '@ng-forge/dynamic-forms' {
|
|
141
|
-
interface DynamicFormAddonRegistry {
|
|
142
|
-
'mat-icon': MatIconAddon;
|
|
143
|
-
'mat-button': MatButtonAddon;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
59
|
interface MatInputProps extends InputProps {
|
|
148
60
|
appearance?: MatFormFieldAppearance;
|
|
149
61
|
disableRipple?: boolean;
|
|
@@ -371,7 +283,7 @@ type MatShiftArrayItemButtonField = Omit<MatButtonField<ShiftArrayItemEvent>, 'e
|
|
|
371
283
|
declare class MatButtonFieldComponent<TEvent extends FormEvent> {
|
|
372
284
|
protected readonly action: _ng_forge_dynamic_forms_integration.NgForgeAction<TEvent>;
|
|
373
285
|
readonly props: _angular_core.InputSignal<MatButtonProps | undefined>;
|
|
374
|
-
readonly buttonType: _angular_core.Signal<"
|
|
286
|
+
readonly buttonType: _angular_core.Signal<"button" | "submit" | "reset">;
|
|
375
287
|
readonly buttonTestId: _angular_core.Signal<string>;
|
|
376
288
|
onClick(): void;
|
|
377
289
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatButtonFieldComponent<any>, never>;
|
|
@@ -425,58 +337,6 @@ declare class MatToggleFieldComponent {
|
|
|
425
337
|
*/
|
|
426
338
|
declare const MATERIAL_FIELD_TYPES: FieldTypeDefinition[];
|
|
427
339
|
|
|
428
|
-
/** Configuration options for Material Design form fields. */
|
|
429
|
-
interface MaterialConfig {
|
|
430
|
-
/**
|
|
431
|
-
* Default appearance for Material form fields
|
|
432
|
-
*
|
|
433
|
-
* @default 'outline'
|
|
434
|
-
*/
|
|
435
|
-
appearance?: MatFormFieldAppearance;
|
|
436
|
-
/**
|
|
437
|
-
* Default subscript sizing for Material form fields
|
|
438
|
-
*
|
|
439
|
-
* @default 'dynamic'
|
|
440
|
-
*/
|
|
441
|
-
subscriptSizing?: SubscriptSizing;
|
|
442
|
-
/**
|
|
443
|
-
* Whether to disable ripple effects by default
|
|
444
|
-
*
|
|
445
|
-
* @default false
|
|
446
|
-
*/
|
|
447
|
-
disableRipple?: boolean;
|
|
448
|
-
/**
|
|
449
|
-
* Default color theme for form controls (checkboxes, radios, sliders, toggles)
|
|
450
|
-
*
|
|
451
|
-
* @default 'primary'
|
|
452
|
-
*/
|
|
453
|
-
color?: ThemePalette;
|
|
454
|
-
/**
|
|
455
|
-
* Default label position for checkboxes and radios
|
|
456
|
-
*
|
|
457
|
-
* @default 'after'
|
|
458
|
-
*/
|
|
459
|
-
labelPosition?: 'before' | 'after';
|
|
460
|
-
/**
|
|
461
|
-
* Default float label behavior for form fields
|
|
462
|
-
*
|
|
463
|
-
* @default 'auto'
|
|
464
|
-
*/
|
|
465
|
-
floatLabel?: FloatLabelType;
|
|
466
|
-
/**
|
|
467
|
-
* Whether to hide the required marker by default
|
|
468
|
-
*
|
|
469
|
-
* @default false
|
|
470
|
-
*/
|
|
471
|
-
hideRequiredMarker?: boolean;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
/**
|
|
475
|
-
* Injection token for Material Design form configuration.
|
|
476
|
-
* Use this to provide global configuration for Material form fields.
|
|
477
|
-
*/
|
|
478
|
-
declare const MATERIAL_CONFIG: InjectionToken<MaterialConfig>;
|
|
479
|
-
|
|
480
340
|
/**
|
|
481
341
|
* Material Design field type constants
|
|
482
342
|
* Based on available field components in the /fields folder
|
|
@@ -555,8 +415,8 @@ type MaterialConfigFeature = {
|
|
|
555
415
|
* Default `withMaterialFields()` shape — field defs + the auto-included
|
|
556
416
|
* addons feature so `mat-icon` / `mat-button` work out of the box.
|
|
557
417
|
*/
|
|
558
|
-
type MaterialFieldsWithAddons = [...MaterialFieldTypes, MaterialAddonsFeature];
|
|
559
|
-
type MaterialFieldsWithConfig = [...MaterialFieldTypes, MaterialAddonsFeature, MaterialConfigFeature];
|
|
418
|
+
type MaterialFieldsWithAddons = [...MaterialFieldTypes, MaterialAddonsFeature, WrapperTypeDefinition];
|
|
419
|
+
type MaterialFieldsWithConfig = [...MaterialFieldTypes, MaterialAddonsFeature, WrapperTypeDefinition, MaterialConfigFeature];
|
|
560
420
|
/**
|
|
561
421
|
* Configure dynamic forms with Material Design field types, with
|
|
562
422
|
* Material-shipped addon types (`mat-icon`, `mat-button`) auto-included so
|
|
@@ -604,16 +464,5 @@ declare class MatButtonAddonComponent {
|
|
|
604
464
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatButtonAddonComponent, "df-mat-button-addon", never, {}, {}, never, never, true, [{ directive: typeof _ng_forge_dynamic_forms_integration.NgForgeAddonAction; inputs: {}; outputs: {}; }]>;
|
|
605
465
|
}
|
|
606
466
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
*
|
|
610
|
-
* @Component({
|
|
611
|
-
* providers: [{ provide: MAT_INPUT_TYPE_OVERRIDE, useValue: signal(undefined) }],
|
|
612
|
-
* })
|
|
613
|
-
* class MatInputFieldComponent { ... }
|
|
614
|
-
* ```
|
|
615
|
-
*/
|
|
616
|
-
declare const MAT_INPUT_TYPE_OVERRIDE: InjectionToken<WritableSignal<string | undefined>>;
|
|
617
|
-
|
|
618
|
-
export { MATERIAL_CONFIG, MATERIAL_FIELD_TYPES, MAT_INPUT_TYPE_OVERRIDE, MatButtonAddonComponent, MatButtonFieldComponent, MatCheckboxFieldComponent, MatDatepickerFieldComponent, MatField, MatIconAddonComponent, MatInputFieldComponent, MatMultiCheckboxFieldComponent, MatRadioFieldComponent, MatSelectFieldComponent, MatSliderFieldComponent, MatTextareaFieldComponent, MatToggleFieldComponent, withMaterialAddons, withMaterialFields };
|
|
619
|
-
export type { MatAddArrayItemButtonField, MatAddon, MatAddonExtensions, MatButtonAddon, MatButtonField, MatButtonProps, MatCheckboxField, MatCheckboxProps, MatDatepickerField, MatDatepickerProps, MatFieldType, MatFormConfig, MatFormProps, MatIconAddon, MatInputAddon, MatInputField, MatInputProps, MatInsertArrayItemButtonField, MatMultiCheckboxField, MatMultiCheckboxProps, MatNextButtonField, MatPopArrayItemButtonField, MatPrependArrayItemButtonField, MatPreviousButtonField, MatRadioField, MatRadioProps, MatRemoveArrayItemButtonField, MatSelectField, MatSelectProps, MatShiftArrayItemButtonField, MatSliderField, MatSliderProps, MatSubmitButtonField, MatTextareaField, MatTextareaProps, MatToggleField, MatToggleProps, MaterialConfig };
|
|
467
|
+
export { MATERIAL_FIELD_TYPES, MatButtonAddonComponent, MatButtonFieldComponent, MatCheckboxFieldComponent, MatDatepickerFieldComponent, MatField, MatIconAddonComponent, MatInputFieldComponent, MatMultiCheckboxFieldComponent, MatRadioFieldComponent, MatSelectFieldComponent, MatSliderFieldComponent, MatTextareaFieldComponent, MatToggleFieldComponent, withMaterialAddons, withMaterialFields };
|
|
468
|
+
export type { MatAddArrayItemButtonField, MatAddonExtensions, MatButtonField, MatButtonProps, MatCheckboxField, MatCheckboxProps, MatDatepickerField, MatDatepickerProps, MatFieldType, MatFormConfig, MatFormProps, MatInputAddon, MatInputField, MatInputProps, MatInsertArrayItemButtonField, MatMultiCheckboxField, MatMultiCheckboxProps, MatNextButtonField, MatPopArrayItemButtonField, MatPrependArrayItemButtonField, MatPreviousButtonField, MatRadioField, MatRadioProps, MatRemoveArrayItemButtonField, MatSelectField, MatSelectProps, MatShiftArrayItemButtonField, MatSliderField, MatSliderProps, MatSubmitButtonField, MatTextareaField, MatTextareaProps, MatToggleField, MatToggleProps };
|