@decaf-ts/ui-decorators 0.14.0 → 0.15.0

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 (55) hide show
  1. package/lib/cjs/index.cjs +1 -1
  2. package/lib/esm/index.js +1 -1
  3. package/lib/types/index.d.cts +4 -4
  4. package/lib/types/index.d.mts +4 -4
  5. package/lib/types/model/decorators.d.cts +1 -1
  6. package/lib/types/model/decorators.d.mts +1 -1
  7. package/lib/types/model/index.d.cts +3 -3
  8. package/lib/types/model/index.d.mts +3 -3
  9. package/lib/types/model/model.d.cts +2 -2
  10. package/lib/types/model/model.d.mts +2 -2
  11. package/lib/types/overrides/index.d.cts +1 -1
  12. package/lib/types/overrides/index.d.mts +1 -1
  13. package/lib/types/ui/DecafComponent.d.cts +3 -3
  14. package/lib/types/ui/DecafComponent.d.mts +3 -3
  15. package/lib/types/ui/DecafEventHandler.d.cts +1 -1
  16. package/lib/types/ui/DecafEventHandler.d.mts +1 -1
  17. package/lib/types/ui/Rendering.d.cts +1 -1
  18. package/lib/types/ui/Rendering.d.mts +1 -1
  19. package/lib/types/ui/UIValidator.d.cts +1 -1
  20. package/lib/types/ui/UIValidator.d.mts +1 -1
  21. package/lib/types/ui/decorators.d.cts +2 -2
  22. package/lib/types/ui/decorators.d.mts +2 -2
  23. package/lib/types/ui/index.d.cts +11 -11
  24. package/lib/types/ui/index.d.mts +11 -11
  25. package/lib/types/ui/interfaces.d.cts +1 -1
  26. package/lib/types/ui/interfaces.d.mts +1 -1
  27. package/lib/types/ui/types.d.cts +2 -2
  28. package/lib/types/ui/types.d.mts +2 -2
  29. package/lib/types/ui/utils.d.cts +1 -1
  30. package/lib/types/ui/utils.d.mts +1 -1
  31. package/lib/types/ui/validator.d.cts +1 -1
  32. package/lib/types/ui/validator.d.mts +1 -1
  33. package/package.json +1 -1
  34. package/lib/types/index.d.ts +0 -19
  35. package/lib/types/model/Renderable.d.ts +0 -18
  36. package/lib/types/model/decorators.d.ts +0 -318
  37. package/lib/types/model/index.d.ts +0 -4
  38. package/lib/types/model/model.d.ts +0 -31
  39. package/lib/types/model/overrides.d.ts +0 -9
  40. package/lib/types/overrides/ModelBuilderExtensions.d.ts +0 -16
  41. package/lib/types/overrides/index.d.ts +0 -6
  42. package/lib/types/ui/DecafComponent.d.ts +0 -293
  43. package/lib/types/ui/DecafEventHandler.d.ts +0 -43
  44. package/lib/types/ui/DecafTranslateService.d.ts +0 -5
  45. package/lib/types/ui/Rendering.d.ts +0 -202
  46. package/lib/types/ui/UIValidator.d.ts +0 -6
  47. package/lib/types/ui/constants.d.ts +0 -355
  48. package/lib/types/ui/decorators.d.ts +0 -482
  49. package/lib/types/ui/errors.d.ts +0 -32
  50. package/lib/types/ui/index.d.ts +0 -11
  51. package/lib/types/ui/interfaces.d.ts +0 -64
  52. package/lib/types/ui/overrides.d.ts +0 -1
  53. package/lib/types/ui/types.d.ts +0 -186
  54. package/lib/types/ui/utils.d.ts +0 -27
  55. package/lib/types/ui/validator.d.ts +0 -9
@@ -1,43 +0,0 @@
1
- import { Model } from "@decaf-ts/decorator-validation";
2
- import { DecafComponent } from "./DecafComponent";
3
- /**
4
- * @description Class representing an event handler
5
- * @summary Defines the structure for handling events in the UI decorators system
6
- * This class provides a foundation for managing and processing events that occur
7
- * within the UI components generated by the decorators.
8
- * @class EventHandler
9
- * @memberOf module:ui-decorators/ui
10
- */
11
- export declare class DecafEventHandler extends DecafComponent<Model> {
12
- /**
13
- * @description Creates an instance of DecafEventHandler
14
- * @summary Initializes a new EventHandler object
15
- * This constructor currently doesn't take any parameters, but it can be
16
- * extended in the future to accept configuration options if needed.
17
- */
18
- constructor();
19
- /**
20
- * Handles an event with the provided arguments.
21
- * Logs the event handling process, including the component name and the arguments passed.
22
- *
23
- * @param args - The arguments for the event handler.
24
- * @returns void
25
- */
26
- handle(...args: unknown[]): void;
27
- /**
28
- * Handles an click event with the provided arguments.
29
- * Logs the event handling process, including the component name and the arguments passed.
30
- *
31
- * @param args - The arguments for the event handler.
32
- * @returns void
33
- */
34
- handleClick(...args: unknown[]): void;
35
- /**
36
- * Handles an click event with the provided arguments.
37
- * Logs the event handling process, including the component name and the arguments passed.
38
- *
39
- * @param args - The arguments for the event handler.
40
- * @returns void
41
- */
42
- handleAction(...args: unknown[]): void;
43
- }
@@ -1,5 +0,0 @@
1
- import { LoggedClass } from "@decaf-ts/logging";
2
- export declare class DecafTranslateService extends LoggedClass {
3
- translate(key: string, params?: Record<string, any>): any;
4
- instant(key: string, params?: Record<string, any>): any;
5
- }
@@ -1,202 +0,0 @@
1
- import { FieldDefinition } from "./types";
2
- import { Model, ValidationMetadata } from "@decaf-ts/decorator-validation";
3
- /**
4
- * @description Abstract class for rendering UI components based on model metadata.
5
- * @summary The RenderingEngine class provides a framework for converting model metadata into UI field definitions.
6
- * It handles the translation of model properties to UI elements, applies validation rules, and manages different rendering flavors.
7
- * This class is designed to be extended by specific rendering implementations.
8
- *
9
- * @template T The type of the rendering result, defaults to void
10
- * @template R The type of the field definition, defaults to FieldDefinition<T>
11
- *
12
- * @param {string} flavour - The flavor of the rendering engine.
13
- *
14
- * @class RenderingEngine
15
- */
16
- /**
17
- * Represents the base abstraction for decaf rendering engines, handling engine registration,
18
- * initialization, model-to-field translation, and runtime rendering orchestration.
19
- * Implementations must provide initialization and rendering logic while leveraging the shared
20
- * metadata-driven conversion utilities supplied here.
21
- */
22
- export declare abstract class RenderingEngine<T = void, R = FieldDefinition<T>> {
23
- readonly flavour: string;
24
- /**
25
- * @description Cache for storing rendering engine instances or constructors.
26
- * @private
27
- * @static
28
- */
29
- private static cache;
30
- /**
31
- * @description The currently active rendering engine.
32
- * @private
33
- * @static
34
- */
35
- private static current;
36
- /**
37
- * Flag indicating whether the rendering engine has been initialized.
38
- */
39
- protected initialized: boolean;
40
- protected constructor(flavour: string);
41
- /**
42
- * @description Initializes the rendering engine.
43
- * @summary Abstract method to be implemented by subclasses for specific initialization logic.
44
- *
45
- * @param {...any[]} args - Any additional arguments needed for initialization.
46
- * @returns {Promise<void>} A promise that resolves when initialization is complete.
47
- *
48
- * @abstract
49
- */
50
- abstract initialize(...args: any[]): Promise<void>;
51
- /**
52
- * @description Translates between model types and HTML input types.
53
- * @summary Converts model data types to appropriate HTML input types and vice versa.
54
- *
55
- * @param {string} key - The key to translate.
56
- * @param {boolean} [toView=true] - Direction of translation (true for model to view, false for view to model).
57
- * @returns {string} The translated type.
58
- */
59
- translate(key: string, toView?: boolean): string;
60
- /**
61
- * @description Retrieves class decorator metadata for a model instance
62
- * @summary Extracts UI-related class decorators from a model and returns them as an array
63
- * This method collects metadata from various UI class decorators including @uimodel,
64
- * @uilistmodel, @uihandlers, and @uilayout applied to the model class.
65
- *
66
- * @template M Type extending Model
67
- * @param {M} model - The model instance to extract metadata from
68
- * @returns {UIClassMetadata[]} Array of UI class metadata objects
69
- *
70
- * @private
71
- */
72
- private getClassDecoratorsMetadata;
73
- private sortChildrenByOrder;
74
- /**
75
- * @description Checks if a validation key represents a custom validator (i.e., not a built-in validation or UI key).
76
- * @summary Determines whether the provided key corresponds to a user-defined validator by excluding all built-in ValidationKeys and UIKeys.
77
- *
78
- * @param {string} key - The validation key to check.
79
- * @returns {boolean} True if the key is a custom validator, false otherwise.
80
- * @returns {boolean} True if the key is not a built-in validation key or UI key (i.e. is custom), false otherwise.
81
- */
82
- protected isCustomValidator(key: string): boolean;
83
- /**
84
- * @description Checks if a type is validatable by its nature.
85
- * @summary Determines if a given UI key represents a type that is inherently validatable.
86
- *
87
- * @param {string} key - The UI key to check.
88
- * @returns {boolean} True if the type is validatable, false otherwise.
89
- */
90
- protected isValidatableByType(key: string): boolean;
91
- /**
92
- * @description Checks if a type is validatable by attribute.
93
- * @summary Determines if a given UI key represents a validation that can be applied as an attribute.
94
- *
95
- * @param {string} key - The UI key to check.
96
- * @returns {boolean} True if the type is validatable by attribute, false otherwise.
97
- */
98
- protected isValidatableByAttribute(key: string): boolean;
99
- /**
100
- * @description Converts validation metadata to an attribute value.
101
- * @summary Transforms validation metadata into a value suitable for use as an HTML attribute.
102
- *
103
- * @param {string} key - The validation key.
104
- * @param {ValidationMetadata} value - The validation metadata.
105
- * @returns {string | number | boolean} The converted attribute value.
106
- * @throws {Error} If the given key is not validatable by attribute.
107
- */
108
- protected toAttributeValue(key: string, value: ValidationMetadata): string | number | boolean;
109
- /**
110
- * @description Converts a model to a field definition.
111
- * @summary Processes a model instance, extracting UI-related metadata and validation rules to create a field definition.
112
- *
113
- * @template M Type extending Model
114
- * @template T Type referencing the specific Rendering engine field properties/inputs
115
- * @param {M} model - The model instance to convert.
116
- * @param {Record<string, unknown>} [globalProps={}] - Global properties to apply to all child elements.
117
- * @param {boolean} [generateId=true] - Flag indicating whether to populate the rendererId property.
118
- * @returns {FieldDefinition<T>} A field definition object representing the UI structure of the model.
119
- * @throws {RenderingError} If no UI definitions are set for the model or if there are invalid decorators.
120
- *
121
- * @mermaid
122
- * sequenceDiagram
123
- * participant C as Client
124
- * participant RE as RenderingEngine
125
- * participant R as Reflection
126
- * participant M as Model
127
- * C->>RE: toFieldDefinition(model, globalProps)
128
- * RE->>R: getMetadata(UIKeys.UIMODEL, model.constructor)
129
- * R-->>RE: UIModelMetadata
130
- * RE->>R: getAllPropertyDecorators(model, UIKeys.REFLECT)
131
- * R-->>RE: Record<string, DecoratorMetadata[]>
132
- * RE->>R: getAllPropertyDecorators(model, ValidationKeys.REFLECT)
133
- * R-->>RE: Record<string, DecoratorMetadata<ValidationMetadata>[]>
134
- * loop For each property
135
- * RE->>RE: Process UI decorators
136
- * RE->>RE: Apply validation rules
137
- * end
138
- * RE-->>C: FieldDefinition<T>
139
- */
140
- protected toFieldDefinition<M extends Model>(model: M, globalProps?: Record<string, unknown>, generateId?: boolean): FieldDefinition<T>;
141
- /**
142
- * @description Renders a model with global properties and additional arguments.
143
- * @summary Abstract method to be implemented by subclasses to define specific rendering behavior.
144
- *
145
- * @template M Type extending Model
146
- * @template R Rendering engine implementation specific output type
147
- * @param {M} model - The model to be rendered.
148
- * @param {Record<string, unknown>} globalProps - Global properties to be applied to all elements during rendering.
149
- * @param {...any[]} args - Additional arguments that may be required for specific rendering implementations.
150
- * @returns {R} The rendered result, type depends on the specific implementation.
151
- *
152
- * @abstract
153
- */
154
- abstract render<M extends Model>(model: M, globalProps: Record<string, unknown>, ...args: any[]): R;
155
- /**
156
- * @description Registers a rendering engine instance.
157
- * @summary Adds a rendering engine to the static cache and sets it as the current engine.
158
- *
159
- * @param {RenderingEngine<unknown, unknown>} engine - The rendering engine to register.
160
- * @throws {InternalError} If an engine with the same flavor already exists.
161
- *
162
- * @static
163
- */
164
- static register(engine: RenderingEngine<unknown, unknown>): void;
165
- /**
166
- * @description Retrieves or initializes a rendering engine.
167
- * @summary Gets an existing engine instance or creates and initializes a new one if given a constructor.
168
- *
169
- * @template O The type of the rendering engine output
170
- * @param {Constructor<RenderingEngine<O>> | RenderingEngine<O>} obj - The engine instance or constructor.
171
- * @returns {RenderingEngine<O>} The initialized rendering engine.
172
- *
173
- * @private
174
- * @static
175
- */
176
- private static getOrBoot;
177
- /**
178
- * @description Retrieves a rendering engine by flavor.
179
- * @summary Gets the current rendering engine or a specific one by flavor.
180
- *
181
- * @template O The type of the rendering engine output
182
- * @param {string} [flavour] - The flavor of the rendering engine to retrieve.
183
- * @returns {RenderingEngine<O>} The requested rendering engine.
184
- * @throws {InternalError} If the requested flavor does not exist.
185
- *
186
- * @static
187
- */
188
- static get<O>(flavour?: string): RenderingEngine<O>;
189
- /**
190
- * @description Renders a model using the appropriate rendering engine.
191
- * @summary Determines the correct rendering engine for a model and invokes its render method.
192
- *
193
- * @template M Type extending Model
194
- * @param {M} model - The model to render.
195
- * @param {...any[]} args - Additional arguments to pass to the render method.
196
- * @returns {any} The result of the rendering process.
197
- * @throws {InternalError} If no registered model is found.
198
- *
199
- * @static
200
- */
201
- static render<M extends Model>(model: M, ...args: any[]): any;
202
- }
@@ -1,6 +0,0 @@
1
- import { Validator } from "@decaf-ts/decorator-validation";
2
- import { DecafTranslateService } from "./DecafTranslateService";
3
- export declare abstract class UIValidator extends Validator {
4
- static translateService: DecafTranslateService;
5
- getMessage(message: string, ...args: any[]): string;
6
- }
@@ -1,355 +0,0 @@
1
- /**
2
- * @description Constants and enums for UI rendering and validation
3
- * @summary Defines keys, mappings, and HTML5 input types for UI components
4
- * This module provides constants used throughout the UI decorators library for
5
- * rendering, validation, and HTML element generation.
6
- * @module ui/constants
7
- * @memberOf module:ui-decorators
8
- */
9
- import { Validator } from "@decaf-ts/decorator-validation";
10
- import { Constructor } from "@decaf-ts/decoration";
11
- import { OperationKeys } from "@decaf-ts/db-decorators";
12
- export declare enum UIMediaBreakPoints {
13
- SMALL = "small",
14
- MEDIUM = "medium",
15
- LARGE = "large",
16
- XLARGE = "xlarge"
17
- }
18
- /**
19
- * @description Key constants used for UI metadata and rendering
20
- * @summary Collection of string constants used as keys for UI-related metadata
21
- * These keys are used throughout the library to store and retrieve metadata related to
22
- * UI models, elements, properties, and validation rules.
23
- *
24
- * @typedef {Object} UIKeysType
25
- * @property {string} REFLECT - Base reflection key for UI metadata
26
- * @property {string} UIMODEL - Key for UI model metadata
27
- * @property {string} RENDERED_BY - Key for specifying rendering engine
28
- * @property {string} ELEMENT - Key for element metadata
29
- * @property {string} PROP - Key for property metadata
30
- * @property {string} NAME - Key for name attribute
31
- * @property {string} NAME_PREFIX - Prefix for input names
32
- * @property {string} CUSTOM_PROPS - Key for custom validation properties
33
- * @property {string} UILISTMODEL - Key for list item metadata
34
- * @property {string} UILISTPROP - Key for list property metadata
35
- * @property {string} TYPE - Key for type metadata
36
- * @property {string} SUB_TYPE - Key for subtype metadata
37
- * @property {string} HIDDEN - Key for hidden attribute
38
- * @property {string} FORMAT - Key for format metadata
39
- * @property {string} READ_ONLY - Key for readonly attribute
40
- * @property {string} REQUIRED - Key for required validation
41
- * @property {string} MIN - Key for minimum value validation
42
- * @property {string} MIN_LENGTH - Key for minimum length validation
43
- * @property {string} MAX - Key for maximum value validation
44
- * @property {string} MAX_LENGTH - Key for maximum length validation
45
- * @property {string} PATTERN - Key for pattern validation
46
- * @property {string} URL - Key for URL validation
47
- * @property {string} STEP - Key for step validation
48
- * @property {string} DATE - Key for date validation
49
- * @property {string} EMAIL - Key for email validation
50
- * @property {string} PASSWORD - Key for password validation
51
- * @property {string} EQUALS - Key for equality validation
52
- * @property {string} DIFF - Key for difference validation
53
- * @property {string} LESS_THAN - Key for less than validation
54
- * @property {string} LESS_THAN_OR_EQUAL - Key for less than or equal validation
55
- * @property {string} GREATER_THAN - Key for greater than validation
56
- * @property {string} GREATER_THAN_OR_EQUAL - Key for greater than or equal validation
57
- *
58
- * @const UIKeys
59
- * @type {UIKeysType}
60
- * @readonly
61
- * @memberOf module:ui-decorators
62
- */
63
- export declare const UIKeys: {
64
- REFLECT: string;
65
- UIMODEL: string;
66
- RENDERED_BY: string;
67
- ELEMENT: string;
68
- PROP: string;
69
- CHILD: string;
70
- NAME: string;
71
- NAME_PREFIX: string;
72
- VALIDATION_MESSAGE: string;
73
- UILISTMODEL: string;
74
- UILISTPROP: string;
75
- UILAYOUT: string;
76
- UILAYOUTPROP: string;
77
- HANDLERS: string;
78
- TYPE: string;
79
- SUB_TYPE: string;
80
- HIDDEN: string;
81
- FORMAT: string;
82
- ORDER: string;
83
- PAGE: string;
84
- EVENTS: string;
85
- FIRST: string;
86
- LAST: string;
87
- READ_ONLY: string;
88
- SEQUENCE: string;
89
- REQUIRED: "required";
90
- MIN: "min";
91
- MIN_LENGTH: "minlength";
92
- MAX: "max";
93
- MAX_LENGTH: "maxlength";
94
- PATTERN: "pattern";
95
- URL: "url";
96
- STEP: "step";
97
- DATE: "date";
98
- EMAIL: "email";
99
- PASSWORD: "password";
100
- EQUALS: "equals";
101
- DIFF: "different";
102
- LESS_THAN: "lessThan";
103
- LESS_THAN_OR_EQUAL: "lessThanOrEqual";
104
- GREATER_THAN: "greaterThan";
105
- GREATER_THAN_OR_EQUAL: "greaterThanOrEqual";
106
- };
107
- /**
108
- * @description Mapping of input types to their corresponding validators
109
- * @summary Maps special input types to their validator classes
110
- * This constant maps input types like email, URL, date, and password to their
111
- * corresponding validator classes from the decorator-validation library.
112
- *
113
- * @typedef {Object.<string, Constructor<Validator>>} ValidatableByTypeMap
114
- * @property {Constructor<EmailValidator>} email - Validator for email inputs
115
- * @property {Constructor<URLValidator>} url - Validator for URL inputs
116
- * @property {Constructor<DateValidator>} date - Validator for date inputs
117
- * @property {Constructor<PasswordValidator>} password - Validator for password inputs
118
- *
119
- * @const ValidatableByType
120
- * @type {ValidatableByTypeMap}
121
- * @readonly
122
- * @memberOf module:ui-decorators
123
- */
124
- export declare const ValidatableByType: Record<string, Constructor<Validator>>;
125
- /**
126
- * @description Mapping of validation attributes to their corresponding validators
127
- * @summary Maps HTML validation attributes to their validator classes
128
- * This constant maps HTML validation attributes like required, min, max, pattern, etc.
129
- * to their corresponding validator classes from the decorator-validation library.
130
- *
131
- * @typedef {Object.<string, Constructor<Validator>>} ValidatableByAttributeMap
132
- * @property {Constructor<RequiredValidator>} required - Validator for required fields
133
- * @property {Constructor<MinValidator>} min - Validator for minimum value
134
- * @property {Constructor<MaxValidator>} max - Validator for maximum value
135
- * @property {Constructor<StepValidator>} step - Validator for step value
136
- * @property {Constructor<MinLengthValidator>} minlength - Validator for minimum length
137
- * @property {Constructor<MaxLengthValidator>} maxlength - Validator for maximum length
138
- * @property {Constructor<PatternValidator>} pattern - Validator for regex pattern
139
- * @property {Constructor<EqualsValidator>} equals - Validator for equality
140
- * @property {Constructor<DiffValidator>} diff - Validator for difference
141
- * @property {Constructor<LessThanValidator>} lessthan - Validator for less than comparison
142
- * @property {Constructor<LessThanOrEqualValidator>} lessthanorequal - Validator for less than or equal comparison
143
- * @property {Constructor<GreaterThanValidator>} greaterthan - Validator for greater than comparison
144
- * @property {Constructor<GreaterThanOrEqualValidator>} greaterthanorequal - Validator for greater than or equal comparison
145
- *
146
- * @const ValidatableByAttribute
147
- * @type {ValidatableByAttributeMap}
148
- * @readonly
149
- * @memberOf module:ui-decorators
150
- */
151
- export declare const ValidatableByAttribute: Record<string, Constructor<Validator>>;
152
- /**
153
- * @description Standard date format string for HTML5 date inputs
154
- * @summary Format string for HTML5 date inputs (yyyy-MM-dd)
155
- * This constant defines the standard date format string used for HTML5 date inputs.
156
- *
157
- * @const HTML5DateFormat
158
- * @type {string}
159
- * @readonly
160
- * @memberOf module:ui-decorators
161
- */
162
- export declare const HTML5DateFormat = "yyyy-MM-dd";
163
- /**
164
- * @description Collection of HTML5 input type values
165
- * @summary Maps input type constants to their HTML attribute values
166
- * This constant provides a mapping of input type constants to their corresponding
167
- * HTML attribute values for use in form elements.
168
- *
169
- * @typedef {Object} HTML5InputTypesMap
170
- * @property {string} BUTTON - Button input type
171
- * @property {string} CHECKBOX - Checkbox input type
172
- * @property {string} COLOR - Color picker input type
173
- * @property {string} DATE - Date picker input type
174
- * @property {string} DATETIME_LOCAL - Local datetime picker input type
175
- * @property {string} EMAIL - Email input type with validation
176
- * @property {string} FILE - File upload input type
177
- * @property {string} HIDDEN - Hidden input type
178
- * @property {string} IMAGE - Image input type
179
- * @property {string} MONTH - Month picker input type
180
- * @property {string} NUMBER - Numeric input type
181
- * @property {string} PASSWORD - Password input type with masked text
182
- * @property {string} RADIO - Radio button input type
183
- * @property {string} RANGE - Range slider input type
184
- * @property {string} RESET - Form reset button input type
185
- * @property {string} SEARCH - Search input type
186
- * @property {string} SUBMIT - Form submit button input type
187
- * @property {string} TEL - Telephone number input type
188
- * @property {string} TEXT - Basic text input type
189
- * @property {string} TIME - Time picker input type
190
- * @property {string} URL - URL input type with validation
191
- * @property {string} WEEK - Week picker input type
192
- *
193
- * @const HTML5InputTypes
194
- * @type {HTML5InputTypesMap}
195
- * @readonly
196
- * @memberOf module:ui-decorators
197
- */
198
- export declare const HTML5InputTypes: {
199
- BUTTON: string;
200
- CHECKBOX: string;
201
- COLOR: string;
202
- DATE: "date";
203
- DATETIME_LOCAL: string;
204
- EMAIL: "email";
205
- FILE: string;
206
- HIDDEN: string;
207
- IMAGE: string;
208
- MONTH: string;
209
- NUMBER: string;
210
- PASSWORD: "password";
211
- RADIO: string;
212
- RANGE: string;
213
- RESET: string;
214
- SEARCH: string;
215
- SUBMIT: string;
216
- TEL: string;
217
- TEXT: string;
218
- TEXTAREA: string;
219
- SELECT: string;
220
- TIME: string;
221
- URL: "url";
222
- WEEK: string;
223
- };
224
- /**
225
- * @description Array of HTML5 input types that use checkboxes
226
- * @summary List of input types that represent checkable controls
227
- * This constant defines an array of HTML5 input types that represent
228
- * checkable controls (checkbox and radio).
229
- *
230
- * @const HTML5CheckTypes
231
- * @type {string[]}
232
- * @readonly
233
- * @memberOf module:ui-decorators
234
- */
235
- export declare const HTML5CheckTypes: string[];
236
- /**
237
- * @description Event name constants.
238
- * @summary Contains constants for standardized event names used throughout the application.
239
- * These constants ensure consistent event naming across components and make it easier to
240
- * track and handle events. Each constant represents a specific application event type.
241
- * @typedef {Object} ComponentEventNames
242
- * @property {string} BackButtonClickEvent - Event fired when back button navigation ends
243
- * @property {string} Render - Event after component initialize action occurs
244
- * @property {string} Refresh - Event fired when a refresh action occurs
245
- * @property {string} Click - Event fired when a click action occurs
246
- * @property {string} Change - Event fired when a change action occurs
247
- * @property {string} Submit - Event fired when a form submission occurs
248
- * @property {string} ValidationError - Event fired when a validation error occurs
249
- * @property {string} ThemeChange - Event fired when a theme change occurs
250
- * @property {string} FormGroupLoaded - Event fired when a reactve form group is loaded
251
- * @const ComponentEventNames
252
- */
253
- export declare const ComponentEventNames: {
254
- readonly Render: "render";
255
- readonly BackButtonClickEvent: "backButtonNavigationEndEvent";
256
- readonly Refresh: "RefreshEvent";
257
- readonly Click: "ClickEvent";
258
- readonly Change: "ChangeEvent";
259
- readonly Submit: "SubmitEvent";
260
- readonly ValidationError: "validationErrorEvent";
261
- readonly ThemeChange: "themeChangeEvent";
262
- readonly FormGroupLoaded: "formGroupLoadedEvent";
263
- };
264
- /**
265
- * @description Lifecycle hook labels for repository transactions.
266
- * @summary Provides canonical names for CRUD lifecycle callbacks so decorators and
267
- * components can register work before or after repository operations in a consistent way.
268
- * Each key maps to the string used when wiring transaction middleware.
269
- * @const TransactionHooks
270
- */
271
- export declare const TransactionHooks: {
272
- readonly BeforeRead: "beforeRead";
273
- readonly AfterRead: "afterRead";
274
- readonly BeforeCreate: "beforeCreate";
275
- readonly AfterCreate: "afterCreate";
276
- readonly BeforeUpdate: "beforeUpdate";
277
- readonly AfterUpdate: "afterUpdate";
278
- readonly BeforeDelete: "beforeDelete";
279
- readonly AfterDelete: "afterDelete";
280
- };
281
- /**
282
- * @description Standardized size tokens for UI elements.
283
- * @summary Defines the semantic size keywords supported by layout and form decorators.
284
- * These values feed rendering engines so components can express sizing in a uniform vocabulary.
285
- * @const ElementSizes
286
- */
287
- export declare const ElementSizes: {
288
- readonly xsmall: "xsmall";
289
- readonly small: "small";
290
- readonly medium: "medium";
291
- readonly default: "default";
292
- readonly large: "large";
293
- readonly xLarge: "xlarge";
294
- readonly "2xLarge": "2xlarge";
295
- readonly auto: "auto";
296
- readonly expand: "expand";
297
- readonly block: "block";
298
- readonly half: "half";
299
- readonly full: "full";
300
- };
301
- /**
302
- * @description Alignment keywords for element positioning.
303
- * @summary Supplies canonical position values (horizontal and vertical) that decorators can
304
- * use when aligning labels, controls, or helper text across components.
305
- * @const ElementPositions
306
- */
307
- export declare const ElementPositions: {
308
- readonly left: "left";
309
- readonly center: "center";
310
- readonly right: "right";
311
- readonly top: "top";
312
- readonly bottom: "bottom";
313
- };
314
- /**
315
- * @description Grid spacing presets for layout decorators.
316
- * @summary Maps human-readable gap sizes to the tokens interpreted by the rendering engine
317
- * when building CSS grid layouts, enabling predictable spacing across components.
318
- * @const LayoutGridGaps
319
- */
320
- export declare const LayoutGridGaps: {
321
- readonly small: "small";
322
- readonly medium: "medium";
323
- readonly large: "large";
324
- readonly collapse: "collapse";
325
- readonly none: "";
326
- };
327
- /**
328
- * @description Canonical action role identifiers for UI controls.
329
- * @summary Enumerates the semantic roles a button or action may represent so decorators and
330
- * renderers can attach consistent behaviors and styling (including CRUD verbs tied to
331
- * `OperationKeys`).
332
- * @const ActionRoles
333
- */
334
- export declare const ActionRoles: {
335
- readonly cancel: "cancel";
336
- readonly confirm: "confirm";
337
- readonly submit: "submit";
338
- readonly clear: "clear";
339
- readonly back: "back";
340
- readonly create: OperationKeys.CREATE;
341
- readonly read: OperationKeys.READ;
342
- readonly update: OperationKeys.UPDATE;
343
- readonly delete: OperationKeys.DELETE;
344
- };
345
- /**
346
- * @description Allowed color scheme tokens for windowed surfaces.
347
- * @summary Provides the supported theme identifiers exposed to consuming apps so they
348
- * can target light, dark, or unset window color schemes in a predictable way.
349
- * @const WindowColorSchemes
350
- */
351
- export declare const WindowColorSchemes: {
352
- readonly light: "light";
353
- readonly dark: "dark";
354
- readonly undefined: "undefined";
355
- };