@ng-forge/dynamic-forms-ionic 0.10.0-next.4 → 1.0.0-rc.2

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,7 +1,7 @@
1
1
  import * as _ng_forge_dynamic_forms from '@ng-forge/dynamic-forms';
2
- import { FormEvent, NextPageEvent, PreviousPageEvent, AppendArrayItemEvent, ArrayAllowedChildren, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, DynamicText, BaseAddon, DynamicValue, AddonActionPreset, RegisteredActionRef, TextAddon, TemplateAddon, ValueType, FieldOption, NarrowFields, RegisteredFieldTypes, InferFormValue, FormConfig } from '@ng-forge/dynamic-forms';
2
+ import { FormEvent, FormSubmitEvent, NextPageEvent, PreviousPageEvent, AppendArrayItemEvent, ArrayAllowedChildren, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, DynamicText, BaseAddon, DynamicValue, AddonActionPreset, RegisteredActionRef, 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, CheckedFieldComponent, DatepickerField, DatepickerProps, ValueFieldComponent, AddonActionHandler, InputField, InputProps, WrapperFieldInputs, MultiCheckboxField, RadioField, SelectField, SelectProps, SliderField, TextareaField, TextareaProps, ToggleField, FieldTypeDefinition } from '@ng-forge/dynamic-forms/integration';
4
+ import { ButtonField, CheckboxField, DatepickerField, DatepickerProps, AddonActionHandler, InputField, InputProps, WrapperFieldInputs, MultiCheckboxField, RadioField, SelectField, SelectProps, SliderField, TextareaField, TextareaProps, ToggleField, FieldTypeDefinition } from '@ng-forge/dynamic-forms/integration';
5
5
  import * as _angular_core from '@angular/core';
6
6
  import { InjectionToken, Provider, WritableSignal } from '@angular/core';
7
7
  import * as _ng_forge_dynamic_forms_ionic from '@ng-forge/dynamic-forms-ionic';
@@ -18,7 +18,7 @@ interface IonicButtonProps {
18
18
  type IonicButtonField<TEvent extends FormEvent> = ButtonField<IonicButtonProps, TEvent>;
19
19
  /** Specific button field types with preconfigured events */
20
20
  /** Submit button field - automatically disabled when form is invalid */
21
- type IonicSubmitButtonField = Omit<IonicButtonField<SubmitEvent>, 'event' | 'type' | 'eventArgs'> & {
21
+ type IonicSubmitButtonField = Omit<IonicButtonField<FormSubmitEvent>, 'event' | 'type' | 'eventArgs'> & {
22
22
  type: 'submit';
23
23
  };
24
24
  /** Next page button field - with preconfigured NextPageEvent */
@@ -126,8 +126,6 @@ interface IonicCheckboxProps {
126
126
  hint?: DynamicText;
127
127
  }
128
128
  type IonicCheckboxField = CheckboxField<IonicCheckboxProps>;
129
- /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
130
- type IonicCheckboxComponent = CheckedFieldComponent<IonicCheckboxField>;
131
129
 
132
130
  declare class IonicCheckboxFieldComponent {
133
131
  protected readonly ngf: i1.TypedNgForgeField<boolean>;
@@ -151,8 +149,6 @@ interface IonicDatepickerProps extends DatepickerProps {
151
149
  hint?: DynamicText;
152
150
  }
153
151
  type IonicDatepickerField = DatepickerField<IonicDatepickerProps>;
154
- /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
155
- type IonicDatepickerComponent = ValueFieldComponent<IonicDatepickerField>;
156
152
 
157
153
  declare class IonicDatepickerFieldComponent {
158
154
  protected readonly ngf: i1.TypedNgForgeField<Date | null>;
@@ -172,7 +168,7 @@ declare class IonicDatepickerFieldComponent {
172
168
 
173
169
  /** Decorative icon addon for Ion fields. */
174
170
  interface IonIconAddon extends BaseAddon {
175
- readonly kind: 'ion-icon';
171
+ readonly type: 'ion-icon';
176
172
  /** Ionons name (e.g., `'search-outline'`, `'close-outline'`). */
177
173
  readonly icon: string;
178
174
  /** Accessible label for icons that convey meaning. */
@@ -187,7 +183,7 @@ type IonButtonFill = 'clear' | 'outline' | 'solid' | 'default';
187
183
  * participate in either XOR axis.
188
184
  */
189
185
  interface IonButtonBase extends BaseAddon {
190
- readonly kind: 'ion-button';
186
+ readonly type: 'ion-button';
191
187
  /** Ion button colour. */
192
188
  readonly color?: IonButtonColor;
193
189
  /** Ion button fill style. */
@@ -208,7 +204,7 @@ type IonButtonClickPreset = {
208
204
  };
209
205
  /**
210
206
  * Value type for the `actionRef` slot. When no actions have been registered
211
- * via `provideAddonActions(...)`, `RegisteredActionRef` resolves to `never` —
207
+ * via `withAddonActions(...)`, `RegisteredActionRef` resolves to `never` —
212
208
  * which would make this variant uninhabitable and break `addon.actionRef`
213
209
  * narrowing in the renderer. Fall back to `string` so the variant stays
214
210
  * usable; once the user augments `DynamicFormActionRegistry`, autocomplete
@@ -217,14 +213,14 @@ type IonButtonClickPreset = {
217
213
  type IonButtonActionRef = [RegisteredActionRef] extends [never] ? string : RegisteredActionRef;
218
214
  type IonButtonClickActionRef = {
219
215
  readonly preset?: never;
220
- /** Reference to a handler registered via `provideAddonActions(...)`. JSON-safe. */
216
+ /** Reference to a handler registered via `withAddonActions(...)`. JSON-safe. */
221
217
  readonly actionRef: IonButtonActionRef;
222
218
  readonly action?: never;
223
219
  };
224
220
  type IonButtonClickAction = {
225
221
  readonly preset?: never;
226
222
  readonly actionRef?: never;
227
- /** Inline handler — code-only; dropped from JSON-derived configs. Matches the generic `AddonActionHandler` shape used by `provideAddonActions(...)`. */
223
+ /** Inline handler — code-only; dropped from JSON-derived configs. Matches the generic `AddonActionHandler` shape used by `withAddonActions(...)`. */
228
224
  readonly action: AddonActionHandler;
229
225
  };
230
226
  type IonButtonClickNone = {
@@ -256,7 +252,7 @@ type IonButtonContentDecorative = {
256
252
  type IonButtonContent = IonButtonContentIconOnly | IonButtonContentLabeled | IonButtonContentDecorative;
257
253
  /** Interactive button addon for Ion fields. */
258
254
  type IonButtonAddon = IonButtonBase & IonButtonContent & IonButtonClick;
259
- /** Union of all Ion-shipped addon kinds. */
255
+ /** Union of all Ion-shipped addon types. */
260
256
  type IonAddon = IonIconAddon | IonButtonAddon;
261
257
  declare module '@ng-forge/dynamic-forms' {
262
258
  interface DynamicFormAddonRegistry {
@@ -276,19 +272,17 @@ interface IonicInputProps extends InputProps {
276
272
  clearInput?: boolean;
277
273
  }
278
274
  /**
279
- * Module-augmentable seam for adding custom addon kinds to `ion-input` at
275
+ * Module-augmentable seam for adding custom addon types to `ion-input` at
280
276
  * the type level. Pair with `withCustomAddon(...)` for the runtime side:
281
277
  */
282
278
  interface IonAddonExtensions {
283
279
  }
284
280
  type IonAddonExtension = IonAddonExtensions[keyof IonAddonExtensions];
285
- /** Addon kinds accepted by `ion-input`. */
281
+ /** Addon types accepted by `ion-input`. */
286
282
  type IonInputAddon = IonIconAddon | IonButtonAddon | TextAddon | TemplateAddon | IonAddonExtension;
287
283
  type IonicInputField = InputField<IonicInputProps> & {
288
284
  addons?: ReadonlyArray<IonInputAddon>;
289
285
  };
290
- /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
291
- type IonicInputComponent = ValueFieldComponent<IonicInputField>;
292
286
 
293
287
  declare class IonicInputFieldComponent {
294
288
  private readonly elementRef;
@@ -311,10 +305,10 @@ declare class IonicInputFieldComponent {
311
305
  protected readonly color: _angular_core.Signal<"primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | "light" | "medium" | "dark" | undefined>;
312
306
  /** Override (set by `toggle-password-visibility` preset) wins over `props().type`. */
313
307
  protected readonly type: _angular_core.Signal<string>;
314
- /** Per-kind split: ion-button addons render inline via the attribute-
308
+ /** Per-type split: ion-button addons render inline via the attribute-
315
309
  * selector inline component (so the slotted element is a native
316
310
  * <ion-button> Ionic can style); everything else (icon/text/template/
317
- * component kinds) goes through the universal <df-addon-slot> dispatcher
311
+ * component types) goes through the universal <df-addon-slot> dispatcher
318
312
  * wrapped in <span slot="start|end"> for safe shadow-DOM projection. */
319
313
  protected readonly buttonPrefixAddons: _angular_core.Signal<_ng_forge_dynamic_forms_ionic.IonButtonAddon[]>;
320
314
  protected readonly buttonSuffixAddons: _angular_core.Signal<_ng_forge_dynamic_forms_ionic.IonButtonAddon[]>;
@@ -334,8 +328,6 @@ interface IonicMultiCheckboxProps {
334
328
  hint?: DynamicText;
335
329
  }
336
330
  type IonicMultiCheckboxField<T> = MultiCheckboxField<T, IonicMultiCheckboxProps>;
337
- /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
338
- type IonicMultiCheckboxComponent = ValueFieldComponent<IonicMultiCheckboxField<ValueType>>;
339
331
 
340
332
  declare class IonicMultiCheckboxFieldComponent {
341
333
  protected readonly ngf: i1.TypedNgForgeField<ValueType[]>;
@@ -358,8 +350,6 @@ interface IonicRadioProps {
358
350
  hint?: DynamicText;
359
351
  }
360
352
  type IonicRadioField<T> = RadioField<T, IonicRadioProps>;
361
- /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
362
- type IonicRadioComponent = ValueFieldComponent<IonicRadioField<ValueType>>;
363
353
 
364
354
  declare class IonicRadioFieldComponent {
365
355
  protected readonly ngf: i1.TypedNgForgeField<ValueType>;
@@ -384,8 +374,6 @@ interface IonicSelectProps extends SelectProps {
384
374
  hint?: DynamicText;
385
375
  }
386
376
  type IonicSelectField<T> = SelectField<T, IonicSelectProps>;
387
- /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
388
- type IonicSelectComponent = ValueFieldComponent<IonicSelectField<ValueType>>;
389
377
 
390
378
  declare class IonicSelectFieldComponent {
391
379
  protected readonly ngf: i1.TypedNgForgeField<ValueType>;
@@ -422,8 +410,6 @@ interface IonicSliderProps {
422
410
  hint?: DynamicText;
423
411
  }
424
412
  type IonicSliderField = SliderField<IonicSliderProps>;
425
- /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
426
- type IonicSliderComponent = ValueFieldComponent<IonicSliderField>;
427
413
 
428
414
  declare class IonicSliderFieldComponent {
429
415
  protected readonly ngf: i1.TypedNgForgeField<number>;
@@ -445,8 +431,6 @@ interface IonicTextareaProps extends TextareaProps {
445
431
  color?: 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark';
446
432
  }
447
433
  type IonicTextareaField = TextareaField<IonicTextareaProps>;
448
- /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
449
- type IonicTextareaComponent = ValueFieldComponent<IonicTextareaField>;
450
434
 
451
435
  declare class IonicTextareaFieldComponent {
452
436
  private readonly elementRef;
@@ -465,8 +449,6 @@ interface IonicToggleProps {
465
449
  hint?: DynamicText;
466
450
  }
467
451
  type IonicToggleField = ToggleField<IonicToggleProps>;
468
- /** @deprecated Scheduled for removal in v1. Use `injectNgForgeField<T>()` for typed access to a field component's directive instance. */
469
- type IonicToggleComponent = CheckedFieldComponent<IonicToggleField>;
470
452
 
471
453
  declare class IonicToggleFieldComponent {
472
454
  protected readonly ngf: i1.TypedNgForgeField<boolean>;
@@ -615,7 +597,7 @@ type IonicFieldsWithAddons = [...IonicFieldTypes, IonicAddonsFeature];
615
597
  type IonicFieldsWithConfig = [...IonicFieldTypes, IonicAddonsFeature, IonicConfigFeature];
616
598
  /**
617
599
  * Provides Ionic field type definitions for the dynamic form system,
618
- * with Ionic-shipped addon kinds (`ion-icon`, `ion-button`) auto-included
600
+ * with Ionic-shipped addon types (`ion-icon`, `ion-button`) auto-included
619
601
  * so addons work out of the box.
620
602
  *
621
603
  * @param config - Optional global configuration for Ionic form fields
@@ -626,18 +608,18 @@ declare function withIonicFields(): IonicFieldsWithAddons;
626
608
  declare function withIonicFields(config: IonicConfig): IonicFieldsWithConfig;
627
609
  declare function withIonicFields(config: IonicConfig | undefined): IonicFieldsWithAddons | IonicFieldsWithConfig;
628
610
  /**
629
- * Feature kind discriminant for the Ionic addons feature. Matches core's
630
- * `'addons'` kind so providers flow through the standard addon-kind pipeline
611
+ * Feature type discriminant for the Ionic addons feature. Matches core's
612
+ * `'addons'` type so providers flow through the standard addon-type pipeline
631
613
  * in `provideDynamicForm`.
632
614
  */
633
615
  type IonicAddonsFeature = {
634
616
  ɵkind: 'addons';
635
617
  ɵproviders: Provider[];
636
618
  };
637
- /** Register Ionic-shipped addon kinds (`ion-icon`, `ion-button`) standalone. */
619
+ /** Register Ionic-shipped addon types (`ion-icon`, `ion-button`) standalone. */
638
620
  declare function withIonicAddons(): IonicAddonsFeature;
639
621
 
640
- /** Renderer for the `ion-button` addon kind. */
622
+ /** Renderer for the `ion-button` addon type. */
641
623
  declare class IonButtonAddonComponent {
642
624
  protected readonly action: i1.TypedNgForgeAddonAction<IonButtonAddon>;
643
625
  /** Re-exposed for template binding — same signal stored on the directive. */
@@ -660,10 +642,10 @@ declare class IonButtonAddonComponent {
660
642
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<IonButtonAddonComponent, "df-ion-button-addon", never, {}, {}, never, never, true, [{ directive: typeof i1.NgForgeAddonAction; inputs: {}; outputs: {}; }]>;
661
643
  }
662
644
 
663
- /** Renderer for the `ion-icon` addon kind. */
645
+ /** Renderer for the `ion-icon` addon type. */
664
646
  declare class IonIconAddonComponent {
665
647
  readonly addon: _angular_core.InputSignal<IonIconAddon>;
666
- /** Accepted for contract uniformity — `NgComponentOutlet` setInput is strict; every kind must declare it. */
648
+ /** Accepted for contract uniformity — `NgComponentOutlet` setInput is strict; every type must declare it. */
667
649
  readonly fieldInputs: _angular_core.InputSignal<WrapperFieldInputs | undefined>;
668
650
  protected readonly iconName: _angular_core.Signal<string>;
669
651
  protected readonly ariaLabel: _angular_core.Signal<_ng_forge_dynamic_forms.DynamicText | undefined>;
@@ -676,4 +658,4 @@ declare class IonIconAddonComponent {
676
658
  declare const IONIC_INPUT_TYPE_OVERRIDE: InjectionToken<WritableSignal<string | undefined>>;
677
659
 
678
660
  export { IONIC_CONFIG, IONIC_FIELD_TYPES, IONIC_INPUT_TYPE_OVERRIDE, IonButtonAddonComponent, IonIconAddonComponent, IonicButtonFieldComponent, IonicCheckboxFieldComponent, IonicDatepickerFieldComponent, IonicField, IonicInputFieldComponent, IonicMultiCheckboxFieldComponent, IonicRadioFieldComponent, IonicSelectFieldComponent, IonicSliderFieldComponent, IonicTextareaFieldComponent, IonicToggleFieldComponent, withIonicAddons, withIonicFields };
679
- export type { AddArrayItemButtonField, InsertArrayItemButtonField, IonAddon, IonAddonExtensions, IonButtonAddon, IonIconAddon, IonInputAddon, IonicButtonField, IonicButtonProps, IonicCheckboxComponent, IonicCheckboxField, IonicCheckboxProps, IonicConfig, IonicDatepickerComponent, IonicDatepickerField, IonicDatepickerProps, IonicFieldType, IonicFormConfig, IonicFormProps, IonicInputComponent, IonicInputField, IonicInputProps, IonicMultiCheckboxComponent, IonicMultiCheckboxField, IonicMultiCheckboxProps, IonicNextButtonField, IonicPreviousButtonField, IonicRadioComponent, IonicRadioField, IonicRadioProps, IonicSelectComponent, IonicSelectField, IonicSelectProps, IonicSliderComponent, IonicSliderField, IonicSliderProps, IonicSubmitButtonField, IonicTextareaComponent, IonicTextareaField, IonicTextareaProps, IonicToggleComponent, IonicToggleField, IonicToggleProps, PopArrayItemButtonField, PrependArrayItemButtonField, RemoveArrayItemButtonField, ShiftArrayItemButtonField };
661
+ export type { AddArrayItemButtonField, InsertArrayItemButtonField, IonAddon, IonAddonExtensions, IonButtonAddon, IonIconAddon, IonInputAddon, IonicButtonField, IonicButtonProps, IonicCheckboxField, IonicCheckboxProps, IonicConfig, IonicDatepickerField, IonicDatepickerProps, IonicFieldType, IonicFormConfig, IonicFormProps, IonicInputField, IonicInputProps, IonicMultiCheckboxField, IonicMultiCheckboxProps, IonicNextButtonField, IonicPreviousButtonField, IonicRadioField, IonicRadioProps, IonicSelectField, IonicSelectProps, IonicSliderField, IonicSliderProps, IonicSubmitButtonField, IonicTextareaField, IonicTextareaProps, IonicToggleField, IonicToggleProps, PopArrayItemButtonField, PrependArrayItemButtonField, RemoveArrayItemButtonField, ShiftArrayItemButtonField };