@ng-forge/dynamic-forms-material 1.3.0-next.2 → 1.3.0-next.3
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 +118 -33
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-button.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-icon.mjs +112 -33
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-icon.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-button.mjs +96 -33
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-button.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-checkbox.mjs +137 -29
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-checkbox.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-datepicker.mjs +316 -62
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-datepicker.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-input.mjs +253 -107
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-input.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-multi-checkbox.mjs +179 -65
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-multi-checkbox.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-radio.mjs +168 -27
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-radio.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-select.mjs +253 -56
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-select.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-slider.mjs +157 -27
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-slider.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-textarea.mjs +206 -51
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-textarea.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-toggle.mjs +134 -29
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-toggle.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-bFeO_Ift.mjs +64 -0
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-bFeO_Ift.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-shared.mjs +7 -11
- package/fesm2022/ng-forge-dynamic-forms-material-shared.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-material.mjs +241 -260
- package/fesm2022/ng-forge-dynamic-forms-material.mjs.map +1 -1
- package/package.json +2 -2
- package/types/ng-forge-dynamic-forms-material-lazy-addon-button.d.ts +17 -17
- package/types/ng-forge-dynamic-forms-material-lazy-addon-icon.d.ts +23 -16
- package/types/ng-forge-dynamic-forms-material-lazy-button.d.ts +87 -81
- package/types/ng-forge-dynamic-forms-material-lazy-checkbox.d.ts +27 -21
- package/types/ng-forge-dynamic-forms-material-lazy-datepicker.d.ts +68 -40
- package/types/ng-forge-dynamic-forms-material-lazy-input.d.ts +54 -41
- package/types/ng-forge-dynamic-forms-material-lazy-multi-checkbox.d.ts +35 -24
- package/types/ng-forge-dynamic-forms-material-lazy-radio.d.ts +30 -19
- package/types/ng-forge-dynamic-forms-material-lazy-select.d.ts +56 -38
- package/types/ng-forge-dynamic-forms-material-lazy-slider.d.ts +33 -22
- package/types/ng-forge-dynamic-forms-material-lazy-textarea.d.ts +47 -34
- package/types/ng-forge-dynamic-forms-material-lazy-toggle.d.ts +29 -23
- package/types/ng-forge-dynamic-forms-material-shared.d.ts +56 -64
- package/types/ng-forge-dynamic-forms-material.d.ts +211 -237
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-Dz2-IbBh.mjs +0 -26
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-Dz2-IbBh.mjs.map +0 -1
|
@@ -1,26 +1,37 @@
|
|
|
1
|
-
import { AsyncPipe } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import { MatButton, MatIconButton } from
|
|
5
|
-
import { MatIcon } from
|
|
6
|
-
import { MatProgressSpinner } from
|
|
7
|
-
import * as i1 from
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { AsyncPipe } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, computed } 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 { DynamicTextPipe, NgForgeAddonAction, injectNgForgeAddonAction } from "@ng-forge/dynamic-forms/integration";
|
|
9
|
+
var MatButtonAddonComponent = class MatButtonAddonComponent {
|
|
10
|
+
action = injectNgForgeAddonAction();
|
|
11
|
+
addon = this.action.addon;
|
|
12
|
+
label = computed(() => this.addon().label, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
13
|
+
ariaLabel = computed(() => this.addon().ariaLabel, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
14
|
+
isIconOnly = computed(() => {
|
|
15
|
+
const a = this.addon();
|
|
16
|
+
return !!a.icon && !a.label;
|
|
17
|
+
}, ...ngDevMode ? [{ debugName: "isIconOnly" }] : /* istanbul ignore next */ []);
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
19
|
+
minVersion: "12.0.0",
|
|
20
|
+
version: "22.2.5",
|
|
21
|
+
ngImport: i0,
|
|
22
|
+
type: MatButtonAddonComponent,
|
|
23
|
+
deps: [],
|
|
24
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
25
|
+
});
|
|
26
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
27
|
+
minVersion: "17.0.0",
|
|
28
|
+
version: "22.2.5",
|
|
29
|
+
type: MatButtonAddonComponent,
|
|
30
|
+
isStandalone: true,
|
|
31
|
+
selector: "df-mat-button-addon",
|
|
32
|
+
hostDirectives: [{ directive: i1.NgForgeAddonAction }],
|
|
33
|
+
ngImport: i0,
|
|
34
|
+
template: `
|
|
24
35
|
@if (isIconOnly()) {
|
|
25
36
|
<button
|
|
26
37
|
mat-icon-button
|
|
@@ -57,11 +68,82 @@ class MatButtonAddonComponent {
|
|
|
57
68
|
{{ label() | dynamicText | async }}
|
|
58
69
|
</button>
|
|
59
70
|
}
|
|
60
|
-
`,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
71
|
+
`,
|
|
72
|
+
isInline: true,
|
|
73
|
+
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"],
|
|
74
|
+
dependencies: [
|
|
75
|
+
{
|
|
76
|
+
kind: "component",
|
|
77
|
+
type: MatButton,
|
|
78
|
+
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] ",
|
|
79
|
+
inputs: ["matButton"],
|
|
80
|
+
exportAs: ["matButton", "matAnchor"]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
kind: "component",
|
|
84
|
+
type: MatIconButton,
|
|
85
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
86
|
+
exportAs: ["matButton", "matAnchor"]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
kind: "component",
|
|
90
|
+
type: MatIcon,
|
|
91
|
+
selector: "mat-icon",
|
|
92
|
+
inputs: [
|
|
93
|
+
"color",
|
|
94
|
+
"inline",
|
|
95
|
+
"svgIcon",
|
|
96
|
+
"fontSet",
|
|
97
|
+
"fontIcon"
|
|
98
|
+
],
|
|
99
|
+
exportAs: ["matIcon"]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
kind: "component",
|
|
103
|
+
type: MatProgressSpinner,
|
|
104
|
+
selector: "mat-progress-spinner, mat-spinner",
|
|
105
|
+
inputs: [
|
|
106
|
+
"color",
|
|
107
|
+
"mode",
|
|
108
|
+
"value",
|
|
109
|
+
"diameter",
|
|
110
|
+
"strokeWidth"
|
|
111
|
+
],
|
|
112
|
+
exportAs: ["matProgressSpinner"]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
kind: "pipe",
|
|
116
|
+
type: DynamicTextPipe,
|
|
117
|
+
name: "dynamicText"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
kind: "pipe",
|
|
121
|
+
type: AsyncPipe,
|
|
122
|
+
name: "async"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
129
|
+
minVersion: "12.0.0",
|
|
130
|
+
version: "22.2.5",
|
|
131
|
+
ngImport: i0,
|
|
132
|
+
type: MatButtonAddonComponent,
|
|
133
|
+
decorators: [{
|
|
134
|
+
type: Component,
|
|
135
|
+
args: [{
|
|
136
|
+
selector: "df-mat-button-addon",
|
|
137
|
+
imports: [
|
|
138
|
+
MatButton,
|
|
139
|
+
MatIconButton,
|
|
140
|
+
MatIcon,
|
|
141
|
+
MatProgressSpinner,
|
|
142
|
+
DynamicTextPipe,
|
|
143
|
+
AsyncPipe
|
|
144
|
+
],
|
|
145
|
+
hostDirectives: [NgForgeAddonAction],
|
|
146
|
+
template: `
|
|
65
147
|
@if (isIconOnly()) {
|
|
66
148
|
<button
|
|
67
149
|
mat-icon-button
|
|
@@ -98,9 +180,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
98
180
|
{{ label() | dynamicText | async }}
|
|
99
181
|
</button>
|
|
100
182
|
}
|
|
101
|
-
`,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
183
|
+
`,
|
|
184
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
185
|
+
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"]
|
|
186
|
+
}]
|
|
187
|
+
}]
|
|
188
|
+
});
|
|
105
189
|
export { MatButtonAddonComponent };
|
|
106
|
-
|
|
190
|
+
|
|
191
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-material-lazy-addon-button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-forge-dynamic-forms-material-lazy-addon-button.mjs","
|
|
1
|
+
{"version":3,"file":"ng-forge-dynamic-forms-material-lazy-addon-button.mjs","names":[],"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"],"mappings":";;;;;;;;AAqEA,IAAa,0BAAb,MAAa,wBAAuB;CACf,SAAS,yBAAwB;CAGjC,QAAQ,KAAK,OAAO;CAEpB,QAAQ,eAAe,KAAK,MAAK,CAAE,CAAC,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC1C,YAAY,eAAe,KAAK,MAAK,CAAE,CAAC,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAClD,aAAa,eAAc;EAC5C,MAAM,IAAI,KAAK,MAAK;EACpB,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE;CACxB,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAXS,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAuB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAvB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAuB,cAAA;EAAA,UAAA;EAAA,gBAAA,CAAA,EAAA,WAAA,GAAA,mBAAA,CAAA;EAAA,UAAA;EAAA,UAvDxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCT,UAAA;EAAA,QAAA,CAAA,gJAAA;EAAA,cAAA;GAAA;IAAA,MAAA;IAAA,MAvCS;IAAS,UAAA;IAAA,QAAA,CAAA,WAAA;IAAA,UAAA,CAAA,aAAA,WAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAa,UAAA;IAAA,UAAA,CAAA,aAAA,WAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAO,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,UAAA,CAAA,SAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAkB,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,UAAA,CAAA,oBAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAe,MAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAS,MAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAyDhF,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAuB,YAAA,CAAA;EA3DnC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAqB,SACtB;IAAC;IAAW;IAAe;IAAS;IAAoB;IAAiB;GAAS;GAAC,gBAC5E,CAAC,kBAAkB;GAAC,UAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCT,iBAgBgB,wBAAwB;GAAM,QAAA,CAAA,gJAAA;EAAA,CAAA"}
|
|
@@ -1,34 +1,113 @@
|
|
|
1
|
-
import { AsyncPipe } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import { MatIcon } from
|
|
5
|
-
import { DynamicTextPipe } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
import { AsyncPipe } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, computed, input } from "@angular/core";
|
|
4
|
+
import { MatIcon } from "@angular/material/icon";
|
|
5
|
+
import { DynamicTextPipe } from "@ng-forge/dynamic-forms/integration";
|
|
6
|
+
var MatIconAddonComponent = class MatIconAddonComponent {
|
|
7
|
+
addon = input.required(...ngDevMode ? [{ debugName: "addon" }] : /* istanbul ignore next */ []);
|
|
8
|
+
fieldInputs = input(...ngDevMode ? [void 0, { debugName: "fieldInputs" }] : /* istanbul ignore next */ []);
|
|
9
|
+
ariaLabel = computed(() => this.addon().ariaLabel, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
10
|
+
hasAriaLabel = computed(() => this.addon().ariaLabel !== void 0, ...ngDevMode ? [{ debugName: "hasAriaLabel" }] : /* istanbul ignore next */ []);
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
12
|
+
minVersion: "12.0.0",
|
|
13
|
+
version: "22.2.5",
|
|
14
|
+
ngImport: i0,
|
|
15
|
+
type: MatIconAddonComponent,
|
|
16
|
+
deps: [],
|
|
17
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
18
|
+
});
|
|
19
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
20
|
+
minVersion: "17.1.0",
|
|
21
|
+
version: "22.2.5",
|
|
22
|
+
type: MatIconAddonComponent,
|
|
23
|
+
isStandalone: true,
|
|
24
|
+
selector: "df-mat-icon-addon",
|
|
25
|
+
inputs: {
|
|
26
|
+
addon: {
|
|
27
|
+
classPropertyName: "addon",
|
|
28
|
+
publicName: "addon",
|
|
29
|
+
isSignal: true,
|
|
30
|
+
isRequired: true,
|
|
31
|
+
transformFunction: null
|
|
32
|
+
},
|
|
33
|
+
fieldInputs: {
|
|
34
|
+
classPropertyName: "fieldInputs",
|
|
35
|
+
publicName: "fieldInputs",
|
|
36
|
+
isSignal: true,
|
|
37
|
+
isRequired: false,
|
|
38
|
+
transformFunction: null
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
host: { properties: { "attr.aria-hidden": "hasAriaLabel() ? null : \"true\"" } },
|
|
42
|
+
ngImport: i0,
|
|
43
|
+
template: `<mat-icon [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null">{{ addon().icon }}</mat-icon>`,
|
|
44
|
+
isInline: true,
|
|
45
|
+
dependencies: [
|
|
46
|
+
{
|
|
47
|
+
kind: "component",
|
|
48
|
+
type: MatIcon,
|
|
49
|
+
selector: "mat-icon",
|
|
50
|
+
inputs: [
|
|
51
|
+
"color",
|
|
52
|
+
"inline",
|
|
53
|
+
"svgIcon",
|
|
54
|
+
"fontSet",
|
|
55
|
+
"fontIcon"
|
|
56
|
+
],
|
|
57
|
+
exportAs: ["matIcon"]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
kind: "pipe",
|
|
61
|
+
type: AsyncPipe,
|
|
62
|
+
name: "async"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
kind: "pipe",
|
|
66
|
+
type: DynamicTextPipe,
|
|
67
|
+
name: "dynamicText"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
74
|
+
minVersion: "12.0.0",
|
|
75
|
+
version: "22.2.5",
|
|
76
|
+
ngImport: i0,
|
|
77
|
+
type: MatIconAddonComponent,
|
|
78
|
+
decorators: [{
|
|
79
|
+
type: Component,
|
|
80
|
+
args: [{
|
|
81
|
+
selector: "df-mat-icon-addon",
|
|
82
|
+
imports: [
|
|
83
|
+
MatIcon,
|
|
84
|
+
AsyncPipe,
|
|
85
|
+
DynamicTextPipe
|
|
86
|
+
],
|
|
87
|
+
template: `<mat-icon [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null">{{ addon().icon }}</mat-icon>`,
|
|
88
|
+
host: { "[attr.aria-hidden]": "hasAriaLabel() ? null : \"true\"" },
|
|
89
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
90
|
+
}]
|
|
91
|
+
}],
|
|
92
|
+
propDecorators: {
|
|
93
|
+
addon: [{
|
|
94
|
+
type: i0.Input,
|
|
95
|
+
args: [{
|
|
96
|
+
isSignal: true,
|
|
97
|
+
alias: "addon",
|
|
98
|
+
required: true
|
|
99
|
+
}]
|
|
100
|
+
}],
|
|
101
|
+
fieldInputs: [{
|
|
102
|
+
type: i0.Input,
|
|
103
|
+
args: [{
|
|
104
|
+
isSignal: true,
|
|
105
|
+
alias: "fieldInputs",
|
|
106
|
+
required: false
|
|
107
|
+
}]
|
|
108
|
+
}]
|
|
109
|
+
}
|
|
110
|
+
});
|
|
33
111
|
export { MatIconAddonComponent };
|
|
34
|
-
|
|
112
|
+
|
|
113
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-material-lazy-addon-icon.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-forge-dynamic-forms-material-lazy-addon-icon.mjs","
|
|
1
|
+
{"version":3,"file":"ng-forge-dynamic-forms-material-lazy-addon-icon.mjs","names":[],"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"],"mappings":";;;;;AAiBA,IAAa,wBAAb,MAAa,sBAAqB;CACvB,QAAQ,MAAM,SAAwB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAEtC,cAAc,MAAuC,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAE3C,YAAY,eAAe,KAAK,MAAK,CAAE,CAAC,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAClD,eAAe,eAAe,KAAK,MAAK,CAAE,CAAC,cAAc,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CAN3E,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAqB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAArB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAqB,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,aAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA,EAAA,YAAA,EAAA,oBAAA,mCAAA,EAAA;EAAA,UAAA;EAAA,UANtB;EAAyG,UAAA;EAAA,cAAA;GAAA;IAAA,MAAA;IAAA,MADzG;IAAO,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,UAAA,CAAA,SAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAS,MAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAe,MAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAOlC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EATjC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,SAAS;IAAC;IAAS;IAAW;GAAe;GAC7C,UAAU;GACV,MAAM,EACJ,sBAAsB,mCACvB;GACD,iBAAiB,wBAAwB;EAC1C,CAAA"}
|
|
@@ -1,25 +1,42 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { MatButton } from
|
|
4
|
-
import { AsyncPipe } from
|
|
5
|
-
import * as i1 from
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input } 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 { DynamicTextPipe, NgForgeActionHost, injectNgForgeAction } from "@ng-forge/dynamic-forms/integration";
|
|
7
|
+
var MatButtonFieldComponent = class MatButtonFieldComponent {
|
|
8
|
+
action = injectNgForgeAction();
|
|
9
|
+
props = input(...ngDevMode ? [void 0, { debugName: "props" }] : /* istanbul ignore next */ []);
|
|
10
|
+
buttonType = computed(() => this.props()?.type ?? "button", ...ngDevMode ? [{ debugName: "buttonType" }] : /* istanbul ignore next */ []);
|
|
11
|
+
buttonTestId = computed(() => `${this.buttonType()}-${this.action.key()}`, ...ngDevMode ? [{ debugName: "buttonTestId" }] : /* istanbul ignore next */ []);
|
|
12
|
+
onClick() {
|
|
13
|
+
if (this.buttonType() === "submit") return;
|
|
14
|
+
this.action.dispatch();
|
|
15
|
+
}
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
17
|
+
minVersion: "12.0.0",
|
|
18
|
+
version: "22.2.5",
|
|
19
|
+
ngImport: i0,
|
|
20
|
+
type: MatButtonFieldComponent,
|
|
21
|
+
deps: [],
|
|
22
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
23
|
+
});
|
|
24
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
25
|
+
minVersion: "17.1.0",
|
|
26
|
+
version: "22.2.5",
|
|
27
|
+
type: MatButtonFieldComponent,
|
|
28
|
+
isStandalone: true,
|
|
29
|
+
selector: "df-mat-button",
|
|
30
|
+
inputs: { props: {
|
|
31
|
+
classPropertyName: "props",
|
|
32
|
+
publicName: "props",
|
|
33
|
+
isSignal: true,
|
|
34
|
+
isRequired: false,
|
|
35
|
+
transformFunction: null
|
|
36
|
+
} },
|
|
37
|
+
hostDirectives: [{ directive: i1.NgForgeActionHost }],
|
|
38
|
+
ngImport: i0,
|
|
39
|
+
template: `
|
|
23
40
|
@let buttonId = action.key() + '-button';
|
|
24
41
|
<button
|
|
25
42
|
mat-raised-button
|
|
@@ -33,11 +50,47 @@ class MatButtonFieldComponent {
|
|
|
33
50
|
>
|
|
34
51
|
{{ action.label() | dynamicText | async }}
|
|
35
52
|
</button>
|
|
36
|
-
`,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
53
|
+
`,
|
|
54
|
+
isInline: true,
|
|
55
|
+
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)}:host{--df-mat-addon-prefix-outer-padding: .75em;--df-mat-addon-prefix-inner-padding: .5em;--df-mat-addon-suffix-inner-padding: .5em;--df-mat-addon-suffix-outer-padding: .75em;--df-mat-addon-prefix-text-outer-padding: 1em;--df-mat-addon-prefix-text-inner-padding: 1em;--df-mat-addon-suffix-text-inner-padding: 1em;--df-mat-addon-suffix-text-outer-padding: 1em}df-addon-slot[matprefix]{padding-left:var(--df-mat-addon-prefix-outer-padding);padding-right:var(--df-mat-addon-prefix-inner-padding)}df-addon-slot[matsuffix]{padding-left:var(--df-mat-addon-suffix-inner-padding);padding-right:var(--df-mat-addon-suffix-outer-padding)}df-addon-slot[matprefix].df-mat-addon-text{padding-left:var(--df-mat-addon-prefix-text-outer-padding);padding-right:var(--df-mat-addon-prefix-text-inner-padding)}df-addon-slot[matsuffix].df-mat-addon-text{padding-left:var(--df-mat-addon-suffix-text-inner-padding);padding-right:var(--df-mat-addon-suffix-text-outer-padding)}\n", "button{min-width:fit-content}\n"],
|
|
56
|
+
dependencies: [
|
|
57
|
+
{
|
|
58
|
+
kind: "component",
|
|
59
|
+
type: MatButton,
|
|
60
|
+
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] ",
|
|
61
|
+
inputs: ["matButton"],
|
|
62
|
+
exportAs: ["matButton", "matAnchor"]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
kind: "pipe",
|
|
66
|
+
type: DynamicTextPipe,
|
|
67
|
+
name: "dynamicText"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
kind: "pipe",
|
|
71
|
+
type: AsyncPipe,
|
|
72
|
+
name: "async"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
79
|
+
minVersion: "12.0.0",
|
|
80
|
+
version: "22.2.5",
|
|
81
|
+
ngImport: i0,
|
|
82
|
+
type: MatButtonFieldComponent,
|
|
83
|
+
decorators: [{
|
|
84
|
+
type: Component,
|
|
85
|
+
args: [{
|
|
86
|
+
selector: "df-mat-button",
|
|
87
|
+
imports: [
|
|
88
|
+
MatButton,
|
|
89
|
+
DynamicTextPipe,
|
|
90
|
+
AsyncPipe
|
|
91
|
+
],
|
|
92
|
+
hostDirectives: [NgForgeActionHost],
|
|
93
|
+
template: `
|
|
41
94
|
@let buttonId = action.key() + '-button';
|
|
42
95
|
<button
|
|
43
96
|
mat-raised-button
|
|
@@ -51,10 +104,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
51
104
|
>
|
|
52
105
|
{{ action.label() | dynamicText | async }}
|
|
53
106
|
</button>
|
|
54
|
-
`,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
107
|
+
`,
|
|
108
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
109
|
+
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)}:host{--df-mat-addon-prefix-outer-padding: .75em;--df-mat-addon-prefix-inner-padding: .5em;--df-mat-addon-suffix-inner-padding: .5em;--df-mat-addon-suffix-outer-padding: .75em;--df-mat-addon-prefix-text-outer-padding: 1em;--df-mat-addon-prefix-text-inner-padding: 1em;--df-mat-addon-suffix-text-inner-padding: 1em;--df-mat-addon-suffix-text-outer-padding: 1em}df-addon-slot[matprefix]{padding-left:var(--df-mat-addon-prefix-outer-padding);padding-right:var(--df-mat-addon-prefix-inner-padding)}df-addon-slot[matsuffix]{padding-left:var(--df-mat-addon-suffix-inner-padding);padding-right:var(--df-mat-addon-suffix-outer-padding)}df-addon-slot[matprefix].df-mat-addon-text{padding-left:var(--df-mat-addon-prefix-text-outer-padding);padding-right:var(--df-mat-addon-prefix-text-inner-padding)}df-addon-slot[matsuffix].df-mat-addon-text{padding-left:var(--df-mat-addon-suffix-text-inner-padding);padding-right:var(--df-mat-addon-suffix-text-outer-padding)}\n", "button{min-width:fit-content}\n"]
|
|
110
|
+
}]
|
|
111
|
+
}],
|
|
112
|
+
propDecorators: { props: [{
|
|
113
|
+
type: i0.Input,
|
|
114
|
+
args: [{
|
|
115
|
+
isSignal: true,
|
|
116
|
+
alias: "props",
|
|
117
|
+
required: false
|
|
118
|
+
}]
|
|
119
|
+
}] }
|
|
120
|
+
});
|
|
59
121
|
export { MatButtonFieldComponent };
|
|
60
|
-
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-material-lazy-button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-forge-dynamic-forms-material-lazy-button.mjs","
|
|
1
|
+
{"version":3,"file":"ng-forge-dynamic-forms-material-lazy-button.mjs","names":[],"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"],"mappings":";;;;;;AAqCA,IAAqB,0BAArB,MAAqB,wBAAuB;CACvB,SAAS,oBAAmB;CAEtC,QAAQ,MAAuB,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAE/B,aAAa,eAAe,KAAK,MAAK,CAAE,EAAE,QAAQ,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAE3D,eAAe,eAAe,GAAG,KAAK,WAAU,EAAE,GAAI,KAAK,OAAO,IAAG,KAAK,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CAEnF,UAAO;EACL,IAAI,KAAK,WAAU,MAAO,UAAU;EACpC,KAAK,OAAO,SAAQ;CACtB;CAZmB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAuB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAvB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAuB,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,OAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,gBAAA,CAAA,EAAA,WAAA,GAAA,kBAAA,CAAA;EAAA,UAAA;EAAA,UAzBhC;;;;;;;;;;;;;;;EAcT,UAAA;EAAA,QAAA,CAAA,s4CAAA,iCAAA;EAAA,cAAA;GAAA;IAAA,MAAA;IAAA,MAhBS;IAAS,UAAA;IAAA,QAAA,CAAA,WAAA;IAAA,UAAA,CAAA,aAAA,WAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAe,MAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAS,MAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AA2B5B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAuB,YAAA,CAAA;EA7B3C,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAe,SAChB;IAAC;IAAW;IAAiB;GAAS;GAAC,gBAChC,CAAC,iBAAiB;GAAC,UACzB;;;;;;;;;;;;;;;GAcT,iBASgB,wBAAwB;GAAM,QAAA,CAAA,s4CAAA,iCAAA;EAAA,CAAA"}
|