@decaf-ts/for-angular 0.0.25 → 0.0.27

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.
Files changed (78) hide show
  1. package/fesm2022/decaf-ts-for-angular.mjs +1486 -1505
  2. package/fesm2022/decaf-ts-for-angular.mjs.map +1 -1
  3. package/index.d.ts +7482 -3
  4. package/package.json +15 -18
  5. package/components/component-renderer/component-renderer.component.d.ts +0 -278
  6. package/components/crud-field/crud-field.component.d.ts +0 -611
  7. package/components/crud-form/constants.d.ts +0 -5
  8. package/components/crud-form/crud-form.component.d.ts +0 -288
  9. package/components/crud-form/types.d.ts +0 -17
  10. package/components/empty-state/empty-state.component.d.ts +0 -300
  11. package/components/fieldset/fieldset.component.d.ts +0 -555
  12. package/components/filter/filter.component.d.ts +0 -514
  13. package/components/for-angular-components.module.d.ts +0 -20
  14. package/components/index.d.ts +0 -16
  15. package/components/layout/layout.component.d.ts +0 -110
  16. package/components/list/list.component.d.ts +0 -848
  17. package/components/list-item/list-item.component.d.ts +0 -390
  18. package/components/model-renderer/model-renderer.component.d.ts +0 -97
  19. package/components/pagination/constants.d.ts +0 -7
  20. package/components/pagination/pagination.component.d.ts +0 -264
  21. package/components/searchbar/searchbar.component.d.ts +0 -407
  22. package/components/stepped-form/stepped-form.component.d.ts +0 -255
  23. package/directives/collapsable.directive.d.ts +0 -9
  24. package/directives/index.d.ts +0 -1
  25. package/engine/DynamicModule.d.ts +0 -17
  26. package/engine/NgxBaseComponent.d.ts +0 -541
  27. package/engine/NgxCrudFormField.d.ts +0 -123
  28. package/engine/NgxFormService.d.ts +0 -601
  29. package/engine/NgxRenderingEngine.d.ts +0 -282
  30. package/engine/ValidatorFactory.d.ts +0 -15
  31. package/engine/constants.d.ts +0 -168
  32. package/engine/decorators.d.ts +0 -25
  33. package/engine/index.d.ts +0 -18
  34. package/engine/interfaces.d.ts +0 -271
  35. package/engine/types.d.ts +0 -200
  36. package/esm2022/components/component-renderer/component-renderer.component.mjs +0 -321
  37. package/esm2022/components/crud-field/crud-field.component.mjs +0 -518
  38. package/esm2022/components/crud-form/constants.mjs +0 -14
  39. package/esm2022/components/crud-form/crud-form.component.mjs +0 -259
  40. package/esm2022/components/crud-form/types.mjs +0 -2
  41. package/esm2022/components/empty-state/empty-state.component.mjs +0 -345
  42. package/esm2022/components/fieldset/fieldset.component.mjs +0 -677
  43. package/esm2022/components/filter/filter.component.mjs +0 -700
  44. package/esm2022/components/for-angular-components.module.mjs +0 -84
  45. package/esm2022/components/index.mjs +0 -20
  46. package/esm2022/components/layout/layout.component.mjs +0 -150
  47. package/esm2022/components/list/list.component.mjs +0 -1238
  48. package/esm2022/components/list-item/list-item.component.mjs +0 -405
  49. package/esm2022/components/model-renderer/model-renderer.component.mjs +0 -144
  50. package/esm2022/components/pagination/constants.mjs +0 -2
  51. package/esm2022/components/pagination/pagination.component.mjs +0 -321
  52. package/esm2022/components/searchbar/searchbar.component.mjs +0 -491
  53. package/esm2022/components/stepped-form/stepped-form.component.mjs +0 -306
  54. package/esm2022/decaf-ts-for-angular.mjs +0 -5
  55. package/esm2022/directives/collapsable.directive.mjs +0 -29
  56. package/esm2022/directives/index.mjs +0 -2
  57. package/esm2022/engine/DynamicModule.mjs +0 -18
  58. package/esm2022/engine/NgxBaseComponent.mjs +0 -541
  59. package/esm2022/engine/NgxCrudFormField.mjs +0 -137
  60. package/esm2022/engine/NgxFormService.mjs +0 -917
  61. package/esm2022/engine/NgxRenderingEngine.mjs +0 -376
  62. package/esm2022/engine/ValidatorFactory.mjs +0 -106
  63. package/esm2022/engine/constants.mjs +0 -170
  64. package/esm2022/engine/decorators.mjs +0 -38
  65. package/esm2022/engine/index.mjs +0 -19
  66. package/esm2022/engine/interfaces.mjs +0 -4
  67. package/esm2022/engine/types.mjs +0 -2
  68. package/esm2022/for-angular-common.module.mjs +0 -84
  69. package/esm2022/helpers/index.mjs +0 -13
  70. package/esm2022/helpers/utils.mjs +0 -436
  71. package/esm2022/i18n/Loader.mjs +0 -86
  72. package/esm2022/i18n/data/en.json +0 -85
  73. package/esm2022/public-apis.mjs +0 -15
  74. package/for-angular-common.module.d.ts +0 -50
  75. package/helpers/index.d.ts +0 -12
  76. package/helpers/utils.d.ts +0 -279
  77. package/i18n/Loader.d.ts +0 -43
  78. package/public-apis.d.ts +0 -14
@@ -1,271 +0,0 @@
1
- import { FormArray, FormControl, FormGroup } from '@angular/forms';
2
- import { ElementRef, EnvironmentInjector, Injector, Type } from '@angular/core';
3
- import { OrderDirection } from '@decaf-ts/core';
4
- import { AngularFieldDefinition, FieldUpdateMode, KeyValue, StringOrBoolean } from './types';
5
- import { FieldProperties } from '@decaf-ts/ui-decorators';
6
- /**
7
- * @description Interface for components that hold an ElementRef
8
- * @summary Defines a component holder interface that provides access to the underlying DOM element through ElementRef
9
- * @interface IComponentHolder
10
- * @memberOf module:engine
11
- */
12
- export interface IComponentHolder {
13
- /**
14
- * @description Reference to the component's DOM element
15
- * @property {ElementRef} component - The ElementRef instance providing access to the native DOM element
16
- */
17
- component: ElementRef;
18
- }
19
- /**
20
- * @description Interface for form components that hold both an ElementRef and a FormGroup
21
- * @summary Extends IComponentHolder to include a FormGroup for form handling capabilities
22
- * @interface IFormElement
23
- * @memberOf module:engine
24
- */
25
- export interface IFormElement extends IComponentHolder {
26
- /**
27
- * @description The Angular FormGroup associated with this form element
28
- * @property {FormGroup|undefined} formGroup - The form group instance for managing form controls and validation
29
- */
30
- formGroup: FormGroup | undefined;
31
- }
32
- /**
33
- * @description Interface for fieldset item representation in the UI.
34
- * @summary Defines the structure for items displayed in the reorderable list within the fieldset.
35
- * Each item represents a value added to the fieldset with display properties for the UI.
36
- * @memberOf module:engine
37
- */
38
- export interface IFieldSetItem {
39
- /** @description Sequential index number for ordering items in the list */
40
- index: number;
41
- /** @description Primary display text for the item */
42
- title: string;
43
- /** @description Optional secondary text providing additional item details */
44
- description?: string;
45
- }
46
- /**
47
- * @description Interface for fieldset validation event data.
48
- * @summary Defines the structure of validation events emitted when form validation occurs.
49
- * Used for communication between form components and the fieldset container.
50
- * @memberOf module:engine
51
- */
52
- export interface IFieldSetValidationEvent {
53
- /** @description The FormGroup containing the validated form controls */
54
- formGroup: FormArray | FormGroup;
55
- /** @description The current form value being validated */
56
- value: unknown;
57
- /** @description Whether the form validation passed or failed */
58
- isValid: boolean;
59
- }
60
- /**
61
- * @description Interface for individual filter query items
62
- * @summary Defines the structure of a single filter criterion in a filter query.
63
- * Each item represents one condition to be applied to the data, consisting of
64
- * an index (field name), a condition (comparison operator), and a value to compare against.
65
- * @interface IFilterQueryItem
66
- * @property {string} [index] - Optional field name or index to filter on
67
- * @property {string} [condition] - Optional comparison condition (e.g., 'Equal', 'Contains', 'Greater Than')
68
- * @property {string} [value] - Optional value to compare the field against
69
- * @memberOf module:engine
70
- */
71
- export interface IFilterQueryItem {
72
- index?: string;
73
- condition?: string;
74
- value?: string;
75
- }
76
- /**
77
- * @description Interface for sorting configuration objects
78
- * @summary Defines the structure for specifying sort criteria including the field
79
- * to sort by and the direction of the sort (ascending or descending).
80
- * @interface ISortObject
81
- * @property {string} value - The field name or property to sort by
82
- * @property {OrderDirection} direction - The sort direction (ASC or DSC)
83
- * @memberOf module:engine
84
- */
85
- export interface ISortObject {
86
- value: string;
87
- direction: OrderDirection;
88
- }
89
- /**
90
- * @description Interface for complete filter query configuration
91
- * @summary Defines the complete structure for filter and sort operations.
92
- * Combines multiple filter criteria with sorting configuration to provide
93
- * comprehensive data filtering and ordering capabilities.
94
- * @interface IFilterQuery
95
- * @property {IFilterQueryItem[] | undefined} query - Array of filter criteria or undefined for no filtering
96
- * @property {ISortObject} sort - Sorting configuration specifying field and direction
97
- * @memberOf module:engine
98
- */
99
- export interface IFilterQuery {
100
- query: IFilterQueryItem[] | undefined;
101
- sort: ISortObject;
102
- }
103
- /**
104
- * @description Component input properties
105
- * @summary Extends FieldProperties with additional properties specific to Angular components.
106
- * Includes update mode for form controls and optional FormGroup and FormControl references.
107
- * @interface IComponentInput
108
- * @property {FieldUpdateMode} [updateMode] - When the field value should be updated
109
- * @property {FormGroup} [formGroup] - Optional FormGroup reference
110
- * @property {FormControl} [formControl] - Optional FormControl reference
111
- * @memberOf module:engine
112
- */
113
- export interface IComponentInput extends FieldProperties {
114
- updateMode?: FieldUpdateMode;
115
- formGroup?: FormGroup;
116
- formControl?: FormControl;
117
- }
118
- /**
119
- * @description Component configuration structure
120
- * @summary Defines the configuration for dynamically creating Angular components.
121
- * Contains the component name, input properties, injector, and optional child components.
122
- * @interface IComponentConfig
123
- * @property {string} component - The name of the component to render
124
- * @property {IComponentInput} inputs - The input properties for the component
125
- * @property {EnvironmentInjector | Injector} injector - The Angular injector for dependency injection
126
- * @property {IComponentConfig[]} [children] - Optional child component configurations
127
- * @memberOf module:engine
128
- */
129
- export interface IComponentConfig {
130
- component: string;
131
- inputs: IComponentInput;
132
- injector: EnvironmentInjector | Injector;
133
- children?: IComponentConfig[];
134
- }
135
- /**
136
- * @description Metadata structure for Angular components
137
- * @summary Defines the structure of metadata for Angular components, including
138
- * change detection strategy, selector, standalone status, imports, template, and styles.
139
- * This is used for reflection and dynamic component creation.
140
- * @interface ComponentMetadata
141
- * @property {number} changeDetection - The change detection strategy number
142
- * @property {string} selector - The CSS selector for the component
143
- * @property {boolean} standalone - Whether the component is standalone
144
- * @property imports - Array of imported modules/components
145
- * @property {string} template - The HTML template for the component
146
- * @property {string[]} styles - Array of CSS styles for the component
147
- * @memberOf module:engine
148
- */
149
- export interface ComponentMetadata {
150
- changeDetection: number;
151
- selector: string;
152
- standalone: boolean;
153
- imports: (new (...args: unknown[]) => unknown)[];
154
- template: string;
155
- styles: string[];
156
- }
157
- /**
158
- * @description Output structure from the Angular rendering engine
159
- * @summary Defines the structure of the output produced by the NgxRenderingEngine
160
- * when rendering a component. Contains the component type, inputs, injector,
161
- * content nodes, and child components.
162
- * @typedef {Object} AngularDynamicOutput
163
- * @property {Type<unknown>} component - The Angular component type
164
- * @property {string} [rendererId] - Optional unique ID for the rendered component
165
- * @property {Record<string, unknown>} [inputs] - Optional input properties for the component
166
- * @property {Injector} [injector] - Optional Angular injector for dependency injection
167
- * @property {Node[][]} [content] - Optional content nodes for projection
168
- * @property {AngularDynamicOutput[]} [children] - Optional child components
169
- * @property {Type<unknown>} [instance] - Optional component instance
170
- * @property {FormGroup} [formGroup] - Optional component FormGroup
171
- * @property {FormControl} [formControl] - Optional component FormControl
172
- * @memberOf module:engine
173
- */
174
- export interface AngularDynamicOutput {
175
- component?: Type<unknown>;
176
- rendererId?: string;
177
- inputs?: Record<string, unknown>;
178
- injector?: Injector;
179
- content?: Node[][];
180
- children?: AngularDynamicOutput[];
181
- instance?: Type<unknown>;
182
- formGroup?: FormGroup;
183
- formControl?: FormControl;
184
- }
185
- /**
186
- * @description Base option type for input components
187
- * @summary Defines the common structure for options used in select, radio, and checkbox inputs.
188
- * Contains properties for the display text, value, disabled state, CSS class, and icon.
189
- * @interface InputOption
190
- * @property {string} text - The display text for the option
191
- * @property {string|number} value - The value associated with the option
192
- * @property {StringOrBoolean} [disabled] - Whether the option is disabled
193
- * @property {string} [className] - CSS class name for styling the option
194
- * @property {string} [icon] - Icon to display with the option
195
- * @memberOf module:engine
196
- */
197
- export interface InputOption {
198
- text: string;
199
- value: string | number;
200
- disabled?: StringOrBoolean;
201
- className?: string;
202
- icon?: string;
203
- }
204
- /**
205
- * @description Interface for list component refresh events
206
- * @summary Defines the structure of a refresh event for list components.
207
- * Contains an array of key-value pairs representing the new data for the list.
208
- * @interface IListComponentRefreshEvent
209
- * @property {KeyValue[]} data - Array of key-value pairs representing the new data
210
- * @memberOf module:engine
211
- */
212
- export interface IListComponentRefreshEvent {
213
- data: KeyValue[];
214
- }
215
- /**
216
- * @description Form service control structure
217
- * @summary Defines the structure for a form control managed by the form service.
218
- * Contains the FormGroup control and the associated field properties for rendering.
219
- * @interface FormServiceControl
220
- * @property {FormGroup} control - The Angular FormGroup for the control
221
- * @property {AngularFieldDefinition} props - The field properties for rendering the control
222
- * @memberOf module:engine
223
- */
224
- export interface FormServiceControl {
225
- control: FormGroup;
226
- props: AngularFieldDefinition;
227
- }
228
- /**
229
- * @description Interface for list item custom events
230
- * @summary Defines the structure of custom events triggered by list items.
231
- * Extends BaseCustomEvent with additional properties for the action and primary key.
232
- * @interface ListItemCustomEvent
233
- * @property {string} action - The action performed on the list item
234
- * @property {string} [pk] - Optional primary key of the affected item
235
- * @property {any} data - The data associated with the event (inherited from BaseCustomEvent)
236
- * @property {HTMLElement} [target] - The target element (inherited from BaseCustomEvent)
237
- * @property {string} [name] - The name of the event (inherited from BaseCustomEvent)
238
- * @property {string} component - The component that triggered the event (inherited from BaseCustomEvent)
239
- * @memberOf module:engine
240
- */
241
- export interface ListItemCustomEvent extends BaseCustomEvent {
242
- action: string;
243
- pk?: string;
244
- }
245
- /**
246
- * @description Base interface for custom events
247
- * @summary Defines the base structure for custom events in the application.
248
- * Contains properties for the event data, target element, name, and component.
249
- * @interface BaseCustomEvent
250
- * @property {any} data - The data associated with the event
251
- * @property {HTMLElement} [target] - The target element that triggered the event
252
- * @property {string} [name] - The name of the event
253
- * @property {string} component - The component that triggered the event
254
- * @memberOf module:engine
255
- */
256
- export interface BaseCustomEvent {
257
- name: string;
258
- component?: string;
259
- data?: unknown;
260
- target?: HTMLElement;
261
- }
262
- /**
263
- * Configuration for internationalization (i18n) resource file paths.
264
- *
265
- * @property prefix - The prefix to be used for the resource file path.
266
- * @property suffix - The suffix to be appended to the resource file path.
267
- */
268
- export interface I18nResourceConfig {
269
- prefix: string;
270
- suffix: string;
271
- }
package/engine/types.d.ts DELETED
@@ -1,200 +0,0 @@
1
- import { IonCheckbox, IonInput, IonSelect, IonTextarea } from '@ionic/angular';
2
- import { TextFieldTypes } from '@ionic/core';
3
- import { FormArray, FormGroup } from '@angular/forms';
4
- import { BaseCustomEvent, FormServiceControl, InputOption } from './interfaces';
5
- import { Adapter, Repository } from '@decaf-ts/core';
6
- import { Context, RepositoryFlags } from '@decaf-ts/db-decorators';
7
- import { Constructor, Model } from '@decaf-ts/decorator-validation';
8
- export type HandlerLike = Record<string, (...args: unknown[]) => unknown | Promise<unknown>>;
9
- export interface RawQuery<M extends Model> {
10
- select: undefined | (keyof M)[];
11
- from: Constructor<M>;
12
- where: (el: M) => boolean;
13
- sort?: (el: M, el2: M) => number;
14
- limit?: number;
15
- skip?: number;
16
- }
17
- export type DecafRepositoryAdapter<F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = Adapter<any, any, RawQuery<any>, F, C>;
18
- export type DecafRepository<M extends Model> = Repository<M, RawQuery<M>, DecafRepositoryAdapter<RepositoryFlags, Context<RepositoryFlags>>, RepositoryFlags, Context<RepositoryFlags>>;
19
- /**
20
- * @description Generic key-value pair type
21
- * @summary Represents a generic object with string keys and any type of values.
22
- * This is commonly used for dynamic data structures where the properties are not known at compile time.
23
- * @typedef {Record<string, any>} KeyValue
24
- * @memberOf module:engine
25
- */
26
- export type KeyValue = Record<string, any>;
27
- /**
28
- * @description Generic function type
29
- * @summary Represents a function that accepts any number of arguments of any type
30
- * and returns any type. This is useful for defining function parameters or variables
31
- * where the exact function signature is not known at compile time.
32
- * @typedef FunctionLike
33
- * @memberOf module:engine
34
- */
35
- export type FunctionLike = (...args: any[]) => any;
36
- /**
37
- * @description Element size options for UI components
38
- * @summary Defines the possible size values that can be applied to UI elements.
39
- * These sizes control the dimensions and layout behavior of components.
40
- * @typedef {('small'|'medium'|'large'|'xlarge'|'2xlarge'|'auto'|'expand'|'block')} ElementSizes
41
- * @memberOf module:engine
42
- */
43
- export type ElementSizes = 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge' | 'auto' | 'expand' | 'block';
44
- /**
45
- * @description Basic position options for UI elements
46
- * @summary Defines the possible position values that can be applied to UI elements.
47
- * These positions control the alignment and placement of components.
48
- * @typedef {('left'|'center'|'right'|'top'|'bottom')} ElementPositions
49
- * @memberOf module:engine
50
- */
51
- export type ElementPositions = 'left' | 'center' | 'right' | 'top' | 'bottom';
52
- /**
53
- * @description Extended position options for flex layouts
54
- * @summary Extends the basic ElementPositions with additional flex-specific position values.
55
- * These positions are used for controlling alignment and distribution in flex containers.
56
- * @typedef {(ElementPositions|'stretch'|'middle'|'around'|'between')} FlexPositions
57
- * @memberOf module:engine
58
- */
59
- export type FlexPositions = ElementPositions | 'stretch' | 'middle' | 'around' | 'between';
60
- /**
61
- * @description Update mode options for form fields
62
- * @summary Defines when form field values should be updated in the model.
63
- * - 'change': Update on every change event
64
- * - 'blur': Update when the field loses focus
65
- * - 'submit': Update only when the form is submitted
66
- * @typedef {('change'|'blur'|'submit')} FieldUpdateMode
67
- * @memberOf module:engine
68
- */
69
- export type FieldUpdateMode = 'change' | 'blur' | 'submit';
70
- /**
71
- * @description Interface for models that can be rendered
72
- * @summary Defines the basic structure for models that can be rendered by the engine.
73
- * Contains an optional rendererId that uniquely identifies the rendered instance.
74
- * @interface RenderedModel
75
- * @property {string} [rendererId] - Optional unique ID for the rendered model instance
76
- * @memberOf module:engine
77
- */
78
- export interface RenderedModel {
79
- rendererId?: string;
80
- }
81
- /**
82
- * @description Possible input types for form fields
83
- * @summary Defines the possible input types that can be used in form fields.
84
- * Includes standard HTML input types like checkbox, radio, and select,
85
- * as well as Ionic's TextFieldTypes and textarea.
86
- * @typedef {('checkbox'|'radio'|'select'|TextFieldTypes|'textarea')} PossibleInputTypes
87
- * @memberOf module:engine
88
- */
89
- export type PossibleInputTypes = 'checkbox' | 'radio' | 'select' | TextFieldTypes | 'textarea';
90
- /**
91
- * @description Field definition for Angular components
92
- * @summary A comprehensive type that combines properties from various Ionic components
93
- * to define the structure of a field in an Angular form. It omits certain properties
94
- * from IonInput, picks specific properties from IonSelect, IonTextarea, and IonCheckbox,
95
- * and adds custom properties like type and className.
96
- * @typedef {Object} AngularFieldDefinition
97
- * @property {PossibleInputTypes} type - The type of input field
98
- * @property {string|string[]} className - CSS class name(s) for the field
99
- * @property {string} [cancelText] - Text for the cancel button (from IonSelect)
100
- * @property {string} [interface] - Interface style for select (from IonSelect)
101
- * @property {string} [selectedText] - Text for selected option (from IonSelect)
102
- * @property {Object} [interfaceOptions] - Options for the interface (from IonSelect)
103
- * @property {number} [rows] - Number of rows for textarea (from IonTextarea)
104
- * @property {number} [cols] - Number of columns for textarea (from IonTextarea)
105
- * @property {string} [alignment] - Alignment of checkbox (from IonCheckbox)
106
- * @property {string} [justify] - Justification of checkbox (from IonCheckbox)
107
- * @property {boolean} [checked] - Whether checkbox is checked (from IonCheckbox)
108
- * @memberOf module:engine
109
- */
110
- export type AngularFieldDefinition = Omit<IonInput, 'ionInput' | 'ionFocus' | 'ionChange' | 'ionBlur' | 'getInputElement' | 'setFocus' | 'label' | 'el' | 'z' | 'type'> & Pick<IonSelect, 'cancelText' | 'interface' | 'selectedText' | 'interfaceOptions'> & Pick<IonTextarea, 'rows' | 'cols'> & Pick<IonCheckbox, 'alignment' | 'justify' | 'checked'> & {
111
- type: PossibleInputTypes;
112
- className: string | string[];
113
- } & Record<string, unknown>;
114
- /**
115
- * @description String or boolean representation of a boolean value
116
- * @summary Represents a value that can be either a boolean or a string representation of a boolean.
117
- * This is useful for handling attribute values that can be specified as either strings or booleans.
118
- * @typedef {('true'|'false'|boolean)} StringOrBoolean
119
- * @memberOf module:engine
120
- */
121
- export type StringOrBoolean = 'true' | 'false' | boolean;
122
- /**
123
- * @description Option type for CRUD field inputs
124
- * @summary Represents a union type that can be either a SelectOption or RadioOption.
125
- * This is used for defining options in form fields that support both select and radio input types.
126
- * @typedef {(SelectOption|RadioOption)} CrudFieldOption
127
- * @memberOf module:engine
128
- */
129
- export type CrudFieldOption = SelectOption | RadioOption;
130
- /**
131
- * @description Option type for select inputs
132
- * @summary Extends the InputOption interface with a selected property to indicate
133
- * whether the option is selected by default.
134
- * @memberOf module:engine
135
- */
136
- export type SelectOption = InputOption & {
137
- selected?: boolean;
138
- };
139
- /**
140
- * @description Option type for radio inputs
141
- * @summary Extends the InputOption interface with a checked property to indicate
142
- * whether the option is checked by default.
143
- * @memberOf module:engine
144
- */
145
- export type RadioOption = InputOption & {
146
- checked?: boolean;
147
- };
148
- /**
149
- * @description Option type for checkbox inputs
150
- * @summary Alias for RadioOption, as checkbox options have the same structure as radio options.
151
- * @typedef {RadioOption} CheckboxOption
152
- * @memberOf module:engine
153
- */
154
- export type CheckboxOption = RadioOption;
155
- /**
156
- * @description Target options for HTML forms
157
- * @summary Defines the possible target values for HTML forms, including standard targets
158
- * like '_blank', '_self', '_parent', and '_top', as well as custom string values.
159
- * @typedef {('_blank'|'_self'|'_parent'|'_top'|string)} HTMLFormTarget
160
- * @memberOf module:engine
161
- */
162
- export type HTMLFormTarget = '_blank' | '_self' | '_parent' | '_top' | string;
163
- /**
164
- * @description Type for form service controls
165
- * @summary Defines the structure of form controls managed by the form service.
166
- * It's a nested record where the outer key is the form group name, the inner key
167
- * is the control name, and the value contains the form group and field properties.
168
- * @typedef {Record<string, Record<string, { control: FormGroup; props: AngularFieldDefinition }>>} FormServiceControls
169
- * @memberOf module:engine
170
- */
171
- export type FormServiceControls = Record<string, Record<string, FormServiceControl>>;
172
- /**
173
- * @description Renderer custom event type
174
- * @summary Combines BaseCustomEvent with KeyValue properties to create a flexible
175
- * custom event type for renderer components. This allows events to carry both
176
- * standard event properties and additional custom data.
177
- * @typedef RendererCustomEvent
178
- * @memberOf module:engine
179
- */
180
- export type RendererCustomEvent = BaseCustomEvent & KeyValue;
181
- /**
182
- * @description CRUD form event type
183
- * @summary Extends BaseCustomEvent to include optional handlers for CRUD form operations.
184
- * This event type is used for form-related actions like create, read, update, and delete operations.
185
- * @typedef CrudFormEvent
186
- * @property {Record<string, any>} [handlers] - Optional handlers for form operations
187
- * @memberOf module:engine
188
- */
189
- export type CrudFormEvent = BaseCustomEvent & {
190
- handlers?: Record<string, any>;
191
- };
192
- export type FormParent = FormGroup | FormArray;
193
- /**
194
- * @description Form parent group tuple
195
- * @summary Represents a tuple containing a FormGroup and its associated string identifier.
196
- * This is used for managing hierarchical form structures and parent-child relationships.
197
- * @typedef {[FormParent, string]} FormParentGroup
198
- * @memberOf module:engine
199
- */
200
- export type FormParentGroup = [FormParent, string];