@mosaicoo/form-angular 0.4.0 → 0.6.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 +32 -0
- package/fesm2022/mosaicoo-form-angular-designer.mjs +589 -95
- package/fesm2022/mosaicoo-form-angular-designer.mjs.map +1 -1
- package/fesm2022/mosaicoo-form-angular-material.mjs +395 -0
- package/fesm2022/mosaicoo-form-angular-material.mjs.map +1 -0
- package/fesm2022/mosaicoo-form-angular.mjs +208 -57
- package/fesm2022/mosaicoo-form-angular.mjs.map +1 -1
- package/package.json +17 -3
- package/types/mosaicoo-form-angular-designer.d.ts +65 -2
- package/types/mosaicoo-form-angular-material.d.ts +77 -0
- package/types/mosaicoo-form-angular.d.ts +19 -3
|
@@ -45,7 +45,11 @@ declare class FormNodeComponent {
|
|
|
45
45
|
pending(): boolean;
|
|
46
46
|
/** Custom component registered for this field type, if any. */
|
|
47
47
|
customComponent(): Type<unknown> | null;
|
|
48
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Inputs handed to a custom component (MformFieldComponent contract).
|
|
50
|
+
* Only inputs the component actually declares are passed, so optional
|
|
51
|
+
* contract members (`mode`) never break third-party components.
|
|
52
|
+
*/
|
|
49
53
|
customInputs(): Record<string, unknown>;
|
|
50
54
|
/** Options resolved from a dynamic source (provider or remote URL). */
|
|
51
55
|
private readonly resolvedOptions;
|
|
@@ -83,11 +87,21 @@ declare class FormNodeComponent {
|
|
|
83
87
|
setValue(value: unknown): void;
|
|
84
88
|
setString(event: Event): void;
|
|
85
89
|
setSelect(event: Event): void;
|
|
90
|
+
/** Selection state for single and multi-value choice fields. */
|
|
91
|
+
isSelected(optionValue: string | number | boolean): boolean;
|
|
86
92
|
setChecked(event: Event): void;
|
|
87
93
|
toggleMap(option: string, event: Event): void;
|
|
94
|
+
/** Client-side rejection message (size/type), cleared on the next pick. */
|
|
95
|
+
readonly fileRejection: _angular_core.WritableSignal<string | null>;
|
|
96
|
+
acceptAttr(): string | null;
|
|
88
97
|
setFiles(event: Event): void;
|
|
89
|
-
/**
|
|
90
|
-
|
|
98
|
+
/** Normalized view of the stored value: name + optional preview url. */
|
|
99
|
+
fileEntries(): Array<{
|
|
100
|
+
name: string;
|
|
101
|
+
url: string | null;
|
|
102
|
+
}>;
|
|
103
|
+
showThumbnails(): boolean;
|
|
104
|
+
removeFile(index: number): void;
|
|
91
105
|
prefix(): string | null;
|
|
92
106
|
suffix(): string | null;
|
|
93
107
|
tagValues(): string[];
|
|
@@ -211,6 +225,8 @@ interface MformFieldComponent {
|
|
|
211
225
|
path: () => string;
|
|
212
226
|
/** Bumped on every engine event; read it to stay in sync. */
|
|
213
227
|
tick: () => number;
|
|
228
|
+
/** Rendering mode of the surrounding form (optional input). */
|
|
229
|
+
mode?: () => 'edit' | 'readonly' | 'disabled';
|
|
214
230
|
}
|
|
215
231
|
/** Map of field `type` → component implementing {@link MformFieldComponent}. */
|
|
216
232
|
type FieldComponentMap = Record<string, Type<unknown>>;
|