@ng-forge/dynamic-forms-ionic 1.2.0 → 1.3.0-next.1
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.
|
@@ -1,1093 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { AsyncPipe } from '@angular/common';
|
|
5
|
-
import * as i1 from '@ng-forge/dynamic-forms/integration';
|
|
6
|
-
import { injectNgForgeAction, DynamicTextPipe, NgForgeActionHost, injectNgForgeField, NgForgeControl, NgForgeFieldHost, injectNgForgeAddons, DfAddonSlot, ADDON_PRESET_HANDLER, FIELD_SIGNAL_CONTEXT, NgForgeAddons, isEqual, NgForgeHostControl, DEFAULT_PROPS, ARRAY_CONTEXT, injectNonFieldLogicResolver, buildBaseInputs, valueFieldMapper, optionsFieldMapper, checkboxFieldMapper, submitButtonFieldMapper, nextButtonFieldMapper, previousButtonFieldMapper, addArrayItemButtonMapper, prependArrayItemButtonMapper, insertArrayItemButtonMapper, removeArrayItemButtonMapper, popArrayItemButtonMapper, shiftArrayItemButtonMapper, datepickerFieldMapper, ADDON_TYPE_DEFINITIONS, injectNgForgeAddonAction, NgForgeAddonAction } from '@ng-forge/dynamic-forms/integration';
|
|
7
|
-
import { FormField } from '@angular/forms/signals';
|
|
8
|
-
import { format } from 'date-fns';
|
|
9
|
-
import { DynamicFormLogger, DynamicFormError } from '@ng-forge/dynamic-forms';
|
|
10
|
-
import { explicitEffect } from 'ngxtension/explicit-effect';
|
|
11
|
-
import { IONIC_CONFIG, IONIC_INPUT_TYPE_OVERRIDE, IonicInlineButtonAddonComponent, runIonicPresetAction } from '@ng-forge/dynamic-forms-ionic/shared';
|
|
1
|
+
import { DEFAULT_PROPS, ARRAY_CONTEXT, injectNonFieldLogicResolver, buildBaseInputs, valueFieldMapper, optionsFieldMapper, checkboxFieldMapper, submitButtonFieldMapper, nextButtonFieldMapper, previousButtonFieldMapper, addArrayItemButtonMapper, prependArrayItemButtonMapper, insertArrayItemButtonMapper, removeArrayItemButtonMapper, popArrayItemButtonMapper, shiftArrayItemButtonMapper, datepickerFieldMapper, ADDON_TYPE_DEFINITIONS } from '@ng-forge/dynamic-forms/integration';
|
|
2
|
+
import { inject, computed, isSignal } from '@angular/core';
|
|
3
|
+
import { IONIC_CONFIG } from '@ng-forge/dynamic-forms-ionic/shared';
|
|
12
4
|
export { IONIC_CONFIG, IONIC_INPUT_TYPE_OVERRIDE } from '@ng-forge/dynamic-forms-ionic/shared';
|
|
13
|
-
|
|
14
|
-
class IonicButtonFieldComponent {
|
|
15
|
-
action = injectNgForgeAction();
|
|
16
|
-
props = input(/* @ts-ignore */
|
|
17
|
-
...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
|
|
18
|
-
buttonType = computed(() => this.props()?.type ?? 'button', /* @ts-ignore */
|
|
19
|
-
...(ngDevMode ? [{ debugName: "buttonType" }] : /* istanbul ignore next */ []));
|
|
20
|
-
buttonTestId = computed(() => `${this.buttonType()}-${this.action.key()}`, /* @ts-ignore */
|
|
21
|
-
...(ngDevMode ? [{ debugName: "buttonTestId" }] : /* istanbul ignore next */ []));
|
|
22
|
-
onClick() {
|
|
23
|
-
if (this.buttonType() === 'submit')
|
|
24
|
-
return;
|
|
25
|
-
this.action.dispatch();
|
|
26
|
-
}
|
|
27
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicButtonFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
28
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: IonicButtonFieldComponent, isStandalone: true, selector: "df-ion-button", inputs: { props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.NgForgeActionHost }], ngImport: i0, template: `
|
|
29
|
-
@let buttonId = action.key() + '-button';
|
|
30
|
-
|
|
31
|
-
<ion-button
|
|
32
|
-
[id]="buttonId"
|
|
33
|
-
[type]="buttonType()"
|
|
34
|
-
[expand]="props()?.expand"
|
|
35
|
-
[fill]="props()?.fill || 'solid'"
|
|
36
|
-
[shape]="props()?.shape"
|
|
37
|
-
[size]="props()?.size"
|
|
38
|
-
[color]="props()?.color || 'primary'"
|
|
39
|
-
[strong]="props()?.strong"
|
|
40
|
-
[disabled]="action.disabled()"
|
|
41
|
-
[attr.tabindex]="action.tabIndex()"
|
|
42
|
-
[attr.data-testid]="buttonTestId()"
|
|
43
|
-
(click)="onClick()"
|
|
44
|
-
>
|
|
45
|
-
{{ action.label() | dynamicText | async }}
|
|
46
|
-
</ion-button>
|
|
47
|
-
`, isInline: true, styles: [":host([hidden]){display:none!important}\n"], dependencies: [{ kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
48
|
-
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicButtonFieldComponent, decorators: [{
|
|
50
|
-
type: Component,
|
|
51
|
-
args: [{ selector: 'df-ion-button', imports: [IonButton, DynamicTextPipe, AsyncPipe], hostDirectives: [NgForgeActionHost], template: `
|
|
52
|
-
@let buttonId = action.key() + '-button';
|
|
53
|
-
|
|
54
|
-
<ion-button
|
|
55
|
-
[id]="buttonId"
|
|
56
|
-
[type]="buttonType()"
|
|
57
|
-
[expand]="props()?.expand"
|
|
58
|
-
[fill]="props()?.fill || 'solid'"
|
|
59
|
-
[shape]="props()?.shape"
|
|
60
|
-
[size]="props()?.size"
|
|
61
|
-
[color]="props()?.color || 'primary'"
|
|
62
|
-
[strong]="props()?.strong"
|
|
63
|
-
[disabled]="action.disabled()"
|
|
64
|
-
[attr.tabindex]="action.tabIndex()"
|
|
65
|
-
[attr.data-testid]="buttonTestId()"
|
|
66
|
-
(click)="onClick()"
|
|
67
|
-
>
|
|
68
|
-
{{ action.label() | dynamicText | async }}
|
|
69
|
-
</ion-button>
|
|
70
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host([hidden]){display:none!important}\n"] }]
|
|
71
|
-
}], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
class IonicCheckboxFieldComponent {
|
|
75
|
-
ngf = injectNgForgeField();
|
|
76
|
-
props = input(/* @ts-ignore */
|
|
77
|
-
...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
|
|
78
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicCheckboxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: IonicCheckboxFieldComponent, isStandalone: true, selector: "df-ion-checkbox", inputs: { props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.NgForgeFieldHost }], ngImport: i0, template: `
|
|
80
|
-
@let f = ngf.field();
|
|
81
|
-
@let checkboxId = ngf.key() + '-checkbox';
|
|
82
|
-
|
|
83
|
-
<ion-checkbox
|
|
84
|
-
ngForgeControl
|
|
85
|
-
[id]="checkboxId"
|
|
86
|
-
[formField]="f"
|
|
87
|
-
[labelPlacement]="props()?.labelPlacement ?? 'end'"
|
|
88
|
-
[justify]="props()?.justify"
|
|
89
|
-
[color]="props()?.color ?? 'primary'"
|
|
90
|
-
[indeterminate]="props()?.indeterminate ?? false"
|
|
91
|
-
[attr.tabindex]="ngf.tabIndex()"
|
|
92
|
-
>
|
|
93
|
-
{{ ngf.label() | dynamicText | async }}
|
|
94
|
-
</ion-checkbox>
|
|
95
|
-
|
|
96
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
97
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
98
|
-
} @else if (props()?.hint; as hint) {
|
|
99
|
-
<ion-note class="df-ion-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</ion-note>
|
|
100
|
-
}
|
|
101
|
-
`, isInline: true, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}\n"], dependencies: [{ kind: "component", type: IonCheckbox, selector: "ion-checkbox", inputs: ["checked", "color", "disabled", "errorText", "helperText", "indeterminate", "justify", "labelPlacement", "mode", "name", "value"] }, { kind: "component", type: IonNote, selector: "ion-note", inputs: ["color", "mode"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "directive", type: NgForgeControl, selector: "[ngForgeControl]", inputs: ["ngForgeControl"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
102
|
-
}
|
|
103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicCheckboxFieldComponent, decorators: [{
|
|
104
|
-
type: Component,
|
|
105
|
-
args: [{ selector: 'df-ion-checkbox', imports: [IonCheckbox, IonNote, FormField, DynamicTextPipe, AsyncPipe, NgForgeControl], hostDirectives: [NgForgeFieldHost], template: `
|
|
106
|
-
@let f = ngf.field();
|
|
107
|
-
@let checkboxId = ngf.key() + '-checkbox';
|
|
108
|
-
|
|
109
|
-
<ion-checkbox
|
|
110
|
-
ngForgeControl
|
|
111
|
-
[id]="checkboxId"
|
|
112
|
-
[formField]="f"
|
|
113
|
-
[labelPlacement]="props()?.labelPlacement ?? 'end'"
|
|
114
|
-
[justify]="props()?.justify"
|
|
115
|
-
[color]="props()?.color ?? 'primary'"
|
|
116
|
-
[indeterminate]="props()?.indeterminate ?? false"
|
|
117
|
-
[attr.tabindex]="ngf.tabIndex()"
|
|
118
|
-
>
|
|
119
|
-
{{ ngf.label() | dynamicText | async }}
|
|
120
|
-
</ion-checkbox>
|
|
121
|
-
|
|
122
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
123
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
124
|
-
} @else if (props()?.hint; as hint) {
|
|
125
|
-
<ion-note class="df-ion-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</ion-note>
|
|
126
|
-
}
|
|
127
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}\n"] }]
|
|
128
|
-
}], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
129
|
-
|
|
130
|
-
class IonicDatepickerFieldComponent {
|
|
131
|
-
ngf = injectNgForgeField();
|
|
132
|
-
minDate = input(null, /* @ts-ignore */
|
|
133
|
-
...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
|
|
134
|
-
maxDate = input(null, /* @ts-ignore */
|
|
135
|
-
...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
|
|
136
|
-
startAt = input(null, /* @ts-ignore */
|
|
137
|
-
...(ngDevMode ? [{ debugName: "startAt" }] : /* istanbul ignore next */ []));
|
|
138
|
-
props = input(/* @ts-ignore */
|
|
139
|
-
...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
|
|
140
|
-
isModalOpen = signal(false, /* @ts-ignore */
|
|
141
|
-
...(ngDevMode ? [{ debugName: "isModalOpen" }] : /* istanbul ignore next */ []));
|
|
142
|
-
openModal() {
|
|
143
|
-
this.isModalOpen.set(true);
|
|
144
|
-
}
|
|
145
|
-
closeModal() {
|
|
146
|
-
this.isModalOpen.set(false);
|
|
147
|
-
}
|
|
148
|
-
onDateChange(event) {
|
|
149
|
-
const value = event.detail.value;
|
|
150
|
-
if (value && typeof value === 'string' && value.length > 0) {
|
|
151
|
-
const date = new Date(value);
|
|
152
|
-
this.ngf.field()().value.set(date);
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
155
|
-
this.ngf.field()().value.set(null);
|
|
156
|
-
}
|
|
157
|
-
this.closeModal();
|
|
158
|
-
}
|
|
159
|
-
dateToIsoString(date) {
|
|
160
|
-
if (!date)
|
|
161
|
-
return undefined;
|
|
162
|
-
return date.toISOString();
|
|
163
|
-
}
|
|
164
|
-
formatDisplayDate(date) {
|
|
165
|
-
if (!date)
|
|
166
|
-
return '';
|
|
167
|
-
const presentation = this.props()?.presentation ?? 'date';
|
|
168
|
-
switch (presentation) {
|
|
169
|
-
case 'date':
|
|
170
|
-
return format(date, 'MMM d, yyyy');
|
|
171
|
-
case 'date-time':
|
|
172
|
-
case 'time-date':
|
|
173
|
-
return format(date, 'MMM d, yyyy, h:mm a');
|
|
174
|
-
case 'time':
|
|
175
|
-
return format(date, 'h:mm a');
|
|
176
|
-
case 'month':
|
|
177
|
-
return format(date, 'MMMM yyyy');
|
|
178
|
-
case 'month-year':
|
|
179
|
-
return format(date, 'MMM yyyy');
|
|
180
|
-
case 'year':
|
|
181
|
-
return format(date, 'yyyy');
|
|
182
|
-
default:
|
|
183
|
-
return format(date, 'MMM d, yyyy');
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicDatepickerFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
187
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: IonicDatepickerFieldComponent, isStandalone: true, selector: "df-ion-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 } }, hostDirectives: [{ directive: i1.NgForgeFieldHost }], ngImport: i0, template: `
|
|
188
|
-
@let f = ngf.field();
|
|
189
|
-
@let dateValue = f().value();
|
|
190
|
-
@let inputId = ngf.key() + '-input';
|
|
191
|
-
|
|
192
|
-
<ion-input
|
|
193
|
-
ngForgeControl
|
|
194
|
-
[id]="inputId"
|
|
195
|
-
[label]="(ngf.label() | dynamicText | async) ?? undefined"
|
|
196
|
-
[labelPlacement]="'stacked'"
|
|
197
|
-
[placeholder]="(ngf.placeholder() | dynamicText | async) ?? ''"
|
|
198
|
-
[disabled]="f().disabled()"
|
|
199
|
-
[value]="formatDisplayDate(dateValue)"
|
|
200
|
-
[readonly]="true"
|
|
201
|
-
[fill]="'outline'"
|
|
202
|
-
[attr.tabindex]="ngf.tabIndex()"
|
|
203
|
-
(click)="!f().disabled() && openModal()"
|
|
204
|
-
/>
|
|
205
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
206
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
207
|
-
} @else if (props()?.hint; as hint) {
|
|
208
|
-
<ion-note class="df-ion-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</ion-note>
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
<ion-modal [isOpen]="isModalOpen()" (didDismiss)="closeModal()">
|
|
212
|
-
<ng-template>
|
|
213
|
-
<ion-header>
|
|
214
|
-
<ion-toolbar>
|
|
215
|
-
<ion-title>{{ ngf.label() | dynamicText | async }}</ion-title>
|
|
216
|
-
<ion-buttons slot="end">
|
|
217
|
-
<ion-button (click)="closeModal()">Close</ion-button>
|
|
218
|
-
</ion-buttons>
|
|
219
|
-
</ion-toolbar>
|
|
220
|
-
</ion-header>
|
|
221
|
-
<ion-content>
|
|
222
|
-
<ion-datetime
|
|
223
|
-
[presentation]="props()?.presentation ?? 'date'"
|
|
224
|
-
[value]="dateToIsoString(dateValue)"
|
|
225
|
-
[multiple]="props()?.multiple ?? false"
|
|
226
|
-
[preferWheel]="props()?.preferWheel ?? false"
|
|
227
|
-
[showDefaultButtons]="props()?.showDefaultButtons ?? false"
|
|
228
|
-
[showDefaultTitle]="props()?.showDefaultTitle ?? false"
|
|
229
|
-
[showDefaultTimeLabel]="props()?.showDefaultTimeLabel ?? true"
|
|
230
|
-
[showClearButton]="props()?.showClearButton ?? false"
|
|
231
|
-
[color]="props()?.color"
|
|
232
|
-
[min]="dateToIsoString(minDate())"
|
|
233
|
-
[max]="dateToIsoString(maxDate())"
|
|
234
|
-
(ionChange)="onDateChange($event)"
|
|
235
|
-
>
|
|
236
|
-
</ion-datetime>
|
|
237
|
-
</ion-content>
|
|
238
|
-
</ng-template>
|
|
239
|
-
</ion-modal>
|
|
240
|
-
`, isInline: true, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", "ion-input{cursor:pointer}:host([hidden]){display:none!important}\n"], dependencies: [{ kind: "component", type: IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: IonModal, selector: "ion-modal" }, { kind: "component", type: IonDatetime, selector: "ion-datetime", inputs: ["cancelText", "clearText", "color", "dayValues", "disabled", "doneText", "firstDayOfWeek", "formatOptions", "highlightedDates", "hourCycle", "hourValues", "isDateEnabled", "locale", "max", "min", "minuteValues", "mode", "monthValues", "multiple", "name", "preferWheel", "presentation", "readonly", "showAdjacentDays", "showClearButton", "showDefaultButtons", "showDefaultTimeLabel", "showDefaultTitle", "size", "titleSelectedDatesFormatter", "value", "yearValues"] }, { kind: "component", type: IonNote, selector: "ion-note", inputs: ["color", "mode"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "component", type: IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "directive", type: NgForgeControl, selector: "[ngForgeControl]", inputs: ["ngForgeControl"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
241
|
-
}
|
|
242
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicDatepickerFieldComponent, decorators: [{
|
|
243
|
-
type: Component,
|
|
244
|
-
args: [{ selector: 'df-ion-datepicker', imports: [
|
|
245
|
-
IonInput,
|
|
246
|
-
IonModal,
|
|
247
|
-
IonDatetime,
|
|
248
|
-
IonNote,
|
|
249
|
-
IonButtons,
|
|
250
|
-
IonHeader,
|
|
251
|
-
IonContent,
|
|
252
|
-
IonToolbar,
|
|
253
|
-
IonTitle,
|
|
254
|
-
IonButton,
|
|
255
|
-
DynamicTextPipe,
|
|
256
|
-
AsyncPipe,
|
|
257
|
-
NgForgeControl,
|
|
258
|
-
], hostDirectives: [NgForgeFieldHost], template: `
|
|
259
|
-
@let f = ngf.field();
|
|
260
|
-
@let dateValue = f().value();
|
|
261
|
-
@let inputId = ngf.key() + '-input';
|
|
262
|
-
|
|
263
|
-
<ion-input
|
|
264
|
-
ngForgeControl
|
|
265
|
-
[id]="inputId"
|
|
266
|
-
[label]="(ngf.label() | dynamicText | async) ?? undefined"
|
|
267
|
-
[labelPlacement]="'stacked'"
|
|
268
|
-
[placeholder]="(ngf.placeholder() | dynamicText | async) ?? ''"
|
|
269
|
-
[disabled]="f().disabled()"
|
|
270
|
-
[value]="formatDisplayDate(dateValue)"
|
|
271
|
-
[readonly]="true"
|
|
272
|
-
[fill]="'outline'"
|
|
273
|
-
[attr.tabindex]="ngf.tabIndex()"
|
|
274
|
-
(click)="!f().disabled() && openModal()"
|
|
275
|
-
/>
|
|
276
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
277
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
278
|
-
} @else if (props()?.hint; as hint) {
|
|
279
|
-
<ion-note class="df-ion-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</ion-note>
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
<ion-modal [isOpen]="isModalOpen()" (didDismiss)="closeModal()">
|
|
283
|
-
<ng-template>
|
|
284
|
-
<ion-header>
|
|
285
|
-
<ion-toolbar>
|
|
286
|
-
<ion-title>{{ ngf.label() | dynamicText | async }}</ion-title>
|
|
287
|
-
<ion-buttons slot="end">
|
|
288
|
-
<ion-button (click)="closeModal()">Close</ion-button>
|
|
289
|
-
</ion-buttons>
|
|
290
|
-
</ion-toolbar>
|
|
291
|
-
</ion-header>
|
|
292
|
-
<ion-content>
|
|
293
|
-
<ion-datetime
|
|
294
|
-
[presentation]="props()?.presentation ?? 'date'"
|
|
295
|
-
[value]="dateToIsoString(dateValue)"
|
|
296
|
-
[multiple]="props()?.multiple ?? false"
|
|
297
|
-
[preferWheel]="props()?.preferWheel ?? false"
|
|
298
|
-
[showDefaultButtons]="props()?.showDefaultButtons ?? false"
|
|
299
|
-
[showDefaultTitle]="props()?.showDefaultTitle ?? false"
|
|
300
|
-
[showDefaultTimeLabel]="props()?.showDefaultTimeLabel ?? true"
|
|
301
|
-
[showClearButton]="props()?.showClearButton ?? false"
|
|
302
|
-
[color]="props()?.color"
|
|
303
|
-
[min]="dateToIsoString(minDate())"
|
|
304
|
-
[max]="dateToIsoString(maxDate())"
|
|
305
|
-
(ionChange)="onDateChange($event)"
|
|
306
|
-
>
|
|
307
|
-
</ion-datetime>
|
|
308
|
-
</ion-content>
|
|
309
|
-
</ng-template>
|
|
310
|
-
</ion-modal>
|
|
311
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", "ion-input{cursor:pointer}:host([hidden]){display:none!important}\n"] }]
|
|
312
|
-
}], 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 }] }] } });
|
|
313
|
-
|
|
314
|
-
class IonicInputFieldComponent {
|
|
315
|
-
elementRef = inject((ElementRef));
|
|
316
|
-
ionicConfig = inject(IONIC_CONFIG, { optional: true });
|
|
317
|
-
ngf = injectNgForgeField();
|
|
318
|
-
ngfa = injectNgForgeAddons();
|
|
319
|
-
props = input(/* @ts-ignore */
|
|
320
|
-
...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
|
|
321
|
-
fieldInputs = input(/* @ts-ignore */
|
|
322
|
-
...(ngDevMode ? [undefined, { debugName: "fieldInputs" }] : /* istanbul ignore next */ []));
|
|
323
|
-
typeOverride = inject(IONIC_INPUT_TYPE_OVERRIDE);
|
|
324
|
-
fill = computed(() => this.props()?.fill ?? this.ionicConfig?.fill ?? 'solid', /* @ts-ignore */
|
|
325
|
-
...(ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []));
|
|
326
|
-
shape = computed(() => this.props()?.shape ?? this.ionicConfig?.shape, /* @ts-ignore */
|
|
327
|
-
...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
|
|
328
|
-
labelPlacement = computed(() => this.props()?.labelPlacement ?? this.ionicConfig?.labelPlacement ?? 'stacked', /* @ts-ignore */
|
|
329
|
-
...(ngDevMode ? [{ debugName: "labelPlacement" }] : /* istanbul ignore next */ []));
|
|
330
|
-
color = computed(() => this.props()?.color ?? this.ionicConfig?.color, /* @ts-ignore */
|
|
331
|
-
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
332
|
-
type = computed(() => this.typeOverride() ?? this.props()?.type ?? 'text', /* @ts-ignore */
|
|
333
|
-
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
334
|
-
buttonPrefixAddons = computed(() => this.ngfa.prefixAddons().filter((a) => a.type === 'ion-button'), /* @ts-ignore */
|
|
335
|
-
...(ngDevMode ? [{ debugName: "buttonPrefixAddons" }] : /* istanbul ignore next */ []));
|
|
336
|
-
buttonSuffixAddons = computed(() => this.ngfa.suffixAddons().filter((a) => a.type === 'ion-button'), /* @ts-ignore */
|
|
337
|
-
...(ngDevMode ? [{ debugName: "buttonSuffixAddons" }] : /* istanbul ignore next */ []));
|
|
338
|
-
decorativePrefixAddons = computed(() => this.ngfa.prefixAddons().filter((a) => a.type !== 'ion-button'), /* @ts-ignore */
|
|
339
|
-
...(ngDevMode ? [{ debugName: "decorativePrefixAddons" }] : /* istanbul ignore next */ []));
|
|
340
|
-
decorativeSuffixAddons = computed(() => this.ngfa.suffixAddons().filter((a) => a.type !== 'ion-button'), /* @ts-ignore */
|
|
341
|
-
...(ngDevMode ? [{ debugName: "decorativeSuffixAddons" }] : /* istanbul ignore next */ []));
|
|
342
|
-
destroyed = false;
|
|
343
|
-
constructor() {
|
|
344
|
-
inject(DestroyRef).onDestroy(() => (this.destroyed = true));
|
|
345
|
-
explicitEffect([this.ngf.ariaDescribedBy], ([describedBy]) => {
|
|
346
|
-
queueMicrotask(() => {
|
|
347
|
-
if (this.destroyed)
|
|
348
|
-
return;
|
|
349
|
-
const ionInput = this.elementRef.nativeElement.querySelector('ion-input');
|
|
350
|
-
if (ionInput?.getInputElement) {
|
|
351
|
-
ionInput.getInputElement().then((inputEl) => {
|
|
352
|
-
if (this.destroyed || !inputEl)
|
|
353
|
-
return;
|
|
354
|
-
if (describedBy) {
|
|
355
|
-
inputEl.setAttribute('aria-describedby', describedBy);
|
|
356
|
-
}
|
|
357
|
-
else {
|
|
358
|
-
inputEl.removeAttribute('aria-describedby');
|
|
359
|
-
}
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
});
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicInputFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
366
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: IonicInputFieldComponent, isStandalone: true, selector: "df-ion-input", inputs: { props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, fieldInputs: { classPropertyName: "fieldInputs", publicName: "fieldInputs", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
367
|
-
{
|
|
368
|
-
provide: IONIC_INPUT_TYPE_OVERRIDE,
|
|
369
|
-
useFactory: () => signal(undefined),
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
provide: ADDON_PRESET_HANDLER,
|
|
373
|
-
useFactory: () => {
|
|
374
|
-
const typeOverride = inject(IONIC_INPUT_TYPE_OVERRIDE);
|
|
375
|
-
const fsc = inject(FIELD_SIGNAL_CONTEXT, { optional: true });
|
|
376
|
-
const logger = inject(DynamicFormLogger);
|
|
377
|
-
const host = inject(forwardRef(() => IonicInputFieldComponent));
|
|
378
|
-
return {
|
|
379
|
-
run: (preset, ctx) => {
|
|
380
|
-
const fieldKey = ctx.field.key;
|
|
381
|
-
return runIonicPresetAction(preset, ctx, {
|
|
382
|
-
typeOverride,
|
|
383
|
-
fieldValueSetter: ctx.setValue,
|
|
384
|
-
fieldDefaultValueGetter: fsc && fieldKey ? () => fsc.defaultValues()?.[fieldKey] : undefined,
|
|
385
|
-
baselineType: () => host.props()?.type,
|
|
386
|
-
logger,
|
|
387
|
-
});
|
|
388
|
-
},
|
|
389
|
-
};
|
|
390
|
-
},
|
|
391
|
-
},
|
|
392
|
-
], hostDirectives: [{ directive: i1.NgForgeFieldHost }, { directive: i1.NgForgeAddons }], ngImport: i0, template: `
|
|
393
|
-
@let f = ngf.field();
|
|
394
|
-
@let inputId = ngf.key() + '-input';
|
|
395
|
-
|
|
396
|
-
<ion-input
|
|
397
|
-
ngForgeControl
|
|
398
|
-
[id]="inputId"
|
|
399
|
-
[type]="type()"
|
|
400
|
-
[formField]="f"
|
|
401
|
-
[label]="(ngf.label() | dynamicText | async) ?? undefined"
|
|
402
|
-
[labelPlacement]="labelPlacement()"
|
|
403
|
-
[placeholder]="(ngf.placeholder() | dynamicText | async) ?? ''"
|
|
404
|
-
[clearInput]="props()?.clearInput ?? false"
|
|
405
|
-
[counter]="props()?.counter ?? false"
|
|
406
|
-
[minlength]="f().minLength?.()"
|
|
407
|
-
[maxlength]="f().maxLength?.()"
|
|
408
|
-
[color]="color()"
|
|
409
|
-
[fill]="fill()"
|
|
410
|
-
[shape]="shape()"
|
|
411
|
-
[readonly]="f().readonly()"
|
|
412
|
-
[helperText]="ngf.errorsToDisplay().length === 0 ? ((props()?.hint | dynamicText | async) ?? undefined) : undefined"
|
|
413
|
-
[attr.tabindex]="ngf.tabIndex()"
|
|
414
|
-
>
|
|
415
|
-
@for (a of decorativePrefixAddons(); track $index) {
|
|
416
|
-
<span slot="start">
|
|
417
|
-
<df-addon-slot [addon]="a" [fieldInputs]="fieldInputs()" [hidden]="ngfa.hiddenSignalCache().get(a)" />
|
|
418
|
-
</span>
|
|
419
|
-
}
|
|
420
|
-
@for (a of buttonPrefixAddons(); track $index) {
|
|
421
|
-
<ion-button df-ion-button-addon slot="start" [addon]="a" [fieldInputs]="fieldInputs()"></ion-button>
|
|
422
|
-
}
|
|
423
|
-
@for (a of buttonSuffixAddons(); track $index) {
|
|
424
|
-
<ion-button df-ion-button-addon slot="end" [addon]="a" [fieldInputs]="fieldInputs()"></ion-button>
|
|
425
|
-
}
|
|
426
|
-
@for (a of decorativeSuffixAddons(); track $index) {
|
|
427
|
-
<span slot="end">
|
|
428
|
-
<df-addon-slot [addon]="a" [fieldInputs]="fieldInputs()" [hidden]="ngfa.hiddenSignalCache().get(a)" />
|
|
429
|
-
</span>
|
|
430
|
-
}
|
|
431
|
-
</ion-input>
|
|
432
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
433
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
434
|
-
}
|
|
435
|
-
`, isInline: true, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}:host{--df-ion-addon-prefix-outer-padding: 0;--df-ion-addon-prefix-inner-padding: .5rem;--df-ion-addon-suffix-inner-padding: .5rem;--df-ion-addon-suffix-outer-padding: 0}:host ::ng-deep ion-input [slot=start],:host ::ng-deep ion-input [slot=end]{display:inline-flex;align-items:center;align-self:center;line-height:1}:host ::ng-deep ion-input [slot=start] df-addon-slot,:host ::ng-deep ion-input [slot=end] df-addon-slot,:host ::ng-deep ion-input [slot=start] df-ion-icon-addon,:host ::ng-deep ion-input [slot=end] df-ion-icon-addon{display:inline-flex;align-items:center;line-height:1}:host ::ng-deep ion-input [slot=start]{padding-inline-start:var(--df-ion-addon-prefix-outer-padding);padding-inline-end:var(--df-ion-addon-prefix-inner-padding)}:host ::ng-deep ion-input [slot=end]{padding-inline-start:var(--df-ion-addon-suffix-inner-padding);padding-inline-end:var(--df-ion-addon-suffix-outer-padding)}:host ::ng-deep ion-input ion-icon{color:inherit}\n"], dependencies: [{ kind: "component", type: IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: IonNote, selector: "ion-note", inputs: ["color", "mode"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "directive", type: NgForgeControl, selector: "[ngForgeControl]", inputs: ["ngForgeControl"] }, { kind: "component", type: DfAddonSlot, selector: "df-addon-slot", inputs: ["addon", "fieldInputs", "hidden"] }, { kind: "component", type: IonicInlineButtonAddonComponent, selector: "ion-button[df-ion-button-addon]" }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
436
|
-
}
|
|
437
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicInputFieldComponent, decorators: [{
|
|
438
|
-
type: Component,
|
|
439
|
-
args: [{ selector: 'df-ion-input', imports: [IonInput, IonNote, FormField, DynamicTextPipe, AsyncPipe, NgForgeControl, DfAddonSlot, IonicInlineButtonAddonComponent], hostDirectives: [NgForgeFieldHost, NgForgeAddons], template: `
|
|
440
|
-
@let f = ngf.field();
|
|
441
|
-
@let inputId = ngf.key() + '-input';
|
|
442
|
-
|
|
443
|
-
<ion-input
|
|
444
|
-
ngForgeControl
|
|
445
|
-
[id]="inputId"
|
|
446
|
-
[type]="type()"
|
|
447
|
-
[formField]="f"
|
|
448
|
-
[label]="(ngf.label() | dynamicText | async) ?? undefined"
|
|
449
|
-
[labelPlacement]="labelPlacement()"
|
|
450
|
-
[placeholder]="(ngf.placeholder() | dynamicText | async) ?? ''"
|
|
451
|
-
[clearInput]="props()?.clearInput ?? false"
|
|
452
|
-
[counter]="props()?.counter ?? false"
|
|
453
|
-
[minlength]="f().minLength?.()"
|
|
454
|
-
[maxlength]="f().maxLength?.()"
|
|
455
|
-
[color]="color()"
|
|
456
|
-
[fill]="fill()"
|
|
457
|
-
[shape]="shape()"
|
|
458
|
-
[readonly]="f().readonly()"
|
|
459
|
-
[helperText]="ngf.errorsToDisplay().length === 0 ? ((props()?.hint | dynamicText | async) ?? undefined) : undefined"
|
|
460
|
-
[attr.tabindex]="ngf.tabIndex()"
|
|
461
|
-
>
|
|
462
|
-
@for (a of decorativePrefixAddons(); track $index) {
|
|
463
|
-
<span slot="start">
|
|
464
|
-
<df-addon-slot [addon]="a" [fieldInputs]="fieldInputs()" [hidden]="ngfa.hiddenSignalCache().get(a)" />
|
|
465
|
-
</span>
|
|
466
|
-
}
|
|
467
|
-
@for (a of buttonPrefixAddons(); track $index) {
|
|
468
|
-
<ion-button df-ion-button-addon slot="start" [addon]="a" [fieldInputs]="fieldInputs()"></ion-button>
|
|
469
|
-
}
|
|
470
|
-
@for (a of buttonSuffixAddons(); track $index) {
|
|
471
|
-
<ion-button df-ion-button-addon slot="end" [addon]="a" [fieldInputs]="fieldInputs()"></ion-button>
|
|
472
|
-
}
|
|
473
|
-
@for (a of decorativeSuffixAddons(); track $index) {
|
|
474
|
-
<span slot="end">
|
|
475
|
-
<df-addon-slot [addon]="a" [fieldInputs]="fieldInputs()" [hidden]="ngfa.hiddenSignalCache().get(a)" />
|
|
476
|
-
</span>
|
|
477
|
-
}
|
|
478
|
-
</ion-input>
|
|
479
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
480
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
481
|
-
}
|
|
482
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
483
|
-
{
|
|
484
|
-
provide: IONIC_INPUT_TYPE_OVERRIDE,
|
|
485
|
-
useFactory: () => signal(undefined),
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
provide: ADDON_PRESET_HANDLER,
|
|
489
|
-
useFactory: () => {
|
|
490
|
-
const typeOverride = inject(IONIC_INPUT_TYPE_OVERRIDE);
|
|
491
|
-
const fsc = inject(FIELD_SIGNAL_CONTEXT, { optional: true });
|
|
492
|
-
const logger = inject(DynamicFormLogger);
|
|
493
|
-
const host = inject(forwardRef(() => IonicInputFieldComponent));
|
|
494
|
-
return {
|
|
495
|
-
run: (preset, ctx) => {
|
|
496
|
-
const fieldKey = ctx.field.key;
|
|
497
|
-
return runIonicPresetAction(preset, ctx, {
|
|
498
|
-
typeOverride,
|
|
499
|
-
fieldValueSetter: ctx.setValue,
|
|
500
|
-
fieldDefaultValueGetter: fsc && fieldKey ? () => fsc.defaultValues()?.[fieldKey] : undefined,
|
|
501
|
-
baselineType: () => host.props()?.type,
|
|
502
|
-
logger,
|
|
503
|
-
});
|
|
504
|
-
},
|
|
505
|
-
};
|
|
506
|
-
},
|
|
507
|
-
},
|
|
508
|
-
], styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}:host{--df-ion-addon-prefix-outer-padding: 0;--df-ion-addon-prefix-inner-padding: .5rem;--df-ion-addon-suffix-inner-padding: .5rem;--df-ion-addon-suffix-outer-padding: 0}:host ::ng-deep ion-input [slot=start],:host ::ng-deep ion-input [slot=end]{display:inline-flex;align-items:center;align-self:center;line-height:1}:host ::ng-deep ion-input [slot=start] df-addon-slot,:host ::ng-deep ion-input [slot=end] df-addon-slot,:host ::ng-deep ion-input [slot=start] df-ion-icon-addon,:host ::ng-deep ion-input [slot=end] df-ion-icon-addon{display:inline-flex;align-items:center;line-height:1}:host ::ng-deep ion-input [slot=start]{padding-inline-start:var(--df-ion-addon-prefix-outer-padding);padding-inline-end:var(--df-ion-addon-prefix-inner-padding)}:host ::ng-deep ion-input [slot=end]{padding-inline-start:var(--df-ion-addon-suffix-inner-padding);padding-inline-end:var(--df-ion-addon-suffix-outer-padding)}:host ::ng-deep ion-input ion-icon{color:inherit}\n"] }]
|
|
509
|
-
}], ctorParameters: () => [], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], fieldInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldInputs", required: false }] }] } });
|
|
510
|
-
|
|
511
|
-
class IonicMultiCheckboxFieldComponent {
|
|
512
|
-
ngf = injectNgForgeField();
|
|
513
|
-
options = input([], /* @ts-ignore */
|
|
514
|
-
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
515
|
-
props = input(/* @ts-ignore */
|
|
516
|
-
...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
|
|
517
|
-
valueViewModel = linkedSignal(() => {
|
|
518
|
-
const currentValues = this.ngf.field()().value();
|
|
519
|
-
return this.options().filter((option) => currentValues.includes(option.value));
|
|
520
|
-
}, { ...(ngDevMode ? { debugName: "valueViewModel" } : /* istanbul ignore next */ {}), equal: isEqual });
|
|
521
|
-
checkedValuesMap = computed(() => {
|
|
522
|
-
const map = {};
|
|
523
|
-
for (const opt of this.valueViewModel()) {
|
|
524
|
-
map[String(opt.value)] = true;
|
|
525
|
-
}
|
|
526
|
-
return map;
|
|
527
|
-
}, /* @ts-ignore */
|
|
528
|
-
...(ngDevMode ? [{ debugName: "checkedValuesMap" }] : /* istanbul ignore next */ []));
|
|
529
|
-
constructor() {
|
|
530
|
-
explicitEffect([this.valueViewModel], ([selectedOptions]) => {
|
|
531
|
-
const selectedValues = selectedOptions.map((option) => option.value);
|
|
532
|
-
if (!isEqual(selectedValues, this.ngf.field()().value())) {
|
|
533
|
-
this.ngf.field()().value.set(selectedValues);
|
|
534
|
-
}
|
|
535
|
-
});
|
|
536
|
-
explicitEffect([this.options], ([options]) => {
|
|
537
|
-
const values = options.map((option) => option.value);
|
|
538
|
-
const uniqueValues = new Set(values);
|
|
539
|
-
if (values.length !== uniqueValues.size) {
|
|
540
|
-
const duplicates = values.filter((value, index) => values.indexOf(value) !== index);
|
|
541
|
-
throw new Error(`Duplicate option values detected in ionic-multi-checkbox: ${duplicates.join(', ')}`);
|
|
542
|
-
}
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
|
-
onCheckboxChange(option, checked) {
|
|
546
|
-
this.valueViewModel.update((currentOptions) => {
|
|
547
|
-
if (checked) {
|
|
548
|
-
return currentOptions.some((opt) => opt.value === option.value) ? currentOptions : [...currentOptions, option];
|
|
549
|
-
}
|
|
550
|
-
else {
|
|
551
|
-
return currentOptions.filter((opt) => opt.value !== option.value);
|
|
552
|
-
}
|
|
553
|
-
});
|
|
554
|
-
}
|
|
555
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicMultiCheckboxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
556
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: IonicMultiCheckboxFieldComponent, isStandalone: true, selector: "df-ion-multi-checkbox", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.NgForgeFieldHost }], ngImport: i0, template: `
|
|
557
|
-
@let f = ngf.field();
|
|
558
|
-
@let checked = checkedValuesMap();
|
|
559
|
-
@if (ngf.label(); as label) {
|
|
560
|
-
<div class="checkbox-group-label">{{ label | dynamicText | async }}</div>
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
<div
|
|
564
|
-
class="checkbox-group"
|
|
565
|
-
role="group"
|
|
566
|
-
[attr.aria-invalid]="ngf.ariaInvalid()"
|
|
567
|
-
[attr.aria-required]="ngf.ariaRequired()"
|
|
568
|
-
[attr.aria-describedby]="ngf.ariaDescribedBy()"
|
|
569
|
-
[class.ion-invalid]="ngf.showErrors()"
|
|
570
|
-
[class.ion-touched]="f().touched()"
|
|
571
|
-
>
|
|
572
|
-
@for (option of options(); track option.value) {
|
|
573
|
-
<ion-item lines="none">
|
|
574
|
-
<ion-checkbox
|
|
575
|
-
ngForgeControl
|
|
576
|
-
[checked]="checked['' + option.value]"
|
|
577
|
-
[disabled]="f().disabled() || option.disabled"
|
|
578
|
-
[labelPlacement]="props()?.labelPlacement ?? 'end'"
|
|
579
|
-
[justify]="props()?.justify ?? 'start'"
|
|
580
|
-
[color]="props()?.color ?? 'primary'"
|
|
581
|
-
(ionChange)="onCheckboxChange(option, $event.detail.checked)"
|
|
582
|
-
>
|
|
583
|
-
{{ option.label | dynamicText | async }}
|
|
584
|
-
</ion-checkbox>
|
|
585
|
-
</ion-item>
|
|
586
|
-
}
|
|
587
|
-
</div>
|
|
588
|
-
|
|
589
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
590
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
591
|
-
} @else if (props()?.hint; as hint) {
|
|
592
|
-
<ion-note class="df-ion-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</ion-note>
|
|
593
|
-
}
|
|
594
|
-
`, isInline: true, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}.checkbox-group-label{margin-bottom:8px;font-weight:500}.checkbox-group{display:flex;flex-direction:column;gap:4px}ion-item{--padding-start: 0;--inner-padding-end: 0}\n"], dependencies: [{ kind: "component", type: IonCheckbox, selector: "ion-checkbox", inputs: ["checked", "color", "disabled", "errorText", "helperText", "indeterminate", "justify", "labelPlacement", "mode", "name", "value"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonNote, selector: "ion-note", inputs: ["color", "mode"] }, { kind: "directive", type: NgForgeControl, selector: "[ngForgeControl]", inputs: ["ngForgeControl"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
595
|
-
}
|
|
596
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicMultiCheckboxFieldComponent, decorators: [{
|
|
597
|
-
type: Component,
|
|
598
|
-
args: [{ selector: 'df-ion-multi-checkbox', imports: [IonCheckbox, IonItem, IonNote, DynamicTextPipe, AsyncPipe, NgForgeControl], hostDirectives: [NgForgeFieldHost], template: `
|
|
599
|
-
@let f = ngf.field();
|
|
600
|
-
@let checked = checkedValuesMap();
|
|
601
|
-
@if (ngf.label(); as label) {
|
|
602
|
-
<div class="checkbox-group-label">{{ label | dynamicText | async }}</div>
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
<div
|
|
606
|
-
class="checkbox-group"
|
|
607
|
-
role="group"
|
|
608
|
-
[attr.aria-invalid]="ngf.ariaInvalid()"
|
|
609
|
-
[attr.aria-required]="ngf.ariaRequired()"
|
|
610
|
-
[attr.aria-describedby]="ngf.ariaDescribedBy()"
|
|
611
|
-
[class.ion-invalid]="ngf.showErrors()"
|
|
612
|
-
[class.ion-touched]="f().touched()"
|
|
613
|
-
>
|
|
614
|
-
@for (option of options(); track option.value) {
|
|
615
|
-
<ion-item lines="none">
|
|
616
|
-
<ion-checkbox
|
|
617
|
-
ngForgeControl
|
|
618
|
-
[checked]="checked['' + option.value]"
|
|
619
|
-
[disabled]="f().disabled() || option.disabled"
|
|
620
|
-
[labelPlacement]="props()?.labelPlacement ?? 'end'"
|
|
621
|
-
[justify]="props()?.justify ?? 'start'"
|
|
622
|
-
[color]="props()?.color ?? 'primary'"
|
|
623
|
-
(ionChange)="onCheckboxChange(option, $event.detail.checked)"
|
|
624
|
-
>
|
|
625
|
-
{{ option.label | dynamicText | async }}
|
|
626
|
-
</ion-checkbox>
|
|
627
|
-
</ion-item>
|
|
628
|
-
}
|
|
629
|
-
</div>
|
|
630
|
-
|
|
631
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
632
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
633
|
-
} @else if (props()?.hint; as hint) {
|
|
634
|
-
<ion-note class="df-ion-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</ion-note>
|
|
635
|
-
}
|
|
636
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}.checkbox-group-label{margin-bottom:8px;font-weight:500}.checkbox-group{display:flex;flex-direction:column;gap:4px}ion-item{--padding-start: 0;--inner-padding-end: 0}\n"] }]
|
|
637
|
-
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
638
|
-
|
|
639
|
-
class IonicRadioFieldComponent {
|
|
640
|
-
ngf = injectNgForgeField();
|
|
641
|
-
options = input([], /* @ts-ignore */
|
|
642
|
-
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
643
|
-
props = input(/* @ts-ignore */
|
|
644
|
-
...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
|
|
645
|
-
defaultCompare = Object.is;
|
|
646
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicRadioFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
647
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: IonicRadioFieldComponent, isStandalone: true, selector: "df-ion-radio", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.NgForgeFieldHost }], ngImport: i0, template: `
|
|
648
|
-
@let f = ngf.field();
|
|
649
|
-
@let radioGroupId = ngf.key() + '-radio-group';
|
|
650
|
-
@if (ngf.label(); as label) {
|
|
651
|
-
<div class="radio-label">{{ label | dynamicText | async }}</div>
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
<ion-radio-group
|
|
655
|
-
[id]="radioGroupId"
|
|
656
|
-
[formField]="f"
|
|
657
|
-
[compareWith]="props()?.compareWith || defaultCompare"
|
|
658
|
-
[attr.aria-invalid]="ngf.ariaInvalid()"
|
|
659
|
-
[attr.aria-required]="ngf.ariaRequired()"
|
|
660
|
-
[attr.aria-describedby]="ngf.ariaDescribedBy()"
|
|
661
|
-
>
|
|
662
|
-
@for (option of options(); track option.value) {
|
|
663
|
-
<ion-item [lines]="'none'">
|
|
664
|
-
<ion-radio
|
|
665
|
-
ngForgeControl
|
|
666
|
-
[value]="option.value"
|
|
667
|
-
[disabled]="option.disabled || false"
|
|
668
|
-
[labelPlacement]="props()?.labelPlacement ?? 'end'"
|
|
669
|
-
[justify]="props()?.justify"
|
|
670
|
-
[color]="props()?.color ?? 'primary'"
|
|
671
|
-
>
|
|
672
|
-
{{ option.label | dynamicText | async }}
|
|
673
|
-
</ion-radio>
|
|
674
|
-
</ion-item>
|
|
675
|
-
}
|
|
676
|
-
</ion-radio-group>
|
|
677
|
-
|
|
678
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
679
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
680
|
-
} @else if (props()?.hint; as hint) {
|
|
681
|
-
<ion-note class="df-ion-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</ion-note>
|
|
682
|
-
}
|
|
683
|
-
`, isInline: true, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}.radio-label{font-size:.875rem;font-weight:500;margin-bottom:.5rem;color:var(--ion-text-color)}\n"], dependencies: [{ kind: "component", type: IonRadioGroup, selector: "ion-radio-group", inputs: ["allowEmptySelection", "compareWith", "errorText", "helperText", "name", "value"] }, { kind: "component", type: IonRadio, selector: "ion-radio", inputs: ["alignment", "color", "disabled", "justify", "labelPlacement", "mode", "name", "value"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonNote, selector: "ion-note", inputs: ["color", "mode"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "directive", type: NgForgeControl, selector: "[ngForgeControl]", inputs: ["ngForgeControl"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
684
|
-
}
|
|
685
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicRadioFieldComponent, decorators: [{
|
|
686
|
-
type: Component,
|
|
687
|
-
args: [{ selector: 'df-ion-radio', imports: [IonRadioGroup, IonRadio, IonItem, IonNote, FormField, DynamicTextPipe, AsyncPipe, NgForgeControl], hostDirectives: [NgForgeFieldHost], template: `
|
|
688
|
-
@let f = ngf.field();
|
|
689
|
-
@let radioGroupId = ngf.key() + '-radio-group';
|
|
690
|
-
@if (ngf.label(); as label) {
|
|
691
|
-
<div class="radio-label">{{ label | dynamicText | async }}</div>
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
<ion-radio-group
|
|
695
|
-
[id]="radioGroupId"
|
|
696
|
-
[formField]="f"
|
|
697
|
-
[compareWith]="props()?.compareWith || defaultCompare"
|
|
698
|
-
[attr.aria-invalid]="ngf.ariaInvalid()"
|
|
699
|
-
[attr.aria-required]="ngf.ariaRequired()"
|
|
700
|
-
[attr.aria-describedby]="ngf.ariaDescribedBy()"
|
|
701
|
-
>
|
|
702
|
-
@for (option of options(); track option.value) {
|
|
703
|
-
<ion-item [lines]="'none'">
|
|
704
|
-
<ion-radio
|
|
705
|
-
ngForgeControl
|
|
706
|
-
[value]="option.value"
|
|
707
|
-
[disabled]="option.disabled || false"
|
|
708
|
-
[labelPlacement]="props()?.labelPlacement ?? 'end'"
|
|
709
|
-
[justify]="props()?.justify"
|
|
710
|
-
[color]="props()?.color ?? 'primary'"
|
|
711
|
-
>
|
|
712
|
-
{{ option.label | dynamicText | async }}
|
|
713
|
-
</ion-radio>
|
|
714
|
-
</ion-item>
|
|
715
|
-
}
|
|
716
|
-
</ion-radio-group>
|
|
717
|
-
|
|
718
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
719
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
720
|
-
} @else if (props()?.hint; as hint) {
|
|
721
|
-
<ion-note class="df-ion-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</ion-note>
|
|
722
|
-
}
|
|
723
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}.radio-label{font-size:.875rem;font-weight:500;margin-bottom:.5rem;color:var(--ion-text-color)}\n"] }]
|
|
724
|
-
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
725
|
-
|
|
726
|
-
class IonicSelectFieldComponent {
|
|
727
|
-
ngf = injectNgForgeField();
|
|
728
|
-
options = input([], /* @ts-ignore */
|
|
729
|
-
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
730
|
-
props = input(/* @ts-ignore */
|
|
731
|
-
...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
|
|
732
|
-
defaultCompare = Object.is;
|
|
733
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicSelectFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
734
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: IonicSelectFieldComponent, isStandalone: true, selector: "df-ion-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.NgForgeFieldHost }], ngImport: i0, template: `
|
|
735
|
-
@let f = ngf.field();
|
|
736
|
-
@let selectId = ngf.key() + '-select';
|
|
737
|
-
|
|
738
|
-
<ion-select
|
|
739
|
-
ngForgeControl
|
|
740
|
-
[id]="selectId"
|
|
741
|
-
[formField]="f"
|
|
742
|
-
[label]="(ngf.label() | dynamicText | async) ?? undefined"
|
|
743
|
-
[labelPlacement]="props()?.labelPlacement ?? 'stacked'"
|
|
744
|
-
[placeholder]="(ngf.placeholder() | dynamicText | async) ?? ''"
|
|
745
|
-
[multiple]="props()?.multiple ?? false"
|
|
746
|
-
[compareWith]="props()?.compareWith ?? defaultCompare"
|
|
747
|
-
[interface]="props()?.interface ?? 'alert'"
|
|
748
|
-
[interfaceOptions]="props()?.interfaceOptions ?? {}"
|
|
749
|
-
[cancelText]="props()?.cancelText ?? 'Cancel'"
|
|
750
|
-
[okText]="props()?.okText ?? 'OK'"
|
|
751
|
-
[color]="props()?.color"
|
|
752
|
-
[fill]="props()?.fill ?? 'outline'"
|
|
753
|
-
[shape]="props()?.shape"
|
|
754
|
-
[attr.tabindex]="ngf.tabIndex()"
|
|
755
|
-
>
|
|
756
|
-
@for (option of options(); track option.value) {
|
|
757
|
-
<ion-select-option [value]="option.value" [disabled]="option.disabled || false">
|
|
758
|
-
{{ option.label | dynamicText | async }}
|
|
759
|
-
</ion-select-option>
|
|
760
|
-
}
|
|
761
|
-
</ion-select>
|
|
762
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
763
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
764
|
-
} @else if (props()?.hint; as hint) {
|
|
765
|
-
<ion-note class="df-ion-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</ion-note>
|
|
766
|
-
}
|
|
767
|
-
`, isInline: true, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}\n"], dependencies: [{ kind: "component", type: IonSelect, selector: "ion-select", inputs: ["cancelText", "color", "compareWith", "disabled", "errorText", "expandedIcon", "fill", "helperText", "interface", "interfaceOptions", "justify", "label", "labelPlacement", "mode", "multiple", "name", "okText", "placeholder", "selectedText", "shape", "toggleIcon", "value"] }, { kind: "component", type: IonSelectOption, selector: "ion-select-option", inputs: ["disabled", "value"] }, { kind: "component", type: IonNote, selector: "ion-note", inputs: ["color", "mode"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "directive", type: NgForgeControl, selector: "[ngForgeControl]", inputs: ["ngForgeControl"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
768
|
-
}
|
|
769
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicSelectFieldComponent, decorators: [{
|
|
770
|
-
type: Component,
|
|
771
|
-
args: [{ selector: 'df-ion-select', imports: [IonSelect, IonSelectOption, IonNote, FormField, DynamicTextPipe, AsyncPipe, NgForgeControl], hostDirectives: [NgForgeFieldHost], template: `
|
|
772
|
-
@let f = ngf.field();
|
|
773
|
-
@let selectId = ngf.key() + '-select';
|
|
774
|
-
|
|
775
|
-
<ion-select
|
|
776
|
-
ngForgeControl
|
|
777
|
-
[id]="selectId"
|
|
778
|
-
[formField]="f"
|
|
779
|
-
[label]="(ngf.label() | dynamicText | async) ?? undefined"
|
|
780
|
-
[labelPlacement]="props()?.labelPlacement ?? 'stacked'"
|
|
781
|
-
[placeholder]="(ngf.placeholder() | dynamicText | async) ?? ''"
|
|
782
|
-
[multiple]="props()?.multiple ?? false"
|
|
783
|
-
[compareWith]="props()?.compareWith ?? defaultCompare"
|
|
784
|
-
[interface]="props()?.interface ?? 'alert'"
|
|
785
|
-
[interfaceOptions]="props()?.interfaceOptions ?? {}"
|
|
786
|
-
[cancelText]="props()?.cancelText ?? 'Cancel'"
|
|
787
|
-
[okText]="props()?.okText ?? 'OK'"
|
|
788
|
-
[color]="props()?.color"
|
|
789
|
-
[fill]="props()?.fill ?? 'outline'"
|
|
790
|
-
[shape]="props()?.shape"
|
|
791
|
-
[attr.tabindex]="ngf.tabIndex()"
|
|
792
|
-
>
|
|
793
|
-
@for (option of options(); track option.value) {
|
|
794
|
-
<ion-select-option [value]="option.value" [disabled]="option.disabled || false">
|
|
795
|
-
{{ option.label | dynamicText | async }}
|
|
796
|
-
</ion-select-option>
|
|
797
|
-
}
|
|
798
|
-
</ion-select>
|
|
799
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
800
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
801
|
-
} @else if (props()?.hint; as hint) {
|
|
802
|
-
<ion-note class="df-ion-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</ion-note>
|
|
803
|
-
}
|
|
804
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}\n"] }]
|
|
805
|
-
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
806
|
-
|
|
807
|
-
class IonicSliderFieldComponent {
|
|
808
|
-
ngf = injectNgForgeField();
|
|
809
|
-
step = input(/* @ts-ignore */
|
|
810
|
-
...(ngDevMode ? [undefined, { debugName: "step" }] : /* istanbul ignore next */ []));
|
|
811
|
-
props = input(/* @ts-ignore */
|
|
812
|
-
...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
|
|
813
|
-
defaultPinFormatter = (value) => String(value);
|
|
814
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicSliderFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
815
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: IonicSliderFieldComponent, isStandalone: true, selector: "df-ion-slider", inputs: { step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.NgForgeFieldHost }, { directive: i1.NgForgeHostControl }], ngImport: i0, template: `
|
|
816
|
-
@let f = ngf.field();
|
|
817
|
-
@let inputId = ngf.key() + '-input';
|
|
818
|
-
|
|
819
|
-
<ion-range
|
|
820
|
-
[id]="inputId"
|
|
821
|
-
[formField]="f"
|
|
822
|
-
[label]="(ngf.label() | dynamicText | async) ?? undefined"
|
|
823
|
-
[labelPlacement]="props()?.labelPlacement ?? 'stacked'"
|
|
824
|
-
[min]="f().min?.() ?? props()?.min ?? 0"
|
|
825
|
-
[max]="f().max?.() ?? props()?.max ?? 100"
|
|
826
|
-
[step]="step() ?? props()?.step ?? 1"
|
|
827
|
-
[dualKnobs]="props()?.dualKnobs ?? false"
|
|
828
|
-
[pin]="props()?.pin ?? false"
|
|
829
|
-
[pinFormatter]="props()?.pinFormatter ?? defaultPinFormatter"
|
|
830
|
-
[ticks]="props()?.ticks ?? false"
|
|
831
|
-
[snaps]="props()?.snaps ?? false"
|
|
832
|
-
[color]="props()?.color ?? 'primary'"
|
|
833
|
-
/>
|
|
834
|
-
|
|
835
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
836
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
837
|
-
} @else if (props()?.hint; as hint) {
|
|
838
|
-
<ion-note class="df-ion-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</ion-note>
|
|
839
|
-
}
|
|
840
|
-
`, isInline: true, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}\n"], dependencies: [{ kind: "component", type: IonRange, selector: "ion-range", inputs: ["activeBarStart", "color", "debounce", "disabled", "dualKnobs", "label", "labelPlacement", "max", "min", "mode", "name", "pin", "pinFormatter", "snaps", "step", "ticks", "value"] }, { kind: "component", type: IonNote, selector: "ion-note", inputs: ["color", "mode"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
841
|
-
}
|
|
842
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicSliderFieldComponent, decorators: [{
|
|
843
|
-
type: Component,
|
|
844
|
-
args: [{ selector: 'df-ion-slider', imports: [IonRange, IonNote, FormField, DynamicTextPipe, AsyncPipe], hostDirectives: [NgForgeFieldHost, NgForgeHostControl], template: `
|
|
845
|
-
@let f = ngf.field();
|
|
846
|
-
@let inputId = ngf.key() + '-input';
|
|
847
|
-
|
|
848
|
-
<ion-range
|
|
849
|
-
[id]="inputId"
|
|
850
|
-
[formField]="f"
|
|
851
|
-
[label]="(ngf.label() | dynamicText | async) ?? undefined"
|
|
852
|
-
[labelPlacement]="props()?.labelPlacement ?? 'stacked'"
|
|
853
|
-
[min]="f().min?.() ?? props()?.min ?? 0"
|
|
854
|
-
[max]="f().max?.() ?? props()?.max ?? 100"
|
|
855
|
-
[step]="step() ?? props()?.step ?? 1"
|
|
856
|
-
[dualKnobs]="props()?.dualKnobs ?? false"
|
|
857
|
-
[pin]="props()?.pin ?? false"
|
|
858
|
-
[pinFormatter]="props()?.pinFormatter ?? defaultPinFormatter"
|
|
859
|
-
[ticks]="props()?.ticks ?? false"
|
|
860
|
-
[snaps]="props()?.snaps ?? false"
|
|
861
|
-
[color]="props()?.color ?? 'primary'"
|
|
862
|
-
/>
|
|
863
|
-
|
|
864
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
865
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
866
|
-
} @else if (props()?.hint; as hint) {
|
|
867
|
-
<ion-note class="df-ion-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</ion-note>
|
|
868
|
-
}
|
|
869
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}\n"] }]
|
|
870
|
-
}], propDecorators: { step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
871
|
-
|
|
872
|
-
class IonicTextareaFieldComponent {
|
|
873
|
-
elementRef = inject((ElementRef));
|
|
874
|
-
ngf = injectNgForgeField();
|
|
875
|
-
props = input(/* @ts-ignore */
|
|
876
|
-
...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
|
|
877
|
-
constructor() {
|
|
878
|
-
explicitEffect([this.ngf.ariaDescribedBy], ([describedBy]) => {
|
|
879
|
-
queueMicrotask(() => {
|
|
880
|
-
const ionTextarea = this.elementRef.nativeElement.querySelector('ion-textarea');
|
|
881
|
-
if (ionTextarea?.getInputElement) {
|
|
882
|
-
ionTextarea.getInputElement().then((textareaEl) => {
|
|
883
|
-
if (!textareaEl)
|
|
884
|
-
return;
|
|
885
|
-
if (describedBy) {
|
|
886
|
-
textareaEl.setAttribute('aria-describedby', describedBy);
|
|
887
|
-
}
|
|
888
|
-
else {
|
|
889
|
-
textareaEl.removeAttribute('aria-describedby');
|
|
890
|
-
}
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
});
|
|
894
|
-
});
|
|
895
|
-
}
|
|
896
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicTextareaFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
897
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: IonicTextareaFieldComponent, isStandalone: true, selector: "df-ion-textarea", inputs: { props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.NgForgeFieldHost }], ngImport: i0, template: `
|
|
898
|
-
@let f = ngf.field();
|
|
899
|
-
@let textareaId = ngf.key() + '-textarea';
|
|
900
|
-
|
|
901
|
-
<ion-textarea
|
|
902
|
-
ngForgeControl
|
|
903
|
-
[id]="textareaId"
|
|
904
|
-
[formField]="f"
|
|
905
|
-
[label]="(ngf.label() | dynamicText | async) ?? undefined"
|
|
906
|
-
[labelPlacement]="props()?.labelPlacement ?? 'stacked'"
|
|
907
|
-
[placeholder]="(ngf.placeholder() | dynamicText | async) ?? ''"
|
|
908
|
-
[rows]="props()?.rows ?? 4"
|
|
909
|
-
[autoGrow]="props()?.autoGrow ?? false"
|
|
910
|
-
[counter]="props()?.counter ?? false"
|
|
911
|
-
[minlength]="f().minLength?.()"
|
|
912
|
-
[maxlength]="f().maxLength?.()"
|
|
913
|
-
[color]="props()?.color"
|
|
914
|
-
[fill]="props()?.fill ?? 'outline'"
|
|
915
|
-
[shape]="props()?.shape"
|
|
916
|
-
[readonly]="f().readonly()"
|
|
917
|
-
[helperText]="ngf.errorsToDisplay().length === 0 ? ((props()?.hint | dynamicText | async) ?? undefined) : undefined"
|
|
918
|
-
[attr.tabindex]="ngf.tabIndex()"
|
|
919
|
-
/>
|
|
920
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
921
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
922
|
-
}
|
|
923
|
-
`, isInline: true, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}\n"], dependencies: [{ kind: "component", type: IonTextarea, selector: "ion-textarea", inputs: ["autoGrow", "autocapitalize", "autofocus", "clearOnEdit", "color", "cols", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "maxlength", "minlength", "mode", "name", "placeholder", "readonly", "required", "rows", "shape", "spellcheck", "value", "wrap"] }, { kind: "component", type: IonNote, selector: "ion-note", inputs: ["color", "mode"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "directive", type: NgForgeControl, selector: "[ngForgeControl]", inputs: ["ngForgeControl"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
924
|
-
}
|
|
925
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicTextareaFieldComponent, decorators: [{
|
|
926
|
-
type: Component,
|
|
927
|
-
args: [{ selector: 'df-ion-textarea', imports: [IonTextarea, IonNote, FormField, DynamicTextPipe, AsyncPipe, NgForgeControl], hostDirectives: [NgForgeFieldHost], template: `
|
|
928
|
-
@let f = ngf.field();
|
|
929
|
-
@let textareaId = ngf.key() + '-textarea';
|
|
930
|
-
|
|
931
|
-
<ion-textarea
|
|
932
|
-
ngForgeControl
|
|
933
|
-
[id]="textareaId"
|
|
934
|
-
[formField]="f"
|
|
935
|
-
[label]="(ngf.label() | dynamicText | async) ?? undefined"
|
|
936
|
-
[labelPlacement]="props()?.labelPlacement ?? 'stacked'"
|
|
937
|
-
[placeholder]="(ngf.placeholder() | dynamicText | async) ?? ''"
|
|
938
|
-
[rows]="props()?.rows ?? 4"
|
|
939
|
-
[autoGrow]="props()?.autoGrow ?? false"
|
|
940
|
-
[counter]="props()?.counter ?? false"
|
|
941
|
-
[minlength]="f().minLength?.()"
|
|
942
|
-
[maxlength]="f().maxLength?.()"
|
|
943
|
-
[color]="props()?.color"
|
|
944
|
-
[fill]="props()?.fill ?? 'outline'"
|
|
945
|
-
[shape]="props()?.shape"
|
|
946
|
-
[readonly]="f().readonly()"
|
|
947
|
-
[helperText]="ngf.errorsToDisplay().length === 0 ? ((props()?.hint | dynamicText | async) ?? undefined) : undefined"
|
|
948
|
-
[attr.tabindex]="ngf.tabIndex()"
|
|
949
|
-
/>
|
|
950
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
951
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
952
|
-
}
|
|
953
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host([hidden]){display:none!important}\n"] }]
|
|
954
|
-
}], ctorParameters: () => [], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
955
|
-
|
|
956
|
-
class IonicToggleControlComponent {
|
|
957
|
-
checked = model(false, /* @ts-ignore */
|
|
958
|
-
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
959
|
-
touched = model(false, /* @ts-ignore */
|
|
960
|
-
...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
961
|
-
disabled = input(false, /* @ts-ignore */
|
|
962
|
-
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
963
|
-
readonly = input(false, /* @ts-ignore */
|
|
964
|
-
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
965
|
-
invalid = input(false, /* @ts-ignore */
|
|
966
|
-
...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
967
|
-
required = input(false, /* @ts-ignore */
|
|
968
|
-
...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
969
|
-
labelPlacement = input('end', /* @ts-ignore */
|
|
970
|
-
...(ngDevMode ? [{ debugName: "labelPlacement" }] : /* istanbul ignore next */ []));
|
|
971
|
-
justify = input(undefined, /* @ts-ignore */
|
|
972
|
-
...(ngDevMode ? [{ debugName: "justify" }] : /* istanbul ignore next */ []));
|
|
973
|
-
color = input('primary', /* @ts-ignore */
|
|
974
|
-
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
975
|
-
enableOnOffLabels = input(false, /* @ts-ignore */
|
|
976
|
-
...(ngDevMode ? [{ debugName: "enableOnOffLabels" }] : /* istanbul ignore next */ []));
|
|
977
|
-
tabIndex = input(undefined, /* @ts-ignore */
|
|
978
|
-
...(ngDevMode ? [{ debugName: "tabIndex" }] : /* istanbul ignore next */ []));
|
|
979
|
-
ariaReadonly = computed(() => (this.readonly() ? true : null), /* @ts-ignore */
|
|
980
|
-
...(ngDevMode ? [{ debugName: "ariaReadonly" }] : /* istanbul ignore next */ []));
|
|
981
|
-
isChecked = computed(() => {
|
|
982
|
-
return this.checked() === true;
|
|
983
|
-
}, /* @ts-ignore */
|
|
984
|
-
...(ngDevMode ? [{ debugName: "isChecked" }] : /* istanbul ignore next */ []));
|
|
985
|
-
isEffectivelyDisabled = computed(() => {
|
|
986
|
-
return this.disabled() || this.readonly();
|
|
987
|
-
}, /* @ts-ignore */
|
|
988
|
-
...(ngDevMode ? [{ debugName: "isEffectivelyDisabled" }] : /* istanbul ignore next */ []));
|
|
989
|
-
onToggleChange(event) {
|
|
990
|
-
this.checked.set(event.detail.checked);
|
|
991
|
-
}
|
|
992
|
-
onBlur() {
|
|
993
|
-
this.touched.set(true);
|
|
994
|
-
}
|
|
995
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicToggleControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
996
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: IonicToggleControlComponent, isStandalone: true, selector: "df-ion-toggle-control", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, labelPlacement: { classPropertyName: "labelPlacement", publicName: "labelPlacement", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, enableOnOffLabels: { classPropertyName: "enableOnOffLabels", publicName: "enableOnOffLabels", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touched: "touchedChange" }, host: { styleAttribute: "display: block" }, ngImport: i0, template: `
|
|
997
|
-
<ion-toggle
|
|
998
|
-
ngForgeControl
|
|
999
|
-
[checked]="isChecked()"
|
|
1000
|
-
(ionChange)="onToggleChange($event)"
|
|
1001
|
-
(ionBlur)="onBlur()"
|
|
1002
|
-
[labelPlacement]="labelPlacement()"
|
|
1003
|
-
[justify]="justify()"
|
|
1004
|
-
[color]="color()"
|
|
1005
|
-
[enableOnOffLabels]="enableOnOffLabels()"
|
|
1006
|
-
[disabled]="isEffectivelyDisabled()"
|
|
1007
|
-
[attr.tabindex]="tabIndex()"
|
|
1008
|
-
[attr.aria-readonly]="ariaReadonly()"
|
|
1009
|
-
>
|
|
1010
|
-
<ng-content />
|
|
1011
|
-
</ion-toggle>
|
|
1012
|
-
`, isInline: true, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n"], dependencies: [{ kind: "component", type: IonToggle, selector: "ion-toggle", inputs: ["checked", "color", "disabled", "enableOnOffLabels", "errorText", "helperText", "justify", "labelPlacement", "mode", "name", "value"] }, { kind: "directive", type: NgForgeControl, selector: "[ngForgeControl]", inputs: ["ngForgeControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1013
|
-
}
|
|
1014
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicToggleControlComponent, decorators: [{
|
|
1015
|
-
type: Component,
|
|
1016
|
-
args: [{ selector: 'df-ion-toggle-control', imports: [IonToggle, NgForgeControl], template: `
|
|
1017
|
-
<ion-toggle
|
|
1018
|
-
ngForgeControl
|
|
1019
|
-
[checked]="isChecked()"
|
|
1020
|
-
(ionChange)="onToggleChange($event)"
|
|
1021
|
-
(ionBlur)="onBlur()"
|
|
1022
|
-
[labelPlacement]="labelPlacement()"
|
|
1023
|
-
[justify]="justify()"
|
|
1024
|
-
[color]="color()"
|
|
1025
|
-
[enableOnOffLabels]="enableOnOffLabels()"
|
|
1026
|
-
[disabled]="isEffectivelyDisabled()"
|
|
1027
|
-
[attr.tabindex]="tabIndex()"
|
|
1028
|
-
[attr.aria-readonly]="ariaReadonly()"
|
|
1029
|
-
>
|
|
1030
|
-
<ng-content />
|
|
1031
|
-
</ion-toggle>
|
|
1032
|
-
`, host: {
|
|
1033
|
-
style: 'display: block',
|
|
1034
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n"] }]
|
|
1035
|
-
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], labelPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPlacement", required: false }] }], justify: [{ type: i0.Input, args: [{ isSignal: true, alias: "justify", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], enableOnOffLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableOnOffLabels", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }] } });
|
|
1036
|
-
|
|
1037
|
-
class IonicToggleFieldComponent {
|
|
1038
|
-
ngf = injectNgForgeField();
|
|
1039
|
-
props = input(/* @ts-ignore */
|
|
1040
|
-
...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
|
|
1041
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicToggleFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1042
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: IonicToggleFieldComponent, isStandalone: true, selector: "df-ion-toggle", inputs: { props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.NgForgeFieldHost }], ngImport: i0, template: `
|
|
1043
|
-
@let f = ngf.field();
|
|
1044
|
-
@let toggleId = ngf.key() + '-toggle';
|
|
1045
|
-
|
|
1046
|
-
<df-ion-toggle-control
|
|
1047
|
-
[id]="toggleId"
|
|
1048
|
-
[formField]="f"
|
|
1049
|
-
[labelPlacement]="props()?.labelPlacement ?? 'end'"
|
|
1050
|
-
[justify]="props()?.justify"
|
|
1051
|
-
[color]="props()?.color ?? 'primary'"
|
|
1052
|
-
[enableOnOffLabels]="props()?.enableOnOffLabels ?? false"
|
|
1053
|
-
[tabIndex]="ngf.tabIndex()"
|
|
1054
|
-
>
|
|
1055
|
-
{{ ngf.label() | dynamicText | async }}
|
|
1056
|
-
</df-ion-toggle-control>
|
|
1057
|
-
|
|
1058
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
1059
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
1060
|
-
} @else if (props()?.hint; as hint) {
|
|
1061
|
-
<ion-note class="df-ion-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</ion-note>
|
|
1062
|
-
}
|
|
1063
|
-
`, isInline: true, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}\n"], dependencies: [{ kind: "component", type: IonicToggleControlComponent, selector: "df-ion-toggle-control", inputs: ["checked", "touched", "disabled", "readonly", "invalid", "required", "labelPlacement", "justify", "color", "enableOnOffLabels", "tabIndex"], outputs: ["checkedChange", "touchedChange"] }, { kind: "component", type: IonNote, selector: "ion-note", inputs: ["color", "mode"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1064
|
-
}
|
|
1065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicToggleFieldComponent, decorators: [{
|
|
1066
|
-
type: Component,
|
|
1067
|
-
args: [{ selector: 'df-ion-toggle', imports: [IonicToggleControlComponent, IonNote, FormField, DynamicTextPipe, AsyncPipe], hostDirectives: [NgForgeFieldHost], template: `
|
|
1068
|
-
@let f = ngf.field();
|
|
1069
|
-
@let toggleId = ngf.key() + '-toggle';
|
|
1070
|
-
|
|
1071
|
-
<df-ion-toggle-control
|
|
1072
|
-
[id]="toggleId"
|
|
1073
|
-
[formField]="f"
|
|
1074
|
-
[labelPlacement]="props()?.labelPlacement ?? 'end'"
|
|
1075
|
-
[justify]="props()?.justify"
|
|
1076
|
-
[color]="props()?.color ?? 'primary'"
|
|
1077
|
-
[enableOnOffLabels]="props()?.enableOnOffLabels ?? false"
|
|
1078
|
-
[tabIndex]="ngf.tabIndex()"
|
|
1079
|
-
>
|
|
1080
|
-
{{ ngf.label() | dynamicText | async }}
|
|
1081
|
-
</df-ion-toggle-control>
|
|
1082
|
-
|
|
1083
|
-
@if (ngf.errorsToDisplay()[0]; as error) {
|
|
1084
|
-
<ion-note color="danger" class="df-ion-error" [id]="ngf.errorId()" role="alert">{{ error.message }}</ion-note>
|
|
1085
|
-
} @else if (props()?.hint; as hint) {
|
|
1086
|
-
<ion-note class="df-ion-hint" [id]="ngf.hintId()">{{ hint | dynamicText | async }}</ion-note>
|
|
1087
|
-
}
|
|
1088
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".df-ion-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-ion-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-ion-hint{display:block;color:var(--df-hint-color, var(--ion-color-medium, #92949c));font-size:var(--df-hint-font-size, .875rem)}.df-ion-error{display:block;color:var(--df-error-color, var(--ion-color-danger, #eb445a));font-size:var(--df-error-font-size, .875rem)}:host([hidden]){display:none!important}\n", ":host{display:block}:host([hidden]){display:none!important}\n"] }]
|
|
1089
|
-
}], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
1090
|
-
|
|
5
|
+
import { DynamicFormError } from '@ng-forge/dynamic-forms';
|
|
1091
6
|
|
|
1092
7
|
const IonicField = {
|
|
1093
8
|
Input: 'input',
|
|
@@ -1347,99 +262,9 @@ function withIonicAddons() {
|
|
|
1347
262
|
};
|
|
1348
263
|
}
|
|
1349
264
|
|
|
1350
|
-
class IonicButtonAddonComponent {
|
|
1351
|
-
action = injectNgForgeAddonAction();
|
|
1352
|
-
addon = this.action.addon;
|
|
1353
|
-
label = computed(() => this.addon().label, /* @ts-ignore */
|
|
1354
|
-
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1355
|
-
ariaLabel = computed(() => this.addon().ariaLabel, /* @ts-ignore */
|
|
1356
|
-
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
1357
|
-
icon = computed(() => this.addon().icon, /* @ts-ignore */
|
|
1358
|
-
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
1359
|
-
color = computed(() => this.addon().color, /* @ts-ignore */
|
|
1360
|
-
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
1361
|
-
fill = computed(() => this.addon().fill ?? 'clear', /* @ts-ignore */
|
|
1362
|
-
...(ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []));
|
|
1363
|
-
iconOnly = computed(() => !!this.icon() && !this.label(), /* @ts-ignore */
|
|
1364
|
-
...(ngDevMode ? [{ debugName: "iconOnly" }] : /* istanbul ignore next */ []));
|
|
1365
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicButtonAddonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1366
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: IonicButtonAddonComponent, isStandalone: true, selector: "df-ion-button-addon", hostDirectives: [{ directive: i1.NgForgeAddonAction }], ngImport: i0, template: `
|
|
1367
|
-
<ion-button
|
|
1368
|
-
[attr.color]="color() ?? null"
|
|
1369
|
-
[fill]="fill()"
|
|
1370
|
-
[disabled]="action.disabled() || action.loading()"
|
|
1371
|
-
[attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null"
|
|
1372
|
-
[attr.aria-busy]="action.loading() || null"
|
|
1373
|
-
(click)="action.dispatch()"
|
|
1374
|
-
>
|
|
1375
|
-
@if (action.loading()) {
|
|
1376
|
-
<ion-spinner [slot]="iconOnly() ? 'icon-only' : 'start'" name="dots"></ion-spinner>
|
|
1377
|
-
} @else if (icon(); as ic) {
|
|
1378
|
-
<ion-icon [name]="ic" [slot]="iconOnly() ? 'icon-only' : 'start'"></ion-icon>
|
|
1379
|
-
}
|
|
1380
|
-
@if (label(); as lbl) {
|
|
1381
|
-
{{ lbl | dynamicText | async }}
|
|
1382
|
-
}
|
|
1383
|
-
</ion-button>
|
|
1384
|
-
@if (action.loading()) {
|
|
1385
|
-
<span class="df-ion-sr-only" role="status">Loading…</span>
|
|
1386
|
-
}
|
|
1387
|
-
`, isInline: true, 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"], dependencies: [{ kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1388
|
-
}
|
|
1389
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicButtonAddonComponent, decorators: [{
|
|
1390
|
-
type: Component,
|
|
1391
|
-
args: [{ selector: 'df-ion-button-addon', imports: [IonButton, IonIcon, IonSpinner, DynamicTextPipe, AsyncPipe], hostDirectives: [NgForgeAddonAction], template: `
|
|
1392
|
-
<ion-button
|
|
1393
|
-
[attr.color]="color() ?? null"
|
|
1394
|
-
[fill]="fill()"
|
|
1395
|
-
[disabled]="action.disabled() || action.loading()"
|
|
1396
|
-
[attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null"
|
|
1397
|
-
[attr.aria-busy]="action.loading() || null"
|
|
1398
|
-
(click)="action.dispatch()"
|
|
1399
|
-
>
|
|
1400
|
-
@if (action.loading()) {
|
|
1401
|
-
<ion-spinner [slot]="iconOnly() ? 'icon-only' : 'start'" name="dots"></ion-spinner>
|
|
1402
|
-
} @else if (icon(); as ic) {
|
|
1403
|
-
<ion-icon [name]="ic" [slot]="iconOnly() ? 'icon-only' : 'start'"></ion-icon>
|
|
1404
|
-
}
|
|
1405
|
-
@if (label(); as lbl) {
|
|
1406
|
-
{{ lbl | dynamicText | async }}
|
|
1407
|
-
}
|
|
1408
|
-
</ion-button>
|
|
1409
|
-
@if (action.loading()) {
|
|
1410
|
-
<span class="df-ion-sr-only" role="status">Loading…</span>
|
|
1411
|
-
}
|
|
1412
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
1413
|
-
}] });
|
|
1414
|
-
|
|
1415
|
-
class IonicIconAddonComponent {
|
|
1416
|
-
addon = input.required(/* @ts-ignore */
|
|
1417
|
-
...(ngDevMode ? [{ debugName: "addon" }] : /* istanbul ignore next */ []));
|
|
1418
|
-
fieldInputs = input(/* @ts-ignore */
|
|
1419
|
-
...(ngDevMode ? [undefined, { debugName: "fieldInputs" }] : /* istanbul ignore next */ []));
|
|
1420
|
-
iconName = computed(() => this.addon().icon, /* @ts-ignore */
|
|
1421
|
-
...(ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []));
|
|
1422
|
-
ariaLabel = computed(() => this.addon().ariaLabel, /* @ts-ignore */
|
|
1423
|
-
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
1424
|
-
hasAriaLabel = computed(() => this.addon().ariaLabel !== undefined, /* @ts-ignore */
|
|
1425
|
-
...(ngDevMode ? [{ debugName: "hasAriaLabel" }] : /* istanbul ignore next */ []));
|
|
1426
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicIconAddonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1427
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: IonicIconAddonComponent, isStandalone: true, selector: "df-ion-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: `<ion-icon [name]="iconName()" [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null"></ion-icon>`, isInline: true, dependencies: [{ kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: DynamicTextPipe, name: "dynamicText" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1428
|
-
}
|
|
1429
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: IonicIconAddonComponent, decorators: [{
|
|
1430
|
-
type: Component,
|
|
1431
|
-
args: [{
|
|
1432
|
-
selector: 'df-ion-icon-addon',
|
|
1433
|
-
imports: [IonIcon, AsyncPipe, DynamicTextPipe],
|
|
1434
|
-
template: `<ion-icon [name]="iconName()" [attr.aria-label]="(ariaLabel() | dynamicText | async) ?? null"></ion-icon>`,
|
|
1435
|
-
host: {
|
|
1436
|
-
'[attr.aria-hidden]': 'hasAriaLabel() ? null : "true"',
|
|
1437
|
-
},
|
|
1438
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1439
|
-
}]
|
|
1440
|
-
}], propDecorators: { addon: [{ type: i0.Input, args: [{ isSignal: true, alias: "addon", required: true }] }], fieldInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldInputs", required: false }] }] } });
|
|
1441
265
|
|
|
266
|
+
/* eslint-disable @nx/enforce-module-boundaries -- Package self-imports preserve ng-packagr secondary entry points. */
|
|
1442
267
|
|
|
1443
268
|
|
|
1444
|
-
export { IONIC_FIELD_TYPES,
|
|
269
|
+
export { IONIC_FIELD_TYPES, IonicField, withIonicAddons, withIonicFields };
|
|
1445
270
|
//# sourceMappingURL=ng-forge-dynamic-forms-ionic.mjs.map
|