@ng-forge/dynamic-forms-ionic 1.3.0-next.1 → 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/README.md +0 -2
- package/fesm2022/ng-forge-dynamic-forms-ionic-ionic-field-errors-wrapper.component-bXoq9uY6.mjs +64 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-ionic-field-errors-wrapper.component-bXoq9uY6.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-addon-button.mjs +129 -34
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-addon-button.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-addon-icon.mjs +118 -35
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-addon-icon.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-button.mjs +113 -33
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-button.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-checkbox.mjs +124 -24
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-checkbox.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-datepicker.mjs +374 -90
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-datepicker.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-input.mjs +262 -126
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-input.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-multi-checkbox.mjs +191 -64
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-multi-checkbox.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-radio.mjs +178 -27
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-radio.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-select.mjs +163 -27
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-select.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-slider.mjs +144 -27
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-slider.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-textarea.mjs +157 -45
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-textarea.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-toggle.mjs +386 -75
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-toggle.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-ionic-shared.mjs +139 -62
- package/fesm2022/ng-forge-dynamic-forms-ionic-shared.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-ionic.mjs +238 -251
- package/fesm2022/ng-forge-dynamic-forms-ionic.mjs.map +1 -1
- package/package.json +2 -3
- package/types/ng-forge-dynamic-forms-ionic-lazy-addon-button.d.ts +28 -28
- package/types/ng-forge-dynamic-forms-ionic-lazy-addon-icon.d.ts +24 -17
- package/types/ng-forge-dynamic-forms-ionic-lazy-button.d.ts +92 -86
- package/types/ng-forge-dynamic-forms-ionic-lazy-checkbox.d.ts +24 -18
- package/types/ng-forge-dynamic-forms-ionic-lazy-datepicker.d.ts +59 -34
- package/types/ng-forge-dynamic-forms-ionic-lazy-input.d.ts +69 -57
- package/types/ng-forge-dynamic-forms-ionic-lazy-multi-checkbox.d.ts +34 -23
- package/types/ng-forge-dynamic-forms-ionic-lazy-radio.d.ts +31 -20
- package/types/ng-forge-dynamic-forms-ionic-lazy-select.d.ts +37 -26
- package/types/ng-forge-dynamic-forms-ionic-lazy-slider.d.ts +53 -38
- package/types/ng-forge-dynamic-forms-ionic-lazy-textarea.d.ts +29 -23
- package/types/ng-forge-dynamic-forms-ionic-lazy-toggle.d.ts +119 -55
- package/types/ng-forge-dynamic-forms-ionic-shared.d.ts +78 -83
- package/types/ng-forge-dynamic-forms-ionic.d.ts +243 -266
- package/fesm2022/ng-forge-dynamic-forms-ionic-ionic-field-errors-wrapper.component-CN0CagvT.mjs +0 -26
- package/fesm2022/ng-forge-dynamic-forms-ionic-ionic-field-errors-wrapper.component-CN0CagvT.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -33,8 +33,6 @@ Ionic's official support policy for @ionic/angular 8 lists Angular versions up t
|
|
|
33
33
|
npm install @ng-forge/dynamic-forms @ng-forge/dynamic-forms-ionic @ionic/angular
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
> **Note:** This package includes [date-fns](https://date-fns.org/) as a dependency for datepicker formatting.
|
|
37
|
-
|
|
38
36
|
## Setup
|
|
39
37
|
|
|
40
38
|
```scss
|
package/fesm2022/ng-forge-dynamic-forms-ionic-ionic-field-errors-wrapper.component-bXoq9uY6.mjs
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { FieldErrorsWrapperBase, provideFieldErrorDisplay } from "@ng-forge/dynamic-forms/integration";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component } from "@angular/core";
|
|
4
|
+
import { IonNote } from "@ionic/angular/standalone";
|
|
5
|
+
var IonicFieldErrorsWrapperComponent = class IonicFieldErrorsWrapperComponent extends FieldErrorsWrapperBase {
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
7
|
+
minVersion: "12.0.0",
|
|
8
|
+
version: "22.2.5",
|
|
9
|
+
ngImport: i0,
|
|
10
|
+
type: IonicFieldErrorsWrapperComponent,
|
|
11
|
+
deps: null,
|
|
12
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
13
|
+
});
|
|
14
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
15
|
+
minVersion: "17.0.0",
|
|
16
|
+
version: "22.2.5",
|
|
17
|
+
type: IonicFieldErrorsWrapperComponent,
|
|
18
|
+
isStandalone: true,
|
|
19
|
+
selector: "df-ion-field-errors",
|
|
20
|
+
providers: [provideFieldErrorDisplay(() => IonicFieldErrorsWrapperComponent)],
|
|
21
|
+
usesInheritance: true,
|
|
22
|
+
ngImport: i0,
|
|
23
|
+
template: `
|
|
24
|
+
<ng-container #fieldComponent></ng-container>
|
|
25
|
+
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
26
|
+
<ion-note color="danger" class="df-ion-error" role="alert" [id]="ngf.errorId()">{{ error.message }}</ion-note>
|
|
27
|
+
}
|
|
28
|
+
`,
|
|
29
|
+
isInline: true,
|
|
30
|
+
styles: [".df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}\n"],
|
|
31
|
+
dependencies: [{
|
|
32
|
+
kind: "component",
|
|
33
|
+
type: IonNote,
|
|
34
|
+
selector: "ion-note",
|
|
35
|
+
inputs: ["color", "mode"]
|
|
36
|
+
}],
|
|
37
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
41
|
+
minVersion: "12.0.0",
|
|
42
|
+
version: "22.2.5",
|
|
43
|
+
ngImport: i0,
|
|
44
|
+
type: IonicFieldErrorsWrapperComponent,
|
|
45
|
+
decorators: [{
|
|
46
|
+
type: Component,
|
|
47
|
+
args: [{
|
|
48
|
+
selector: "df-ion-field-errors",
|
|
49
|
+
imports: [IonNote],
|
|
50
|
+
template: `
|
|
51
|
+
<ng-container #fieldComponent></ng-container>
|
|
52
|
+
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
53
|
+
<ion-note color="danger" class="df-ion-error" role="alert" [id]="ngf.errorId()">{{ error.message }}</ion-note>
|
|
54
|
+
}
|
|
55
|
+
`,
|
|
56
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
57
|
+
providers: [provideFieldErrorDisplay(() => IonicFieldErrorsWrapperComponent)],
|
|
58
|
+
styles: [".df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}\n"]
|
|
59
|
+
}]
|
|
60
|
+
}]
|
|
61
|
+
});
|
|
62
|
+
export { IonicFieldErrorsWrapperComponent, IonicFieldErrorsWrapperComponent as default };
|
|
63
|
+
|
|
64
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-ionic-ionic-field-errors-wrapper.component-bXoq9uY6.mjs.map
|
package/fesm2022/ng-forge-dynamic-forms-ionic-ionic-field-errors-wrapper.component-bXoq9uY6.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-forge-dynamic-forms-ionic-ionic-field-errors-wrapper.component-bXoq9uY6.mjs","names":[],"sources":["../../../../packages/dynamic-forms-ionic/src/lib/wrappers/field-errors/ionic-field-errors-wrapper.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { IonNote } from '@ionic/angular/standalone';\nimport { FieldErrorsWrapperBase, provideFieldErrorDisplay } from '@ng-forge/dynamic-forms/integration';\n\n/** Ionic rendering of a validation message for the wrapped field. Replaces the core default. */\n@Component({\n selector: 'df-ion-field-errors',\n imports: [IonNote],\n template: `\n <ng-container #fieldComponent></ng-container>\n @if (ngf.errorsToDisplay()[0]; as error) {\n <ion-note color=\"danger\" class=\"df-ion-error\" role=\"alert\" [id]=\"ngf.errorId()\">{{ error.message }}</ion-note>\n }\n `,\n styleUrl: './ionic-field-errors-wrapper.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [provideFieldErrorDisplay(() => IonicFieldErrorsWrapperComponent)],\n})\nexport default class IonicFieldErrorsWrapperComponent extends FieldErrorsWrapperBase {}\n\nexport { IonicFieldErrorsWrapperComponent };\n"],"mappings":";;;;AAkBA,IAAqB,mCAArB,MAAqB,yCAAyC,uBAAsB;CAA/D,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAgC,MAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAhC,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAgC,cAAA;EAAA,UAAA;EAAA,WAFxC,CAAC,+BAA+B,gCAAgC,CAAC;EAAC,iBAAA;EAAA,UAAA;EAAA,UARnE;;;;;;EAKT,UAAA;EAAA,QAAA,CAAA,2IAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MANS;GAAO,UAAA;GAAA,QAAA,CAAA,SAAA,MAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAWE,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAgC,YAAA,CAAA;EAbpD,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAqB,SACtB,CAAC,OAAO;GAAC,UACR;;;;;;GAKT,iBAEgB,wBAAwB;GAAM,WACpC,CAAC,+BAA8B,gCAAiC,CAAC;GAAC,QAAA,CAAA,2IAAA;EAAA,CAAA"}
|
|
@@ -1,27 +1,35 @@
|
|
|
1
|
-
import { AsyncPipe } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import { IonButton, IonIcon, IonSpinner } from
|
|
5
|
-
import * as i1 from
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { AsyncPipe } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, computed } from "@angular/core";
|
|
4
|
+
import { IonButton, IonIcon, IonSpinner } from "@ionic/angular/standalone";
|
|
5
|
+
import * as i1 from "@ng-forge/dynamic-forms/integration";
|
|
6
|
+
import { DynamicTextPipe, NgForgeAddonAction, injectNgForgeAddonAction } from "@ng-forge/dynamic-forms/integration";
|
|
7
|
+
var IonicButtonAddonComponent = class IonicButtonAddonComponent {
|
|
8
|
+
action = injectNgForgeAddonAction();
|
|
9
|
+
addon = this.action.addon;
|
|
10
|
+
label = computed(() => this.addon().label, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
11
|
+
ariaLabel = computed(() => this.addon().ariaLabel, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
12
|
+
icon = computed(() => this.addon().icon, ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
|
|
13
|
+
color = computed(() => this.addon().color, ...ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []);
|
|
14
|
+
fill = computed(() => this.addon().fill ?? "clear", ...ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []);
|
|
15
|
+
iconOnly = computed(() => !!this.icon() && !this.label(), ...ngDevMode ? [{ debugName: "iconOnly" }] : /* istanbul ignore next */ []);
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
17
|
+
minVersion: "12.0.0",
|
|
18
|
+
version: "22.2.5",
|
|
19
|
+
ngImport: i0,
|
|
20
|
+
type: IonicButtonAddonComponent,
|
|
21
|
+
deps: [],
|
|
22
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
23
|
+
});
|
|
24
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
25
|
+
minVersion: "17.0.0",
|
|
26
|
+
version: "22.2.5",
|
|
27
|
+
type: IonicButtonAddonComponent,
|
|
28
|
+
isStandalone: true,
|
|
29
|
+
selector: "df-ion-button-addon",
|
|
30
|
+
hostDirectives: [{ directive: i1.NgForgeAddonAction }],
|
|
31
|
+
ngImport: i0,
|
|
32
|
+
template: `
|
|
25
33
|
<ion-button
|
|
26
34
|
[attr.color]="color() ?? null"
|
|
27
35
|
[fill]="fill()"
|
|
@@ -42,11 +50,95 @@ class IonicButtonAddonComponent {
|
|
|
42
50
|
@if (action.loading()) {
|
|
43
51
|
<span class="df-ion-sr-only" role="status">Loading…</span>
|
|
44
52
|
}
|
|
45
|
-
`,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
53
|
+
`,
|
|
54
|
+
isInline: true,
|
|
55
|
+
styles: [".df-ion-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"],
|
|
56
|
+
dependencies: [
|
|
57
|
+
{
|
|
58
|
+
kind: "component",
|
|
59
|
+
type: IonButton,
|
|
60
|
+
selector: "ion-button",
|
|
61
|
+
inputs: [
|
|
62
|
+
"buttonType",
|
|
63
|
+
"color",
|
|
64
|
+
"disabled",
|
|
65
|
+
"download",
|
|
66
|
+
"expand",
|
|
67
|
+
"fill",
|
|
68
|
+
"form",
|
|
69
|
+
"href",
|
|
70
|
+
"mode",
|
|
71
|
+
"rel",
|
|
72
|
+
"routerAnimation",
|
|
73
|
+
"routerDirection",
|
|
74
|
+
"shape",
|
|
75
|
+
"size",
|
|
76
|
+
"strong",
|
|
77
|
+
"target",
|
|
78
|
+
"type"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
kind: "component",
|
|
83
|
+
type: IonIcon,
|
|
84
|
+
selector: "ion-icon",
|
|
85
|
+
inputs: [
|
|
86
|
+
"color",
|
|
87
|
+
"flipRtl",
|
|
88
|
+
"icon",
|
|
89
|
+
"ios",
|
|
90
|
+
"lazy",
|
|
91
|
+
"md",
|
|
92
|
+
"mode",
|
|
93
|
+
"name",
|
|
94
|
+
"sanitize",
|
|
95
|
+
"size",
|
|
96
|
+
"src"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
kind: "component",
|
|
101
|
+
type: IonSpinner,
|
|
102
|
+
selector: "ion-spinner",
|
|
103
|
+
inputs: [
|
|
104
|
+
"color",
|
|
105
|
+
"duration",
|
|
106
|
+
"name",
|
|
107
|
+
"paused"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
kind: "pipe",
|
|
112
|
+
type: DynamicTextPipe,
|
|
113
|
+
name: "dynamicText"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
kind: "pipe",
|
|
117
|
+
type: AsyncPipe,
|
|
118
|
+
name: "async"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
125
|
+
minVersion: "12.0.0",
|
|
126
|
+
version: "22.2.5",
|
|
127
|
+
ngImport: i0,
|
|
128
|
+
type: IonicButtonAddonComponent,
|
|
129
|
+
decorators: [{
|
|
130
|
+
type: Component,
|
|
131
|
+
args: [{
|
|
132
|
+
selector: "df-ion-button-addon",
|
|
133
|
+
imports: [
|
|
134
|
+
IonButton,
|
|
135
|
+
IonIcon,
|
|
136
|
+
IonSpinner,
|
|
137
|
+
DynamicTextPipe,
|
|
138
|
+
AsyncPipe
|
|
139
|
+
],
|
|
140
|
+
hostDirectives: [NgForgeAddonAction],
|
|
141
|
+
template: `
|
|
50
142
|
<ion-button
|
|
51
143
|
[attr.color]="color() ?? null"
|
|
52
144
|
[fill]="fill()"
|
|
@@ -67,9 +159,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
67
159
|
@if (action.loading()) {
|
|
68
160
|
<span class="df-ion-sr-only" role="status">Loading…</span>
|
|
69
161
|
}
|
|
70
|
-
`,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
162
|
+
`,
|
|
163
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
164
|
+
styles: [".df-ion-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"]
|
|
165
|
+
}]
|
|
166
|
+
}]
|
|
167
|
+
});
|
|
74
168
|
export { IonicButtonAddonComponent };
|
|
75
|
-
|
|
169
|
+
|
|
170
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-ionic-lazy-addon-button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-forge-dynamic-forms-ionic-lazy-addon-button.mjs","
|
|
1
|
+
{"version":3,"file":"ng-forge-dynamic-forms-ionic-lazy-addon-button.mjs","names":[],"sources":["../../../../packages/dynamic-forms-ionic/src/lib/addons/ion-button-addon.component.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\nimport { IonButton, IonIcon, IonSpinner } from '@ionic/angular/standalone';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport { injectNgForgeAddonAction, NgForgeAddonAction } from '@ng-forge/dynamic-forms/integration';\nimport type { IonicButtonAddon } from '@ng-forge/dynamic-forms-ionic/shared';\n\n/** Renderer for the `ion-button` addon type. */\n@Component({\n selector: 'df-ion-button-addon',\n imports: [IonButton, IonIcon, IonSpinner, DynamicTextPipe, AsyncPipe],\n hostDirectives: [NgForgeAddonAction],\n template: `\n <ion-button\n [attr.color]=\"color() ?? null\"\n [fill]=\"fill()\"\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 <ion-spinner [slot]=\"iconOnly() ? 'icon-only' : 'start'\" name=\"dots\"></ion-spinner>\n } @else if (icon(); as ic) {\n <ion-icon [name]=\"ic\" [slot]=\"iconOnly() ? 'icon-only' : 'start'\"></ion-icon>\n }\n @if (label(); as lbl) {\n {{ lbl | dynamicText | async }}\n }\n </ion-button>\n @if (action.loading()) {\n <span class=\"df-ion-sr-only\" role=\"status\">Loading…</span>\n }\n `,\n styles: [\n `\n .df-ion-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 IonicButtonAddonComponent {\n protected readonly action = injectNgForgeAddonAction<IonicButtonAddon>();\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 icon = computed(() => this.addon().icon);\n /** Default color is undefined so the button inherits the theme's text color\n * (Ionic's `medium` would force low-contrast grey, which fails WCAG on dark\n * surfaces). Consumers can still set `color: 'primary' | 'success' | ...`\n * explicitly when they want adapter-styled coloring. */\n protected readonly color = computed(() => this.addon().color);\n protected readonly fill = computed(() => this.addon().fill ?? 'clear');\n /** Icon-only when there is an icon but no label — drives the `slot` choice.\n * Truthy check on `label` mirrors Material's heuristic; empty-string label\n * is treated as \"no label\" so the button doesn't render an invisible text\n * slot beside the icon. */\n protected readonly iconOnly = computed(() => !!this.icon() && !this.label());\n}\n"],"mappings":";;;;;;AAmDA,IAAa,4BAAb,MAAa,0BAAyB;CACjB,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,OAAO,eAAe,KAAK,MAAK,CAAE,CAAC,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAKxC,QAAQ,eAAe,KAAK,MAAK,CAAE,CAAC,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC1C,OAAO,eAAe,KAAK,MAAK,CAAE,CAAC,QAAQ,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAKnD,WAAW,eAAe,CAAC,CAAC,KAAK,KAAI,KAAM,CAAC,KAAK,MAAK,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAnBjE,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAyB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAzB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAyB,cAAA;EAAA,UAAA;EAAA,gBAAA,CAAA,EAAA,WAAA,GAAA,mBAAA,CAAA;EAAA,UAAA;EAAA,UAvC1B;;;;;;;;;;;;;;;;;;;;;;EAqBT,UAAA;EAAA,QAAA,CAAA,gJAAA;EAAA,cAAA;GAAA;IAAA,MAAA;IAAA,MAvBS;IAAS,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAO,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAU,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAe,MAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAS,MAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAyCzD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAyB,YAAA,CAAA;EA3CrC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAqB,SACtB;IAAC;IAAW;IAAS;IAAY;IAAiB;GAAS;GAAC,gBACrD,CAAC,kBAAkB;GAAC,UAC1B;;;;;;;;;;;;;;;;;;;;;;GAqBT,iBAgBgB,wBAAwB;GAAM,QAAA,CAAA,gJAAA;EAAA,CAAA"}
|
|
@@ -1,36 +1,119 @@
|
|
|
1
|
-
import { AsyncPipe } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import { IonIcon } 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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
import { AsyncPipe } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, computed, input } from "@angular/core";
|
|
4
|
+
import { IonIcon } from "@ionic/angular/standalone";
|
|
5
|
+
import { DynamicTextPipe } from "@ng-forge/dynamic-forms/integration";
|
|
6
|
+
var IonicIconAddonComponent = class IonicIconAddonComponent {
|
|
7
|
+
addon = input.required(...ngDevMode ? [{ debugName: "addon" }] : /* istanbul ignore next */ []);
|
|
8
|
+
fieldInputs = input(...ngDevMode ? [void 0, { debugName: "fieldInputs" }] : /* istanbul ignore next */ []);
|
|
9
|
+
iconName = computed(() => this.addon().icon, ...ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []);
|
|
10
|
+
ariaLabel = computed(() => this.addon().ariaLabel, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
11
|
+
hasAriaLabel = computed(() => this.addon().ariaLabel !== void 0, ...ngDevMode ? [{ debugName: "hasAriaLabel" }] : /* istanbul ignore next */ []);
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
13
|
+
minVersion: "12.0.0",
|
|
14
|
+
version: "22.2.5",
|
|
15
|
+
ngImport: i0,
|
|
16
|
+
type: IonicIconAddonComponent,
|
|
17
|
+
deps: [],
|
|
18
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
19
|
+
});
|
|
20
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
21
|
+
minVersion: "17.1.0",
|
|
22
|
+
version: "22.2.5",
|
|
23
|
+
type: IonicIconAddonComponent,
|
|
24
|
+
isStandalone: true,
|
|
25
|
+
selector: "df-ion-icon-addon",
|
|
26
|
+
inputs: {
|
|
27
|
+
addon: {
|
|
28
|
+
classPropertyName: "addon",
|
|
29
|
+
publicName: "addon",
|
|
30
|
+
isSignal: true,
|
|
31
|
+
isRequired: true,
|
|
32
|
+
transformFunction: null
|
|
33
|
+
},
|
|
34
|
+
fieldInputs: {
|
|
35
|
+
classPropertyName: "fieldInputs",
|
|
36
|
+
publicName: "fieldInputs",
|
|
37
|
+
isSignal: true,
|
|
38
|
+
isRequired: false,
|
|
39
|
+
transformFunction: null
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
host: { properties: { "attr.aria-hidden": "hasAriaLabel() ? null : \"true\"" } },
|
|
43
|
+
ngImport: i0,
|
|
44
|
+
template: `<ion-icon [name]="iconName()" [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null"></ion-icon>`,
|
|
45
|
+
isInline: true,
|
|
46
|
+
dependencies: [
|
|
47
|
+
{
|
|
48
|
+
kind: "component",
|
|
49
|
+
type: IonIcon,
|
|
50
|
+
selector: "ion-icon",
|
|
51
|
+
inputs: [
|
|
52
|
+
"color",
|
|
53
|
+
"flipRtl",
|
|
54
|
+
"icon",
|
|
55
|
+
"ios",
|
|
56
|
+
"lazy",
|
|
57
|
+
"md",
|
|
58
|
+
"mode",
|
|
59
|
+
"name",
|
|
60
|
+
"sanitize",
|
|
61
|
+
"size",
|
|
62
|
+
"src"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
kind: "pipe",
|
|
67
|
+
type: AsyncPipe,
|
|
68
|
+
name: "async"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
kind: "pipe",
|
|
72
|
+
type: DynamicTextPipe,
|
|
73
|
+
name: "dynamicText"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
80
|
+
minVersion: "12.0.0",
|
|
81
|
+
version: "22.2.5",
|
|
82
|
+
ngImport: i0,
|
|
83
|
+
type: IonicIconAddonComponent,
|
|
84
|
+
decorators: [{
|
|
85
|
+
type: Component,
|
|
86
|
+
args: [{
|
|
87
|
+
selector: "df-ion-icon-addon",
|
|
88
|
+
imports: [
|
|
89
|
+
IonIcon,
|
|
90
|
+
AsyncPipe,
|
|
91
|
+
DynamicTextPipe
|
|
92
|
+
],
|
|
93
|
+
template: `<ion-icon [name]="iconName()" [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null"></ion-icon>`,
|
|
94
|
+
host: { "[attr.aria-hidden]": "hasAriaLabel() ? null : \"true\"" },
|
|
95
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
96
|
+
}]
|
|
97
|
+
}],
|
|
98
|
+
propDecorators: {
|
|
99
|
+
addon: [{
|
|
100
|
+
type: i0.Input,
|
|
101
|
+
args: [{
|
|
102
|
+
isSignal: true,
|
|
103
|
+
alias: "addon",
|
|
104
|
+
required: true
|
|
105
|
+
}]
|
|
106
|
+
}],
|
|
107
|
+
fieldInputs: [{
|
|
108
|
+
type: i0.Input,
|
|
109
|
+
args: [{
|
|
110
|
+
isSignal: true,
|
|
111
|
+
alias: "fieldInputs",
|
|
112
|
+
required: false
|
|
113
|
+
}]
|
|
114
|
+
}]
|
|
115
|
+
}
|
|
116
|
+
});
|
|
35
117
|
export { IonicIconAddonComponent };
|
|
36
|
-
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-ionic-lazy-addon-icon.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-forge-dynamic-forms-ionic-lazy-addon-icon.mjs","
|
|
1
|
+
{"version":3,"file":"ng-forge-dynamic-forms-ionic-lazy-addon-icon.mjs","names":[],"sources":["../../../../packages/dynamic-forms-ionic/src/lib/addons/ion-icon-addon.component.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { IonIcon } from '@ionic/angular/standalone';\nimport { WrapperFieldInputs } from '@ng-forge/dynamic-forms/integration';\nimport { DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport type { IonicIconAddon } from '@ng-forge/dynamic-forms-ionic/shared';\n\n/** Renderer for the `ion-icon` addon type. */\n@Component({\n selector: 'df-ion-icon-addon',\n imports: [IonIcon, AsyncPipe, DynamicTextPipe],\n template: `<ion-icon [name]=\"iconName()\" [attr.aria-label]=\"(ariaLabel() | dynamicText | async) ?? null\"></ion-icon>`,\n host: {\n '[attr.aria-hidden]': 'hasAriaLabel() ? null : \"true\"',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IonicIconAddonComponent {\n readonly addon = input.required<IonicIconAddon>();\n /** Accepted for contract uniformity — `NgComponentOutlet` setInput is strict; every type must declare it. */\n readonly fieldInputs = input<WrapperFieldInputs | undefined>();\n\n protected readonly iconName = computed(() => this.addon().icon);\n protected readonly ariaLabel = computed(() => this.addon().ariaLabel);\n protected readonly hasAriaLabel = computed(() => this.addon().ariaLabel !== undefined);\n}\n"],"mappings":";;;;;AAiBA,IAAa,0BAAb,MAAa,wBAAuB;CACzB,QAAQ,MAAM,SAA0B,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAExC,cAAc,MAAuC,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAE3C,WAAW,eAAe,KAAK,MAAK,CAAE,CAAC,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC5C,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;CAP3E,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;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,UANxB;EAA2G,UAAA;EAAA,cAAA;GAAA;IAAA,MAAA;IAAA,MAD3G;IAAO,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;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;CAAuB,YAAA,CAAA;EATnC,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 { IonButton } 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 { IonButton } from "@ionic/angular/standalone";
|
|
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 IonicButtonFieldComponent = class IonicButtonFieldComponent {
|
|
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: IonicButtonFieldComponent,
|
|
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: IonicButtonFieldComponent,
|
|
28
|
+
isStandalone: true,
|
|
29
|
+
selector: "df-ion-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
|
|
|
25
42
|
<ion-button
|
|
@@ -38,11 +55,64 @@ class IonicButtonFieldComponent {
|
|
|
38
55
|
>
|
|
39
56
|
{{ action.label() | dynamicText | async }}
|
|
40
57
|
</ion-button>
|
|
41
|
-
`,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
58
|
+
`,
|
|
59
|
+
isInline: true,
|
|
60
|
+
styles: [":host([hidden]){display:none!important}\n"],
|
|
61
|
+
dependencies: [
|
|
62
|
+
{
|
|
63
|
+
kind: "component",
|
|
64
|
+
type: IonButton,
|
|
65
|
+
selector: "ion-button",
|
|
66
|
+
inputs: [
|
|
67
|
+
"buttonType",
|
|
68
|
+
"color",
|
|
69
|
+
"disabled",
|
|
70
|
+
"download",
|
|
71
|
+
"expand",
|
|
72
|
+
"fill",
|
|
73
|
+
"form",
|
|
74
|
+
"href",
|
|
75
|
+
"mode",
|
|
76
|
+
"rel",
|
|
77
|
+
"routerAnimation",
|
|
78
|
+
"routerDirection",
|
|
79
|
+
"shape",
|
|
80
|
+
"size",
|
|
81
|
+
"strong",
|
|
82
|
+
"target",
|
|
83
|
+
"type"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
kind: "pipe",
|
|
88
|
+
type: DynamicTextPipe,
|
|
89
|
+
name: "dynamicText"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
kind: "pipe",
|
|
93
|
+
type: AsyncPipe,
|
|
94
|
+
name: "async"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
101
|
+
minVersion: "12.0.0",
|
|
102
|
+
version: "22.2.5",
|
|
103
|
+
ngImport: i0,
|
|
104
|
+
type: IonicButtonFieldComponent,
|
|
105
|
+
decorators: [{
|
|
106
|
+
type: Component,
|
|
107
|
+
args: [{
|
|
108
|
+
selector: "df-ion-button",
|
|
109
|
+
imports: [
|
|
110
|
+
IonButton,
|
|
111
|
+
DynamicTextPipe,
|
|
112
|
+
AsyncPipe
|
|
113
|
+
],
|
|
114
|
+
hostDirectives: [NgForgeActionHost],
|
|
115
|
+
template: `
|
|
46
116
|
@let buttonId = action.key() + '-button';
|
|
47
117
|
|
|
48
118
|
<ion-button
|
|
@@ -61,10 +131,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
61
131
|
>
|
|
62
132
|
{{ action.label() | dynamicText | async }}
|
|
63
133
|
</ion-button>
|
|
64
|
-
`,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
134
|
+
`,
|
|
135
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
136
|
+
styles: [":host([hidden]){display:none!important}\n"]
|
|
137
|
+
}]
|
|
138
|
+
}],
|
|
139
|
+
propDecorators: { props: [{
|
|
140
|
+
type: i0.Input,
|
|
141
|
+
args: [{
|
|
142
|
+
isSignal: true,
|
|
143
|
+
alias: "props",
|
|
144
|
+
required: false
|
|
145
|
+
}]
|
|
146
|
+
}] }
|
|
147
|
+
});
|
|
69
148
|
export { IonicButtonFieldComponent };
|
|
70
|
-
|
|
149
|
+
|
|
150
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-ionic-lazy-button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-forge-dynamic-forms-ionic-lazy-button.mjs","
|
|
1
|
+
{"version":3,"file":"ng-forge-dynamic-forms-ionic-lazy-button.mjs","names":[],"sources":["../../../../packages/dynamic-forms-ionic/src/lib/fields/button/ionic-button.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { IonButton } from '@ionic/angular/standalone';\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 { IonicButtonProps } from './ionic-button.type';\n\n@Component({\n selector: 'df-ion-button',\n imports: [IonButton, DynamicTextPipe, AsyncPipe],\n hostDirectives: [NgForgeActionHost],\n styles: [\n `\n :host([hidden]) {\n display: none !important;\n }\n `,\n ],\n template: `\n @let buttonId = action.key() + '-button';\n\n <ion-button\n [id]=\"buttonId\"\n [type]=\"buttonType()\"\n [expand]=\"props()?.expand\"\n [fill]=\"props()?.fill || 'solid'\"\n [shape]=\"props()?.shape\"\n [size]=\"props()?.size\"\n [color]=\"props()?.color || 'primary'\"\n [strong]=\"props()?.strong\"\n [disabled]=\"action.disabled()\"\n [attr.tabindex]=\"action.tabIndex()\"\n [attr.data-testid]=\"buttonTestId()\"\n (click)=\"onClick()\"\n >\n {{ action.label() | dynamicText | async }}\n </ion-button>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport default class IonicButtonFieldComponent<TEvent extends FormEvent> {\n protected readonly action = injectNgForgeAction<TEvent>();\n\n readonly props = input<IonicButtonProps>();\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":";;;;;;AAyCA,IAAqB,4BAArB,MAAqB,0BAAyB;CACzB,SAAS,oBAAmB;CAEtC,QAAQ,MAAyB,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAEjC,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;EAAyB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAzB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAyB,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,UAtBlC;;;;;;;;;;;;;;;;;;;;EAmBT,UAAA;EAAA,QAAA,CAAA,2CAAA;EAAA,cAAA;GAAA;IAAA,MAAA;IAAA,MA5BS;IAAS,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAe,MAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAS,MAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AA+B5B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAyB,YAAA,CAAA;EAjC7C,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAe,SAChB;IAAC;IAAW;IAAiB;GAAS;GAAC,gBAChC,CAAC,iBAAiB;GAAC,UAQzB;;;;;;;;;;;;;;;;;;;;GAmBT,iBACgB,wBAAwB;GAAM,QAAA,CAAA,2CAAA;EAAA,CAAA"}
|