@mosaicoo/form-angular 0.3.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.
@@ -0,0 +1,393 @@
1
+ import { provideMosaicooForm } from '@mosaicoo/form-angular';
2
+ import * as i0 from '@angular/core';
3
+ import { input, Directive, ChangeDetectionStrategy, Component, computed } from '@angular/core';
4
+ import * as i1 from '@angular/forms';
5
+ import { FormsModule } from '@angular/forms';
6
+ import { MatOption } from '@angular/material/core';
7
+ import * as i2 from '@angular/material/form-field';
8
+ import { MatFormFieldModule } from '@angular/material/form-field';
9
+ import * as i3 from '@angular/material/input';
10
+ import { MatInputModule } from '@angular/material/input';
11
+ import * as i4 from '@angular/material/select';
12
+ import { MatSelectModule } from '@angular/material/select';
13
+ import * as i5 from '@angular/material/checkbox';
14
+ import { MatCheckboxModule } from '@angular/material/checkbox';
15
+ import * as i6 from '@angular/material/radio';
16
+ import { MatRadioModule } from '@angular/material/radio';
17
+ import { maskValue } from '@mosaicoo/form-core';
18
+
19
+ /**
20
+ * Material Design 3 field components.
21
+ *
22
+ * Every component implements the renderer's `MformFieldComponent` contract
23
+ * (signal inputs `field`/`engine`/`path`/`tick`/`mode`) and talks to the form
24
+ * exclusively through the engine — validation, conditionals, calculations and
25
+ * events keep working unchanged. The HOST's Material theme (M3 tokens) styles
26
+ * everything; this entry adds no theming of its own.
27
+ */
28
+ class MaterialFieldBase {
29
+ field = input.required(...(ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []));
30
+ engine = input.required(...(ngDevMode ? [{ debugName: "engine" }] : /* istanbul ignore next */ []));
31
+ path = input.required(...(ngDevMode ? [{ debugName: "path" }] : /* istanbul ignore next */ []));
32
+ tick = input(0, ...(ngDevMode ? [{ debugName: "tick" }] : /* istanbul ignore next */ []));
33
+ mode = input('edit', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
34
+ /** Error state driven by the ENGINE, not by template validators. */
35
+ errorMatcher = {
36
+ isErrorState: () => this.errors().length > 0,
37
+ };
38
+ value() {
39
+ this.tick();
40
+ return this.engine().getValue(this.path());
41
+ }
42
+ errors() {
43
+ this.tick();
44
+ return this.engine().getFieldErrors(this.path());
45
+ }
46
+ firstError() {
47
+ return this.errors()[0]?.message ?? null;
48
+ }
49
+ required() {
50
+ return this.field().validators?.some((v) => v.type === 'required') ?? false;
51
+ }
52
+ disabled() {
53
+ return (this.mode() !== 'edit' ||
54
+ this.field().disabled === true ||
55
+ this.field().calculate !== undefined);
56
+ }
57
+ label() {
58
+ return this.field().label ?? this.field().key;
59
+ }
60
+ setValue(value) {
61
+ this.engine().setValue(this.path(), value);
62
+ }
63
+ touch() {
64
+ this.engine().markTouched(this.path());
65
+ void this.engine().validateFieldAsync(this.path());
66
+ }
67
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MaterialFieldBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
68
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.19", type: MaterialFieldBase, isStandalone: true, inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, engine: { classPropertyName: "engine", publicName: "engine", isSignal: true, isRequired: true, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: true, transformFunction: null }, tick: { classPropertyName: "tick", publicName: "tick", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
69
+ }
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MaterialFieldBase, decorators: [{
71
+ type: Directive
72
+ }], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], engine: [{ type: i0.Input, args: [{ isSignal: true, alias: "engine", required: true }] }], path: [{ type: i0.Input, args: [{ isSignal: true, alias: "path", required: true }] }], tick: [{ type: i0.Input, args: [{ isSignal: true, alias: "tick", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }] } });
73
+ class MatTextFieldComponent extends MaterialFieldBase {
74
+ isTextarea() {
75
+ return this.field().type === 'textarea';
76
+ }
77
+ stringValue() {
78
+ const value = this.value();
79
+ if (value === undefined || value === null)
80
+ return '';
81
+ const mask = this.field().format?.mask;
82
+ if (mask && typeof value === 'string')
83
+ return maskValue(value, mask).masked;
84
+ return String(value);
85
+ }
86
+ inputType() {
87
+ switch (this.field().type) {
88
+ case 'number':
89
+ case 'currency':
90
+ return 'number';
91
+ case 'email': return 'email';
92
+ case 'password': return 'password';
93
+ case 'phone': return 'tel';
94
+ case 'url': return 'url';
95
+ case 'time': return 'time';
96
+ case 'datetime': return 'datetime-local';
97
+ case 'day': return 'date';
98
+ default: return 'text';
99
+ }
100
+ }
101
+ prefixText() {
102
+ const value = this.field().props?.['prefix'];
103
+ return typeof value === 'string' && value ? value : null;
104
+ }
105
+ suffixText() {
106
+ const value = this.field().props?.['suffix'];
107
+ return typeof value === 'string' && value ? value : null;
108
+ }
109
+ write(raw) {
110
+ const mask = this.field().format?.mask;
111
+ if (mask) {
112
+ const { masked, raw: stripped } = maskValue(raw, mask);
113
+ this.setValue(this.field().format?.keepMask ? masked : stripped);
114
+ return;
115
+ }
116
+ if (this.field().dataType === 'number') {
117
+ const parsed = raw === '' ? undefined : Number(raw);
118
+ this.setValue(parsed !== undefined && Number.isFinite(parsed) ? parsed : undefined);
119
+ return;
120
+ }
121
+ this.setValue(raw);
122
+ }
123
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MatTextFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
124
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: MatTextFieldComponent, isStandalone: true, selector: "mform-mat-text", usesInheritance: true, ngImport: i0, template: `
125
+ <mat-form-field appearance="outline" class="mform-mat-field">
126
+ <mat-label>{{ label() }}</mat-label>
127
+ @if (isTextarea()) {
128
+ <textarea
129
+ matInput
130
+ [rows]="3"
131
+ [ngModel]="stringValue()"
132
+ [errorStateMatcher]="errorMatcher"
133
+ [placeholder]="field().placeholder ?? ''"
134
+ [required]="required()"
135
+ [disabled]="disabled()"
136
+ (ngModelChange)="write($event)"
137
+ (blur)="touch()"
138
+ ></textarea>
139
+ } @else {
140
+ <input
141
+ matInput
142
+ [type]="inputType()"
143
+ [ngModel]="stringValue()"
144
+ [errorStateMatcher]="errorMatcher"
145
+ [placeholder]="field().placeholder ?? ''"
146
+ [required]="required()"
147
+ [disabled]="disabled()"
148
+ (ngModelChange)="write($event)"
149
+ (blur)="touch()"
150
+ />
151
+ }
152
+ @if (prefixText(); as p) {
153
+ <span matTextPrefix>{{ p }}&nbsp;</span>
154
+ }
155
+ @if (suffixText(); as s) {
156
+ <span matTextSuffix>{{ s }}</span>
157
+ }
158
+ @if (field().description; as hint) {
159
+ <mat-hint>{{ hint }}</mat-hint>
160
+ }
161
+ @if (firstError(); as error) {
162
+ <mat-error>{{ error }}</mat-error>
163
+ }
164
+ </mat-form-field>
165
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
166
+ }
167
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MatTextFieldComponent, decorators: [{
168
+ type: Component,
169
+ args: [{
170
+ selector: 'mform-mat-text',
171
+ changeDetection: ChangeDetectionStrategy.OnPush,
172
+ imports: [FormsModule, MatFormFieldModule, MatInputModule],
173
+ template: `
174
+ <mat-form-field appearance="outline" class="mform-mat-field">
175
+ <mat-label>{{ label() }}</mat-label>
176
+ @if (isTextarea()) {
177
+ <textarea
178
+ matInput
179
+ [rows]="3"
180
+ [ngModel]="stringValue()"
181
+ [errorStateMatcher]="errorMatcher"
182
+ [placeholder]="field().placeholder ?? ''"
183
+ [required]="required()"
184
+ [disabled]="disabled()"
185
+ (ngModelChange)="write($event)"
186
+ (blur)="touch()"
187
+ ></textarea>
188
+ } @else {
189
+ <input
190
+ matInput
191
+ [type]="inputType()"
192
+ [ngModel]="stringValue()"
193
+ [errorStateMatcher]="errorMatcher"
194
+ [placeholder]="field().placeholder ?? ''"
195
+ [required]="required()"
196
+ [disabled]="disabled()"
197
+ (ngModelChange)="write($event)"
198
+ (blur)="touch()"
199
+ />
200
+ }
201
+ @if (prefixText(); as p) {
202
+ <span matTextPrefix>{{ p }}&nbsp;</span>
203
+ }
204
+ @if (suffixText(); as s) {
205
+ <span matTextSuffix>{{ s }}</span>
206
+ }
207
+ @if (field().description; as hint) {
208
+ <mat-hint>{{ hint }}</mat-hint>
209
+ }
210
+ @if (firstError(); as error) {
211
+ <mat-error>{{ error }}</mat-error>
212
+ }
213
+ </mat-form-field>
214
+ `,
215
+ }]
216
+ }] });
217
+ class MatSelectFieldComponent extends MaterialFieldBase {
218
+ options = computed(() => this.field().options ?? [], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
219
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MatSelectFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
220
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: MatSelectFieldComponent, isStandalone: true, selector: "mform-mat-select", usesInheritance: true, ngImport: i0, template: `
221
+ <mat-form-field appearance="outline" class="mform-mat-field">
222
+ <mat-label>{{ label() }}</mat-label>
223
+ <mat-select
224
+ [ngModel]="value()"
225
+ [errorStateMatcher]="errorMatcher"
226
+ [required]="required()"
227
+ [disabled]="disabled()"
228
+ (ngModelChange)="setValue($event)"
229
+ (closed)="touch()"
230
+ >
231
+ @for (option of options(); track option.value) {
232
+ <mat-option [value]="option.value">{{ option.label }}</mat-option>
233
+ }
234
+ </mat-select>
235
+ @if (field().description; as hint) {
236
+ <mat-hint>{{ hint }}</mat-hint>
237
+ }
238
+ @if (firstError(); as error) {
239
+ <mat-error>{{ error }}</mat-error>
240
+ }
241
+ </mat-form-field>
242
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
243
+ }
244
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MatSelectFieldComponent, decorators: [{
245
+ type: Component,
246
+ args: [{
247
+ selector: 'mform-mat-select',
248
+ changeDetection: ChangeDetectionStrategy.OnPush,
249
+ imports: [FormsModule, MatFormFieldModule, MatSelectModule, MatOption],
250
+ template: `
251
+ <mat-form-field appearance="outline" class="mform-mat-field">
252
+ <mat-label>{{ label() }}</mat-label>
253
+ <mat-select
254
+ [ngModel]="value()"
255
+ [errorStateMatcher]="errorMatcher"
256
+ [required]="required()"
257
+ [disabled]="disabled()"
258
+ (ngModelChange)="setValue($event)"
259
+ (closed)="touch()"
260
+ >
261
+ @for (option of options(); track option.value) {
262
+ <mat-option [value]="option.value">{{ option.label }}</mat-option>
263
+ }
264
+ </mat-select>
265
+ @if (field().description; as hint) {
266
+ <mat-hint>{{ hint }}</mat-hint>
267
+ }
268
+ @if (firstError(); as error) {
269
+ <mat-error>{{ error }}</mat-error>
270
+ }
271
+ </mat-form-field>
272
+ `,
273
+ }]
274
+ }] });
275
+ class MatCheckboxFieldComponent extends MaterialFieldBase {
276
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MatCheckboxFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
277
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: MatCheckboxFieldComponent, isStandalone: true, selector: "mform-mat-checkbox", usesInheritance: true, ngImport: i0, template: `
278
+ <div class="mform-mat-checkbox">
279
+ <mat-checkbox
280
+ [ngModel]="value() === true"
281
+ [required]="required()"
282
+ [disabled]="disabled()"
283
+ (ngModelChange)="setValue($event)"
284
+ (blur)="touch()"
285
+ >
286
+ {{ label() }}
287
+ </mat-checkbox>
288
+ @if (firstError(); as error) {
289
+ <div class="mform-mat-error">{{ error }}</div>
290
+ }
291
+ </div>
292
+ `, isInline: true, styles: [".mform-mat-error{color:var(--mat-sys-error, #ba1a1a);font-size:12px;padding-left:12px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
293
+ }
294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MatCheckboxFieldComponent, decorators: [{
295
+ type: Component,
296
+ args: [{ selector: 'mform-mat-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, MatCheckboxModule], template: `
297
+ <div class="mform-mat-checkbox">
298
+ <mat-checkbox
299
+ [ngModel]="value() === true"
300
+ [required]="required()"
301
+ [disabled]="disabled()"
302
+ (ngModelChange)="setValue($event)"
303
+ (blur)="touch()"
304
+ >
305
+ {{ label() }}
306
+ </mat-checkbox>
307
+ @if (firstError(); as error) {
308
+ <div class="mform-mat-error">{{ error }}</div>
309
+ }
310
+ </div>
311
+ `, styles: [".mform-mat-error{color:var(--mat-sys-error, #ba1a1a);font-size:12px;padding-left:12px}\n"] }]
312
+ }] });
313
+ class MatRadioFieldComponent extends MaterialFieldBase {
314
+ options = computed(() => this.field().options ?? [], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
315
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MatRadioFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
316
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: MatRadioFieldComponent, isStandalone: true, selector: "mform-mat-radio", usesInheritance: true, ngImport: i0, template: `
317
+ <div class="mform-mat-radio">
318
+ <span class="mform-mat-radio-label">{{ label() }}</span>
319
+ <mat-radio-group
320
+ [ngModel]="value()"
321
+ [disabled]="disabled()"
322
+ (ngModelChange)="setValue($event)"
323
+ >
324
+ @for (option of options(); track option.value) {
325
+ <mat-radio-button [value]="option.value">{{ option.label }}</mat-radio-button>
326
+ }
327
+ </mat-radio-group>
328
+ @if (firstError(); as error) {
329
+ <div class="mform-mat-error">{{ error }}</div>
330
+ }
331
+ </div>
332
+ `, isInline: true, styles: [".mform-mat-radio{display:flex;flex-direction:column;gap:4px}.mform-mat-radio-label{font-size:13px;font-weight:500}.mform-mat-radio mat-radio-group{display:flex;flex-direction:column}.mform-mat-error{color:var(--mat-sys-error, #ba1a1a);font-size:12px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i6.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i6.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
333
+ }
334
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: MatRadioFieldComponent, decorators: [{
335
+ type: Component,
336
+ args: [{ selector: 'mform-mat-radio', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, MatRadioModule], template: `
337
+ <div class="mform-mat-radio">
338
+ <span class="mform-mat-radio-label">{{ label() }}</span>
339
+ <mat-radio-group
340
+ [ngModel]="value()"
341
+ [disabled]="disabled()"
342
+ (ngModelChange)="setValue($event)"
343
+ >
344
+ @for (option of options(); track option.value) {
345
+ <mat-radio-button [value]="option.value">{{ option.label }}</mat-radio-button>
346
+ }
347
+ </mat-radio-group>
348
+ @if (firstError(); as error) {
349
+ <div class="mform-mat-error">{{ error }}</div>
350
+ }
351
+ </div>
352
+ `, styles: [".mform-mat-radio{display:flex;flex-direction:column;gap:4px}.mform-mat-radio-label{font-size:13px;font-weight:500}.mform-mat-radio mat-radio-group{display:flex;flex-direction:column}.mform-mat-error{color:var(--mat-sys-error, #ba1a1a);font-size:12px}\n"] }]
353
+ }] });
354
+
355
+ /** Field types rendered with Material components (others stay built-in). */
356
+ const MATERIAL_FIELD_COMPONENTS = {
357
+ text: MatTextFieldComponent,
358
+ textarea: MatTextFieldComponent,
359
+ number: MatTextFieldComponent,
360
+ currency: MatTextFieldComponent,
361
+ email: MatTextFieldComponent,
362
+ password: MatTextFieldComponent,
363
+ phone: MatTextFieldComponent,
364
+ url: MatTextFieldComponent,
365
+ time: MatTextFieldComponent,
366
+ datetime: MatTextFieldComponent,
367
+ day: MatTextFieldComponent,
368
+ select: MatSelectFieldComponent,
369
+ checkbox: MatCheckboxFieldComponent,
370
+ radio: MatRadioFieldComponent,
371
+ };
372
+ /**
373
+ * Registers the Material field set:
374
+ *
375
+ * ```ts
376
+ * bootstrapApplication(App, {
377
+ * providers: [provideMaterialForms()],
378
+ * });
379
+ * ```
380
+ *
381
+ * Composable: later `provideMosaicooForm({components})` calls can override
382
+ * individual types (host-specific fields win).
383
+ */
384
+ function provideMaterialForms() {
385
+ return provideMosaicooForm({ components: MATERIAL_FIELD_COMPONENTS });
386
+ }
387
+
388
+ /**
389
+ * Generated bundle index. Do not edit.
390
+ */
391
+
392
+ export { MATERIAL_FIELD_COMPONENTS, MatCheckboxFieldComponent, MatRadioFieldComponent, MatSelectFieldComponent, MatTextFieldComponent, provideMaterialForms };
393
+ //# sourceMappingURL=mosaicoo-form-angular-material.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mosaicoo-form-angular-material.mjs","sources":["../../../packages/angular/material/src/material-fields.ts","../../../packages/angular/material/src/public-api.ts","../../../packages/angular/material/src/mosaicoo-form-angular-material.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Directive, computed, input } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ErrorStateMatcher, MatOption } from '@angular/material/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { maskValue } from '@mosaicoo/form-core';\nimport type { FieldOption, FormEngine, InputField } from '@mosaicoo/form-core';\n\n/**\n * Material Design 3 field components.\n *\n * Every component implements the renderer's `MformFieldComponent` contract\n * (signal inputs `field`/`engine`/`path`/`tick`/`mode`) and talks to the form\n * exclusively through the engine — validation, conditionals, calculations and\n * events keep working unchanged. The HOST's Material theme (M3 tokens) styles\n * everything; this entry adds no theming of its own.\n */\n\n@Directive()\nabstract class MaterialFieldBase {\n readonly field = input.required<InputField>();\n readonly engine = input.required<FormEngine>();\n readonly path = input.required<string>();\n readonly tick = input<number>(0);\n readonly mode = input<'edit' | 'readonly' | 'disabled'>('edit');\n\n /** Error state driven by the ENGINE, not by template validators. */\n readonly errorMatcher: ErrorStateMatcher = {\n isErrorState: () => this.errors().length > 0,\n };\n\n value(): unknown {\n this.tick();\n return this.engine().getValue(this.path());\n }\n\n errors() {\n this.tick();\n return this.engine().getFieldErrors(this.path());\n }\n\n firstError(): string | null {\n return this.errors()[0]?.message ?? null;\n }\n\n required(): boolean {\n return this.field().validators?.some((v) => v.type === 'required') ?? false;\n }\n\n disabled(): boolean {\n return (\n this.mode() !== 'edit' ||\n this.field().disabled === true ||\n this.field().calculate !== undefined\n );\n }\n\n label(): string {\n return this.field().label ?? this.field().key;\n }\n\n setValue(value: unknown): void {\n this.engine().setValue(this.path(), value);\n }\n\n touch(): void {\n this.engine().markTouched(this.path());\n void this.engine().validateFieldAsync(this.path());\n }\n}\n\n@Component({\n selector: 'mform-mat-text',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, MatFormFieldModule, MatInputModule],\n template: `\n <mat-form-field appearance=\"outline\" class=\"mform-mat-field\">\n <mat-label>{{ label() }}</mat-label>\n @if (isTextarea()) {\n <textarea\n matInput\n [rows]=\"3\"\n [ngModel]=\"stringValue()\"\n [errorStateMatcher]=\"errorMatcher\"\n [placeholder]=\"field().placeholder ?? ''\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"write($event)\"\n (blur)=\"touch()\"\n ></textarea>\n } @else {\n <input\n matInput\n [type]=\"inputType()\"\n [ngModel]=\"stringValue()\"\n [errorStateMatcher]=\"errorMatcher\"\n [placeholder]=\"field().placeholder ?? ''\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"write($event)\"\n (blur)=\"touch()\"\n />\n }\n @if (prefixText(); as p) {\n <span matTextPrefix>{{ p }}&nbsp;</span>\n }\n @if (suffixText(); as s) {\n <span matTextSuffix>{{ s }}</span>\n }\n @if (field().description; as hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (firstError(); as error) {\n <mat-error>{{ error }}</mat-error>\n }\n </mat-form-field>\n `,\n})\nexport class MatTextFieldComponent extends MaterialFieldBase {\n isTextarea(): boolean {\n return this.field().type === 'textarea';\n }\n\n stringValue(): string {\n const value = this.value();\n if (value === undefined || value === null) return '';\n const mask = this.field().format?.mask;\n if (mask && typeof value === 'string') return maskValue(value, mask).masked;\n return String(value);\n }\n\n inputType(): string {\n switch (this.field().type) {\n case 'number':\n case 'currency':\n return 'number';\n case 'email': return 'email';\n case 'password': return 'password';\n case 'phone': return 'tel';\n case 'url': return 'url';\n case 'time': return 'time';\n case 'datetime': return 'datetime-local';\n case 'day': return 'date';\n default: return 'text';\n }\n }\n\n prefixText(): string | null {\n const value = this.field().props?.['prefix'];\n return typeof value === 'string' && value ? value : null;\n }\n\n suffixText(): string | null {\n const value = this.field().props?.['suffix'];\n return typeof value === 'string' && value ? value : null;\n }\n\n write(raw: string): void {\n const mask = this.field().format?.mask;\n if (mask) {\n const { masked, raw: stripped } = maskValue(raw, mask);\n this.setValue(this.field().format?.keepMask ? masked : stripped);\n return;\n }\n if (this.field().dataType === 'number') {\n const parsed = raw === '' ? undefined : Number(raw);\n this.setValue(parsed !== undefined && Number.isFinite(parsed) ? parsed : undefined);\n return;\n }\n this.setValue(raw);\n }\n}\n\n@Component({\n selector: 'mform-mat-select',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, MatFormFieldModule, MatSelectModule, MatOption],\n template: `\n <mat-form-field appearance=\"outline\" class=\"mform-mat-field\">\n <mat-label>{{ label() }}</mat-label>\n <mat-select\n [ngModel]=\"value()\"\n [errorStateMatcher]=\"errorMatcher\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"setValue($event)\"\n (closed)=\"touch()\"\n >\n @for (option of options(); track option.value) {\n <mat-option [value]=\"option.value\">{{ option.label }}</mat-option>\n }\n </mat-select>\n @if (field().description; as hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (firstError(); as error) {\n <mat-error>{{ error }}</mat-error>\n }\n </mat-form-field>\n `,\n})\nexport class MatSelectFieldComponent extends MaterialFieldBase {\n readonly options = computed<FieldOption[]>(() => this.field().options ?? []);\n}\n\n@Component({\n selector: 'mform-mat-checkbox',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, MatCheckboxModule],\n template: `\n <div class=\"mform-mat-checkbox\">\n <mat-checkbox\n [ngModel]=\"value() === true\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"setValue($event)\"\n (blur)=\"touch()\"\n >\n {{ label() }}\n </mat-checkbox>\n @if (firstError(); as error) {\n <div class=\"mform-mat-error\">{{ error }}</div>\n }\n </div>\n `,\n styles: `\n .mform-mat-error { color: var(--mat-sys-error, #ba1a1a); font-size: 12px; padding-left: 12px; }\n `,\n})\nexport class MatCheckboxFieldComponent extends MaterialFieldBase {}\n\n@Component({\n selector: 'mform-mat-radio',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, MatRadioModule],\n template: `\n <div class=\"mform-mat-radio\">\n <span class=\"mform-mat-radio-label\">{{ label() }}</span>\n <mat-radio-group\n [ngModel]=\"value()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"setValue($event)\"\n >\n @for (option of options(); track option.value) {\n <mat-radio-button [value]=\"option.value\">{{ option.label }}</mat-radio-button>\n }\n </mat-radio-group>\n @if (firstError(); as error) {\n <div class=\"mform-mat-error\">{{ error }}</div>\n }\n </div>\n `,\n styles: `\n .mform-mat-radio { display: flex; flex-direction: column; gap: 4px; }\n .mform-mat-radio-label { font-size: 13px; font-weight: 500; }\n .mform-mat-radio mat-radio-group { display: flex; flex-direction: column; }\n .mform-mat-error { color: var(--mat-sys-error, #ba1a1a); font-size: 12px; }\n `,\n})\nexport class MatRadioFieldComponent extends MaterialFieldBase {\n readonly options = computed<FieldOption[]>(() => this.field().options ?? []);\n}\n","/*\n * Material adapter entry point (`@mosaicoo/form-angular/material`).\n *\n * Optional: requires the host to install @angular/material (optional peer).\n * Registers Material Design 3 field components over the runtime's registry —\n * unmapped types keep the built-in accessible renderers. The host's Material\n * theme (M3 tokens) drives all styling.\n */\nimport { type EnvironmentProviders } from '@angular/core';\nimport { provideMosaicooForm, type FieldComponentMap } from '@mosaicoo/form-angular';\nimport {\n MatCheckboxFieldComponent,\n MatRadioFieldComponent,\n MatSelectFieldComponent,\n MatTextFieldComponent,\n} from './material-fields.js';\n\nexport {\n MatCheckboxFieldComponent,\n MatRadioFieldComponent,\n MatSelectFieldComponent,\n MatTextFieldComponent,\n};\n\n/** Field types rendered with Material components (others stay built-in). */\nexport const MATERIAL_FIELD_COMPONENTS: FieldComponentMap = {\n text: MatTextFieldComponent,\n textarea: MatTextFieldComponent,\n number: MatTextFieldComponent,\n currency: MatTextFieldComponent,\n email: MatTextFieldComponent,\n password: MatTextFieldComponent,\n phone: MatTextFieldComponent,\n url: MatTextFieldComponent,\n time: MatTextFieldComponent,\n datetime: MatTextFieldComponent,\n day: MatTextFieldComponent,\n select: MatSelectFieldComponent,\n checkbox: MatCheckboxFieldComponent,\n radio: MatRadioFieldComponent,\n};\n\n/**\n * Registers the Material field set:\n *\n * ```ts\n * bootstrapApplication(App, {\n * providers: [provideMaterialForms()],\n * });\n * ```\n *\n * Composable: later `provideMosaicooForm({components})` calls can override\n * individual types (host-specific fields win).\n */\nexport function provideMaterialForms(): EnvironmentProviders {\n return provideMosaicooForm({ components: MATERIAL_FIELD_COMPONENTS });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAWA;;;;;;;;AAQG;AAEH,MACe,iBAAiB,CAAA;AACrB,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAc;AACpC,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,4EAAc;AACrC,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,0EAAU;AAC/B,IAAA,IAAI,GAAG,KAAK,CAAS,CAAC,2EAAC;AACvB,IAAA,IAAI,GAAG,KAAK,CAAmC,MAAM,2EAAC;;AAGtD,IAAA,YAAY,GAAsB;QACzC,YAAY,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,GAAG,CAAC;KAC7C;IAED,KAAK,GAAA;QACH,IAAI,CAAC,IAAI,EAAE;AACX,QAAA,OAAO,IAAI,C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