@decaf-ts/ui-decorators 0.6.20 → 0.7.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.
- package/lib/cjs/index.js.map +1 -0
- package/lib/{model → cjs/model}/Renderable.js.map +1 -1
- package/lib/cjs/model/decorators.js.map +1 -0
- package/lib/cjs/model/index.js.map +1 -0
- package/lib/{model → cjs/model}/model.js.map +1 -1
- package/lib/cjs/model/overrides.js.map +1 -0
- package/lib/cjs/overrides/ModelBuilderExtensions.js.map +1 -0
- package/lib/cjs/overrides/index.js.map +1 -0
- package/lib/cjs/ui/DecafComponent.js.map +1 -0
- package/lib/cjs/ui/DecafEventHandler.js.map +1 -0
- package/lib/cjs/ui/DecafTranslateService.js.map +1 -0
- package/lib/cjs/ui/Rendering.js.map +1 -0
- package/lib/cjs/ui/UIValidator.js.map +1 -0
- package/lib/cjs/ui/constants.js.map +1 -0
- package/lib/cjs/ui/decorators.js.map +1 -0
- package/lib/cjs/ui/errors.js.map +1 -0
- package/lib/cjs/ui/index.js.map +1 -0
- package/lib/cjs/ui/interfaces.js.map +1 -0
- package/lib/cjs/ui/overrides.js.map +1 -0
- package/lib/cjs/ui/types.js.map +1 -0
- package/lib/cjs/ui/utils.js.map +1 -0
- package/lib/{ui → cjs/ui}/validator.js.map +1 -1
- package/package.json +12 -6
- package/lib/index.d.ts +0 -19
- package/lib/index.js.map +0 -1
- package/lib/model/Renderable.d.ts +0 -18
- package/lib/model/decorators.d.ts +0 -318
- package/lib/model/decorators.js.map +0 -1
- package/lib/model/index.d.ts +0 -4
- package/lib/model/index.js.map +0 -1
- package/lib/model/model.d.ts +0 -31
- package/lib/model/overrides.d.ts +0 -9
- package/lib/model/overrides.js.map +0 -1
- package/lib/overrides/ModelBuilderExtensions.d.ts +0 -16
- package/lib/overrides/ModelBuilderExtensions.js.map +0 -1
- package/lib/overrides/index.d.ts +0 -5
- package/lib/overrides/index.js.map +0 -1
- package/lib/ui/DecafComponent.d.ts +0 -293
- package/lib/ui/DecafComponent.js.map +0 -1
- package/lib/ui/DecafEventHandler.d.ts +0 -43
- package/lib/ui/DecafEventHandler.js.map +0 -1
- package/lib/ui/DecafTranslateService.d.ts +0 -5
- package/lib/ui/DecafTranslateService.js.map +0 -1
- package/lib/ui/Rendering.d.ts +0 -202
- package/lib/ui/Rendering.js.map +0 -1
- package/lib/ui/UIValidator.d.ts +0 -6
- package/lib/ui/UIValidator.js.map +0 -1
- package/lib/ui/constants.d.ts +0 -355
- package/lib/ui/constants.js.map +0 -1
- package/lib/ui/decorators.d.ts +0 -482
- package/lib/ui/decorators.js.map +0 -1
- package/lib/ui/errors.d.ts +0 -32
- package/lib/ui/errors.js.map +0 -1
- package/lib/ui/index.d.ts +0 -11
- package/lib/ui/index.js.map +0 -1
- package/lib/ui/interfaces.d.ts +0 -64
- package/lib/ui/interfaces.js.map +0 -1
- package/lib/ui/overrides.d.ts +0 -1
- package/lib/ui/overrides.js.map +0 -1
- package/lib/ui/types.d.ts +0 -186
- package/lib/ui/types.js.map +0 -1
- package/lib/ui/utils.d.ts +0 -27
- package/lib/ui/utils.js.map +0 -1
- package/lib/ui/validator.d.ts +0 -9
- /package/lib/{index.cjs → cjs/index.cjs} +0 -0
- /package/lib/{model → cjs/model}/Renderable.cjs +0 -0
- /package/lib/{model → cjs/model}/decorators.cjs +0 -0
- /package/lib/{model → cjs/model}/index.cjs +0 -0
- /package/lib/{model → cjs/model}/model.cjs +0 -0
- /package/lib/{model → cjs/model}/overrides.cjs +0 -0
- /package/lib/{overrides → cjs/overrides}/ModelBuilderExtensions.cjs +0 -0
- /package/lib/{overrides → cjs/overrides}/index.cjs +0 -0
- /package/lib/{ui → cjs/ui}/DecafComponent.cjs +0 -0
- /package/lib/{ui → cjs/ui}/DecafEventHandler.cjs +0 -0
- /package/lib/{ui → cjs/ui}/DecafTranslateService.cjs +0 -0
- /package/lib/{ui → cjs/ui}/Rendering.cjs +0 -0
- /package/lib/{ui → cjs/ui}/UIValidator.cjs +0 -0
- /package/lib/{ui → cjs/ui}/constants.cjs +0 -0
- /package/lib/{ui → cjs/ui}/decorators.cjs +0 -0
- /package/lib/{ui → cjs/ui}/errors.cjs +0 -0
- /package/lib/{ui → cjs/ui}/index.cjs +0 -0
- /package/lib/{ui → cjs/ui}/interfaces.cjs +0 -0
- /package/lib/{ui → cjs/ui}/overrides.cjs +0 -0
- /package/lib/{ui → cjs/ui}/types.cjs +0 -0
- /package/lib/{ui → cjs/ui}/utils.cjs +0 -0
- /package/lib/{ui → cjs/ui}/validator.cjs +0 -0
- /package/lib/{esm → types}/index.d.ts +0 -0
- /package/lib/{esm → types}/model/Renderable.d.ts +0 -0
- /package/lib/{esm → types}/model/decorators.d.ts +0 -0
- /package/lib/{esm → types}/model/index.d.ts +0 -0
- /package/lib/{esm → types}/model/model.d.ts +0 -0
- /package/lib/{esm → types}/model/overrides.d.ts +0 -0
- /package/lib/{esm → types}/overrides/ModelBuilderExtensions.d.ts +0 -0
- /package/lib/{esm → types}/overrides/index.d.ts +0 -0
- /package/lib/{esm → types}/ui/DecafComponent.d.ts +0 -0
- /package/lib/{esm → types}/ui/DecafEventHandler.d.ts +0 -0
- /package/lib/{esm → types}/ui/DecafTranslateService.d.ts +0 -0
- /package/lib/{esm → types}/ui/Rendering.d.ts +0 -0
- /package/lib/{esm → types}/ui/UIValidator.d.ts +0 -0
- /package/lib/{esm → types}/ui/constants.d.ts +0 -0
- /package/lib/{esm → types}/ui/decorators.d.ts +0 -0
- /package/lib/{esm → types}/ui/errors.d.ts +0 -0
- /package/lib/{esm → types}/ui/index.d.ts +0 -0
- /package/lib/{esm → types}/ui/interfaces.d.ts +0 -0
- /package/lib/{esm → types}/ui/overrides.d.ts +0 -0
- /package/lib/{esm → types}/ui/types.d.ts +0 -0
- /package/lib/{esm → types}/ui/utils.d.ts +0 -0
- /package/lib/{esm → types}/ui/validator.d.ts +0 -0
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import "@decaf-ts/decorator-validation";
|
|
2
|
-
declare module "@decaf-ts/decorator-validation" {
|
|
3
|
-
interface ModelBuilder<M> {
|
|
4
|
-
decorateClass(decorator: ClassDecorator): ModelBuilder<M>;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
declare module "@decaf-ts/decorator-validation" {
|
|
8
|
-
interface ModelBuilder<M> {
|
|
9
|
-
uimodel(tag?: string, props?: Record<string, any>): ModelBuilder<M>;
|
|
10
|
-
renderedBy(engine: string): ModelBuilder<M>;
|
|
11
|
-
uilistmodel(name?: string, props?: Record<string, any>): ModelBuilder<M>;
|
|
12
|
-
uihandlers(props?: Record<string, any>): ModelBuilder<M>;
|
|
13
|
-
uilayout(tag: string, colsMode?: number | boolean, rows?: number | string[], props?: any): ModelBuilder<M>;
|
|
14
|
-
uisteppedmodel(tag: string, pages?: number | any[], paginated?: boolean, props?: any): ModelBuilder<M>;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ModelBuilderExtensions.js","sourceRoot":"","sources":["../../src/overrides/ModelBuilderExtensions.ts"],"names":[],"mappings":";;AAAA,0CAAwC;AACxC,yEAA8D;AAC9D,0DAO6B;AA6B7B,MAAM,SAAS,GAAG,mCAAY,CAAC,SAiB9B,CAAC;AAEF,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;IAC7B,SAAS,CAAC,aAAa,GAAG,UAAU,SAAyB;QAC3D,IAAI,CAAE,IAAY,CAAC,gBAAgB,EAAE,CAAC;YACnC,IAAY,CAAC,gBAAgB,GAAG,EAAE,CAAC;QACtC,CAAC;QACA,IAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,CAAC,OAAO,GAAG,UAAU,GAAY,EAAE,KAA2B;IACrE,OAAO,IAAI,CAAC,aAAa,CAAC,IAAA,oBAAO,EAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF,SAAS,CAAC,UAAU,GAAG,UAAU,MAAc;IAC7C,OAAO,IAAI,CAAC,aAAa,CAAC,IAAA,uBAAU,EAAC,MAAM,CAAC,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,UAAU,IAAa,EAAE,KAA2B;IAC1E,OAAO,IAAI,CAAC,aAAa,CAAC,IAAA,wBAAW,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AACtD,CAAC,CAAC;AAEF,SAAS,CAAC,UAAU,GAAG,UAAU,KAA2B;IAC1D,OAAO,IAAI,CAAC,aAAa,CAAC,IAAA,uBAAU,EAAC,KAAK,CAAC,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,SAAS,CAAC,QAAQ,GAAG,UACnB,GAAW,EACX,QAA2B,EAC3B,IAAwB,EACxB,KAAW;IAEX,OAAO,IAAI,CAAC,aAAa,CAAC,IAAA,qBAAQ,EAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AAClE,CAAC,CAAC;AAEF,SAAS,CAAC,cAAc,GAAG,UACzB,GAAW,EACX,KAAsB,EACtB,SAAmB,EACnB,KAAW;IAEX,OAAO,IAAI,CAAC,aAAa,CAAC,IAAA,2BAAc,EAAC,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;AAC1E,CAAC,CAAC"}
|
package/lib/overrides/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/overrides/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,+DAAyC"}
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
import { LoggedClass } from "@decaf-ts/logging";
|
|
2
|
-
import { CrudOperationKeys, UIEventProperty } from "./types";
|
|
3
|
-
import { Model } from "@decaf-ts/decorator-validation";
|
|
4
|
-
import { IRepository, OperationKeys } from "@decaf-ts/db-decorators";
|
|
5
|
-
import { DecafEventHandler } from "./DecafEventHandler";
|
|
6
|
-
import { DecafTranslateService } from "./DecafTranslateService";
|
|
7
|
-
type PrimaryKeyType = string | number | bigint;
|
|
8
|
-
/**
|
|
9
|
-
* @description Base class for all Decaf UI components
|
|
10
|
-
* @summary Base class for all Decaf UI components, providing common state management,
|
|
11
|
-
* logging, localization, navigation hooks, CRUD context metadata, and
|
|
12
|
-
* repository integration used by higher-level decorators and renderers.
|
|
13
|
-
*/
|
|
14
|
-
export declare abstract class DecafComponent<M extends Model> extends LoggedClass {
|
|
15
|
-
/**
|
|
16
|
-
* @description Data model or model name for component operations.
|
|
17
|
-
* @summary The data model that this component will use for CRUD operations. This can be provided
|
|
18
|
-
* as a Model instance, a model constructor, or a string representing the model's registered name.
|
|
19
|
-
* When set, this property provides the component with access to the model's schema, validation rules,
|
|
20
|
-
* and metadata needed for rendering and data operations.
|
|
21
|
-
*/
|
|
22
|
-
model: M | Model | string | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* @description Primary key value of the current model instance.
|
|
25
|
-
* @summary Specifies the primary key value for the current model record being displayed or
|
|
26
|
-
* manipulated by the component. This identifier is used for CRUD operations that target
|
|
27
|
-
* specific records, such as read, update, and delete operations. The value corresponds to
|
|
28
|
-
* the field designated as the primary key in the model definition.
|
|
29
|
-
*/
|
|
30
|
-
modelId?: PrimaryKeyType | PrimaryKeyType[];
|
|
31
|
-
/**
|
|
32
|
-
* @description Pre-built filtering expression applied to repository queries.
|
|
33
|
-
* @summary Supply a custom `AttributeOption` to control how records are constrained. When omitted,
|
|
34
|
-
* the directive derives a condition from `filterBy` or `pk`, comparing it against `modelId`.
|
|
35
|
-
*/
|
|
36
|
-
filter: any;
|
|
37
|
-
/**
|
|
38
|
-
* @description Model field used when generating the default condition.
|
|
39
|
-
* @summary Indicates which key should be compared to `modelId` when `filter` is not provided.
|
|
40
|
-
* Defaults to the configured primary key so overrides are only needed for custom lookups.
|
|
41
|
-
*/
|
|
42
|
-
filterBy: string;
|
|
43
|
-
/**
|
|
44
|
-
* @description The CRUD operation type to be performed on the model.
|
|
45
|
-
* @summary Specifies which operation (Create, Read, Update, Delete) this component instance
|
|
46
|
-
* should perform. This determines the UI behavior, form configuration, and available actions.
|
|
47
|
-
* The operation affects form validation, field availability, and the specific repository
|
|
48
|
-
* method called during data submission.
|
|
49
|
-
*
|
|
50
|
-
* @type {OperationKeys}
|
|
51
|
-
*/
|
|
52
|
-
operation?: OperationKeys;
|
|
53
|
-
/**
|
|
54
|
-
* @description Router instance for programmatic navigation.
|
|
55
|
-
* @summary Injected Router service used for programmatic navigation between routes
|
|
56
|
-
* in the application. This service enables navigation to different views and operations,
|
|
57
|
-
* handles route parameters, and manages the browser's navigation history.
|
|
58
|
-
* @protected
|
|
59
|
-
*/
|
|
60
|
-
router?: any;
|
|
61
|
-
/**
|
|
62
|
-
* @description Name identifier for the component instance.
|
|
63
|
-
* @summary Provides a string identifier that can be used to name or label the component
|
|
64
|
-
* instance. This name can be used for debugging purposes, logging, or to identify specific
|
|
65
|
-
* component instances within a larger application structure. It serves as a human-readable
|
|
66
|
-
* identifier that helps distinguish between multiple instances of the same component type.
|
|
67
|
-
*/
|
|
68
|
-
name: string;
|
|
69
|
-
/**
|
|
70
|
-
* @description Parent component identifier for hierarchical component relationships.
|
|
71
|
-
* @summary Specifies the identifier of the parent component in a hierarchical component structure.
|
|
72
|
-
* This property establishes a parent-child relationship between components, allowing for
|
|
73
|
-
* proper nesting and organization of components within a layout. It can be used to track
|
|
74
|
-
* component dependencies and establish component hierarchies for rendering and event propagation.
|
|
75
|
-
*/
|
|
76
|
-
childOf: string | undefined;
|
|
77
|
-
/**
|
|
78
|
-
* @description Unique identifier for the component instance.
|
|
79
|
-
* @summary A unique identifier automatically generated for each component instance.
|
|
80
|
-
* This UID is used for DOM element identification, component tracking, and debugging purposes.
|
|
81
|
-
* By default, it generates a random 16-character value, but it can be explicitly set via input.
|
|
82
|
-
*/
|
|
83
|
-
uid?: PrimaryKeyType;
|
|
84
|
-
/**
|
|
85
|
-
* @description Primary key field name for the data model.
|
|
86
|
-
* @summary Specifies which field in the model should be used as the primary key.
|
|
87
|
-
* This is typically used for identifying unique records in operations like update and delete.
|
|
88
|
-
* If not explicitly set, it defaults to the repository's configured primary key or 'id'.
|
|
89
|
-
1 */
|
|
90
|
-
pk: string;
|
|
91
|
-
/**
|
|
92
|
-
* @description Translation service for application internationalization.
|
|
93
|
-
* @summary Injected service that provides translation capabilities for UI text.
|
|
94
|
-
* Used to translate button labels, validation messages, and other text content based
|
|
95
|
-
* on the current locale setting, enabling multilingual support throughout the application.
|
|
96
|
-
* @protected
|
|
97
|
-
*/
|
|
98
|
-
translateService: DecafTranslateService;
|
|
99
|
-
/**
|
|
100
|
-
* @description Angular change detection service for manual change detection control.
|
|
101
|
-
* @summary Injected service that provides manual control over change detection cycles.
|
|
102
|
-
* This is essential for ensuring that programmatic DOM changes (like setting accordion
|
|
103
|
-
* attributes) are properly reflected in the component's state and trigger appropriate
|
|
104
|
-
* view updates when modifications occur outside the normal Angular change detection flow.
|
|
105
|
-
* @protected
|
|
106
|
-
*/
|
|
107
|
-
protected changeDetectorRef?: any;
|
|
108
|
-
/**
|
|
109
|
-
* @description Controls field visibility based on CRUD operations.
|
|
110
|
-
* @summary Can be a boolean or an array of operation keys where the field should be hidden.
|
|
111
|
-
*/
|
|
112
|
-
hidden?: boolean | CrudOperationKeys[];
|
|
113
|
-
/**
|
|
114
|
-
* @description Label for the file upload field.
|
|
115
|
-
* @summary Provides a user-friendly label for the file upload input.
|
|
116
|
-
*/
|
|
117
|
-
label?: string;
|
|
118
|
-
/**
|
|
119
|
-
* @description Whether the field is read-only.
|
|
120
|
-
*/
|
|
121
|
-
readonly?: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* @description Flag to enable or disable dark mode support for the component.
|
|
124
|
-
* @summary When enabled, the component will automatically detect the system's dark mode
|
|
125
|
-
* preference using the media service and apply appropriate styling classes. This flag
|
|
126
|
-
* controls whether the component should respond to dark mode changes and apply the
|
|
127
|
-
* dark palette class to its DOM element. By default, dark mode support is disabled.
|
|
128
|
-
* @protected
|
|
129
|
-
*/
|
|
130
|
-
protected enableDarkMode: boolean;
|
|
131
|
-
/**
|
|
132
|
-
* @description Flag to enable or disable dark mode support for the component.
|
|
133
|
-
* @summary When enabled, the component will automatically detect the system's dark mode
|
|
134
|
-
* preference using the media service and apply appropriate styling classes. This flag
|
|
135
|
-
* controls whether the component should respond to dark mode changes and apply the
|
|
136
|
-
* dark palette class to its DOM element. By default, dark mode support is disabled.
|
|
137
|
-
* @protected
|
|
138
|
-
*/
|
|
139
|
-
protected isDarkMode: boolean;
|
|
140
|
-
/**
|
|
141
|
-
* @description Current locale identifier for component internationalization.
|
|
142
|
-
* @summary Specifies the locale code (e.g., 'en-US', 'pt-BR') used for translating UI text
|
|
143
|
-
* and formatting data according to regional conventions. This property can be set to override
|
|
144
|
-
* the default application locale for this specific component instance, enabling per-component
|
|
145
|
-
* localization when needed.
|
|
146
|
-
*/
|
|
147
|
-
locale?: string;
|
|
148
|
-
/**
|
|
149
|
-
* @description Configuration for list item rendering behavior.
|
|
150
|
-
* @summary Defines how list items should be rendered in the component.
|
|
151
|
-
* This property holds a configuration object that specifies the tag name
|
|
152
|
-
* and other properties needed to render list items correctly. The tag property
|
|
153
|
-
* identifies which component should be used to render each item in a list.
|
|
154
|
-
* Additional properties can be included to customize the rendering behavior.
|
|
155
|
-
*/
|
|
156
|
-
item: Record<string, unknown>;
|
|
157
|
-
/**
|
|
158
|
-
* @description Dynamic properties configuration for runtime customization.
|
|
159
|
-
* @summary Contains key-value pairs of dynamic properties that can be applied to the component
|
|
160
|
-
* at runtime. This flexible configuration object allows for dynamic property assignment without
|
|
161
|
-
* requiring explicit input bindings for every possible configuration option. Properties from
|
|
162
|
-
* this object are parsed and applied to the component instance through the parseProps method,
|
|
163
|
-
* enabling customizable component behavior based on external configuration.
|
|
164
|
-
*/
|
|
165
|
-
props: Record<string, unknown>;
|
|
166
|
-
/**
|
|
167
|
-
* @description Base route path for component navigation.
|
|
168
|
-
* @summary Defines the base route path used for navigation actions related to this component.
|
|
169
|
-
* This is often used as a prefix for constructing navigation URLs when transitioning between
|
|
170
|
-
* different operations or views. The route helps establish the component's position in the
|
|
171
|
-
* application's routing hierarchy.
|
|
172
|
-
*/
|
|
173
|
-
route?: string;
|
|
174
|
-
/**
|
|
175
|
-
* @description Controls whether borders are displayed around the component.
|
|
176
|
-
* @summary Boolean flag that determines if the component should be visually outlined with borders.
|
|
177
|
-
* When true, borders are shown to visually separate the component from surrounding content.
|
|
178
|
-
*/
|
|
179
|
-
borders: boolean;
|
|
180
|
-
/**
|
|
181
|
-
* @description Component name identifier for logging and localization contexts.
|
|
182
|
-
* @summary Stores the component's name which is used as a key for logging contexts
|
|
183
|
-
* and as a base for locale resolution.
|
|
184
|
-
* @protected
|
|
185
|
-
*/
|
|
186
|
-
protected componentName?: string;
|
|
187
|
-
/**
|
|
188
|
-
* @description Root key for component locale context resolution.
|
|
189
|
-
* @summary Defines the base key used to resolve localization contexts for this component.
|
|
190
|
-
* If not explicitly provided, it defaults to the component's name. This key is used to
|
|
191
|
-
* load appropriate translation resources and locale-specific configurations.
|
|
192
|
-
* @protected
|
|
193
|
-
*/
|
|
194
|
-
protected localeRoot?: string;
|
|
195
|
-
/**
|
|
196
|
-
* @description Current value of the component.
|
|
197
|
-
* @summary Can be a string, number, date, or array of string or objects.
|
|
198
|
-
*/
|
|
199
|
-
value?: any;
|
|
200
|
-
/**
|
|
201
|
-
* @description Reference to CRUD operation constants for template usage.
|
|
202
|
-
* @summary Exposes the OperationKeys enum to the component template, enabling
|
|
203
|
-
* conditional rendering and behavior based on operation types. This protected
|
|
204
|
-
* readonly property ensures that template logic can access operation constants
|
|
205
|
-
* while maintaining encapsulation and preventing accidental modification.
|
|
206
|
-
* @protected
|
|
207
|
-
* @readonly
|
|
208
|
-
*/
|
|
209
|
-
protected readonly OperationKeys: typeof OperationKeys;
|
|
210
|
-
/**
|
|
211
|
-
* @description Angular Location service.
|
|
212
|
-
* @summary Injected service that provides direct access to the browser's URL and history.
|
|
213
|
-
* Unlike the Router, Location allows for low-level manipulation of the browser's history stack
|
|
214
|
-
* and URL path, such as programmatically navigating back or forward, or updating the URL without
|
|
215
|
-
* triggering a route change. This is useful for scenarios where you need to interact with the
|
|
216
|
-
* browser history or URL outside of Angular's routing system, such as closing modals, handling
|
|
217
|
-
* popstate events, or supporting custom navigation logic.
|
|
218
|
-
*
|
|
219
|
-
*/
|
|
220
|
-
location: any;
|
|
221
|
-
/**
|
|
222
|
-
* @description Repository instance for data layer operations.
|
|
223
|
-
* @summary Provides a connection to the data layer for retrieving and manipulating data.
|
|
224
|
-
* This is an instance of the DecafRepository class, initialized lazily in the repository getter.
|
|
225
|
-
* The repository is used to perform CRUD (Create, Read, Update, Delete) operations on the
|
|
226
|
-
* data model and provides methods for querying and filtering data based on specific criteria.
|
|
227
|
-
*
|
|
228
|
-
* @protected
|
|
229
|
-
*/
|
|
230
|
-
protected _repository?: IRepository<M>;
|
|
231
|
-
/**
|
|
232
|
-
* @description Initialization status flag for the component.
|
|
233
|
-
* @summary Tracks whether the component has completed its initialization process.
|
|
234
|
-
* This flag is used to prevent duplicate initialization and to determine if
|
|
235
|
-
* certain operations that require initialization can be performed.
|
|
236
|
-
* @default false
|
|
237
|
-
*/
|
|
238
|
-
protected initialized: boolean;
|
|
239
|
-
protected events: UIEventProperty;
|
|
240
|
-
protected handlers: UIEventProperty;
|
|
241
|
-
protected constructor();
|
|
242
|
-
get repository(): IRepository<M>;
|
|
243
|
-
set repository(repository: IRepository<M>);
|
|
244
|
-
render(...args: unknown[]): Promise<any>;
|
|
245
|
-
refresh(...args: unknown[]): Promise<any>;
|
|
246
|
-
/**
|
|
247
|
-
* Asynchronously initializes the component with the provided arguments.
|
|
248
|
-
* This method sets the `initialized` property to `true` once the initialization is complete.
|
|
249
|
-
*
|
|
250
|
-
* @param args - A variable number of arguments of unknown types that can be used for initialization.
|
|
251
|
-
* @returns A promise that resolves when the initialization is complete.
|
|
252
|
-
*/
|
|
253
|
-
initialize(...args: unknown[]): Promise<any>;
|
|
254
|
-
/**
|
|
255
|
-
* Translates content based on the provided arguments.
|
|
256
|
-
* Logs the translation request with the component name and arguments.
|
|
257
|
-
*
|
|
258
|
-
* @param args - A variable number of arguments used for translation.
|
|
259
|
-
* @returns A promise that resolves with the translation result.
|
|
260
|
-
*/
|
|
261
|
-
translate(...args: unknown[]): Promise<any>;
|
|
262
|
-
preview(...args: unknown[]): Promise<void>;
|
|
263
|
-
/**
|
|
264
|
-
* Submits data or performs an action associated with the component.
|
|
265
|
-
*
|
|
266
|
-
* @param args - A variable number of arguments of any type to be passed to the submit operation.
|
|
267
|
-
* @returns A promise that resolves with the result of the submit operation.
|
|
268
|
-
*/
|
|
269
|
-
submit(...args: unknown[]): Promise<any>;
|
|
270
|
-
/**
|
|
271
|
-
* @description Normalizes handler definitions into executable functions.
|
|
272
|
-
* @summary Iterates through a handlers map and ensures each entry is stored as a callable
|
|
273
|
-
* function on the component. Plain functions are stored directly, while handler classes are
|
|
274
|
-
* instantiated so their `handle` method (or a keyed override) becomes the registered handler.
|
|
275
|
-
* This allows decorators to accept either inline functions or handler classes transparently.
|
|
276
|
-
* @template T Extends `DecafEventHandler` to constrain handler class types.
|
|
277
|
-
* @param handlers - Dictionary of handler names mapped to functions or handler constructors.
|
|
278
|
-
* @param instance - Optional target handler instance; defaults to the current component.
|
|
279
|
-
*/
|
|
280
|
-
protected parseHandlers<T extends DecafEventHandler>(handlers: UIEventProperty, instance: T): UIEventProperty;
|
|
281
|
-
/**
|
|
282
|
-
* @description Registers event callbacks on the component instance.
|
|
283
|
-
* @summary Processes an events map produced by decorators where each value can be a factory
|
|
284
|
-
* returning a function or a component constructor. When a constructor is returned, the method
|
|
285
|
-
* matching the event key is instantiated and stored; otherwise the produced function is
|
|
286
|
-
* assigned directly. This enables flexible event binding definitions for derived components.
|
|
287
|
-
* @template T Extends `DecafComponent<Model>` to scope acceptable event owners.
|
|
288
|
-
* @param events - Dictionary of event names mapped to function factories or component constructors.
|
|
289
|
-
* @param instance - Optional component instance to receive the events; defaults to `this`.
|
|
290
|
-
*/
|
|
291
|
-
protected parseEvents<T extends DecafComponent<Model>>(events: UIEventProperty, instance: T): UIEventProperty;
|
|
292
|
-
}
|
|
293
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DecafComponent.js","sourceRoot":"","sources":["../../src/ui/DecafComponent.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAGhD,2DAAqE;AAGrE,uCAA6C;AAI7C;;;;;GAKG;AACH,MAAsB,cAAgC,SAAQ,qBAAW;IAkQvE;QACE,KAAK,EAAE,CAAC;QAxIV;;;;;;;WAOG;QACO,mBAAc,GAAY,IAAI,CAAC;QAEzC;;;;;;;WAOG;QACO,eAAU,GAAY,KAAK,CAAC;QAWtC;;;;;;;WAOG;QACH,SAAI,GAA4B,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;QAE5C;;;;;;;WAOG;QACH,UAAK,GAA4B,EAAE,CAAC;QAEpC;;;;;;WAMG;QACH,UAAK,GAAY,EAAE,CAAC;QAEpB;;;;WAIG;QACH,YAAO,GAAY,KAAK,CAAC;QAyBzB;;;;;;;;WAQG;QACgB,kBAAa,GAAG,6BAAa,CAAC;QAyBjD;;;;;;WAMG;QACO,gBAAW,GAAY,KAAK,CAAC;QAE7B,WAAM,GAAoB,EAAE,CAAC;QAE7B,aAAQ,GAAoB,EAAE,CAAC;IAIzC,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAA6B,CAAC;IAC5C,CAAC;IAED,IAAI,UAAU,CAAC,UAA0B;QACvC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,GAAG,IAAe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C,IAAI,CAAC,GAAG,EAAE,CAAC;oBAClB,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;gBAC7B,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;gBAClB,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;YAC7B,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAxYD,wCAwYC"}
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DecafEventHandler.js","sourceRoot":"","sources":["../../src/ui/DecafEventHandler.ts"],"names":[],"mappings":";;;AACA,yDAAkD;AAElD;;;;;;;GAOG;AACH,MAAa,iBAAkB,SAAQ,+BAAqB;IAC1D;;;;;OAKG;IACH;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,GAAG,IAAe;QACvB,IAAI,CAAC,GAAG;aACL,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;aAChB,IAAI,CAAC,aAAa,IAAI,CAAC,aAAa,aAAa,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;OAMG;IACH,WAAW,CAAC,GAAG,IAAe;QAC5B,IAAI,CAAC,GAAG;aACL,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC;aACrB,IAAI,CACH,aAAa,IAAI,CAAC,aAAa,mBAAmB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CACzE,CAAC;IACN,CAAC;IAED;;;;;;OAMG;IACH,YAAY,CAAC,GAAG,IAAe;QAC7B,IAAI,CAAC,GAAG;aACL,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;aACtB,IAAI,CACH,aAAa,IAAI,CAAC,aAAa,oBAAoB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAC1E,CAAC;IACN,CAAC;CACF;AArDD,8CAqDC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DecafTranslateService.js","sourceRoot":"","sources":["../../src/ui/DecafTranslateService.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAEhD,MAAa,qBAAsB,SAAQ,qBAAW;IACpD,SAAS,CAAC,GAAW,EAAE,MAA4B;QACjD,IAAI,CAAC,GAAG;aACL,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;aACnB,IAAI,CACH,kBAAkB,GAAG,gBAAgB,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,CACpE,CAAC;IACN,CAAC;IAED,OAAO,CAAC,GAAW,EAAE,MAA4B;QAC/C,IAAI,CAAC,GAAG;aACL,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;aACjB,IAAI,CACH,kBAAkB,GAAG,gBAAgB,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,CACpE,CAAC;IACN,CAAC;CACF;AAhBD,sDAgBC"}
|
package/lib/ui/Rendering.d.ts
DELETED
|
@@ -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
|
-
}
|
package/lib/ui/Rendering.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Rendering.js","sourceRoot":"","sources":["../../src/ui/Rendering.ts"],"names":[],"mappings":";;;AAAA,2DAAuE;AACvE,+CAMqB;AAYrB,yCAA0C;AAC1C,uCAA0D;AAE1D,qDAA6D;AAC7D,yEAOwC;AAExC;;;;;;;;;;;;GAYG;AACH;;;;;GAKG;AACH,MAAsB,eAAe;IACnC;;;;OAIG;aACY,UAAK,GAIhB,EAAE,AAJc,CAIb;IAgBP,YAA+B,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;QAL9C;;WAEG;QACO,gBAAW,GAAY,KAAK,CAAC;QAGrC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC/B,OAA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B,eAAe;AACf,WAAW;AACX,SAAS;AACT,OAAO;AACP,cAAc;AACd,EAAE;AACF,mCAAmC;AACnC,cAAc;AACd,4DAA4D;AAC5D,0CAA0C;AAC1C,SAAS;AACT,OAAO;AACP,cAAc;AACd,EAAE;AACF,kCAAkC;AAClC,cAAc;AACd,uCAAuC;AACvC,mEAAmE;AACnE,SAAS;AACT,OAAO;AACP,cAAc;AACd,EAAE;AACF,8BAA8B;AAC9B,cAAc;AACd,wCAAwC;AACxC,mEAAmE;AACnE,SAAS;AACT,OAAO;AACP,cAAc;AACd,EAAE;AACF,8BAA8B;AAC9B,cAAc;AACd,wCAAwC;AACxC,mEAAmE;AACnE,SAAS;AACT,OAAO;AACP,cAAc"}
|
package/lib/ui/UIValidator.d.ts
DELETED
|
@@ -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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UIValidator.js","sourceRoot":"","sources":["../../src/ui/UIValidator.ts"],"names":[],"mappings":";;;AAAA,yEAA2D;AAG3D,MAAsB,WAAY,SAAQ,gCAAS;IAGxC,UAAU,CAAC,OAAe,EAAE,GAAG,IAAW;QACjD,IAAI,WAAW,CAAC,gBAAgB;YAC9B,OAAO,WAAW,CAAC,gBAAgB,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;QAClE,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IAC5C,CAAC;CACF;AARD,kCAQC"}
|