@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,9 +1,11 @@
|
|
|
1
1
|
import * as _ng_forge_dynamic_forms from '@ng-forge/dynamic-forms';
|
|
2
|
-
import { FormEvent, FormSubmitEvent, NextPageEvent, PreviousPageEvent, AppendArrayItemEvent, ArrayAllowedChildren, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, DynamicText,
|
|
2
|
+
import { FormEvent, FormSubmitEvent, NextPageEvent, PreviousPageEvent, AppendArrayItemEvent, ArrayAllowedChildren, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, DynamicText, TextAddon, TemplateAddon, ValueType, FieldOption, NarrowFields, RegisteredFieldTypes, InferFormValue, FormConfig } from '@ng-forge/dynamic-forms';
|
|
3
3
|
import * as i1 from '@ng-forge/dynamic-forms/integration';
|
|
4
|
-
import { ButtonField, CheckboxField, DatepickerField, DatepickerProps,
|
|
4
|
+
import { ButtonField, CheckboxField, DatepickerField, DatepickerProps, InputField, InputProps, WrapperFieldInputs, MultiCheckboxField, RadioField, SelectField, SelectProps, SliderField, TextareaField, TextareaProps, ToggleField, FieldTypeDefinition, WrapperTypeDefinition } from '@ng-forge/dynamic-forms/integration';
|
|
5
5
|
import * as _angular_core from '@angular/core';
|
|
6
|
-
import {
|
|
6
|
+
import { Provider } from '@angular/core';
|
|
7
|
+
import { IonicIconAddon, IonicButtonAddon, IonicConfig } from '@ng-forge/dynamic-forms-ionic/shared';
|
|
8
|
+
export { IONIC_CONFIG, IONIC_INPUT_TYPE_OVERRIDE, IonicAddon, IonicButtonAddon, IonicConfig, IonicIconAddon } from '@ng-forge/dynamic-forms-ionic/shared';
|
|
7
9
|
import * as _ng_forge_dynamic_forms_ionic from '@ng-forge/dynamic-forms-ionic';
|
|
8
10
|
|
|
9
11
|
interface IonicButtonProps {
|
|
@@ -166,101 +168,6 @@ declare class IonicDatepickerFieldComponent {
|
|
|
166
168
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<IonicDatepickerFieldComponent, "df-ion-datepicker", never, { "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.NgForgeFieldHost; inputs: {}; outputs: {}; }]>;
|
|
167
169
|
}
|
|
168
170
|
|
|
169
|
-
/** Decorative icon addon for Ionic fields. */
|
|
170
|
-
interface IonicIconAddon extends BaseAddon {
|
|
171
|
-
readonly type: 'ion-icon';
|
|
172
|
-
/** Ionons name (e.g., `'search-outline'`, `'close-outline'`). */
|
|
173
|
-
readonly icon: string;
|
|
174
|
-
/** Accessible label for icons that convey meaning. */
|
|
175
|
-
readonly ariaLabel?: DynamicText;
|
|
176
|
-
}
|
|
177
|
-
/** Ionic-supported button colour palette. */
|
|
178
|
-
type IonicButtonColor = 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark';
|
|
179
|
-
/** Ionic-supported button fill variants. */
|
|
180
|
-
type IonicButtonFill = 'clear' | 'outline' | 'solid' | 'default';
|
|
181
|
-
/**
|
|
182
|
-
* Common shape of every `ion-button` addon — properties that don't
|
|
183
|
-
* participate in either XOR axis.
|
|
184
|
-
*/
|
|
185
|
-
interface IonicButtonBase extends BaseAddon {
|
|
186
|
-
readonly type: 'ion-button';
|
|
187
|
-
/** Ion button colour. */
|
|
188
|
-
readonly color?: IonicButtonColor;
|
|
189
|
-
/** Ion button fill style. */
|
|
190
|
-
readonly fill?: IonicButtonFill;
|
|
191
|
-
/** Reactive loading state — renders an `<ion-spinner>` when truthy. */
|
|
192
|
-
readonly loading?: DynamicValue<boolean>;
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Click axis — XOR enforced at type level so configurations that combine
|
|
196
|
-
* two click handlers (e.g., `preset` AND `actionRef`) are rejected by
|
|
197
|
-
* TypeScript. The four shapes:
|
|
198
|
-
*/
|
|
199
|
-
type IonicButtonClickPreset = {
|
|
200
|
-
/** Built-in preset action (e.g., `'clear'`, `'toggle-password-visibility'`). JSON-safe. */
|
|
201
|
-
readonly preset: AddonActionPreset;
|
|
202
|
-
readonly actionRef?: never;
|
|
203
|
-
readonly action?: never;
|
|
204
|
-
};
|
|
205
|
-
/**
|
|
206
|
-
* Value type for the `actionRef` slot. When no actions have been registered
|
|
207
|
-
* via `withAddonActions(...)`, `RegisteredActionRef` resolves to `never` —
|
|
208
|
-
* which would make this variant uninhabitable and break `addon.actionRef`
|
|
209
|
-
* narrowing in the renderer. Fall back to `string` so the variant stays
|
|
210
|
-
* usable; once the user augments `DynamicFormActionRegistry`, autocomplete
|
|
211
|
-
* tightens to the registered keys.
|
|
212
|
-
*/
|
|
213
|
-
type IonicButtonActionRef = [RegisteredActionRef] extends [never] ? string : RegisteredActionRef;
|
|
214
|
-
type IonicButtonClickActionRef = {
|
|
215
|
-
readonly preset?: never;
|
|
216
|
-
/** Reference to a handler registered via `withAddonActions(...)`. JSON-safe. */
|
|
217
|
-
readonly actionRef: IonicButtonActionRef;
|
|
218
|
-
readonly action?: never;
|
|
219
|
-
};
|
|
220
|
-
type IonicButtonClickAction = {
|
|
221
|
-
readonly preset?: never;
|
|
222
|
-
readonly actionRef?: never;
|
|
223
|
-
/** Inline handler — code-only; dropped from JSON-derived configs. Matches the generic `AddonActionHandler` shape used by `withAddonActions(...)`. */
|
|
224
|
-
readonly action: AddonActionHandler;
|
|
225
|
-
};
|
|
226
|
-
type IonicButtonClickNone = {
|
|
227
|
-
readonly preset?: never;
|
|
228
|
-
readonly actionRef?: never;
|
|
229
|
-
readonly action?: never;
|
|
230
|
-
};
|
|
231
|
-
type IonicButtonClick = IonicButtonClickPreset | IonicButtonClickActionRef | IonicButtonClickAction | IonicButtonClickNone;
|
|
232
|
-
/**
|
|
233
|
-
* Content axis — XOR enforced at type level so an icon-only button is
|
|
234
|
-
* forced to declare `ariaLabel`. The three shapes:
|
|
235
|
-
*/
|
|
236
|
-
type IonicButtonContentIconOnly = {
|
|
237
|
-
readonly icon: string;
|
|
238
|
-
readonly label?: never;
|
|
239
|
-
/** REQUIRED: icon-only buttons must carry an accessible label. */
|
|
240
|
-
readonly ariaLabel: DynamicText;
|
|
241
|
-
};
|
|
242
|
-
type IonicButtonContentLabeled = {
|
|
243
|
-
readonly icon?: string;
|
|
244
|
-
readonly label: DynamicText;
|
|
245
|
-
readonly ariaLabel?: DynamicText;
|
|
246
|
-
};
|
|
247
|
-
type IonicButtonContentDecorative = {
|
|
248
|
-
readonly icon?: never;
|
|
249
|
-
readonly label?: never;
|
|
250
|
-
readonly ariaLabel?: DynamicText;
|
|
251
|
-
};
|
|
252
|
-
type IonicButtonContent = IonicButtonContentIconOnly | IonicButtonContentLabeled | IonicButtonContentDecorative;
|
|
253
|
-
/** Interactive button addon for Ionic fields. */
|
|
254
|
-
type IonicButtonAddon = IonicButtonBase & IonicButtonContent & IonicButtonClick;
|
|
255
|
-
/** Union of all Ion-shipped addon types. */
|
|
256
|
-
type IonicAddon = IonicIconAddon | IonicButtonAddon;
|
|
257
|
-
declare module '@ng-forge/dynamic-forms' {
|
|
258
|
-
interface DynamicFormAddonRegistry {
|
|
259
|
-
'ion-icon': IonicIconAddon;
|
|
260
|
-
'ion-button': IonicButtonAddon;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
171
|
interface IonicInputProps extends InputProps {
|
|
265
172
|
fill?: 'solid' | 'outline';
|
|
266
173
|
shape?: 'round';
|
|
@@ -463,64 +370,6 @@ declare class IonicToggleFieldComponent {
|
|
|
463
370
|
*/
|
|
464
371
|
declare const IONIC_FIELD_TYPES: FieldTypeDefinition[];
|
|
465
372
|
|
|
466
|
-
/** Configuration options for Ionic form fields. */
|
|
467
|
-
interface IonicConfig {
|
|
468
|
-
/**
|
|
469
|
-
* Default fill style for form inputs
|
|
470
|
-
*
|
|
471
|
-
* @default 'solid'
|
|
472
|
-
*/
|
|
473
|
-
fill?: 'solid' | 'outline';
|
|
474
|
-
/**
|
|
475
|
-
* Default shape for form controls
|
|
476
|
-
*
|
|
477
|
-
* @default undefined
|
|
478
|
-
*/
|
|
479
|
-
shape?: 'round';
|
|
480
|
-
/**
|
|
481
|
-
* Default label placement for form inputs
|
|
482
|
-
*
|
|
483
|
-
* @default 'start'
|
|
484
|
-
*/
|
|
485
|
-
labelPlacement?: 'start' | 'end' | 'fixed' | 'stacked' | 'floating';
|
|
486
|
-
/**
|
|
487
|
-
* Default color theme for form controls
|
|
488
|
-
*
|
|
489
|
-
* @default 'primary'
|
|
490
|
-
*/
|
|
491
|
-
color?: 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark';
|
|
492
|
-
/**
|
|
493
|
-
* Default size for buttons
|
|
494
|
-
*
|
|
495
|
-
* @default 'default'
|
|
496
|
-
*/
|
|
497
|
-
size?: 'small' | 'default' | 'large';
|
|
498
|
-
/**
|
|
499
|
-
* Default expand behavior for buttons
|
|
500
|
-
*
|
|
501
|
-
* @default undefined
|
|
502
|
-
*/
|
|
503
|
-
expand?: 'full' | 'block';
|
|
504
|
-
/**
|
|
505
|
-
* Default fill style for buttons (overrides general fill if set)
|
|
506
|
-
*
|
|
507
|
-
* @default 'solid'
|
|
508
|
-
*/
|
|
509
|
-
buttonFill?: 'clear' | 'outline' | 'solid' | 'default';
|
|
510
|
-
/**
|
|
511
|
-
* Whether buttons should be strong (bold) by default
|
|
512
|
-
*
|
|
513
|
-
* @default false
|
|
514
|
-
*/
|
|
515
|
-
strong?: boolean;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
/**
|
|
519
|
-
* Injection token for Ionic form configuration.
|
|
520
|
-
* Use this to provide global configuration for Ionic form fields.
|
|
521
|
-
*/
|
|
522
|
-
declare const IONIC_CONFIG: InjectionToken<IonicConfig>;
|
|
523
|
-
|
|
524
373
|
/**
|
|
525
374
|
* Ionic field type constants
|
|
526
375
|
* Based on available field components in the /fields folder
|
|
@@ -599,8 +448,8 @@ type IonicConfigFeature = {
|
|
|
599
448
|
* Default `withIonicFields()` shape — field defs + the auto-included
|
|
600
449
|
* addons feature so `ion-icon` / `ion-button` work out of the box.
|
|
601
450
|
*/
|
|
602
|
-
type IonicFieldsWithAddons = [...IonicFieldTypes, IonicAddonsFeature];
|
|
603
|
-
type IonicFieldsWithConfig = [...IonicFieldTypes, IonicAddonsFeature, IonicConfigFeature];
|
|
451
|
+
type IonicFieldsWithAddons = [...IonicFieldTypes, IonicAddonsFeature, WrapperTypeDefinition];
|
|
452
|
+
type IonicFieldsWithConfig = [...IonicFieldTypes, IonicAddonsFeature, WrapperTypeDefinition, IonicConfigFeature];
|
|
604
453
|
/**
|
|
605
454
|
* Provides Ionic field type definitions for the dynamic form system,
|
|
606
455
|
* with Ionic-shipped addon types (`ion-icon`, `ion-button`) auto-included
|
|
@@ -637,7 +486,7 @@ declare class IonicButtonAddonComponent {
|
|
|
637
486
|
* (Ionic's `medium` would force low-contrast grey, which fails WCAG on dark
|
|
638
487
|
* surfaces). Consumers can still set `color: 'primary' | 'success' | ...`
|
|
639
488
|
* explicitly when they want adapter-styled coloring. */
|
|
640
|
-
protected readonly color: _angular_core.Signal<
|
|
489
|
+
protected readonly color: _angular_core.Signal<"primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | "light" | "medium" | "dark" | undefined>;
|
|
641
490
|
protected readonly fill: _angular_core.Signal<"clear" | "outline" | "solid" | "default">;
|
|
642
491
|
/** Icon-only when there is an icon but no label — drives the `slot` choice.
|
|
643
492
|
* Truthy check on `label` mirrors Material's heuristic; empty-string label
|
|
@@ -660,8 +509,5 @@ declare class IonicIconAddonComponent {
|
|
|
660
509
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<IonicIconAddonComponent, "df-ion-icon-addon", never, { "addon": { "alias": "addon"; "required": true; "isSignal": true; }; "fieldInputs": { "alias": "fieldInputs"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
661
510
|
}
|
|
662
511
|
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
export { IONIC_CONFIG, IONIC_FIELD_TYPES, IONIC_INPUT_TYPE_OVERRIDE, IonicButtonAddonComponent, IonicButtonFieldComponent, IonicCheckboxFieldComponent, IonicDatepickerFieldComponent, IonicField, IonicIconAddonComponent, IonicInputFieldComponent, IonicMultiCheckboxFieldComponent, IonicRadioFieldComponent, IonicSelectFieldComponent, IonicSliderFieldComponent, IonicTextareaFieldComponent, IonicToggleFieldComponent, withIonicAddons, withIonicFields };
|
|
667
|
-
export type { IonicAddArrayItemButtonField, IonicAddon, IonicAddonExtensions, IonicButtonAddon, IonicButtonField, IonicButtonProps, IonicCheckboxField, IonicCheckboxProps, IonicConfig, IonicDatepickerField, IonicDatepickerProps, IonicFieldType, IonicFormConfig, IonicFormProps, IonicIconAddon, IonicInputAddon, IonicInputField, IonicInputProps, IonicInsertArrayItemButtonField, IonicMultiCheckboxField, IonicMultiCheckboxProps, IonicNextButtonField, IonicPopArrayItemButtonField, IonicPrependArrayItemButtonField, IonicPreviousButtonField, IonicRadioField, IonicRadioProps, IonicRemoveArrayItemButtonField, IonicSelectField, IonicSelectProps, IonicShiftArrayItemButtonField, IonicSliderField, IonicSliderProps, IonicSubmitButtonField, IonicTextareaField, IonicTextareaProps, IonicToggleField, IonicToggleProps };
|
|
512
|
+
export { IONIC_FIELD_TYPES, IonicButtonAddonComponent, IonicButtonFieldComponent, IonicCheckboxFieldComponent, IonicDatepickerFieldComponent, IonicField, IonicIconAddonComponent, IonicInputFieldComponent, IonicMultiCheckboxFieldComponent, IonicRadioFieldComponent, IonicSelectFieldComponent, IonicSliderFieldComponent, IonicTextareaFieldComponent, IonicToggleFieldComponent, withIonicAddons, withIonicFields };
|
|
513
|
+
export type { IonicAddArrayItemButtonField, IonicAddonExtensions, IonicButtonField, IonicButtonProps, IonicCheckboxField, IonicCheckboxProps, IonicDatepickerField, IonicDatepickerProps, IonicFieldType, IonicFormConfig, IonicFormProps, IonicInputAddon, IonicInputField, IonicInputProps, IonicInsertArrayItemButtonField, IonicMultiCheckboxField, IonicMultiCheckboxProps, IonicNextButtonField, IonicPopArrayItemButtonField, IonicPrependArrayItemButtonField, IonicPreviousButtonField, IonicRadioField, IonicRadioProps, IonicRemoveArrayItemButtonField, IonicSelectField, IonicSelectProps, IonicShiftArrayItemButtonField, IonicSliderField, IonicSliderProps, IonicSubmitButtonField, IonicTextareaField, IonicTextareaProps, IonicToggleField, IonicToggleProps };
|