UI decorators module for TypeScript applications
Interfaces
- CrudFormField
Extends basic field properties with a specific CRUD operation This interface represents a form field that is associated with a specific CRUD operation (Create, Read, Update, Delete). It combines all the standard field properties with an operation property.
- FieldDefinition
Represents a renderable UI element with properties and children This interface defines the structure of a UI field or component, including its tag name, properties, and optional children elements.
- FieldProperties
Defines common properties and validation rules for UI fields This interface defines the standard properties that can be applied to UI fields, including basic attributes and validation rules.
Members
Array.<string>
# static constant HTML5CheckTypes
List of input types that represent checkable controls This constant defines an array of HTML5 input types that represent checkable controls (checkbox and radio).
Array of HTML5 input types that use checkboxes
string
# static constant HTML5DateFormat
Format string for HTML5 date inputs (yyyy-MM-dd) This constant defines the standard date format string used for HTML5 date inputs.
Standard date format string for HTML5 date inputs
Object
# static constant HTML5InputTypes
Maps input type constants to their HTML attribute values This constant provides a mapping of input type constants to their corresponding HTML attribute values for use in form elements.
Collection of HTML5 input type values
Properties:
Name | Type | Description |
---|---|---|
BUTTON |
string
|
Button input type |
CHECKBOX |
string
|
Checkbox input type |
COLOR |
string
|
Color picker input type |
DATE |
string
|
Date picker input type |
DATETIME_LOCAL |
string
|
Local datetime picker input type |
EMAIL |
string
|
Email input type with validation |
FILE |
string
|
File upload input type |
HIDDEN |
string
|
Hidden input type |
IMAGE |
string
|
Image input type |
MONTH |
string
|
Month picker input type |
NUMBER |
string
|
Numeric input type |
PASSWORD |
string
|
Password input type with masked text |
RADIO |
string
|
Radio button input type |
RANGE |
string
|
Range slider input type |
RESET |
string
|
Form reset button input type |
SEARCH |
string
|
Search input type |
SUBMIT |
string
|
Form submit button input type |
TEL |
string
|
Telephone number input type |
TEXT |
string
|
Basic text input type |
TIME |
string
|
Time picker input type |
URL |
string
|
URL input type with validation |
WEEK |
string
|
Week picker input type |
Object
# static constant UIKeys
Collection of string constants used as keys for UI-related metadata These keys are used throughout the library to store and retrieve metadata related to UI models, elements, properties, and validation rules.
Key constants used for UI metadata and rendering
Properties:
Name | Type | Description |
---|---|---|
REFLECT |
string
|
Base reflection key for UI metadata |
UIMODEL |
string
|
Key for UI model metadata |
RENDERED_BY |
string
|
Key for specifying rendering engine |
ELEMENT |
string
|
Key for element metadata |
PROP |
string
|
Key for property metadata |
NAME |
string
|
Key for name attribute |
NAME_PREFIX |
string
|
Prefix for input names |
CUSTOM_PROPS |
string
|
Key for custom validation properties |
UILISTITEM |
string
|
Key for list item metadata |
UILISTPROP |
string
|
Key for list property metadata |
TYPE |
string
|
Key for type metadata |
SUB_TYPE |
string
|
Key for subtype metadata |
HIDDEN |
string
|
Key for hidden attribute |
FORMAT |
string
|
Key for format metadata |
READ_ONLY |
string
|
Key for readonly attribute |
REQUIRED |
string
|
Key for required validation |
MIN |
string
|
Key for minimum value validation |
MIN_LENGTH |
string
|
Key for minimum length validation |
MAX |
string
|
Key for maximum value validation |
MAX_LENGTH |
string
|
Key for maximum length validation |
PATTERN |
string
|
Key for pattern validation |
URL |
string
|
Key for URL validation |
STEP |
string
|
Key for step validation |
DATE |
string
|
Key for date validation |
EMAIL |
string
|
Key for email validation |
PASSWORD |
string
|
Key for password validation |
EQUALS |
string
|
Key for equality validation |
DIFF |
string
|
Key for difference validation |
LESS_THAN |
string
|
Key for less than validation |
LESS_THAN_OR_EQUAL |
string
|
Key for less than or equal validation |
GREATER_THAN |
string
|
Key for greater than validation |
GREATER_THAN_OR_EQUAL |
string
|
Key for greater than or equal validation |
# static constant VERSION
Stores the current package version for reference
Current package version string
Object.<string, Constructor.<Validator>>
# static constant ValidatableByAttribute
Maps HTML validation attributes to their validator classes This constant maps HTML validation attributes like required, min, max, pattern, etc. to their corresponding validator classes from the decorator-validation library.
Mapping of validation attributes to their corresponding validators
Properties:
Name | Type | Description |
---|---|---|
required |
Constructor.<RequiredValidator>
|
Validator for required fields |
min |
Constructor.<MinValidator>
|
Validator for minimum value |
max |
Constructor.<MaxValidator>
|
Validator for maximum value |
step |
Constructor.<StepValidator>
|
Validator for step value |
minlength |
Constructor.<MinLengthValidator>
|
Validator for minimum length |
maxlength |
Constructor.<MaxLengthValidator>
|
Validator for maximum length |
pattern |
Constructor.<PatternValidator>
|
Validator for regex pattern |
equals |
Constructor.<EqualsValidator>
|
Validator for equality |
diff |
Constructor.<DiffValidator>
|
Validator for difference |
lessthan |
Constructor.<LessThanValidator>
|
Validator for less than comparison |
lessthanorequal |
Constructor.<LessThanOrEqualValidator>
|
Validator for less than or equal comparison |
greaterthan |
Constructor.<GreaterThanValidator>
|
Validator for greater than comparison |
greaterthanorequal |
Constructor.<GreaterThanOrEqualValidator>
|
Validator for greater than or equal comparison |
Object.<string, Constructor.<Validator>>
# static constant ValidatableByType
Maps special input types to their validator classes This constant maps input types like email, URL, date, and password to their corresponding validator classes from the decorator-validation library.
Mapping of input types to their corresponding validators
Properties:
Name | Type | Description |
---|---|---|
email |
Constructor.<EmailValidator>
|
Validator for email inputs |
url |
Constructor.<URLValidator>
|
Validator for URL inputs |
date |
Constructor.<DateValidator>
|
Validator for date inputs |
password |
Constructor.<PasswordValidator>
|
Validator for password inputs |
Methods
Type Definitions
object
# UIElementMetadata
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
tag |
string
|
||
props |
Record.<string, any>
|
<optional> |
|
serialize |
boolean
|
<optional> |
object
# UIListItemElementMetadata
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
tag |
string
|
||
props |
Record.<string, any>
|
<optional> |
|
mapper |
Record.<string, string>
|
<optional> |
object
# UIListPropMetadata
Properties:
Name | Type | Description |
---|---|---|
name |
string
|
|
props |
Record.<string, any>
|