@decaf-ts/for-angular 0.0.11 → 0.0.13

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 (85) hide show
  1. package/package.json +19 -91
  2. package/LICENSE.md +0 -659
  3. package/dist/lib/README.md +0 -92
  4. package/dist/lib/assets/i18n/en.json +0 -140
  5. package/dist/lib/assets/images/angular-logo.svg +0 -45
  6. package/dist/lib/assets/images/decaf-logo-black.svg +0 -22
  7. package/dist/lib/assets/images/decaf-logo-lw.svg +0 -50
  8. package/dist/lib/assets/images/decaf-logo-white.svg +0 -22
  9. package/dist/lib/assets/images/decaf-logo.svg +0 -54
  10. package/dist/lib/components/component-renderer/component-renderer.component.d.ts +0 -276
  11. package/dist/lib/components/crud-field/crud-field.component.d.ts +0 -445
  12. package/dist/lib/components/crud-form/constants.d.ts +0 -5
  13. package/dist/lib/components/crud-form/crud-form.component.d.ts +0 -102
  14. package/dist/lib/components/crud-form/types.d.ts +0 -17
  15. package/dist/lib/components/empty-state/empty-state.component.d.ts +0 -301
  16. package/dist/lib/components/fieldset/fieldset.component.d.ts +0 -199
  17. package/dist/lib/components/filter/filter.component.d.ts +0 -505
  18. package/dist/lib/components/for-angular-components.module.d.ts +0 -20
  19. package/dist/lib/components/index.d.ts +0 -16
  20. package/dist/lib/components/layout/layout.component.d.ts +0 -133
  21. package/dist/lib/components/list/constants.d.ts +0 -29
  22. package/dist/lib/components/list/list.component.d.ts +0 -849
  23. package/dist/lib/components/list-item/list-item.component.d.ts +0 -390
  24. package/dist/lib/components/model-renderer/model-renderer.component.d.ts +0 -96
  25. package/dist/lib/components/pagination/constants.d.ts +0 -7
  26. package/dist/lib/components/pagination/pagination.component.d.ts +0 -264
  27. package/dist/lib/components/searchbar/searchbar.component.d.ts +0 -407
  28. package/dist/lib/directives/collapsable.directive.d.ts +0 -8
  29. package/dist/lib/directives/index.d.ts +0 -1
  30. package/dist/lib/engine/DynamicModule.d.ts +0 -17
  31. package/dist/lib/engine/NgxBaseComponent.d.ts +0 -541
  32. package/dist/lib/engine/NgxCrudFormField.d.ts +0 -118
  33. package/dist/lib/engine/NgxFormService.d.ts +0 -167
  34. package/dist/lib/engine/NgxRenderingEngine.d.ts +0 -127
  35. package/dist/lib/engine/NgxRenderingEngine2.d.ts +0 -250
  36. package/dist/lib/engine/ValidatorFactory.d.ts +0 -15
  37. package/dist/lib/engine/constants.d.ts +0 -151
  38. package/dist/lib/engine/decorators.d.ts +0 -25
  39. package/dist/lib/engine/index.d.ts +0 -16
  40. package/dist/lib/engine/types.d.ts +0 -381
  41. package/dist/lib/esm2022/components/component-renderer/component-renderer.component.mjs +0 -313
  42. package/dist/lib/esm2022/components/crud-field/crud-field.component.mjs +0 -301
  43. package/dist/lib/esm2022/components/crud-form/constants.mjs +0 -14
  44. package/dist/lib/esm2022/components/crud-form/crud-form.component.mjs +0 -139
  45. package/dist/lib/esm2022/components/crud-form/types.mjs +0 -2
  46. package/dist/lib/esm2022/components/empty-state/empty-state.component.mjs +0 -348
  47. package/dist/lib/esm2022/components/fieldset/fieldset.component.mjs +0 -225
  48. package/dist/lib/esm2022/components/filter/filter.component.mjs +0 -689
  49. package/dist/lib/esm2022/components/for-angular-components.module.mjs +0 -71
  50. package/dist/lib/esm2022/components/index.mjs +0 -20
  51. package/dist/lib/esm2022/components/layout/layout.component.mjs +0 -176
  52. package/dist/lib/esm2022/components/list/constants.mjs +0 -6
  53. package/dist/lib/esm2022/components/list/list.component.mjs +0 -1236
  54. package/dist/lib/esm2022/components/list-item/list-item.component.mjs +0 -408
  55. package/dist/lib/esm2022/components/model-renderer/model-renderer.component.mjs +0 -138
  56. package/dist/lib/esm2022/components/pagination/constants.mjs +0 -2
  57. package/dist/lib/esm2022/components/pagination/pagination.component.mjs +0 -323
  58. package/dist/lib/esm2022/components/searchbar/searchbar.component.mjs +0 -493
  59. package/dist/lib/esm2022/decaf-ts-for-angular.mjs +0 -5
  60. package/dist/lib/esm2022/directives/collapsable.directive.mjs +0 -28
  61. package/dist/lib/esm2022/directives/index.mjs +0 -2
  62. package/dist/lib/esm2022/engine/DynamicModule.mjs +0 -18
  63. package/dist/lib/esm2022/engine/NgxBaseComponent.mjs +0 -539
  64. package/dist/lib/esm2022/engine/NgxCrudFormField.mjs +0 -125
  65. package/dist/lib/esm2022/engine/NgxFormService.mjs +0 -315
  66. package/dist/lib/esm2022/engine/NgxRenderingEngine.mjs +0 -192
  67. package/dist/lib/esm2022/engine/NgxRenderingEngine2.mjs +0 -332
  68. package/dist/lib/esm2022/engine/ValidatorFactory.mjs +0 -102
  69. package/dist/lib/esm2022/engine/constants.mjs +0 -160
  70. package/dist/lib/esm2022/engine/decorators.mjs +0 -38
  71. package/dist/lib/esm2022/engine/index.mjs +0 -17
  72. package/dist/lib/esm2022/engine/types.mjs +0 -4
  73. package/dist/lib/esm2022/for-angular.module.mjs +0 -118
  74. package/dist/lib/esm2022/helpers/index.mjs +0 -13
  75. package/dist/lib/esm2022/helpers/utils.mjs +0 -415
  76. package/dist/lib/esm2022/interfaces.mjs +0 -2
  77. package/dist/lib/esm2022/public-apis.mjs +0 -14
  78. package/dist/lib/fesm2022/decaf-ts-for-angular.mjs +0 -7109
  79. package/dist/lib/fesm2022/decaf-ts-for-angular.mjs.map +0 -1
  80. package/dist/lib/for-angular.module.d.ts +0 -45
  81. package/dist/lib/helpers/index.d.ts +0 -12
  82. package/dist/lib/helpers/utils.d.ts +0 -253
  83. package/dist/lib/index.d.ts +0 -5
  84. package/dist/lib/interfaces.d.ts +0 -28
  85. package/dist/lib/public-apis.d.ts +0 -13
@@ -1,151 +0,0 @@
1
- /**
2
- * @description Angular engine key constants
3
- * @summary Contains key strings used by the Angular rendering engine for reflection,
4
- * dynamic component creation, and other engine operations.
5
- * @typedef {Object} AngularEngineKeys
6
- * @property {string} REFLECT - Prefix for reflection metadata keys
7
- * @property {string} DYNAMIC - Key for dynamic component identification
8
- * @property {string} ANNOTATIONS - Key for component annotations
9
- * @property {string} ECMP - Key for embedded components
10
- * @property {string} NG_REFLECT - Prefix for Angular reflection attributes
11
- * @property {string} RENDERED - Prefix for rendered component markers
12
- * @property {string} MAPPER - Key for property mappers
13
- * @property {string} CHILDREN - Key for child components
14
- * @property {string} LISTABLE - Key for listable components
15
- * @property {string} RENDER - Key for renderable components
16
- * @property {string} RENDERED_ID - Template for rendered component IDs
17
- * @property {string} PARENT - Key for comparison decorators and validators
18
- * @const AngularEngineKeys
19
- * @memberOf module:engine
20
- */
21
- export declare const AngularEngineKeys: {
22
- REFLECT: string;
23
- DYNAMIC: string;
24
- ANNOTATIONS: string;
25
- ECMP: string;
26
- NG_REFLECT: string;
27
- RENDERED: string;
28
- MAPPER: string;
29
- CHILDREN: string;
30
- LISTABLE: string;
31
- RENDER: string;
32
- RENDERED_ID: string;
33
- PARENT: string;
34
- VALIDATION_PARENT_KEY: symbol;
35
- };
36
- /**
37
- * @description Form validation state constants
38
- * @summary Contains constants representing the possible validation states of a form.
39
- * These are used to check and handle form validation throughout the application.
40
- * @typedef {Object} FormConstants
41
- * @property {string} VALID - Constant representing a valid form state
42
- * @property {string} INVALID - Constant representing an invalid form state
43
- * @const FormConstants
44
- * @memberOf module:engine
45
- */
46
- export declare const FormConstants: {
47
- VALID: string;
48
- INVALID: string;
49
- };
50
- /**
51
- * @description Event name constants
52
- * @summary Enum containing constants for event names used throughout the application.
53
- * These are used to standardize event naming and handling.
54
- * @enum {string}
55
- * @readonly
56
- * @property {string} BACK_BUTTON_NAVIGATION - Event fired when back button navigation ends
57
- * @property {string} REFRESH_EVENT - Event fired when a refresh action occurs
58
- * @property {string} CLICK_EVENT - Event fired when a click action occurs
59
- * @property {string} SUBMIT_EVENT - Event fired when a form submission occurs
60
- * @memberOf module:engine
61
- */
62
- export declare enum EventConstants {
63
- BACK_BUTTON_NAVIGATION = "backButtonNavigationEndEvent",
64
- REFRESH_EVENT = "RefreshEvent",
65
- CLICK_EVENT = "ClickEvent",
66
- SUBMIT_EVENT = "SubmitEvent"
67
- }
68
- /**
69
- * @description Logger level constants
70
- * @summary Enum defining the logging levels used in the application's logging system.
71
- * Lower values represent more verbose logging, while higher values represent more critical logs.
72
- * @enum {number}
73
- * @readonly
74
- * @property {number} ALL - Log everything (most verbose)
75
- * @property {number} DEBUG - Log debug information
76
- * @property {number} INFO - Log informational messages
77
- * @property {number} WARN - Log warnings
78
- * @property {number} ERROR - Log errors
79
- * @property {number} CRITICAL - Log critical errors (least verbose)
80
- * @memberOf module:engine
81
- */
82
- export declare enum LoggerLevels {
83
- ALL = 0,
84
- DEBUG = 1,
85
- INFO = 2,
86
- WARN = 3,
87
- ERROR = 4,
88
- CRITICAL = 5
89
- }
90
- /**
91
- * @description Route direction constants
92
- * @summary Enum defining the possible navigation directions in the application.
93
- * Used for controlling navigation flow and animation directions.
94
- * @enum {string}
95
- * @readonly
96
- * @property {string} BACK - Navigate back to the previous page
97
- * @property {string} FORWARD - Navigate forward to the next page
98
- * @property {string} ROOT - Navigate to the root/home page
99
- * @memberOf module:engine
100
- */
101
- export declare enum RouteDirections {
102
- BACK = "back",
103
- FORWARD = "forward",
104
- ROOT = "root"
105
- }
106
- /**
107
- * @description Component tag name constants
108
- * @summary Enum defining the tag names for custom components used in the application.
109
- * These tag names are used for component registration and rendering.
110
- * @enum {string}
111
- * @readonly
112
- * @property {string} LIST_ITEM - Tag name for list item component
113
- * @property {string} LIST_INFINITE - Tag name for infinite scrolling list component
114
- * @property {string} LIST_PAGINATED - Tag name for paginated list component
115
- * @memberOf module:engine
116
- */
117
- export declare enum ComponentsTagNames {
118
- LIST_ITEM = "ngx-decaf-list-item",
119
- LIST_INFINITE = "ngx-decaf-list-infinite",
120
- LIST_PAGINATED = "ngx-decaf-list-paginated"
121
- }
122
- /**
123
- * @description Base component property name constants
124
- * @summary Enum defining the standard property names used by base components in the application.
125
- * These property names are used for consistent property access across components.
126
- * @enum {string}
127
- * @readonly
128
- * @property {string} MODEL - Property name for the component's data model
129
- * @property {string} LOCALE - Property name for localization settings
130
- * @property {string} PK - Property name for primary key
131
- * @property {string} ITEMS - Property name for collection items
132
- * @property {string} ROUTE - Property name for routing information
133
- * @property {string} OPERATIONS - Property name for available operations
134
- * @property {string} UID - Property name for unique identifier
135
- * @property {string} TRANSLATABLE - Property name for translation flag
136
- * @property {string} MAPPER - Property name for property mapper
137
- * @property {string} INITIALIZED - Property name for initialization state
138
- * @memberOf module:engine
139
- */
140
- export declare enum BaseComponentProps {
141
- MODEL = "model",
142
- LOCALE = "locale",
143
- PK = "pk",
144
- ITEMS = "items",
145
- ROUTE = "route",
146
- OPERATIONS = "operations",
147
- UID = "uid",
148
- TRANSLATABLE = "translatable",
149
- MAPPER = "mapper",
150
- INITIALIZED = "initialized"
151
- }
@@ -1,25 +0,0 @@
1
- /**
2
- * @description Marks an Angular component as dynamically loadable
3
- * @summary Decorator that registers an Angular component with the NgxRenderingEngine2 for dynamic loading.
4
- * This decorator must be applied before the @Component decorator to properly extract component metadata.
5
- * It adds metadata to the component class and registers it with the rendering engine using its selector.
6
- * @function Dynamic
7
- * @return {Function} A decorator function that can be applied to Angular component classes
8
- * @mermaid
9
- * sequenceDiagram
10
- * participant C as Component Class
11
- * participant D as Dynamic Decorator
12
- * participant R as NgxRenderingEngine2
13
- * participant M as Angular Metadata
14
- * C->>D: Apply decorator
15
- * D->>M: reflectComponentType()
16
- * M-->>D: Return component metadata
17
- * alt No metadata found
18
- * D->>D: Throw InternalError
19
- * else Metadata found
20
- * D->>R: registerComponent(selector, constructor)
21
- * D->>C: Apply metadata
22
- * end
23
- * @category Decorators
24
- */
25
- export declare function Dynamic(): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
@@ -1,16 +0,0 @@
1
- /**
2
- * @module engine
3
- * @description Angular rendering engine for Decaf applications
4
- * @summary The engine module provides core functionality for rendering Angular components
5
- * in Decaf applications. It includes constants, decorators, rendering engines, and utility types
6
- * that enable dynamic component creation, property mapping, and component lifecycle management.
7
- * Key exports include {@link NgxRenderingEngine}, {@link DynamicModule}, and various decorators
8
- * for component configuration.
9
- */
10
- export * from './constants';
11
- export * from './decorators';
12
- export * from './DynamicModule';
13
- export * from './NgxRenderingEngine';
14
- export * from './NgxRenderingEngine2';
15
- export * from './types';
16
- export * from './NgxBaseComponent';
@@ -1,381 +0,0 @@
1
- import { IonCheckbox, IonInput, IonSelect, IonTextarea } from '@ionic/angular';
2
- import { TextFieldTypes } from '@ionic/core';
3
- import { EnvironmentInjector, Injector, Type } from '@angular/core';
4
- import { FormControl, FormGroup } from '@angular/forms';
5
- import { FieldProperties } from '@decaf-ts/ui-decorators';
6
- import { OrderDirection } from '@decaf-ts/core';
7
- /**
8
- * @description Generic key-value pair type
9
- * @summary Represents a generic object with string keys and any type of values.
10
- * This is commonly used for dynamic data structures where the properties are not known at compile time.
11
- * @typedef {Record<string, any>} KeyValue
12
- * @memberOf module:engine
13
- */
14
- export type KeyValue = Record<string, any>;
15
- /**
16
- * @description Generic function type
17
- * @summary Represents a function that accepts any number of arguments of any type
18
- * and returns any type. This is useful for defining function parameters or variables
19
- * where the exact function signature is not known at compile time.
20
- * @typedef FunctionLike
21
- * @memberOf module:engine
22
- */
23
- export type FunctionLike = (...args: any[]) => any;
24
- /**
25
- * @description Element size options for UI components
26
- * @summary Defines the possible size values that can be applied to UI elements.
27
- * These sizes control the dimensions and layout behavior of components.
28
- * @typedef {('small'|'medium'|'large'|'xlarge'|'2xlarge'|'auto'|'expand'|'block')} ElementSizes
29
- * @memberOf module:engine
30
- */
31
- export type ElementSizes = 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge' | 'auto' | 'expand' | 'block';
32
- /**
33
- * @description Basic position options for UI elements
34
- * @summary Defines the possible position values that can be applied to UI elements.
35
- * These positions control the alignment and placement of components.
36
- * @typedef {('left'|'center'|'right'|'top'|'bottom')} ElementPositions
37
- * @memberOf module:engine
38
- */
39
- export type ElementPositions = 'left' | 'center' | 'right' | 'top' | 'bottom';
40
- /**
41
- * @description Extended position options for flex layouts
42
- * @summary Extends the basic ElementPositions with additional flex-specific position values.
43
- * These positions are used for controlling alignment and distribution in flex containers.
44
- * @typedef {(ElementPositions|'stretch'|'middle'|'around'|'between')} FlexPositions
45
- * @memberOf module:engine
46
- */
47
- export type FlexPositions = ElementPositions | 'stretch' | 'middle' | 'around' | 'between';
48
- /**
49
- * @description Update mode options for form fields
50
- * @summary Defines when form field values should be updated in the model.
51
- * - 'change': Update on every change event
52
- * - 'blur': Update when the field loses focus
53
- * - 'submit': Update only when the form is submitted
54
- * @typedef {('change'|'blur'|'submit')} FieldUpdateMode
55
- * @memberOf module:engine
56
- */
57
- export type FieldUpdateMode = 'change' | 'blur' | 'submit';
58
- /**
59
- * @description Metadata structure for Angular components
60
- * @summary Defines the structure of metadata for Angular components, including
61
- * change detection strategy, selector, standalone status, imports, template, and styles.
62
- * This is used for reflection and dynamic component creation.
63
- * @interface ComponentMetadata
64
- * @property {number} changeDetection - The change detection strategy number
65
- * @property {string} selector - The CSS selector for the component
66
- * @property {boolean} standalone - Whether the component is standalone
67
- * @property imports - Array of imported modules/components
68
- * @property {string} template - The HTML template for the component
69
- * @property {string[]} styles - Array of CSS styles for the component
70
- * @memberOf module:engine
71
- */
72
- export interface ComponentMetadata {
73
- changeDetection: number;
74
- selector: string;
75
- standalone: boolean;
76
- imports: (new (...args: unknown[]) => unknown)[];
77
- template: string;
78
- styles: string[];
79
- }
80
- /**
81
- * @description Output structure from the Angular rendering engine
82
- * @summary Defines the structure of the output produced by the NgxRenderingEngine
83
- * when rendering a component. Contains the component type, inputs, injector,
84
- * content nodes, and child components.
85
- * @typedef {Object} AngularDynamicOutput
86
- * @property {Type<unknown>} component - The Angular component type
87
- * @property {string} [rendererId] - Optional unique ID for the rendered component
88
- * @property {Record<string, unknown>} [inputs] - Optional input properties for the component
89
- * @property {Injector} [injector] - Optional Angular injector for dependency injection
90
- * @property {Node[][]} [content] - Optional content nodes for projection
91
- * @property {AngularDynamicOutput[]} [children] - Optional child components
92
- * @property {Type<unknown>} [instance] - Optional component instance
93
- * @property {FormGroup} [formGroup] - Optional component FormGroup
94
- * @property {FormControl} [formControl] - Optional component FormControl
95
- * @memberOf module:engine
96
- */
97
- export interface AngularDynamicOutput {
98
- component: Type<unknown>;
99
- rendererId?: string;
100
- inputs?: Record<string, unknown>;
101
- injector?: Injector;
102
- content?: Node[][];
103
- children?: AngularDynamicOutput[];
104
- instance?: Type<unknown>;
105
- formGroup?: FormGroup;
106
- formControl?: FormControl;
107
- }
108
- /**
109
- * @description Interface for models that can be rendered
110
- * @summary Defines the basic structure for models that can be rendered by the engine.
111
- * Contains an optional rendererId that uniquely identifies the rendered instance.
112
- * @interface RenderedModel
113
- * @property {string} [rendererId] - Optional unique ID for the rendered model instance
114
- * @memberOf module:engine
115
- */
116
- export interface RenderedModel {
117
- rendererId?: string;
118
- }
119
- /**
120
- * @description Possible input types for form fields
121
- * @summary Defines the possible input types that can be used in form fields.
122
- * Includes standard HTML input types like checkbox, radio, and select,
123
- * as well as Ionic's TextFieldTypes and textarea.
124
- * @typedef {('checkbox'|'radio'|'select'|TextFieldTypes|'textarea')} PossibleInputTypes
125
- * @memberOf module:engine
126
- */
127
- export type PossibleInputTypes = 'checkbox' | 'radio' | 'select' | TextFieldTypes | 'textarea';
128
- /**
129
- * @description Field definition for Angular components
130
- * @summary A comprehensive type that combines properties from various Ionic components
131
- * to define the structure of a field in an Angular form. It omits certain properties
132
- * from IonInput, picks specific properties from IonSelect, IonTextarea, and IonCheckbox,
133
- * and adds custom properties like type and className.
134
- * @typedef {Object} AngularFieldDefinition
135
- * @property {PossibleInputTypes} type - The type of input field
136
- * @property {string|string[]} className - CSS class name(s) for the field
137
- * @property {string} [cancelText] - Text for the cancel button (from IonSelect)
138
- * @property {string} [interface] - Interface style for select (from IonSelect)
139
- * @property {string} [selectedText] - Text for selected option (from IonSelect)
140
- * @property {Object} [interfaceOptions] - Options for the interface (from IonSelect)
141
- * @property {number} [rows] - Number of rows for textarea (from IonTextarea)
142
- * @property {number} [cols] - Number of columns for textarea (from IonTextarea)
143
- * @property {string} [alignment] - Alignment of checkbox (from IonCheckbox)
144
- * @property {string} [justify] - Justification of checkbox (from IonCheckbox)
145
- * @property {boolean} [checked] - Whether checkbox is checked (from IonCheckbox)
146
- * @memberOf module:engine
147
- */
148
- 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'> & {
149
- type: PossibleInputTypes;
150
- className: string | string[];
151
- } & Record<string, unknown>;
152
- /**
153
- * @description String or boolean representation of a boolean value
154
- * @summary Represents a value that can be either a boolean or a string representation of a boolean.
155
- * This is useful for handling attribute values that can be specified as either strings or booleans.
156
- * @typedef {('true'|'false'|boolean)} StringOrBoolean
157
- * @memberOf module:engine
158
- */
159
- export type StringOrBoolean = 'true' | 'false' | boolean;
160
- /**
161
- * @description Option type for select inputs
162
- * @summary Extends the InputOption interface with a selected property to indicate
163
- * whether the option is selected by default.
164
- * @memberOf module:engine
165
- */
166
- export type SelectOption = InputOption & {
167
- selected?: boolean;
168
- };
169
- /**
170
- * @description Option type for radio inputs
171
- * @summary Extends the InputOption interface with a checked property to indicate
172
- * whether the option is checked by default.
173
- * @memberOf module:engine
174
- */
175
- export type RadioOption = InputOption & {
176
- checked?: boolean;
177
- };
178
- /**
179
- * @description Option type for checkbox inputs
180
- * @summary Alias for RadioOption, as checkbox options have the same structure as radio options.
181
- * @typedef {RadioOption} CheckboxOption
182
- * @memberOf module:engine
183
- */
184
- export type CheckboxOption = RadioOption;
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 Target options for HTML forms
206
- * @summary Defines the possible target values for HTML forms, including standard targets
207
- * like '_blank', '_self', '_parent', and '_top', as well as custom string values.
208
- * @typedef {('_blank'|'_self'|'_parent'|'_top'|string)} HTMLFormTarget
209
- * @memberOf module:engine
210
- */
211
- export type HTMLFormTarget = '_blank' | '_self' | '_parent' | '_top' | string;
212
- /**
213
- * @description Interface for list component refresh events
214
- * @summary Defines the structure of a refresh event for list components.
215
- * Contains an array of key-value pairs representing the new data for the list.
216
- * @interface IListComponentRefreshEvent
217
- * @property {KeyValue[]} data - Array of key-value pairs representing the new data
218
- * @memberOf module:engine
219
- */
220
- export interface IListComponentRefreshEvent {
221
- data: KeyValue[];
222
- }
223
- /**
224
- * @description Form service control structure
225
- * @summary Defines the structure for a form control managed by the form service.
226
- * Contains the FormGroup control and the associated field properties for rendering.
227
- * @interface FormServiceControl
228
- * @property {FormGroup} control - The Angular FormGroup for the control
229
- * @property {AngularFieldDefinition} props - The field properties for rendering the control
230
- * @memberOf module:engine
231
- */
232
- export interface FormServiceControl {
233
- control: FormGroup;
234
- props: AngularFieldDefinition;
235
- }
236
- /**
237
- * @description Type for form service controls
238
- * @summary Defines the structure of form controls managed by the form service.
239
- * It's a nested record where the outer key is the form group name, the inner key
240
- * is the control name, and the value contains the form group and field properties.
241
- * @typedef {Record<string, Record<string, { control: FormGroup; props: AngularFieldDefinition }>>} FormServiceControls
242
- * @memberOf module:engine
243
- */
244
- export type FormServiceControls = Record<string, Record<string, FormServiceControl>>;
245
- /**
246
- * @description Renderer custom event type
247
- * @summary Combines BaseCustomEvent with KeyValue properties to create a flexible
248
- * custom event type for renderer components. This allows events to carry both
249
- * standard event properties and additional custom data.
250
- * @typedef RendererCustomEvent
251
- * @memberOf module:engine
252
- */
253
- export type RendererCustomEvent = BaseCustomEvent & KeyValue;
254
- /**
255
- * @description Interface for list item custom events
256
- * @summary Defines the structure of custom events triggered by list items.
257
- * Extends BaseCustomEvent with additional properties for the action and primary key.
258
- * @interface ListItemCustomEvent
259
- * @property {string} action - The action performed on the list item
260
- * @property {string} [pk] - Optional primary key of the affected item
261
- * @property {any} data - The data associated with the event (inherited from BaseCustomEvent)
262
- * @property {HTMLElement} [target] - The target element (inherited from BaseCustomEvent)
263
- * @property {string} [name] - The name of the event (inherited from BaseCustomEvent)
264
- * @property {string} component - The component that triggered the event (inherited from BaseCustomEvent)
265
- * @memberOf module:engine
266
- */
267
- export interface ListItemCustomEvent extends BaseCustomEvent {
268
- action: string;
269
- pk?: string;
270
- }
271
- /**
272
- * @description Base interface for custom events
273
- * @summary Defines the base structure for custom events in the application.
274
- * Contains properties for the event data, target element, name, and component.
275
- * @interface BaseCustomEvent
276
- * @property {any} data - The data associated with the event
277
- * @property {HTMLElement} [target] - The target element that triggered the event
278
- * @property {string} [name] - The name of the event
279
- * @property {string} component - The component that triggered the event
280
- * @memberOf module:engine
281
- */
282
- export interface BaseCustomEvent {
283
- name: string;
284
- component: string;
285
- data?: unknown;
286
- target?: HTMLElement;
287
- }
288
- /**
289
- * @description CRUD form event type
290
- * @summary Extends BaseCustomEvent to include optional handlers for CRUD form operations.
291
- * This event type is used for form-related actions like create, read, update, and delete operations.
292
- * @typedef CrudFormEvent
293
- * @property {Record<string, any>} [handlers] - Optional handlers for form operations
294
- * @memberOf module:engine
295
- */
296
- export type CrudFormEvent = BaseCustomEvent & {
297
- handlers?: Record<string, any>;
298
- };
299
- /**
300
- * @description Component input properties
301
- * @summary Extends FieldProperties with additional properties specific to Angular components.
302
- * Includes update mode for form controls and optional FormGroup and FormControl references.
303
- * @interface ComponentInput
304
- * @property {FieldUpdateMode} [updateMode] - When the field value should be updated
305
- * @property {FormGroup} [formGroup] - Optional FormGroup reference
306
- * @property {FormControl} [formControl] - Optional FormControl reference
307
- * @memberOf module:engine
308
- */
309
- export interface ComponentInput extends FieldProperties {
310
- updateMode?: FieldUpdateMode;
311
- formGroup?: FormGroup;
312
- formControl?: FormControl;
313
- }
314
- /**
315
- * @description Component configuration structure
316
- * @summary Defines the configuration for dynamically creating Angular components.
317
- * Contains the component name, input properties, injector, and optional child components.
318
- * @interface ComponentConfig
319
- * @property {string} component - The name of the component to render
320
- * @property {ComponentInput} inputs - The input properties for the component
321
- * @property {EnvironmentInjector | Injector} injector - The Angular injector for dependency injection
322
- * @property {ComponentConfig[]} [children] - Optional child component configurations
323
- * @memberOf module:engine
324
- */
325
- export interface ComponentConfig {
326
- component: string;
327
- inputs: ComponentInput;
328
- injector: EnvironmentInjector | Injector;
329
- children?: ComponentConfig[];
330
- }
331
- /**
332
- * @description Form parent group tuple
333
- * @summary Represents a tuple containing a FormGroup and its associated string identifier.
334
- * This is used for managing hierarchical form structures and parent-child relationships.
335
- * @typedef {[FormGroup, string]} FormParentGroup
336
- * @memberOf module:engine
337
- */
338
- export type FormParentGroup = [FormGroup, string];
339
- /**
340
- * @description Interface for individual filter query items
341
- * @summary Defines the structure of a single filter criterion in a filter query.
342
- * Each item represents one condition to be applied to the data, consisting of
343
- * an index (field name), a condition (comparison operator), and a value to compare against.
344
- * @interface IFilterQueryItem
345
- * @property {string} [index] - Optional field name or index to filter on
346
- * @property {string} [condition] - Optional comparison condition (e.g., 'Equal', 'Contains', 'Greater Than')
347
- * @property {string} [value] - Optional value to compare the field against
348
- * @memberOf module:engine
349
- */
350
- export interface IFilterQueryItem {
351
- index?: string;
352
- condition?: string;
353
- value?: string;
354
- }
355
- /**
356
- * @description Interface for sorting configuration objects
357
- * @summary Defines the structure for specifying sort criteria including the field
358
- * to sort by and the direction of the sort (ascending or descending).
359
- * @interface ISortObject
360
- * @property {string} value - The field name or property to sort by
361
- * @property {OrderDirection} direction - The sort direction (ASC or DSC)
362
- * @memberOf module:engine
363
- */
364
- export interface ISortObject {
365
- value: string;
366
- direction: OrderDirection;
367
- }
368
- /**
369
- * @description Interface for complete filter query configuration
370
- * @summary Defines the complete structure for filter and sort operations.
371
- * Combines multiple filter criteria with sorting configuration to provide
372
- * comprehensive data filtering and ordering capabilities.
373
- * @interface IFilterQuery
374
- * @property {IFilterQueryItem[] | undefined} query - Array of filter criteria or undefined for no filtering
375
- * @property {ISortObject} sort - Sorting configuration specifying field and direction
376
- * @memberOf module:engine
377
- */
378
- export interface IFilterQuery {
379
- query: IFilterQueryItem[] | undefined;
380
- sort: ISortObject;
381
- }