@ng-forge/dynamic-forms-material 1.2.0-next.6 → 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.
Files changed (43) hide show
  1. package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-button.mjs +106 -0
  2. package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-button.mjs.map +1 -0
  3. package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-icon.mjs +34 -0
  4. package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-icon.mjs.map +1 -0
  5. package/fesm2022/ng-forge-dynamic-forms-material-lazy-button.mjs +60 -0
  6. package/fesm2022/ng-forge-dynamic-forms-material-lazy-button.mjs.map +1 -0
  7. package/fesm2022/ng-forge-dynamic-forms-material-lazy-checkbox.mjs +76 -0
  8. package/fesm2022/ng-forge-dynamic-forms-material-lazy-checkbox.mjs.map +1 -0
  9. package/fesm2022/ng-forge-dynamic-forms-material-lazy-datepicker.mjs +124 -0
  10. package/fesm2022/ng-forge-dynamic-forms-material-lazy-datepicker.mjs.map +1 -0
  11. package/fesm2022/ng-forge-dynamic-forms-material-lazy-input.mjs +196 -0
  12. package/fesm2022/ng-forge-dynamic-forms-material-lazy-input.mjs.map +1 -0
  13. package/fesm2022/ng-forge-dynamic-forms-material-lazy-multi-checkbox.mjs +136 -0
  14. package/fesm2022/ng-forge-dynamic-forms-material-lazy-multi-checkbox.mjs.map +1 -0
  15. package/fesm2022/ng-forge-dynamic-forms-material-lazy-radio.mjs +92 -0
  16. package/fesm2022/ng-forge-dynamic-forms-material-lazy-radio.mjs.map +1 -0
  17. package/fesm2022/ng-forge-dynamic-forms-material-lazy-select.mjs +106 -0
  18. package/fesm2022/ng-forge-dynamic-forms-material-lazy-select.mjs.map +1 -0
  19. package/fesm2022/ng-forge-dynamic-forms-material-lazy-slider.mjs +76 -0
  20. package/fesm2022/ng-forge-dynamic-forms-material-lazy-slider.mjs.map +1 -0
  21. package/fesm2022/ng-forge-dynamic-forms-material-lazy-textarea.mjs +92 -0
  22. package/fesm2022/ng-forge-dynamic-forms-material-lazy-textarea.mjs.map +1 -0
  23. package/fesm2022/ng-forge-dynamic-forms-material-lazy-toggle.mjs +76 -0
  24. package/fesm2022/ng-forge-dynamic-forms-material-lazy-toggle.mjs.map +1 -0
  25. package/fesm2022/ng-forge-dynamic-forms-material-shared.mjs +14 -0
  26. package/fesm2022/ng-forge-dynamic-forms-material-shared.mjs.map +1 -0
  27. package/fesm2022/ng-forge-dynamic-forms-material.mjs +36 -92
  28. package/fesm2022/ng-forge-dynamic-forms-material.mjs.map +1 -1
  29. package/package.json +55 -3
  30. package/types/ng-forge-dynamic-forms-material-lazy-addon-button.d.ts +18 -0
  31. package/types/ng-forge-dynamic-forms-material-lazy-addon-icon.d.ts +17 -0
  32. package/types/ng-forge-dynamic-forms-material-lazy-button.d.ts +114 -0
  33. package/types/ng-forge-dynamic-forms-material-lazy-checkbox.d.ts +26 -0
  34. package/types/ng-forge-dynamic-forms-material-lazy-datepicker.d.ts +37 -0
  35. package/types/ng-forge-dynamic-forms-material-lazy-input.d.ts +55 -0
  36. package/types/ng-forge-dynamic-forms-material-lazy-multi-checkbox.d.ts +29 -0
  37. package/types/ng-forge-dynamic-forms-material-lazy-radio.d.ts +24 -0
  38. package/types/ng-forge-dynamic-forms-material-lazy-select.d.ts +35 -0
  39. package/types/ng-forge-dynamic-forms-material-lazy-slider.d.ts +27 -0
  40. package/types/ng-forge-dynamic-forms-material-lazy-textarea.d.ts +31 -0
  41. package/types/ng-forge-dynamic-forms-material-lazy-toggle.d.ts +28 -0
  42. package/types/ng-forge-dynamic-forms-material-shared.d.ts +91 -0
  43. package/types/ng-forge-dynamic-forms-material.d.ts +8 -159
@@ -0,0 +1,106 @@
1
+ import { AsyncPipe } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { MatButton, MatIconButton } from '@angular/material/button';
5
+ import { MatIcon } from '@angular/material/icon';
6
+ import { MatProgressSpinner } from '@angular/material/progress-spinner';
7
+ import * as i1 from '@ng-forge/dynamic-forms/integration';
8
+ import { injectNgForgeAddonAction, DynamicTextPipe, NgForgeAddonAction } from '@ng-forge/dynamic-forms/integration';
9
+
10
+ class MatButtonAddonComponent {
11
+ action = injectNgForgeAddonAction();
12
+ addon = this.action.addon;
13
+ label = computed(() => this.addon().label, /* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
15
+ ariaLabel = computed(() => this.addon().ariaLabel, /* @ts-ignore */
16
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
17
+ isIconOnly = computed(() => {
18
+ const a = this.addon();
19
+ return !!a.icon && !a.label;
20
+ }, /* @ts-ignore */
21
+ ...(ngDevMode ? [{ debugName: "isIconOnly" }] : /* istanbul ignore next */ []));
22
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: MatButtonAddonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
23
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: MatButtonAddonComponent, isStandalone: true, selector: "df-mat-button-addon", hostDirectives: [{ directive: i1.NgForgeAddonAction }], ngImport: i0, template: `
24
+ @if (isIconOnly()) {
25
+ <button
26
+ mat-icon-button
27
+ type="button"
28
+ [color]="addon().color ?? null"
29
+ [disabled]="action.disabled() || action.loading()"
30
+ [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null"
31
+ [attr.aria-busy]="action.loading() || null"
32
+ (click)="action.dispatch()"
33
+ >
34
+ @if (action.loading()) {
35
+ <mat-progress-spinner mode="indeterminate" diameter="18" aria-hidden="true" />
36
+ <span class="df-mat-sr-only" role="status">Loading…</span>
37
+ } @else {
38
+ <mat-icon aria-hidden="true">{{ addon().icon }}</mat-icon>
39
+ }
40
+ </button>
41
+ } @else {
42
+ <button
43
+ mat-button
44
+ type="button"
45
+ [color]="addon().color ?? null"
46
+ [disabled]="action.disabled() || action.loading()"
47
+ [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null"
48
+ [attr.aria-busy]="action.loading() || null"
49
+ (click)="action.dispatch()"
50
+ >
51
+ @if (action.loading()) {
52
+ <mat-progress-spinner mode="indeterminate" diameter="18" aria-hidden="true" />
53
+ <span class="df-mat-sr-only" role="status">Loading…</span>
54
+ } @else if (addon().icon; as icon) {
55
+ <mat-icon aria-hidden="true">{{ icon }}</mat-icon>
56
+ }
57
+ {{ label() | dynamicText | async }}
58
+ </button>
59
+ }
60
+ `, isInline: true, styles: [".df-mat-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
61
+ }
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: MatButtonAddonComponent, decorators: [{
63
+ type: Component,
64
+ args: [{ selector: 'df-mat-button-addon', imports: [MatButton, MatIconButton, MatIcon, MatProgressSpinner, DynamicTextPipe, AsyncPipe], hostDirectives: [NgForgeAddonAction], template: `
65
+ @if (isIconOnly()) {
66
+ <button
67
+ mat-icon-button
68
+ type="button"
69
+ [color]="addon().color ?? null"
70
+ [disabled]="action.disabled() || action.loading()"
71
+ [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null"
72
+ [attr.aria-busy]="action.loading() || null"
73
+ (click)="action.dispatch()"
74
+ >
75
+ @if (action.loading()) {
76
+ <mat-progress-spinner mode="indeterminate" diameter="18" aria-hidden="true" />
77
+ <span class="df-mat-sr-only" role="status">Loading…</span>
78
+ } @else {
79
+ <mat-icon aria-hidden="true">{{ addon().icon }}</mat-icon>
80
+ }
81
+ </button>
82
+ } @else {
83
+ <button
84
+ mat-button
85
+ type="button"
86
+ [color]="addon().color ?? null"
87
+ [disabled]="action.disabled() || action.loading()"
88
+ [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null"
89
+ [attr.aria-busy]="action.loading() || null"
90
+ (click)="action.dispatch()"
91
+ >
92
+ @if (action.loading()) {
93
+ <mat-progress-spinner mode="indeterminate" diameter="18" aria-hidden="true" />
94
+ <span class="df-mat-sr-only" role="status">Loading…</span>
95
+ } @else if (addon().icon; as icon) {
96
+ <mat-icon aria-hidden="true">{{ icon }}</mat-icon>
97
+ }
98
+ {{ label() | dynamicText | async }}
99
+ </button>
100
+ }
101
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".df-mat-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"] }]
102
+ }] });
103
+
104
+
105
+ export { MatButtonAddonComponent };
106
+ //# sourceMappingURL=ng-forge-dynamic-forms-material-lazy-addon-button.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-forge-dynamic-forms-material-lazy-addon-button.mjs","mappings":";;;;;;;;;;;IAyEqB;;;;;AAIA;AACjB;;;;;AATS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA1DD","names":[],"ignoreList":[],"sources":["../../../../packages/dynamic-forms-material/src/lib/addons/mat-button-addon.component.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\nimport { MatButton, MatIconButton } from '@angular/material/button';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport { injectNgForgeAddonAction, NgForgeAddonAction } from '@ng-forge/dynamic-forms/integration';\nimport type { MatButtonAddon } from '@ng-forge/dynamic-forms-material/shared';\n\n/** Renderer for the `mat-button` addon type. */\n@Component({\n selector: 'df-mat-button-addon',\n imports: [MatButton, MatIconButton, MatIcon, MatProgressSpinner, DynamicTextPipe, AsyncPipe],\n hostDirectives: [NgForgeAddonAction],\n template: `\n @if (isIconOnly()) {\n <button\n mat-icon-button\n type=\"button\"\n [color]=\"addon().color ?? null\"\n [disabled]=\"action.disabled() || action.loading()\"\n [attr.aria-label]=\"(ariaLabel() | dynamicText | async) ?? null\"\n [attr.aria-busy]=\"action.loading() || null\"\n (click)=\"action.dispatch()\"\n >\n @if (action.loading()) {\n <mat-progress-spinner mode=\"indeterminate\" diameter=\"18\" aria-hidden=\"true\" />\n <span class=\"df-mat-sr-only\" role=\"status\">Loading…</span>\n } @else {\n <mat-icon aria-hidden=\"true\">{{ addon().icon }}</mat-icon>\n }\n </button>\n } @else {\n <button\n mat-button\n type=\"button\"\n [color]=\"addon().color ?? null\"\n [disabled]=\"action.disabled() || action.loading()\"\n [attr.aria-label]=\"(ariaLabel() | dynamicText | async) ?? null\"\n [attr.aria-busy]=\"action.loading() || null\"\n (click)=\"action.dispatch()\"\n >\n @if (action.loading()) {\n <mat-progress-spinner mode=\"indeterminate\" diameter=\"18\" aria-hidden=\"true\" />\n <span class=\"df-mat-sr-only\" role=\"status\">Loading…</span>\n } @else if (addon().icon; as icon) {\n <mat-icon aria-hidden=\"true\">{{ icon }}</mat-icon>\n }\n {{ label() | dynamicText | async }}\n </button>\n }\n `,\n styles: [\n `\n .df-mat-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatButtonAddonComponent {\n protected readonly action = injectNgForgeAddonAction<MatButtonAddon>();\n\n /** Re-exposed for template binding — same signal stored on the directive. */\n protected readonly addon = this.action.addon;\n\n protected readonly label = computed(() => this.addon().label);\n protected readonly ariaLabel = computed(() => this.addon().ariaLabel);\n protected readonly isIconOnly = computed(() => {\n const a = this.addon();\n return !!a.icon && !a.label;\n });\n}\n"]}
@@ -0,0 +1,34 @@
1
+ import { AsyncPipe } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { MatIcon } from '@angular/material/icon';
5
+ import { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';
6
+
7
+ class MatIconAddonComponent {
8
+ addon = input.required(/* @ts-ignore */
9
+ ...(ngDevMode ? [{ debugName: "addon" }] : /* istanbul ignore next */ []));
10
+ fieldInputs = input(/* @ts-ignore */
11
+ ...(ngDevMode ? [undefined, { debugName: "fieldInputs" }] : /* istanbul ignore next */ []));
12
+ ariaLabel = computed(() => this.addon().ariaLabel, /* @ts-ignore */
13
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
14
+ hasAriaLabel = computed(() => this.addon().ariaLabel !== undefined, /* @ts-ignore */
15
+ ...(ngDevMode ? [{ debugName: "hasAriaLabel" }] : /* istanbul ignore next */ []));
16
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: MatIconAddonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
17
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: MatIconAddonComponent, isStandalone: true, selector: "df-mat-icon-addon", inputs: { addon: { classPropertyName: "addon", publicName: "addon", isSignal: true, isRequired: true, transformFunction: null }, fieldInputs: { classPropertyName: "fieldInputs", publicName: "fieldInputs", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-hidden": "hasAriaLabel() ? null : \"true\"" } }, ngImport: i0, template: `<mat-icon [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null">{{ addon().icon }}</mat-icon>`, isInline: true, dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
18
+ }
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: MatIconAddonComponent, decorators: [{
20
+ type: Component,
21
+ args: [{
22
+ selector: 'df-mat-icon-addon',
23
+ imports: [MatIcon, AsyncPipe, DynamicTextPipe],
24
+ template: `<mat-icon [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null">{{ addon().icon }}</mat-icon>`,
25
+ host: {
26
+ '[attr.aria-hidden]': 'hasAriaLabel() ? null : "true"',
27
+ },
28
+ changeDetection: ChangeDetectionStrategy.OnPush,
29
+ }]
30
+ }], propDecorators: { addon: [{ type: i0.Input, args: [{ isSignal: true, alias: "addon", required: true }] }], fieldInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldInputs", required: false }] }] } });
31
+
32
+
33
+ export { MatIconAddonComponent };
34
+ //# sourceMappingURL=ng-forge-dynamic-forms-material-lazy-addon-icon.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-forge-dynamic-forms-material-lazy-addon-icon.mjs","mappings":";;;;;;;;;IAoBW;;;;AAGU;;;AANR;;;;AATF;AACT;AACA;AACA;AACA;AACE;AACD;;AAEF","names":[],"ignoreList":[],"sources":["../../../../packages/dynamic-forms-material/src/lib/addons/mat-icon-addon.component.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { MatIcon } from '@angular/material/icon';\nimport { WrapperFieldInputs } from '@ng-forge/dynamic-forms/integration';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport type { MatIconAddon } from '@ng-forge/dynamic-forms-material/shared';\n\n/** Renderer for the `mat-icon` addon type. */\n@Component({\n selector: 'df-mat-icon-addon',\n imports: [MatIcon, AsyncPipe, DynamicTextPipe],\n template: `<mat-icon [attr.aria-label]=\"(ariaLabel() | dynamicText | async) ?? null\">{{ addon().icon }}</mat-icon>`,\n host: {\n '[attr.aria-hidden]': 'hasAriaLabel() ? null : \"true\"',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatIconAddonComponent {\n readonly addon = input.required<MatIconAddon>();\n /** Accepted for contract uniformity — `NgComponentOutlet` setInput is strict; every type must declare it. */\n readonly fieldInputs = input<WrapperFieldInputs | undefined>();\n\n protected readonly ariaLabel = computed(() => this.addon().ariaLabel);\n protected readonly hasAriaLabel = computed(() => this.addon().ariaLabel !== undefined);\n}\n"]}
@@ -0,0 +1,60 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { MatButton } from '@angular/material/button';
4
+ import { AsyncPipe } from '@angular/common';
5
+ import * as i1 from '@ng-forge/dynamic-forms/integration';
6
+ import { injectNgForgeAction, DynamicTextPipe, NgForgeActionHost } from '@ng-forge/dynamic-forms/integration';
7
+
8
+ class MatButtonFieldComponent {
9
+ action = injectNgForgeAction();
10
+ props = input(/* @ts-ignore */
11
+ ...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
12
+ buttonType = computed(() => this.props()?.type ?? 'button', /* @ts-ignore */
13
+ ...(ngDevMode ? [{ debugName: "buttonType" }] : /* istanbul ignore next */ []));
14
+ buttonTestId = computed(() => `${this.buttonType()}-${this.action.key()}`, /* @ts-ignore */
15
+ ...(ngDevMode ? [{ debugName: "buttonTestId" }] : /* istanbul ignore next */ []));
16
+ onClick() {
17
+ if (this.buttonType() === 'submit')
18
+ return;
19
+ this.action.dispatch();
20
+ }
21
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: MatButtonFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
22
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: MatButtonFieldComponent, isStandalone: true, selector: "df-mat-button", inputs: { props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.NgForgeActionHost }], ngImport: i0, template: `
23
+ @let buttonId = action.key() + '-button';
24
+ <button
25
+ mat-raised-button
26
+ [id]="buttonId"
27
+ [type]="buttonType()"
28
+ [color]="props()?.color || 'primary'"
29
+ [disabled]="action.disabled()"
30
+ [attr.tabindex]="action.tabIndex()"
31
+ [attr.data-testid]="buttonTestId()"
32
+ (click)="onClick()"
33
+ >
34
+ {{ action.label() | dynamicText | async }}
35
+ </button>
36
+ `, isInline: true, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n", "button{min-width:fit-content}\n"], dependencies: [{ kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
37
+ }
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: MatButtonFieldComponent, decorators: [{
39
+ type: Component,
40
+ args: [{ selector: 'df-mat-button', imports: [MatButton, DynamicTextPipe, AsyncPipe], hostDirectives: [NgForgeActionHost], template: `
41
+ @let buttonId = action.key() + '-button';
42
+ <button
43
+ mat-raised-button
44
+ [id]="buttonId"
45
+ [type]="buttonType()"
46
+ [color]="props()?.color || 'primary'"
47
+ [disabled]="action.disabled()"
48
+ [attr.tabindex]="action.tabIndex()"
49
+ [attr.data-testid]="buttonTestId()"
50
+ (click)="onClick()"
51
+ >
52
+ {{ action.label() | dynamicText | async }}
53
+ </button>
54
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n", "button{min-width:fit-content}\n"] }]
55
+ }], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
56
+
57
+
58
+
59
+ export { MatButtonFieldComponent };
60
+ //# sourceMappingURL=ng-forge-dynamic-forms-material-lazy-button.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-forge-dynamic-forms-material-lazy-button.mjs","mappings":";;;;;;;AAqCc;;AAGH;;AAEA;;AAEA;;;AAGP;;AACA;;;AAXiB;;;;;;;;;;;;;;AAXlB;;;;AAjBS","names":[],"ignoreList":[],"sources":["../../../../packages/dynamic-forms-material/src/lib/fields/button/mat-button.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { MatButton } from '@angular/material/button';\nimport { AsyncPipe } from '@angular/common';\nimport { FormEvent } from '@ng-forge/dynamic-forms';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport { injectNgForgeAction, NgForgeActionHost } from '@ng-forge/dynamic-forms/integration';\nimport { MatButtonProps } from './mat-button.type';\n\n@Component({\n selector: 'df-mat-button',\n imports: [MatButton, DynamicTextPipe, AsyncPipe],\n hostDirectives: [NgForgeActionHost],\n template: `\n @let buttonId = action.key() + '-button';\n <button\n mat-raised-button\n [id]=\"buttonId\"\n [type]=\"buttonType()\"\n [color]=\"props()?.color || 'primary'\"\n [disabled]=\"action.disabled()\"\n [attr.tabindex]=\"action.tabIndex()\"\n [attr.data-testid]=\"buttonTestId()\"\n (click)=\"onClick()\"\n >\n {{ action.label() | dynamicText | async }}\n </button>\n `,\n styleUrl: '../../styles/_form-field.scss',\n styles: [\n `\n button {\n min-width: fit-content;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport default class MatButtonFieldComponent<TEvent extends FormEvent> {\n protected readonly action = injectNgForgeAction<TEvent>();\n\n readonly props = input<MatButtonProps>();\n\n readonly buttonType = computed(() => this.props()?.type ?? 'button');\n\n readonly buttonTestId = computed(() => `${this.buttonType()}-${this.action.key()}`);\n\n onClick(): void {\n if (this.buttonType() === 'submit') return;\n this.action.dispatch();\n }\n}\n"]}
@@ -0,0 +1,76 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { FormField } from '@angular/forms/signals';
4
+ import { MatCheckbox } from '@angular/material/checkbox';
5
+ import * as i1 from '@ng-forge/dynamic-forms/integration';
6
+ import { injectNgForgeField, NgForgeControl, DynamicTextPipe, NgForgeFieldHost } from '@ng-forge/dynamic-forms/integration';
7
+ import { MatError } from '@angular/material/input';
8
+ import { AsyncPipe } from '@angular/common';
9
+ import { MATERIAL_CONFIG } from '@ng-forge/dynamic-forms-material/shared';
10
+
11
+ class MatCheckboxFieldComponent {
12
+ materialConfig = inject(MATERIAL_CONFIG, { optional: true });
13
+ ngf = injectNgForgeField();
14
+ props = input(/* @ts-ignore */
15
+ ...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
16
+ disableRipple = computed(() => this.props()?.disableRipple ?? this.materialConfig?.disableRipple ?? false, /* @ts-ignore */
17
+ ...(ngDevMode ? [{ debugName: "disableRipple" }] : /* istanbul ignore next */ []));
18
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: MatCheckboxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: MatCheckboxFieldComponent, isStandalone: true, selector: "df-mat-checkbox", inputs: { props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.NgForgeFieldHost }], ngImport: i0, template: `
20
+ @let f = ngf.field();
21
+ @let checkboxId = ngf.key() + '-checkbox';
22
+
23
+ <mat-checkbox
24
+ ngForgeControl="input[type='checkbox']"
25
+ [id]="checkboxId"
26
+ [formField]="f"
27
+ [labelPosition]="props()?.labelPosition || 'after'"
28
+ [indeterminate]="props()?.indeterminate || false"
29
+ [color]="props()?.color || 'primary'"
30
+ [disableRipple]="disableRipple()"
31
+ [required]="!!f().required()"
32
+ [tabIndex]="ngf.tabIndex() ?? 0"
33
+ [attr.hidden]="f().hidden() || null"
34
+ >
35
+ {{ ngf.label() | dynamicText | async }}
36
+ </mat-checkbox>
37
+
38
+ @if (ngf.errorsToDisplay()[0]; as error) {
39
+ <mat-error [id]="ngf.errorId()" [attr.hidden]="f().hidden() || null">{{ error.message }}</mat-error>
40
+ } @else if (props()?.hint; as hint) {
41
+ <div class="mat-hint" [id]="ngf.hintId()" [attr.hidden]="f().hidden() || null">{{ hint | dynamicText | async }}</div>
42
+ }
43
+ `, isInline: true, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n"], dependencies: [{ kind: "component", type: 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"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: NgForgeControl, selector: "[ngForgeControl]", inputs: ["ngForgeControl"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
44
+ }
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: MatCheckboxFieldComponent, decorators: [{
46
+ type: Component,
47
+ args: [{ selector: 'df-mat-checkbox', imports: [MatCheckbox, FormField, MatError, DynamicTextPipe, AsyncPipe, NgForgeControl], hostDirectives: [NgForgeFieldHost], template: `
48
+ @let f = ngf.field();
49
+ @let checkboxId = ngf.key() + '-checkbox';
50
+
51
+ <mat-checkbox
52
+ ngForgeControl="input[type='checkbox']"
53
+ [id]="checkboxId"
54
+ [formField]="f"
55
+ [labelPosition]="props()?.labelPosition || 'after'"
56
+ [indeterminate]="props()?.indeterminate || false"
57
+ [color]="props()?.color || 'primary'"
58
+ [disableRipple]="disableRipple()"
59
+ [required]="!!f().required()"
60
+ [tabIndex]="ngf.tabIndex() ?? 0"
61
+ [attr.hidden]="f().hidden() || null"
62
+ >
63
+ {{ ngf.label() | dynamicText | async }}
64
+ </mat-checkbox>
65
+
66
+ @if (ngf.errorsToDisplay()[0]; as error) {
67
+ <mat-error [id]="ngf.errorId()" [attr.hidden]="f().hidden() || null">{{ error.message }}</mat-error>
68
+ } @else if (props()?.hint; as hint) {
69
+ <div class="mat-hint" [id]="ngf.hintId()" [attr.hidden]="f().hidden() || null">{{ hint | dynamicText | async }}</div>
70
+ }
71
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n"] }]
72
+ }], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
73
+
74
+
75
+ export { MatCheckboxFieldComponent };
76
+ //# sourceMappingURL=ng-forge-dynamic-forms-material-lazy-checkbox.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-forge-dynamic-forms-material-lazy-checkbox.mjs","mappings":";;;;;;;;;;AA0Cc;;;AAKH;;AAEA;;;AAPU;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/BT","names":[],"ignoreList":[],"sources":["../../../../packages/dynamic-forms-material/src/lib/fields/checkbox/mat-checkbox.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { FormField } from '@angular/forms/signals';\nimport { MatCheckbox } from '@angular/material/checkbox';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport { NgForgeControl, injectNgForgeField, NgForgeFieldHost } from '@ng-forge/dynamic-forms/integration';\nimport { MatCheckboxProps } from './mat-checkbox.type';\nimport { MatError } from '@angular/material/input';\nimport { AsyncPipe } from '@angular/common';\nimport { MATERIAL_CONFIG } from '@ng-forge/dynamic-forms-material/shared';\n\n@Component({\n selector: 'df-mat-checkbox',\n imports: [MatCheckbox, FormField, MatError, DynamicTextPipe, AsyncPipe, NgForgeControl],\n hostDirectives: [NgForgeFieldHost],\n template: `\n @let f = ngf.field();\n @let checkboxId = ngf.key() + '-checkbox';\n\n <mat-checkbox\n ngForgeControl=\"input[type='checkbox']\"\n [id]=\"checkboxId\"\n [formField]=\"f\"\n [labelPosition]=\"props()?.labelPosition || 'after'\"\n [indeterminate]=\"props()?.indeterminate || false\"\n [color]=\"props()?.color || 'primary'\"\n [disableRipple]=\"disableRipple()\"\n [required]=\"!!f().required()\"\n [tabIndex]=\"ngf.tabIndex() ?? 0\"\n [attr.hidden]=\"f().hidden() || null\"\n >\n {{ ngf.label() | dynamicText | async }}\n </mat-checkbox>\n\n @if (ngf.errorsToDisplay()[0]; as error) {\n <mat-error [id]=\"ngf.errorId()\" [attr.hidden]=\"f().hidden() || null\">{{ error.message }}</mat-error>\n } @else if (props()?.hint; as hint) {\n <div class=\"mat-hint\" [id]=\"ngf.hintId()\" [attr.hidden]=\"f().hidden() || null\">{{ hint | dynamicText | async }}</div>\n }\n `,\n styleUrl: '../../styles/_form-field.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport default class MatCheckboxFieldComponent {\n private materialConfig = inject(MATERIAL_CONFIG, { optional: true });\n\n protected readonly ngf = injectNgForgeField<boolean>();\n\n readonly props = input<MatCheckboxProps>();\n\n readonly disableRipple = computed(() => this.props()?.disableRipple ?? this.materialConfig?.disableRipple ?? false);\n}\n"]}
@@ -0,0 +1,124 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { FormField } from '@angular/forms/signals';
4
+ import { MatFormField, MatLabel, MatSuffix, MatError } from '@angular/material/form-field';
5
+ import { MatInput, MatHint } from '@angular/material/input';
6
+ import { MatDatepicker, MatDatepickerInput, MatDatepickerToggle } from '@angular/material/datepicker';
7
+ import * as i1 from '@ng-forge/dynamic-forms/integration';
8
+ import { injectNgForgeField, NgForgeControl, DynamicTextPipe, NgForgeFieldHost } from '@ng-forge/dynamic-forms/integration';
9
+ import { provideNativeDateAdapter } from '@angular/material/core';
10
+ import { AsyncPipe } from '@angular/common';
11
+ import { MATERIAL_CONFIG } from '@ng-forge/dynamic-forms-material/shared';
12
+
13
+ class MatDatepickerFieldComponent {
14
+ materialConfig = inject(MATERIAL_CONFIG, { optional: true });
15
+ ngf = injectNgForgeField();
16
+ minDate = input(null, /* @ts-ignore */
17
+ ...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
18
+ maxDate = input(null, /* @ts-ignore */
19
+ ...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
20
+ startAt = input(null, /* @ts-ignore */
21
+ ...(ngDevMode ? [{ debugName: "startAt" }] : /* istanbul ignore next */ []));
22
+ props = input(/* @ts-ignore */
23
+ ...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
24
+ appearance = computed(() => this.props()?.appearance ?? this.materialConfig?.appearance ?? 'outline', /* @ts-ignore */
25
+ ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
26
+ subscriptSizing = computed(() => this.props()?.subscriptSizing ?? this.materialConfig?.subscriptSizing ?? 'dynamic', /* @ts-ignore */
27
+ ...(ngDevMode ? [{ debugName: "subscriptSizing" }] : /* istanbul ignore next */ []));
28
+ floatLabel = computed(() => this.props()?.floatLabel ?? this.materialConfig?.floatLabel ?? 'auto', /* @ts-ignore */
29
+ ...(ngDevMode ? [{ debugName: "floatLabel" }] : /* istanbul ignore next */ []));
30
+ hideRequiredMarker = computed(() => this.props()?.hideRequiredMarker ?? this.materialConfig?.hideRequiredMarker ?? false, /* @ts-ignore */
31
+ ...(ngDevMode ? [{ debugName: "hideRequiredMarker" }] : /* istanbul ignore next */ []));
32
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: MatDatepickerFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
33
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: MatDatepickerFieldComponent, isStandalone: true, selector: "df-mat-datepicker", inputs: { minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideNativeDateAdapter()], hostDirectives: [{ directive: i1.NgForgeFieldHost }], ngImport: i0, template: `
34
+ @let inputId = ngf.key() + '-input';
35
+
36
+ <mat-form-field
37
+ [appearance]="appearance()"
38
+ [subscriptSizing]="subscriptSizing()"
39
+ [floatLabel]="floatLabel()"
40
+ [hideRequiredMarker]="hideRequiredMarker()"
41
+ >
42
+ @if (ngf.label(); as label) {
43
+ <mat-label>{{ label | dynamicText | async }}</mat-label>
44
+ }
45
+
46
+ <input
47
+ matInput
48
+ ngForgeControl
49
+ [id]="inputId"
50
+ [matDatepicker]="picker"
51
+ [formField]="ngf.field()"
52
+ [placeholder]="(ngf.placeholder() | dynamicText | async) ?? ''"
53
+ [attr.tabindex]="ngf.tabIndex()"
54
+ [min]="minDate()"
55
+ [max]="maxDate()"
56
+ />
57
+
58
+ <mat-datepicker-toggle matIconSuffix [for]="picker" />
59
+ <mat-datepicker #picker [startAt]="startAt()" [startView]="props()?.startView || 'month'" [touchUi]="props()?.touchUi ?? false" />
60
+
61
+ @if (ngf.errorsToDisplay()[0]; as error) {
62
+ <mat-error [id]="ngf.errorId()">{{ error.message }}</mat-error>
63
+ } @else if (props()?.hint; as hint) {
64
+ <mat-hint [id]="ngf.hintId()">{{ hint | dynamicText | async }}</mat-hint>
65
+ }
66
+ </mat-form-field>
67
+ `, isInline: true, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n", "mat-form-field{width:100%}\n"], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: 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"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: NgForgeControl, selector: "[ngForgeControl]", inputs: ["ngForgeControl"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
68
+ }
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: MatDatepickerFieldComponent, decorators: [{
70
+ type: Component,
71
+ args: [{ selector: 'df-mat-datepicker', imports: [
72
+ MatFormField,
73
+ MatLabel,
74
+ MatInput,
75
+ MatHint,
76
+ MatDatepicker,
77
+ MatDatepickerInput,
78
+ MatDatepickerToggle,
79
+ MatSuffix,
80
+ FormField,
81
+ MatError,
82
+ DynamicTextPipe,
83
+ AsyncPipe,
84
+ NgForgeControl,
85
+ ], hostDirectives: [NgForgeFieldHost], template: `
86
+ @let inputId = ngf.key() + '-input';
87
+
88
+ <mat-form-field
89
+ [appearance]="appearance()"
90
+ [subscriptSizing]="subscriptSizing()"
91
+ [floatLabel]="floatLabel()"
92
+ [hideRequiredMarker]="hideRequiredMarker()"
93
+ >
94
+ @if (ngf.label(); as label) {
95
+ <mat-label>{{ label | dynamicText | async }}</mat-label>
96
+ }
97
+
98
+ <input
99
+ matInput
100
+ ngForgeControl
101
+ [id]="inputId"
102
+ [matDatepicker]="picker"
103
+ [formField]="ngf.field()"
104
+ [placeholder]="(ngf.placeholder() | dynamicText | async) ?? ''"
105
+ [attr.tabindex]="ngf.tabIndex()"
106
+ [min]="minDate()"
107
+ [max]="maxDate()"
108
+ />
109
+
110
+ <mat-datepicker-toggle matIconSuffix [for]="picker" />
111
+ <mat-datepicker #picker [startAt]="startAt()" [startView]="props()?.startView || 'month'" [touchUi]="props()?.touchUi ?? false" />
112
+
113
+ @if (ngf.errorsToDisplay()[0]; as error) {
114
+ <mat-error [id]="ngf.errorId()">{{ error.message }}</mat-error>
115
+ } @else if (props()?.hint; as hint) {
116
+ <mat-hint [id]="ngf.hintId()">{{ hint | dynamicText | async }}</mat-hint>
117
+ }
118
+ </mat-form-field>
119
+ `, providers: [provideNativeDateAdapter()], changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n", "mat-form-field{width:100%}\n"] }]
120
+ }], propDecorators: { minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], startAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAt", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
121
+
122
+
123
+ export { MatDatepickerFieldComponent };
124
+ //# sourceMappingURL=ng-forge-dynamic-forms-material-lazy-datepicker.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-forge-dynamic-forms-material-lazy-datepicker.mjs","mappings":";;;;;;;;;;;;AA4Ec;;;;;;;;;AAQH;;AAEA;;AAEA;;AAEA;;AAEA;;;AAhBU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/DT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDT","names":[],"ignoreList":[],"sources":["../../../../packages/dynamic-forms-material/src/lib/fields/datepicker/mat-datepicker.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { FormField } from '@angular/forms/signals';\nimport { MatError, MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field';\nimport { MatHint, MatInput } from '@angular/material/input';\nimport { MatDatepicker, MatDatepickerInput, MatDatepickerToggle } from '@angular/material/datepicker';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport { NgForgeControl, injectNgForgeField, NgForgeFieldHost } from '@ng-forge/dynamic-forms/integration';\nimport { MatDatepickerProps } from './mat-datepicker.type';\nimport { provideNativeDateAdapter } from '@angular/material/core';\nimport { AsyncPipe } from '@angular/common';\nimport { MATERIAL_CONFIG } from '@ng-forge/dynamic-forms-material/shared';\n\n@Component({\n selector: 'df-mat-datepicker',\n imports: [\n MatFormField,\n MatLabel,\n MatInput,\n MatHint,\n MatDatepicker,\n MatDatepickerInput,\n MatDatepickerToggle,\n MatSuffix,\n FormField,\n MatError,\n DynamicTextPipe,\n AsyncPipe,\n NgForgeControl,\n ],\n hostDirectives: [NgForgeFieldHost],\n template: `\n @let inputId = ngf.key() + '-input';\n\n <mat-form-field\n [appearance]=\"appearance()\"\n [subscriptSizing]=\"subscriptSizing()\"\n [floatLabel]=\"floatLabel()\"\n [hideRequiredMarker]=\"hideRequiredMarker()\"\n >\n @if (ngf.label(); as label) {\n <mat-label>{{ label | dynamicText | async }}</mat-label>\n }\n\n <input\n matInput\n ngForgeControl\n [id]=\"inputId\"\n [matDatepicker]=\"picker\"\n [formField]=\"ngf.field()\"\n [placeholder]=\"(ngf.placeholder() | dynamicText | async) ?? ''\"\n [attr.tabindex]=\"ngf.tabIndex()\"\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n />\n\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\" />\n <mat-datepicker #picker [startAt]=\"startAt()\" [startView]=\"props()?.startView || 'month'\" [touchUi]=\"props()?.touchUi ?? false\" />\n\n @if (ngf.errorsToDisplay()[0]; as error) {\n <mat-error [id]=\"ngf.errorId()\">{{ error.message }}</mat-error>\n } @else if (props()?.hint; as hint) {\n <mat-hint [id]=\"ngf.hintId()\">{{ hint | dynamicText | async }}</mat-hint>\n }\n </mat-form-field>\n `,\n styleUrl: '../../styles/_form-field.scss',\n styles: [\n `\n mat-form-field {\n width: 100%;\n }\n `,\n ],\n providers: [provideNativeDateAdapter()],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport default class MatDatepickerFieldComponent {\n private materialConfig = inject(MATERIAL_CONFIG, { optional: true });\n\n protected readonly ngf = injectNgForgeField<string>();\n\n readonly minDate = input<Date | null>(null);\n readonly maxDate = input<Date | null>(null);\n readonly startAt = input<Date | null>(null);\n readonly props = input<MatDatepickerProps>();\n\n readonly appearance = computed(() => this.props()?.appearance ?? this.materialConfig?.appearance ?? 'outline');\n\n readonly subscriptSizing = computed(() => this.props()?.subscriptSizing ?? this.materialConfig?.subscriptSizing ?? 'dynamic');\n\n readonly floatLabel = computed(() => this.props()?.floatLabel ?? this.materialConfig?.floatLabel ?? 'auto');\n\n readonly hideRequiredMarker = computed(() => this.props()?.hideRequiredMarker ?? this.materialConfig?.hideRequiredMarker ?? false);\n}\n"]}