@ng-forge/dynamic-forms-ionic 1.2.0-next.5 → 1.2.0-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ng-forge-dynamic-forms-ionic-ionic-field-errors-wrapper.component-Dl3heov4.mjs +26 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-ionic-field-errors-wrapper.component-Dl3heov4.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-addon-button.mjs +75 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-addon-button.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-addon-icon.mjs +36 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-addon-icon.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-button.mjs +70 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-button.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-checkbox.mjs +67 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-checkbox.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-datepicker.mjs +195 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-datepicker.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-input.mjs +211 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-input.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-multi-checkbox.mjs +139 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-multi-checkbox.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-radio.mjs +98 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-radio.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-select.mjs +92 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-select.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-slider.mjs +76 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-slider.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-textarea.mjs +96 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-textarea.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-toggle.mjs +146 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-lazy-toggle.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-shared.mjs +83 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic-shared.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-ionic.mjs +43 -158
- package/fesm2022/ng-forge-dynamic-forms-ionic.mjs.map +1 -1
- package/package.json +55 -3
- package/types/ng-forge-dynamic-forms-ionic-lazy-addon-button.d.ts +29 -0
- package/types/ng-forge-dynamic-forms-ionic-lazy-addon-icon.d.ts +18 -0
- package/types/ng-forge-dynamic-forms-ionic-lazy-button.d.ts +119 -0
- package/types/ng-forge-dynamic-forms-ionic-lazy-checkbox.d.ts +23 -0
- package/types/ng-forge-dynamic-forms-ionic-lazy-datepicker.d.ts +39 -0
- package/types/ng-forge-dynamic-forms-ionic-lazy-input.d.ts +70 -0
- package/types/ng-forge-dynamic-forms-ionic-lazy-multi-checkbox.d.ts +28 -0
- package/types/ng-forge-dynamic-forms-ionic-lazy-radio.d.ts +25 -0
- package/types/ng-forge-dynamic-forms-ionic-lazy-select.d.ts +31 -0
- package/types/ng-forge-dynamic-forms-ionic-lazy-slider.d.ts +43 -0
- package/types/ng-forge-dynamic-forms-ionic-lazy-textarea.d.ts +28 -0
- package/types/ng-forge-dynamic-forms-ionic-lazy-toggle.d.ts +66 -0
- package/types/ng-forge-dynamic-forms-ionic-shared.d.ts +116 -0
- package/types/ng-forge-dynamic-forms-ionic.d.ts +10 -164
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, ChangeDetectionStrategy, Component, signal, inject,
|
|
3
|
-
import { IonButton, IonCheckbox, IonNote, IonInput, IonModal, IonDatetime, IonButtons, IonHeader, IonContent, IonToolbar, IonTitle,
|
|
2
|
+
import { input, computed, ChangeDetectionStrategy, Component, signal, inject, ElementRef, DestroyRef, forwardRef, linkedSignal, model, isSignal } from '@angular/core';
|
|
3
|
+
import { IonButton, IonCheckbox, IonNote, IonInput, IonModal, IonDatetime, IonButtons, IonHeader, IonContent, IonToolbar, IonTitle, IonItem, IonRadioGroup, IonRadio, IonSelect, IonSelectOption, IonRange, IonTextarea, IonToggle, IonIcon, IonSpinner } from '@ionic/angular/standalone';
|
|
4
4
|
import { AsyncPipe } from '@angular/common';
|
|
5
5
|
import * as i1 from '@ng-forge/dynamic-forms/integration';
|
|
6
|
-
import { injectNgForgeAction, DynamicTextPipe, NgForgeActionHost, injectNgForgeField, NgForgeControl, NgForgeFieldHost,
|
|
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
7
|
import { FormField } from '@angular/forms/signals';
|
|
8
8
|
import { format } from 'date-fns';
|
|
9
9
|
import { DynamicFormLogger, DynamicFormError } from '@ng-forge/dynamic-forms';
|
|
10
10
|
import { explicitEffect } from 'ngxtension/explicit-effect';
|
|
11
|
+
import { IONIC_CONFIG, IONIC_INPUT_TYPE_OVERRIDE, IonicInlineButtonAddonComponent, runIonicPresetAction } from '@ng-forge/dynamic-forms-ionic/shared';
|
|
12
|
+
export { IONIC_CONFIG, IONIC_INPUT_TYPE_OVERRIDE } from '@ng-forge/dynamic-forms-ionic/shared';
|
|
11
13
|
|
|
12
14
|
class IonicButtonFieldComponent {
|
|
13
15
|
action = injectNgForgeAction();
|
|
@@ -68,11 +70,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
68
70
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host([hidden]){display:none!important}\n"] }]
|
|
69
71
|
}], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
70
72
|
|
|
71
|
-
var ionicButton_component = /*#__PURE__*/Object.freeze({
|
|
72
|
-
__proto__: null,
|
|
73
|
-
default: IonicButtonFieldComponent
|
|
74
|
-
});
|
|
75
|
-
|
|
76
73
|
|
|
77
74
|
class IonicCheckboxFieldComponent {
|
|
78
75
|
ngf = injectNgForgeField();
|
|
@@ -130,11 +127,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
130
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"] }]
|
|
131
128
|
}], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
132
129
|
|
|
133
|
-
var ionicCheckbox_component = /*#__PURE__*/Object.freeze({
|
|
134
|
-
__proto__: null,
|
|
135
|
-
default: IonicCheckboxFieldComponent
|
|
136
|
-
});
|
|
137
|
-
|
|
138
130
|
class IonicDatepickerFieldComponent {
|
|
139
131
|
ngf = injectNgForgeField();
|
|
140
132
|
minDate = input(null, /* @ts-ignore */
|
|
@@ -319,83 +311,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
319
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"] }]
|
|
320
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 }] }] } });
|
|
321
313
|
|
|
322
|
-
var ionicDatepicker_component = /*#__PURE__*/Object.freeze({
|
|
323
|
-
__proto__: null,
|
|
324
|
-
default: IonicDatepickerFieldComponent
|
|
325
|
-
});
|
|
326
|
-
|
|
327
|
-
function runIonicPresetAction(preset, ctx, collaborators) {
|
|
328
|
-
return runPresetAction(preset, ctx, collaborators, 'Ionic', 'ion-input');
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
class IonicInlineButtonAddonComponent {
|
|
332
|
-
injector = inject(Injector);
|
|
333
|
-
action = injectNgForgeAddonAction();
|
|
334
|
-
addon = this.action.addon;
|
|
335
|
-
label = computed(() => this.addon().label, /* @ts-ignore */
|
|
336
|
-
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
337
|
-
ariaLabel = computed(() => this.addon().ariaLabel, /* @ts-ignore */
|
|
338
|
-
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
339
|
-
icon = computed(() => this.addon().icon, /* @ts-ignore */
|
|
340
|
-
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
341
|
-
color = computed(() => this.addon().color, /* @ts-ignore */
|
|
342
|
-
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
343
|
-
fill = computed(() => this.addon().fill ?? 'clear', /* @ts-ignore */
|
|
344
|
-
...(ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []));
|
|
345
|
-
iconOnly = computed(() => !!this.icon() && !this.label(), /* @ts-ignore */
|
|
346
|
-
...(ngDevMode ? [{ debugName: "iconOnly" }] : /* istanbul ignore next */ []));
|
|
347
|
-
_ariaLabelSignal = signal(undefined, /* @ts-ignore */
|
|
348
|
-
...(ngDevMode ? [{ debugName: "_ariaLabelSignal" }] : /* istanbul ignore next */ []));
|
|
349
|
-
resolvedAriaLabel = computed(() => this._ariaLabelSignal()?.() ?? undefined, /* @ts-ignore */
|
|
350
|
-
...(ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []));
|
|
351
|
-
constructor() {
|
|
352
|
-
explicitEffect([this.ariaLabel], ([raw]) => {
|
|
353
|
-
if (raw === undefined) {
|
|
354
|
-
this._ariaLabelSignal.set(undefined);
|
|
355
|
-
return;
|
|
356
|
-
}
|
|
357
|
-
this._ariaLabelSignal.set(resolveDynamicValue(raw, undefined, this.injector));
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: IonicInlineButtonAddonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
361
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: IonicInlineButtonAddonComponent, isStandalone: true, selector: "ion-button[df-ion-button-addon]", host: { listeners: { "click": "action.dispatch()" }, properties: { "attr.color": "color() ?? null", "attr.fill": "fill()", "attr.disabled": "action.disabled() || action.loading() ? \"true\" : null", "attr.aria-label": "resolvedAriaLabel() ?? null", "attr.aria-busy": "action.loading() || null" } }, hostDirectives: [{ directive: i1.NgForgeAddonAction }], ngImport: i0, template: `
|
|
362
|
-
@if (action.loading()) {
|
|
363
|
-
<ion-spinner [slot]="iconOnly() ? 'icon-only' : 'start'" name="dots"></ion-spinner>
|
|
364
|
-
<span class="df-ion-sr-only" role="status">Loading…</span>
|
|
365
|
-
} @else if (icon(); as ic) {
|
|
366
|
-
<ion-icon [name]="ic" [slot]="iconOnly() ? 'icon-only' : 'start'"></ion-icon>
|
|
367
|
-
}
|
|
368
|
-
@if (label(); as lbl) {
|
|
369
|
-
{{ lbl | dynamicText | async }}
|
|
370
|
-
}
|
|
371
|
-
`, 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: 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 });
|
|
372
|
-
}
|
|
373
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: IonicInlineButtonAddonComponent, decorators: [{
|
|
374
|
-
type: Component,
|
|
375
|
-
args: [{ selector: 'ion-button[df-ion-button-addon]', imports: [IonIcon, IonSpinner, DynamicTextPipe, AsyncPipe], hostDirectives: [NgForgeAddonAction], template: `
|
|
376
|
-
@if (action.loading()) {
|
|
377
|
-
<ion-spinner [slot]="iconOnly() ? 'icon-only' : 'start'" name="dots"></ion-spinner>
|
|
378
|
-
<span class="df-ion-sr-only" role="status">Loading…</span>
|
|
379
|
-
} @else if (icon(); as ic) {
|
|
380
|
-
<ion-icon [name]="ic" [slot]="iconOnly() ? 'icon-only' : 'start'"></ion-icon>
|
|
381
|
-
}
|
|
382
|
-
@if (label(); as lbl) {
|
|
383
|
-
{{ lbl | dynamicText | async }}
|
|
384
|
-
}
|
|
385
|
-
`, host: {
|
|
386
|
-
'[attr.color]': 'color() ?? null',
|
|
387
|
-
'[attr.fill]': 'fill()',
|
|
388
|
-
'[attr.disabled]': 'action.disabled() || action.loading() ? "true" : null',
|
|
389
|
-
'[attr.aria-label]': 'resolvedAriaLabel() ?? null',
|
|
390
|
-
'[attr.aria-busy]': 'action.loading() || null',
|
|
391
|
-
'(click)': 'action.dispatch()',
|
|
392
|
-
}, 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"] }]
|
|
393
|
-
}], ctorParameters: () => [] });
|
|
394
|
-
|
|
395
|
-
const IONIC_CONFIG = new InjectionToken('IONIC_CONFIG');
|
|
396
|
-
|
|
397
|
-
const IONIC_INPUT_TYPE_OVERRIDE = new InjectionToken('IONIC_INPUT_TYPE_OVERRIDE');
|
|
398
|
-
|
|
399
314
|
class IonicInputFieldComponent {
|
|
400
315
|
elementRef = inject((ElementRef));
|
|
401
316
|
ionicConfig = inject(IONIC_CONFIG, { optional: true });
|
|
@@ -593,11 +508,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
593
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"] }]
|
|
594
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 }] }] } });
|
|
595
510
|
|
|
596
|
-
var ionicInput_component = /*#__PURE__*/Object.freeze({
|
|
597
|
-
__proto__: null,
|
|
598
|
-
default: IonicInputFieldComponent
|
|
599
|
-
});
|
|
600
|
-
|
|
601
511
|
class IonicMultiCheckboxFieldComponent {
|
|
602
512
|
ngf = injectNgForgeField();
|
|
603
513
|
options = input([], /* @ts-ignore */
|
|
@@ -726,11 +636,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
726
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"] }]
|
|
727
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 }] }] } });
|
|
728
638
|
|
|
729
|
-
var ionicMultiCheckbox_component = /*#__PURE__*/Object.freeze({
|
|
730
|
-
__proto__: null,
|
|
731
|
-
default: IonicMultiCheckboxFieldComponent
|
|
732
|
-
});
|
|
733
|
-
|
|
734
639
|
class IonicRadioFieldComponent {
|
|
735
640
|
ngf = injectNgForgeField();
|
|
736
641
|
options = input([], /* @ts-ignore */
|
|
@@ -818,11 +723,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
818
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"] }]
|
|
819
724
|
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
820
725
|
|
|
821
|
-
var ionicRadio_component = /*#__PURE__*/Object.freeze({
|
|
822
|
-
__proto__: null,
|
|
823
|
-
default: IonicRadioFieldComponent
|
|
824
|
-
});
|
|
825
|
-
|
|
826
726
|
class IonicSelectFieldComponent {
|
|
827
727
|
ngf = injectNgForgeField();
|
|
828
728
|
options = input([], /* @ts-ignore */
|
|
@@ -904,11 +804,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
904
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"] }]
|
|
905
805
|
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
906
806
|
|
|
907
|
-
var ionicSelect_component = /*#__PURE__*/Object.freeze({
|
|
908
|
-
__proto__: null,
|
|
909
|
-
default: IonicSelectFieldComponent
|
|
910
|
-
});
|
|
911
|
-
|
|
912
807
|
class IonicSliderFieldComponent {
|
|
913
808
|
ngf = injectNgForgeField();
|
|
914
809
|
step = input(/* @ts-ignore */
|
|
@@ -974,11 +869,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
974
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"] }]
|
|
975
870
|
}], propDecorators: { step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
976
871
|
|
|
977
|
-
var ionicSlider_component = /*#__PURE__*/Object.freeze({
|
|
978
|
-
__proto__: null,
|
|
979
|
-
default: IonicSliderFieldComponent
|
|
980
|
-
});
|
|
981
|
-
|
|
982
872
|
class IonicTextareaFieldComponent {
|
|
983
873
|
elementRef = inject((ElementRef));
|
|
984
874
|
ngf = injectNgForgeField();
|
|
@@ -1063,11 +953,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
1063
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"] }]
|
|
1064
954
|
}], ctorParameters: () => [], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
1065
955
|
|
|
1066
|
-
var ionicTextarea_component = /*#__PURE__*/Object.freeze({
|
|
1067
|
-
__proto__: null,
|
|
1068
|
-
default: IonicTextareaFieldComponent
|
|
1069
|
-
});
|
|
1070
|
-
|
|
1071
956
|
class IonicToggleControlComponent {
|
|
1072
957
|
checked = model(false, /* @ts-ignore */
|
|
1073
958
|
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
@@ -1203,11 +1088,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
1203
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"] }]
|
|
1204
1089
|
}], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
1205
1090
|
|
|
1206
|
-
var ionicToggle_component = /*#__PURE__*/Object.freeze({
|
|
1207
|
-
__proto__: null,
|
|
1208
|
-
default: IonicToggleFieldComponent
|
|
1209
|
-
});
|
|
1210
|
-
|
|
1211
1091
|
|
|
1212
1092
|
const IonicField = {
|
|
1213
1093
|
Input: 'input',
|
|
@@ -1276,10 +1156,20 @@ const BUTTON_FIELD_TYPES_BASE = {
|
|
|
1276
1156
|
renderReadyWhen: [],
|
|
1277
1157
|
valueHandling: 'exclude',
|
|
1278
1158
|
};
|
|
1159
|
+
const loadInputComponent = () => import('@ng-forge/dynamic-forms-ionic/lazy/input').then(({ IonicInputFieldComponent }) => IonicInputFieldComponent);
|
|
1160
|
+
const loadSelectComponent = () => import('@ng-forge/dynamic-forms-ionic/lazy/select').then(({ IonicSelectFieldComponent }) => IonicSelectFieldComponent);
|
|
1161
|
+
const loadCheckboxComponent = () => import('@ng-forge/dynamic-forms-ionic/lazy/checkbox').then(({ IonicCheckboxFieldComponent }) => IonicCheckboxFieldComponent);
|
|
1162
|
+
const loadButtonComponent = () => import('@ng-forge/dynamic-forms-ionic/lazy/button').then(({ IonicButtonFieldComponent }) => IonicButtonFieldComponent);
|
|
1163
|
+
const loadTextareaComponent = () => import('@ng-forge/dynamic-forms-ionic/lazy/textarea').then(({ IonicTextareaFieldComponent }) => IonicTextareaFieldComponent);
|
|
1164
|
+
const loadRadioComponent = () => import('@ng-forge/dynamic-forms-ionic/lazy/radio').then(({ IonicRadioFieldComponent }) => IonicRadioFieldComponent);
|
|
1165
|
+
const loadMultiCheckboxComponent = () => import('@ng-forge/dynamic-forms-ionic/lazy/multi-checkbox').then(({ IonicMultiCheckboxFieldComponent }) => IonicMultiCheckboxFieldComponent);
|
|
1166
|
+
const loadDatepickerComponent = () => import('@ng-forge/dynamic-forms-ionic/lazy/datepicker').then(({ IonicDatepickerFieldComponent }) => IonicDatepickerFieldComponent);
|
|
1167
|
+
const loadSliderComponent = () => import('@ng-forge/dynamic-forms-ionic/lazy/slider').then(({ IonicSliderFieldComponent }) => IonicSliderFieldComponent);
|
|
1168
|
+
const loadToggleComponent = () => import('@ng-forge/dynamic-forms-ionic/lazy/toggle').then(({ IonicToggleFieldComponent }) => IonicToggleFieldComponent);
|
|
1279
1169
|
const IONIC_FIELD_TYPES = [
|
|
1280
1170
|
{
|
|
1281
1171
|
name: IonicField.Input,
|
|
1282
|
-
loadComponent:
|
|
1172
|
+
loadComponent: loadInputComponent,
|
|
1283
1173
|
mapper: valueFieldMapper,
|
|
1284
1174
|
propsToMeta: ['type'],
|
|
1285
1175
|
scope: ['text-input', 'numeric'],
|
|
@@ -1290,81 +1180,81 @@ const IONIC_FIELD_TYPES = [
|
|
|
1290
1180
|
},
|
|
1291
1181
|
{
|
|
1292
1182
|
name: IonicField.Select,
|
|
1293
|
-
loadComponent:
|
|
1183
|
+
loadComponent: loadSelectComponent,
|
|
1294
1184
|
mapper: optionsFieldMapper,
|
|
1295
1185
|
scope: 'single-select',
|
|
1296
1186
|
...VALUE_FIELD_TYPES_BASE,
|
|
1297
1187
|
},
|
|
1298
1188
|
{
|
|
1299
1189
|
name: IonicField.Checkbox,
|
|
1300
|
-
loadComponent:
|
|
1190
|
+
loadComponent: loadCheckboxComponent,
|
|
1301
1191
|
mapper: checkboxFieldMapper,
|
|
1302
1192
|
scope: 'boolean',
|
|
1303
1193
|
...VALUE_FIELD_TYPES_BASE,
|
|
1304
1194
|
},
|
|
1305
1195
|
{
|
|
1306
1196
|
name: IonicField.Button,
|
|
1307
|
-
loadComponent:
|
|
1197
|
+
loadComponent: loadButtonComponent,
|
|
1308
1198
|
mapper: buttonFieldMapper,
|
|
1309
1199
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1310
1200
|
},
|
|
1311
1201
|
{
|
|
1312
1202
|
name: IonicField.Submit,
|
|
1313
|
-
loadComponent:
|
|
1203
|
+
loadComponent: loadButtonComponent,
|
|
1314
1204
|
mapper: submitButtonFieldMapper,
|
|
1315
1205
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1316
1206
|
},
|
|
1317
1207
|
{
|
|
1318
1208
|
name: IonicField.Next,
|
|
1319
|
-
loadComponent:
|
|
1209
|
+
loadComponent: loadButtonComponent,
|
|
1320
1210
|
mapper: nextButtonFieldMapper,
|
|
1321
1211
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1322
1212
|
},
|
|
1323
1213
|
{
|
|
1324
1214
|
name: IonicField.Previous,
|
|
1325
|
-
loadComponent:
|
|
1215
|
+
loadComponent: loadButtonComponent,
|
|
1326
1216
|
mapper: previousButtonFieldMapper,
|
|
1327
1217
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1328
1218
|
},
|
|
1329
1219
|
{
|
|
1330
1220
|
name: IonicField.AddArrayItem,
|
|
1331
|
-
loadComponent:
|
|
1221
|
+
loadComponent: loadButtonComponent,
|
|
1332
1222
|
mapper: addArrayItemButtonMapper,
|
|
1333
1223
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1334
1224
|
},
|
|
1335
1225
|
{
|
|
1336
1226
|
name: IonicField.PrependArrayItem,
|
|
1337
|
-
loadComponent:
|
|
1227
|
+
loadComponent: loadButtonComponent,
|
|
1338
1228
|
mapper: prependArrayItemButtonMapper,
|
|
1339
1229
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1340
1230
|
},
|
|
1341
1231
|
{
|
|
1342
1232
|
name: IonicField.InsertArrayItem,
|
|
1343
|
-
loadComponent:
|
|
1233
|
+
loadComponent: loadButtonComponent,
|
|
1344
1234
|
mapper: insertArrayItemButtonMapper,
|
|
1345
1235
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1346
1236
|
},
|
|
1347
1237
|
{
|
|
1348
1238
|
name: IonicField.RemoveArrayItem,
|
|
1349
|
-
loadComponent:
|
|
1239
|
+
loadComponent: loadButtonComponent,
|
|
1350
1240
|
mapper: removeArrayItemButtonMapper,
|
|
1351
1241
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1352
1242
|
},
|
|
1353
1243
|
{
|
|
1354
1244
|
name: IonicField.PopArrayItem,
|
|
1355
|
-
loadComponent:
|
|
1245
|
+
loadComponent: loadButtonComponent,
|
|
1356
1246
|
mapper: popArrayItemButtonMapper,
|
|
1357
1247
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1358
1248
|
},
|
|
1359
1249
|
{
|
|
1360
1250
|
name: IonicField.ShiftArrayItem,
|
|
1361
|
-
loadComponent:
|
|
1251
|
+
loadComponent: loadButtonComponent,
|
|
1362
1252
|
mapper: shiftArrayItemButtonMapper,
|
|
1363
1253
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1364
1254
|
},
|
|
1365
1255
|
{
|
|
1366
1256
|
name: IonicField.Textarea,
|
|
1367
|
-
loadComponent:
|
|
1257
|
+
loadComponent: loadTextareaComponent,
|
|
1368
1258
|
mapper: valueFieldMapper,
|
|
1369
1259
|
propsToMeta: ['rows'],
|
|
1370
1260
|
scope: 'text-input',
|
|
@@ -1372,35 +1262,35 @@ const IONIC_FIELD_TYPES = [
|
|
|
1372
1262
|
},
|
|
1373
1263
|
{
|
|
1374
1264
|
name: IonicField.Radio,
|
|
1375
|
-
loadComponent:
|
|
1265
|
+
loadComponent: loadRadioComponent,
|
|
1376
1266
|
mapper: optionsFieldMapper,
|
|
1377
1267
|
scope: 'single-select',
|
|
1378
1268
|
...VALUE_FIELD_TYPES_BASE,
|
|
1379
1269
|
},
|
|
1380
1270
|
{
|
|
1381
1271
|
name: IonicField.MultiCheckbox,
|
|
1382
|
-
loadComponent:
|
|
1272
|
+
loadComponent: loadMultiCheckboxComponent,
|
|
1383
1273
|
mapper: optionsFieldMapper,
|
|
1384
1274
|
scope: 'multi-select',
|
|
1385
1275
|
...VALUE_FIELD_TYPES_BASE,
|
|
1386
1276
|
},
|
|
1387
1277
|
{
|
|
1388
1278
|
name: IonicField.Datepicker,
|
|
1389
|
-
loadComponent:
|
|
1279
|
+
loadComponent: loadDatepickerComponent,
|
|
1390
1280
|
mapper: datepickerFieldMapper,
|
|
1391
1281
|
scope: 'date',
|
|
1392
1282
|
...VALUE_FIELD_TYPES_BASE,
|
|
1393
1283
|
},
|
|
1394
1284
|
{
|
|
1395
1285
|
name: IonicField.Slider,
|
|
1396
|
-
loadComponent:
|
|
1286
|
+
loadComponent: loadSliderComponent,
|
|
1397
1287
|
mapper: valueFieldMapper,
|
|
1398
1288
|
scope: 'numeric',
|
|
1399
1289
|
...VALUE_FIELD_TYPES_BASE,
|
|
1400
1290
|
},
|
|
1401
1291
|
{
|
|
1402
1292
|
name: IonicField.Toggle,
|
|
1403
|
-
loadComponent:
|
|
1293
|
+
loadComponent: loadToggleComponent,
|
|
1404
1294
|
mapper: checkboxFieldMapper,
|
|
1405
1295
|
scope: 'boolean',
|
|
1406
1296
|
...VALUE_FIELD_TYPES_BASE,
|
|
@@ -1408,8 +1298,13 @@ const IONIC_FIELD_TYPES = [
|
|
|
1408
1298
|
];
|
|
1409
1299
|
|
|
1410
1300
|
|
|
1301
|
+
const IONIC_FIELD_ERRORS_WRAPPER = {
|
|
1302
|
+
wrapperName: 'field-errors',
|
|
1303
|
+
loadComponent: () => import('./ng-forge-dynamic-forms-ionic-ionic-field-errors-wrapper.component-Dl3heov4.mjs'),
|
|
1304
|
+
rendersFieldErrors: true,
|
|
1305
|
+
};
|
|
1411
1306
|
function withIonicFields(config) {
|
|
1412
|
-
const base = [...IONIC_FIELD_TYPES, withIonicAddons()];
|
|
1307
|
+
const base = [...IONIC_FIELD_TYPES, withIonicAddons(), IONIC_FIELD_ERRORS_WRAPPER];
|
|
1413
1308
|
if (config) {
|
|
1414
1309
|
base.push({
|
|
1415
1310
|
ɵkind: 'ionic-config',
|
|
@@ -1422,7 +1317,7 @@ function withIonicFields(config) {
|
|
|
1422
1317
|
/* -- Ionic addon types ------------------------------------------------- */
|
|
1423
1318
|
const ION_ICON_KIND = {
|
|
1424
1319
|
type: 'ion-icon',
|
|
1425
|
-
loadComponent: () =>
|
|
1320
|
+
loadComponent: () => import('@ng-forge/dynamic-forms-ionic/lazy/addon-icon').then((m) => m.IonicIconAddonComponent),
|
|
1426
1321
|
validate: (addon, fieldKey) => {
|
|
1427
1322
|
if (typeof addon.icon !== 'string' || addon.icon.length === 0) {
|
|
1428
1323
|
throw new DynamicFormError(`Addon type 'ion-icon' requires a non-empty 'icon' string (field: '${fieldKey}').`);
|
|
@@ -1431,7 +1326,7 @@ const ION_ICON_KIND = {
|
|
|
1431
1326
|
};
|
|
1432
1327
|
const ION_BUTTON_KIND = {
|
|
1433
1328
|
type: 'ion-button',
|
|
1434
|
-
loadComponent: () =>
|
|
1329
|
+
loadComponent: () => import('@ng-forge/dynamic-forms-ionic/lazy/addon-button').then((m) => m.IonicButtonAddonComponent),
|
|
1435
1330
|
validate: (addon, fieldKey) => {
|
|
1436
1331
|
const set = [addon.preset, addon.actionRef, addon.action].filter((v) => v !== undefined);
|
|
1437
1332
|
if (set.length > 1) {
|
|
@@ -1517,11 +1412,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
1517
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"] }]
|
|
1518
1413
|
}] });
|
|
1519
1414
|
|
|
1520
|
-
var ionButtonAddon_component = /*#__PURE__*/Object.freeze({
|
|
1521
|
-
__proto__: null,
|
|
1522
|
-
IonicButtonAddonComponent: IonicButtonAddonComponent
|
|
1523
|
-
});
|
|
1524
|
-
|
|
1525
1415
|
class IonicIconAddonComponent {
|
|
1526
1416
|
addon = input.required(/* @ts-ignore */
|
|
1527
1417
|
...(ngDevMode ? [{ debugName: "addon" }] : /* istanbul ignore next */ []));
|
|
@@ -1549,12 +1439,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
1549
1439
|
}]
|
|
1550
1440
|
}], propDecorators: { addon: [{ type: i0.Input, args: [{ isSignal: true, alias: "addon", required: true }] }], fieldInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldInputs", required: false }] }] } });
|
|
1551
1441
|
|
|
1552
|
-
var ionIconAddon_component = /*#__PURE__*/Object.freeze({
|
|
1553
|
-
__proto__: null,
|
|
1554
|
-
IonicIconAddonComponent: IonicIconAddonComponent
|
|
1555
|
-
});
|
|
1556
|
-
|
|
1557
1442
|
|
|
1558
1443
|
|
|
1559
|
-
export {
|
|
1444
|
+
export { IONIC_FIELD_TYPES, IonicButtonAddonComponent, IonicButtonFieldComponent, IonicCheckboxFieldComponent, IonicDatepickerFieldComponent, IonicField, IonicIconAddonComponent, IonicInputFieldComponent, IonicMultiCheckboxFieldComponent, IonicRadioFieldComponent, IonicSelectFieldComponent, IonicSliderFieldComponent, IonicTextareaFieldComponent, IonicToggleFieldComponent, withIonicAddons, withIonicFields };
|
|
1560
1445
|
//# sourceMappingURL=ng-forge-dynamic-forms-ionic.mjs.map
|